style: Support ::before / ::after on ::slotted pseudos.

See https://github.com/w3c/csswg-drafts/issues/3150 for the issue that would
expand this to all pseudos.

Differential Revision: https://phabricator.services.mozilla.com/D9994
This commit is contained in:
Emilio Cobos Álvarez 2018-10-29 23:34:12 +01:00
parent 62aaf865aa
commit badb8f398a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 115 additions and 61 deletions

View file

@ -27,6 +27,14 @@ include!(concat!(
impl ::selectors::parser::PseudoElement for PseudoElement {
type Impl = SelectorImpl;
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()
}
fn supports_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool {
if !self.supports_user_action_state() {
return false;