pub struct RecalcStyleAndConstructFlows<'a> {
context: LayoutContext<'a>,
}
Fields§
§context: LayoutContext<'a>
Implementations§
source§impl<'a> RecalcStyleAndConstructFlows<'a>
impl<'a> RecalcStyleAndConstructFlows<'a>
sourcepub fn new(context: LayoutContext<'a>) -> Self
pub fn new(context: LayoutContext<'a>) -> Self
Creates a traversal context, taking ownership of the shared layout context.
pub fn context(&self) -> &LayoutContext<'a>
sourcepub fn destroy(self) -> LayoutContext<'a>
pub fn destroy(self) -> LayoutContext<'a>
Consumes this traversal context, returning ownership of the shared layout context to the caller.
Trait Implementations§
source§impl<'a, 'dom, E> DomTraversal<E> for RecalcStyleAndConstructFlows<'a>
impl<'a, 'dom, E> DomTraversal<E> for RecalcStyleAndConstructFlows<'a>
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 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 moresource§fn text_node_needs_traversal(
node: E::ConcreteNode,
parent_data: &ElementData,
) -> bool
fn text_node_needs_traversal( node: E::ConcreteNode, parent_data: &ElementData, ) -> bool
Returns true if traversal should visit a text node. The style system
never processes text nodes, but Servo overrides this to visit them for
flow construction when necessary.
Return the shared style context common to all worker threads.
source§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 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 RecalcStyleAndConstructFlows<'a>
impl<'a> !RefUnwindSafe for RecalcStyleAndConstructFlows<'a>
impl<'a> Send for RecalcStyleAndConstructFlows<'a>
impl<'a> Sync for RecalcStyleAndConstructFlows<'a>
impl<'a> Unpin for RecalcStyleAndConstructFlows<'a>
impl<'a> !UnwindSafe for RecalcStyleAndConstructFlows<'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> 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