pub(crate) struct LayoutRootLayoutInputs {
fully_adjusted_static_position_rect: LogicalRect<Au>,
resolved_alignment: LogicalVec2<AlignFlags>,
containing_block_size: LogicalVec2<Au>,
containing_block_style: Arc<ComputedValues>,
original_parent_writing_mode: WritingMode,
}Expand description
These are the recorded layout inputs that were used when laying out an absolutely-positioned element. They can be re-used when the absolutely-positioned element is a viable layout root (no escaping fixed position elements, currently). The information here is enough to re-run layout for an absolute.
Fields§
§fully_adjusted_static_position_rect: LogicalRect<Au>The fully adjusted static position rectangle used to lay out the absolute. This is adjusted by the containing blocks of all of the boxes that come between an absolute’s tree position and its layout containing block.
resolved_alignment: LogicalVec2<AlignFlags>The resolved alignment to use when laying out the absolute. This comes from the original box.
containing_block_size: LogicalVec2<Au>This is the containing block size of the absolute’s containing block. This is stored here because it’s easier to access than the parent box.
containing_block_style: Arc<ComputedValues>This is the style of the containing block. This is stored here because it’s easier to access than the parent box.
original_parent_writing_mode: WritingModeThis is the writing mode of the absolute’s tree parent.
Implementations§
Source§impl LayoutRootLayoutInputs
impl LayoutRootLayoutInputs
Sourcepub(crate) fn layout(
&self,
layout_context: &LayoutContext<'_>,
context: &IndependentFormattingContext,
shared_fragment: &ArcRefCell<HoistedSharedFragment>,
) -> Result<(), ()>
pub(crate) fn layout( &self, layout_context: &LayoutContext<'_>, context: &IndependentFormattingContext, shared_fragment: &ArcRefCell<HoistedSharedFragment>, ) -> Result<(), ()>
Re-run layout for the given inputs. This is used to run layout again at layout roots.
Trait Implementations§
Source§impl Debug for LayoutRootLayoutInputs
impl Debug for LayoutRootLayoutInputs
Source§impl MallocSizeOf for LayoutRootLayoutInputs
impl MallocSizeOf for LayoutRootLayoutInputs
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl Freeze for LayoutRootLayoutInputs
impl !RefUnwindSafe for LayoutRootLayoutInputs
impl Send for LayoutRootLayoutInputs
impl Sync for LayoutRootLayoutInputs
impl Unpin for LayoutRootLayoutInputs
impl UnsafeUnpin for LayoutRootLayoutInputs
impl !UnwindSafe for LayoutRootLayoutInputs
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