diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index 070a2299969..91e4bba992b 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -728,10 +728,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { /// /// https://drafts.csswg.org/css-lists-3/#declaring-a-list-item #[cfg(feature = "gecko")] - fn adjust_for_list_item(&mut self, element: Option) - where - E: TElement, - { + fn adjust_for_list_item(&mut self) { use crate::properties::longhands::counter_increment::computed_value::T as ComputedIncrement; use crate::values::generics::counters::CounterPair; use crate::values::specified::list::MozListReversed; @@ -743,9 +740,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { if self.style.pseudo.is_some() { return; } - if !element.map_or(false, |e| e.is_html_element()) { - return; - } // Note that we map
  • to 'counter-set: list-item INTEGER; // counter-increment: list-item 0;' so we'll return here unless the author // explicitly specified something else. @@ -833,7 +827,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { #[cfg(feature = "gecko")] { self.adjust_for_appearance(element); - self.adjust_for_list_item(element); + self.adjust_for_list_item(); } self.set_bits(); }