mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Allow ::slotted()::placeholder.
Differential Revision: https://phabricator.services.mozilla.com/D11132
This commit is contained in:
parent
3b1078b58d
commit
9845a857ce
1 changed files with 9 additions and 5 deletions
|
@ -27,12 +27,16 @@ include!(concat!(
|
||||||
impl ::selectors::parser::PseudoElement for PseudoElement {
|
impl ::selectors::parser::PseudoElement for PseudoElement {
|
||||||
type Impl = SelectorImpl;
|
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 {
|
fn valid_after_slotted(&self) -> bool {
|
||||||
// TODO(emilio): Remove this function or this comment after [1] is
|
matches!(
|
||||||
// resolved.
|
*self,
|
||||||
//
|
PseudoElement::Before |
|
||||||
// [1]: https://github.com/w3c/csswg-drafts/issues/3150
|
PseudoElement::After |
|
||||||
self.is_before_or_after()
|
PseudoElement::Placeholder
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn supports_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool {
|
fn supports_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue