Remove IndependentFormattingContext::layout

Callers should handle replaced v.s. not separately
This commit is contained in:
Simon Sapin 2019-12-03 11:33:44 +01:00
parent c056e5b6b0
commit efa1885e1b
2 changed files with 17 additions and 26 deletions

View file

@ -91,24 +91,6 @@ impl IndependentFormattingContext {
Contents::Flow(f) => Err(NR(Kind::Flow(f))),
}
}
pub fn layout<'a>(
&'a self,
layout_context: &LayoutContext,
containing_block: &ContainingBlock,
tree_rank: usize,
absolutely_positioned_fragments: &mut Vec<AbsolutelyPositionedFragment<'a>>,
) -> IndependentLayout {
match self.as_replaced() {
Ok(replaced) => replaced.layout(&self.style, containing_block),
Err(ifc) => ifc.layout(
layout_context,
containing_block,
tree_rank,
absolutely_positioned_fragments,
),
}
}
}
impl<'a> NonReplacedIFC<'a> {