LibWeb: Move initial containing block setup out of BFC

BFC currently has a number of architectural issues due to it being
responsible for setting the dimensions of the BFC root.

This patch moves the logic for setting up the ICB from BFC to Document.
This commit is contained in:
Andreas Kling 2022-02-12 00:57:45 +01:00
commit 40bd2cb611
Notes: sideshowbarker 2024-07-17 18:57:33 +09:00
2 changed files with 5 additions and 4 deletions

View file

@ -532,10 +532,6 @@ void BlockFormattingContext::layout_initial_containing_block(LayoutMode layout_m
auto viewport_rect = root().browsing_context().viewport_rect();
auto& icb = verify_cast<Layout::InitialContainingBlock>(root());
icb.build_stacking_context_tree();
icb.set_content_width(viewport_rect.width());
icb.set_content_height(viewport_rect.height());
VERIFY(!icb.children_are_inline());
layout_block_level_children(root(), layout_mode);