Title: [256709] trunk/Source/WebCore
Revision
256709
Author
[email protected]
Date
2020-02-16 07:18:57 -0800 (Sun, 16 Feb 2020)

Log Message

[LFC] A box establishing an independent formatting context is not a float avoider
https://bugs.webkit.org/show_bug.cgi?id=207820
<rdar://problem/59490056>

Reviewed by Antti Koivisto.

Since the independent formatting context does not inherit the parent's floating context,
the box's content essentially ignores the floats and the box itself does not avoid them either
(aka its position is independent of the floats in the same context).

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isFloatAvoider const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (256708 => 256709)


--- trunk/Source/WebCore/ChangeLog	2020-02-16 15:14:58 UTC (rev 256708)
+++ trunk/Source/WebCore/ChangeLog	2020-02-16 15:18:57 UTC (rev 256709)
@@ -1,5 +1,20 @@
 2020-02-16  Zalan Bujtas  <[email protected]>
 
+        [LFC] A box establishing an independent formatting context is not a float avoider
+        https://bugs.webkit.org/show_bug.cgi?id=207820
+        <rdar://problem/59490056>
+
+        Reviewed by Antti Koivisto.
+
+        Since the independent formatting context does not inherit the parent's floating context,
+        the box's content essentially ignores the floats and the box itself does not avoid them either
+        (aka its position is independent of the floats in the same context).
+
+        * layout/layouttree/LayoutBox.cpp:
+        (WebCore::Layout::Box::isFloatAvoider const):
+
+2020-02-16  Zalan Bujtas  <[email protected]>
+
         [LFC][Floats] FloatingContext::positionForFloat needs the horizontal constrains
         https://bugs.webkit.org/show_bug.cgi?id=207818
         <rdar://problem/59489777>

Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (256708 => 256709)


--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2020-02-16 15:14:58 UTC (rev 256708)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2020-02-16 15:18:57 UTC (rev 256709)
@@ -170,8 +170,9 @@
 
 bool Box::isFloatAvoider() const
 {
-    return (establishesBlockFormattingContext() && !establishesInlineFormattingContext())
-        || establishesTableFormattingContext() || establishesIndependentFormattingContext() || hasFloatClear();
+    if (establishesIndependentFormattingContext())
+        return false;
+    return (establishesBlockFormattingContext() && !establishesInlineFormattingContext()) || establishesTableFormattingContext() || hasFloatClear();
 }
 
 const ContainerBox* Box::containingBlock() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to