layout: Refactor Flow::from_fragment-style constructors to be

consistent.
This commit is contained in:
Patrick Walton 2016-10-24 17:25:56 -07:00
parent e888b76534
commit be252371ea
11 changed files with 35 additions and 15 deletions

View file

@ -533,7 +533,12 @@ impl Encodable for BlockFlowFlags {
}
impl BlockFlow {
pub fn from_fragment(fragment: Fragment, float_kind: Option<FloatKind>) -> BlockFlow {
pub fn from_fragment(fragment: Fragment) -> BlockFlow {
BlockFlow::from_fragment_and_float_kind(fragment, None)
}
pub fn from_fragment_and_float_kind(fragment: Fragment, float_kind: Option<FloatKind>)
-> BlockFlow {
let writing_mode = fragment.style().writing_mode;
BlockFlow {
base: BaseFlow::new(Some(fragment.style()), writing_mode, match float_kind {