Skip to main content

Module tree

Module tree 

Source
Expand description

Layout tree node definition and top-level formatting context dispatcher.

Structs§

ImageResource
An encoded raster image carried on a layout node.
IntrinsicCacheCell
Lock-free, 2-slot persistent intrinsic crate::intrinsic::MinMaxSizes cache stored inline on every LayoutNode.
LayoutCacheEntry
Compact layout result cache for O(1) subtree re-entry during multi-pass formatting.
LayoutDepthGuard
Lightweight Copy-context passed through layout formatting contexts to track recursion budget.
LayoutNode
A node participating in the layout tree.
MeasureCacheEntry
Cached flexbox/grid measurement probe result ((available_w, available_h, style_pin_hash) -> (result_w, result_h, baseline_offset)), allowing clean subtrees to skip Pass-1 / Pass-2 measurement traversals in O(1) without disturbing their final Pass-4 child geometry.
PortalAnchorSpec
Configuration attaching a top-layer portal or CSS anchor-positioned box to a trigger element.
SvgItem
An individual SVG vector or text item within a layout node.
SvgTextData
An SVG <text> or <tspan> text span positioned within an <svg> coordinate system.
ViewportSceneHandle
Thread-safe type-erased handle to an embedded 3D scene (Arc<Scene3D>) carried on a layout node so the 2D CSS compositor can emit DrawViewport3D at the exact stacking-context paint order.

Enums§

AnchorPlacement
Placement of an anchored top-layer portal or floating element relative to its anchor box.
FillRule
SVG fill rule.
StrokeLineCap
SVG stroke line cap.
StrokeLineJoin
SVG stroke line join.

Constants§

MAX_LAYOUT_DEPTH
Maximum allowable call-stack recursion depth for layout tree formatting. Bounded to 512 frames to guarantee that total call-stack consumption stays safely bounded within default OS and test-runner stack budgets (2 MB) across all platforms and unoptimized debug builds while supporting deep enterprise DOM trees.
SUBTREE_HAS_HEIGHT_DEP_DESCENDANT
Cached summary bit indicating whether any descendant (up to an explicit pixel-height boundary) depends on parent height (has_height_dependent_descendant).
SUBTREE_HAS_HOISTED
SUBTREE_HAS_TOP_LAYER
Subtree hit-testing bitflags stored on LayoutNode::subtree_hit_flags.
SUBTREE_HAS_TRANSFORM
SUBTREE_META_VALID

Functions§

clear_layout_overflow
Clears any recorded layout depth overflow.
last_layout_overflow
Returns the last recorded layout depth overflow as (depth, max_depth), if any.
record_layout_overflow
Records a layout depth overflow occurrence, updates diagnostics, and fires the registered callback.
set_on_layout_overflow
Registers an event callback triggered when layout depth exceeds MAX_LAYOUT_DEPTH.
solve_anchored_position
Computes the viewport-aware anchored (x, y, resolved_placement) for a floating/top-layer element, performing automatic primary-axis collision flipping (bottom-end <-> top-end, left <-> right) and cross-axis viewport shift clamping.