Expand description
Layout builder
Converts DOM + resolved CSS into layout and render-info trees.
Responsibilities:
- Style inheritance and cascade
- Text measurement
- Incremental (diff-based) update of layout/info trees
Out of scope:
- Rendering
- Draw command generation
- GPU / platform concerns
Re-exports§
pub use dom_snapshot::DomSnapshot;pub use dom_snapshot::NodeId;pub use dom_snapshot::SnapNode;pub use processor::LayoutProcessor;pub use processor::LayoutResult;pub use processor::LayoutTask;
Modules§
- css_
resolver - A CSS resolver that handles selector matching and value resolution.
- dom_
snapshot - Owned, thread-safe snapshot of the DOM.
- processor
- A processor that runs the layout builder on a background thread.
- style_
inspect - Read-only CSS cascade inspection for the DevTools Styles panel.
- text_
layouter - types
- Layout tree node types. Styles, text, and container definitions.
Structs§
- Inherited
Css - Inherited values from parent, passed down through the tree.
Functions§
- align_
table_ columns - build_
layout_ and_ info - build_
layout_ and_ info_ from_ snapshot - Builds layout and render trees from a
DomSnapshot. - build_
layout_ and_ info_ with_ images - Builds layout and render trees with decoded images keyed by their
srcvalue. - constrain_
auto_ grid_ track_ items - Bug fix:
grid-template-columns,width - correct_
atomic_ inline_ spacing - Bug fix:
display,margin-left,margin-right - correct_
atomic_ inline_ spacing_ with_ info - Like
correct_atomic_inline_spacing, but accepts anInfoNodeso that per-childtext-aligninformation is available during correction. - normalize_
whitespace - refresh_
missing_ text_ layout_ results - Supplement: custom flex item
layoutmethod