<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[195665] releases/WebKitGTK/webkit-2.10</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/195665">195665</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-01-27 05:23:44 -0800 (Wed, 27 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/195453">r195453</a> - 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.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderingRenderLayercpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderingRenderLayerh">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210LayoutTestsfastmulticolborderradiusoverflowcolumnsexpectedhtml">releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns-expected.html</a></li>
<li><a href="#releasesWebKitGTKwebkit210LayoutTestsfastmulticolborderradiusoverflowcolumnshtml">releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit210LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (195664 => 195665)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-01-21  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        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.
+
</ins><span class="cx"> 2016-01-21  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         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
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210LayoutTestsfastmulticolborderradiusoverflowcolumnsexpectedhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns-expected.html (0 => 195665)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;html lang=&quot;en&quot;&gt;
+&lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;style&gt;
+        #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;
+        }
+        &lt;/style&gt; 
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;elements&quot; class=&quot;container-fluid&quot;&gt;
+    
+    &lt;div class=&quot;panel panel-default&quot; style=&quot;height: 600px&quot;&gt;
+    &lt;/div&gt;
+    &lt;div class=&quot;panel panel-default&quot;&gt;
+        &lt;ul class=&quot;list-group&quot;&gt;
+            &lt;li class=&quot;list-group-item&quot;&gt;Can you see this?&lt;/li&gt;
+            &lt;li class=&quot;list-group-item&quot;&gt;You should see text above and below this text.&lt;/li&gt;
+            &lt;li class=&quot;list-group-item&quot;&gt;Can you see this?&lt;/li&gt;
+        &lt;/ul&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit210LayoutTestsfastmulticolborderradiusoverflowcolumnshtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/multicol/border-radius-overflow-columns.html (0 => 195665)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+&lt;html lang=&quot;en&quot;&gt;
+&lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;style&gt;
+        #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;
+        }
+        &lt;/style&gt; 
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;elements&quot; class=&quot;container-fluid&quot;&gt;
+    
+    &lt;div class=&quot;panel panel-default&quot; style=&quot;height: 600px&quot;&gt;
+    &lt;/div&gt;
+    &lt;div class=&quot;panel panel-default&quot;&gt;
+        &lt;ul class=&quot;list-group&quot;&gt;
+            &lt;li class=&quot;list-group-item&quot;&gt;Can you see this?&lt;/li&gt;
+            &lt;li class=&quot;list-group-item&quot;&gt;You should see text above and below this text.&lt;/li&gt;
+            &lt;li class=&quot;list-group-item&quot;&gt;Can you see this?&lt;/li&gt;
+        &lt;/ul&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (195664 => 195665)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-01-21  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        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.
+
</ins><span class="cx"> 2016-01-21  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         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
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.cpp (195664 => 195665)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2123,9 +2123,9 @@
</span><span class="cx">     return locationInLayerCoords;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutSize RenderLayer::offsetFromAncestor(const RenderLayer* ancestorLayer) const
</del><ins>+LayoutSize RenderLayer::offsetFromAncestor(const RenderLayer* ancestorLayer, ColumnOffsetAdjustment adjustForColumns) const
</ins><span class="cx"> {
</span><del>-    return toLayoutSize(convertToLayerCoords(ancestorLayer, LayoutPoint()));
</del><ins>+    return toLayoutSize(convertToLayerCoords(ancestorLayer, LayoutPoint(), adjustForColumns));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -3823,7 +3823,7 @@
</span><span class="cx">         // containing block chain so we check that also.
</span><span class="cx">         for (RenderLayer* layer = rule == IncludeSelfForBorderRadius ? this : parent(); layer; layer = layer-&gt;parent()) {
</span><span class="cx">             if (layer-&gt;renderer().hasOverflowClip() &amp;&amp; layer-&gt;renderer().style().hasBorderRadius() &amp;&amp; inContainingBlockChain(this, layer)) {
</span><del>-                LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer-&gt;offsetFromAncestor(paintingInfo.rootLayer)), layer-&gt;size());
</del><ins>+                LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer-&gt;offsetFromAncestor(paintingInfo.rootLayer, AdjustForColumns)), layer-&gt;size());
</ins><span class="cx">                 adjustedClipRect.move(paintingInfo.subpixelAccumulation);
</span><span class="cx">                 context-&gt;clipRoundedRect(layer-&gt;renderer().style().getRoundedInnerBorderFor(adjustedClipRect).pixelSnappedRoundedRectForPainting(deviceScaleFactor));
</span><span class="cx">             }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.h (195664 => 195665)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -432,7 +432,7 @@
</span><span class="cx">     enum ColumnOffsetAdjustment { DontAdjustForColumns, AdjustForColumns };
</span><span class="cx">     void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntPoint&amp; location, ColumnOffsetAdjustment adjustForColumns = DontAdjustForColumns) const;
</span><span class="cx">     LayoutPoint convertToLayerCoords(const RenderLayer* ancestorLayer, const LayoutPoint&amp;, ColumnOffsetAdjustment adjustForColumns = DontAdjustForColumns) const;
</span><del>-    LayoutSize offsetFromAncestor(const RenderLayer*) const;
</del><ins>+    LayoutSize offsetFromAncestor(const RenderLayer*, ColumnOffsetAdjustment = DontAdjustForColumns) const;
</ins><span class="cx"> 
</span><span class="cx">     int zIndex() const { return renderer().style().zIndex(); }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>