diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-11-08 13:33:59 +0000 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-11-10 21:10:03 +0100 |
commit | 9845a857ce73fc714982d80b1f75db36aa11d0d6 (patch) | |
tree | 15a1f2700f0c0b55f9ac7867e89ac1e4a114f86a /components | |
parent | 3b1078b58d510668355adb294193c0fa436b79c9 (diff) | |
download | servo-9845a857ce73fc714982d80b1f75db36aa11d0d6.tar.gz servo-9845a857ce73fc714982d80b1f75db36aa11d0d6.zip |
style: Allow ::slotted()::placeholder.
Differential Revision: https://phabricator.services.mozilla.com/D11132
Diffstat (limited to 'components')
-rw-r--r-- | components/style/gecko/pseudo_element.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs index 21eb2322a00..0b527e623e5 100644 --- a/components/style/gecko/pseudo_element.rs +++ b/components/style/gecko/pseudo_element.rs @@ -27,12 +27,16 @@ include!(concat!( impl ::selectors::parser::PseudoElement for PseudoElement { type Impl = SelectorImpl; + // ::slotted() should support all tree-abiding pseudo-elements, see + // https://drafts.csswg.org/css-scoping/#slotted-pseudo + // https://drafts.csswg.org/css-pseudo-4/#treelike fn valid_after_slotted(&self) -> bool { - // TODO(emilio): Remove this function or this comment after [1] is - // resolved. - // - // [1]: https://github.com/w3c/csswg-drafts/issues/3150 - self.is_before_or_after() + matches!( + *self, + PseudoElement::Before | + PseudoElement::After | + PseudoElement::Placeholder + ) } fn supports_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool { |