diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2022-12-15 23:31:16 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-16 09:57:37 +0100 |
commit | 992b4489ad65b6574205a7d2f36fb589191af877 (patch) | |
tree | 2d12173023a21156554dc07bd0f6a7860edd6086 | |
parent | 8d6283c229d618afed751696ad0af14e2dfc7ea2 (diff) | |
download | serenity-992b4489ad65b6574205a7d2f36fb589191af877.zip |
LibWeb: Fix bug in BFC that independent FC assigned to wrong variable
Bug was introduced in 210bf8adf0c431be05659140fd6de3a2cc5b7d99
It makes new variable for independent_formatting_context instead
of using earlier declared one which means that
parent_context_did_dimension_child_root_box will never be called.
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index e927713f50..2ed71c4687 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -377,7 +377,8 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain OwnPtr<FormattingContext> independent_formatting_context; if (!box.is_replaced_box() && box.has_children()) { - if (auto independent_formatting_context = create_independent_formatting_context_if_needed(m_state, box)) { + independent_formatting_context = create_independent_formatting_context_if_needed(m_state, box); + if (independent_formatting_context) { independent_formatting_context->run(box, layout_mode, box_state.available_inner_space_or_constraints_from(available_space)); } else { if (box.children_are_inline()) |