mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix an issue with unset_boxes_in_subtree
in layout_2020
If the root node of the subtree doesn't have any boxes to unset, we should exit early instead of unsetting boxes on siblings of the root. This eliminates an infinite loop in this method, since the siblings of the root are not in the subtree.
This commit is contained in:
parent
8825d588c1
commit
27e0400891
1 changed files with 5 additions and 0 deletions
|
@ -426,8 +426,13 @@ where
|
|||
node = child;
|
||||
continue;
|
||||
}
|
||||
} else if node == self {
|
||||
// If this is the root of the subtree and we aren't descending
|
||||
// into our children return now.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let mut next_is_a_sibling_of = node;
|
||||
node = loop {
|
||||
if let Some(sibling) = next_is_a_sibling_of.next_sibling() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue