Title: [214766] releases/WebKitGTK/webkit-2.16
Revision
214766
Author
carlo...@webkit.org
Date
2017-04-03 04:03:11 -0700 (Mon, 03 Apr 2017)

Log Message

Merge r214126 - Disable per-region boxes for multicolumn
https://bugs.webkit.org/show_bug.cgi?id=169830

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/multicol/float-adjacent-to-overflow-block.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion):
(WebCore::RenderBox::renderBoxRegionInfo):
Limit all of the per-region box code to RenderNamedFlowThreads.
This code should never be used by multicolumn layout.

LayoutTests:

* fast/multicol/float-adjacent-to-overflow-block-expected.html: Added.
* fast/multicol/float-adjacent-to-overflow-block.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog (214765 => 214766)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog	2017-04-03 11:02:21 UTC (rev 214765)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog	2017-04-03 11:03:11 UTC (rev 214766)
@@ -1,3 +1,13 @@
+2017-03-17  Dave Hyatt  <hy...@apple.com>
+
+        Disable per-region boxes for multicolumn
+        https://bugs.webkit.org/show_bug.cgi?id=169830
+
+        Reviewed by Zalan Bujtas.
+
+        * fast/multicol/float-adjacent-to-overflow-block-expected.html: Added.
+        * fast/multicol/float-adjacent-to-overflow-block.html: Added.
+
 2017-03-17  Zalan Bujtas  <za...@apple.com>
 
         Fix the flow thread state on the descendants of out of flow positioned replaced elements.

Added: releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/float-adjacent-to-overflow-block-expected.html (0 => 214766)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/float-adjacent-to-overflow-block-expected.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/float-adjacent-to-overflow-block-expected.html	2017-04-03 11:03:11 UTC (rev 214766)
@@ -0,0 +1,25 @@
+<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <style>
+            html { width: 250px; height:500px; }
+            body { margin: 0 }
+            .float {
+                width:80px;
+                height:80px;
+                border:5px solid maroon;
+                margin:0;
+            }
+        .left {float:left;}
+        .heading {
+            overflow:hidden;
+            border:5px solid blue;
+        }
+        </style>
+    </head>
+    <html>
+        <body>
+            <div class="float left"></div>
+            <h1 class="heading">Text that should not be clipped out.</h1>
+            
+        </body>
+    </html>

Added: releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/float-adjacent-to-overflow-block.html (0 => 214766)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/float-adjacent-to-overflow-block.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/float-adjacent-to-overflow-block.html	2017-04-03 11:03:11 UTC (rev 214766)
@@ -0,0 +1,25 @@
+<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <style>
+            html { column-width:250px; column-gap:0; height:500px; width:500px; column-fill:auto }
+            body { margin: 0 }
+            .float {
+                width:80px;
+                height:80px;
+                border:5px solid maroon;
+                margin:0;
+            }
+        .left {float:left;}
+        .heading {
+            overflow:hidden;
+            border:5px solid blue;
+        }
+        </style>
+    </head>
+    <html>
+        <body>
+            <div class="float left"></div>
+            <h1 class="heading">Text that should not be clipped out.</h1>
+            
+        </body>
+    </html>

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (214765 => 214766)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-04-03 11:02:21 UTC (rev 214765)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-04-03 11:03:11 UTC (rev 214766)
@@ -1,3 +1,20 @@
+2017-03-17  Dave Hyatt  <hy...@apple.com>
+
+        Disable per-region boxes for multicolumn
+        https://bugs.webkit.org/show_bug.cgi?id=169830
+
+        Reviewed by Zalan Bujtas.
+
+        Test: fast/multicol/float-adjacent-to-overflow-block.html
+
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::borderBoxRectInRegion):
+        (WebCore::RenderBox::renderBoxRegionInfo):
+        Limit all of the per-region box code to RenderNamedFlowThreads.
+        This code should never be used by multicolumn layout.
+
 2017-03-17  Said Abou-Hallawa  <sabouhall...@apple.com>
 
         Time channel attack on SVG Filters

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderBlockFlow.cpp (214765 => 214766)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderBlockFlow.cpp	2017-04-03 11:02:21 UTC (rev 214765)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderBlockFlow.cpp	2017-04-03 11:03:11 UTC (rev 214766)
@@ -36,7 +36,6 @@
 #include "LayoutRepainter.h"
 #include "Logging.h"
 #include "RenderCombineText.h"
-#include "RenderFlowThread.h"
 #include "RenderInline.h"
 #include "RenderIterator.h"
 #include "RenderLayer.h"
@@ -46,6 +45,7 @@
 #include "RenderMultiColumnFlowThread.h"
 #include "RenderMultiColumnSet.h"
 #include "RenderNamedFlowFragment.h"
+#include "RenderNamedFlowThread.h"
 #include "RenderTableCell.h"
 #include "RenderText.h"
 #include "RenderView.h"
@@ -876,7 +876,7 @@
         
     // Some objects (e.g., tables, horizontal rules, overflow:auto blocks) avoid floats. They need
     // to shift over as necessary to dodge any floats that might get in the way.
-    if (child.avoidsFloats() && containsFloats() && !flowThreadContainingBlock())
+    if (child.avoidsFloats() && containsFloats() && !is<RenderNamedFlowThread>(flowThreadContainingBlock()))
         newPosition += computeStartPositionDeltaForChildAvoidingFloats(child, marginStartForChild(child));
 
     setLogicalLeftForChild(child, style().isLeftToRightDirection() ? newPosition : totalAvailableLogicalWidth - newPosition - logicalWidthForChild(child), applyDelta);

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderBox.cpp (214765 => 214766)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderBox.cpp	2017-04-03 11:02:21 UTC (rev 214765)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderBox.cpp	2017-04-03 11:03:11 UTC (rev 214766)
@@ -210,8 +210,8 @@
     if (!region)
         return borderBoxRect();
 
-    RenderFlowThread* flowThread = flowThreadContainingBlock();
-    if (!flowThread)
+    auto* flowThread = flowThreadContainingBlock();
+    if (!is<RenderNamedFlowThread>(flowThread))
         return borderBoxRect();
 
     RenderRegion* startRegion = nullptr;
@@ -2710,7 +2710,7 @@
     // FIXME: For now we limit this computation to normal RenderBlocks. Future patches will expand
     // support to cover all boxes.
     RenderFlowThread* flowThread = flowThreadContainingBlock();
-    if (isRenderFlowThread() || !flowThread || !canHaveBoxInfoInRegion() || flowThread->style().writingMode() != style().writingMode())
+    if (isRenderFlowThread() || !is<RenderNamedFlowThread>(flowThread) || !canHaveBoxInfoInRegion() || flowThread->style().writingMode() != style().writingMode())
         return nullptr;
 
     LogicalExtentComputedValues computedValues;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to