Have ContentBox(es)Queries consult the flow tree

Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.

Fixes #3790.
This commit is contained in:
Martin Robinson 2014-10-29 19:02:31 -07:00
parent 1a3ff8739c
commit 2d72f00ccf
19 changed files with 374 additions and 213 deletions

View file

@ -8,6 +8,7 @@ use context::{LayoutContext, SharedLayoutContext};
use flow::{Flow, MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal};
use flow;
use flow_ref::FlowRef;
use fragment::FragmentBoundsIterator;
use servo_util::opts;
use traversal::{BubbleISizes, RecalcStyleForNode, ConstructFlows};
use traversal::{AssignBSizesAndStoreOverflow, AssignISizes};
@ -92,3 +93,16 @@ pub fn build_display_list_for_subtree(root: &mut FlowRef,
doit(root.deref_mut(), compute_absolute_positions, build_display_list);
}
pub fn iterate_through_flow_tree_fragment_bounds(root: &mut FlowRef,
iterator: &mut FragmentBoundsIterator) {
fn doit(flow: &mut Flow, iterator: &mut FragmentBoundsIterator) {
flow.iterate_through_fragment_bounds(iterator);
for kid in flow::mut_base(flow).child_iter() {
doit(kid, iterator);
}
}
doit(root.deref_mut(), iterator);
}