[Webkit-unassigned] [Bug 244808] New: Forgiving selectors should not be reported as supported with CSS.supports("selector(...)")
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 5 05:51:29 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=244808
Bug ID: 244808
Summary: Forgiving selectors should not be reported as
supported with CSS.supports("selector(...)")
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: m.goleb+bugzilla at gmail.com
CSS.supports() and @supports should return false for unrecognized selectors in per CSSWG resolution in https://github.com/w3c/csswg-drafts/issues/7280
For why this matters for jQuery, see this comment:
https://github.com/w3c/csswg-drafts/issues/7676#issuecomment-1235714917
and that whole issue in general.
tl;dr is that jQuery has custom selector extensions but for performance reasons it first tries to run a provided selector through `querySelectorAll` and only when that fails it uses its own custom DOM traversal. However, this approach doesn't work for pseudo-classes using forgiving selector lists as parameters - like `:has()`. jQuery would like to migrate to testing the selector via `CSS.supports("selector(...)")` instead but right now it returns `true` for `:has(:gibberish)` as well. The linked CSS WG resolution makes the API return `false` in such cases, making it a viable tool for jQuery.
Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1359396
Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1789248
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220905/17c33719/attachment.htm>
More information about the webkit-unassigned
mailing list