Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
a247bd09
Commit
a247bd09
authored
Jan 13, 2014
by
Timmy Willison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sizzle: update committed dependencies
parent
06ee2c16
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
24 deletions
+30
-24
Gruntfile.js
Gruntfile.js
+5
-1
sizzle.js
src/sizzle/dist/sizzle.js
+15
-17
sizzle.min.js
src/sizzle/dist/sizzle.min.js
+2
-2
sizzle.min.map
src/sizzle/dist/sizzle.min.map
+1
-1
index.html
src/sizzle/test/index.html
+2
-2
selector.js
src/sizzle/test/unit/selector.js
+5
-1
No files found.
Gruntfile.js
View file @
a247bd09
...
@@ -50,7 +50,11 @@ module.exports = function( grunt ) {
...
@@ -50,7 +50,11 @@ module.exports = function( grunt ) {
},
},
src
:
{
src
:
{
files
:
{
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
:
{
tests
:
{
...
...
src/sizzle/dist/sizzle.js
View file @
a247bd09
/*!
/*!
* Sizzle CSS Selector Engine v1.10.1
5
* Sizzle CSS Selector Engine v1.10.1
6
* 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: 201
3-12-20
* Date: 201
4-01-13
*/
*/
(
function
(
window
)
{
(
function
(
window
)
{
var
i
,
var
i
,
support
,
support
,
cachedruns
,
Expr
,
Expr
,
getText
,
getText
,
isXML
,
isXML
,
...
@@ -1521,8 +1520,8 @@ function addCombinator( matcher, combinator, base ) {
...
@@ -1521,8 +1520,8 @@ function addCombinator( matcher, combinator, base ) {
// Check against all ancestor/preceding elements
// Check against all ancestor/preceding elements
function
(
elem
,
context
,
xml
)
{
function
(
elem
,
context
,
xml
)
{
var
data
,
c
ache
,
outerCache
,
var
oldC
ache
,
outerCache
,
dirkey
=
dirruns
+
" "
+
doneName
;
newCache
=
[
dirruns
,
doneName
]
;
// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
if
(
xml
)
{
if
(
xml
)
{
...
@@ -1537,14 +1536,17 @@ function addCombinator( matcher, combinator, base ) {
...
@@ -1537,14 +1536,17 @@ function addCombinator( matcher, combinator, base ) {
while
(
(
elem
=
elem
[
dir
])
)
{
while
(
(
elem
=
elem
[
dir
])
)
{
if
(
elem
.
nodeType
===
1
||
checkNonElements
)
{
if
(
elem
.
nodeType
===
1
||
checkNonElements
)
{
outerCache
=
elem
[
expando
]
||
(
elem
[
expando
]
=
{});
outerCache
=
elem
[
expando
]
||
(
elem
[
expando
]
=
{});
if
(
(
cache
=
outerCache
[
dir
])
&&
cache
[
0
]
===
dirkey
)
{
if
(
(
oldCache
=
outerCache
[
dir
])
&&
if
(
(
data
=
cache
[
1
])
===
true
||
data
===
cachedruns
)
{
oldCache
[
0
]
===
dirruns
&&
oldCache
[
1
]
===
doneName
)
{
return
data
===
true
;
}
// Assign to newCache so results back-propagate to previous elements
return
(
newCache
[
2
]
=
oldCache
[
2
]);
}
else
{
}
else
{
cache
=
outerCache
[
dir
]
=
[
dirkey
];
// Reuse newcache so results back-propagate to previous elements
cache
[
1
]
=
matcher
(
elem
,
context
,
xml
)
||
cachedruns
;
outerCache
[
dir
]
=
newCache
;
if
(
cache
[
1
]
===
true
)
{
// A match means we're done; a fail means we have to keep checking
if
(
(
newCache
[
2
]
=
matcher
(
elem
,
context
,
xml
))
)
{
return
true
;
return
true
;
}
}
}
}
...
@@ -1738,9 +1740,7 @@ function matcherFromTokens( tokens ) {
...
@@ -1738,9 +1740,7 @@ function matcherFromTokens( tokens ) {
}
}
function
matcherFromGroupMatchers
(
elementMatchers
,
setMatchers
)
{
function
matcherFromGroupMatchers
(
elementMatchers
,
setMatchers
)
{
// A counter to specify which element is currently being matched
var
bySet
=
setMatchers
.
length
>
0
,
var
matcherCachedRuns
=
0
,
bySet
=
setMatchers
.
length
>
0
,
byElement
=
elementMatchers
.
length
>
0
,
byElement
=
elementMatchers
.
length
>
0
,
superMatcher
=
function
(
seed
,
context
,
xml
,
results
,
outermost
)
{
superMatcher
=
function
(
seed
,
context
,
xml
,
results
,
outermost
)
{
var
elem
,
j
,
matcher
,
var
elem
,
j
,
matcher
,
...
@@ -1757,7 +1757,6 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
...
@@ -1757,7 +1757,6 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
if
(
outermost
)
{
if
(
outermost
)
{
outermostContext
=
context
!==
document
&&
context
;
outermostContext
=
context
!==
document
&&
context
;
cachedruns
=
matcherCachedRuns
;
}
}
// Add elements passing elementMatchers directly to results
// Add elements passing elementMatchers directly to results
...
@@ -1775,7 +1774,6 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
...
@@ -1775,7 +1774,6 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
}
}
if
(
outermost
)
{
if
(
outermost
)
{
dirruns
=
dirrunsUnique
;
dirruns
=
dirrunsUnique
;
cachedruns
=
++
matcherCachedRuns
;
}
}
}
}
...
...
src/sizzle/dist/sizzle.min.js
View file @
a247bd09
This diff is collapsed.
Click to expand it.
src/sizzle/dist/sizzle.min.map
View file @
a247bd09
This diff is collapsed.
Click to expand it.
src/sizzle/test/index.html
View file @
a247bd09
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
Sizzle Test Suite
</title>
<title>
Sizzle Test Suite
</title>
<link
rel=
"Stylesheet"
media=
"screen"
href=
"
../bower_components/qunit
/qunit/qunit.css"
/>
<link
rel=
"Stylesheet"
media=
"screen"
href=
"
libs
/qunit/qunit.css"
/>
<script
type=
"text/javascript"
src=
"
../bower_components/qunit
/qunit/qunit.js"
></script>
<script
type=
"text/javascript"
src=
"
libs
/qunit/qunit.js"
></script>
<script
type=
"text/javascript"
src=
"data/testinit.js"
></script>
<script
type=
"text/javascript"
src=
"data/testinit.js"
></script>
<script
type=
"text/javascript"
src=
"jquery.js"
></script>
<script
type=
"text/javascript"
src=
"jquery.js"
></script>
<script
type=
"text/javascript"
src=
"../dist/sizzle.js"
></script>
<script
type=
"text/javascript"
src=
"../dist/sizzle.js"
></script>
...
...
src/sizzle/test/unit/selector.js
View file @
a247bd09
...
@@ -1082,9 +1082,13 @@ test("pseudo - :lang", function() {
...
@@ -1082,9 +1082,13 @@ test("pseudo - :lang", function() {
});
});
test
(
"caching"
,
function
()
{
test
(
"caching"
,
function
()
{
expect
(
1
);
expect
(
2
);
Sizzle
(
":not(code)"
,
document
.
getElementById
(
"ap"
)
);
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"
);
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
()
{
asyncTest
(
"Iframe dispatch should not affect Sizzle, see jQuery #13936"
,
1
,
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment