pub fn compute_counters(
styled_dom: &StyledDom,
tree: &LayoutTree,
counters: &mut BTreeMap<(usize, String), i32>,
)Expand description
Computes CSS counter values for all nodes in the layout tree.
This function traverses the tree in document order and processes counter-reset and counter-increment properties. The computed values are stored in cache.counters.
CSS counters work with a stack-based scoping model:
counter-resetcreates a new scope and sets the counter to a valuecounter-incrementincrements the counter in the current scope- When leaving a subtree, counter scopes are popped