pub(crate) enum ContainingBlockCalculation<'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§
Source§impl ContainingBlockCalculation<'_>
impl ContainingBlockCalculation<'_>
Trait Implementations§
Source§impl<'a> From<&'a LayoutThread> for ContainingBlockCalculation<'a>
impl<'a> From<&'a LayoutThread> for ContainingBlockCalculation<'a>
Source§fn from(layout_thread: &'a LayoutThread) -> Self
fn from(layout_thread: &'a LayoutThread) -> Self
Auto Trait Implementations§
impl<'a> Freeze for ContainingBlockCalculation<'a>
impl<'a> !RefUnwindSafe for ContainingBlockCalculation<'a>
impl<'a> !Send for ContainingBlockCalculation<'a>
impl<'a> !Sync for ContainingBlockCalculation<'a>
impl<'a> Unpin for ContainingBlockCalculation<'a>
impl<'a> UnsafeUnpin for ContainingBlockCalculation<'a>
impl<'a> !UnwindSafe for ContainingBlockCalculation<'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
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>
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