diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index df5d26a5a8d..ce217f12ca3 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -391,7 +391,7 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer const& b OwnPtr independent_formatting_context; if (child_box.can_have_children()) { - independent_formatting_context = create_independent_formatting_context_if_needed(child_box); + independent_formatting_context = create_independent_formatting_context_if_needed(m_state, child_box); if (independent_formatting_context) independent_formatting_context->run(child_box, layout_mode); else diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp index dad0af1697d..e441fd354cc 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -75,7 +75,7 @@ bool FormattingContext::creates_block_formatting_context(const Box& box) return false; } -OwnPtr FormattingContext::create_independent_formatting_context_if_needed(Box const& child_box) +OwnPtr FormattingContext::create_independent_formatting_context_if_needed(FormattingState& state, Box const& child_box) { if (!child_box.can_have_children()) return {}; @@ -83,20 +83,20 @@ OwnPtr FormattingContext::create_independent_formatting_conte auto child_display = child_box.computed_values().display(); if (is(child_box)) - return make(m_state, child_box, this); + return make(state, child_box, this); if (child_display.is_flex_inside()) - return make(m_state, child_box, this); + return make(state, child_box, this); if (creates_block_formatting_context(child_box)) - return make(m_state, verify_cast(child_box), this); + return make(state, verify_cast(child_box), this); if (child_display.is_table_inside()) - return make(m_state, verify_cast(child_box), this); + return make(state, verify_cast(child_box), this); VERIFY(is_block_formatting_context()); if (child_box.children_are_inline()) - return make(m_state, verify_cast(child_box), static_cast(*this)); + return make(state, verify_cast(child_box), static_cast(*this)); // The child box is a block container that doesn't create its own BFC. // It will be formatted by this BFC. @@ -112,7 +112,7 @@ OwnPtr FormattingContext::create_independent_formatting_conte } virtual void run(Box const&, LayoutMode) override { } }; - return make(m_state, child_box); + return make(state, child_box); } VERIFY(child_box.is_block_container()); VERIFY(child_display.is_flow_inside()); @@ -124,7 +124,7 @@ OwnPtr FormattingContext::layout_inside(Box const& child_box, if (!child_box.can_have_children()) return {}; - auto independent_formatting_context = create_independent_formatting_context_if_needed(child_box); + auto independent_formatting_context = create_independent_formatting_context_if_needed(m_state, child_box); if (independent_formatting_context) independent_formatting_context->run(child_box, layout_mode); else diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.h b/Userland/Libraries/LibWeb/Layout/FormattingContext.h index bdcc19f22bb..853f5125bd6 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.h +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.h @@ -41,7 +41,7 @@ public: static float compute_width_for_replaced_element(FormattingState const&, ReplacedBox const&); static float compute_height_for_replaced_element(FormattingState const&, ReplacedBox const&); - OwnPtr create_independent_formatting_context_if_needed(Box const& child_box); + OwnPtr create_independent_formatting_context_if_needed(FormattingState&, Box const& child_box); virtual void parent_context_did_dimension_child_root_box() { }