style: Allow ::slotted()::placeholder.

Differential Revision: https://phabricator.services.mozilla.com/D11132
This commit is contained in:
Emilio Cobos Álvarez 2018-11-08 13:33:59 +00:00
parent 3b1078b58d
commit 9845a857ce
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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 {