[Webkit-unassigned] [Bug 198204] New: :matches() shouldn't allow pseudo-elements inside.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 23 18:27:35 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=198204
Bug ID: 198204
Summary: :matches() shouldn't allow pseudo-elements inside.
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: emilio at crisal.io
CC: koivisto at iki.fi, rniwa at webkit.org
Bug 198147 introduced a check for sub-selectors to know the property whitelist to apply.
I think the right fix is not to parse :matches(::before) to begin with. It just doesn't really make much sense that webkit parses stuff like `:matches(::before):matches(::before)::before`.
Other pseudo-classes like :host() or pseudo-elements like :host-context() don't allow pseudo-elements in the grammar for this very same reason.
Also, in case you disagree, the check introduced in that bug wouldn't produce the correct behavior, I bet (haven't built myself) that that patch would stop the background / width / etc. from applying to the <li> element in the following test-case:
<!doctype html>
<style>
:matches(::marker, li) {
width: 100px;
height: 100px;
background: green;
}
</style>
<li>foo</li>
--
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/20190524/4135118b/attachment-0001.html>
More information about the webkit-unassigned
mailing list