Trait style::invalidation::element::invalidator::InvalidationProcessor
[−]
[src]
pub trait InvalidationProcessor<'a, E> where
E: TElement, { fn matching_context(&mut self) -> &mut MatchingContext<'a, E::Impl>; fn collect_invalidations(
&mut self,
element: E,
self_invalidations: &mut InvalidationVector<'a>,
descendant_invalidations: &mut InvalidationVector<'a>,
sibling_invalidations: &mut InvalidationVector<'a>
) -> bool; fn should_process_descendants(&mut self, element: E) -> bool; fn recursion_limit_exceeded(&mut self, element: E); fn invalidated_self(&mut self, element: E); fn invalidated_descendants(&mut self, element: E, child: E); fn invalidates_on_eager_pseudo_element(&self) -> bool { ... } fn light_tree_only(&self) -> bool { ... } }
A trait to abstract the collection of invalidations for a given pass.
Required Methods
fn matching_context(&mut self) -> &mut MatchingContext<'a, E::Impl>
The matching context that should be used to process invalidations.
fn collect_invalidations(
&mut self,
element: E,
self_invalidations: &mut InvalidationVector<'a>,
descendant_invalidations: &mut InvalidationVector<'a>,
sibling_invalidations: &mut InvalidationVector<'a>
) -> bool
&mut self,
element: E,
self_invalidations: &mut InvalidationVector<'a>,
descendant_invalidations: &mut InvalidationVector<'a>,
sibling_invalidations: &mut InvalidationVector<'a>
) -> bool
Collect invalidations for a given element's descendants and siblings.
Returns whether the element itself was invalidated.
fn should_process_descendants(&mut self, element: E) -> bool
Returns whether the invalidation process should process the descendants of the given element.
fn recursion_limit_exceeded(&mut self, element: E)
Executes an arbitrary action when the recursion limit is exceded (if any).
fn invalidated_self(&mut self, element: E)
Executes an action when Self
is invalidated.
fn invalidated_descendants(&mut self, element: E, child: E)
Executes an action when any descendant of Self
is invalidated.
Provided Methods
fn invalidates_on_eager_pseudo_element(&self) -> bool
Whether an invalidation that contains only an eager pseudo-element selector like ::before or ::after triggers invalidation of the element that would originate it.
fn light_tree_only(&self) -> bool
Whether the invalidation processor only cares about light-tree descendants of a given element, that is, doesn't invalidate pseudo-elements, NAC, or XBL anon content.
Implementors
impl<'a, 'b: 'a, E: 'a> InvalidationProcessor<'a, E> for StateAndAttrInvalidationProcessor<'a, 'b, E> where
E: TElement,