Remove the Node type parameter from Contents

We now pass the Node as an argument during DOM traversal in layout.
This commit is contained in:
Anthony Ramine 2019-12-12 11:33:28 +01:00
parent b2f6cc7144
commit 47944a39fc
6 changed files with 114 additions and 63 deletions

View file

@ -54,9 +54,10 @@ enum NonReplacedIFCKind<'a> {
impl IndependentFormattingContext {
pub fn construct<'dom>(
context: &LayoutContext,
node: impl NodeExt<'dom>,
style: Arc<ComputedValues>,
display_inside: DisplayInside,
contents: Contents<impl NodeExt<'dom>>,
contents: Contents,
content_sizes: ContentSizesRequest,
) -> Self {
match contents.try_into() {
@ -64,6 +65,7 @@ impl IndependentFormattingContext {
DisplayInside::Flow | DisplayInside::FlowRoot => {
let (bfc, content_sizes) = BlockFormattingContext::construct(
context,
node,
&style,
non_replaced,
content_sizes,