]> source.dussan.org Git - jquery.git/commitdiff
Use Sizzle.Expr.match.globalPOS for identifying POS selectors in traversing. Fixes...
authortimmywil <timmywillisn@gmail.com>
Mon, 12 Dec 2011 16:23:47 +0000 (11:23 -0500)
committertimmywil <timmywillisn@gmail.com>
Mon, 12 Dec 2011 16:23:47 +0000 (11:23 -0500)
src/sizzle
src/traversing.js
test/unit/traversing.js

index 935874052e54b4686b4e69b653eb05cd6e25c447..423f35af8bf43f3f07bb17284e21608f08372c22 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 935874052e54b4686b4e69b653eb05cd6e25c447
+Subproject commit 423f35af8bf43f3f07bb17284e21608f08372c22
index f06cfd92f7d442dc65dd1c2b360e3f10a509aa5b..c342e15c180531466f4a09ad8495f89fe8bec2aa 100644 (file)
@@ -6,7 +6,7 @@ var runtil = /Until$/,
        rmultiselector = /,/,
        isSimple = /^.[^:#\[\.,]*$/,
        slice = Array.prototype.slice,
-       POS = jQuery.expr.match.POS,
+       POS = jQuery.expr.match.globalPOS,
        // methods guaranteed to produce a unique set when starting from a unique set
        guaranteedUnique = {
                children: true,
index bcd3a974e7633c21ed47d5f16f33b5abc41a5b51..63d46dd4575e6ef116b434e82e1be5250d0cbbfb 100644 (file)
@@ -38,7 +38,7 @@ test("find(node|jQuery object)", function() {
 });
 
 test("is(String|undefined)", function() {
-       expect(29);
+       expect(30);
        ok( jQuery("#form").is("form"), "Check for element: A form must be a form" );
        ok( !jQuery("#form").is("div"), "Check for element: A form is not a div" );
        ok( jQuery("#mark").is(".blog"), "Check for class: Expected class 'blog'" );
@@ -70,8 +70,10 @@ test("is(String|undefined)", function() {
        ok( jQuery("#en").is("[lang=\"en\"] , [lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
        ok( jQuery("#en").is("[lang=\"de\"] , [lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
 
-       ok( !jQuery(window).is('a'), "Checking is on a window does not throw an exception(#10178)" );
-       ok( !jQuery(document).is('a'), "Checking is on a document does not throw an exception(#10178)" );
+       ok( !jQuery(window).is("a"), "Checking is on a window does not throw an exception(#10178)" );
+       ok( !jQuery(document).is("a"), "Checking is on a document does not throw an exception(#10178)" );
+
+       ok( jQuery("#option1b").is("#select1 option:not(:first)"), "POS inside of :not() (#10970)" );
 });
 
 test("is(jQuery)", function() {