mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Tests: Indicate Chrome 112 & Safari 16.4 pass the cssHas support test
Chrome 112 & Safari 16.4 introduce two changes: * `:has()` is non-forgiving * `CSS.supports( "selector(...)" )` parses everything in a non-forgiving way We no longer care about the latter but the former means the `cssHas` support test now passes. Closes gh-5225
This commit is contained in:
parent
bce13b72c1
commit
89ef81f86f
@ -1,8 +1,8 @@
|
|||||||
import document from "../var/document.js";
|
import document from "../var/document.js";
|
||||||
import support from "../var/support.js";
|
import support from "../var/support.js";
|
||||||
|
|
||||||
// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
|
// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
|
||||||
// Make sure the the `:has()` argument is parsed unforgivingly.
|
// Make sure the `:has()` argument is parsed unforgivingly.
|
||||||
// We include `*` in the test to detect buggy implementations that are
|
// We include `*` in the test to detect buggy implementations that are
|
||||||
// _selectively_ forgiving (specifically when the list includes at least
|
// _selectively_ forgiving (specifically when the list includes at least
|
||||||
// one valid selector).
|
// one valid selector).
|
||||||
|
@ -62,22 +62,26 @@ testIframe(
|
|||||||
cssHas: true,
|
cssHas: true,
|
||||||
reliableTrDimensions: false
|
reliableTrDimensions: false
|
||||||
},
|
},
|
||||||
|
chrome_111: {
|
||||||
|
cssHas: false,
|
||||||
|
reliableTrDimensions: true
|
||||||
|
},
|
||||||
chrome: {
|
chrome: {
|
||||||
|
cssHas: true,
|
||||||
|
reliableTrDimensions: true
|
||||||
|
},
|
||||||
|
safari_16_3: {
|
||||||
cssHas: false,
|
cssHas: false,
|
||||||
reliableTrDimensions: true
|
reliableTrDimensions: true
|
||||||
},
|
},
|
||||||
safari: {
|
safari: {
|
||||||
cssHas: false,
|
cssHas: true,
|
||||||
reliableTrDimensions: true
|
reliableTrDimensions: true
|
||||||
},
|
},
|
||||||
webkit: {
|
webkit: {
|
||||||
cssHas: true,
|
cssHas: true,
|
||||||
reliableTrDimensions: true
|
reliableTrDimensions: true
|
||||||
},
|
},
|
||||||
firefox_102: {
|
|
||||||
cssHas: true,
|
|
||||||
reliableTrDimensions: false
|
|
||||||
},
|
|
||||||
firefox: {
|
firefox: {
|
||||||
cssHas: true,
|
cssHas: true,
|
||||||
reliableTrDimensions: false
|
reliableTrDimensions: false
|
||||||
@ -86,9 +90,13 @@ testIframe(
|
|||||||
cssHas: true,
|
cssHas: true,
|
||||||
reliableTrDimensions: true
|
reliableTrDimensions: true
|
||||||
},
|
},
|
||||||
ios: {
|
ios_15_4_16_3: {
|
||||||
cssHas: false,
|
cssHas: false,
|
||||||
reliableTrDimensions: true
|
reliableTrDimensions: true
|
||||||
|
},
|
||||||
|
ios: {
|
||||||
|
cssHas: true,
|
||||||
|
reliableTrDimensions: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -101,17 +109,19 @@ testIframe(
|
|||||||
|
|
||||||
if ( document.documentMode ) {
|
if ( document.documentMode ) {
|
||||||
expected = expectedMap.ie_11;
|
expected = expectedMap.ie_11;
|
||||||
} else if ( /chrome/i.test( userAgent ) ) {
|
} else if ( /\b(?:headless)?chrome\/(?:10\d|11[01])\b/i.test( userAgent ) ) {
|
||||||
|
expected = expectedMap.chrome_111;
|
||||||
|
} else if ( /\b(?:headless)?chrome\//i.test( userAgent ) ) {
|
||||||
|
|
||||||
// Catches Edge, Chrome on Android & Opera as well.
|
// Catches Edge, Chrome on Android & Opera as well.
|
||||||
expected = expectedMap.chrome;
|
expected = expectedMap.chrome;
|
||||||
} else if ( /firefox\/102\./i.test( userAgent ) ) {
|
} else if ( /\bfirefox\//i.test( userAgent ) ) {
|
||||||
expected = expectedMap.firefox_102;
|
|
||||||
} else if ( /firefox/i.test( userAgent ) ) {
|
|
||||||
expected = expectedMap.firefox;
|
expected = expectedMap.firefox;
|
||||||
} else if ( /iphone os (?:14_|15_[0123])/i.test( userAgent ) ) {
|
} else if ( /\biphone os (?:14_|15_[0123])/i.test( userAgent ) ) {
|
||||||
expected = expectedMap.ios_14_15_3;
|
expected = expectedMap.ios_14_15_3;
|
||||||
} else if ( /(?:iphone|ipad);.*(?:iphone)? os \d+_/i.test( userAgent ) ) {
|
} else if ( /\biphone os (?:15_|16_[0123])/i.test( userAgent ) ) {
|
||||||
|
expected = expectedMap.ios_15_4_16_3;
|
||||||
|
} else if ( /\b(?:iphone|ipad);.*(?:iphone)? os \d+_/i.test( userAgent ) ) {
|
||||||
expected = expectedMap.ios;
|
expected = expectedMap.ios;
|
||||||
} else if ( typeof URLSearchParams !== "undefined" &&
|
} else if ( typeof URLSearchParams !== "undefined" &&
|
||||||
|
|
||||||
@ -125,7 +135,9 @@ testIframe(
|
|||||||
) === "Playwright"
|
) === "Playwright"
|
||||||
) {
|
) {
|
||||||
expected = expectedMap.webkit;
|
expected = expectedMap.webkit;
|
||||||
} else if ( /\b\d+(\.\d+)+ safari/i.test( userAgent ) ) {
|
} else if ( /\bversion\/(?:15|16\.[0123])(?:\.\d+)* safari/i.test( userAgent ) ) {
|
||||||
|
expected = expectedMap.safari_16_3;
|
||||||
|
} else if ( /\bversion\/\d+(?:\.\d+)+ safari/i.test( userAgent ) ) {
|
||||||
expected = expectedMap.safari;
|
expected = expectedMap.safari;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user