diff options
author | Glenn Watson <gw@intuitionlibrary.com> | 2015-02-27 16:29:02 +1000 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2015-03-03 07:12:51 +1000 |
commit | 611fd7a8461a27387c06786d06dd48a39c112393 (patch) | |
tree | 4884357277b9324a8f6d06af9c1a96918a2679e9 /components/layout/util.rs | |
parent | 8ad3c5aeb65e473a4c099b12e9439dfc556024f8 (diff) | |
download | servo-611fd7a8461a27387c06786d06dd48a39c112393.tar.gz servo-611fd7a8461a27387c06786d06dd48a39c112393.zip |
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.
Diffstat (limited to 'components/layout/util.rs')
-rw-r--r-- | components/layout/util.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/layout/util.rs b/components/layout/util.rs index fca6fabb3ed..8d4d72e7466 100644 --- a/components/layout/util.rs +++ b/components/layout/util.rs @@ -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 { |