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:
Emilio Cobos Álvarez 2017-10-18 09:13:00 +02:00
parent 4cf2ce66fc
commit b0e54968ec
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
9 changed files with 121 additions and 85 deletions

View file

@ -152,7 +152,7 @@ impl<'a, E> Element for ElementWrapper<'a, E>
fn match_non_ts_pseudo_class<F>(
&self,
pseudo_class: &NonTSPseudoClass,
context: &mut MatchingContext,
context: &mut MatchingContext<Self::Impl>,
relevant_link: &RelevantLinkStatus,
_setter: &mut F,
) -> bool
@ -258,7 +258,7 @@ impl<'a, E> Element for ElementWrapper<'a, E>
fn match_pseudo_element(
&self,
pseudo_element: &PseudoElement,
context: &mut MatchingContext,
context: &mut MatchingContext<Self::Impl>,
) -> bool {
self.element.match_pseudo_element(pseudo_element, context)
}