From 9026720f0477412b271d4e1979041278d6e3a087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 14 Jan 2020 19:01:05 +0000 Subject: [PATCH] style: Rewrite to avoid an anonymous input. Instead, subclass nsTextControlFrame. This simplifies the code and avoids correctness issues. I kept the localization functionality though it is not spec compliant. But I filed a bug to remove it in a followup. Differential Revision: https://phabricator.services.mozilla.com/D57193 --- components/style/gecko/wrapper.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) 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]