mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Refactor flow construction to make float
less of a special case.
This commit is contained in:
parent
cc4749373a
commit
544a02a250
11 changed files with 48 additions and 125 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue