mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Make MatchingContext generic over SelectorImpl.
This will help Xidorn implement tree pseudos, and in general makes sense, allowing to put specific matching data in a selectors implementation.
This commit is contained in:
parent
4cf2ce66fc
commit
b0e54968ec
9 changed files with 121 additions and 85 deletions
|
@ -67,17 +67,18 @@ pub trait Element: Sized + Clone + Debug {
|
|||
fn match_non_ts_pseudo_class<F>(
|
||||
&self,
|
||||
pc: &<Self::Impl as SelectorImpl>::NonTSPseudoClass,
|
||||
context: &mut MatchingContext,
|
||||
context: &mut MatchingContext<Self::Impl>,
|
||||
relevant_link: &RelevantLinkStatus,
|
||||
flags_setter: &mut F,
|
||||
) -> bool
|
||||
where
|
||||
F: FnMut(&Self, ElementSelectorFlags);
|
||||
|
||||
fn match_pseudo_element(&self,
|
||||
pe: &<Self::Impl as SelectorImpl>::PseudoElement,
|
||||
context: &mut MatchingContext)
|
||||
-> bool;
|
||||
fn match_pseudo_element(
|
||||
&self,
|
||||
pe: &<Self::Impl as SelectorImpl>::PseudoElement,
|
||||
context: &mut MatchingContext<Self::Impl>,
|
||||
) -> bool;
|
||||
|
||||
/// Whether this element is a `link`.
|
||||
fn is_link(&self) -> bool;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue