pub(crate) struct IndependentFormattingContext {
pub base: LayoutBoxBase,
pub contents: IndependentFormattingContextContents,
}
Expand description
Fields§
§base: LayoutBoxBase
§contents: IndependentFormattingContextContents
Implementations§
source§impl IndependentFormattingContext
impl IndependentFormattingContext
fn layout_into_line_items( &self, layout: &mut InlineFormattingContextLayout<'_>, offset_in_text: usize, bidi_level: Level, )
sourcefn pick_baseline(&self, baselines: &Baselines) -> Option<Au>
fn pick_baseline(&self, baselines: &Baselines) -> Option<Au>
Picks either the first or the last baseline, depending on baseline-source
.
TODO: clarify that this is not to be used for box alignment in flex/grid
https://drafts.csswg.org/css-inline/#baseline-source
fn get_block_sizes_and_baseline_offset( &self, ifc: &InlineFormattingContextLayout<'_>, block_size: Au, baseline_offset_in_content_area: Au, ) -> (LineBlockSizes, Au)
source§impl IndependentFormattingContext
impl IndependentFormattingContext
pub(crate) fn layout_in_flow_block_level( &self, layout_context: &LayoutContext<'_>, positioning_context: &mut PositioningContext, containing_block: &ContainingBlock<'_>, sequential_layout_state: Option<&mut SequentialLayoutState>, ) -> BoxFragment
pub(crate) fn layout_float_or_atomic_inline( &self, layout_context: &LayoutContext<'_>, child_positioning_context: &mut PositioningContext, containing_block: &ContainingBlock<'_>, ) -> IndependentLayoutResult
source§impl IndependentFormattingContext
impl IndependentFormattingContext
pub fn construct<'dom, Node: NodeExt<'dom>>( context: &LayoutContext<'_>, node_and_style_info: &NodeAndStyleInfo<Node>, display_inside: DisplayInside, contents: Contents, propagated_text_decoration_line: TextDecorationLine, ) -> Self
pub fn is_replaced(&self) -> bool
pub fn style(&self) -> &Arc<ComputedValues>
pub fn base_fragment_info(&self) -> BaseFragmentInfo
pub(crate) fn inline_content_sizes( &self, layout_context: &LayoutContext<'_>, constraint_space: &ConstraintSpace, ) -> InlineContentSizesResult
pub(crate) fn outer_inline_content_sizes( &self, layout_context: &LayoutContext<'_>, containing_block: &IndefiniteContainingBlock, auto_minimum: &LogicalVec2<Au>, auto_block_size_stretches_to_containing_block: bool, ) -> InlineContentSizesResult
pub(crate) fn preferred_aspect_ratio( &self, padding_border_sums: &LogicalVec2<Au>, ) -> Option<AspectRatio>
Trait Implementations§
source§impl Debug for IndependentFormattingContext
impl Debug for IndependentFormattingContext
Auto Trait Implementations§
impl !Freeze for IndependentFormattingContext
impl !RefUnwindSafe for IndependentFormattingContext
impl Send for IndependentFormattingContext
impl Sync for IndependentFormattingContext
impl Unpin for IndependentFormattingContext
impl !UnwindSafe for IndependentFormattingContext
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