From b9a45cf1aa9aa90a352225679d60d0b9e46a48ce Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 6 Oct 2022 18:17:12 +0200 Subject: [PATCH] LibWeb: Don't try to layout inside of replaced elements in BFC --- Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 90080345aa..31bf25ded6 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -377,7 +377,7 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain } OwnPtr independent_formatting_context; - if (box.can_have_children()) { + if (!box.is_replaced_box() && box.has_children()) { if (box.children_are_inline()) { layout_inline_children(verify_cast(box), layout_mode, box_state.available_inner_space_or_constraints_from(available_space)); } else {