mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Rename SelectorMethods to Visit, after its one method.
This commit is contained in:
parent
79f93cfb5b
commit
c14b766ff5
5 changed files with 11 additions and 11 deletions
|
@ -96,7 +96,7 @@ macro_rules! with_all_bounds {
|
|||
|
||||
/// non tree-structural pseudo-classes
|
||||
/// (see: https://drafts.csswg.org/selectors/#structural-pseudos)
|
||||
type NonTSPseudoClass: $($CommonBounds)* + Sized + ToCss + SelectorMethods<Impl = Self>;
|
||||
type NonTSPseudoClass: $($CommonBounds)* + Sized + ToCss + Visit<Impl = Self>;
|
||||
|
||||
/// pseudo-elements
|
||||
type PseudoElement: $($CommonBounds)* + PseudoElement<Impl = Self>;
|
||||
|
@ -326,7 +326,7 @@ impl AncestorHashes {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait SelectorMethods {
|
||||
pub trait Visit {
|
||||
type Impl: SelectorImpl;
|
||||
|
||||
fn visit<V>(&self, visitor: &mut V) -> bool
|
||||
|
@ -334,7 +334,7 @@ pub trait SelectorMethods {
|
|||
V: SelectorVisitor<Impl = Self::Impl>;
|
||||
}
|
||||
|
||||
impl<Impl: SelectorImpl> SelectorMethods for Selector<Impl> {
|
||||
impl<Impl: SelectorImpl> Visit for Selector<Impl> {
|
||||
type Impl = Impl;
|
||||
|
||||
fn visit<V>(&self, visitor: &mut V) -> bool
|
||||
|
@ -364,7 +364,7 @@ impl<Impl: SelectorImpl> SelectorMethods for Selector<Impl> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<Impl: SelectorImpl> SelectorMethods for Component<Impl> {
|
||||
impl<Impl: SelectorImpl> Visit for Component<Impl> {
|
||||
type Impl = Impl;
|
||||
|
||||
fn visit<V>(&self, visitor: &mut V) -> bool
|
||||
|
@ -2013,7 +2013,7 @@ pub mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
impl SelectorMethods for PseudoClass {
|
||||
impl Visit for PseudoClass {
|
||||
type Impl = DummySelectorImpl;
|
||||
|
||||
fn visit<V>(&self, _visitor: &mut V) -> bool
|
||||
|
|
|
@ -12,7 +12,7 @@ use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
|
|||
use invalidation::element::document_state::InvalidationMatchingData;
|
||||
use selector_parser::{Direction, SelectorParser};
|
||||
use selectors::SelectorList;
|
||||
use selectors::parser::{self as selector_parser, Selector, SelectorMethods, SelectorParseErrorKind};
|
||||
use selectors::parser::{self as selector_parser, Selector, Visit, SelectorParseErrorKind};
|
||||
use selectors::visitor::SelectorVisitor;
|
||||
use std::fmt;
|
||||
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
|
@ -113,7 +113,7 @@ impl ToCss for NonTSPseudoClass {
|
|||
}
|
||||
}
|
||||
|
||||
impl SelectorMethods for NonTSPseudoClass {
|
||||
impl Visit for NonTSPseudoClass {
|
||||
type Impl = SelectorImpl;
|
||||
|
||||
fn visit<V>(&self, visitor: &mut V) -> bool
|
||||
|
|
|
@ -15,7 +15,7 @@ use selector_parser::Direction;
|
|||
use selector_parser::SelectorImpl;
|
||||
use selectors::attr::NamespaceConstraint;
|
||||
use selectors::parser::{Combinator, Component};
|
||||
use selectors::parser::{Selector, SelectorIter, SelectorMethods};
|
||||
use selectors::parser::{Selector, SelectorIter, Visit};
|
||||
use selectors::visitor::SelectorVisitor;
|
||||
use smallvec::SmallVec;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ use properties::PropertyFlags;
|
|||
use properties::longhands::display::computed_value::T as Display;
|
||||
use selector_parser::{AttrValue as SelectorAttrValue, PseudoElementCascadeType, SelectorParser};
|
||||
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
|
||||
use selectors::parser::{SelectorMethods, SelectorParseErrorKind};
|
||||
use selectors::parser::{Visit, SelectorParseErrorKind};
|
||||
use selectors::visitor::SelectorVisitor;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
|
@ -312,7 +312,7 @@ impl ToCss for NonTSPseudoClass {
|
|||
}
|
||||
}
|
||||
|
||||
impl SelectorMethods for NonTSPseudoClass {
|
||||
impl Visit for NonTSPseudoClass {
|
||||
type Impl = SelectorImpl;
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ use selectors::bloom::{BloomFilter, NonCountingBloomFilter};
|
|||
use selectors::matching::{ElementSelectorFlags, matches_selector, MatchingContext, MatchingMode};
|
||||
use selectors::matching::VisitedHandlingMode;
|
||||
use selectors::parser::{AncestorHashes, Combinator, Component, Selector};
|
||||
use selectors::parser::{SelectorIter, SelectorMethods};
|
||||
use selectors::parser::{SelectorIter, Visit};
|
||||
use selectors::visitor::SelectorVisitor;
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use shared_lock::{Locked, SharedRwLockReadGuard, StylesheetGuards};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue