core::cell::RefCell<std::collections::HashMap<NodeId, crate::solver3::getters::ComputedScrollbarStyle>>,
// [az-diag g51 REVERT] 0x71 = reconcile_and_invalidate returned OK (no InvalidTree in reconcile).
// reconcile is fine and the tree gets emptied/mis-lifted downstream (check 0x40744 at the loop).
// [az-diag g51 REVERT] 0x80 = reached the incremental layout loop (past early-exit + remap + dirty loops).
// [az-diag g65 PATH-B VALIDATION] new_tree is still valid here (=2). Clone it into the HEAP-backed
// cache.tree (set AFTER the remap+early-exit which read the OLD cache.tree). cache is the stable
// &mut arg (read correctly throughout), so cache.tree is NOT a deep-SP-relative stack local. At the
// sizing call we read BOTH: stack new_tree (expect 0=corrupted) vs heap cache.tree (expect 2 if
// path B sidesteps the SP-drift/wild-store). If heap=2, the full cache.tree refactor will fix it.
// Vec::clone MIS-LIFTS (drops a node) → the full MOVE-based cache.tree refactor avoids it (do it).
crate::az_mark((0x607C4) as u32, (cache.tree.as_ref().map(|t| t.nodes.len()).unwrap_or(999) as u32) as u32);
debug_warning!(ctx, "Scrollbar reflow loop hit limit of {} iterations, breaking to avoid infinite loop", MAX_SCROLLBAR_REFLOW_ITERATIONS);
// [az-diag g70 RELIABLE free-band] 0x60780 = nodes.len AFTER the in-loop calculated_positions.clone().
// [az-diag g70 RELIABLE free-band] 0x60784 = nodes.len AFTER reset_peak (before the calc Span).
// to a bare `brk #0x1` right after the 0x90 marker — aborting BEFORE calculate_intrinsic_sizes.
crate::az_mark((0x6074C) as u32, (cache.tree.as_ref().map(|t| t.nodes.len()).unwrap_or(999) as u32) as u32);
// +spec:positioning:a831e8 - inline content width uses pre-relative-offset positions (satisfied by post-layout relative adjustment)
// +spec:positioning:e2647b - Relative positioning applied after line height calculation, so line height is not adjusted for relative offsets
// +spec:positioning:77a2d2 - Relatively positioned boxes considered without their offset during auto height
// +spec:positioning:b47ac2 - Relatively positioned boxes considered without their offset for block auto height
// Relative offsets applied AFTER layout, so auto-height calculation sees normal-flow positions.
cache.previous_positions = std::mem::replace(&mut cache.calculated_positions, calculated_positions);
// +spec:containing-block:159830 - Containing block chain: parent content-box for in-flow, viewport for initial containing block
// +spec:containing-block:22fbaa - computes the element's original containing block (before positioning effects)
// +spec:containing-block:238fc5 - containing block dimensions calculated here (CSS 2.2 §9.1.2 forward ref to §10)
// +spec:containing-block:263629 - block element's content-box establishes the containing block for its line boxes
// +spec:containing-block:2a5280 - boxes act as containing blocks for descendants; CB = parent's content box
// +spec:containing-block:6776cb - boxes positioned w.r.t. containing block but not confined; overflow allowed
// +spec:containing-block:718894 - CB derived from parent content-box edges; root uses initial CB (viewport)
// +spec:containing-block:a2aa37 - box edges act as containing block for descendants; initial containing block = viewport
// +spec:containing-block:e23b3f - CSS 2.2 §10.1: initial containing block = viewport; static/relative = parent content-box; fixed = viewport
// +spec:positioning:acc663 - containing block definition: element boxes positioned relative to containing block
// +spec:containing-block:c205e5 - writing mode of containing block used for inner_size (orthogonal flow awareness)
// +spec:containing-block:1eed60 - Initial containing block establishes a BFC; viewport is the ICB
// +spec:containing-block:99866f - Containing block is a rectangle for sizing/positioning; ICB from viewport
// +spec:containing-block:22f09b - viewport serves as initial containing block for root element
// Root element's containing block is the initial containing block (CSS 2.2 §10.1, CSS Display 3 §2.8).
// +spec:containing-block:2fd7b1 - ICB equals viewport; principal writing mode propagated to ICB
// Root element's containing block is the initial containing block (CSS 2.2 §10.1, CSS Display 3 §2.8).
// The principal writing mode is propagated to the ICB and viewport (css-writing-modes-4 §8.1).
// +spec:containing-block:5efb84 - Root element's containing block is the initial containing block
// +spec:containing-block:6278fb - initial containing block is the viewport; also serves as initial fixed containing block
// Root element's containing block is the initial containing block (CSS 2.2 §10.1, CSS Display 3 §2.8).
// [g119 az-web-lift FIX] `#[repr(C, u8)]` (was repr(Rust)): the `Text(font_traits::LayoutError)`
// variant's String/FontSelector pointer gives `Result<T, LayoutError>` a POINTER-niche disc, which
// the web lift MIS-READS → every solver3 `?`/Result return flips Ok→Err (heisenbug; g118 = collect's
// Result<(),LayoutError> arrived as Err → rc=5 InvalidTree though the out-param content was correct).
// An explicit u8 tag (0..=4) moves the Result niche to unused tag values (5..) = a simple u8 compare
// the lift handles. Same disc-mis-lift class as InlineContent/LogicalItem/ShapedItem (g117/g118).