jquery/test/unit
Michał Gołębiowski-Owczarek 68aa2ef757
Selector: Stop relying on CSS.supports( "selector(...)" )
`CSS.supports( "selector(...)" )` has different semantics than selectors passed
to `querySelectorAll`. Apart from the fact that the former returns `false` for
unrecognized selectors and the latter throws, `qSA` is more forgiving and
accepts some invalid selectors, auto-correcting them where needed - for
example, mismatched brackers are auto-closed. This behavior difference is
breaking for many users.

To add to that, a recent CSSWG resolution made `:is()` & `:where()` the only
pseudos with forgiving parsing; browsers are in the process of making `:has()`
parsing unforgiving.

Taking all that into account, we go back to our previous try-catch approach
without relying on `CSS.supports( "selector(...)" )`. The only difference
is we detect forgiving parsing in `:has()` and mark the selector as buggy.

The PR also updates `playwright-webkit` so that we test against a version
of WebKit that already has non-forgiving `:has()`.

Fixes gh-5194
Closes gh-5206
Ref gh-5098
Ref gh-5107
Ref w3c/csswg-drafts#7676

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
2023-02-14 10:11:40 +01:00
..
ajax.js Ajax: Support binary data (including FormData) 2023-02-01 13:48:35 +01:00
animation.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
attributes.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
basic.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
callbacks.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
core.js Selector: Backport jQuery selection context logic to selector-native 2023-02-13 18:34:41 +01:00
css.js Build: Run GitHub Action browser tests on Playwright WebKit 2023-01-23 23:49:44 +01:00
data.js Docs: Fix incorrect trac-NUMBER references 2022-01-12 23:23:42 +01:00
deferred.js Deferred: Respect source maps in jQuery.Deferred.exceptionHook 2023-02-01 13:46:44 +01:00
deprecated.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
dimensions.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
effects.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
event.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-04 16:27:18 +01:00
exports.js Build: Update test code for compatibility with QUnit 2.x (#4297) 2019-02-18 19:03:26 +01:00
manipulation.js Selector:Manipulation: Fix DOM manip within template contents 2022-11-14 23:17:23 +01:00
offset.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
queue.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
ready.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
selector.js Selector: Backport jQuery selection context logic to selector-native 2023-02-13 18:34:41 +01:00
serialize.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
support.js Selector: Stop relying on CSS.supports( "selector(...)" ) 2023-02-14 10:11:40 +01:00
traversing.js Selector: Backport jQuery selection context logic to selector-native 2023-02-13 18:34:41 +01:00
tween.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
wrap.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00