#[allow(clippy::too_many_lines)] // large but cohesive: single-purpose parser/builder/dispatch (one branch per input variant)
fn compute_subtree_hashes(node_data: &[NodeData], hierarchy: &[NodeHierarchyItem]) -> Vec<u64> {
/// 2. **Content hash** — exact match including content; catches pure reorders of anonymous nodes.
/// 3. **Structural hash** — matches node type + attrs ignoring text content; for text-edit cases.
/// * `old_hierarchy` / `new_hierarchy` - Parent/sibling pointers. Pass `&[]` if unavailable; the
#[allow(clippy::needless_pass_by_value)] // owned azul value taken by value (public API / ownership-transfer convention)
#[allow(clippy::too_many_lines, clippy::cognitive_complexity)] // large but cohesive: single-purpose parser/builder/dispatch (one branch per input variant)
fn pop_first_unconsumed(queue: &mut VecDeque<NodeId>, consumed: &[bool]) -> Option<NodeId> {
fn repoint_orphaned_refanys(node_data: &mut [NodeData], orphan_alloc: usize, merged: &RefAny) {
let mut hasher = crate::hash::DefaultHasher::new(); // Different seed for structural keys
pub fn reconcile_cursor_position(old_text: &str, new_text: &str, old_cursor_byte: usize) -> usize {
self.per_node.is_empty() && self.mounted_nodes.is_empty() && self.unmounted_nodes.is_empty()
/// - **Tier 2** (`compute_node_changes`): O(n) per changed field, does field-by-field comparison
/// - **structure**: hierarchy shape + node content (`node_type`, ids/classes, attributes, callback
/// EVENT types). NO css of any kind. If this tier is equal, the old tree, its shaped text and its
/// intrinsic caches are all reusable — and if the style tier is ALSO equal, the previous CASCADE
/// - **style**: per-node inline css + (at subtree roots that carry `.with_css()` sheets) the sheet
/// content. A difference here with an equal structure tier means: keep the tree, re-cascade the
#[allow(clippy::too_many_lines)] // cohesive single-pass walker; splitting adds state-threading
fn walk(dom: &crate::dom::Dom, fp: &mut DomFingerprints, transfers: &mut PreCascadeTransfers) {