Sequentialize assign_block_size for flows that can be fragmented.

Fragmentation will be intertwined with block size calculation.
This commit is contained in:
Simon Sapin 2015-12-29 17:44:50 +00:00
parent da2b4ab381
commit 9abbd1b5d1
9 changed files with 61 additions and 24 deletions

View file

@ -10,7 +10,7 @@
use construct::FlowConstructor;
use context::{LayoutContext, SharedLayoutContext};
use flow::{PostorderFlowTraversal, PreorderFlowTraversal};
use flow::{self, Flow};
use flow::{self, Flow, CAN_BE_FRAGMENTED};
use gfx::display_list::OpaqueNode;
use incremental::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, RestyleDamage};
use std::mem;
@ -194,7 +194,10 @@ impl<'a> PostorderFlowTraversal for AssignBSizesAndStoreOverflow<'a> {
#[inline]
fn should_process(&self, flow: &mut Flow) -> bool {
flow::base(flow).restyle_damage.intersects(REFLOW_OUT_OF_FLOW | REFLOW)
let base = flow::base(flow);
base.restyle_damage.intersects(REFLOW_OUT_OF_FLOW | REFLOW)
// The fragmentation countainer is responsible for calling Flow::fragment recursively
&& !base.flags.contains(CAN_BE_FRAGMENTED)
}
}