mirror of
https://github.com/servo/servo.git
synced 2025-08-01 11:40:30 +01: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
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue