mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00:00
Reap layout data whenever a node is removed from the tree.
Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts. Clear the layout data when a node becomes display:none.
This commit is contained in:
parent
8ad3c5aeb6
commit
611fd7a846
5 changed files with 35 additions and 40 deletions
|
@ -1326,6 +1326,13 @@ impl<'ln> NodeUtils for ThreadSafeLayoutNode<'ln> {
|
|||
let mut layout_data_ref = self.mutate_layout_data();
|
||||
let layout_data = layout_data_ref.as_mut().expect("no layout data");
|
||||
|
||||
match result {
|
||||
ConstructionResult::None => {
|
||||
layout_data.clear();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
let dst = self.get_construction_result(layout_data);
|
||||
|
||||
*dst = result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue