Skip to main content

layout_inline_formatting_context

Function layout_inline_formatting_context 

Source
pub fn layout_inline_formatting_context(
    ctx: &LayoutContext<'_>,
    parent: NodeId,
    containing_width: f32,
    fragments: &mut Vec<Fragment>,
    _float_ctx: &mut FloatContext,
) -> f32
Expand description

Layout an inline formatting context.

This function creates line boxes from inline-level children of the parent node, applying line breaking, text alignment, and vertical alignment.

§Arguments

  • ctx - The layout context with tree and text measurement
  • parent - The parent node establishing the inline formatting context
  • containing_width - The available width for lines
  • fragments - Output vector to append generated fragments
  • float_ctx - Float context for handling floated elements (currently unused)

§Returns

The total height consumed by all line boxes.