diff --git a/components/style/matching.rs b/components/style/matching.rs index 6dc335de1dc..eb88914f8ed 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -357,6 +357,7 @@ trait PrivateMatchMethods: TElement { // below like a lazy pseudo. let only_default_rules = context.shared.traversal_flags.for_default_styles(); if pseudo.is_eager() && !only_default_rules { + debug_assert!(pseudo.is_before_or_after()); let parent = self.parent_element().unwrap(); if !parent.may_have_animations() || primary_style.rules.get_animation_rules().is_empty() {