diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-03-07 17:15:31 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-04-29 02:29:33 +0200 |
commit | cc4749373a421c6323dd5c9e5037899775ba015d (patch) | |
tree | e1fe568885ee0e14de92a378a10f709c4e5c32c6 /components/layout/construct.rs | |
parent | f30cd4f3770bc0d65a01b66d6ce92b31b364a50b (diff) | |
download | servo-cc4749373a421c6323dd5c9e5037899775ba015d.tar.gz servo-cc4749373a421c6323dd5c9e5037899775ba015d.zip |
Add MulticolFlow and use it for multicol elements.
It currently "inherits" from BlockFlow and does not override anything.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 9 |
1 files changed, 7 insertions, 2 deletions
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<Flow>; + 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<Flow> + } else { + box BlockFlow::from_node_and_fragment(node, fragment) as Box<Flow> + }; self.build_flow_for_block(FlowRef::new(flow), node) } |