Struct css::selectors::matching::LocalMatchingContext
[−]
[src]
pub struct LocalMatchingContext<'a, 'b: 'a, Impl: SelectorImpl> { pub shared: &'a mut MatchingContext<'b>, pub selector: &'a Selector<Impl>, pub nesting_level: usize, pub hover_active_quirk_disabled: bool, // some fields omitted }
Holds per-selector data alongside a pointer to MatchingContext.
Fields
Shared MatchingContext
.
selector: &'a Selector<Impl>
A reference to the base selector we're matching against.
nesting_level: usize
The level of nesting for the selector being matched.
hover_active_quirk_disabled: bool
Holds a bool flag to see whether :active and :hover quirk should try to match or not. This flag can only be true in the case PseudoElements are encountered when matching mode is ForStatelessPseudoElement.
Methods
impl<'a, 'b, Impl> LocalMatchingContext<'a, 'b, Impl> where
Impl: SelectorImpl,
[src]
Impl: SelectorImpl,
fn new(
shared: &'a mut MatchingContext<'b>,
selector: &'a Selector<Impl>
) -> Self
[src]
shared: &'a mut MatchingContext<'b>,
selector: &'a Selector<Impl>
) -> Self
Constructs a new LocalMatchingContext
.
fn active_hover_quirk_matches(&self) -> bool
[src]
Returns true if current compound selector matches :active and :hover quirk. https://quirks.spec.whatwg.org/#the-active-and-hover-quirk