mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Mark correctly parents of dirty elements.
This commit is contained in:
parent
700bb911fc
commit
b1fca78cba
1 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue