diff --git a/packages/blitz-dom/src/node.rs b/packages/blitz-dom/src/node.rs index d05a3aa3..973b3179 100644 --- a/packages/blitz-dom/src/node.rs +++ b/packages/blitz-dom/src/node.rs @@ -81,6 +81,7 @@ pub struct Node { pub is_hovered: bool, pub has_snapshot: bool, pub snapshot_handled: AtomicBool, + pub has_dirty_descendents: AtomicBool, pub display_outer: DisplayOuter, pub cache: Cache, pub unrounded_layout: Layout, @@ -119,6 +120,7 @@ impl Node { is_hovered: false, has_snapshot: false, snapshot_handled: AtomicBool::new(false), + has_dirty_descendents: AtomicBool::new(false), display_outer: DisplayOuter::Block, cache: Cache::new(), unrounded_layout: Layout::new(), diff --git a/packages/blitz-dom/src/stylo.rs b/packages/blitz-dom/src/stylo.rs index f71c9d92..791957ea 100644 --- a/packages/blitz-dom/src/stylo.rs +++ b/packages/blitz-dom/src/stylo.rs @@ -699,7 +699,14 @@ impl<'a> TElement for BlitzNode<'a> { } fn has_dirty_descendants(&self) -> bool { - true + self.has_dirty_descendents.load(Ordering::SeqCst) + } + unsafe fn set_dirty_descendants(&self) { + self.has_dirty_descendents.store(true, Ordering::SeqCst) + } + + unsafe fn unset_dirty_descendants(&self) { + self.has_dirty_descendents.store(false, Ordering::SeqCst) } fn has_snapshot(&self) -> bool { @@ -714,10 +721,6 @@ impl<'a> TElement for BlitzNode<'a> { self.snapshot_handled.store(true, Ordering::SeqCst); } - unsafe fn set_dirty_descendants(&self) {} - - unsafe fn unset_dirty_descendants(&self) {} - fn store_children_to_process(&self, _n: isize) { unimplemented!() }