Refactor flow construction to make float less of a special case.

This commit is contained in:
Simon Sapin 2015-04-16 16:51:27 +02:00
parent cc4749373a
commit 544a02a250
11 changed files with 48 additions and 125 deletions

View file

@ -4,10 +4,11 @@
//! CSS Multi-column layout http://dev.w3.org/csswg/css-multicol/
#![deny(unsafe_blocks)]
#![deny(unsafe_code)]
use block::BlockFlow;
use context::LayoutContext;
use floats::FloatKind;
use flow::{FlowClass, Flow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use wrapper::ThreadSafeLayoutNode;
@ -24,10 +25,12 @@ pub struct MulticolFlow {
}
impl MulticolFlow {
pub fn from_node_and_fragment(node: &ThreadSafeLayoutNode, fragment: Fragment)
pub fn from_node_and_fragment(node: &ThreadSafeLayoutNode,
fragment: Fragment,
float_kind: Option<FloatKind>)
-> MulticolFlow {
MulticolFlow {
block_flow: BlockFlow::from_node_and_fragment(node, fragment)
block_flow: BlockFlow::from_node_and_fragment(node, fragment, float_kind)
}
}
}