auto merge of #5086 : glennw/servo/reap-more-stuff, r=jdm

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:
bors-servo 2015-03-02 16:45:51 -07:00
commit 65454e51c8
5 changed files with 35 additions and 40 deletions

View file

@ -1329,6 +1329,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;