style: Add a document state invalidator.

This commit is contained in:
Emilio Cobos Álvarez 2018-01-11 15:53:36 +01:00
parent 2c1d72ad1a
commit 5b7d9eb94a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 102 additions and 10 deletions

View file

@ -9,6 +9,7 @@ use element_state::{DocumentState, ElementState};
use gecko_bindings::structs::{self, CSSPseudoClassType};
use gecko_bindings::structs::RawServoSelectorList;
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};
@ -277,13 +278,6 @@ 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 = InvalidationMatchingData;
type AttrValue = Atom;