Don't add rule feature data for rules which may never match.
:host and :host-context must always be in the rightmost compound with no other simple selectors except a succeding pseudo element in order to match as the host element is feature-less in that context. It's however not an invalid selector according to the CSS Scoping spec, so we shouldn't drop it at parse time. We could potentially skip adding other selectors to rulesets as well including selectors like: :hover:not(:hover), div:not(div), ::content and ::slotted not in shadow trees, etc. R=kochi@chromium.org,ericwilligers@chromium.org BUG=489481 Review URL: https://codereview.chromium.org/1703893002 Cr-Commit-Position: refs/heads/master@{#376116}
Showing
This diff is collapsed.
Please register or sign in to comment