<!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>[162712] trunk/Source/WebCore</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/162712">162712</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2014-01-24 11:55:33 -0800 (Fri, 24 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[New Multicolumn] Eliminate RenderMultiColumnBlock
https://bugs.webkit.org/show_bug.cgi?id=127565

Reviewed by Antti Koivisto.

This patch eliminates RenderMultiColumnBlock and folds all of its remaining code
back into RenderBlockFlow. This allows all block flows to support multi-column
layout, including table cells, list items, and the RenderView itself.

* CMakeLists.txt:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Remove RenderMultiColumnBlock from the makefiles.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
Tweak the comment, since it was no longer accurate.

* rendering/RenderBlock.h:
Move some functions down into RenderBlockFlow.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::createMultiColumnFlowThreadIfNeeded):
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::relayoutForPagination):
(WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
(WebCore::RenderBlockFlow::updateLogicalWidthAndColumnWidth):
(WebCore::RenderBlockFlow::addChild):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
 * rendering/RenderBlockFlow.h:
 Move a bunch of functions from RenderMultiColumnBlock up into RenderBlockFlow.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::isUnsplittableForPagination):
Calls isMultiColumnBlockFlow() now instead of testing for a specific renderer type.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
Remove the multicolumn block creation code, since we always make a block flow now.

* rendering/RenderMultiColumnBlock.cpp: Removed.
* rendering/RenderMultiColumnBlock.h: Removed.
Nuke the files.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
(WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::addForcedBreak):
(WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnGap):
(WebCore::RenderMultiColumnSet::paintColumnRules):
Change all of the functions in the multicolumnset and multicolumnflowthread classes
to cast the parent to a RenderBlockFlow now instead of a RenderMultiColumnBlock.
Change the code to call through to multiColumnFlowThread() for column-specific information
for that parent block.

* rendering/RenderObject.h:
(WebCore::RenderObject::isMultiColumnBlockFlow):
Remove isRenderMultiColumnBlock() and replace with isMultiColumnBlockFlow().

* rendering/RenderingAllInOne.cpp:
Remove RenderMultiColumnBlock include.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreWebCoreorder">trunk/Source/WebCore/WebCore.order</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockh">trunk/Source/WebCore/rendering/RenderBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowh">trunk/Source/WebCore/rendering/RenderBlockFlow.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementcpp">trunk/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnFlowThreadcpp">trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnSetcpp">trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderingAllInOnecpp">trunk/Source/WebCore/rendering/RenderingAllInOne.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnBlockcpp">trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnBlockh">trunk/Source/WebCore/rendering/RenderMultiColumnBlock.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -2159,7 +2159,6 @@
</span><span class="cx">     rendering/RenderMediaControls.cpp
</span><span class="cx">     rendering/RenderMenuList.cpp
</span><span class="cx">     rendering/RenderMeter.cpp
</span><del>-    rendering/RenderMultiColumnBlock.cpp
</del><span class="cx">     rendering/RenderMultiColumnFlowThread.cpp
</span><span class="cx">     rendering/RenderMultiColumnSet.cpp
</span><span class="cx">     rendering/RenderNamedFlowFragment.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/ChangeLog        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -1,3 +1,75 @@
</span><ins>+2014-01-24  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        [New Multicolumn] Eliminate RenderMultiColumnBlock
+        https://bugs.webkit.org/show_bug.cgi?id=127565
+
+        Reviewed by Antti Koivisto.
+
+        This patch eliminates RenderMultiColumnBlock and folds all of its remaining code
+        back into RenderBlockFlow. This allows all block flows to support multi-column
+        layout, including table cells, list items, and the RenderView itself.
+
+        * CMakeLists.txt:
+        * WebCore.order:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        Remove RenderMultiColumnBlock from the makefiles.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
+        Tweak the comment, since it was no longer accurate.
+
+        * rendering/RenderBlock.h:
+        Move some functions down into RenderBlockFlow.
+
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::RenderBlockFlow):
+        (WebCore::RenderBlockFlow::createMultiColumnFlowThreadIfNeeded):
+        (WebCore::RenderBlockFlow::styleDidChange):
+        (WebCore::RenderBlockFlow::relayoutForPagination):
+        (WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
+        (WebCore::RenderBlockFlow::updateLogicalWidthAndColumnWidth):
+        (WebCore::RenderBlockFlow::addChild):
+        (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
+         * rendering/RenderBlockFlow.h:
+         Move a bunch of functions from RenderMultiColumnBlock up into RenderBlockFlow.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::isUnsplittableForPagination):
+        Calls isMultiColumnBlockFlow() now instead of testing for a specific renderer type.
+
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::createFor):
+        Remove the multicolumn block creation code, since we always make a block flow now.
+
+        * rendering/RenderMultiColumnBlock.cpp: Removed.
+        * rendering/RenderMultiColumnBlock.h: Removed.
+        Nuke the files.
+
+        * rendering/RenderMultiColumnFlowThread.cpp:
+        (WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
+        (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
+        * rendering/RenderMultiColumnSet.cpp:
+        (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
+        (WebCore::RenderMultiColumnSet::addForcedBreak):
+        (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
+        (WebCore::RenderMultiColumnSet::updateLogicalWidth):
+        (WebCore::RenderMultiColumnSet::prepareForLayout):
+        (WebCore::RenderMultiColumnSet::columnGap):
+        (WebCore::RenderMultiColumnSet::paintColumnRules):
+        Change all of the functions in the multicolumnset and multicolumnflowthread classes
+        to cast the parent to a RenderBlockFlow now instead of a RenderMultiColumnBlock.
+        Change the code to call through to multiColumnFlowThread() for column-specific information
+        for that parent block.
+
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isMultiColumnBlockFlow):
+        Remove isRenderMultiColumnBlock() and replace with isMultiColumnBlockFlow().
+
+        * rendering/RenderingAllInOne.cpp:
+        Remove RenderMultiColumnBlock include.
+        
</ins><span class="cx"> 2014-01-24  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         IDB: support createIndex/deleteIndex messaging
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -4415,8 +4415,6 @@
</span><span class="cx">         Source/WebCore/rendering/RenderMenuList.h \
</span><span class="cx">         Source/WebCore/rendering/RenderMeter.cpp \
</span><span class="cx">         Source/WebCore/rendering/RenderMeter.h \
</span><del>-        Source/WebCore/rendering/RenderMultiColumnBlock.cpp \
-        Source/WebCore/rendering/RenderMultiColumnBlock.h \
</del><span class="cx">         Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp \
</span><span class="cx">         Source/WebCore/rendering/RenderMultiColumnFlowThread.h \
</span><span class="cx">         Source/WebCore/rendering/RenderMultiColumnSet.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreorder"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.order (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.order        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/WebCore.order        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -23448,7 +23448,6 @@
</span><span class="cx"> __ZTVN7WebCore31RenderTextTrackContainerElementE
</span><span class="cx"> __ZTVN7WebCore14RenderMenuListE
</span><span class="cx"> __ZTVN7WebCore11RenderMeterE
</span><del>-__ZTVN7WebCore22RenderMultiColumnBlockE
</del><span class="cx"> __ZTVN7WebCore27RenderMultiColumnFlowThreadE
</span><span class="cx"> __ZTVN7WebCore20RenderMultiColumnSetE
</span><span class="cx"> __ZTVN7WebCore21RenderNamedFlowThreadE
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -10299,20 +10299,6 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\rendering\RenderMultiColumnBlock.cpp&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\RenderMultiColumnFlowThread.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -19894,7 +19880,6 @@
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\rendering\RenderMediaControls.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\RenderMenuList.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\RenderMeter.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\rendering\RenderMultiColumnBlock.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\RenderMultiColumnFlowThread.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\RenderMultiColumnSet.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\RenderNamedFlowFragment.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -2499,9 +2499,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\RenderMeter.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\rendering\RenderMultiColumnBlock.cpp&quot;&gt;
-      &lt;Filter&gt;rendering&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\RenderMultiColumnFlowThread.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -9353,9 +9350,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\RenderMeter.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\rendering\RenderMultiColumnBlock.h&quot;&gt;
-      &lt;Filter&gt;rendering&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\RenderMultiColumnFlowThread.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -4940,7 +4940,6 @@
</span><span class="cx">                 BC3C39B60C0D3D8D005F4D7A /* JSMediaList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC3C39B40C0D3D8D005F4D7A /* JSMediaList.cpp */; };
</span><span class="cx">                 BC3C39B70C0D3D8D005F4D7A /* JSMediaList.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3C39B50C0D3D8D005F4D7A /* JSMediaList.h */; };
</span><span class="cx">                 BC4368E80C226E32005EFB5F /* Rect.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4368E70C226E32005EFB5F /* Rect.h */; };
</span><del>-                BC45827F151299C10061A556 /* RenderMultiColumnBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC45827E151299C10061A556 /* RenderMultiColumnBlock.cpp */; };
</del><span class="cx">                 BC46C1EE0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1ED0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp */; };
</span><span class="cx">                 BC46C1FA0C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */; };
</span><span class="cx">                 BC46C1FB0C0DDC8F0020CFC3 /* JSCSSCharsetRule.h in Headers */ = {isa = PBXBuildFile; fileRef = BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */; };
</span><span class="lines">@@ -5186,7 +5185,6 @@
</span><span class="cx">                 BCC065890F3CE2A700CD2D87 /* JSClientRectList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC065850F3CE2A700CD2D87 /* JSClientRectList.cpp */; };
</span><span class="cx">                 BCC0658A0F3CE2A700CD2D87 /* JSClientRectList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC065860F3CE2A700CD2D87 /* JSClientRectList.h */; };
</span><span class="cx">                 BCC438780E886CC700533DD5 /* JSHTMLInputElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC438770E886CC700533DD5 /* JSHTMLInputElementCustom.cpp */; };
</span><del>-                BCC52FD6151298D2003F914B /* RenderMultiColumnBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC52FD5151298D1003F914B /* RenderMultiColumnBlock.h */; };
</del><span class="cx">                 BCC573350D695BBE006EF517 /* DOMProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC573330D695BBE006EF517 /* DOMProgressEvent.h */; };
</span><span class="cx">                 BCC573360D695BBE006EF517 /* DOMProgressEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCC573340D695BBE006EF517 /* DOMProgressEvent.mm */; };
</span><span class="cx">                 BCC573380D695BD7006EF517 /* DOMProgressEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC573370D695BD7006EF517 /* DOMProgressEventInternal.h */; };
</span><span class="lines">@@ -12124,7 +12122,6 @@
</span><span class="cx">                 BC3C39B40C0D3D8D005F4D7A /* JSMediaList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC3C39B50C0D3D8D005F4D7A /* JSMediaList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSMediaList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC4368E70C226E32005EFB5F /* Rect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Rect.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BC45827E151299C10061A556 /* RenderMultiColumnBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMultiColumnBlock.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 BC46C1ED0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSRuleCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSCharsetRule.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSCharsetRule.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -12394,7 +12391,6 @@
</span><span class="cx">                 BCC065850F3CE2A700CD2D87 /* JSClientRectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSClientRectList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCC065860F3CE2A700CD2D87 /* JSClientRectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClientRectList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCC438770E886CC700533DD5 /* JSHTMLInputElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLInputElementCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BCC52FD5151298D1003F914B /* RenderMultiColumnBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMultiColumnBlock.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 BCC573330D695BBE006EF517 /* DOMProgressEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMProgressEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCC573340D695BBE006EF517 /* DOMProgressEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMProgressEvent.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCC573370D695BD7006EF517 /* DOMProgressEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMProgressEventInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -21743,8 +21739,6 @@
</span><span class="cx">                                 ABDDFE740A5C6E7000A3E11D /* RenderMenuList.h */,
</span><span class="cx">                                 A454424C119B3687009BE912 /* RenderMeter.cpp */,
</span><span class="cx">                                 A454424D119B3687009BE912 /* RenderMeter.h */,
</span><del>-                                BC45827E151299C10061A556 /* RenderMultiColumnBlock.cpp */,
-                                BCC52FD5151298D1003F914B /* RenderMultiColumnBlock.h */,
</del><span class="cx">                                 1A3586DD15264C450022A659 /* RenderMultiColumnFlowThread.cpp */,
</span><span class="cx">                                 1A3586DE15264C450022A659 /* RenderMultiColumnFlowThread.h */,
</span><span class="cx">                                 BCE32B9D1517C22700F542EC /* RenderMultiColumnSet.cpp */,
</span><span class="lines">@@ -25005,7 +24999,6 @@
</span><span class="cx">                                 41FA303F1316C29C00C0BFC5 /* RenderMediaControls.h in Headers */,
</span><span class="cx">                                 ABDDFE7A0A5C6E7000A3E11D /* RenderMenuList.h in Headers */,
</span><span class="cx">                                 A454424F119B3687009BE912 /* RenderMeter.h in Headers */,
</span><del>-                                BCC52FD6151298D2003F914B /* RenderMultiColumnBlock.h in Headers */,
</del><span class="cx">                                 1A3586E015264C450022A659 /* RenderMultiColumnFlowThread.h in Headers */,
</span><span class="cx">                                 BCE32B9C1517C0B200F542EC /* RenderMultiColumnSet.h in Headers */,
</span><span class="cx">                                 E1FE137B184D21BB00892F13 /* CryptoAlgorithmAES_KW.h in Headers */,
</span><span class="lines">@@ -28358,7 +28351,6 @@
</span><span class="cx">                                 41FA303E1316C29C00C0BFC5 /* RenderMediaControls.cpp in Sources */,
</span><span class="cx">                                 ABDDFE790A5C6E7000A3E11D /* RenderMenuList.cpp in Sources */,
</span><span class="cx">                                 A454424E119B3687009BE912 /* RenderMeter.cpp in Sources */,
</span><del>-                                BC45827F151299C10061A556 /* RenderMultiColumnBlock.cpp in Sources */,
</del><span class="cx">                                 1A3586DF15264C450022A659 /* RenderMultiColumnFlowThread.cpp in Sources */,
</span><span class="cx">                                 BCE32B9E1517C22700F542EC /* RenderMultiColumnSet.cpp in Sources */,
</span><span class="cx">                                 1A3FF9C315265359002288A1 /* RenderNamedFlowThread.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -1558,37 +1558,6 @@
</span><span class="cx">     return oldWidth != logicalWidth() || oldColumnWidth != desiredColumnWidth() || hasBorderOrPaddingLogicalWidthChanged;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBlock::checkForPaginationLogicalHeightChange(LayoutUnit&amp; pageLogicalHeight, bool&amp; pageLogicalHeightChanged, bool&amp; hasSpecifiedPageLogicalHeight)
-{
-    ColumnInfo* colInfo = columnInfo();
-    if (hasColumns()) {
-        if (!pageLogicalHeight) {
-            // We need to go ahead and set our explicit page height if one exists, so that we can
-            // avoid doing two layout passes.
-            updateLogicalHeight();
-            LayoutUnit columnHeight = isRenderView() ? view().pageOrViewLogicalHeight() : contentLogicalHeight();
-            if (columnHeight &gt; 0) {
-                pageLogicalHeight = columnHeight;
-                hasSpecifiedPageLogicalHeight = true;
-            }
-            setLogicalHeight(0);
-        }
-
-        if (colInfo-&gt;columnHeight() != pageLogicalHeight &amp;&amp; everHadLayout())
-            pageLogicalHeightChanged = true;
-
-        colInfo-&gt;setColumnHeight(pageLogicalHeight);
-        
-        if (!hasSpecifiedPageLogicalHeight &amp;&amp; !pageLogicalHeight)
-            colInfo-&gt;clearForcedBreaks();
-
-        colInfo-&gt;setPaginationUnit(paginationUnit());
-    } else if (isRenderFlowThread()) {
-        pageLogicalHeight = 1; // This is just a hack to always make sure we have a page logical height.
-        pageLogicalHeightChanged = toRenderFlowThread(this)-&gt;pageLogicalSizeChanged();
-    }
-}
-
</del><span class="cx"> void RenderBlock::layoutBlock(bool, LayoutUnit)
</span><span class="cx"> {
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="lines">@@ -4112,8 +4081,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderBlock::adjustIntrinsicLogicalWidthsForColumns(LayoutUnit&amp; minLogicalWidth, LayoutUnit&amp; maxLogicalWidth) const
</span><span class="cx"> {
</span><del>-    // FIXME: make this method virtual and move the code to RenderMultiColumnBlock once the old
-    // multicol code is gone.
</del><ins>+    // FIXME: Move this code to RenderBlockFlow.
</ins><span class="cx"> 
</span><span class="cx">     if (!style().hasAutoColumnCount() || !style().hasAutoColumnWidth()) {
</span><span class="cx">         // The min/max intrinsic widths calculated really tell how much space elements need when
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.h (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.h        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderBlock.h        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -441,7 +441,6 @@
</span><span class="cx"> 
</span><span class="cx">     void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox&amp;);
</span><span class="cx"> 
</span><del>-    virtual void checkForPaginationLogicalHeightChange(LayoutUnit&amp; pageLogicalHeight, bool&amp; pageLogicalHeightChanged, bool&amp; hasSpecifiedPageLogicalHeight);
</del><span class="cx">     void prepareShapesAndPaginationBeforeBlockLayout(bool&amp;);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -481,9 +480,6 @@
</span><span class="cx">     void insertIntoTrackedRendererMaps(RenderBox&amp; descendant, TrackedDescendantsMap*&amp;, TrackedContainerMap*&amp;);
</span><span class="cx">     static void removeFromTrackedRendererMaps(RenderBox&amp; descendant, TrackedDescendantsMap*&amp;, TrackedContainerMap*&amp;);
</span><span class="cx"> 
</span><del>-    // Called to lay out the legend for a fieldset or the ruby text of a ruby run.
-    virtual RenderObject* layoutSpecialExcludedChild(bool /*relayoutChildren*/) { return 0; }
-
</del><span class="cx">     void createFirstLetterRenderer(RenderObject* firstLetterBlock, RenderText* currentTextChild);
</span><span class="cx">     void updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderObject* firstLetterContainer);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> #include &quot;RenderFlowThread.h&quot;
</span><span class="cx"> #include &quot;RenderIterator.h&quot;
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><ins>+#include &quot;RenderMultiColumnFlowThread.h&quot;
+#include &quot;RenderMultiColumnSet.h&quot;
</ins><span class="cx"> #include &quot;RenderNamedFlowFragment.h&quot;
</span><span class="cx"> #include &quot;RenderText.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="lines">@@ -101,6 +103,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx">     setChildrenInline(true);
</span><ins>+    createMultiColumnFlowThreadIfNeeded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderBlockFlow::RenderBlockFlow(Document&amp; document, PassRef&lt;RenderStyle&gt; style)
</span><span class="lines">@@ -111,12 +114,25 @@
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx">     setChildrenInline(true);
</span><ins>+    createMultiColumnFlowThreadIfNeeded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderBlockFlow::~RenderBlockFlow()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderBlockFlow::createMultiColumnFlowThreadIfNeeded()
+{
+    if ((style().hasAutoColumnCount() &amp;&amp; style().hasAutoColumnWidth()) || !document().regionBasedColumnsEnabled())
+        return;
+    
+    setChildrenInline(false);
+    RenderMultiColumnFlowThread* flowThread = new RenderMultiColumnFlowThread(document(), RenderStyle::createAnonymousStyleWithDisplay(&amp;style(), BLOCK));
+    flowThread-&gt;initializeStyle();
+    RenderBlock::addChild(flowThread);
+    setMultiColumnFlowThread(flowThread);
+}
+
</ins><span class="cx"> void RenderBlockFlow::insertedIntoTree()
</span><span class="cx"> {
</span><span class="cx">     RenderBlock::insertedIntoTree();
</span><span class="lines">@@ -1825,6 +1841,11 @@
</span><span class="cx"> 
</span><span class="cx">     if (diff &gt;= StyleDifferenceRepaint)
</span><span class="cx">         invalidateLineLayoutPath();
</span><ins>+    
+    if (multiColumnFlowThread()) {
+        for (RenderBox* child = firstChildBox(); child; child = child-&gt;nextSiblingBox())
+            child-&gt;setStyle(RenderStyle::createAnonymousStyleWithDisplay(&amp;style(), BLOCK));
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderBlockFlow::styleWillChange(StyleDifference diff, const RenderStyle&amp; newStyle)
</span><span class="lines">@@ -3165,54 +3186,96 @@
</span><span class="cx"> 
</span><span class="cx"> bool RenderBlockFlow::relayoutForPagination(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer&amp; statePusher)
</span><span class="cx"> {
</span><del>-    if (!hasColumns())
</del><ins>+    if (!hasColumns() &amp;&amp; !multiColumnFlowThread())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;RenderOverflow&gt; savedOverflow = m_overflow.release();
-    if (childrenInline())
-        addOverflowFromInlineChildren();
-    else
-        addOverflowFromBlockChildren();
-    LayoutUnit layoutOverflowLogicalBottom = (isHorizontalWritingMode() ? layoutOverflowRect().maxY() : layoutOverflowRect().maxX()) - borderAndPaddingBefore();
</del><ins>+    if (hasColumns()) {
+        RefPtr&lt;RenderOverflow&gt; savedOverflow = m_overflow.release();
+        if (childrenInline())
+            addOverflowFromInlineChildren();
+        else
+            addOverflowFromBlockChildren();
+        LayoutUnit layoutOverflowLogicalBottom = (isHorizontalWritingMode() ? layoutOverflowRect().maxY() : layoutOverflowRect().maxX()) - borderAndPaddingBefore();
</ins><span class="cx"> 
</span><del>-    // FIXME: We don't balance properly at all in the presence of forced page breaks.  We need to understand what
-    // the distance between forced page breaks is so that we can avoid making the minimum column height too tall.
-    ColumnInfo* colInfo = columnInfo();
-    if (!hasSpecifiedPageLogicalHeight) {
-        LayoutUnit columnHeight = pageLogicalHeight;
-        int minColumnCount = colInfo-&gt;forcedBreaks() + 1;
-        int desiredColumnCount = colInfo-&gt;desiredColumnCount();
-        if (minColumnCount &gt;= desiredColumnCount) {
-            // The forced page breaks are in control of the balancing.  Just set the column height to the
-            // maximum page break distance.
-            if (!pageLogicalHeight) {
-                LayoutUnit distanceBetweenBreaks = std::max&lt;LayoutUnit&gt;(colInfo-&gt;maximumDistanceBetweenForcedBreaks(),
-                    view().layoutState()-&gt;pageLogicalOffset(this, borderAndPaddingBefore() + layoutOverflowLogicalBottom) - colInfo-&gt;forcedBreakOffset());
-                columnHeight = std::max(colInfo-&gt;minimumColumnHeight(), distanceBetweenBreaks);
</del><ins>+        // FIXME: We don't balance properly at all in the presence of forced page breaks. We need to understand what
+        // the distance between forced page breaks is so that we can avoid making the minimum column height too tall.
+        ColumnInfo* colInfo = columnInfo();
+        if (!hasSpecifiedPageLogicalHeight) {
+            LayoutUnit columnHeight = pageLogicalHeight;
+            int minColumnCount = colInfo-&gt;forcedBreaks() + 1;
+            int desiredColumnCount = colInfo-&gt;desiredColumnCount();
+            if (minColumnCount &gt;= desiredColumnCount) {
+                // The forced page breaks are in control of the balancing. Just set the column height to the
+                // maximum page break distance.
+                if (!pageLogicalHeight) {
+                    LayoutUnit distanceBetweenBreaks = std::max&lt;LayoutUnit&gt;(colInfo-&gt;maximumDistanceBetweenForcedBreaks(),
+                        view().layoutState()-&gt;pageLogicalOffset(this, borderAndPaddingBefore() + layoutOverflowLogicalBottom) - colInfo-&gt;forcedBreakOffset());
+                    columnHeight = std::max(colInfo-&gt;minimumColumnHeight(), distanceBetweenBreaks);
+                }
+            } else if (layoutOverflowLogicalBottom &gt; boundedMultiply(pageLogicalHeight, desiredColumnCount)) {
+                // Now that we know the intrinsic height of the columns, we have to rebalance them.
+                columnHeight = std::max&lt;LayoutUnit&gt;(colInfo-&gt;minimumColumnHeight(), ceilf((float)layoutOverflowLogicalBottom / desiredColumnCount));
</ins><span class="cx">             }
</span><del>-        } else if (layoutOverflowLogicalBottom &gt; boundedMultiply(pageLogicalHeight, desiredColumnCount)) {
-            // Now that we know the intrinsic height of the columns, we have to rebalance them.
-            columnHeight = std::max&lt;LayoutUnit&gt;(colInfo-&gt;minimumColumnHeight(), ceilf((float)layoutOverflowLogicalBottom / desiredColumnCount));
-        }
-        
-        if (columnHeight &amp;&amp; columnHeight != pageLogicalHeight) {
-            statePusher.pop();
-            setEverHadLayout(true);
-            layoutBlock(false, columnHeight);
-            return true;
-        }
-    } 
</del><ins>+            
+            if (columnHeight &amp;&amp; columnHeight != pageLogicalHeight) {
+                statePusher.pop();
+                setEverHadLayout(true);
+                layoutBlock(false, columnHeight);
+                return true;
+            }
+        } 
</ins><span class="cx"> 
</span><del>-    if (pageLogicalHeight)
-        colInfo-&gt;setColumnCountAndHeight(ceilf((float)layoutOverflowLogicalBottom / pageLogicalHeight), pageLogicalHeight);
</del><ins>+        if (pageLogicalHeight)
+            colInfo-&gt;setColumnCountAndHeight(ceilf((float)layoutOverflowLogicalBottom / pageLogicalHeight), pageLogicalHeight);
</ins><span class="cx"> 
</span><del>-    if (columnCount(colInfo)) {
-        setLogicalHeight(borderAndPaddingBefore() + colInfo-&gt;columnHeight() + borderAndPaddingAfter() + scrollbarLogicalHeight());
-        clearOverflow();
-    } else
-        m_overflow = savedOverflow.release();
</del><ins>+        if (columnCount(colInfo)) {
+            setLogicalHeight(borderAndPaddingBefore() + colInfo-&gt;columnHeight() + borderAndPaddingAfter() + scrollbarLogicalHeight());
+            clearOverflow();
+        } else
+            m_overflow = savedOverflow.release();
+        return false;
+    }
</ins><span class="cx">     
</span><del>-    return false;
</del><ins>+    if (!multiColumnFlowThread()-&gt;shouldRelayoutForPagination())
+        return false;
+    
+    multiColumnFlowThread()-&gt;setNeedsRebalancing(false);
+    multiColumnFlowThread()-&gt;setInBalancingPass(true); // Prevent re-entering this method (and recursion into layout).
+
+    bool needsRelayout;
+    bool neededRelayout = false;
+    bool firstPass = true;
+    do {
+        // Column heights may change here because of balancing. We may have to do multiple layout
+        // passes, depending on how the contents is fitted to the changed column heights. In most
+        // cases, laying out again twice or even just once will suffice. Sometimes we need more
+        // passes than that, though, but the number of retries should not exceed the number of
+        // columns, unless we have a bug.
+        needsRelayout = false;
+        for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox-&gt;nextSiblingBox())
+            if (childBox != multiColumnFlowThread() &amp;&amp; childBox-&gt;isRenderMultiColumnSet()) {
+                RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(childBox);
+                if (multicolSet-&gt;recalculateBalancedHeight(firstPass)) {
+                    multicolSet-&gt;setChildNeedsLayout(MarkOnlyThis);
+                    needsRelayout = true;
+                }
+            }
+
+        if (needsRelayout) {
+            // Layout again. Column balancing resulted in a new height.
+            neededRelayout = true;
+            multiColumnFlowThread()-&gt;setChildNeedsLayout(MarkOnlyThis);
+            setChildNeedsLayout(MarkOnlyThis);
+            if (firstPass)
+                statePusher.pop();
+            layoutBlock(false);
+        }
+        firstPass = false;
+    } while (needsRelayout);
+    
+    multiColumnFlowThread()-&gt;setInBalancingPass(false);
+    
+    return neededRelayout;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderBlockFlow::hasLines() const
</span><span class="lines">@@ -3411,5 +3474,109 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> 
</span><ins>+RenderObject* RenderBlockFlow::layoutSpecialExcludedChild(bool relayoutChildren)
+{
+    if (!multiColumnFlowThread())
+        return 0;
+
+    // Update the dimensions of our regions before we lay out the flow thread.
+    // FIXME: Eventually this is going to get way more complicated, and we will be destroying regions
+    // instead of trying to keep them around.
+    bool shouldInvalidateRegions = false;
+    for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox-&gt;nextSiblingBox()) {
+        if (childBox == multiColumnFlowThread())
+            continue;
+
+        if (relayoutChildren || childBox-&gt;needsLayout()) {
+            if (!multiColumnFlowThread()-&gt;inBalancingPass() &amp;&amp; childBox-&gt;isRenderMultiColumnSet())
+                toRenderMultiColumnSet(childBox)-&gt;prepareForLayout();
+            shouldInvalidateRegions = true;
+        }
+    }
+    
+    if (shouldInvalidateRegions)
+        multiColumnFlowThread()-&gt;invalidateRegions();
+
+    if (relayoutChildren)
+        multiColumnFlowThread()-&gt;setChildNeedsLayout(MarkOnlyThis);
+    
+    if (multiColumnFlowThread()-&gt;requiresBalancing()) {
+        // At the end of multicol layout, relayoutForPagination() is called unconditionally, but if
+        // no children are to be laid out (e.g. fixed width with layout already being up-to-date),
+        // we want to prevent it from doing any work, so that the column balancing machinery doesn't
+        // kick in and trigger additional unnecessary layout passes. Actually, it's not just a good
+        // idea in general to not waste time on balancing content that hasn't been re-laid out; we
+        // are actually required to guarantee this. The calculation of implicit breaks needs to be
+        // preceded by a proper layout pass, since it's layout that sets up content runs, and the
+        // runs get deleted right after every pass.
+        multiColumnFlowThread()-&gt;setNeedsRebalancing(shouldInvalidateRegions || multiColumnFlowThread()-&gt;needsLayout());
+    }
+
+    setLogicalTopForChild(*multiColumnFlowThread(), borderAndPaddingBefore());
+    multiColumnFlowThread()-&gt;layoutIfNeeded();
+    determineLogicalLeftPositionForChild(*multiColumnFlowThread());
+    
+    return multiColumnFlowThread();
</ins><span class="cx"> }
</span><ins>+
+
+bool RenderBlockFlow::updateLogicalWidthAndColumnWidth()
+{
+    bool relayoutChildren = RenderBlock::updateLogicalWidthAndColumnWidth();
+    if (multiColumnFlowThread() &amp;&amp; multiColumnFlowThread()-&gt;computeColumnCountAndWidth())
+        relayoutChildren = true;
+    return relayoutChildren;
+}
+
+
+void RenderBlockFlow::addChild(RenderObject* newChild, RenderObject* beforeChild)
+{
+    if (multiColumnFlowThread())
+        return multiColumnFlowThread()-&gt;addChild(newChild, beforeChild);
+    RenderBlock::addChild(newChild, beforeChild);
+}
+
+
+void RenderBlockFlow::checkForPaginationLogicalHeightChange(LayoutUnit&amp; pageLogicalHeight, bool&amp; pageLogicalHeightChanged, bool&amp; hasSpecifiedPageLogicalHeight)
+{
+    // If we don't use either of the two column implementations or a flow thread, then bail.
+    if (!isRenderFlowThread() &amp;&amp; !multiColumnFlowThread() &amp;&amp; !hasColumns())
+        return;
+    
+    // We don't actually update any of the variables. We just subclassed to adjust our column height.
+    if (multiColumnFlowThread()) {
+        updateLogicalHeight();
+        multiColumnFlowThread()-&gt;setColumnHeightAvailable(std::max&lt;LayoutUnit&gt;(contentLogicalHeight(), 0));
+        setLogicalHeight(0);
+    } else if (hasColumns()) {
+        ColumnInfo* colInfo = columnInfo();
+    
+        if (!pageLogicalHeight) {
+            // We need to go ahead and set our explicit page height if one exists, so that we can
+            // avoid doing two layout passes.
+            updateLogicalHeight();
+            LayoutUnit columnHeight = isRenderView() ? view().pageOrViewLogicalHeight() : contentLogicalHeight();
+            if (columnHeight &gt; 0) {
+                pageLogicalHeight = columnHeight;
+                hasSpecifiedPageLogicalHeight = true;
+            }
+            setLogicalHeight(0);
+        }
+
+        if (colInfo-&gt;columnHeight() != pageLogicalHeight &amp;&amp; everHadLayout())
+            pageLogicalHeightChanged = true;
+
+        colInfo-&gt;setColumnHeight(pageLogicalHeight);
+        
+        if (!hasSpecifiedPageLogicalHeight &amp;&amp; !pageLogicalHeight)
+            colInfo-&gt;clearForcedBreaks();
+
+        colInfo-&gt;setPaginationUnit(paginationUnit());
+    } else if (isRenderFlowThread()) {
+        pageLogicalHeight = 1; // This is just a hack to always make sure we have a page logical height.
+        pageLogicalHeightChanged = toRenderFlowThread(this)-&gt;pageLogicalSizeChanged();
+    }
+}
+
+}
</ins><span class="cx"> // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.h        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -374,6 +374,10 @@
</span><span class="cx">     LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBoundaryRule = IncludePageBoundary) const;
</span><span class="cx">     bool hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule = ExcludePageBoundary) const;
</span><span class="cx"> 
</span><ins>+    void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override;
+    
+    void createMultiColumnFlowThreadIfNeeded();
+    
</ins><span class="cx"> protected:
</span><span class="cx">     // A page break is required at some offset due to space shortage in the current fragmentainer.
</span><span class="cx">     void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage);
</span><span class="lines">@@ -427,8 +431,18 @@
</span><span class="cx"> 
</span><span class="cx">     virtual int firstLineBaseline() const override;
</span><span class="cx">     virtual int inlineBlockBaseline(LineDirectionMode) const override;
</span><ins>+    
+    bool updateLogicalWidthAndColumnWidth() override;
</ins><span class="cx"> 
</span><ins>+    virtual bool isMultiColumnBlockFlow() const override { return multiColumnFlowThread(); }
+    
</ins><span class="cx"> private:
</span><ins>+    // Called to lay out the legend for a fieldset or the ruby text of a ruby run. Also used by multi-column layout to handle
+    // the flow thread child.
+    virtual RenderObject* layoutSpecialExcludedChild(bool /*relayoutChildren*/);
+
+    void checkForPaginationLogicalHeightChange(LayoutUnit&amp; pageLogicalHeight, bool&amp; pageLogicalHeightChanged, bool&amp; hasSpecifiedPageLogicalHeight);
+    
</ins><span class="cx">     virtual void paintInlineChildren(PaintInfo&amp;, const LayoutPoint&amp;) override;
</span><span class="cx">     virtual void paintFloats(PaintInfo&amp;, const LayoutPoint&amp;, bool preservePhase = false) override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -4436,7 +4436,7 @@
</span><span class="cx">     return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() &amp;&amp; isWritingModeRoot())
</span><span class="cx">         // FIXME: Treat multi-column elements as unsplittable for now. Remove once we implement the correct
</span><span class="cx">         // fragmentation model for multicolumn.
</span><del>-        || isRenderMultiColumnBlock();
</del><ins>+        || isMultiColumnBlockFlow();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction, LinePositionMode /*linePositionMode*/) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.cpp        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderLineBreak.h&quot;
</span><span class="cx"> #include &quot;RenderListItem.h&quot;
</span><del>-#include &quot;RenderMultiColumnBlock.h&quot;
</del><span class="cx"> #include &quot;RenderRegion.h&quot;
</span><span class="cx"> #include &quot;RenderRuby.h&quot;
</span><span class="cx"> #include &quot;RenderRubyText.h&quot;
</span><span class="lines">@@ -124,8 +123,6 @@
</span><span class="cx"> 
</span><span class="cx"> RenderPtr&lt;RenderElement&gt; RenderElement::createFor(Element&amp; element, PassRef&lt;RenderStyle&gt; style)
</span><span class="cx"> {
</span><del>-    Document&amp; document = element.document();
-
</del><span class="cx">     // Minimal support for content properties replacing an entire element.
</span><span class="cx">     // Works only if we have exactly one piece of content and it's a URL.
</span><span class="cx">     // Otherwise acts as if we didn't support this feature.
</span><span class="lines">@@ -157,8 +154,6 @@
</span><span class="cx">     case INLINE_BLOCK:
</span><span class="cx">     case RUN_IN:
</span><span class="cx">     case COMPACT:
</span><del>-        if ((!style.get().hasAutoColumnCount() || !style.get().hasAutoColumnWidth()) &amp;&amp; document.regionBasedColumnsEnabled())
-            return createRenderer&lt;RenderMultiColumnBlock&gt;(element, std::move(style));
</del><span class="cx">         return createRenderer&lt;RenderBlockFlow&gt;(element, std::move(style));
</span><span class="cx">     case LIST_ITEM:
</span><span class="cx">         return createRenderer&lt;RenderListItem&gt;(element, std::move(style));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnBlockcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -1,198 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;RenderMultiColumnBlock.h&quot;
-
-#include &quot;RenderMultiColumnFlowThread.h&quot;
-#include &quot;RenderMultiColumnSet.h&quot;
-#include &quot;RenderView.h&quot;
-#include &quot;StyleInheritedData.h&quot;
-
-namespace WebCore {
-
-RenderMultiColumnBlock::RenderMultiColumnBlock(Element&amp; element, PassRef&lt;RenderStyle&gt; stylePtr)
-    : RenderBlockFlow(element, std::move(stylePtr))
-{
-    setChildrenInline(false);
-    RenderMultiColumnFlowThread* flowThread = new RenderMultiColumnFlowThread(document(), RenderStyle::createAnonymousStyleWithDisplay(&amp;style(), BLOCK));
-    flowThread-&gt;initializeStyle();
-    RenderBlockFlow::addChild(flowThread);
-    setMultiColumnFlowThread(flowThread);
-}
-
-bool RenderMultiColumnBlock::requiresBalancing() const
-{
-    return multiColumnFlowThread()-&gt;requiresBalancing();
-}
-
-LayoutUnit RenderMultiColumnBlock::columnHeightAvailable() const
-{
-    return multiColumnFlowThread()-&gt;columnHeightAvailable();
-}
-
-LayoutUnit RenderMultiColumnBlock::columnWidth() const
-{
-    return multiColumnFlowThread()-&gt;columnWidth();
-}
-
-unsigned RenderMultiColumnBlock::columnCount() const
-{
-    return multiColumnFlowThread()-&gt;columnCount();
-}
-    
-void RenderMultiColumnBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
-{
-    RenderBlockFlow::styleDidChange(diff, oldStyle);
-    for (RenderBox* child = firstChildBox(); child; child = child-&gt;nextSiblingBox())
-        child-&gt;setStyle(RenderStyle::createAnonymousStyleWithDisplay(&amp;style(), BLOCK));
-}
-
-bool RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth()
-{
-    bool relayoutChildren = RenderBlockFlow::updateLogicalWidthAndColumnWidth();
-    if (multiColumnFlowThread()-&gt;computeColumnCountAndWidth())
-        relayoutChildren = true;
-    return relayoutChildren;
-}
-
-void RenderMultiColumnBlock::checkForPaginationLogicalHeightChange(LayoutUnit&amp; /*pageLogicalHeight*/, bool&amp; /*pageLogicalHeightChanged*/, bool&amp; /*hasSpecifiedPageLogicalHeight*/)
-{
-    // We don't actually update any of the variables. We just subclassed to adjust our column height.
-    updateLogicalHeight();
-    multiColumnFlowThread()-&gt;setColumnHeightAvailable(std::max&lt;LayoutUnit&gt;(contentLogicalHeight(), 0));
-    setLogicalHeight(0);
-}
-
-bool RenderMultiColumnBlock::relayoutForPagination(bool, LayoutUnit, LayoutStateMaintainer&amp; statePusher)
-{
-    if (!multiColumnFlowThread()-&gt;shouldRelayoutForPagination())
-        return false;
-    
-    multiColumnFlowThread()-&gt;setNeedsRebalancing(false);
-    multiColumnFlowThread()-&gt;setInBalancingPass(true); // Prevent re-entering this method (and recursion into layout).
-
-    bool needsRelayout;
-    bool neededRelayout = false;
-    bool firstPass = true;
-    do {
-        // Column heights may change here because of balancing. We may have to do multiple layout
-        // passes, depending on how the contents is fitted to the changed column heights. In most
-        // cases, laying out again twice or even just once will suffice. Sometimes we need more
-        // passes than that, though, but the number of retries should not exceed the number of
-        // columns, unless we have a bug.
-        needsRelayout = false;
-        for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox-&gt;nextSiblingBox())
-            if (childBox != multiColumnFlowThread() &amp;&amp; childBox-&gt;isRenderMultiColumnSet()) {
-                RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(childBox);
-                if (multicolSet-&gt;recalculateBalancedHeight(firstPass)) {
-                    multicolSet-&gt;setChildNeedsLayout(MarkOnlyThis);
-                    needsRelayout = true;
-                }
-            }
-
-        if (needsRelayout) {
-            // Layout again. Column balancing resulted in a new height.
-            neededRelayout = true;
-            multiColumnFlowThread()-&gt;setChildNeedsLayout(MarkOnlyThis);
-            setChildNeedsLayout(MarkOnlyThis);
-            if (firstPass)
-                statePusher.pop();
-            layoutBlock(false);
-        }
-        firstPass = false;
-    } while (needsRelayout);
-    
-    multiColumnFlowThread()-&gt;setInBalancingPass(false);
-    
-    return neededRelayout;
-}
-
-void RenderMultiColumnBlock::addChild(RenderObject* newChild, RenderObject* beforeChild)
-{
-    multiColumnFlowThread()-&gt;addChild(newChild, beforeChild);
-}
-    
-RenderObject* RenderMultiColumnBlock::layoutSpecialExcludedChild(bool relayoutChildren)
-{
-    // Update the dimensions of our regions before we lay out the flow thread.
-    // FIXME: Eventually this is going to get way more complicated, and we will be destroying regions
-    // instead of trying to keep them around.
-    bool shouldInvalidateRegions = false;
-    for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox-&gt;nextSiblingBox()) {
-        if (childBox == multiColumnFlowThread())
-            continue;
-
-        if (relayoutChildren || childBox-&gt;needsLayout()) {
-            if (!multiColumnFlowThread()-&gt;inBalancingPass() &amp;&amp; childBox-&gt;isRenderMultiColumnSet())
-                toRenderMultiColumnSet(childBox)-&gt;prepareForLayout();
-            shouldInvalidateRegions = true;
-        }
-    }
-    
-    if (shouldInvalidateRegions)
-        multiColumnFlowThread()-&gt;invalidateRegions();
-
-    if (relayoutChildren)
-        multiColumnFlowThread()-&gt;setChildNeedsLayout(MarkOnlyThis);
-    
-    if (multiColumnFlowThread()-&gt;requiresBalancing()) {
-        // At the end of multicol layout, relayoutForPagination() is called unconditionally, but if
-        // no children are to be laid out (e.g. fixed width with layout already being up-to-date),
-        // we want to prevent it from doing any work, so that the column balancing machinery doesn't
-        // kick in and trigger additional unnecessary layout passes. Actually, it's not just a good
-        // idea in general to not waste time on balancing content that hasn't been re-laid out; we
-        // are actually required to guarantee this. The calculation of implicit breaks needs to be
-        // preceded by a proper layout pass, since it's layout that sets up content runs, and the
-        // runs get deleted right after every pass.
-        multiColumnFlowThread()-&gt;setNeedsRebalancing(shouldInvalidateRegions || multiColumnFlowThread()-&gt;needsLayout());
-    }
-
-    setLogicalTopForChild(*multiColumnFlowThread(), borderAndPaddingBefore());
-    multiColumnFlowThread()-&gt;layoutIfNeeded();
-    determineLogicalLeftPositionForChild(*multiColumnFlowThread());
-    
-    return multiColumnFlowThread();
-}
-
-const char* RenderMultiColumnBlock::renderName() const
-{
-    if (isFloating())
-        return &quot;RenderMultiColumnBlock (floating)&quot;;
-    if (isOutOfFlowPositioned())
-        return &quot;RenderMultiColumnBlock (positioned)&quot;;
-    if (isAnonymousBlock())
-        return &quot;RenderMultiColumnBlock (anonymous)&quot;;
-    // FIXME: Temporary hack while the new generated content system is being implemented.
-    if (isPseudoElement())
-        return &quot;RenderMultiColumnBlock (generated)&quot;;
-    if (isAnonymous())
-        return &quot;RenderMultiColumnBlock (generated)&quot;;
-    if (isRelPositioned())
-        return &quot;RenderMultiColumnBlock (relative positioned)&quot;;
-    return &quot;RenderMultiColumnBlock&quot;;
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnBlockh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/rendering/RenderMultiColumnBlock.h (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnBlock.h        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnBlock.h        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -1,72 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef RenderMultiColumnBlock_h
-#define RenderMultiColumnBlock_h
-
-#include &quot;RenderBlockFlow.h&quot;
-
-namespace WebCore {
-
-class RenderMultiColumnFlowThread;
-
-class RenderMultiColumnBlock final : public RenderBlockFlow {
-public:
-    RenderMultiColumnBlock(Element&amp;, PassRef&lt;RenderStyle&gt;);
-    Element&amp; element() const { return toElement(nodeForNonAnonymous()); }
-
-    LayoutUnit columnHeightAvailable() const;
-
-    LayoutUnit columnWidth() const;
-    unsigned columnCount() const;
-
-    bool requiresBalancing() const;
-    
-private:
-    virtual bool isRenderMultiColumnBlock() const { return true; }
-    virtual const char* renderName() const;
-
-    virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren) override;
-
-    virtual void styleDidChange(StyleDifference, const RenderStyle*) override;
-    
-    virtual bool updateLogicalWidthAndColumnWidth() override;
-    virtual void checkForPaginationLogicalHeightChange(LayoutUnit&amp; pageLogicalHeight, bool&amp; pageLogicalHeightChanged, bool&amp; hasSpecifiedPageLogicalHeight) override;
-    virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer&amp;) override;
-
-    virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override;
-
-    void computeColumnCountAndWidth();
-
-    void ensureColumnSets();
-};
-
-RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnBlock, isRenderMultiColumnBlock())
-
-} // namespace WebCore
-
-#endif // RenderMultiColumnBlock_h
-
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;RenderMultiColumnFlowThread.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;RenderMultiColumnBlock.h&quot;
</del><span class="cx"> #include &quot;RenderMultiColumnSet.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -60,8 +59,7 @@
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderMultiColumnFlowThread::initialLogicalWidth() const
</span><span class="cx"> {
</span><del>-    RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
-    return parentBlock-&gt;columnWidth();
</del><ins>+    return columnWidth();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderMultiColumnFlowThread::computeColumnCountAndWidth()
</span><span class="lines">@@ -124,7 +122,7 @@
</span><span class="cx">     
</span><span class="cx">     invalidateRegions();
</span><span class="cx"> 
</span><del>-    RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
</del><ins>+    RenderBlockFlow* parentBlock = toRenderBlockFlow(parent());
</ins><span class="cx">     firstSet = new RenderMultiColumnSet(*this, RenderStyle::createAnonymousStyleWithDisplay(&amp;parentBlock-&gt;style(), BLOCK));
</span><span class="cx">     firstSet-&gt;initializeStyle();
</span><span class="cx">     parentBlock-&gt;RenderBlock::addChild(firstSet);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;PaintInfo.h&quot;
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><del>-#include &quot;RenderMultiColumnBlock.h&quot;
</del><span class="cx"> #include &quot;RenderMultiColumnFlowThread.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -46,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderMultiColumnSet::heightAdjustedForSetOffset(LayoutUnit height) const
</span><span class="cx"> {
</span><del>-    RenderMultiColumnBlock* multicolBlock = toRenderMultiColumnBlock(parent());
</del><ins>+    RenderBlockFlow* multicolBlock = toRenderBlockFlow(parent());
</ins><span class="cx">     LayoutUnit contentLogicalTop = logicalTop() - multicolBlock-&gt;borderAndPaddingBefore();
</span><span class="cx"> 
</span><span class="cx">     height -= contentLogicalTop;
</span><span class="lines">@@ -152,7 +151,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderMultiColumnSet::addForcedBreak(LayoutUnit offsetFromFirstPage)
</span><span class="cx"> {
</span><del>-    if (!toRenderMultiColumnBlock(parent())-&gt;requiresBalancing())
</del><ins>+    if (!toRenderBlockFlow(parent())-&gt;multiColumnFlowThread()-&gt;requiresBalancing())
</ins><span class="cx">         return;
</span><span class="cx">     if (!m_contentRuns.isEmpty() &amp;&amp; offsetFromFirstPage &lt;= m_contentRuns.last().breakOffset())
</span><span class="cx">         return;
</span><span class="lines">@@ -164,7 +163,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool RenderMultiColumnSet::recalculateBalancedHeight(bool initial)
</span><span class="cx"> {
</span><del>-    ASSERT(toRenderMultiColumnBlock(parent())-&gt;requiresBalancing());
</del><ins>+    ASSERT(toRenderBlockFlow(parent())-&gt;multiColumnFlowThread()-&gt;requiresBalancing());
</ins><span class="cx"> 
</span><span class="cx">     LayoutUnit oldColumnHeight = m_computedColumnHeight;
</span><span class="cx">     if (initial)
</span><span class="lines">@@ -200,8 +199,8 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderMultiColumnSet::updateLogicalWidth()
</span><span class="cx"> {
</span><del>-    RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
-    setComputedColumnWidthAndCount(parentBlock-&gt;columnWidth(), parentBlock-&gt;columnCount()); // FIXME: This will eventually vary if we are contained inside regions.
</del><ins>+    RenderBlockFlow* parentBlock = toRenderBlockFlow(parent());
+    setComputedColumnWidthAndCount(parentBlock-&gt;multiColumnFlowThread()-&gt;columnWidth(), parentBlock-&gt;multiColumnFlowThread()-&gt;columnCount()); // FIXME: This will eventually vary if we are contained inside regions.
</ins><span class="cx">     
</span><span class="cx">     // FIXME: When we add regions support, we'll start it off at the width of the multi-column
</span><span class="cx">     // block in that particular region.
</span><span class="lines">@@ -222,7 +221,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderMultiColumnSet::prepareForLayout()
</span><span class="cx"> {
</span><del>-    RenderMultiColumnBlock* multicolBlock = toRenderMultiColumnBlock(parent());
</del><ins>+    RenderBlockFlow* multicolBlock = toRenderBlockFlow(parent());
</ins><span class="cx">     const RenderStyle&amp; multicolStyle = multicolBlock-&gt;style();
</span><span class="cx"> 
</span><span class="cx">     // Set box logical top.
</span><span class="lines">@@ -248,7 +247,7 @@
</span><span class="cx">         m_maxColumnHeight = heightAdjustedForSetOffset(m_maxColumnHeight);
</span><span class="cx">         m_computedColumnHeight = 0; // Restart balancing.
</span><span class="cx">     } else
</span><del>-        setAndConstrainColumnHeight(heightAdjustedForSetOffset(multicolBlock-&gt;columnHeightAvailable()));
</del><ins>+        setAndConstrainColumnHeight(heightAdjustedForSetOffset(multicolBlock-&gt;multiColumnFlowThread()-&gt;columnHeightAvailable()));
</ins><span class="cx"> 
</span><span class="cx">     clearForcedBreaks();
</span><span class="cx"> 
</span><span class="lines">@@ -266,7 +265,7 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Eventually we will cache the column gap when the widths of columns start varying, but for now we just
</span><span class="cx">     // go to the parent block to get the gap.
</span><del>-    RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
</del><ins>+    RenderBlockFlow* parentBlock = toRenderBlockFlow(parent());
</ins><span class="cx">     if (parentBlock-&gt;style().hasNormalColumnGap())
</span><span class="cx">         return parentBlock-&gt;style().fontDescription().computedPixelSize(); // &quot;1em&quot; is recommended as the normal gap setting. Matches &lt;p&gt; margins.
</span><span class="cx">     return parentBlock-&gt;style().columnGap();
</span><span class="lines">@@ -396,7 +395,7 @@
</span><span class="cx">     if (paintInfo.context-&gt;paintingDisabled())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    const RenderStyle&amp; blockStyle = toRenderMultiColumnBlock(parent())-&gt;style();
</del><ins>+    const RenderStyle&amp; blockStyle = parent()-&gt;style();
</ins><span class="cx">     const Color&amp; ruleColor = blockStyle.visitedDependentColor(CSSPropertyWebkitColumnRuleColor);
</span><span class="cx">     bool ruleTransparent = blockStyle.columnRuleIsTransparent();
</span><span class="cx">     EBorderStyle ruleStyle = blockStyle.columnRuleStyle();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -369,7 +369,7 @@
</span><span class="cx">     bool isInFlowRenderFlowThread() const { return isRenderFlowThread() &amp;&amp; !isOutOfFlowPositioned(); }
</span><span class="cx">     bool isOutOfFlowRenderFlowThread() const { return isRenderFlowThread() &amp;&amp; isOutOfFlowPositioned(); }
</span><span class="cx"> 
</span><del>-    virtual bool isRenderMultiColumnBlock() const { return false; }
</del><ins>+    virtual bool isMultiColumnBlockFlow() const { return false; }
</ins><span class="cx">     virtual bool isRenderMultiColumnSet() const { return false; }
</span><span class="cx"> 
</span><span class="cx">     virtual bool isRenderScrollbarPart() const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderingAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderingAllInOne.cpp (162711 => 162712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderingAllInOne.cpp        2014-01-24 19:07:31 UTC (rev 162711)
+++ trunk/Source/WebCore/rendering/RenderingAllInOne.cpp        2014-01-24 19:55:33 UTC (rev 162712)
</span><span class="lines">@@ -79,7 +79,6 @@
</span><span class="cx"> #include &quot;RenderMediaControls.cpp&quot;
</span><span class="cx"> #include &quot;RenderMenuList.cpp&quot;
</span><span class="cx"> #include &quot;RenderMeter.cpp&quot;
</span><del>-#include &quot;RenderMultiColumnBlock.cpp&quot;
</del><span class="cx"> #include &quot;RenderMultiColumnFlowThread.cpp&quot;
</span><span class="cx"> #include &quot;RenderMultiColumnSet.cpp&quot;
</span><span class="cx"> #include &quot;RenderObject.cpp&quot;
</span></span></pre>
</div>
</div>

</body>
</html>