Title: [241591] trunk
Revision
241591
Author
[email protected]
Date
2019-02-15 10:04:48 -0800 (Fri, 15 Feb 2019)

Log Message

[LFC] Out-of-flow box is never a float box
https://bugs.webkit.org/show_bug.cgi?id=194704

Reviewed by Antti Koivisto.

Source/WebCore:

We can't have it both ways. Absolute positioning wins.

Test: fast/block/block-only/out-of-flow-is-never-float-box.html

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isFloatingPositioned const):
(WebCore::Layout::Box::isLeftFloatingPositioned const):
(WebCore::Layout::Box::isRightFloatingPositioned const):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

* fast/block/block-only/out-of-flow-is-never-float-box-expected.html: Added.
* fast/block/block-only/out-of-flow-is-never-float-box.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (241590 => 241591)


--- trunk/LayoutTests/ChangeLog	2019-02-15 17:26:16 UTC (rev 241590)
+++ trunk/LayoutTests/ChangeLog	2019-02-15 18:04:48 UTC (rev 241591)
@@ -1,3 +1,13 @@
+2019-02-15  Zalan Bujtas  <[email protected]>
+
+        [LFC] Out-of-flow box is never a float box
+        https://bugs.webkit.org/show_bug.cgi?id=194704
+
+        Reviewed by Antti Koivisto.
+
+        * fast/block/block-only/out-of-flow-is-never-float-box-expected.html: Added.
+        * fast/block/block-only/out-of-flow-is-never-float-box.html: Added.
+
 2019-02-14  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r241497.

Added: trunk/LayoutTests/fast/block/block-only/out-of-flow-is-never-float-box-expected.html (0 => 241591)


--- trunk/LayoutTests/fast/block/block-only/out-of-flow-is-never-float-box-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/block-only/out-of-flow-is-never-float-box-expected.html	2019-02-15 18:04:48 UTC (rev 241591)
@@ -0,0 +1,8 @@
+<style>
+div {
+    width: 100px;
+    height: 100px;
+    background-color: green;
+}
+</style>
+<div></div>
\ No newline at end of file

Added: trunk/LayoutTests/fast/block/block-only/out-of-flow-is-never-float-box.html (0 => 241591)


--- trunk/LayoutTests/fast/block/block-only/out-of-flow-is-never-float-box.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/block-only/out-of-flow-is-never-float-box.html	2019-02-15 18:04:48 UTC (rev 241591)
@@ -0,0 +1,10 @@
+<style>
+div {
+    float: left;
+    position: absolute;
+    width: 100px;
+    height: 100px;
+    background-color: green;
+}
+</style>
+<div></div><div><div>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (241590 => 241591)


--- trunk/Source/WebCore/ChangeLog	2019-02-15 17:26:16 UTC (rev 241590)
+++ trunk/Source/WebCore/ChangeLog	2019-02-15 18:04:48 UTC (rev 241591)
@@ -1,3 +1,19 @@
+2019-02-15  Zalan Bujtas  <[email protected]>
+
+        [LFC] Out-of-flow box is never a float box
+        https://bugs.webkit.org/show_bug.cgi?id=194704
+
+        Reviewed by Antti Koivisto.
+
+        We can't have it both ways. Absolute positioning wins.
+
+        Test: fast/block/block-only/out-of-flow-is-never-float-box.html
+
+        * layout/layouttree/LayoutBox.cpp:
+        (WebCore::Layout::Box::isFloatingPositioned const):
+        (WebCore::Layout::Box::isLeftFloatingPositioned const):
+        (WebCore::Layout::Box::isRightFloatingPositioned const):
+
 2019-02-15  Philippe Normand  <[email protected]>
 
         [GStreamer] Simplify GObject class name check

Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (241590 => 241591)


--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2019-02-15 17:26:16 UTC (rev 241590)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2019-02-15 18:04:48 UTC (rev 241591)
@@ -109,16 +109,23 @@
 
 bool Box::isFloatingPositioned() const
 {
+    // FIXME: Rendering code caches values like this. (style="position: absolute; float: left")
+    if (isOutOfFlowPositioned())
+        return false;
     return m_style.floating() != Float::No;
 }
 
 bool Box::isLeftFloatingPositioned() const
 {
+    if (!isFloatingPositioned())
+        return false;
     return m_style.floating() == Float::Left;
 }
 
 bool Box::isRightFloatingPositioned() const
 {
+    if (!isFloatingPositioned())
+        return false;
     return m_style.floating() == Float::Right;
 }
 

Modified: trunk/Tools/ChangeLog (241590 => 241591)


--- trunk/Tools/ChangeLog	2019-02-15 17:26:16 UTC (rev 241590)
+++ trunk/Tools/ChangeLog	2019-02-15 18:04:48 UTC (rev 241591)
@@ -1,3 +1,12 @@
+2019-02-15  Zalan Bujtas  <[email protected]>
+
+        [LFC] Out-of-flow box is never a float box
+        https://bugs.webkit.org/show_bug.cgi?id=194704
+
+        Reviewed by Antti Koivisto.
+
+        * LayoutReloaded/misc/LFC-passing-tests.txt:
+
 2019-02-10  Darin Adler  <[email protected]>
 
         Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)

Modified: trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt (241590 => 241591)


--- trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt	2019-02-15 17:26:16 UTC (rev 241590)
+++ trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt	2019-02-15 18:04:48 UTC (rev 241591)
@@ -102,6 +102,7 @@
 fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html
 fast/block/block-only/non-auto-top-bottom-height-with-margins.html
 fast/block/block-only/non-auto-top-bottom-left-right-widht-height-out-of-flow.html
+fast/block/block-only/out-of-flow-is-never-float-box.html
 fast/block/block-only/out-of-flow-with-containing-block-border-padding.html
 fast/block/block-only/padding-nested.html
 fast/block/block-only/padding-simple.html
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to