<!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>[178259] releases/WebKitGTK/webkit-2.6</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/178259">178259</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-01-12 06:16:29 -0800 (Mon, 12 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/176285">r176285</a> - Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
https://bugs.webkit.org/show_bug.cgi?id=138204

Source/WebCore:

Reviewed by Dave Hyatt.

This code is responsible for pushing block elements to the next column if
the &quot;orphans&quot; CSS property is triggered. The mechanism by which this is
achieved is to push the block down such that the origin of the block is
at the origin of the next column. However, if there is negative line
spacing, the top portion of the text might actually be on top of the
origin of the block. Therefore, the block wasn't being pushed down enough
to entirely contain its text, so the top pieces were being drawn on the
previous column.

Test: fast/multicol/orphans-negative-line-spacing.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):

LayoutTests:

Patch by Myles C. Maxfield &lt;litherum@gmail.com&gt; on 2014-11-18
Reviewed by Dave Hyatt.

Create a layout where the &quot;orphans&quot; css property causes a block element to
be pushed to the next column.

* fast/multicol/orphans-negative-line-spacing-expected.html: Added.
* fast/multicol/orphans-negative-line-spacing.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit26LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCorerenderingRenderBlockFlowcpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit26LayoutTestsfastmulticolorphansnegativelinespacingexpectedhtml">releases/WebKitGTK/webkit-2.6/LayoutTests/fast/multicol/orphans-negative-line-spacing-expected.html</a></li>
<li><a href="#releasesWebKitGTKwebkit26LayoutTestsfastmulticolorphansnegativelinespacinghtml">releases/WebKitGTK/webkit-2.6/LayoutTests/fast/multicol/orphans-negative-line-spacing.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit26LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog (178258 => 178259)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog        2015-01-12 14:14:59 UTC (rev 178258)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog        2015-01-12 14:16:29 UTC (rev 178259)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-11-18  Myles C. Maxfield  &lt;litherum@gmail.com&gt;
+
+        Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
+        https://bugs.webkit.org/show_bug.cgi?id=138204
+
+        Reviewed by Dave Hyatt.
+
+        Create a layout where the &quot;orphans&quot; css property causes a block element to
+        be pushed to the next column.
+
+        * fast/multicol/orphans-negative-line-spacing-expected.html: Added.
+        * fast/multicol/orphans-negative-line-spacing.html: Added.
+
</ins><span class="cx"> 2014-11-18  Philippe Normand  &lt;pnormand@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         start/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26LayoutTestsfastmulticolorphansnegativelinespacingexpectedhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.6/LayoutTests/fast/multicol/orphans-negative-line-spacing-expected.html (0 => 178259)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/LayoutTests/fast/multicol/orphans-negative-line-spacing-expected.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/fast/multicol/orphans-negative-line-spacing-expected.html        2015-01-12 14:16:29 UTC (rev 178259)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+    if (window.internals)
+        internals.setPagination(&quot;LeftToRightPaginated&quot;, 0);
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div style=&quot;height: 35px;&quot;&gt;
+This test makes sure that orphans get pushed to the next page correctly in paginated content. The test fails if you
+see little bits of black at the bottom of the window. (But you should see two giant paragraphs of Ahem text)
+&lt;/div&gt;
+&lt;div style=&quot;font: 20px ahem; line-height: 50%; orphans: 5;&quot;&gt;
+&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc in ornare enim, quis condimentum ipsum. Pellentesque eu pretium urna, ac fringilla felis. Etiam eros massa, posuere at efficitur id, interdum at est. Fusce nec purus purus. Fusce dignissim lorem tortor, ut sollicitudin augue malesuada et. Pellentesque malesuada iaculis elit a consequat. Aliquam erat volutpat. Mauris quis est non velit iaculis porttitor. Donec a mauris id risus elementum tincidunt. Donec fermentum ipsum ac cursus iaculis. Curabitur vitae nisi tortor. Donec sit amet posuere odio, a viverra ipsum. Nulla sit amet mauris finibus metus accumsan tempus nec et quam. Mauris non convallis nisl, quis finibus leo. Etiam lacinia eros vitae est dapibus tempor.&lt;/p&gt;
+&lt;p&gt;Nullam quis est vel mauris volutpat luctus. Morbi eget libero feugiat, lacinia tellus nec, auctor nulla. Suspendisse potenti. Vestibulum lobortis et sapien eu consequat. Aenean dui tellus, dapibus quis ante vel, dictum finibus ipsum. Cras eu risus malesuada, maximus nisl ultrices, placerat velit. Donec egestas, libero ut feugiat pretium, quam ligula rhoncus tortor, tempus hendrerit nulla tortor vel sem. Integer lacinia, nisi sed lobortis tincidunt, tortor mauris tincidunt leo, eu lacinia leo augue eu arcu. Donec ultricies vel arcu eget bibendum. Vestibulum placerat, lectus quis sagittis maximus, mi arcu pharetra massa, nec posuere dolor tortor nec erat. Proin luctus pharetra augue sed tincidunt. Fusce non mauris pharetra, viverra libero in, porttitor libero. Nam nibh magna, faucibus id erat eu, ornare maximus odio. Suspendisse bibendum augue hendrerit, vehicula est nec, porttitor libero. Cras eget augue non urna consectetur feugiat. Nulla eget fringilla dui.&lt;/p&g
 t;
+&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
+&lt;p&gt;Suspendisse id fermentum dolor. Sed vestibulum metus sit amet dictum faucibus. In interdum sapien turpis, viverra sagittis justo consequat eu. Nullam lacinia lacus convallis felis sodales, id luctus quam sodales. Nunc sit amet elit quis libero placerat aliquet eu in massa. Morbi blandit urna urna, id tincidunt quam porta sed. Suspendisse sagittis ex aliquam congue luctus. Nunc tincidunt erat vel dui blandit, sit amet blandit augue pulvinar. Nullam efficitur nulla sit amet arcu rutrum consectetur. Suspendisse pretium lectus lectus, vitae sagittis ante auctor ac. Praesent ut arcu ac eros imperdiet rhoncus. Sed imperdiet bibendum pretium. Etiam ornare libero nulla, vitae interdum nunc interdum at.&lt;/p&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;html&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit26LayoutTestsfastmulticolorphansnegativelinespacinghtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.6/LayoutTests/fast/multicol/orphans-negative-line-spacing.html (0 => 178259)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/LayoutTests/fast/multicol/orphans-negative-line-spacing.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/fast/multicol/orphans-negative-line-spacing.html        2015-01-12 14:16:29 UTC (rev 178259)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+    if (window.internals)
+        internals.setPagination(&quot;LeftToRightPaginated&quot;, 0);
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div style=&quot;height: 35px;&quot;&gt;
+This test makes sure that orphans get pushed to the next page correctly in paginated content. The test fails if you
+see little bits of black at the bottom of the window. (But you should see two giant paragraphs of Ahem text)
+&lt;/div&gt;
+&lt;div style=&quot;font: 20px ahem; line-height: 50%; orphans: 5;&quot;&gt;
+&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc in ornare enim, quis condimentum ipsum. Pellentesque eu pretium urna, ac fringilla felis. Etiam eros massa, posuere at efficitur id, interdum at est. Fusce nec purus purus. Fusce dignissim lorem tortor, ut sollicitudin augue malesuada et. Pellentesque malesuada iaculis elit a consequat. Aliquam erat volutpat. Mauris quis est non velit iaculis porttitor. Donec a mauris id risus elementum tincidunt. Donec fermentum ipsum ac cursus iaculis. Curabitur vitae nisi tortor. Donec sit amet posuere odio, a viverra ipsum. Nulla sit amet mauris finibus metus accumsan tempus nec et quam. Mauris non convallis nisl, quis finibus leo. Etiam lacinia eros vitae est dapibus tempor.&lt;/p&gt;
+&lt;p&gt;Nullam quis est vel mauris volutpat luctus. Morbi eget libero feugiat, lacinia tellus nec, auctor nulla. Suspendisse potenti. Vestibulum lobortis et sapien eu consequat. Aenean dui tellus, dapibus quis ante vel, dictum finibus ipsum. Cras eu risus malesuada, maximus nisl ultrices, placerat velit. Donec egestas, libero ut feugiat pretium, quam ligula rhoncus tortor, tempus hendrerit nulla tortor vel sem. Integer lacinia, nisi sed lobortis tincidunt, tortor mauris tincidunt leo, eu lacinia leo augue eu arcu. Donec ultricies vel arcu eget bibendum. Vestibulum placerat, lectus quis sagittis maximus, mi arcu pharetra massa, nec posuere dolor tortor nec erat. Proin luctus pharetra augue sed tincidunt. Fusce non mauris pharetra, viverra libero in, porttitor libero. Nam nibh magna, faucibus id erat eu, ornare maximus odio. Suspendisse bibendum augue hendrerit, vehicula est nec, porttitor libero. Cras eget augue non urna consectetur feugiat. Nulla eget fringilla dui.&lt;/p&g
 t;
+&lt;p&gt;Suspendisse id fermentum dolor. Sed vestibulum metus sit amet dictum faucibus. In interdum sapien turpis, viverra sagittis justo consequat eu. Nullam lacinia lacus convallis felis sodales, id luctus quam sodales. Nunc sit amet elit quis libero placerat aliquet eu in massa. Morbi blandit urna urna, id tincidunt quam porta sed. Suspendisse sagittis ex aliquam congue luctus. Nunc tincidunt erat vel dui blandit, sit amet blandit augue pulvinar. Nullam efficitur nulla sit amet arcu rutrum consectetur. Suspendisse pretium lectus lectus, vitae sagittis ante auctor ac. Praesent ut arcu ac eros imperdiet rhoncus. Sed imperdiet bibendum pretium. Etiam ornare libero nulla, vitae interdum nunc interdum at.&lt;/p&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;html&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog (178258 => 178259)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog        2015-01-12 14:14:59 UTC (rev 178258)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog        2015-01-12 14:16:29 UTC (rev 178259)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-11-18  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
+        https://bugs.webkit.org/show_bug.cgi?id=138204
+
+        Reviewed by Dave Hyatt.
+
+        This code is responsible for pushing block elements to the next column if
+        the &quot;orphans&quot; CSS property is triggered. The mechanism by which this is
+        achieved is to push the block down such that the origin of the block is
+        at the origin of the next column. However, if there is negative line
+        spacing, the top portion of the text might actually be on top of the
+        origin of the block. Therefore, the block wasn't being pushed down enough
+        to entirely contain its text, so the top pieces were being drawn on the
+        previous column.
+
+        Test: fast/multicol/orphans-negative-line-spacing.html
+
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
+
</ins><span class="cx"> 2014-11-19  Philippe Normand  &lt;pnormand@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Missing NULL-check in VideoTrack::setLanguage
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/RenderBlockFlow.cpp (178258 => 178259)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-01-12 14:14:59 UTC (rev 178258)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-01-12 14:16:29 UTC (rev 178259)
</span><span class="lines">@@ -1680,9 +1680,12 @@
</span><span class="cx">         LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight);
</span><span class="cx">         setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight);
</span><span class="cx">         if (((lineBox == firstRootBox() &amp;&amp; totalLogicalHeight &lt; pageLogicalHeightAtNewOffset) || (!style().hasAutoOrphans() &amp;&amp; style().orphans() &gt;= lineIndex))
</span><del>-            &amp;&amp; !isOutOfFlowPositioned() &amp;&amp; !isTableCell())
-            setPaginationStrut(remainingLogicalHeight + std::max&lt;LayoutUnit&gt;(0, logicalOffset));
-        else {
</del><ins>+            &amp;&amp; !isOutOfFlowPositioned() &amp;&amp; !isTableCell()) {
+            auto firstRootBox = this-&gt;firstRootBox();
+            auto firstRootBoxOverflowRect = firstRootBox-&gt;logicalVisualOverflowRect(firstRootBox-&gt;lineTop(), firstRootBox-&gt;lineBottom());
+            auto firstLineUpperOverhang = std::max(-firstRootBoxOverflowRect.y(), LayoutUnit());
+            setPaginationStrut(remainingLogicalHeight + logicalOffset + firstLineUpperOverhang);
+        } else {
</ins><span class="cx">             delta += remainingLogicalHeight;
</span><span class="cx">             lineBox-&gt;setPaginationStrut(remainingLogicalHeight);
</span><span class="cx">             lineBox-&gt;setIsFirstAfterPageBreak(true);
</span></span></pre>
</div>
</div>

</body>
</html>