diff --git a/components/style/gecko/pseudo_element_definition.mako.rs b/components/style/gecko/pseudo_element_definition.mako.rs index d1757a1a925..df3e3fa8bd5 100644 --- a/components/style/gecko/pseudo_element_definition.mako.rs +++ b/components/style/gecko/pseudo_element_definition.mako.rs @@ -24,8 +24,9 @@ pub const EAGER_PSEUDOS: [PseudoElement; EAGER_PSEUDO_COUNT] = [ ]; impl PseudoElement { - /// Executes a closure with each pseudo-element as an argument. - pub fn each(mut fun: F) + /// Executes a closure with each simple (not functional) + /// pseudo-element as an argument. + pub fn each_simple(mut fun: F) where F: FnMut(Self), { % for pseudo in PSEUDOS: diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index 78ddc05dff4..601e3fbac2a 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -367,11 +367,11 @@ impl SelectorImpl { #[inline] - /// Executes a function for each pseudo-element. - pub fn each_pseudo_element(fun: F) + /// Executes a function for each simple (not functional) pseudo-element. + pub fn each_simple_pseudo_element(fun: F) where F: FnMut(PseudoElement), { - PseudoElement::each(fun) + PseudoElement::each_simple(fun) } #[inline] diff --git a/components/style/selector_parser.rs b/components/style/selector_parser.rs index a7e99106aa6..1dbc96d3db2 100644 --- a/components/style/selector_parser.rs +++ b/components/style/selector_parser.rs @@ -121,7 +121,7 @@ impl SelectorImpl { pub fn each_precomputed_pseudo_element(mut fun: F) where F: FnMut(PseudoElement), { - Self::each_pseudo_element(|pseudo| { + Self::each_simple_pseudo_element(|pseudo| { if pseudo.is_precomputed() { fun(pseudo) } diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs index 9ea3fb4e6c3..6641cbd38ae 100644 --- a/components/style/servo/selector_parser.rs +++ b/components/style/servo/selector_parser.rs @@ -28,7 +28,7 @@ use style_traits::{ParseError, StyleParseError}; /// A pseudo-element, both public and private. /// -/// NB: If you add to this list, be sure to update `each_pseudo_element` too. +/// NB: If you add to this list, be sure to update `each_simple_pseudo_element` too. #[derive(Clone, Debug, PartialEq, Eq, Hash)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[allow(missing_docs)] @@ -485,7 +485,7 @@ impl SelectorImpl { /// Executes `fun` for each pseudo-element. #[inline] - pub fn each_pseudo_element(mut fun: F) + pub fn each_simple_pseudo_element(mut fun: F) where F: FnMut(PseudoElement), { fun(PseudoElement::Before);