From cc4749373a421c6323dd5c9e5037899775ba015d Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Sat, 7 Mar 2015 17:15:31 +0100 Subject: Add MulticolFlow and use it for multicol elements. It currently "inherits" from BlockFlow and does not override anything. --- components/layout/construct.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'components/layout/construct.rs') diff --git a/components/layout/construct.rs b/components/layout/construct.rs index f945e8bb526..12f9900b088 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -33,6 +33,7 @@ use fragment::{InlineBlockFragmentInfo, SpecificFragmentInfo}; use incremental::{RECONSTRUCT_FLOW, RestyleDamage}; use inline::InlineFlow; use list_item::{ListItemFlow, ListStyleTypeContent}; +use multicol::MulticolFlow; use opaque_node::OpaqueNodeMethods; use parallel; use table::TableFlow; @@ -655,8 +656,12 @@ impl<'a> FlowConstructor<'a> { /// to happen. fn build_flow_for_nonfloated_block(&mut self, node: &ThreadSafeLayoutNode) -> ConstructionResult { - let flow = box BlockFlow::from_node_and_fragment(node, self.build_fragment_for_block(node)) - as Box; + let fragment = self.build_fragment_for_block(node); + let flow = if node.style().is_multicol() { + box MulticolFlow::from_node_and_fragment(node, fragment) as Box + } else { + box BlockFlow::from_node_and_fragment(node, fragment) as Box + }; self.build_flow_for_block(FlowRef::new(flow), node) } -- cgit v1.2.3