* Changed Selector pattern match so that descendant combinators after pseudoclass tokens are properly handled. Fixes #9696. [wiktor, kangax, Andrew Dupont]
This commit is contained in:
parent
865ac01937
commit
88f8d3b9af
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Changed Selector pattern match so that descendant combinators after pseudoclass tokens are properly handled. [wiktor, kangax, Andrew Dupont]
|
||||
|
||||
* Make sure $w always returns an array. [Andrew Dupont, Tobie Langel]
|
||||
|
||||
* Add more tests to Hash. [Mislav Marohnić]
|
||||
|
|
|
@ -250,7 +250,7 @@ Object.extend(Selector, {
|
|||
tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
|
||||
id: /^#([\w\-\*]+)(\b|$)/,
|
||||
className: /^\.([\w\-\*]+)(\b|$)/,
|
||||
pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,
|
||||
pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,
|
||||
attrPresence: /^\[([\w]+)\]/,
|
||||
attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
|
||||
},
|
||||
|
|
|
@ -358,6 +358,7 @@
|
|||
assertEnumEqual([$('link_2')], $$('#p a:not(a[rel$=nofollow])'), 'attribute 3');
|
||||
assertEnumEqual([$('em')], $$('#p a:not(a[rel$="nofollow"]) > em'), 'attribute 4')
|
||||
assertEnumEqual([$('item_2')], $$('#list li:not(#item_1):not(#item_3)'), 'adjacent :not clauses');
|
||||
assertEnumEqual([$('son')], $$('#grandfather > div:not(#uncle) #son'));
|
||||
}},
|
||||
|
||||
testSelectorWithEnabledDisabledChecked: function() {with(this) {
|
||||
|
|
Loading…
Reference in New Issue