[LFC][IFC] Block formatting context roots avoid floats.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Oct 2018 15:21:59 +0000 (15:21 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Oct 2018 15:21:59 +0000 (15:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190723

Reviewed by Antti Koivisto.

Inline formatting context roots don't avoid floats (unless they also establish block formatting context).

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237320 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp

index 02462ef..f3a5f20 100644 (file)
@@ -1,3 +1,15 @@
+2018-10-22  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC][IFC] Block formatting context roots avoid floats.
+        https://bugs.webkit.org/show_bug.cgi?id=190723
+
+        Reviewed by Antti Koivisto.
+
+        Inline formatting context roots don't avoid floats (unless they also establish block formatting context).
+
+        * layout/blockformatting/BlockFormattingContext.cpp:
+        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
+
 2018-10-20  YUHAN WU  <yuhan_wu@apple.com>
 
         MediaRecorder should fire a stop event when all tracks are ended
index a4de9ad..581c0f4 100644 (file)
@@ -148,7 +148,7 @@ void BlockFormattingContext::layoutFormattingContextRoot(LayoutContext& layoutCo
     }
     else if (layoutBox.hasFloatClear())
         computeVerticalPositionForFloatClear(layoutContext, floatingContext, layoutBox);
-    else
+    else if (layoutBox.establishesBlockFormattingContext())
         computePositionToAvoidFloats(layoutContext, floatingContext, layoutBox);
 
     // Now that we computed the root's height, we can go back and layout the out-of-flow descedants (if any).