pub fn bubble_layout_dirty(applier: &mut dyn Applier, node_id: NodeId)Expand description
Unified API for bubbling layout dirty flags from a node to the root (Applier context).
This is the canonical function for dirty bubbling during the apply phase (structural changes). Call this after mutations like insert/remove/move that happen during apply.
§Behavior
- Marks the starting node as needing layout
- Walks up the parent chain, marking each ancestor
- Stops when it reaches a node that’s already dirty (O(1) optimization)
- Stops at the root (node with no parent)
§Performance
This function is O(height) in the worst case, but typically O(1) due to early exit when encountering an already-dirty ancestor.
§Usage
- Call from composer mutations (insert/remove/move) during apply phase
- Call from applier-level operations that modify the tree structure