diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index acc1daca80b..f9389fc1ecd 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1114,6 +1114,14 @@ impl LayoutThread { if node.needs_dirty_on_viewport_size_changed() { // NB: The dirty bit is propagated down the tree. unsafe { node.set_dirty(true); } + + let mut current = node.parent_node(); + while let Some(node) = current { + if node.has_dirty_descendants() { break; } + unsafe { node.set_dirty_descendants(true); } + current = node.parent_node(); + } + next = iter.next_skipping_children(); } else { next = iter.next();