Selector: update Sizzle

Fix #14584
(cherry picked from commit 29c8003347)
This commit is contained in:
Richard Gibson 2013-12-20 16:46:30 -05:00
parent 36c3f32f00
commit 189b2d22fb
5 changed files with 22 additions and 16 deletions

View File

@ -13,7 +13,7 @@
"bower.json"
],
"dependencies": {
"sizzle": "1.10.14"
"sizzle": "1.10.15"
},
"devDependencies": {
"requirejs": "~2.1.8",

View File

@ -1,12 +1,12 @@
/*!
* Sizzle CSS Selector Engine v1.10.14
* Sizzle CSS Selector Engine v1.10.15
* http://sizzlejs.com/
*
* Copyright 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-11-27
* Date: 2013-12-20
*/
(function( window ) {
@ -614,7 +614,13 @@ setDocument = Sizzle.setDocument = function( node ) {
// setting a boolean content attribute,
// since its presence should be enough
// 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
// Boolean attributes and "value" are not treated correctly
@ -631,18 +637,16 @@ setDocument = Sizzle.setDocument = function( node ) {
});
assert(function( div ) {
// Support: Opera 10-12/IE8
// ^= $= *= and empty values
// Should not select anything
// 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");
input.setAttribute( "type", "hidden" );
div.appendChild( input ).setAttribute( "t", "" );
div.appendChild( input ).setAttribute( "name", "D" );
if ( div.querySelectorAll("[t^='']").length ) {
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
// Support: IE8
// 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)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -316,7 +316,7 @@ test("class", function() {
});
test("name", function() {
expect( 13 );
expect( 14 );
var form;
@ -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=tName2]", ["tName2ID"] );
t( "Find elements that have similar IDs", "#tName2ID", ["tName2ID"] );
t( "Case-sensitivity", "[name=tname1]", [] );
});
test("multiple", function() {