pub struct DomFingerprints {
pub structure: Vec<u64>,
pub style: Vec<u64>,
pub structure_root: u64,
pub style_root: u64,
}Expand description
Two-tier fingerprints of a recursive crate::dom::Dom.
Computed BEFORE the cascade, in the same pre-order the flattener
(convert_dom_into_compact_dom) assigns NodeIds — index i in each Vec
is flattened NodeId(i).
WHY TWO TIERS (user directive 2026-08-08): “the start should just scan
over the NodeHierarchy to discover anything that changed, which is
iterating over a minimal array” — and css must be EXCLUDED from that
first equivalence, because a stylesheet can only affect the subtree it
is attached to:
- 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 is reusable wholesale (skipcreate_from_domentirely). - 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 affected subtree(s) only.
The per-node arrays exist so a mismatch NAMES the changed nodes (the eventual dirty-set for scoped re-cascade / word-granular text relayout); the root folds make the equal case one u64 compare per tier.
Fields§
§structure: Vec<u64>Per-node structural hash, pre-order. Folds: node_type content
(image-callback nodes hash (fn ptr, RefAny type_id) — the RefAny
INSTANCE is rebuilt every frame by design and is transferred, not
compared; mirrors is_layout_equivalent), ids+classes, callback
event types, contenteditable/flags/dataset, and child COUNT (pre-order
alone cannot distinguish [a [b] c] from [a [b c]]).
style: Vec<u64>Per-node style hash, pre-order: inline css properties + conditions,
plus the node’s attached .with_css() sheets (path, declarations,
@-conditions, priority per rule).
structure_root: u64Order-sensitive fold of structure.
style_root: u64Order-sensitive fold of style.
Trait Implementations§
Source§impl Clone for DomFingerprints
impl Clone for DomFingerprints
Source§fn clone(&self) -> DomFingerprints
fn clone(&self) -> DomFingerprints
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more