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
90b43de2
Commit
90b43de2
authored
Apr 18, 2014
by
Richard Gibson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Selector: Update Sizzle to 1.10.19
Fixes #14901 Fixes #14793
parent
def4841c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
29 deletions
+39
-29
bower.json
bower.json
+1
-1
sizzle.js
src/sizzle/dist/sizzle.js
+35
-25
sizzle.min.js
src/sizzle/dist/sizzle.min.js
+2
-2
sizzle.min.map
src/sizzle/dist/sizzle.min.map
+1
-1
No files found.
bower.json
View file @
90b43de2
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
"package.json"
"package.json"
],
],
"devDependencies"
:
{
"devDependencies"
:
{
"sizzle"
:
"1.10.1
8
"
,
"sizzle"
:
"1.10.1
9
"
,
"requirejs"
:
"2.1.10"
,
"requirejs"
:
"2.1.10"
,
"qunit"
:
"1.14.0"
,
"qunit"
:
"1.14.0"
,
"sinon"
:
"1.8.1"
"sinon"
:
"1.8.1"
...
...
src/sizzle/dist/sizzle.js
View file @
90b43de2
/*!
/*!
* Sizzle CSS Selector Engine v1.10.1
8
* Sizzle CSS Selector Engine v1.10.1
9
* 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: 2014-0
2-05
* Date: 2014-0
4-18
*/
*/
(
function
(
window
)
{
(
function
(
window
)
{
...
@@ -15,6 +15,7 @@ var i,
...
@@ -15,6 +15,7 @@ var i,
Expr
,
Expr
,
getText
,
getText
,
isXML
,
isXML
,
tokenize
,
compile
,
compile
,
select
,
select
,
outermostContext
,
outermostContext
,
...
@@ -83,17 +84,23 @@ var i,
...
@@ -83,17 +84,23 @@ var i,
// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
identifier
=
characterEncoding
.
replace
(
"w"
,
"w#"
),
identifier
=
characterEncoding
.
replace
(
"w"
,
"w#"
),
// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
attributes
=
"
\\
["
+
whitespace
+
"*("
+
characterEncoding
+
")"
+
whitespace
+
attributes
=
"
\\
["
+
whitespace
+
"*("
+
characterEncoding
+
")(?:"
+
whitespace
+
"*(?:([*^$|!~]?=)"
+
whitespace
+
"*(?:(['
\"
])((?:
\\\\
.|[^
\\\\
])*?)
\\
3|("
+
identifier
+
")|)|)"
+
whitespace
+
"*
\\
]"
,
// Operator (capture 2)
"*([*^$|!~]?=)"
+
whitespace
+
// Prefer arguments quoted,
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
// then not containing pseudos/brackets,
"*(?:'((?:
\\\\
.|[^
\\\\
'])*)'|
\"
((?:
\\\\
.|[^
\\\\
\"
])*)
\"
|("
+
identifier
+
"))|)"
+
whitespace
+
// then attribute selectors/non-parenthetical expressions,
"*
\\
]"
,
// then anything else
// These preferences are here to reduce the number of selectors
pseudos
=
":("
+
characterEncoding
+
")(?:
\\
(("
+
// needing tokenize in the PSEUDO preFilter
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
pseudos
=
":("
+
characterEncoding
+
")(?:
\\
(((['
\"
])((?:
\\\\
.|[^
\\\\
])*?)
\\
3|((?:
\\\\
.|[^
\\\\
()[
\\
]]|"
+
attributes
.
replace
(
3
,
8
)
+
")*)|.*)
\\
)|)"
,
// 1. quoted (capture 3; capture 4 or capture 5)
"('((?:
\\\\
.|[^
\\\\
'])*)'|
\"
((?:
\\\\
.|[^
\\\\
\"
])*)
\"
)|"
+
// 2. simple (capture 6)
"((?:
\\\\
.|[^
\\\\
()[
\\
]]|"
+
attributes
+
")*)|"
+
// 3. anything else (capture 2)
".*"
+
")
\\
)|)"
,
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
rtrim
=
new
RegExp
(
"^"
+
whitespace
+
"+|((?:^|[^
\\\\
])(?:
\\\\
.)*)"
+
whitespace
+
"+$"
,
"g"
),
rtrim
=
new
RegExp
(
"^"
+
whitespace
+
"+|((?:^|[^
\\\\
])(?:
\\\\
.)*)"
+
whitespace
+
"+$"
,
"g"
),
...
@@ -534,7 +541,7 @@ setDocument = Sizzle.setDocument = function( node ) {
...
@@ -534,7 +541,7 @@ setDocument = Sizzle.setDocument = function( node ) {
var
m
=
context
.
getElementById
(
id
);
var
m
=
context
.
getElementById
(
id
);
// Check parentNode to catch when Blackberry 4.6 returns
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
// nodes that are no longer in the document #6963
return
m
&&
m
.
parentNode
?
[
m
]
:
[];
return
m
&&
m
.
parentNode
?
[
m
]
:
[];
}
}
};
};
Expr
.
filter
[
"ID"
]
=
function
(
id
)
{
Expr
.
filter
[
"ID"
]
=
function
(
id
)
{
...
@@ -614,11 +621,13 @@ setDocument = Sizzle.setDocument = function( node ) {
...
@@ -614,11 +621,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
t
=''><option selected=''></option></select>"
;
div
.
innerHTML
=
"<select
msallowclip
=''><option selected=''></option></select>"
;
// Support: IE8, Opera 1
0-12
// Support: IE8, Opera 1
1-12.16
// Nothing should be selected when empty strings follow ^= or $= or *=
// Nothing should be selected when empty strings follow ^= or $= or *=
if
(
div
.
querySelectorAll
(
"[t^='']"
).
length
)
{
// The test attribute must be unknown in Opera but "safe" for WinRT
// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
if
(
div
.
querySelectorAll
(
"[msallowclip^='']"
).
length
)
{
rbuggyQSA
.
push
(
"[*^$]="
+
whitespace
+
"*(?:''|
\"\"
)"
);
rbuggyQSA
.
push
(
"[*^$]="
+
whitespace
+
"*(?:''|
\"\"
)"
);
}
}
...
@@ -661,7 +670,8 @@ setDocument = Sizzle.setDocument = function( node ) {
...
@@ -661,7 +670,8 @@ setDocument = Sizzle.setDocument = function( node ) {
});
});
}
}
if
(
(
support
.
matchesSelector
=
rnative
.
test
(
(
matches
=
docElem
.
webkitMatchesSelector
||
if
(
(
support
.
matchesSelector
=
rnative
.
test
(
(
matches
=
docElem
.
matches
||
docElem
.
webkitMatchesSelector
||
docElem
.
mozMatchesSelector
||
docElem
.
mozMatchesSelector
||
docElem
.
oMatchesSelector
||
docElem
.
oMatchesSelector
||
docElem
.
msMatchesSelector
)
))
)
{
docElem
.
msMatchesSelector
)
))
)
{
...
@@ -842,7 +852,7 @@ Sizzle.matchesSelector = function( elem, expr ) {
...
@@ -842,7 +852,7 @@ Sizzle.matchesSelector = function( elem, expr ) {
}
catch
(
e
)
{}
}
catch
(
e
)
{}
}
}
return
Sizzle
(
expr
,
document
,
null
,
[
elem
]
).
length
>
0
;
return
Sizzle
(
expr
,
document
,
null
,
[
elem
]
).
length
>
0
;
};
};
Sizzle
.
contains
=
function
(
context
,
elem
)
{
Sizzle
.
contains
=
function
(
context
,
elem
)
{
...
@@ -971,7 +981,7 @@ Expr = Sizzle.selectors = {
...
@@ -971,7 +981,7 @@ Expr = Sizzle.selectors = {
match
[
1
]
=
match
[
1
].
replace
(
runescape
,
funescape
);
match
[
1
]
=
match
[
1
].
replace
(
runescape
,
funescape
);
// Move the given value to match[3] whether quoted or unquoted
// Move the given value to match[3] whether quoted or unquoted
match
[
3
]
=
(
match
[
4
]
||
match
[
5
]
||
""
).
replace
(
runescape
,
funescape
);
match
[
3
]
=
(
match
[
3
]
||
match
[
4
]
||
match
[
5
]
||
""
).
replace
(
runescape
,
funescape
);
if
(
match
[
2
]
===
"~="
)
{
if
(
match
[
2
]
===
"~="
)
{
match
[
3
]
=
" "
+
match
[
3
]
+
" "
;
match
[
3
]
=
" "
+
match
[
3
]
+
" "
;
...
@@ -1014,15 +1024,15 @@ Expr = Sizzle.selectors = {
...
@@ -1014,15 +1024,15 @@ Expr = Sizzle.selectors = {
"PSEUDO"
:
function
(
match
)
{
"PSEUDO"
:
function
(
match
)
{
var
excess
,
var
excess
,
unquoted
=
!
match
[
5
]
&&
match
[
2
];
unquoted
=
!
match
[
6
]
&&
match
[
2
];
if
(
matchExpr
[
"CHILD"
].
test
(
match
[
0
]
)
)
{
if
(
matchExpr
[
"CHILD"
].
test
(
match
[
0
]
)
)
{
return
null
;
return
null
;
}
}
// Accept quoted arguments as-is
// Accept quoted arguments as-is
if
(
match
[
3
]
&&
match
[
4
]
!==
undefined
)
{
if
(
match
[
3
]
)
{
match
[
2
]
=
match
[
4
];
match
[
2
]
=
match
[
4
]
||
match
[
5
]
||
""
;
// Strip excess characters from unquoted arguments
// Strip excess characters from unquoted arguments
}
else
if
(
unquoted
&&
rpseudo
.
test
(
unquoted
)
&&
}
else
if
(
unquoted
&&
rpseudo
.
test
(
unquoted
)
&&
...
@@ -1427,7 +1437,7 @@ function setFilters() {}
...
@@ -1427,7 +1437,7 @@ function setFilters() {}
setFilters
.
prototype
=
Expr
.
filters
=
Expr
.
pseudos
;
setFilters
.
prototype
=
Expr
.
filters
=
Expr
.
pseudos
;
Expr
.
setFilters
=
new
setFilters
();
Expr
.
setFilters
=
new
setFilters
();
function
tokenize
(
selector
,
parseOnly
)
{
tokenize
=
Sizzle
.
tokenize
=
function
(
selector
,
parseOnly
)
{
var
matched
,
match
,
tokens
,
type
,
var
matched
,
match
,
tokens
,
type
,
soFar
,
groups
,
preFilters
,
soFar
,
groups
,
preFilters
,
cached
=
tokenCache
[
selector
+
" "
];
cached
=
tokenCache
[
selector
+
" "
];
...
@@ -1492,7 +1502,7 @@ function tokenize( selector, parseOnly ) {
...
@@ -1492,7 +1502,7 @@ function tokenize( selector, parseOnly ) {
Sizzle
.
error
(
selector
)
:
Sizzle
.
error
(
selector
)
:
// Cache the tokens
// Cache the tokens
tokenCache
(
selector
,
groups
).
slice
(
0
);
tokenCache
(
selector
,
groups
).
slice
(
0
);
}
}
;
function
toSelector
(
tokens
)
{
function
toSelector
(
tokens
)
{
var
i
=
0
,
var
i
=
0
,
...
...
src/sizzle/dist/sizzle.min.js
View file @
90b43de2
This diff is collapsed.
Click to expand it.
src/sizzle/dist/sizzle.min.map
View file @
90b43de2
This diff is collapsed.
Click to expand it.
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