<!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>[167808] 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/167808">167808</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2014-04-25 09:21:38 -0700 (Fri, 25 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[New Multicolumn] Add support for offsetLeft and offsetTop.
https://bugs.webkit.org/show_bug.cgi?id=132080

Reviewed by Andrei Bucur.


Source/WebCore: 
Added fast/multicol/client-spanners-complex.html and offset-top-left.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
Patch the offsetLeft/Top loop to handle calling into RenderMultiColumnFlowThread
in order to adjust the coordinates for the new multicolumn layout.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
Modified to use a helper that can be shared by offsetLeft/Top code. This code
ran for client rects, and I'm moving/refactoring it for more sharing.

(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
* rendering/RenderMultiColumnFlowThread.h:
New functions that beef up what was in mapFromFlowToRegion and fix some bugs
with the translation code.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::columnTranslationForOffset):
Patched to factor in the flow thread portion rect of the specific multicolumn set.

* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderMultiColumnFlowThread):
Added for toRenderMultiColumnFlowThread capability.

LayoutTests: 
* fast/multicol/client-rects-spanners-complex.html: Added.
* fast/multicol/client-rects-spanners.html:
* fast/multicol/offset-top-left-expected.txt: Added.
* fast/multicol/offset-top-left.html: Added.
* platform/mac/fast/multicol/client-rects-spanners-complex-expected.png: Added.
* platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt: 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="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnFlowThreadcpp">trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnFlowThreadh">trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h</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>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastmulticolclientrectsspannerscomplexhtml">trunk/LayoutTests/fast/multicol/client-rects-spanners-complex.html</a></li>
<li><a href="#trunkLayoutTestsfastmulticoloffsettopleftexpectedtxt">trunk/LayoutTests/fast/multicol/offset-top-left-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmulticoloffsettoplefthtml">trunk/LayoutTests/fast/multicol/offset-top-left.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastmulticolclientrectsspannerscomplexexpectedpng">trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastmulticolclientrectsspannerscomplexexpectedtxt">trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167807 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-25 15:27:55 UTC (rev 167807)
+++ trunk/LayoutTests/ChangeLog        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-04-24  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        [New Multicolumn] Add support for offsetLeft and offsetTop.
+        https://bugs.webkit.org/show_bug.cgi?id=132080
+
+        Reviewed by Andrei Bucur.
+
+        * fast/multicol/client-rects-spanners-complex.html: Added.
+        * fast/multicol/client-rects-spanners.html:
+        * fast/multicol/offset-top-left-expected.txt: Added.
+        * fast/multicol/offset-top-left.html: Added.
+        * platform/mac/fast/multicol/client-rects-spanners-complex-expected.png: Added.
+        * platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt: Added.
+
</ins><span class="cx"> 2014-04-25  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ScrollingCoordinator is unaware of topContentInset
</span></span></pre></div>
<a id="trunkLayoutTestsfastmulticolclientrectsspannerscomplexhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/client-rects-spanners-complex.html (0 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/client-rects-spanners-complex.html                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/client-rects-spanners-complex.html        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -0,0 +1,257 @@
</span><ins>+&lt;head&gt;
+&lt;script&gt;
+internals.settings.setRegionBasedColumnsEnabled(true)
+&lt;/script&gt;
+&lt;style&gt;
+    div.columns {
+        display:inline-block;
+        -webkit-logical-height: 90px;
+        -webkit-logical-width: 100px;
+        -webkit-margin-before: 10px;
+        -webkit-margin-after: 10px;
+         padding: 5px;
+        border: solid black;
+        font-family: ahem;
+        font-size: 25px;
+        color: lightblue;
+        -webkit-columns: 2;
+        -webkit-column-gap: 5px;
+        -webkit-column-fill: auto;
+        columns: 2;
+        column-gap: 5px;
+        column-fill: auto;
+    }
+
+    div.marker {
+        position: absolute;
+        border: solid rgba(0, 0, 255, 0.5);
+        -webkit-box-sizing: border-box;
+    }
+
+    input[type=&quot;range&quot;] {
+        -webkit-appearance: none;
+        width: 25px;
+        height: 25px;
+        background-color: lightblue;
+    }
+
+    input[type=&quot;range&quot;]::-webkit-slider-thumb {
+        -webkit-appearance: none;
+    }
+
+    .vertical { -webkit-writing-mode: vertical-lr; }
+    .vertical.flipped { -webkit-writing-mode: vertical-rl; }
+
+    div.span { -webkit-column-span: all; -webkit-logical-height:30px; background-color:silver; }
+    
+    div.above { background-color: navy; -webkit-logical-height:10px; }
+    
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;p&gt;
+    The blue borders should coincide with light blue squares, like this:
+    &lt;span style=&quot;display: inline-block; background-color: lightblue; border: solid rgba(0, 0, 255, 0.5); width: 19px; height: 19px;&quot;&gt;&lt;/span&gt;.
+    There should be none of this:
+    &lt;span style=&quot;display: inline-block; background-color: lightblue; width: 25px; height: 25px;&quot;&gt;&lt;/span&gt;
+    or this:
+    &lt;span style=&quot;display: inline-block; border: solid rgba(0, 0, 255, 0.5); width: 19px; height: 19px;&quot;&gt;&lt;/span&gt;.
+&lt;/p&gt;
+&lt;div class=&quot;columns&quot; id=&quot;t1&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;x y z
+&lt;/div&gt;
+
+&lt;div class=&quot;columns&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;span id=&quot;t2&quot;&gt;x y z&lt;/span&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div id=&quot;t3&quot;&gt;x y z&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div id=&quot;t4&quot;&gt;&lt;br&gt;y z&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;input id=&quot;t5&quot; type=&quot;range&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;img id=&quot;t6&quot; style=&quot;width: 25px; height: 25px; background-color: lightblue;&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&quot;columns&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;t7&quot; style=&quot; margin-top: 40px; width: 25px; height: 25px; background-color: lightblue;&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical&quot; id=&quot;t8&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;x y z
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;span id=&quot;t9&quot;&gt;x y z&lt;/span&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div id=&quot;t10&quot;&gt;x y z&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div id=&quot;t11&quot;&gt;&lt;br&gt;y z&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;input id=&quot;t12&quot; type=&quot;range&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;img id=&quot;t13&quot; style=&quot;width: 25px; height: 25px; background-color: lightblue;&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&quot;columns vertical&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;t14&quot; style=&quot; -webkit-margin-before: 40px; width: 25px; height: 25px; background-color: lightblue;&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+
+&lt;div class=&quot;columns vertical flipped&quot; id=&quot;t15&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;x y z
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical flipped&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;span id=&quot;t16&quot;&gt;x y z&lt;/span&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical flipped&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div id=&quot;t17&quot;&gt;x y z&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical flipped&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div id=&quot;t18&quot;&gt;&lt;br&gt;y z&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical flipped&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;input id=&quot;t19&quot; type=&quot;range&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;columns vertical flipped&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;img id=&quot;t20&quot; style=&quot;width: 25px; height: 25px; background-color: lightblue;&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&quot;columns vertical flipped&quot;&gt;&lt;div class=&quot;above&quot;&gt;&lt;/div&gt;&lt;div class=&quot;span&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;t21&quot; style=&quot;-webkit-margin-before: 40px; width: 25px; height: 25px; background-color: lightblue;&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;script&gt;
+    function placeMarker(clientRect)
+    {
+        var marker = document.body.appendChild(document.createElement(&quot;div&quot;));
+        marker.className = &quot;marker&quot;;
+        marker.style.left = clientRect.left + &quot;px&quot;;
+        marker.style.top = clientRect.top + &quot;px&quot;;
+        marker.style.width = clientRect.width + &quot;px&quot;;
+        marker.style.height = clientRect.height + &quot;px&quot;;
+    }
+
+    function placeMarkersForRange(range, startOffset)
+    {
+        if (startOffset === undefined)
+            startOffset = 0;
+
+        var clientRects = range.getClientRects();
+        for (var i = startOffset; i &lt; clientRects.length; ++i)
+            placeMarker(clientRects[i]);
+    }
+
+    var range = document.createRange();
+
+    var textNode = document.getElementById(&quot;t1&quot;).firstChild.nextSibling.nextSibling.nextSibling.nextSibling;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    textNode = document.getElementById(&quot;t2&quot;).firstChild;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    textNode = document.getElementById(&quot;t3&quot;).firstChild;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    var block = document.getElementById(&quot;t4&quot;);
+    range.selectNode(block);
+    placeMarkersForRange(range, 1);
+
+    var slider = document.getElementById(&quot;t5&quot;);
+    range.selectNode(slider);
+    placeMarkersForRange(range);
+
+    var image = document.getElementById(&quot;t6&quot;);
+    range.selectNode(image);
+    placeMarkersForRange(range);
+
+    var div = document.getElementById(&quot;t7&quot;);
+    range.selectNode(div);
+    placeMarkersForRange(div);
+    
+    var textNode = document.getElementById(&quot;t8&quot;).firstChild.nextSibling.nextSibling.nextSibling.nextSibling;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    textNode = document.getElementById(&quot;t9&quot;).firstChild;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    textNode = document.getElementById(&quot;t10&quot;).firstChild;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    var block = document.getElementById(&quot;t11&quot;);
+    range.selectNode(block);
+    placeMarkersForRange(range, 1);
+
+    var slider = document.getElementById(&quot;t12&quot;);
+    range.selectNode(slider);
+    placeMarkersForRange(range);
+
+    var image = document.getElementById(&quot;t13&quot;);
+    range.selectNode(image);
+    placeMarkersForRange(range);
+
+    var div = document.getElementById(&quot;t14&quot;);
+    range.selectNode(div);
+    placeMarkersForRange(div);
+    
+    var textNode = document.getElementById(&quot;t15&quot;).firstChild.nextSibling.nextSibling.nextSibling.nextSibling;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    textNode = document.getElementById(&quot;t16&quot;).firstChild;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    textNode = document.getElementById(&quot;t17&quot;).firstChild;
+    range.setStart(textNode, 0);
+    range.setEnd(textNode, 5);
+    placeMarkersForRange(range);
+
+    var block = document.getElementById(&quot;t18&quot;);
+    range.selectNode(block);
+    placeMarkersForRange(range, 1);
+
+    var slider = document.getElementById(&quot;t19&quot;);
+    range.selectNode(slider);
+    placeMarkersForRange(range);
+
+    var image = document.getElementById(&quot;t20&quot;);
+    range.selectNode(image);
+    placeMarkersForRange(range);
+
+    var div = document.getElementById(&quot;t21&quot;);
+    range.selectNode(div);
+    placeMarkersForRange(div);
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticoloffsettopleftexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/offset-top-left-expected.txt (0 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/offset-top-left-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/offset-top-left-expected.txt        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test #1 Passed.
+Test #2 Passed.
+Test #3 Passed.
+Test #4 Passed.
+Test #5 Passed.
+Test #6 Passed.
+Test #7 Passed.
+Test #8 Passed.
+Test #9 Passed.
+Test #10 Passed.
+Test #11 Passed.
+Test #12 Passed.
+Test #13 Passed.
+Test #14 Passed.
+Test #15 Passed.
+Test #16 Passed.
+Test #17 Passed.
+Test #18 Passed.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticoloffsettoplefthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/offset-top-left.html (0 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/offset-top-left.html                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/offset-top-left.html        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -0,0 +1,117 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;title&gt;offsetLeft and offsetTop test for columns&lt;/title&gt;
+        &lt;style type=&quot;text/css&quot;&gt;
+
+            .columns {
+                -webkit-column-count:2;
+                -webkit-column-gap:50px;
+                -webkit-logical-width:250px;
+                -webkit-logical-height:145px;
+                margin: 20px;
+                border:2px solid black;
+                -webkit-column-rule: 1px solid maroon;
+            }
+
+            #t1, #t6 {
+                -webkit-column-break-after: always;
+            }
+        
+            .columns div { -webkit-logical-height:50px; background-color:green; margin:5px; -webkit-margin-collapse:separate }
+            
+            .columns div.span { margin:0; -webkit-logical-height:25px; background-color:orange; -webkit-column-span:all; -webkit-margin-start: 5px; -webkit-margin-end: 5px }
+
+            .fail #pass, .pass #fail { display: none; }
+            
+            .vertical { -webkit-writing-mode: vertical-lr }
+            .vertical-flipped {  -webkit-writing-mode: vertical-rl }
+        &lt;/style&gt;
+        &lt;script&gt;
+            if (window.internals)
+                internals.settings.setRegionBasedColumnsEnabled(true)
+        &lt;/script&gt;
+    &lt;/head&gt;
+
+    &lt;body style=&quot;margin:10px&quot;&gt;
+        &lt;div class=&quot;columns&quot;&gt;
+            &lt;div id=&quot;t1&quot;&gt;&lt;/div&gt;
+            &lt;div id=&quot;t2&quot;&gt;&lt;/div&gt;
+            &lt;div class=&quot;span&quot; id=&quot;t3&quot;&gt;&lt;/div&gt;
+            &lt;div&gt;&lt;span id=&quot;t4&quot;&gt;&lt;/span&gt;&lt;/div&gt;
+            &lt;div&gt;&lt;span id=&quot;t5&quot;&gt;&lt;/span&gt;&lt;/div&gt;
+        &lt;/div&gt;
+    
+        &lt;div class=&quot;columns vertical&quot;&gt;
+            &lt;div id=&quot;t9&quot;&gt;&lt;/div&gt;
+            &lt;div id=&quot;t10&quot;&gt;&lt;/div&gt;
+            &lt;div class=&quot;span&quot; id=&quot;t8&quot;&gt;&lt;/div&gt;
+            &lt;div&gt;&lt;span id=&quot;t6&quot;&gt;&lt;/span&gt;&lt;/div&gt;
+            &lt;div&gt;&lt;span id=&quot;t7&quot;&gt;&lt;/span&gt;&lt;/div&gt;
+        &lt;/div&gt;
+        
+        &lt;div class=&quot;columns vertical-flipped&quot;&gt;
+            &lt;div id=&quot;t11&quot;&gt;&lt;/div&gt;
+            &lt;div id=&quot;t12&quot;&gt;&lt;/div&gt;
+            &lt;div class=&quot;span&quot; id=&quot;t13&quot;&gt;&lt;/div&gt;
+            &lt;div id=&quot;t14&quot;&gt;&lt;/div&gt;
+            &lt;div id=&quot;t15&quot;&gt;&lt;/div&gt;
+        &lt;/div&gt;
+        
+        &lt;p id=&quot;output&quot;&gt;&lt;/p&gt;
+        
+        &lt;script type=&quot;text/javascript&quot;&gt;
+        
+            function testOffsetTop(expected, id1, id2, number) {
+                var one = document.getElementById(id1)
+                var two = document.getElementById(id2)
+                var output = document.getElementById('output')
+                if (one.offsetTop != two.offsetTop)
+                    output.innerHTML += &quot;Failed Test #&quot; + number + &quot; because the offsetTop of &quot; + id1 + &quot; and &quot; + id2 + &quot; were not the same. &quot; + one.offsetTop + &quot; and &quot; + two.offsetTop + &quot;.&lt;br&gt;&quot;
+                else if (one.offsetTop != expected)
+                    output.innerHTML += &quot;Failed Test #&quot; + number + &quot; because the offsetTop of &quot; + id1 + &quot; and &quot; + id2 + &quot; did not match the expected value of &quot; + expected + &quot;. They were &quot; + one.offsetTop + &quot; instead.&lt;br&gt;&quot;
+                else
+                    output.innerHTML += &quot;Test #&quot; + number + &quot; Passed.&lt;br&gt;&quot;
+            }
+        
+            function testOffsetLeft(expected, id1, id2, number) {
+                var one = document.getElementById(id1)
+                var two = document.getElementById(id2)
+                var output = document.getElementById('output')
+                if (one.offsetLeft != two.offsetLeft)
+                    output.innerHTML += &quot;Failed Test #&quot; + number + &quot; because the offsetLeft of &quot; + id1 + &quot; and &quot; + id2 + &quot; were not the same. &quot; + one.offsetLeft + &quot; and &quot; + two.offsetLeft + &quot;.&lt;br&gt;&quot;
+                else if (one.offsetLeft != expected)
+                    output.innerHTML += &quot;Failed Test #&quot; + number + &quot; because the offsetLeft of &quot; + id1 + &quot; and &quot; + id2 + &quot; did not match the expected value of &quot; + expected + &quot;. They were &quot; + one.offsetLeft + &quot; instead.&lt;br&gt;&quot;
+                else
+                    output.innerHTML += &quot;Test #&quot; + number + &quot; Passed.&lt;br&gt;&quot;
+            }
+        
+            if(window.testRunner)
+                testRunner.dumpAsText();
+            
+            testOffsetTop(27, &quot;t1&quot;, &quot;t2&quot;, 1);
+            testOffsetTop(112, &quot;t4&quot;, &quot;t5&quot;, 2);
+            testOffsetTop(82, &quot;t3&quot;, &quot;t3&quot;, 3);
+            
+            testOffsetLeft(37, &quot;t1&quot;, &quot;t4&quot;, 4);
+            testOffsetLeft(187, &quot;t2&quot;, &quot;t5&quot;, 5);
+            testOffsetLeft(37, &quot;t3&quot;, &quot;t3&quot;, 6);
+            
+            testOffsetTop(196, &quot;t6&quot;, &quot;t9&quot;, 7);
+            testOffsetTop(346, &quot;t7&quot;, &quot;t10&quot;, 8);
+            testOffsetTop(196, &quot;t8&quot;, &quot;t8&quot;, 9);
+            
+            testOffsetLeft(37, &quot;t9&quot;, &quot;t10&quot;, 10);
+            testOffsetLeft(122, &quot;t6&quot;, &quot;t7&quot;, 11);
+            testOffsetLeft(92, &quot;t8&quot;, &quot;t8&quot;, 12);
+        
+            testOffsetTop(470, &quot;t11&quot;, &quot;t14&quot;, 13);
+            testOffsetTop(620, &quot;t12&quot;, &quot;t15&quot;, 14);
+            testOffsetTop(470, &quot;t13&quot;, &quot;t13&quot;, 15);
+            
+            testOffsetLeft(37, &quot;t14&quot;, &quot;t15&quot;, 16);
+            testOffsetLeft(122, &quot;t11&quot;, &quot;t12&quot;, 17);
+            testOffsetLeft(92, &quot;t13&quot;, &quot;t13&quot;, 18);
+        &lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastmulticolclientrectsspannerscomplexexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacfastmulticolclientrectsspannerscomplexexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt (0 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -0,0 +1,458 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x29
+        RenderText {#text} at (0,11) size 421x18
+          text run at (0,11) width 421: &quot;The blue borders should coincide with light blue squares, like this: &quot;
+        RenderBlock {SPAN} at (421,0) size 25x25 [bgcolor=#ADD8E6] [border: (3px solid #0000FF7F)]
+        RenderText {#text} at (446,11) size 196x18
+          text run at (446,11) width 8: &quot;. &quot;
+          text run at (454,11) width 188: &quot;There should be none of this: &quot;
+        RenderBlock {SPAN} at (642,0) size 25x25 [bgcolor=#ADD8E6]
+        RenderText {#text} at (667,11) size 51x18
+          text run at (667,11) width 4: &quot; &quot;
+          text run at (671,11) width 47: &quot;or this: &quot;
+        RenderBlock {SPAN} at (718,0) size 25x25 [border: (3px solid #0000FF7F)]
+        RenderText {#text} at (743,11) size 4x18
+          text run at (743,11) width 4: &quot;.&quot;
+      RenderBlock (anonymous) at (0,45) size 784x514
+        RenderText {#text} at (116,112) size 4x18
+          text run at (116,112) width 4: &quot; &quot;
+        RenderText {#text} at (236,112) size 4x18
+          text run at (236,112) width 4: &quot; &quot;
+        RenderText {#text} at (356,112) size 4x18
+          text run at (356,112) width 4: &quot; &quot;
+        RenderText {#text} at (476,112) size 4x18
+          text run at (476,112) width 4: &quot; &quot;
+        RenderText {#text} at (596,112) size 4x18
+          text run at (596,112) width 4: &quot; &quot;
+        RenderText {#text} at (716,112) size 4x18
+          text run at (716,112) width 4: &quot; &quot;
+        RenderText {#text} at (116,256) size 4x18
+          text run at (116,256) width 4: &quot; &quot;
+        RenderText {#text} at (246,256) size 4x18
+          text run at (246,256) width 4: &quot; &quot;
+        RenderText {#text} at (376,256) size 4x18
+          text run at (376,256) width 4: &quot; &quot;
+        RenderText {#text} at (506,256) size 4x18
+          text run at (506,256) width 4: &quot; &quot;
+        RenderText {#text} at (636,256) size 4x18
+          text run at (636,256) width 4: &quot; &quot;
+        RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (126,376) size 4x18
+          text run at (126,376) width 4: &quot; &quot;
+        RenderText {#text} at (256,376) size 4x18
+          text run at (256,376) width 4: &quot; &quot;
+        RenderText {#text} at (386,376) size 4x18
+          text run at (386,376) width 4: &quot; &quot;
+        RenderText {#text} at (516,376) size 4x18
+          text run at (516,376) width 4: &quot; &quot;
+        RenderText {#text} at (646,376) size 4x18
+          text run at (646,376) width 4: &quot; &quot;
+        RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (126,496) size 4x18
+          text run at (126,496) width 4: &quot; &quot;
+        RenderText {#text} at (256,496) size 4x18
+          text run at (256,496) width 4: &quot; &quot;
+        RenderText {#text} at (0,0) size 0x0
+layer at (8,63) size 116x106
+  RenderBlock {DIV} at (0,10) size 116x106 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 100x5
+    RenderBlock {DIV} at (8,13) size 100x30 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (8,43) size 100x55
+layer at (128,63) size 116x106
+  RenderBlock {DIV} at (120,10) size 116x106 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 100x5
+    RenderBlock {DIV} at (8,13) size 100x30 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (8,43) size 100x55
+layer at (248,63) size 116x106
+  RenderBlock {DIV} at (240,10) size 116x106 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 100x5
+    RenderBlock {DIV} at (8,13) size 100x30 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (8,43) size 100x55
+layer at (368,63) size 116x106
+  RenderBlock {DIV} at (360,10) size 116x106 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 100x5
+    RenderBlock {DIV} at (8,13) size 100x30 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (8,43) size 100x55
+layer at (488,63) size 116x106
+  RenderBlock {DIV} at (480,10) size 116x106 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 100x5
+    RenderBlock {DIV} at (8,13) size 100x30 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (8,43) size 100x55
+layer at (608,81) size 116x106
+  RenderBlock {DIV} at (600,28) size 116x106 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 100x5
+    RenderBlock {DIV} at (8,13) size 100x30 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (8,43) size 100x55
+layer at (8,207) size 116x106
+  RenderBlock {DIV} at (0,154) size 116x106 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 100x5
+    RenderBlock {DIV} at (8,13) size 100x30 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (8,43) size 100x55
+layer at (138,207) size 106x116
+  RenderBlock {DIV} at (130,154) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (268,207) size 106x116
+  RenderBlock {DIV} at (260,154) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (398,207) size 106x116
+  RenderBlock {DIV} at (390,154) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (528,207) size 106x116
+  RenderBlock {DIV} at (520,154) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (658,207) size 106x116
+  RenderBlock {DIV} at (650,154) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (18,327) size 106x116
+  RenderBlock {DIV} at (10,274) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (148,327) size 106x116
+  RenderBlock {DIV} at (140,274) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (278,327) size 106x116
+  RenderBlock {DIV} at (270,274) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (408,327) size 106x116
+  RenderBlock {DIV} at (400,274) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (538,327) size 106x116
+  RenderBlock {DIV} at (530,274) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (668,327) size 106x116
+  RenderBlock {DIV} at (660,274) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (18,447) size 106x116
+  RenderBlock {DIV} at (10,394) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (148,447) size 106x116
+  RenderBlock {DIV} at (140,394) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (278,447) size 106x116
+  RenderBlock {DIV} at (270,394) size 106x116 [color=#ADD8E6] [border: (3px solid #000000)]
+    RenderMultiColumnSet at (8,8) size 5x100
+    RenderBlock {DIV} at (13,8) size 30x100 [bgcolor=#C0C0C0]
+    RenderMultiColumnSet at (43,8) size 55x100
+layer at (16,71) size 48x120
+  RenderMultiColumnFlowThread at (8,8) size 48x120
+    RenderBlock {DIV} at (0,0) size 48x10 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (0,10) size 0x0
+    RenderBlock (anonymous) at (0,10) size 48x105
+      RenderBR {BR} at (0,0) size 0x25
+      RenderText {#text} at (0,25) size 25x80
+        text run at (0,25) width 25: &quot;x&quot;
+        text run at (0,55) width 25: &quot;y&quot;
+        text run at (0,80) width 25: &quot;z&quot;
+layer at (136,71) size 48x120
+  RenderMultiColumnFlowThread at (8,8) size 48x120
+    RenderBlock {DIV} at (0,0) size 48x10 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (0,10) size 0x0
+    RenderBlock (anonymous) at (0,10) size 48x105
+      RenderBR {BR} at (0,0) size 0x25
+      RenderInline {SPAN} at (0,0) size 25x80
+        RenderText {#text} at (0,25) size 25x80
+          text run at (0,25) width 25: &quot;x&quot;
+          text run at (0,55) width 25: &quot;y&quot;
+          text run at (0,80) width 25: &quot;z&quot;
+      RenderText {#text} at (0,0) size 0x0
+layer at (256,71) size 48x120
+  RenderMultiColumnFlowThread at (8,8) size 48x120
+    RenderBlock {DIV} at (0,0) size 48x10 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (0,10) size 0x0
+    RenderBlock (anonymous) at (0,10) size 48x25
+      RenderBR {BR} at (0,0) size 0x25
+    RenderBlock {DIV} at (0,35) size 48x80
+      RenderText {#text} at (0,0) size 25x80
+        text run at (0,0) width 25: &quot;x&quot;
+        text run at (0,30) width 25: &quot;y&quot;
+        text run at (0,55) width 25: &quot;z&quot;
+layer at (376,71) size 48x120
+  RenderMultiColumnFlowThread at (8,8) size 48x120
+    RenderBlock {DIV} at (0,0) size 48x10 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (0,10) size 0x0
+    RenderBlock (anonymous) at (0,10) size 48x25
+      RenderBR {BR} at (0,0) size 0x25
+    RenderBlock {DIV} at (0,35) size 48x80
+      RenderBR {BR} at (0,0) size 0x25
+      RenderText {#text} at (0,30) size 25x50
+        text run at (0,30) width 25: &quot;y&quot;
+        text run at (0,55) width 25: &quot;z&quot;
+layer at (496,71) size 48x120
+  RenderMultiColumnFlowThread at (8,8) size 48x120
+    RenderBlock {DIV} at (0,0) size 48x10 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (0,10) size 0x0
+    RenderBlock (anonymous) at (0,10) size 48x25
+      RenderBR {BR} at (0,0) size 0x25
+    RenderBlock {DIV} at (0,35) size 48x59
+      RenderBR {BR} at (0,0) size 0x25
+      RenderSlider {INPUT} at (2,32) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
+        RenderFlexibleBox {DIV} at (0,0) size 25x25
+          RenderBlock {DIV} at (0,12) size 25x1
+            RenderBlock {DIV} at (0,0) size 25x0
+layer at (616,89) size 48x120
+  RenderMultiColumnFlowThread at (8,8) size 48x120
+    RenderBlock {DIV} at (0,0) size 48x10 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (0,10) size 0x0
+    RenderBlock (anonymous) at (0,10) size 48x25
+      RenderBR {BR} at (0,0) size 0x25
+    RenderBlock {DIV} at (0,35) size 48x55
+      RenderBR {BR} at (0,0) size 0x25
+      RenderImage {IMG} at (0,30) size 25x25 [bgcolor=#ADD8E6]
+layer at (16,215) size 48x120
+  RenderMultiColumnFlowThread at (8,8) size 48x120
+    RenderBlock {DIV} at (0,0) size 48x10 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (0,10) size 0x0
+    RenderBlock {DIV} at (0,50) size 25x25 [bgcolor=#ADD8E6]
+layer at (146,215) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 105x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderText {#text} at (25,0) size 80x25
+        text run at (25,0) width 25: &quot;x&quot;
+        text run at (55,0) width 25: &quot;y&quot;
+        text run at (80,0) width 25: &quot;z&quot;
+layer at (276,215) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 105x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderInline {SPAN} at (0,0) size 80x25
+        RenderText {#text} at (25,0) size 80x25
+          text run at (25,0) width 25: &quot;x&quot;
+          text run at (55,0) width 25: &quot;y&quot;
+          text run at (80,0) width 25: &quot;z&quot;
+      RenderText {#text} at (0,0) size 0x0
+layer at (406,215) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 25x48
+      RenderBR {BR} at (0,0) size 25x0
+    RenderBlock {DIV} at (35,0) size 80x48
+      RenderText {#text} at (0,0) size 80x25
+        text run at (0,0) width 25: &quot;x&quot;
+        text run at (30,0) width 25: &quot;y&quot;
+        text run at (55,0) width 25: &quot;z&quot;
+layer at (536,215) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 25x48
+      RenderBR {BR} at (0,0) size 25x0
+    RenderBlock {DIV} at (35,0) size 80x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderText {#text} at (30,0) size 50x25
+        text run at (30,0) width 25: &quot;y&quot;
+        text run at (55,0) width 25: &quot;z&quot;
+layer at (666,215) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 25x48
+      RenderBR {BR} at (0,0) size 25x0
+    RenderBlock {DIV} at (35,0) size 59x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderSlider {INPUT} at (32,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
+        RenderFlexibleBox {DIV} at (0,0) size 25x25
+          RenderBlock {DIV} at (0,12) size 25x1
+            RenderBlock {DIV} at (0,0) size 25x0
+layer at (26,335) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 25x48
+      RenderBR {BR} at (0,0) size 25x0
+    RenderBlock {DIV} at (35,0) size 55x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderImage {IMG} at (30,0) size 25x25 [bgcolor=#ADD8E6]
+layer at (156,335) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock {DIV} at (50,0) size 25x25 [bgcolor=#ADD8E6]
+layer at (256,335) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 105x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderText {#text} at (25,0) size 80x25
+        text run at (25,0) width 25: &quot;x&quot;
+        text run at (55,0) width 25: &quot;y&quot;
+        text run at (80,0) width 25: &quot;z&quot;
+layer at (386,335) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 105x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderInline {SPAN} at (0,0) size 80x25
+        RenderText {#text} at (25,0) size 80x25
+          text run at (25,0) width 25: &quot;x&quot;
+          text run at (55,0) width 25: &quot;y&quot;
+          text run at (80,0) width 25: &quot;z&quot;
+      RenderText {#text} at (0,0) size 0x0
+layer at (516,335) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 25x48
+      RenderBR {BR} at (0,0) size 25x0
+    RenderBlock {DIV} at (35,0) size 80x48
+      RenderText {#text} at (0,0) size 80x25
+        text run at (0,0) width 25: &quot;x&quot;
+        text run at (30,0) width 25: &quot;y&quot;
+        text run at (55,0) width 25: &quot;z&quot;
+layer at (646,335) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 25x48
+      RenderBR {BR} at (0,0) size 25x0
+    RenderBlock {DIV} at (35,0) size 80x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderText {#text} at (30,0) size 50x25
+        text run at (30,0) width 25: &quot;y&quot;
+        text run at (55,0) width 25: &quot;z&quot;
+layer at (-4,455) size 120x48 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 25x48
+      RenderBR {BR} at (0,0) size 25x0
+    RenderBlock {DIV} at (35,0) size 59x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderSlider {INPUT} at (32,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
+        RenderFlexibleBox {DIV} at (0,0) size 25x25
+          RenderBlock {DIV} at (0,12) size 25x1
+            RenderBlock {DIV} at (0,0) size 25x0
+layer at (126,455) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock (anonymous) at (10,0) size 25x48
+      RenderBR {BR} at (0,0) size 25x0
+    RenderBlock {DIV} at (35,0) size 55x48
+      RenderBR {BR} at (0,0) size 25x0
+      RenderImage {IMG} at (30,0) size 25x25 [bgcolor=#ADD8E6]
+layer at (256,455) size 120x48
+  RenderMultiColumnFlowThread at (8,8) size 120x48
+    RenderBlock {DIV} at (0,0) size 10x48 [bgcolor=#000080]
+    RenderMultiColumnSpannerPlaceholder at (10,0) size 0x0
+    RenderBlock {DIV} at (50,0) size 25x25 [bgcolor=#ADD8E6]
+layer at (16,131) size 25x25
+  RenderBlock (positioned) {DIV} at (16,131) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (68,106) size 26x25
+  RenderBlock (positioned) {DIV} at (68,106) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (68,131) size 26x25
+  RenderBlock (positioned) {DIV} at (68,131) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (136,131) size 25x25
+  RenderBlock (positioned) {DIV} at (136,131) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (188,106) size 26x25
+  RenderBlock (positioned) {DIV} at (188,106) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (188,131) size 26x25
+  RenderBlock (positioned) {DIV} at (188,131) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (256,131) size 25x25
+  RenderBlock (positioned) {DIV} at (256,131) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (308,106) size 26x25
+  RenderBlock (positioned) {DIV} at (308,106) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (308,131) size 26x25
+  RenderBlock (positioned) {DIV} at (308,131) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (428,106) size 26x25
+  RenderBlock (positioned) {DIV} at (428,106) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (428,131) size 26x25
+  RenderBlock (positioned) {DIV} at (428,131) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (550,108) size 26x25
+  RenderBlock (positioned) {DIV} at (550,108) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (668,124) size 26x25
+  RenderBlock (positioned) {DIV} at (668,124) size 26x25 [border: (3px solid #0000FF7F)]
+layer at (16,290) size 25x25
+  RenderBlock (positioned) {DIV} at (16,290) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (206,215) size 25x25
+  RenderBlock (positioned) {DIV} at (206,215) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (181,267) size 25x26
+  RenderBlock (positioned) {DIV} at (181,267) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (206,267) size 25x26
+  RenderBlock (positioned) {DIV} at (206,267) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (336,215) size 25x25
+  RenderBlock (positioned) {DIV} at (336,215) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (311,267) size 25x26
+  RenderBlock (positioned) {DIV} at (311,267) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (336,267) size 25x26
+  RenderBlock (positioned) {DIV} at (336,267) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (466,215) size 25x25
+  RenderBlock (positioned) {DIV} at (466,215) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (441,267) size 25x26
+  RenderBlock (positioned) {DIV} at (441,267) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (466,267) size 25x26
+  RenderBlock (positioned) {DIV} at (466,267) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (571,267) size 25x26
+  RenderBlock (positioned) {DIV} at (571,267) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (596,267) size 25x26
+  RenderBlock (positioned) {DIV} at (596,267) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (703,269) size 25x26
+  RenderBlock (positioned) {DIV} at (703,269) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (61,387) size 25x26
+  RenderBlock (positioned) {DIV} at (61,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (231,335) size 25x25
+  RenderBlock (positioned) {DIV} at (231,335) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (291,335) size 25x25
+  RenderBlock (positioned) {DIV} at (291,335) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (316,387) size 25x26
+  RenderBlock (positioned) {DIV} at (316,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (291,387) size 25x26
+  RenderBlock (positioned) {DIV} at (291,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (420,335) size 25x25
+  RenderBlock (positioned) {DIV} at (420,335) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (445,387) size 25x26
+  RenderBlock (positioned) {DIV} at (445,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (420,387) size 25x26
+  RenderBlock (positioned) {DIV} at (420,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (551,335) size 25x25
+  RenderBlock (positioned) {DIV} at (551,335) size 25x25 [border: (3px solid #0000FF7F)]
+layer at (576,387) size 25x26
+  RenderBlock (positioned) {DIV} at (576,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (551,387) size 25x26
+  RenderBlock (positioned) {DIV} at (551,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (706,387) size 25x26
+  RenderBlock (positioned) {DIV} at (706,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (681,387) size 25x26
+  RenderBlock (positioned) {DIV} at (681,387) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (54,509) size 25x26
+  RenderBlock (positioned) {DIV} at (54,509) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (186,507) size 25x26
+  RenderBlock (positioned) {DIV} at (186,507) size 25x26 [border: (3px solid #0000FF7F)]
+layer at (276,455) size 25x25
+  RenderBlock (positioned) {DIV} at (276,455) size 25x25 [border: (3px solid #0000FF7F)]
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167807 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-25 15:27:55 UTC (rev 167807)
+++ trunk/Source/WebCore/ChangeLog        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2014-04-24  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        [New Multicolumn] Add support for offsetLeft and offsetTop.
+        https://bugs.webkit.org/show_bug.cgi?id=132080
+
+        Reviewed by Andrei Bucur.
+
+        Added fast/multicol/client-spanners-complex.html and offset-top-left.html
+
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
+        Patch the offsetLeft/Top loop to handle calling into RenderMultiColumnFlowThread
+        in order to adjust the coordinates for the new multicolumn layout.
+
+        * rendering/RenderMultiColumnFlowThread.cpp:
+        (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
+        Modified to use a helper that can be shared by offsetLeft/Top code. This code
+        ran for client rects, and I'm moving/refactoring it for more sharing.
+
+        (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
+        (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
+        * rendering/RenderMultiColumnFlowThread.h:
+        New functions that beef up what was in mapFromFlowToRegion and fix some bugs
+        with the translation code.
+
+        * rendering/RenderMultiColumnSet.cpp:
+        (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
+        Patched to factor in the flow thread portion rect of the specific multicolumn set.
+
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isRenderMultiColumnFlowThread):
+        Added for toRenderMultiColumnFlowThread capability.
+
</ins><span class="cx"> 2014-04-25  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ScrollingCoordinator is unaware of topContentInset
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (167807 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-04-25 15:27:55 UTC (rev 167807)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderLayerBacking.h&quot;
</span><span class="cx"> #include &quot;RenderLayerCompositor.h&quot;
</span><ins>+#include &quot;RenderMultiColumnFlowThread.h&quot;
</ins><span class="cx"> #include &quot;RenderNamedFlowFragment.h&quot;
</span><span class="cx"> #include &quot;RenderNamedFlowThread.h&quot;
</span><span class="cx"> #include &quot;RenderRegion.h&quot;
</span><span class="lines">@@ -315,11 +316,18 @@
</span><span class="cx">             auto curr = parent();
</span><span class="cx">             while (curr != offsetParent &amp;&amp; !curr-&gt;isRenderNamedFlowThread()) {
</span><span class="cx">                 // FIXME: What are we supposed to do inside SVG content?
</span><del>-                if (!isOutOfFlowPositioned()) {
</del><ins>+                
+                if (curr-&gt;isInFlowRenderFlowThread()) {
+                    // We need to apply a translation based off what region we are inside.
+                    RenderRegion* region = toRenderMultiColumnFlowThread(curr)-&gt;physicalTranslationFromFlowToRegion(referencePoint);
+                    if (region)
+                        referencePoint.moveBy(region-&gt;topLeftLocation());
+                } else if (!isOutOfFlowPositioned()) {
</ins><span class="cx">                     if (curr-&gt;isBox() &amp;&amp; !curr-&gt;isTableRow())
</span><span class="cx">                         referencePoint.moveBy(toRenderBox(curr)-&gt;topLeftLocation());
</span><span class="cx">                     referencePoint.move(curr-&gt;parent()-&gt;offsetForColumns(referencePoint));
</span><span class="cx">                 }
</span><ins>+                
</ins><span class="cx">                 curr = curr-&gt;parent();
</span><span class="cx">             }
</span><span class="cx">             
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp (167807 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp        2014-04-25 15:27:55 UTC (rev 167807)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -592,17 +592,24 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: We need to refactor RenderObject::absoluteQuads to be able to split the quads across regions,
</span><span class="cx">     // for now we just take the center of the mapped enclosing box and map it to a column.
</span><del>-    LayoutPoint center = boxRect.center();
-    LayoutUnit centerOffset = isHorizontalWritingMode() ? center.y() : center.x();
-    RenderRegion* renderRegion = const_cast&lt;RenderMultiColumnFlowThread*&gt;(this)-&gt;regionAtBlockOffset(this, centerOffset, true, DisallowRegionAutoGeneration);
</del><ins>+    LayoutPoint centerPoint = boxRect.center();
+    LayoutUnit centerLogicalOffset = isHorizontalWritingMode() ? centerPoint.y() : centerPoint.x();
+    RenderRegion* renderRegion = const_cast&lt;RenderMultiColumnFlowThread*&gt;(this)-&gt;regionAtBlockOffset(this, centerLogicalOffset, true, DisallowRegionAutoGeneration);
</ins><span class="cx">     if (!renderRegion)
</span><span class="cx">         return nullptr;
</span><ins>+    transformState.move(physicalTranslationOffsetFromFlowToRegion(renderRegion, centerLogicalOffset));
+    return renderRegion;
+}
</ins><span class="cx"> 
</span><ins>+LayoutSize RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion(const RenderRegion* renderRegion, const LayoutUnit logicalOffset) const
+{
+    
</ins><span class="cx">     // Now that we know which multicolumn set we hit, we need to get the appropriate translation offset for the column.
</span><del>-    RenderMultiColumnSet* columnSet = toRenderMultiColumnSet(renderRegion);
-    LayoutPoint translationOffset = columnSet-&gt;columnTranslationForOffset(centerOffset);
</del><ins>+    const RenderMultiColumnSet* columnSet = toRenderMultiColumnSet(renderRegion);
+    LayoutPoint translationOffset = columnSet-&gt;columnTranslationForOffset(logicalOffset);
</ins><span class="cx">     
</span><del>-    // Now we know how we want the rect to be translated into the region.
</del><ins>+    // Now we know how we want the rect to be translated into the region. At this point we're converting
+    // back to physical coordinates.
</ins><span class="cx">     LayoutRect flippedRegionRect(renderRegion-&gt;flowThreadPortionRect());
</span><span class="cx">     if (isHorizontalWritingMode())
</span><span class="cx">         flippedRegionRect.setHeight(columnSet-&gt;computedColumnHeight());
</span><span class="lines">@@ -612,9 +619,29 @@
</span><span class="cx">     
</span><span class="cx">     flippedRegionRect.moveBy(-translationOffset);
</span><span class="cx">     
</span><del>-    // There is an additional offset to apply, which is the offset of the region within the multi-column space.
-    transformState.move(renderRegion-&gt;contentBoxRect().location() - flippedRegionRect.location());
</del><ins>+    return renderRegion-&gt;contentBoxRect().location() - flippedRegionRect.location();
+}
</ins><span class="cx"> 
</span><ins>+RenderRegion* RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion(LayoutPoint&amp; physicalPoint) const
+{
+    if (!hasValidRegionInfo())
+        return nullptr;
+    
+    // Put the physical point into the flow thread's coordinate space.
+    LayoutPoint logicalPoint = flipForWritingMode(physicalPoint);
+    
+    // Now get the region that we are in.
+    LayoutUnit logicalOffset = isHorizontalWritingMode() ? logicalPoint.y() : logicalPoint.x();
+    RenderRegion* renderRegion = const_cast&lt;RenderMultiColumnFlowThread*&gt;(this)-&gt;regionAtBlockOffset(this, logicalOffset, true, DisallowRegionAutoGeneration);
+    if (!renderRegion)
+        return nullptr;
+    
+    // Translate to the coordinate space of the region.
+    LayoutSize translationOffset = physicalTranslationOffsetFromFlowToRegion(renderRegion, logicalOffset);
+    
+    // Now shift the physical point into the region's coordinate space.
+    physicalPoint += translationOffset;
+    
</ins><span class="cx">     return renderRegion;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnFlowThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h (167807 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h        2014-04-25 15:27:55 UTC (rev 167807)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -41,6 +41,8 @@
</span><span class="cx">     RenderMultiColumnFlowThread(Document&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx">     ~RenderMultiColumnFlowThread();
</span><span class="cx"> 
</span><ins>+    virtual bool isRenderMultiColumnFlowThread() const override { return true; }
+
</ins><span class="cx">     virtual void removeFlowChildInfo(RenderObject*) override;
</span><span class="cx"> 
</span><span class="cx">     RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(parent()); }
</span><span class="lines">@@ -94,6 +96,13 @@
</span><span class="cx">     
</span><span class="cx">     virtual RenderRegion* mapFromFlowToRegion(TransformState&amp;) const override;
</span><span class="cx">     
</span><ins>+    // This method takes a logical offset and returns a physical translation that can be applied to map
+    // a physical point (corresponding to the logical offset) into the region's physical coordinate space.
+    LayoutSize physicalTranslationOffsetFromFlowToRegion(const RenderRegion*, const LayoutUnit) const;
+    
+    // The point is physical, and the result is a physical location within the region.
+    RenderRegion* physicalTranslationFromFlowToRegion(LayoutPoint&amp;) const;
+    
</ins><span class="cx">     virtual bool nodeAtPoint(const HitTestRequest&amp;, HitTestResult&amp;, const HitTestLocation&amp; locationInContainer, const LayoutPoint&amp; accumulatedOffset, HitTestAction) override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -136,6 +145,8 @@
</span><span class="cx">     bool m_beingEvacuated;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnFlowThread, isRenderMultiColumnFlowThread())
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // RenderMultiColumnFlowThread_h
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp (167807 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2014-04-25 15:27:55 UTC (rev 167807)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -817,7 +817,9 @@
</span><span class="cx">     
</span><span class="cx">     LayoutRect flowThreadPortion = flowThreadPortionRectAt(startColumn);
</span><span class="cx">     LayoutPoint translationOffset;
</span><del>-
</del><ins>+    
+    LayoutRect overallFlowThreadPortion = flowThreadPortionRect();
+    
</ins><span class="cx">     bool progressionReversed = multiColumnFlowThread()-&gt;progressionIsReversed();
</span><span class="cx">     bool progressionIsInline = multiColumnFlowThread()-&gt;progressionIsInline();
</span><span class="cx"> 
</span><span class="lines">@@ -832,7 +834,7 @@
</span><span class="cx">             inlineOffset += contentLogicalWidth() - colLogicalWidth;
</span><span class="cx">     }
</span><span class="cx">     translationOffset.setX(inlineOffset);
</span><del>-    LayoutUnit blockOffset = initialBlockOffset + (isHorizontalWritingMode() ? -flowThreadPortion.y() : -flowThreadPortion.x());
</del><ins>+    LayoutUnit blockOffset = initialBlockOffset + (isHorizontalWritingMode() ? overallFlowThreadPortion.y() - flowThreadPortion.y() : overallFlowThreadPortion.x() - flowThreadPortion.x());
</ins><span class="cx">     if (!progressionIsInline) {
</span><span class="cx">         if (!progressionReversed)
</span><span class="cx">             blockOffset = startColumn * colGap;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (167807 => 167808)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2014-04-25 15:27:55 UTC (rev 167807)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2014-04-25 16:21:38 UTC (rev 167808)
</span><span class="lines">@@ -362,6 +362,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool isMultiColumnBlockFlow() const { return false; }
</span><span class="cx">     virtual bool isRenderMultiColumnSet() const { return false; }
</span><ins>+    virtual bool isRenderMultiColumnFlowThread() const { return false; }
</ins><span class="cx">     virtual bool isRenderMultiColumnSpannerPlaceholder() const { return false; }
</span><span class="cx"> 
</span><span class="cx">     virtual bool isRenderScrollbarPart() const { return false; }
</span></span></pre>
</div>
</div>

</body>
</html>