diff options
Diffstat (limited to 'components/style/servo')
-rw-r--r-- | components/style/servo/selector_parser.rs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs index 2537cae9f83..75dd041b9c0 100644 --- a/components/style/servo/selector_parser.rs +++ b/components/style/servo/selector_parser.rs @@ -19,7 +19,7 @@ use crate::{Atom, CaseSensitivityExt, LocalName, Namespace, Prefix}; use cssparser::{serialize_identifier, CowRcStr, Parser as CssParser, SourceLocation, ToCss}; use fxhash::FxHashMap; use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint}; -use selectors::parser::{SelectorParseErrorKind, Visit}; +use selectors::parser::SelectorParseErrorKind; use selectors::visitor::SelectorVisitor; use std::fmt; use std::mem; @@ -315,8 +315,16 @@ impl ::selectors::parser::NonTSPseudoClass for NonTSPseudoClass { fn has_zero_specificity(&self) -> bool { false } + + fn visit<V>(&self, _: &mut V) -> bool + where + V: SelectorVisitor<Impl = Self::Impl>, + { + true + } } + impl ToCss for NonTSPseudoClass { fn to_css<W>(&self, dest: &mut W) -> fmt::Result where @@ -352,17 +360,6 @@ impl ToCss for NonTSPseudoClass { } } -impl Visit for NonTSPseudoClass { - type Impl = SelectorImpl; - - fn visit<V>(&self, _: &mut V) -> bool - where - V: SelectorVisitor<Impl = Self::Impl>, - { - true - } -} - impl NonTSPseudoClass { /// Gets a given state flag for this pseudo-class. This is used to do /// selector matching, and it's set from the DOM. |