Struct style::sharing::ValidationData
source · pub struct ValidationData {
class_list: Option<SmallVec<[AtomIdent; 5]>>,
part_list: Option<SmallVec<[AtomIdent; 5]>>,
pres_hints: Option<SmallVec<[ApplicableDeclarationBlock; 5]>>,
parent_style_identity: Option<OpaqueComputedValues>,
revalidation_match_results: Option<RevalidationResult>,
}
Expand description
Some data we want to avoid recomputing all the time while trying to share style.
Fields§
§class_list: Option<SmallVec<[AtomIdent; 5]>>
The class list of this element.
TODO(emilio): Maybe check whether rules for these classes apply to the element?
part_list: Option<SmallVec<[AtomIdent; 5]>>
The part list of this element.
TODO(emilio): Maybe check whether rules with these part names apply to the element?
pres_hints: Option<SmallVec<[ApplicableDeclarationBlock; 5]>>
The list of presentational attributes of the element.
parent_style_identity: Option<OpaqueComputedValues>
The pointer identity of the parent ComputedValues.
revalidation_match_results: Option<RevalidationResult>
The cached result of matching this entry against the revalidation selectors.
Implementations§
source§impl ValidationData
impl ValidationData
sourcepub fn pres_hints<E>(&mut self, element: E) -> &[ApplicableDeclarationBlock]where
E: TElement,
pub fn pres_hints<E>(&mut self, element: E) -> &[ApplicableDeclarationBlock]where E: TElement,
Get or compute the list of presentational attributes associated with this element.
sourcepub fn part_list<E>(&mut self, element: E) -> &[AtomIdent]where
E: TElement,
pub fn part_list<E>(&mut self, element: E) -> &[AtomIdent]where E: TElement,
Get or compute the part-list associated with this element.
sourcepub fn class_list<E>(&mut self, element: E) -> &[AtomIdent]where
E: TElement,
pub fn class_list<E>(&mut self, element: E) -> &[AtomIdent]where E: TElement,
Get or compute the class-list associated with this element.
sourcepub fn parent_style_identity<E>(&mut self, el: E) -> OpaqueComputedValueswhere
E: TElement,
pub fn parent_style_identity<E>(&mut self, el: E) -> OpaqueComputedValueswhere E: TElement,
Get or compute the parent style identity.
sourcefn revalidation_match_results<E>(
&mut self,
element: E,
stylist: &Stylist,
bloom: &StyleBloom<E>,
selector_caches: &mut SelectorCaches,
bloom_known_valid: bool,
needs_selector_flags: NeedsSelectorFlags
) -> &RevalidationResultwhere
E: TElement,
fn revalidation_match_results<E>( &mut self, element: E, stylist: &Stylist, bloom: &StyleBloom<E>, selector_caches: &mut SelectorCaches, bloom_known_valid: bool, needs_selector_flags: NeedsSelectorFlags ) -> &RevalidationResultwhere E: TElement,
Computes the revalidation results if needed, and returns it. Inline so we know at compile time what bloom_known_valid is.
Trait Implementations§
source§impl Debug for ValidationData
impl Debug for ValidationData
source§impl Default for ValidationData
impl Default for ValidationData
source§fn default() -> ValidationData
fn default() -> ValidationData
Auto Trait Implementations§
impl !RefUnwindSafe for ValidationData
impl Send for ValidationData
impl Sync for ValidationData
impl Unpin for ValidationData
impl !UnwindSafe for ValidationData
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> 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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
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