Enum css::selectors::matching::RelevantLinkStatus [] [src]

pub enum RelevantLinkStatus {
    Looking,
    NotLooking,
    Found,
}

Tracks whether we are currently looking for relevant links for a given complex selector. A "relevant link" is the element being matched if it is a link or the nearest ancestor link.

matches_complex_selector creates a new instance of this for each complex selector we try to match for an element. This is done because is_visited and is_unvisited are based on relevant link state of only the current complex selector being matched (not the global relevant link status for all selectors in MatchingContext).

Variants

Looking for a possible relevant link. This is the initial mode when matching a selector.

Not looking for a relevant link. We transition to this mode if we encounter a sibiling combinator (since only ancestor combinators are allowed for this purpose).

Found a relevant link for the element being matched.

Methods

impl RelevantLinkStatus
[src]

[src]

Returns whether an element is considered visited for the purposes of matching. This is true only if the element is a link, an relevant link exists for the element, and the visited handling mode is set to accept relevant links as visited.

[src]

Returns whether an element is considered unvisited for the purposes of matching. Assuming the element is a link, this is always true for non-relevant links, since only relevant links can potentially be treated as visited. If this is a relevant link, then is it unvisited if the visited handling mode is set to treat all links as unvisted (including relevant links).

Trait Implementations

impl Clone for RelevantLinkStatus
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for RelevantLinkStatus
[src]

impl Debug for RelevantLinkStatus
[src]

[src]

Formats the value using the given formatter.

impl Eq for RelevantLinkStatus
[src]

impl PartialEq for RelevantLinkStatus
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Default for RelevantLinkStatus
[src]

[src]

Returns the "default value" for a type. Read more