<!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>[167478] trunk</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/167478">167478</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2014-04-17 19:11:12 -0700 (Thu, 17 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
https://bugs.webkit.org/show_bug.cgi?id=131811

Reviewed by Dean Jackson.


Source/WebCore: 
Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html
        
With block axis pagination mode, it is possible to set a column height that is not the same
as the available fill height for a block. The new multi-column code had the assumption that
the column height was the same as the amount of fill room you had available. This is not
the case.
        
To correct the issue, I added a member variable to RenderMultiColumnSet that stores the
available column height as a separate variable from the computed column height. This allows
the pagination API to specify a different column height that is not the same as the view's
content height.

Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on
RenderView to work with the new column code as well.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
(WebCore::RenderMultiColumnSet::computeLogicalHeight):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::pageOrViewLogicalHeight):

LayoutTests: 
* fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb-expected.html: Added.
* fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnSetcpp">trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnSeth">trunk/Source/WebCore/rendering/RenderMultiColumnSet.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastmulticolnewmulticolcomparewitholdimplBottomToToptbexpectedhtml">trunk/LayoutTests/fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmulticolnewmulticolcomparewitholdimplBottomToToptbhtml">trunk/LayoutTests/fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167477 => 167478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-18 02:04:14 UTC (rev 167477)
+++ trunk/LayoutTests/ChangeLog        2014-04-18 02:11:12 UTC (rev 167478)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-04-17  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
+        https://bugs.webkit.org/show_bug.cgi?id=131811
+
+        Reviewed by Dean Jackson.
+
+        * fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb-expected.html: Added.
+        * fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html: Added.
+
</ins><span class="cx"> 2014-04-16  Huang Dongsung  &lt;luxtella@company100.net&gt;
</span><span class="cx"> 
</span><span class="cx">         Make RenderLayerBacking get the timingFunction of the correct animation.
</span></span></pre></div>
<a id="trunkLayoutTestsfastmulticolnewmulticolcomparewitholdimplBottomToToptbexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb-expected.html (0 => 167478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb-expected.html        2014-04-18 02:11:12 UTC (rev 167478)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        body {
+            -webkit-writing-mode: horizontal-tb;
+        }
+        .box {
+            height: 50px;
+            width: 50px;
+            background-color: blue;
+        }
+        .box.changed {
+            background-color: green;
+        }
+    &lt;/style&gt;
+    &lt;script&gt;
+        if (window.internals)
+            internals.setPagination(&quot;BottomToTopPaginated&quot;, 20, 180);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. &lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;7 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. &lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;8 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. &lt;/p&gt;
+
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticolnewmulticolcomparewitholdimplBottomToToptbhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html (0 => 167478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html        2014-04-18 02:11:12 UTC (rev 167478)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        body {
+            -webkit-writing-mode: horizontal-tb;
+        }
+        .box {
+            height: 50px;
+            width: 50px;
+            background-color: blue;
+        }
+        .box.changed {
+            background-color: green;
+        }
+    &lt;/style&gt;
+    &lt;script&gt;
+        if (window.internals) {
+            internals.settings.setRegionBasedColumnsEnabled(true);
+            internals.setPagination(&quot;BottomToTopPaginated&quot;, 20, 180);
+        }
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. &lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;7 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. &lt;/p&gt;
+&lt;div class=&quot;box&quot; onclick=&quot;this.classList.toggle('changed')&quot;&gt;&lt;/div&gt;
+&lt;p&gt;8 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. &lt;/p&gt;
+
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167477 => 167478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-18 02:04:14 UTC (rev 167477)
+++ trunk/Source/WebCore/ChangeLog        2014-04-18 02:11:12 UTC (rev 167478)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2014-04-17  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
+        https://bugs.webkit.org/show_bug.cgi?id=131811
+
+        Reviewed by Dean Jackson.
+
+        Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html
+        
+        With block axis pagination mode, it is possible to set a column height that is not the same
+        as the available fill height for a block. The new multi-column code had the assumption that
+        the column height was the same as the amount of fill room you had available. This is not
+        the case.
+        
+        To correct the issue, I added a member variable to RenderMultiColumnSet that stores the
+        available column height as a separate variable from the computed column height. This allows
+        the pagination API to specify a different column height that is not the same as the view's
+        content height.
+
+        Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on
+        RenderView to work with the new column code as well.
+
+        * rendering/RenderMultiColumnSet.cpp:
+        (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
+        (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
+        (WebCore::RenderMultiColumnSet::computeLogicalHeight):
+        * rendering/RenderMultiColumnSet.h:
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::pageOrViewLogicalHeight):
+
</ins><span class="cx"> 2014-04-17  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Build fix.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp (167477 => 167478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2014-04-18 02:04:14 UTC (rev 167477)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2014-04-18 02:11:12 UTC (rev 167478)
</span><span class="lines">@@ -26,10 +26,12 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;RenderMultiColumnSet.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;FrameView.h&quot;
</ins><span class="cx"> #include &quot;PaintInfo.h&quot;
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderMultiColumnFlowThread.h&quot;
</span><span class="cx"> #include &quot;RenderMultiColumnSpannerPlaceholder.h&quot;
</span><ins>+#include &quot;RenderView.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -38,6 +40,7 @@
</span><span class="cx">     , m_computedColumnCount(1)
</span><span class="cx">     , m_computedColumnWidth(0)
</span><span class="cx">     , m_computedColumnHeight(0)
</span><ins>+    , m_availableColumnHeight(0)
</ins><span class="cx">     , m_maxColumnHeight(RenderFlowThread::maxLogicalHeight())
</span><span class="cx">     , m_minSpaceShortage(RenderFlowThread::maxLogicalHeight())
</span><span class="cx">     , m_minimumColumnHeight(0)
</span><span class="lines">@@ -151,6 +154,19 @@
</span><span class="cx">     m_computedColumnHeight = newHeight;
</span><span class="cx">     if (m_computedColumnHeight &gt; m_maxColumnHeight)
</span><span class="cx">         m_computedColumnHeight = m_maxColumnHeight;
</span><ins>+    
+    // FIXME: The available column height is not the same as the constrained height specified
+    // by the pagination API. The column set in this case is allowed to be bigger than the
+    // height of a single column. We cache available column height in order to use it
+    // in computeLogicalHeight later. This is pretty gross, and maybe there's a better way
+    // to formalize the idea of clamped column heights without having a view dependency
+    // here.
+    m_availableColumnHeight = m_computedColumnHeight;
+    if (multiColumnFlowThread() &amp;&amp; !multiColumnFlowThread()-&gt;progressionIsInline() &amp;&amp; parent()-&gt;isRenderView()) {
+        int pageLength = view().frameView().pagination().pageLength;
+        if (pageLength)
+            m_computedColumnHeight = pageLength;
+    }
</ins><span class="cx">     // FIXME: the height may also be affected by the enclosing pagination context, if any.
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -396,7 +412,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues&amp; computedValues) const
</span><span class="cx"> {
</span><del>-    computedValues.m_extent = m_computedColumnHeight;
</del><ins>+    computedValues.m_extent = m_availableColumnHeight;
</ins><span class="cx">     computedValues.m_position = logicalTop;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.h (167477 => 167478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.h        2014-04-18 02:04:14 UTC (rev 167477)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.h        2014-04-18 02:11:12 UTC (rev 167478)
</span><span class="lines">@@ -178,6 +178,7 @@
</span><span class="cx">     unsigned m_computedColumnCount; // Used column count (the resulting 'N' from the pseudo-algorithm in the multicol spec)
</span><span class="cx">     LayoutUnit m_computedColumnWidth; // Used column width (the resulting 'W' from the pseudo-algorithm in the multicol spec)
</span><span class="cx">     LayoutUnit m_computedColumnHeight;
</span><ins>+    LayoutUnit m_availableColumnHeight;
</ins><span class="cx">     
</span><span class="cx">     // The following variables are used when balancing the column set.
</span><span class="cx">     LayoutUnit m_maxColumnHeight; // Maximum column height allowed.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (167477 => 167478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2014-04-18 02:04:14 UTC (rev 167477)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2014-04-18 02:11:12 UTC (rev 167478)
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx">     if (document().printing())
</span><span class="cx">         return pageLogicalHeight();
</span><span class="cx">     
</span><del>-    if (hasColumns() &amp;&amp; !style().hasInlineColumnAxis()) {
</del><ins>+    if ((hasColumns() || multiColumnFlowThread()) &amp;&amp; !style().hasInlineColumnAxis()) {
</ins><span class="cx">         if (int pageLength = frameView().pagination().pageLength)
</span><span class="cx">             return pageLength;
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>