pub struct RecalcStyle<'a> {
context: &'a LayoutContext<'a>,
}Fields§
§context: &'a LayoutContext<'a>Implementations§
Source§impl<'a> RecalcStyle<'a>
impl<'a> RecalcStyle<'a>
pub(crate) fn new(context: &'a LayoutContext<'a>) -> Self
pub(crate) fn context(&self) -> &LayoutContext<'a>
Trait Implementations§
Source§impl<'dom, E> DomTraversal<E> for RecalcStyle<'_>
impl<'dom, E> DomTraversal<E> for RecalcStyle<'_>
Source§fn process_preorder<F>(
&self,
traversal_data: &PerLevelTraversalData,
context: &mut StyleContext<'_, E>,
node: E::ConcreteNode,
note_child: F,
)where
F: FnMut(E::ConcreteNode),
fn process_preorder<F>(
&self,
traversal_data: &PerLevelTraversalData,
context: &mut StyleContext<'_, E>,
node: E::ConcreteNode,
note_child: F,
)where
F: FnMut(E::ConcreteNode),
Process
node on the way down, before its children have been processed. Read moreSource§fn needs_postorder_traversal() -> bool
fn needs_postorder_traversal() -> bool
Boolean that specifies whether a bottom up traversal should be
performed. Read more
Source§fn process_postorder(
&self,
_style_context: &mut StyleContext<'_, E>,
_node: E::ConcreteNode,
)
fn process_postorder( &self, _style_context: &mut StyleContext<'_, E>, _node: E::ConcreteNode, )
Process
node on the way up, after its children have been processed. Read moreReturn the shared style context common to all worker threads.
Source§fn handle_postorder_traversal(
&self,
context: &mut StyleContext<'_, E>,
root: OpaqueNode,
node: <E as TElement>::ConcreteNode,
children_to_process: isize,
)
fn handle_postorder_traversal( &self, context: &mut StyleContext<'_, E>, root: OpaqueNode, node: <E as TElement>::ConcreteNode, children_to_process: isize, )
Handles the postorder step of the traversal, if it exists, by bubbling
up the parent chain. Read more
Source§fn pre_traverse(
root: E,
shared_context: &SharedStyleContext<'_>,
) -> PreTraverseToken<E>
fn pre_traverse( root: E, shared_context: &SharedStyleContext<'_>, ) -> PreTraverseToken<E>
Style invalidations happen when traversing from a parent to its children.
However, this mechanism can’t handle style invalidations on the root. As
such, we have a pre-traversal step to handle that part and determine whether
a full traversal is needed.
Source§fn element_needs_traversal(
el: E,
traversal_flags: TraversalFlags,
data: Option<&ElementData>,
) -> bool
fn element_needs_traversal( el: E, traversal_flags: TraversalFlags, data: Option<&ElementData>, ) -> bool
Returns true if traversal is needed for the given element and subtree.
Auto Trait Implementations§
impl<'a> Freeze for RecalcStyle<'a>
impl<'a> !RefUnwindSafe for RecalcStyle<'a>
impl<'a> Send for RecalcStyle<'a>
impl<'a> Sync for RecalcStyle<'a>
impl<'a> Unpin for RecalcStyle<'a>
impl<'a> UnsafeUnpin for RecalcStyle<'a>
impl<'a> !UnwindSafe for RecalcStyle<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert