pub(crate) enum CumulativeContentRectCalculation<'a> {
Lazy {
layout_thread: &'a LayoutThread,
},
AlreadyDoneWithStackingContextTree,
}Expand description
A token which ensures the calculation and assignment of cumulative containing blocks to fragments in the fragment tree. This is used because these cumulative containing block offsets are set during stacking context tree construction, but some queries might need them beforehand. If the query is executed before stacking context tree construction, a quick traversal is performed to calculate them for the purpose of the query.
Variants§
Lazy
This token variant is for the purpose of a layout query. In this case, if stacking context tree construction has not yet taken place, a cumulative containing block calculation traversal will be performed.
Fields
layout_thread: &'a LayoutThreadAlreadyDoneWithStackingContextTree
This token variant is used when the code can guarantee that stacking context tree construction has already taken place.
Note: Using this before stacking context tree construction can lead to incorrect layout or layout query results!
Implementations§
Trait Implementations§
Source§impl<'a> From<&'a LayoutThread> for CumulativeContentRectCalculation<'a>
impl<'a> From<&'a LayoutThread> for CumulativeContentRectCalculation<'a>
Source§fn from(layout_thread: &'a LayoutThread) -> Self
fn from(layout_thread: &'a LayoutThread) -> Self
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CumulativeContentRectCalculation<'a>
impl<'a> !Send for CumulativeContentRectCalculation<'a>
impl<'a> !Sync for CumulativeContentRectCalculation<'a>
impl<'a> !UnwindSafe for CumulativeContentRectCalculation<'a>
impl<'a> Freeze for CumulativeContentRectCalculation<'a>
impl<'a> Unpin for CumulativeContentRectCalculation<'a>
impl<'a> UnsafeUnpin for CumulativeContentRectCalculation<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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