Struct layout_2020::flexbox::FlexItemBox
source · pub(crate) struct FlexItemBox {
independent_formatting_context: IndependentFormattingContext,
block_content_size_cache: ArcRefCell<Option<CachedBlockSizeContribution>>,
}
Fields§
§independent_formatting_context: IndependentFormattingContext
§block_content_size_cache: ArcRefCell<Option<CachedBlockSizeContribution>>
Implementations§
source§impl FlexItemBox
impl FlexItemBox
fn main_content_size_info<'a>( &self, layout_context: &LayoutContext<'_>, containing_block: &IndefiniteContainingBlock, container_is_horizontal: bool, config: &FlexContainerConfig, flex_context_getter: &impl Fn() -> &'a FlexContext<'a>, ) -> FlexItemBoxInlineContentSizesInfo
fn desired_flex_factors_for_preferred_width( &self, preferred_width: Au, flex_base_size: Au, outer_flex_base_size: Au, ) -> DesiredFlexFractionAndGrowOrShrinkFactor
sourcefn automatic_min_size(
&self,
layout_context: &LayoutContext<'_>,
containing_block: &IndefiniteContainingBlock,
cross_axis_is_item_block_axis: bool,
content_box_size: FlexRelativeVec2<AuOrAuto>,
min_size: FlexRelativeVec2<GenericLengthPercentageOrAuto<Au>>,
max_size: FlexRelativeVec2<Option<Au>>,
pbm_auto_is_zero: &FlexRelativeVec2<Au>,
auto_cross_size_stretches_to_container_size: bool,
block_content_size_callback: impl FnOnce(&FlexItemBox) -> Au,
) -> Au
fn automatic_min_size( &self, layout_context: &LayoutContext<'_>, containing_block: &IndefiniteContainingBlock, cross_axis_is_item_block_axis: bool, content_box_size: FlexRelativeVec2<AuOrAuto>, min_size: FlexRelativeVec2<GenericLengthPercentageOrAuto<Au>>, max_size: FlexRelativeVec2<Option<Au>>, pbm_auto_is_zero: &FlexRelativeVec2<Au>, auto_cross_size_stretches_to_container_size: bool, block_content_size_callback: impl FnOnce(&FlexItemBox) -> Au, ) -> Au
This is an implementation of https://drafts.csswg.org/css-flexbox/#min-size-auto.
sourcefn flex_base_size(
&self,
layout_context: &LayoutContext<'_>,
containing_block: &IndefiniteContainingBlock,
container_definite_inner_size: FlexRelativeVec2<Option<Au>>,
cross_axis_is_item_block_axis: bool,
content_box_size: FlexRelativeVec2<AuOrAuto>,
content_min_box_size: FlexRelativeVec2<Au>,
content_max_box_size: FlexRelativeVec2<Option<Au>>,
padding_border_sums: FlexRelativeVec2<Au>,
pbm_auto_is_zero: &FlexRelativeVec2<Au>,
item_with_auto_cross_size_stretches_to_container_size: bool,
block_content_size_callback: impl FnOnce(&FlexItemBox) -> Au,
) -> (Au, bool)
fn flex_base_size( &self, layout_context: &LayoutContext<'_>, containing_block: &IndefiniteContainingBlock, container_definite_inner_size: FlexRelativeVec2<Option<Au>>, cross_axis_is_item_block_axis: bool, content_box_size: FlexRelativeVec2<AuOrAuto>, content_min_box_size: FlexRelativeVec2<Au>, content_max_box_size: FlexRelativeVec2<Option<Au>>, padding_border_sums: FlexRelativeVec2<Au>, pbm_auto_is_zero: &FlexRelativeVec2<Au>, item_with_auto_cross_size_stretches_to_container_size: bool, block_content_size_callback: impl FnOnce(&FlexItemBox) -> Au, ) -> (Au, bool)
fn layout_for_block_content_size( &self, flex_context: &FlexContext<'_>, padding_border_margin: &PaddingBorderMargin, content_box_size: LogicalVec2<AuOrAuto>, min_size: LogicalVec2<Au>, max_size: LogicalVec2<Option<Au>>, item_with_auto_cross_size_stretches_to_container_size: bool, intrinsic_sizing_mode: IntrinsicSizingMode, ) -> Au
source§impl FlexItemBox
impl FlexItemBox
fn style(&self) -> &ServoArc<ComputedValues>
fn base_fragment_info(&self) -> BaseFragmentInfo
Trait Implementations§
source§impl Debug for FlexItemBox
impl Debug for FlexItemBox
Auto Trait Implementations§
impl !Freeze for FlexItemBox
impl !RefUnwindSafe for FlexItemBox
impl Send for FlexItemBox
impl Sync for FlexItemBox
impl Unpin for FlexItemBox
impl !UnwindSafe for FlexItemBox
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