Commit 189b2d22 authored by Richard Gibson's avatar Richard Gibson

Selector: update Sizzle

Fix #14584
(cherry picked from commit 29c80033)
parent 36c3f32f
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"bower.json" "bower.json"
], ],
"dependencies": { "dependencies": {
"sizzle": "1.10.14" "sizzle": "1.10.15"
}, },
"devDependencies": { "devDependencies": {
"requirejs": "~2.1.8", "requirejs": "~2.1.8",
......
/*! /*!
* Sizzle CSS Selector Engine v1.10.14 * Sizzle CSS Selector Engine v1.10.15
* http://sizzlejs.com/ * http://sizzlejs.com/
* *
* Copyright 2013 jQuery Foundation, Inc. and other contributors * Copyright 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license * Released under the MIT license
* http://jquery.org/license * http://jquery.org/license
* *
* Date: 2013-11-27 * Date: 2013-12-20
*/ */
(function( window ) { (function( window ) {
...@@ -614,7 +614,13 @@ setDocument = Sizzle.setDocument = function( node ) { ...@@ -614,7 +614,13 @@ setDocument = Sizzle.setDocument = function( node ) {
// setting a boolean content attribute, // setting a boolean content attribute,
// since its presence should be enough // since its presence should be enough
// http://bugs.jquery.com/ticket/12359 // http://bugs.jquery.com/ticket/12359
div.innerHTML = "<select><option selected=''></option></select>"; div.innerHTML = "<select t=''><option selected=''></option></select>";
// Support: IE8, Opera 10-12
// Nothing should be selected when empty strings follow ^= or $= or *=
if ( div.querySelectorAll("[t^='']").length ) {
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
}
// Support: IE8 // Support: IE8
// Boolean attributes and "value" are not treated correctly // Boolean attributes and "value" are not treated correctly
...@@ -631,18 +637,16 @@ setDocument = Sizzle.setDocument = function( node ) { ...@@ -631,18 +637,16 @@ setDocument = Sizzle.setDocument = function( node ) {
}); });
assert(function( div ) { assert(function( div ) {
// Support: Opera 10-12/IE8
// ^= $= *= and empty values
// Should not select anything
// Support: Windows 8 Native Apps // Support: Windows 8 Native Apps
// The type attribute is restricted during .innerHTML assignment // The type and name attributes are restricted during .innerHTML assignment
var input = doc.createElement("input"); var input = doc.createElement("input");
input.setAttribute( "type", "hidden" ); input.setAttribute( "type", "hidden" );
div.appendChild( input ).setAttribute( "t", "" ); div.appendChild( input ).setAttribute( "name", "D" );
if ( div.querySelectorAll("[t^='']").length ) { // Support: IE8
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); // Enforce case-sensitivity of name attribute
if ( div.querySelectorAll("[name=d]").length ) {
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
} }
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
......
This diff is collapsed.
This diff is collapsed.
...@@ -316,7 +316,7 @@ test("class", function() { ...@@ -316,7 +316,7 @@ test("class", function() {
}); });
test("name", function() { test("name", function() {
expect( 13 ); expect( 14 );
var form; var form;
...@@ -342,6 +342,8 @@ test("name", function() { ...@@ -342,6 +342,8 @@ test("name", function() {
t( "Find elements that have similar IDs", "[name=tName1]", ["tName1ID"] ); t( "Find elements that have similar IDs", "[name=tName1]", ["tName1ID"] );
t( "Find elements that have similar IDs", "[name=tName2]", ["tName2ID"] ); t( "Find elements that have similar IDs", "[name=tName2]", ["tName2ID"] );
t( "Find elements that have similar IDs", "#tName2ID", ["tName2ID"] ); t( "Find elements that have similar IDs", "#tName2ID", ["tName2ID"] );
t( "Case-sensitivity", "[name=tname1]", [] );
}); });
test("multiple", function() { test("multiple", function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment