Enum style::selector_parser::PseudoElementCascadeType [] [src]

pub enum PseudoElementCascadeType {
    Eager,
    Lazy,
    Precomputed,
}

This enumeration determines if a pseudo-element is eagerly cascaded or not.

If you're implementing a public selector for Servo that the end-user might customize, then you probably need to make it eager.

Variants

Eagerly cascaded pseudo-elements are "normal" pseudo-elements (i.e. ::before and ::after). They inherit styles normally as another selector would do, and they're computed as part of the cascade.

Lazy pseudo-elements are affected by selector matching, but they're only computed when needed, and not before. They're useful for general pseudo-elements that are not very common.

Note that in Servo lazy pseudo-elements are restricted to a subset of selectors, so you can't use it for public pseudo-elements. This is not the case with Gecko though.

Precomputed pseudo-elements skip the cascade process entirely, mostly as an optimisation since they are private pseudo-elements (like ::-servo-details-content).

This pseudo-elements are resolved on the fly using only global rules (rules of the form *|*), and applying them to the parent style.

Trait Implementations

impl Clone for PseudoElementCascadeType
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for PseudoElementCascadeType
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for PseudoElementCascadeType
[src]

impl PartialEq for PseudoElementCascadeType
[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 !=.