<!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>[167706] 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/167706">167706</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-04-23 06:32:56 -0700 (Wed, 23 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Overflow propagation broken in BTT and RTL writing-modes
https://bugs.webkit.org/show_bug.cgi?id=113781

Patch by Morten Stenshorne &lt;mstensho@opera.com&gt; on 2014-04-23
Reviewed by David Hyatt.

Source/WebCore:
Overflow rectangles are not quite physical, not quite logical. This
means that we cannot use clientBoxRect() directly to represent a
rectangle that expresses exactly no overflow. This rectangle is the
padding box (relative to the border box) in vertical-lr and
horizontal-tb, but the block-direction borders need to be flipped in
vertical-rl and horizontal-bt.

Tests: fast/css/overflow-btt-border-after.html
       fast/css/overflow-rtl-border-after.html

* WebCore.exp.in:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::addVisualOverflow):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
(WebCore::RenderBox::layoutOverflowRect):

LayoutTests:
* fast/css/overflow-btt-border-after-expected.txt: Added.
* fast/css/overflow-btt-border-after.html: Added.
* fast/css/overflow-rtl-border-after-expected.txt: Added.
* fast/css/overflow-rtl-border-after.html: Added.
* fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
* platform/gtk/fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
* platform/mac/fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
Removed incorrect screenshots that now differ from the actual (correct) rendering.</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="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxh">trunk/Source/WebCore/rendering/RenderBox.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssoverflowbttborderafterexpectedtxt">trunk/LayoutTests/fast/css/overflow-btt-border-after-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssoverflowbttborderafterhtml">trunk/LayoutTests/fast/css/overflow-btt-border-after.html</a></li>
<li><a href="#trunkLayoutTestsfastcssoverflowrtlborderafterexpectedtxt">trunk/LayoutTests/fast/css/overflow-rtl-border-after-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssoverflowrtlborderafterhtml">trunk/LayoutTests/fast/css/overflow-rtl-border-after.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastmulticolverticalrlruleswithborderbeforeexpectedpng">trunk/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkfastmulticolverticalrlruleswithborderbeforeexpectedpng">trunk/LayoutTests/platform/gtk/fast/multicol/vertical-rl/rules-with-border-before-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastmulticolverticalrlruleswithborderbeforeexpectedpng">trunk/LayoutTests/platform/mac/fast/multicol/vertical-rl/rules-with-border-before-expected.png</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167705 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-23 12:30:22 UTC (rev 167705)
+++ trunk/LayoutTests/ChangeLog        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-04-23  Morten Stenshorne  &lt;mstensho@opera.com&gt;
+
+        Overflow propagation broken in BTT and RTL writing-modes
+        https://bugs.webkit.org/show_bug.cgi?id=113781
+
+        Reviewed by David Hyatt.
+
+        * fast/css/overflow-btt-border-after-expected.txt: Added.
+        * fast/css/overflow-btt-border-after.html: Added.
+        * fast/css/overflow-rtl-border-after-expected.txt: Added.
+        * fast/css/overflow-rtl-border-after.html: Added.
+        * fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
+        * platform/gtk/fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
+        * platform/mac/fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
+        Removed incorrect screenshots that now differ from the actual (correct) rendering.
+
</ins><span class="cx"> 2014-04-23  Ryuan Choi  &lt;ryuan.choi@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed EFL gardening.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssoverflowbttborderafterexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/overflow-btt-border-after-expected.txt (0 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/overflow-btt-border-after-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/css/overflow-btt-border-after-expected.txt        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssoverflowbttborderafterhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/overflow-btt-border-after.html (0 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/overflow-btt-border-after.html                                (rev 0)
+++ trunk/LayoutTests/fast/css/overflow-btt-border-after.html        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;Border-after in horizontal-bt mode, non-visible overflow&lt;/title&gt;
+    &lt;style&gt;
+      body { color:black; background:white; }
+      #container {
+        -webkit-writing-mode: horizontal-bt;
+        overflow:hidden;
+        -webkit-logical-height:100px;
+        -webkit-border-after:150px solid white;
+        background:red;
+      }
+      #inner { -webkit-logical-height:200px; background:white; }
+    &lt;/style&gt;
+    &lt;script&gt;
+      if (window.testRunner)
+        testRunner.dumpAsText();
+    &lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;The word 'HEST' should be seen below, and there should be no red.&lt;/p&gt;
+    &lt;div id=&quot;container&quot;&gt;
+      &lt;div id=&quot;inner&quot;&gt;HEST&lt;/div&gt;
+    &lt;/div&gt;
+    &lt;script&gt;
+      if (window.testRunner) {
+        var height = container.scrollHeight;
+        document.body.innerHTML = height == 200 ? &quot;PASS&quot; : &quot;FAIL - height was &quot; + height;
+      }
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssoverflowrtlborderafterexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/overflow-rtl-border-after-expected.txt (0 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/overflow-rtl-border-after-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/css/overflow-rtl-border-after-expected.txt        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssoverflowrtlborderafterhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/overflow-rtl-border-after.html (0 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/overflow-rtl-border-after.html                                (rev 0)
+++ trunk/LayoutTests/fast/css/overflow-rtl-border-after.html        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;Border-after in vertical-rl mode, non-visible overflow&lt;/title&gt;
+    &lt;style&gt;
+      body { color:black; background:white; }
+      #container {
+        -webkit-writing-mode: vertical-rl;
+        overflow:hidden;
+        -webkit-logical-height:100px;
+        -webkit-border-after:150px solid white;
+        background:red;
+      }
+      #inner { -webkit-logical-height:200px; background:white; }
+    &lt;/style&gt;
+    &lt;script&gt;
+      if (window.testRunner)
+        testRunner.dumpAsText();
+    &lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;The word 'HEST' should be seen below, and there should be no red.&lt;/p&gt;
+    &lt;div id=&quot;container&quot;&gt;
+      &lt;div id=&quot;inner&quot;&gt;HEST&lt;/div&gt;
+    &lt;/div&gt;
+    &lt;script&gt;
+      if (window.testRunner) {
+        var logicalHeight = container.scrollWidth;
+        document.body.innerHTML = logicalHeight == 200 ? &quot;PASS&quot; : &quot;FAIL - logicalHeight was &quot; + logicalHeight;
+      }
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticolverticalrlruleswithborderbeforeexpectedpng"></a>
<div class="binary"><h4>Deleted: trunk/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkfastmulticolverticalrlruleswithborderbeforeexpectedpng"></a>
<div class="binary"><h4>Deleted: trunk/LayoutTests/platform/gtk/fast/multicol/vertical-rl/rules-with-border-before-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastmulticolverticalrlruleswithborderbeforeexpectedpng"></a>
<div class="binary"><h4>Deleted: trunk/LayoutTests/platform/mac/fast/multicol/vertical-rl/rules-with-border-before-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167705 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-23 12:30:22 UTC (rev 167705)
+++ trunk/Source/WebCore/ChangeLog        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2014-04-23  Morten Stenshorne  &lt;mstensho@opera.com&gt;
+
+        Overflow propagation broken in BTT and RTL writing-modes
+        https://bugs.webkit.org/show_bug.cgi?id=113781
+
+        Reviewed by David Hyatt.
+
+        Overflow rectangles are not quite physical, not quite logical. This
+        means that we cannot use clientBoxRect() directly to represent a
+        rectangle that expresses exactly no overflow. This rectangle is the
+        padding box (relative to the border box) in vertical-lr and
+        horizontal-tb, but the block-direction borders need to be flipped in
+        vertical-rl and horizontal-bt.
+
+        Tests: fast/css/overflow-btt-border-after.html
+               fast/css/overflow-rtl-border-after.html
+
+        * WebCore.exp.in:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computeOverflow):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::addLayoutOverflow):
+        (WebCore::RenderBox::addVisualOverflow):
+        (WebCore::RenderBox::layoutOverflowRectForPropagation):
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::layoutOverflowRect):
+
</ins><span class="cx"> 2014-04-23  Andrei Bucur  &lt;abucur@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Regions] Improve the debugging infrastructure
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (167705 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-04-23 12:30:22 UTC (rev 167705)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -1961,6 +1961,7 @@
</span><span class="cx"> __ZNK7WebCore9PageCache10frameCountEv
</span><span class="cx"> __ZNK7WebCore9RenderBox11clientWidthEv
</span><span class="cx"> __ZNK7WebCore9RenderBox12clientHeightEv
</span><ins>+__ZNK7WebCore9RenderBox20flippedClientBoxRectEv
</ins><span class="cx"> __ZNK7WebCore9TreeScope14getElementByIdERKN3WTF6StringE
</span><span class="cx"> __ZTVN7WebCore11PageConsoleE
</span><span class="cx"> __ZTVN7WebCore12ChromeClientE
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (167705 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-04-23 12:30:22 UTC (rev 167705)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -1373,7 +1373,7 @@
</span><span class="cx">         // When we have overflow clip, propagate the original spillout since it will include collapsed bottom margins
</span><span class="cx">         // and bottom padding.  Set the axis we don't care about to be 1, since we want this overflow to always
</span><span class="cx">         // be considered reachable.
</span><del>-        LayoutRect clientRect(clientBoxRect());
</del><ins>+        LayoutRect clientRect(flippedClientBoxRect());
</ins><span class="cx">         LayoutRect rectToApply;
</span><span class="cx">         if (isHorizontalWritingMode())
</span><span class="cx">             rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, std::max&lt;LayoutUnit&gt;(0, oldClientAfterEdge - clientRect.y()));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (167705 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2014-04-23 12:30:22 UTC (rev 167705)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -4311,7 +4311,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderBox::addLayoutOverflow(const LayoutRect&amp; rect)
</span><span class="cx"> {
</span><del>-    LayoutRect clientBox = clientBoxRect();
</del><ins>+    LayoutRect clientBox = flippedClientBoxRect();
</ins><span class="cx">     if (clientBox.contains(rect) || rect.isEmpty())
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="lines">@@ -4352,7 +4352,7 @@
</span><span class="cx">         return;
</span><span class="cx">         
</span><span class="cx">     if (!m_overflow)
</span><del>-        m_overflow = adoptRef(new RenderOverflow(clientBoxRect(), borderBox));
</del><ins>+        m_overflow = adoptRef(new RenderOverflow(flippedClientBoxRect(), borderBox));
</ins><span class="cx">     
</span><span class="cx">     m_overflow-&gt;addVisualOverflow(rect);
</span><span class="cx"> }
</span><span class="lines">@@ -4545,6 +4545,26 @@
</span><span class="cx">     return rect;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+LayoutRect RenderBox::flippedClientBoxRect() const
+{
+    // Because of the special coodinate system used for overflow rectangles (not quite logical, not
+    // quite physical), we need to flip the block progression coordinate in vertical-rl and
+    // horizontal-bt writing modes. Apart from that, this method does the same as clientBoxRect().
+
+    LayoutUnit left = borderLeft();
+    LayoutUnit top = borderTop();
+    LayoutUnit right = borderRight();
+    LayoutUnit bottom = borderBottom();
+    // Calculate physical padding box.
+    LayoutRect rect(left, top, width() - left - right, height() - top - bottom);
+    // Flip block progression axis if writing mode is vertical-rl or horizontal-bt.
+    flipForWritingMode(rect);
+    // Subtract space occupied by scrollbars. They are at their physical edge in this coordinate
+    // system, so order is important here: first flip, then subtract scrollbars.
+    rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight());
+    return rect;
+}
+
</ins><span class="cx"> LayoutRect RenderBox::overflowRectForPaintRejection(RenderNamedFlowFragment* namedFlowFragment) const
</span><span class="cx"> {
</span><span class="cx">     LayoutRect overflowRect = visualOverflowRect();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.h (167705 => 167706)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.h        2014-04-23 12:30:22 UTC (rev 167705)
+++ trunk/Source/WebCore/rendering/RenderBox.h        2014-04-23 13:32:56 UTC (rev 167706)
</span><span class="lines">@@ -189,7 +189,8 @@
</span><span class="cx">     // For horizontal-tb and vertical-lr they will match physical directions, but for horizontal-bt and vertical-rl, the top/bottom and left/right
</span><span class="cx">     // respectively are flipped when compared to their physical counterparts.  For example minX is on the left in vertical-lr,
</span><span class="cx">     // but it is on the right in vertical-rl.
</span><del>-    LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow-&gt;layoutOverflowRect() : clientBoxRect(); }
</del><ins>+    LayoutRect flippedClientBoxRect() const;
+    LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow-&gt;layoutOverflowRect() : flippedClientBoxRect(); }
</ins><span class="cx">     LayoutUnit logicalLeftLayoutOverflow() const { return style().isHorizontalWritingMode() ? layoutOverflowRect().x() : layoutOverflowRect().y(); }
</span><span class="cx">     LayoutUnit logicalRightLayoutOverflow() const { return style().isHorizontalWritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); }
</span><span class="cx">     
</span></span></pre>
</div>
</div>

</body>
</html>