Browse Source

LibWeb: Don't try to layout inside of replaced elements in BFC

Andreas Kling 2 năm trước cách đây
mục cha
commit
b9a45cf1aa

+ 1 - 1
Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp

@@ -377,7 +377,7 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain
     }
 
     OwnPtr<FormattingContext> 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<BlockContainer>(box), layout_mode, box_state.available_inner_space_or_constraints_from(available_space));
         } else {