mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Sizzle: update committed dependencies
This commit is contained in:
parent
9ac88dea49
commit
710d236ad1
@ -52,7 +52,11 @@ module.exports = function( grunt ) {
|
||||
},
|
||||
src: {
|
||||
files: {
|
||||
"src/sizzle": "sizzle"
|
||||
"src/sizzle/dist": "sizzle/dist",
|
||||
"src/sizzle/test/data": "sizzle/test/data",
|
||||
"src/sizzle/test/unit": "sizzle/test/unit",
|
||||
"src/sizzle/test/index.html": "sizzle/test/index.html",
|
||||
"src/sizzle/test/jquery.js": "sizzle/test/jquery.js"
|
||||
}
|
||||
},
|
||||
tests: {
|
||||
|
32
src/sizzle/dist/sizzle.js
vendored
32
src/sizzle/dist/sizzle.js
vendored
@ -1,18 +1,17 @@
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v1.10.15
|
||||
* Sizzle CSS Selector Engine v1.10.16
|
||||
* http://sizzlejs.com/
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation, Inc. and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2013-12-20
|
||||
* Date: 2014-01-13
|
||||
*/
|
||||
(function( window ) {
|
||||
|
||||
var i,
|
||||
support,
|
||||
cachedruns,
|
||||
Expr,
|
||||
getText,
|
||||
isXML,
|
||||
@ -1521,8 +1520,8 @@ function addCombinator( matcher, combinator, base ) {
|
||||
|
||||
// Check against all ancestor/preceding elements
|
||||
function( elem, context, xml ) {
|
||||
var data, cache, outerCache,
|
||||
dirkey = dirruns + " " + doneName;
|
||||
var oldCache, outerCache,
|
||||
newCache = [ dirruns, doneName ];
|
||||
|
||||
// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
|
||||
if ( xml ) {
|
||||
@ -1537,14 +1536,17 @@ function addCombinator( matcher, combinator, base ) {
|
||||
while ( (elem = elem[ dir ]) ) {
|
||||
if ( elem.nodeType === 1 || checkNonElements ) {
|
||||
outerCache = elem[ expando ] || (elem[ expando ] = {});
|
||||
if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
|
||||
if ( (data = cache[1]) === true || data === cachedruns ) {
|
||||
return data === true;
|
||||
}
|
||||
if ( (oldCache = outerCache[ dir ]) &&
|
||||
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
||||
|
||||
// Assign to newCache so results back-propagate to previous elements
|
||||
return (newCache[ 2 ] = oldCache[ 2 ]);
|
||||
} else {
|
||||
cache = outerCache[ dir ] = [ dirkey ];
|
||||
cache[1] = matcher( elem, context, xml ) || cachedruns;
|
||||
if ( cache[1] === true ) {
|
||||
// Reuse newcache so results back-propagate to previous elements
|
||||
outerCache[ dir ] = newCache;
|
||||
|
||||
// A match means we're done; a fail means we have to keep checking
|
||||
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1738,9 +1740,7 @@ function matcherFromTokens( tokens ) {
|
||||
}
|
||||
|
||||
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
||||
// A counter to specify which element is currently being matched
|
||||
var matcherCachedRuns = 0,
|
||||
bySet = setMatchers.length > 0,
|
||||
var bySet = setMatchers.length > 0,
|
||||
byElement = elementMatchers.length > 0,
|
||||
superMatcher = function( seed, context, xml, results, outermost ) {
|
||||
var elem, j, matcher,
|
||||
@ -1757,7 +1757,6 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
||||
|
||||
if ( outermost ) {
|
||||
outermostContext = context !== document && context;
|
||||
cachedruns = matcherCachedRuns;
|
||||
}
|
||||
|
||||
// Add elements passing elementMatchers directly to results
|
||||
@ -1775,7 +1774,6 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
||||
}
|
||||
if ( outermost ) {
|
||||
dirruns = dirrunsUnique;
|
||||
cachedruns = ++matcherCachedRuns;
|
||||
}
|
||||
}
|
||||
|
||||
|
4
src/sizzle/dist/sizzle.min.js
vendored
4
src/sizzle/dist/sizzle.min.js
vendored
File diff suppressed because one or more lines are too long
2
src/sizzle/dist/sizzle.min.map
vendored
2
src/sizzle/dist/sizzle.min.map
vendored
File diff suppressed because one or more lines are too long
@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Sizzle Test Suite</title>
|
||||
<link rel="Stylesheet" media="screen" href="../bower_components/qunit/qunit/qunit.css" />
|
||||
<script type="text/javascript" src="../bower_components/qunit/qunit/qunit.js"></script>
|
||||
<link rel="Stylesheet" media="screen" href="libs/qunit/qunit.css" />
|
||||
<script type="text/javascript" src="libs/qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="data/testinit.js"></script>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="../dist/sizzle.js"></script>
|
||||
|
@ -1082,9 +1082,13 @@ test("pseudo - :lang", function() {
|
||||
});
|
||||
|
||||
test("caching", function() {
|
||||
expect( 1 );
|
||||
expect( 2 );
|
||||
Sizzle( ":not(code)", document.getElementById("ap") );
|
||||
deepEqual( Sizzle( ":not(code)", document.getElementById("foo") ), q("sndp", "en", "yahoo", "sap", "anchor2", "simon"), "Reusing selector with new context" );
|
||||
|
||||
t( "Deep ancestry caching in post-positional element matcher (jQuery #14657)",
|
||||
"#qunit-fixture a:lt(3):parent",
|
||||
[ "simon1", "google", "groups" ] );
|
||||
});
|
||||
|
||||
asyncTest( "Iframe dispatch should not affect Sizzle, see jQuery #13936", 1, function() {
|
||||
|
Loading…
Reference in New Issue
Block a user