11/*!
2- * Sizzle CSS Selector Engine v1.10.19
2+ * Sizzle CSS Selector Engine v1.11.1
33 * http://sizzlejs.com/
44 *
55 * Copyright 2013 jQuery Foundation, Inc. and other contributors
66 * Released under the MIT license
77 * http://jquery.org/license
88 *
9- * Date: 2014-04-18
9+ * Date: 2014-06-25
1010 */
1111( function ( window ) {
1212
@@ -74,25 +74,21 @@ var i,
7474
7575 // Regular expressions
7676
77- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
77+ // http://www.w3.org/TR/css3-selectors/#whitespace
7878 whitespace = "[\\x20\\t\\r\\n\\f]" ,
79- // http://www.w3.org/TR/css3-syntax/#characters
80- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+" ,
8179
82- // Loosely modeled on CSS identifier characters
83- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
84- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
85- identifier = characterEncoding . replace ( "w" , "w#" ) ,
80+ // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
81+ identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+" ,
8682
8783 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
88- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
84+ attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
8985 // Operator (capture 2)
9086 "*([*^$|!~]?=)" + whitespace +
9187 // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
9288 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
9389 "*\\]" ,
9490
95- pseudos = ":(" + characterEncoding + ")(?:\\((" +
91+ pseudos = ":(" + identifier + ")(?:\\((" +
9692 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
9793 // 1. quoted (capture 3; capture 4 or capture 5)
9894 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
@@ -114,9 +110,9 @@ var i,
114110 ridentifier = new RegExp ( "^" + identifier + "$" ) ,
115111
116112 matchExpr = {
117- "ID" : new RegExp ( "^#(" + characterEncoding + ")" ) ,
118- "CLASS" : new RegExp ( "^\\.(" + characterEncoding + ")" ) ,
119- "TAG" : new RegExp ( "^(" + characterEncoding . replace ( "w" , "w*" ) + ")" ) ,
113+ "ID" : new RegExp ( "^#(" + identifier + ")" ) ,
114+ "CLASS" : new RegExp ( "^\\.(" + identifier + ")" ) ,
115+ "TAG" : new RegExp ( "^(" + identifier + "|[*] )" ) ,
120116 "ATTR" : new RegExp ( "^" + attributes ) ,
121117 "PSEUDO" : new RegExp ( "^" + pseudos ) ,
122118 "CHILD" : new RegExp ( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
@@ -240,7 +236,7 @@ function Sizzle( selector, context, results, seed ) {
240236 return results ;
241237
242238 // Speed-up: Sizzle(".CLASS")
243- } else if ( ( m = match [ 3 ] ) && support . getElementsByClassName && context . getElementsByClassName ) {
239+ } else if ( ( m = match [ 3 ] ) && support . getElementsByClassName ) {
244240 push . apply ( results , context . getElementsByClassName ( m ) ) ;
245241 return results ;
246242 }
@@ -513,17 +509,8 @@ setDocument = Sizzle.setDocument = function( node ) {
513509 return ! div . getElementsByTagName ( "*" ) . length ;
514510 } ) ;
515511
516- // Check if getElementsByClassName can be trusted
517- support . getElementsByClassName = rnative . test ( doc . getElementsByClassName ) && assert ( function ( div ) {
518- div . innerHTML = "<div class='a'></div><div class='a i'></div>" ;
519-
520- // Support: Safari<4
521- // Catch class over-caching
522- div . firstChild . className = "i" ;
523- // Support: Opera<10
524- // Catch gEBCN failure to find non-leading classes
525- return div . getElementsByClassName ( "i" ) . length === 2 ;
526- } ) ;
512+ // Support: IE<9
513+ support . getElementsByClassName = rnative . test ( doc . getElementsByClassName ) ;
527514
528515 // Support: IE<10
529516 // Check if getElementById returns elements by name
@@ -592,7 +579,7 @@ setDocument = Sizzle.setDocument = function( node ) {
592579
593580 // Class
594581 Expr . find [ "CLASS" ] = support . getElementsByClassName && function ( className , context ) {
595- if ( typeof context . getElementsByClassName !== strundefined && documentIsHTML ) {
582+ if ( documentIsHTML ) {
596583 return context . getElementsByClassName ( className ) ;
597584 }
598585 } ;
@@ -621,13 +608,13 @@ setDocument = Sizzle.setDocument = function( node ) {
621608 // setting a boolean content attribute,
622609 // since its presence should be enough
623610 // http://bugs.jquery.com/ticket/12359
624- div . innerHTML = "<select msallowclip =''><option selected=''></option></select>" ;
611+ div . innerHTML = "<select msallowcapture =''><option selected=''></option></select>" ;
625612
626613 // Support: IE8, Opera 11-12.16
627614 // Nothing should be selected when empty strings follow ^= or $= or *=
628615 // The test attribute must be unknown in Opera but "safe" for WinRT
629616 // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
630- if ( div . querySelectorAll ( "[msallowclip ^='']" ) . length ) {
617+ if ( div . querySelectorAll ( "[msallowcapture ^='']" ) . length ) {
631618 rbuggyQSA . push ( "[*^$]=" + whitespace + "*(?:''|\"\")" ) ;
632619 }
633620
@@ -1260,6 +1247,7 @@ Expr = Sizzle.selectors = {
12601247 } ) ,
12611248
12621249 "contains" : markFunction ( function ( text ) {
1250+ text = text . replace ( runescape , funescape ) ;
12631251 return function ( elem ) {
12641252 return ( elem . textContent || elem . innerText || getText ( elem ) ) . indexOf ( text ) > - 1 ;
12651253 } ;
@@ -1972,7 +1960,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
19721960// Sort stability
19731961support . sortStable = expando . split ( "" ) . sort ( sortOrder ) . join ( "" ) === expando ;
19741962
1975- // Support: Chrome<14
1963+ // Support: Chrome 14-35+
19761964// Always assume duplicates if they aren't passed to the comparison function
19771965support . detectDuplicates = ! ! hasDuplicate ;
19781966
0 commit comments