Title: [195665] releases/WebKitGTK/webkit-2.10
Revision
195665
Author
[email protected]
Date
2016-01-27 05:23:44 -0800 (Wed, 27 Jan 2016)

Log Message

Merge r195453 - Elements with overflow and border-radius don't show in multicolumn properly.
https://bugs.webkit.org/show_bug.cgi?id=152920

Reviewed by Simon Fraser.

Source/WebCore:

Added new test in fast/multicol.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::convertToLayerCoords):
(WebCore::RenderLayer::offsetFromAncestor):
(WebCore::RenderLayer::clipToRect):
* rendering/RenderLayer.h:

Make sure the crawl up the containing block chain to apply clips properly offsets
to account for columns. convertToLayerCoords could already handle this, so
offsetFromAncestor now takes the same extra argument (whether or not to adjust for
columns) that convertToLayerCoords does.

LayoutTests:

* fast/multicol/border-radius-overflow-columns-expected.html: Added.
* fast/multicol/border-radius-overflow-columns.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (195664 => 195665)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2016-01-27 13:21:05 UTC (rev 195664)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2016-01-27 13:23:44 UTC (rev 195665)
@@ -1,3 +1,13 @@
+2016-01-21  Dave Hyatt  <[email protected]>
+
+        Elements with overflow and border-radius don't show in multicolumn properly.
+        https://bugs.webkit.org/show_bug.cgi?id=152920
+
+        Reviewed by Simon Fraser.
+
+        * fast/multicol/border-radius-overflow-columns-expected.html: Added.
+        * fast/multicol/border-radius-overflow-columns.html: Added.
+
 2016-01-21  Simon Fraser  <[email protected]>
 
         REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns-expected.html (0 => 195665)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns-expected.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns-expected.html	2016-01-27 13:23:44 UTC (rev 195665)
@@ -0,0 +1,45 @@
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <style>
+        #elements .panel {
+            min-height: 250px;
+        }
+
+        #elements {
+            height: 600px;
+            columns: 2;
+            -webkit-columns: 2;
+            border: 2px solid black;
+        }
+
+        .list-group-item {
+            overflow: hidden;
+            padding: 20px;
+            border: 2px solid gray;
+        }
+
+        .list-group-item:first-child {
+            border-radius: 10px;
+        }
+
+        .list-group-item:last-child {
+            border-radius: 10px;
+        }
+        </style> 
+</head>
+<body>
+<div id="elements" class="container-fluid">
+    
+    <div class="panel panel-default" style="height: 600px">
+    </div>
+    <div class="panel panel-default">
+        <ul class="list-group">
+            <li class="list-group-item">Can you see this?</li>
+            <li class="list-group-item">You should see text above and below this text.</li>
+            <li class="list-group-item">Can you see this?</li>
+        </ul>
+    </div>
+</div>
+</body>
+</html>

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns.html (0 => 195665)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns.html	2016-01-27 13:23:44 UTC (rev 195665)
@@ -0,0 +1,46 @@
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <style>
+        #elements .panel {
+            min-height: 250px;
+        }
+
+        #elements {
+            height: 600px;
+            columns: 2;
+            -webkit-columns: 2;
+            border: 2px solid black;
+        }
+
+        .list-group-item {
+            position: relative;
+            overflow: hidden;
+            padding: 20px;
+            border: 2px solid gray;
+        }
+
+        .list-group-item:first-child {
+            border-radius: 10px;
+        }
+
+        .list-group-item:last-child {
+            border-radius: 10px;
+        }
+        </style> 
+</head>
+<body>
+<div id="elements" class="container-fluid">
+    
+    <div class="panel panel-default" style="height: 600px">
+    </div>
+    <div class="panel panel-default">
+        <ul class="list-group">
+            <li class="list-group-item">Can you see this?</li>
+            <li class="list-group-item">You should see text above and below this text.</li>
+            <li class="list-group-item">Can you see this?</li>
+        </ul>
+    </div>
+</div>
+</body>
+</html>

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (195664 => 195665)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-01-27 13:21:05 UTC (rev 195664)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-01-27 13:23:44 UTC (rev 195665)
@@ -1,3 +1,23 @@
+2016-01-21  Dave Hyatt  <[email protected]>
+
+        Elements with overflow and border-radius don't show in multicolumn properly.
+        https://bugs.webkit.org/show_bug.cgi?id=152920
+
+        Reviewed by Simon Fraser.
+
+        Added new test in fast/multicol.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::convertToLayerCoords):
+        (WebCore::RenderLayer::offsetFromAncestor):
+        (WebCore::RenderLayer::clipToRect):
+        * rendering/RenderLayer.h:
+
+        Make sure the crawl up the containing block chain to apply clips properly offsets
+        to account for columns. convertToLayerCoords could already handle this, so
+        offsetFromAncestor now takes the same extra argument (whether or not to adjust for
+        columns) that convertToLayerCoords does.
+
 2016-01-21  Simon Fraser  <[email protected]>
 
         REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.cpp (195664 => 195665)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.cpp	2016-01-27 13:21:05 UTC (rev 195664)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.cpp	2016-01-27 13:23:44 UTC (rev 195665)
@@ -2123,9 +2123,9 @@
     return locationInLayerCoords;
 }
 
-LayoutSize RenderLayer::offsetFromAncestor(const RenderLayer* ancestorLayer) const
+LayoutSize RenderLayer::offsetFromAncestor(const RenderLayer* ancestorLayer, ColumnOffsetAdjustment adjustForColumns) const
 {
-    return toLayoutSize(convertToLayerCoords(ancestorLayer, LayoutPoint()));
+    return toLayoutSize(convertToLayerCoords(ancestorLayer, LayoutPoint(), adjustForColumns));
 }
 
 #if PLATFORM(IOS)
@@ -3823,7 +3823,7 @@
         // containing block chain so we check that also.
         for (RenderLayer* layer = rule == IncludeSelfForBorderRadius ? this : parent(); layer; layer = layer->parent()) {
             if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && inContainingBlockChain(this, layer)) {
-                LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer)), layer->size());
+                LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer, AdjustForColumns)), layer->size());
                 adjustedClipRect.move(paintingInfo.subpixelAccumulation);
                 context->clipRoundedRect(layer->renderer().style().getRoundedInnerBorderFor(adjustedClipRect).pixelSnappedRoundedRectForPainting(deviceScaleFactor));
             }

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.h (195664 => 195665)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.h	2016-01-27 13:21:05 UTC (rev 195664)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.h	2016-01-27 13:23:44 UTC (rev 195665)
@@ -432,7 +432,7 @@
     enum ColumnOffsetAdjustment { DontAdjustForColumns, AdjustForColumns };
     void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntPoint& location, ColumnOffsetAdjustment adjustForColumns = DontAdjustForColumns) const;
     LayoutPoint convertToLayerCoords(const RenderLayer* ancestorLayer, const LayoutPoint&, ColumnOffsetAdjustment adjustForColumns = DontAdjustForColumns) const;
-    LayoutSize offsetFromAncestor(const RenderLayer*) const;
+    LayoutSize offsetFromAncestor(const RenderLayer*, ColumnOffsetAdjustment = DontAdjustForColumns) const;
 
     int zIndex() const { return renderer().style().zIndex(); }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to