Skip to main content

Module solver3

Module solver3 

Source
Expand description

CSS layout solver: block, inline, flex, grid, and table formatting. solver3/mod.rs

Next-generation CSS layout engine with proper formatting context separation

Re-exports§

pub use crate::font_traits::TextLayoutCache;

Modules§

cache
Handling Viewport Resizing and Layout Thrashing
calc
CSS calc() expression evaluator.
counters
CSS Counter Support
display_list
Generates a renderer-agnostic display list from a laid-out tree.
fc
Formatting context layout (block, inline, table, and flex/grid via Taffy)
geometry
Box model geometry types and writing-mode support for the layout solver.
getters
Centralized CSS property getters for the layout solver pipeline
layout_tree
Layout tree construction from a styled DOM, including anonymous box generation
paged_layout
CSS Paged Media layout integration with integrated fragmentation
pagination
CSS Paged Media Pagination Engine - “Infinite Canvas with Physical Spacers”
positioning
Final positioning of layout nodes (relative, absolute, and fixed schemes)
scrollbar
Scrollbar geometry computation — single source of truth for the layout solver.
sizing
Intrinsic and used size calculations for layout nodes
taffy_bridge
Bridge between Azul’s CSS style system and the Taffy layout engine.

Structs§

LayoutContext
Central context for a single layout pass.

Enums§

LayoutError

Constants§

POSITION_UNSET
Sentinel value for “position not yet computed”. No real position is ever f32::MIN.

Statics§

SKIP_DISPLAY_LIST
Main entry point for the incremental, cached layout engine.

Functions§

layout_document
new_position_vec
Create a new PositionVec pre-sized for the given number of nodes.
pos_contains
Check if position has been set for node index.
pos_get
Get position for node index, returning None if unset.
pos_set
Set position for node index. Grows the vec if needed.
set_skip_display_list
Set SKIP_DISPLAY_LIST. Provided as a function (rather than the caller touching the static directly) so the web backend’s dll-crate caller reaches it through a normal bl into this azul_layout function — keeping the static’s address computation intra-crate (direct adrp+add) instead of a cross-crate GOT load, which the AArch64→wasm lift mirrors more reliably.

Type Aliases§

NodeHashMap
A map of hashes for each node to detect changes in content like text.
PositionVec
Vec-based position storage indexed by layout-tree node index. Replaces BTreeMap<usize, LogicalPosition> for O(1) access and cache-friendly iteration.
Result