struct PlacementState<'container> {
next_in_flow_margin_collapses_with_parent_start_margin: bool,
last_in_flow_margin_collapses_with_parent_end_margin: bool,
start_margin: CollapsedMargin,
current_margin: CollapsedMargin,
current_block_direction_position: Au,
inflow_baselines: Baselines,
is_inline_block_context: bool,
marker_block_size: Option<Au>,
containing_block: &'container ContainingBlock<'container>,
}Expand description
State that we maintain when placing blocks.
In parallel mode, this placement is done after all child blocks are laid out. In sequential mode, this is done right after each block is laid out.
Fields§
§next_in_flow_margin_collapses_with_parent_start_margin: bool§last_in_flow_margin_collapses_with_parent_end_margin: bool§start_margin: CollapsedMargin§current_margin: CollapsedMargin§current_block_direction_position: Au§inflow_baselines: Baselines§is_inline_block_context: bool§marker_block_size: Option<Au>If this PlacementState is laying out a list item with an outside marker. Record the
block size of that marker, because the content block size of the list item needs to be at
least as tall as the marker size – even though the marker doesn’t advance the block
position of the placement.
containing_block: &'container ContainingBlock<'container>The ContainingBlock of the container into which this PlacementState is laying out
fragments. This is used to convert between physical and logical geometry.
Implementations§
Source§impl<'container> PlacementState<'container>
impl<'container> PlacementState<'container>
fn new( collapsible_with_parent_start_margin: CollapsibleWithParentStartMargin, containing_block: &'container ContainingBlock<'container>, ) -> PlacementState<'container>
fn place_fragment_and_update_baseline( &mut self, fragment: &mut Fragment, sequential_layout_state: Option<&mut SequentialLayoutState>, )
Sourcefn place_fragment(
&mut self,
fragment: &mut Fragment,
sequential_layout_state: Option<&mut SequentialLayoutState>,
)
fn place_fragment( &mut self, fragment: &mut Fragment, sequential_layout_state: Option<&mut SequentialLayoutState>, )
fn finish(self) -> (Au, CollapsedBlockMargins, Baselines)
Auto Trait Implementations§
impl<'container> Freeze for PlacementState<'container>
impl<'container> !RefUnwindSafe for PlacementState<'container>
impl<'container> Send for PlacementState<'container>
impl<'container> Sync for PlacementState<'container>
impl<'container> Unpin for PlacementState<'container>
impl<'container> !UnwindSafe for PlacementState<'container>
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