Enum style::servo::selector_parser::PseudoElement
source · #[repr(usize)]pub enum PseudoElement {
Show 19 variants
After = 0,
Before = 1,
Selection = 2,
DetailsSummary = 3,
DetailsContent = 4,
ServoAnonymousBox = 5,
ServoAnonymousTable = 6,
ServoAnonymousTableCell = 7,
ServoAnonymousTableRow = 8,
ServoLegacyText = 9,
ServoLegacyInputText = 10,
ServoLegacyTableWrapper = 11,
ServoLegacyAnonymousTableWrapper = 12,
ServoLegacyAnonymousTable = 13,
ServoLegacyAnonymousBlock = 14,
ServoLegacyInlineBlockWrapper = 15,
ServoLegacyInlineAbsolute = 16,
ServoTableGrid = 17,
ServoTableWrapper = 18,
}
Expand description
A pseudo-element, both public and private.
NB: If you add to this list, be sure to update each_simple_pseudo_element
too.
Variants§
After = 0
Before = 1
Selection = 2
DetailsSummary = 3
DetailsContent = 4
ServoAnonymousBox = 5
ServoAnonymousTable = 6
ServoAnonymousTableCell = 7
ServoAnonymousTableRow = 8
ServoLegacyText = 9
ServoLegacyInputText = 10
ServoLegacyTableWrapper = 11
ServoLegacyAnonymousTableWrapper = 12
ServoLegacyAnonymousTable = 13
ServoLegacyAnonymousBlock = 14
ServoLegacyInlineBlockWrapper = 15
ServoLegacyInlineAbsolute = 16
ServoTableGrid = 17
ServoTableWrapper = 18
Implementations§
source§impl PseudoElement
impl PseudoElement
sourcepub fn eager_index(&self) -> usize
pub fn eager_index(&self) -> usize
Gets the canonical index of this eagerly-cascaded pseudo-element.
sourcepub fn index(&self) -> usize
pub fn index(&self) -> usize
An index for this pseudo-element to be indexed in an enumerated array.
sourcepub fn pseudo_none_array<T>() -> [Option<T>; 19]
pub fn pseudo_none_array<T>() -> [Option<T>; 19]
An array of None
, one per pseudo-element.
sourcepub fn from_eager_index(i: usize) -> Self
pub fn from_eager_index(i: usize) -> Self
Creates a pseudo-element from an eager index.
sourcepub fn is_before_or_after(&self) -> bool
pub fn is_before_or_after(&self) -> bool
Whether the current pseudo element is ::before or ::after.
sourcepub fn is_unknown_webkit_pseudo_element(&self) -> bool
pub fn is_unknown_webkit_pseudo_element(&self) -> bool
Whether this is an unknown ::-webkit- pseudo-element.
sourcepub fn is_selection(&self) -> bool
pub fn is_selection(&self) -> bool
Whether this pseudo-element is the ::selection pseudo.
sourcepub fn is_first_letter(&self) -> bool
pub fn is_first_letter(&self) -> bool
Whether the current pseudo element is :first-letter
sourcepub fn is_first_line(&self) -> bool
pub fn is_first_line(&self) -> bool
Whether the current pseudo element is :first-line
sourcepub fn is_color_swatch(&self) -> bool
pub fn is_color_swatch(&self) -> bool
Whether this pseudo-element is the ::-moz-color-swatch pseudo.
sourcepub fn is_anon_box(&self) -> bool
pub fn is_anon_box(&self) -> bool
Whether this pseudo-element is for an anonymous box.
sourcepub fn skip_item_display_fixup(&self) -> bool
pub fn skip_item_display_fixup(&self) -> bool
Whether this pseudo-element skips flex/grid container display-based fixup.
sourcepub fn is_precomputed(&self) -> bool
pub fn is_precomputed(&self) -> bool
Whether this pseudo-element is precomputed.
sourcepub fn cascade_type(&self) -> PseudoElementCascadeType
pub fn cascade_type(&self) -> PseudoElementCascadeType
Returns which kind of cascade type has this pseudo.
For more info on cascade types, see docs/components/style.md
Note: Keep this in sync with EAGER_PSEUDO_COUNT.
sourcepub fn canonical(&self) -> PseudoElement
pub fn canonical(&self) -> PseudoElement
Covert non-canonical pseudo-element to canonical one, and keep a canonical one as it is.
sourcepub fn pseudo_info(&self)
pub fn pseudo_info(&self)
Stub, only Gecko needs this
sourcepub fn property_restriction(&self) -> Option<PropertyFlags>
pub fn property_restriction(&self) -> Option<PropertyFlags>
Property flag that properties must have to apply to this pseudo-element.
sourcepub fn should_exist(&self, style: &ComputedValues) -> bool
pub fn should_exist(&self, style: &ComputedValues) -> bool
Whether this pseudo-element should actually exist if it has the given styles.
Trait Implementations§
source§impl Clone for PseudoElement
impl Clone for PseudoElement
source§fn clone(&self) -> PseudoElement
fn clone(&self) -> PseudoElement
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PseudoElement
impl Debug for PseudoElement
source§impl<'de> Deserialize<'de> for PseudoElement
impl<'de> Deserialize<'de> for PseudoElement
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for PseudoElement
impl Hash for PseudoElement
source§impl MallocSizeOf for PseudoElement
impl MallocSizeOf for PseudoElement
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl PartialEq for PseudoElement
impl PartialEq for PseudoElement
source§fn eq(&self, other: &PseudoElement) -> bool
fn eq(&self, other: &PseudoElement) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PseudoElement for PseudoElement
impl PseudoElement for PseudoElement
§type Impl = SelectorImpl
type Impl = SelectorImpl
SelectorImpl
this pseudo-element is used for.source§fn accepts_state_pseudo_classes(&self) -> bool
fn accepts_state_pseudo_classes(&self) -> bool
source§fn valid_after_slotted(&self) -> bool
fn valid_after_slotted(&self) -> bool
source§impl Serialize for PseudoElement
impl Serialize for PseudoElement
source§impl ToCss for PseudoElement
impl ToCss for PseudoElement
source§impl ToShmem for PseudoElement
impl ToShmem for PseudoElement
impl Copy for PseudoElement
impl Eq for PseudoElement
impl StructuralPartialEq for PseudoElement
Auto Trait Implementations§
impl Freeze for PseudoElement
impl RefUnwindSafe for PseudoElement
impl Send for PseudoElement
impl Sync for PseudoElement
impl Unpin for PseudoElement
impl UnwindSafe for PseudoElement
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<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