Explorar el Código

LibWeb: Never claim that flex containers create a BFC

If a flex item is itself a flex container, we were previously lying when
asked if the item created a BFC. It creates an FFC, so stop lying about
this in FormattingContext::creates_block_formatting_context().
Andreas Kling hace 2 años
padre
commit
a0f3e2c9a2
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Userland/Libraries/LibWeb/Layout/FormattingContext.cpp

+ 2 - 0
Userland/Libraries/LibWeb/Layout/FormattingContext.cpp

@@ -65,6 +65,8 @@ bool FormattingContext::creates_block_formatting_context(Box const& box)
         return true;
     if (is<TableCellBox>(box))
         return true;
+    if (box.computed_values().display().is_flex_inside())
+        return false;
 
     CSS::Overflow overflow_x = box.computed_values().overflow_x();
     if ((overflow_x != CSS::Overflow::Visible) && (overflow_x != CSS::Overflow::Clip))