Struct layout_2020::flow::inline::ContentSizesComputation
source · struct ContentSizesComputation<'layout_data> {
layout_context: &'layout_data LayoutContext<'layout_data>,
constraint_space: &'layout_data ConstraintSpace,
paragraph: ContentSizes,
current_line: ContentSizes,
pending_whitespace: ContentSizes,
had_content_yet_for_min_content: bool,
had_content_yet_for_max_content: bool,
ending_inline_pbm_stack: Vec<Au>,
depends_on_block_constraints: bool,
}
Expand description
A struct which takes care of computing ContentSizes
for an InlineFormattingContext
.
Fields§
§layout_context: &'layout_data LayoutContext<'layout_data>
§constraint_space: &'layout_data ConstraintSpace
§paragraph: ContentSizes
§current_line: ContentSizes
§pending_whitespace: ContentSizes
Size for whitespace pending to be added to this line.
had_content_yet_for_min_content: bool
Whether or not the current line has seen any content (excluding collapsed whitespace), when sizing under a min-content constraint.
had_content_yet_for_max_content: bool
Whether or not the current line has seen any content (excluding collapsed whitespace), when sizing under a max-content constraint.
ending_inline_pbm_stack: Vec<Au>
Stack of ending padding, margin, and border to add to the length when an inline box finishes.
depends_on_block_constraints: bool
Implementations§
source§impl<'layout_data> ContentSizesComputation<'layout_data>
impl<'layout_data> ContentSizesComputation<'layout_data>
fn traverse( self, inline_formatting_context: &InlineFormattingContext, ) -> InlineContentSizesResult
fn process_item( &mut self, inline_item: &InlineItem, inline_formatting_context: &InlineFormattingContext, )
fn add_inline_size(&mut self, l: Au)
fn line_break_opportunity(&mut self)
fn forced_line_break(&mut self)
fn commit_pending_whitespace(&mut self)
sourcefn compute(
inline_formatting_context: &InlineFormattingContext,
layout_context: &'layout_data LayoutContext<'_>,
constraint_space: &'layout_data ConstraintSpace,
) -> InlineContentSizesResult
fn compute( inline_formatting_context: &InlineFormattingContext, layout_context: &'layout_data LayoutContext<'_>, constraint_space: &'layout_data ConstraintSpace, ) -> InlineContentSizesResult
Compute the ContentSizes
of the given InlineFormattingContext
.
Auto Trait Implementations§
impl<'layout_data> Freeze for ContentSizesComputation<'layout_data>
impl<'layout_data> !RefUnwindSafe for ContentSizesComputation<'layout_data>
impl<'layout_data> Send for ContentSizesComputation<'layout_data>
impl<'layout_data> Sync for ContentSizesComputation<'layout_data>
impl<'layout_data> Unpin for ContentSizesComputation<'layout_data>
impl<'layout_data> !UnwindSafe for ContentSizesComputation<'layout_data>
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