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:
Glenn Watson 2015-02-27 16:29:02 +10:00
parent 8ad3c5aeb6
commit 611fd7a846
5 changed files with 35 additions and 40 deletions

View file

@ -78,6 +78,12 @@ pub struct LayoutDataWrapper {
pub data: Box<PrivateLayoutData>,
}
impl LayoutDataWrapper {
pub fn clear(&self) {
// TODO: Clear items related to this node, e.g. compositor layers
}
}
#[allow(dead_code)]
fn static_assertion(x: Option<LayoutDataWrapper>) {
unsafe {