diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index e4b2d7f0be1..9a1196a11b5 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1869,22 +1869,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { #[inline] fn pseudo_element_originating_element(&self) -> Option { debug_assert!(self.is_pseudo_element()); - let parent = self.closest_anon_subtree_root_parent()?; - - // FIXME(emilio): Special-case for s - // pseudo-elements, which are nested NAC. Probably nsNumberControlFrame - // should instead inherit from nsTextControlFrame, and then this could - // go away. - if let Some(PseudoElement::MozNumberText) = parent.implemented_pseudo_element() { - debug_assert_eq!( - self.implemented_pseudo_element().unwrap(), - PseudoElement::Placeholder, - "You added a new pseudo, do you really want this?" - ); - return parent.closest_anon_subtree_root_parent(); - } - - Some(parent) + self.closest_anon_subtree_root_parent() } #[inline]