1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

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.
This commit is contained in:
Aliaksandr Kalenik 2022-12-15 23:31:16 +03:00 committed by Andreas Kling
parent 8d6283c229
commit 992b4489ad

View file

@ -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())