pub enum PseudoElementCascadeType {
Eager,
Lazy,
Precomputed,
}
Expand description
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§
Eager
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
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
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§
source§impl Clone for PseudoElementCascadeType
impl Clone for PseudoElementCascadeType
source§fn clone(&self) -> PseudoElementCascadeType
fn clone(&self) -> PseudoElementCascadeType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PseudoElementCascadeType
impl Debug for PseudoElementCascadeType
source§impl PartialEq for PseudoElementCascadeType
impl PartialEq for PseudoElementCascadeType
impl Eq for PseudoElementCascadeType
impl StructuralPartialEq for PseudoElementCascadeType
Auto Trait Implementations§
impl Freeze for PseudoElementCascadeType
impl RefUnwindSafe for PseudoElementCascadeType
impl Send for PseudoElementCascadeType
impl Sync for PseudoElementCascadeType
impl Unpin for PseudoElementCascadeType
impl UnwindSafe for PseudoElementCascadeType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more