pub struct CascadeData { /* private fields */ }Expand description
Data resulting from performing the CSS cascade that is specific to a given origin.
FIXME(emilio): Consider renaming and splitting in CascadeData and
InvalidationData? That’d make clear_cascade_data() clearer.
Implementations§
Source§impl CascadeData
impl CascadeData
Sourcepub fn rebuild<'a, S>(
&mut self,
device: &Device,
quirks_mode: QuirksMode,
collection: SheetCollectionFlusher<'_, S>,
guard: &SharedRwLockReadGuard<'_>,
difference: &mut CascadeDataDifference,
) -> Result<(), AllocErr>where
S: StylesheetInDocument + PartialEq + 'static,
pub fn rebuild<'a, S>(
&mut self,
device: &Device,
quirks_mode: QuirksMode,
collection: SheetCollectionFlusher<'_, S>,
guard: &SharedRwLockReadGuard<'_>,
difference: &mut CascadeDataDifference,
) -> Result<(), AllocErr>where
S: StylesheetInDocument + PartialEq + 'static,
Rebuild the cascade data from a given SheetCollection, incrementally if possible.
Sourcepub fn custom_media_map(&self) -> &CustomMediaMap
pub fn custom_media_map(&self) -> &CustomMediaMap
Returns the custom media query map.
Sourcepub fn invalidation_map(&self) -> &InvalidationMap
pub fn invalidation_map(&self) -> &InvalidationMap
Returns the invalidation map.
Sourcepub fn relative_selector_invalidation_map(&self) -> &InvalidationMap
pub fn relative_selector_invalidation_map(&self) -> &InvalidationMap
Returns the relative selector invalidation map.
Sourcepub fn relative_invalidation_map_attributes(
&self,
) -> &AdditionalRelativeSelectorInvalidationMap
pub fn relative_invalidation_map_attributes( &self, ) -> &AdditionalRelativeSelectorInvalidationMap
Returns the relative selector invalidation map data.
Sourcepub fn has_state_dependency(&self, state: ElementState) -> bool
pub fn has_state_dependency(&self, state: ElementState) -> bool
Returns whether the given ElementState bit is relied upon by a selector of some rule.
Sourcepub fn has_nth_of_custom_state_dependency(&self, state: &AtomIdent) -> bool
pub fn has_nth_of_custom_state_dependency(&self, state: &AtomIdent) -> bool
Returns whether the given Custom State is relied upon by a selector
of some rule in the selector list of :nth-child(… of
Sourcepub fn has_nth_of_state_dependency(&self, state: ElementState) -> bool
pub fn has_nth_of_state_dependency(&self, state: ElementState) -> bool
Returns whether the given ElementState bit is relied upon by a selector
of some rule in the selector list of :nth-child(… of
Sourcepub fn might_have_attribute_dependency(&self, local_name: &LocalName) -> bool
pub fn might_have_attribute_dependency(&self, local_name: &LocalName) -> bool
Returns whether the given attribute might appear in an attribute selector of some rule.
Sourcepub fn might_have_nth_of_id_dependency(&self, id: &Atom) -> bool
pub fn might_have_nth_of_id_dependency(&self, id: &Atom) -> bool
Returns whether the given ID might appear in an ID selector in the
selector list of :nth-child(… of
Sourcepub fn might_have_nth_of_class_dependency(&self, class: &Atom) -> bool
pub fn might_have_nth_of_class_dependency(&self, class: &Atom) -> bool
Returns whether the given class might appear in a class selector in the
selector list of :nth-child(… of
Sourcepub fn might_have_nth_of_attribute_dependency(
&self,
local_name: &LocalName,
) -> bool
pub fn might_have_nth_of_attribute_dependency( &self, local_name: &LocalName, ) -> bool
Returns whether the given attribute might appear in an attribute
selector in the selector list of :nth-child(… of
Sourcepub fn normal_rules(
&self,
pseudo_elements: &[PseudoElement],
) -> Option<&SelectorMap<Rule>>
pub fn normal_rules( &self, pseudo_elements: &[PseudoElement], ) -> Option<&SelectorMap<Rule>>
Returns the normal rule map for a given pseudo-element.
Sourcepub fn featureless_host_rules(
&self,
pseudo_elements: &[PseudoElement],
) -> Option<&SelectorMap<Rule>>
pub fn featureless_host_rules( &self, pseudo_elements: &[PseudoElement], ) -> Option<&SelectorMap<Rule>>
Returns the featureless pseudo rule map for a given pseudo-element.
Sourcepub fn any_featureless_host_rules(&self) -> bool
pub fn any_featureless_host_rules(&self) -> bool
Whether there’s any featureless rule that could match in this scope.
Sourcepub fn slotted_rules(
&self,
pseudo_elements: &[PseudoElement],
) -> Option<&SelectorMap<Rule>>
pub fn slotted_rules( &self, pseudo_elements: &[PseudoElement], ) -> Option<&SelectorMap<Rule>>
Returns the slotted rule map for a given pseudo-element.
Sourcepub fn any_slotted_rule(&self) -> bool
pub fn any_slotted_rule(&self) -> bool
Whether there’s any ::slotted rule that could match in this scope.
Sourcepub fn part_rules(
&self,
pseudo_elements: &[PseudoElement],
) -> Option<&PrecomputedHashMap<Atom, SmallVec<[Rule; 1]>>>
pub fn part_rules( &self, pseudo_elements: &[PseudoElement], ) -> Option<&PrecomputedHashMap<Atom, SmallVec<[Rule; 1]>>>
Returns the parts rule map for a given pseudo-element.
Sourcepub fn any_part_rule(&self) -> bool
pub fn any_part_rule(&self) -> bool
Whether there’s any ::part rule that could match in this scope.
Sourcepub fn media_feature_affected_matches<S>(
&self,
stylesheet: &S,
guard: &SharedRwLockReadGuard<'_>,
device: &Device,
quirks_mode: QuirksMode,
) -> boolwhere
S: StylesheetInDocument + 'static,
pub fn media_feature_affected_matches<S>(
&self,
stylesheet: &S,
guard: &SharedRwLockReadGuard<'_>,
device: &Device,
quirks_mode: QuirksMode,
) -> boolwhere
S: StylesheetInDocument + 'static,
Returns whether all the media-feature affected values matched before and match now in the given stylesheet.
Sourcepub fn custom_property_registrations(
&self,
) -> &LayerOrderedMap<Arc<PropertyRegistration>>
pub fn custom_property_registrations( &self, ) -> &LayerOrderedMap<Arc<PropertyRegistration>>
Returns the custom properties map.
Trait Implementations§
Source§impl Clone for CascadeData
impl Clone for CascadeData
Source§fn clone(&self) -> CascadeData
fn clone(&self) -> CascadeData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CascadeData
impl Debug for CascadeData
Source§impl Default for CascadeData
impl Default for CascadeData
Source§impl MallocSizeOf for CascadeData
impl MallocSizeOf for CascadeData
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl Freeze for CascadeData
impl !RefUnwindSafe for CascadeData
impl Send for CascadeData
impl Sync for CascadeData
impl Unpin for CascadeData
impl UnsafeUnpin for CascadeData
impl !UnwindSafe for CascadeData
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§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