style: Enable the bloom filter recovering.

This commit is contained in:
Emilio Cobos Álvarez 2016-11-24 00:47:00 +01:00 committed by Emilio Cobos Álvarez
parent 84a50ed5cb
commit de1a3d879f
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 66 additions and 29 deletions

View file

@ -19,6 +19,7 @@ use style::dom::{StylingMode, TElement, TNode};
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT};
use style::traversal::{DomTraversalContext, recalc_style_at, remove_from_bloom_filter};
use style::traversal::PerLevelTraversalData;
use util::opts;
use wrapper::{GetRawData, LayoutNodeHelpers, LayoutNodeLayoutData};
@ -72,17 +73,14 @@ impl<'lc, N> DomTraversalContext<N> for RecalcStyleAndConstructFlows<'lc>
}
}
fn process_preorder(&self, node: N) {
fn process_preorder(&self, node: N, data: &mut PerLevelTraversalData) {
// FIXME(pcwalton): Stop allocating here. Ideally this should just be
// done by the HTML parser.
node.initialize_data();
// FIXME(emilio): Get it!
let traversal_depth = None;
if !node.is_text_node() {
let el = node.as_element().unwrap();
recalc_style_at::<_, _, Self>(&self.context, traversal_depth, el);
recalc_style_at::<_, _, Self>(&self.context, data, el);
}
}