style: Allow storing a DocumentState for invalidation.

This commit is contained in:
Emilio Cobos Álvarez 2018-01-11 12:37:47 +01:00
parent 1e27f2883b
commit cb1a951477
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 26 additions and 6 deletions

View file

@ -277,8 +277,15 @@ impl NonTSPseudoClass {
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SelectorImpl;
/// A struct holding the members necessary to invalidate document state
/// selectors.
pub struct InvalidationMatchingData {
/// The document state that has changed, which makes it always match.
pub document_state: DocumentState,
}
impl ::selectors::SelectorImpl for SelectorImpl {
type ExtraMatchingData = ();
type ExtraMatchingData = InvalidationMatchingData;
type AttrValue = Atom;
type Identifier = Atom;
type ClassName = Atom;