Skip to main content

Module node_data

Module node_data 

Source
Expand description

Per-node layout data — stored in Document’s parallel storage.

The DOM IS the layout tree. Each node stores its own Taffy style, cache, and layout results. No separate LayoutTree needed.

Chrome equivalent: LayoutObject’s per-node layout state, but stored as a parallel column rather than a separate tree.

§Lifecycle

  • Created in Document::alloc_node() with defaults.
  • Style synced from ComputedValuestaffy::Style after restyle.
  • Cache cleared on style/content changes, propagated to ancestors.
  • Cleared in Document::destroy_node().

Structs§

LayoutNodeData
Per-node layout data stored directly on the DOM node.