diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 7e89db40957..b5e76a6d44d 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -964,12 +964,6 @@ impl Stylist { ) } - fn has_rules_for_pseudo(&self, pseudo: &PseudoElement) -> bool { - self.cascade_data - .iter_origins() - .any(|(d, _)| d.has_rules_for_pseudo(pseudo)) - } - /// Computes the cascade inputs for a lazily-cascaded pseudo-element. /// /// See the documentation on lazy pseudo-elements in @@ -988,10 +982,6 @@ impl Stylist { let pseudo = pseudo.canonical(); debug_assert!(pseudo.is_lazy()); - if !self.has_rules_for_pseudo(&pseudo) { - return CascadeInputs::default() - } - // Apply the selector flags. We should be in sequential mode // already, so we can directly apply the parent flags. let mut set_selector_flags = |element: &E, flags: ElementSelectorFlags| { @@ -2195,10 +2185,6 @@ impl CascadeData { } } - fn has_rules_for_pseudo(&self, pseudo: &PseudoElement) -> bool { - self.pseudos_map.get(pseudo).is_some() - } - /// Clears the cascade data, but not the invalidation data. fn clear_cascade_data(&mut self) { self.element_map.clear();