diff options
author | Mats Palmgren <mats@mozilla.com> | 2019-03-24 23:13:53 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-03-27 14:29:24 +0100 |
commit | ab8c00e41a99cbfb72e232879c6100c96c18a40d (patch) | |
tree | 1b35387ee7e7d162b797cee302e5ebd1bd751502 /components/style/gecko/pseudo_element.rs | |
parent | ed74e8acbb9095dc903d6037a8a652e497da6a21 (diff) | |
download | servo-ab8c00e41a99cbfb72e232879c6100c96c18a40d.tar.gz servo-ab8c00e41a99cbfb72e232879c6100c96c18a40d.zip |
style: Add support for the ::marker pseudo element on list items. Alias :-moz-list-bullet/number to that in the parser.
Bug: 205202
Reviewed-by: emilio
Diffstat (limited to 'components/style/gecko/pseudo_element.rs')
-rw-r--r-- | components/style/gecko/pseudo_element.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs index 8160ea2c9b8..c49277409e0 100644 --- a/components/style/gecko/pseudo_element.rs +++ b/components/style/gecko/pseudo_element.rs @@ -33,7 +33,7 @@ impl ::selectors::parser::PseudoElement for PseudoElement { fn valid_after_slotted(&self) -> bool { matches!( *self, - PseudoElement::Before | PseudoElement::After | PseudoElement::Placeholder + PseudoElement::Before | PseudoElement::After | PseudoElement::Marker | PseudoElement::Placeholder ) } @@ -180,6 +180,8 @@ impl PseudoElement { /// Whether this pseudo-element should actually exist if it has /// the given styles. pub fn should_exist(&self, style: &ComputedValues) -> bool { + debug_assert!(self.is_eager()); + if style.get_box().clone_display() == Display::None { return false; } |