pub struct RelativeSelectorInvalidator<'a, 'b, E>where
E: TElement + 'a,{
pub element: E,
pub quirks_mode: QuirksMode,
pub snapshot_table: Option<&'b SnapshotMap>,
pub invalidated: fn(_: E, _: &InvalidationResult),
pub sibling_traversal_map: SiblingTraversalMap<E>,
pub _marker: PhantomData<&'a ()>,
}
Expand description
Overall invalidator for handling relative selector invalidations.
Fields§
§element: E
Element triggering the invalidation.
quirks_mode: QuirksMode
Quirks mode of the current invalidation.
snapshot_table: Option<&'b SnapshotMap>
Snapshot containing changes to invalidate against. Can be None if it’s a DOM mutation.
invalidated: fn(_: E, _: &InvalidationResult)
Callback to trigger when the subject element is invalidated.
sibling_traversal_map: SiblingTraversalMap<E>
The traversal map that should be used to process invalidations.
_marker: PhantomData<&'a ()>
Marker for ’a lifetime.
Implementations§
source§impl<'a, 'b, E> RelativeSelectorInvalidator<'a, 'b, E>where
E: TElement + 'a,
impl<'a, 'b, E> RelativeSelectorInvalidator<'a, 'b, E>where
E: TElement + 'a,
sourcepub fn invalidate_relative_selectors_for_this<F>(
self,
stylist: &'a Stylist,
gather_dependencies: F,
)where
F: FnMut(&E, Option<OpaqueElement>, &'a CascadeData, QuirksMode, &mut RelativeSelectorDependencyCollector<'a, E>),
pub fn invalidate_relative_selectors_for_this<F>(
self,
stylist: &'a Stylist,
gather_dependencies: F,
)where
F: FnMut(&E, Option<OpaqueElement>, &'a CascadeData, QuirksMode, &mut RelativeSelectorDependencyCollector<'a, E>),
Gather relative selector dependencies for the given element, and invalidate as necessary.
sourcepub fn invalidate_relative_selectors_for_dom_mutation(
self,
subtree: bool,
stylist: &'a Stylist,
inherited_search_path: ElementSelectorFlags,
operation: DomMutationOperation,
)
pub fn invalidate_relative_selectors_for_dom_mutation( self, subtree: bool, stylist: &'a Stylist, inherited_search_path: ElementSelectorFlags, operation: DomMutationOperation, )
Gather relative selector dependencies for the given element (And its subtree) that mutated, and invalidate as necessary.
sourcefn invalidate_from_dependencies(&self, to_invalidate: ToInvalidate<'a, E>)
fn invalidate_from_dependencies(&self, to_invalidate: ToInvalidate<'a, E>)
Carry out complete invalidation triggered by a relative selector invalidation.
fn invalidate_upwards( &self, element: E, invalidation: &RelativeSelectorInvalidation<'a>, )
sourcefn in_search_direction(element: &E, desired: ElementSelectorFlags) -> bool
fn in_search_direction(element: &E, desired: ElementSelectorFlags) -> bool
Is this element in the direction of the given relative selector search path?
sourcefn handle_anchor(
&self,
element: E,
outer_dependency: &Dependency,
host: Option<OpaqueElement>,
)
fn handle_anchor( &self, element: E, outer_dependency: &Dependency, host: Option<OpaqueElement>, )
Handle a potential relative selector anchor.
sourcefn is_subject(outer_dependency: &Dependency) -> bool
fn is_subject(outer_dependency: &Dependency) -> bool
Does this relative selector dependency have its relative selector in the subject position?
Auto Trait Implementations§
impl<'a, 'b, E> Freeze for RelativeSelectorInvalidator<'a, 'b, E>where
E: Freeze,
impl<'a, 'b, E> !RefUnwindSafe for RelativeSelectorInvalidator<'a, 'b, E>
impl<'a, 'b, E> Send for RelativeSelectorInvalidator<'a, 'b, E>where
E: Send,
impl<'a, 'b, E> Sync for RelativeSelectorInvalidator<'a, 'b, E>where
E: Sync,
impl<'a, 'b, E> Unpin for RelativeSelectorInvalidator<'a, 'b, E>where
E: Unpin,
impl<'a, 'b, E> !UnwindSafe for RelativeSelectorInvalidator<'a, 'b, E>
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>
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