pub(crate) struct FlexItemBox {
independent_formatting_context: IndependentFormattingContext,
}
Fields§
§independent_formatting_context: IndependentFormattingContext
Implementations§
Source§impl FlexItemBox
impl FlexItemBox
fn to_flex_item<'a>( &self, layout_context: &LayoutContext<'_>, containing_block: &IndefiniteContainingBlock, content_box_sizes_and_pbm: &ContentBoxSizesAndPBM, config: &FlexContainerConfig, flex_context_getter: &impl Fn() -> &'a FlexContext<'a>, ) -> FlexItem<'_>
fn main_content_size_info<'a>( &self, layout_context: &LayoutContext<'_>, containing_block: &IndefiniteContainingBlock, 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 flex_basis(
&self,
container_definite_main_size: Option<Au>,
main_preferred_size: Size<Au>,
main_padding_border_sum: Au,
) -> Size<Au>
fn flex_basis( &self, container_definite_main_size: Option<Au>, main_preferred_size: Size<Au>, main_padding_border_sum: Au, ) -> Size<Au>
https://drafts.csswg.org/css-flexbox-1/#flex-basis-property
Returns the used value of the flex-basis
property, after resolving percentages,
resolving auto
, and taking box-sizing
into account.
Note that a return value of Size::Initial
represents flex-basis: content
,
not flex-basis: auto
, since the latter always resolves to something else.
fn layout_for_block_content_size( &self, flex_context: &FlexContext<'_>, pbm_auto_is_zero: &FlexRelativeVec2<Au>, content_box_sizes: &LogicalVec2<Sizes>, preferred_aspect_ratio: Option<AspectRatio>, automatic_inline_size: Size<Au>, intrinsic_sizing_mode: IntrinsicSizingMode, ) -> Au
fn inline_content_sizes( &self, flex_context: &FlexContext<'_>, block_size: SizeConstraint, preferred_aspect_ratio: Option<AspectRatio>, ) -> ContentSizes
Source§impl FlexItemBox
impl FlexItemBox
fn new(independent_formatting_context: IndependentFormattingContext) -> Self
fn style(&self) -> &ServoArc<ComputedValues>
fn base_fragment_info(&self) -> BaseFragmentInfo
Trait Implementations§
Source§impl Debug for FlexItemBox
impl Debug for FlexItemBox
Source§impl MallocSizeOf for FlexItemBox
impl MallocSizeOf for FlexItemBox
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
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> 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