mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Drop style data from descendants on display:none.
MozReview-Commit-ID: 8ls43oAGWRg
This commit is contained in:
parent
1a5e2b4673
commit
fb70ee2c0c
8 changed files with 66 additions and 18 deletions
|
@ -28,6 +28,7 @@ pub struct RecalcStyleAndConstructFlows<'lc> {
|
|||
root: OpaqueNode,
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
impl<'lc, N> DomTraversalContext<N> for RecalcStyleAndConstructFlows<'lc>
|
||||
where N: LayoutNode + TNode,
|
||||
N::ConcreteElement: LayoutElement
|
||||
|
@ -133,12 +134,15 @@ impl<'lc, N> DomTraversalContext<N> for RecalcStyleAndConstructFlows<'lc>
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn ensure_element_data(element: &N::ConcreteElement) -> &AtomicRefCell<ElementData> {
|
||||
element.as_node().initialize_data();
|
||||
element.get_data().unwrap()
|
||||
}
|
||||
|
||||
unsafe fn clear_element_data(element: &N::ConcreteElement) {
|
||||
element.as_node().clear_data();
|
||||
}
|
||||
|
||||
fn local_context(&self) -> &LocalStyleContext {
|
||||
self.context.local_context()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue