Skip to main content

Module layouter

Module layouter 

Source
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§

InheritedCss
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 src value.
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 an InfoNode so that per-child text-align information is available during correction.
normalize_whitespace
refresh_missing_text_layout_results
Supplement: custom flex item layout method