mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Force to stop computing children if we find the parent has display: none.
This commit is contained in:
parent
436c1b3089
commit
544a117911
9 changed files with 254 additions and 116 deletions
|
@ -16,6 +16,7 @@ use std::mem;
|
|||
use style::context::SharedStyleContext;
|
||||
use style::dom::TNode;
|
||||
use style::selector_impl::ServoSelectorImpl;
|
||||
use style::traversal::RestyleResult;
|
||||
use style::traversal::{DomTraversalContext, remove_from_bloom_filter, recalc_style_at};
|
||||
use util::opts;
|
||||
use wrapper::{LayoutNodeLayoutData, ThreadSafeLayoutNodeHelpers};
|
||||
|
@ -69,12 +70,12 @@ impl<'lc, N> DomTraversalContext<N> for RecalcStyleAndConstructFlows<'lc>
|
|||
}
|
||||
}
|
||||
|
||||
fn process_preorder(&self, node: N) {
|
||||
// FIXME(pcwalton): Stop allocating here. Ideally this should just be done by the HTML
|
||||
// parser.
|
||||
fn process_preorder(&self, node: N) -> RestyleResult {
|
||||
// FIXME(pcwalton): Stop allocating here. Ideally this should just be
|
||||
// done by the HTML parser.
|
||||
node.initialize_data();
|
||||
|
||||
recalc_style_at(&self.context, self.root, node);
|
||||
recalc_style_at(&self.context, self.root, node)
|
||||
}
|
||||
|
||||
fn process_postorder(&self, node: N) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue