소스 검색

LibWeb: Remove unnecessary check that BFC isn't clearing a flex item

A block-level box in BFC will never be a flex item. It may be a flex
container, but not an item. Hence this check was unnecessary.
Andreas Kling 1 년 전
부모
커밋
aa59419529
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp

+ 2 - 3
Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp

@@ -826,10 +826,9 @@ BlockFormattingContext::DidIntroduceClearance BlockFormattingContext::clear_floa
         }
     };
 
-    // Flex-items don't float and also don't clear.
-    if ((computed_values.clear() == CSS::Clear::Left || computed_values.clear() == CSS::Clear::Both) && !child_box.is_flex_item())
+    if (computed_values.clear() == CSS::Clear::Left || computed_values.clear() == CSS::Clear::Both)
         clear_floating_boxes(m_left_floats);
-    if ((computed_values.clear() == CSS::Clear::Right || computed_values.clear() == CSS::Clear::Both) && !child_box.is_flex_item())
+    if (computed_values.clear() == CSS::Clear::Right || computed_values.clear() == CSS::Clear::Both)
         clear_floating_boxes(m_right_floats);
 
     return result;