DescriptionSerialize namespaced type/* selectors according to CSSOM spec.
See https://drafts.csswg.org/cssom/#serializing-selectors.
The serialize-namespaced-type-selectors.html test is a stripped version
of this pull request: https://github.com/w3c/csswg-test/pull/1020
Gecko (Firefox 43) passes all those tests.
As part of this we are fixing problems with universal selectors being
incorrectly marked as explicit (for serialization) in certain cases.
When we have pseudo elements which require an implicit shadow combinator
to match across shadow boundaries, we need to add an implicit universal
selector to make the combinator combine the pseudo with some parent when
the original selector doesn't have any other simple selectors.
video::cue(i) can add the combinator between video and ::cue(i), while
::cue(i) requires a universal selector in the internal representation
to have ::cue(i) -> /implicit-shadow-crossing/ -> *.
For ::cue(i), the universal selector were marked correctly as implicit
to avoid it being serialized as *::cue(i). However, with an explicit
universal selector in the source *::cue(i), the universal selector were
marked as explicit due to an incorrect isNull() check. Explicit
universal selectors were already dropped from the serialization of
selectors like *::before.
BUG=579043
Committed: https://crrev.com/8f87ec8f7a65cb767447dc5e173c5e71589fd8e8
Cr-Commit-Position: refs/heads/master@{#371363}
Patch Set 1 #Patch Set 2 : Rebased #Patch Set 3 : More thorough fix #
Total comments: 2
Patch Set 4 : Rebased #Patch Set 5 : Fixed rebase issue #Patch Set 6 : Reverted incorrect test change #Patch Set 7 : Rebased #Messages
Total messages: 29 (12 generated)
|