Struct css::selectors::context::MatchingContext
[−]
[src]
pub struct MatchingContext<'a> { pub matching_mode: MatchingMode, pub bloom_filter: Option<&'a BloomFilter>, pub nth_index_cache: Option<&'a mut NthIndexCache>, pub visited_handling: VisitedHandlingMode, pub relevant_link_found: bool, // some fields omitted }
Data associated with the matching process for a element. This context is used across many selectors for an element, so it's not appropriate for transient data that applies to only a single selector.
Fields
matching_mode: MatchingMode
Input with the matching mode we should use when matching selectors.
bloom_filter: Option<&'a BloomFilter>
Input with the bloom filter used to fast-reject selectors.
nth_index_cache: Option<&'a mut NthIndexCache>
An optional cache to speed up nth-index-like selectors.
visited_handling: VisitedHandlingMode
Input that controls how matching for links is handled.
relevant_link_found: bool
Output that records whether we encountered a "relevant link" while
matching any selector for this element. (This differs from
RelevantLinkStatus
which tracks the status for the current selector
only.)
Methods
impl<'a> MatchingContext<'a>
[src]
fn new(
matching_mode: MatchingMode,
bloom_filter: Option<&'a BloomFilter>,
nth_index_cache: Option<&'a mut NthIndexCache>,
quirks_mode: QuirksMode
) -> Self
[src]
matching_mode: MatchingMode,
bloom_filter: Option<&'a BloomFilter>,
nth_index_cache: Option<&'a mut NthIndexCache>,
quirks_mode: QuirksMode
) -> Self
Constructs a new MatchingContext
.
fn new_for_visited(
matching_mode: MatchingMode,
bloom_filter: Option<&'a BloomFilter>,
nth_index_cache: Option<&'a mut NthIndexCache>,
visited_handling: VisitedHandlingMode,
quirks_mode: QuirksMode
) -> Self
[src]
matching_mode: MatchingMode,
bloom_filter: Option<&'a BloomFilter>,
nth_index_cache: Option<&'a mut NthIndexCache>,
visited_handling: VisitedHandlingMode,
quirks_mode: QuirksMode
) -> Self
Constructs a new MatchingContext
for use in visited matching.
fn quirks_mode(&self) -> QuirksMode
[src]
The quirks mode of the document.
fn classes_and_ids_case_sensitivity(&self) -> CaseSensitivity
[src]
The case-sensitivity for class and ID selectors