Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b2c36a

Browse files
authored
Build: Update Sizzle from 2.3.3 to 2.3.4
Fixesgh-1756Fixesgh-4170Fixesgh-4249Closesgh-4345
1 parent00a9c2e commit0b2c36a

File tree

5 files changed

+56
-46
lines changed

5 files changed

+56
-46
lines changed

‎external/sizzle/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CopyrightjQuery Foundation and other contributors, https://jquery.org/
1+
CopyrightJS Foundation and other contributors, https://js.foundation/
22

33
This software consists of voluntary contributions made by many
44
individuals. For exact contribution history, see the revision history

‎external/sizzle/dist/sizzle.js

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*!
2-
* Sizzle CSS Selector Engine v2.3.3
2+
* Sizzle CSS Selector Engine v2.3.4
33
* https://sizzlejs.com/
44
*
5-
* CopyrightjQuery Foundation and other contributors
5+
* CopyrightJS Foundation and other contributors
66
* Released under the MIT license
7-
*http://jquery.org/license
7+
*https://js.foundation/
88
*
9-
* Date:2016-08-08
9+
* Date:2019-04-08
1010
*/
1111
(function(window){
1212

@@ -40,6 +40,7 @@ var i,
4040
classCache=createCache(),
4141
tokenCache=createCache(),
4242
compilerCache=createCache(),
43+
nonnativeSelectorCache=createCache(),
4344
sortOrder=function(a,b){
4445
if(a===b){
4546
hasDuplicate=true;
@@ -101,8 +102,7 @@ var i,
101102

102103
rcomma=newRegExp("^"+whitespace+"*,"+whitespace+"*"),
103104
rcombinators=newRegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),
104-
105-
rattributeQuotes=newRegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),
105+
rdescend=newRegExp(whitespace+"|>"),
106106

107107
rpseudo=newRegExp(pseudos),
108108
ridentifier=newRegExp("^"+identifier+"$"),
@@ -123,6 +123,7 @@ var i,
123123
whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")
124124
},
125125

126+
rhtml=/HTML$/i,
126127
rinputs=/^(?:input|select|textarea|button)$/i,
127128
rheader=/^h\d$/i,
128129

@@ -177,9 +178,9 @@ var i,
177178
setDocument();
178179
},
179180

180-
disabledAncestor=addCombinator(
181+
inDisabledFieldset=addCombinator(
181182
function(elem){
182-
returnelem.disabled===true&&("form"inelem||"label"inelem);
183+
returnelem.disabled===true&&elem.nodeName.toLowerCase()==="fieldset";
183184
},
184185
{dir:"parentNode",next:"legend"}
185186
);
@@ -292,18 +293,22 @@ function Sizzle( selector, context, results, seed ) {
292293

293294
// Take advantage of querySelectorAll
294295
if(support.qsa&&
295-
!compilerCache[selector+" "]&&
296-
(!rbuggyQSA||!rbuggyQSA.test(selector))){
297-
298-
if(nodeType!==1){
299-
newContext=context;
300-
newSelector=selector;
296+
!nonnativeSelectorCache[selector+" "]&&
297+
(!rbuggyQSA||!rbuggyQSA.test(selector))&&
301298

302-
// qSA looks outside Element context, which is not what we want
303-
// Thanks to Andrew Dupont for this workaround technique
304-
// Support: IE <=8
299+
// Support: IE 8 only
305300
// Exclude object elements
306-
}elseif(context.nodeName.toLowerCase()!=="object"){
301+
(nodeType!==1||context.nodeName.toLowerCase()!=="object")){
302+
303+
newSelector=selector;
304+
newContext=context;
305+
306+
// qSA considers elements outside a scoping root when evaluating child or
307+
// descendant combinators, which is not what we want.
308+
// In such cases, we work around the behavior by prefixing every selector in the
309+
// list with an ID selector referencing the scope context.
310+
// Thanks to Andrew Dupont for this technique.
311+
if(nodeType===1&&rdescend.test(selector)){
307312

308313
// Capture the context ID, setting it first if necessary
309314
if((nid=context.getAttribute("id"))){
@@ -325,17 +330,16 @@ function Sizzle( selector, context, results, seed ) {
325330
context;
326331
}
327332

328-
if(newSelector){
329-
try{
330-
push.apply(results,
331-
newContext.querySelectorAll(newSelector)
332-
);
333-
returnresults;
334-
}catch(qsaError){
335-
}finally{
336-
if(nid===expando){
337-
context.removeAttribute("id");
338-
}
333+
try{
334+
push.apply(results,
335+
newContext.querySelectorAll(newSelector)
336+
);
337+
returnresults;
338+
}catch(qsaError){
339+
nonnativeSelectorCache(selector,true);
340+
}finally{
341+
if(nid===expando){
342+
context.removeAttribute("id");
339343
}
340344
}
341345
}
@@ -499,7 +503,7 @@ function createDisabledPseudo( disabled ) {
499503
// Where there is no isDisabled, check manually
500504
/* jshint -W018 */
501505
elem.isDisabled!==!disabled&&
502-
disabledAncestor(elem)===disabled;
506+
inDisabledFieldset(elem)===disabled;
503507
}
504508

505509
returnelem.disabled===disabled;
@@ -556,10 +560,13 @@ support = Sizzle.support = {};
556560
*@returns {Boolean} True iff elem is a non-HTML XML node
557561
*/
558562
isXML=Sizzle.isXML=function(elem){
559-
// documentElement is verified for cases where it doesn't yet exist
560-
// (such as loading iframes in IE - #4833)
561-
vardocumentElement=elem&&(elem.ownerDocument||elem).documentElement;
562-
returndocumentElement ?documentElement.nodeName!=="HTML" :false;
563+
varnamespace=elem.namespaceURI,
564+
docElem=(elem.ownerDocument||elem).documentElement;
565+
566+
// Support: IE <=8
567+
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
568+
// https://bugs.jquery.com/ticket/4833
569+
return!rhtml.test(namespace||docElem&&docElem.nodeName||"HTML");
563570
};
564571

565572
/**
@@ -981,11 +988,8 @@ Sizzle.matchesSelector = function( elem, expr ) {
981988
setDocument(elem);
982989
}
983990

984-
// Make sure that attribute selectors are quoted
985-
expr=expr.replace(rattributeQuotes,"='$1']");
986-
987991
if(support.matchesSelector&&documentIsHTML&&
988-
!compilerCache[expr+" "]&&
992+
!nonnativeSelectorCache[expr+" "]&&
989993
(!rbuggyMatches||!rbuggyMatches.test(expr))&&
990994
(!rbuggyQSA||!rbuggyQSA.test(expr))){
991995

@@ -999,7 +1003,9 @@ Sizzle.matchesSelector = function( elem, expr ) {
9991003
elem.document&&elem.document.nodeType!==11){
10001004
returnret;
10011005
}
1002-
}catch(e){}
1006+
}catch(e){
1007+
nonnativeSelectorCache(expr,true);
1008+
}
10031009
}
10041010

10051011
returnSizzle(expr,document,null,[elem]).length>0;
@@ -1458,7 +1464,7 @@ Expr = Sizzle.selectors = {
14581464
"contains":markFunction(function(text){
14591465
text=text.replace(runescape,funescape);
14601466
returnfunction(elem){
1461-
return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1;
1467+
return(elem.textContent||getText(elem)).indexOf(text)>-1;
14621468
};
14631469
}),
14641470

@@ -1597,7 +1603,11 @@ Expr = Sizzle.selectors = {
15971603
}),
15981604

15991605
"lt":createPositionalPseudo(function(matchIndexes,length,argument){
1600-
vari=argument<0 ?argument+length :argument;
1606+
vari=argument<0 ?
1607+
argument+length :
1608+
argument>length ?
1609+
length :
1610+
argument;
16011611
for(;--i>=0;){
16021612
matchIndexes.push(i);
16031613
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp