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§
- Layout
Context - Central context for a single layout pass.
Enums§
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’sdll-crate caller reaches it through a normalblinto thisazul_layoutfunction — keeping the static’s address computation intra-crate (directadrp+add) instead of a cross-crate GOT load, which the AArch64→wasm lift mirrors more reliably.
Type Aliases§
- Node
Hash Map - A map of hashes for each node to detect changes in content like text.
- Position
Vec - Vec-based position storage indexed by layout-tree node index.
Replaces
BTreeMap<usize, LogicalPosition>for O(1) access and cache-friendly iteration. - Result