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

@ -11,7 +11,7 @@ use block::BlockFlow;
use context::LayoutContext;
use euclid::{Point2D, Rect};
use floats::FloatKind;
use flow::{Flow, FlowClass, OpaqueFlow};
use flow::{Flow, FlowClass, OpaqueFlow, mut_base};
use fragment::{Fragment, FragmentBorderBoxIterator};
use std::fmt;
use std::sync::Arc;
@ -60,6 +60,10 @@ impl Flow for MulticolFlow {
fn assign_block_size<'a>(&mut self, ctx: &'a LayoutContext<'a>) {
debug!("assign_block_size: assigning block_size for multicol");
let available_block_size = Au(0);
for child in mut_base(self).children.iter_mut() {
child.fragment(ctx, available_block_size);
}
self.block_flow.assign_block_size(ctx);
}