mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add MulticolFlow and use it for multicol elements.
It currently "inherits" from BlockFlow and does not override anything.
This commit is contained in:
parent
f30cd4f377
commit
cc4749373a
6 changed files with 130 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue