Bug 210701

Summary: [CSS selectors] :is() / :where() should not allow pseudo-elements at parse-time
Product: WebKit Reporter: Emilio Cobos Álvarez (:emilio) <emilio>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, koivisto, macpherson, menard, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch none

Description Emilio Cobos Álvarez (:emilio) 2020-04-18 15:21:18 PDT
https://drafts.csswg.org/selectors/#matches:

> Pseudo-elements cannot be represented by the matches-any pseudo-class; they are not valid within :is().

That seems to me like :is(foo::before) should be invalid at parse-time. Instead webkit parses it, but never matches it.
Comment 1 Antti Koivisto 2020-04-19 01:57:27 PDT
Created attachment 396899 [details]
patch
Comment 2 Antti Koivisto 2020-04-19 05:56:29 PDT
Created attachment 396903 [details]
patch
Comment 3 EWS 2020-04-19 10:51:23 PDT
Committed r260338: <https://trac.webkit.org/changeset/260338>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396903 [details].
Comment 4 Radar WebKit Bug Importer 2020-04-19 10:52:13 PDT
<rdar://problem/62023980>