DescriptionRestrict use of pseudo elements within compound.
Start dropping selectors whose compound have pseudo elements followed
by other simple selectors with the exception of simple selectors which
are actually allowed to follow certain pseudo elements.
The exceptions are:
- User action pseudo classes and their negations for custom pseudo
elements.
Matching other simple selectors on custom elements worked before, but
that revealed the inner structure of the UA shadow DOM for form
elements, which I believe was not intentional.
According to the latest ED of Selectors Level 4, user action pseudo
classes are allowed after pseudo elements in general, but we don't
support that, so the selector should be dropped. Gecko also drops
those selectors.
- A restricted set of pseudo classes, in addition to the user action
pseudo classes, which apply to custom scrollbar pseudo elements.
The new restrictions do not yet apply to UA stylesheets as we rely on
invalid selectors in the UA stylesheet for media controls.
Fixed a couple of range-based iterations in the unit test.
This CL does not address the fact that pseudo elements, in most cases,
only may be present in rightmost compound selectors. That will be fixed
in another CL.
R=timloh@chromium.org
BUG=489481, 577404
Committed: https://crrev.com/d525c3859d9fe0624112f3c1c753ee2207bee121
Cr-Commit-Position: refs/heads/master@{#369760}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Rebased #Patch Set 3 : Added more :not() tests #Patch Set 4 : Workaround for invalid selectors in UA style. #
Messages
Total messages: 12 (5 generated)
|