style: Make a wrapper struct for extra matching data

No behavior change but we're about to add some extra field to it.

Differential Revision: https://phabricator.services.mozilla.com/D159850
This commit is contained in:
Emilio Cobos Álvarez 2022-10-20 14:24:35 +00:00 committed by Martin Robinson
parent b89c2be4bd
commit a62f6c78b2
3 changed files with 13 additions and 6 deletions

View file

@ -230,8 +230,16 @@ impl ::selectors::parser::NonTSPseudoClass for NonTSPseudoClass {
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SelectorImpl;
/// A set of extra data to carry along with the matching context, either for
/// selector-matching or invalidation.
#[derive(Debug, Default)]
pub struct ExtraMatchingData {
/// The invalidation data to invalidate doc-state pseudo-classes correctly.
pub invalidation_data: InvalidationMatchingData,
}
impl ::selectors::SelectorImpl for SelectorImpl {
type ExtraMatchingData = InvalidationMatchingData;
type ExtraMatchingData = ExtraMatchingData;
type AttrValue = AtomString;
type Identifier = AtomIdent;
type LocalName = AtomIdent;