<!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>[178830] branches/safari-600.1.4.15-branch</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/178830">178830</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-01-21 10:24:47 -0800 (Wed, 21 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/176354">r176354</a>.  rdar://problem/19432696</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001415branchLayoutTestsChangeLog">branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoreChangeLog">branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorerenderingInlineFlowBoxcpp">branches/safari-600.1.4.15-branch/Source/WebCore/rendering/InlineFlowBox.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorerenderingInlineFlowBoxh">branches/safari-600.1.4.15-branch/Source/WebCore/rendering/InlineFlowBox.h</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorerenderingRenderBlockFlowcpp">branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6001415branchLayoutTestsfastmulticoltallimagebehaviorlrhtml">branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior-lr.html</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsfastmulticoltallimagebehaviorrlhtml">branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior-rl.html</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsfastmulticoltallimagebehaviorhtml">branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior.html</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorexpectedpng">branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-expected.png</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorexpectedtxt">branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-expected.txt</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorlrexpectedpng">branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.png</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorlrexpectedtxt">branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorrlexpectedpng">branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-rl-expected.png</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorrlexpectedtxt">branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-rl-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001415branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog (178829 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog        2015-01-21 18:20:32 UTC (rev 178829)
+++ branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -1,5 +1,26 @@
</span><span class="cx"> 2015-01-21  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r176354.
+
+    2014-11-19  David Hyatt  &lt;hyatt@apple.com&gt;
+
+            Images/replaced elements that are as tall as a page should be on their own page
+            https://bugs.webkit.org/show_bug.cgi?id=138886 - &lt;rdar://problem/18296371&gt;
+
+            Reviewed by Dean Jackson.
+
+            * fast/multicol/tall-image-behavior-lr.html: Added.
+            * fast/multicol/tall-image-behavior-rl.html: Added.
+            * fast/multicol/tall-image-behavior.html: Added.
+            * platform/mac/fast/multicol/tall-image-behavior-expected.png: Added.
+            * platform/mac/fast/multicol/tall-image-behavior-expected.txt: Added.
+            * platform/mac/fast/multicol/tall-image-behavior-lr-expected.png: Added.
+            * platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt: Added.
+            * platform/mac/fast/multicol/tall-image-behavior-rl-expected.png: Added.
+            * platform/mac/fast/multicol/tall-image-behavior-rl-expected.txt: Added.
+
+2015-01-21  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
</ins><span class="cx">         Merge r176285.
</span><span class="cx"> 
</span><span class="cx">     2014-11-18  Myles C. Maxfield  &lt;litherum@gmail.com&gt;
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsfastmulticoltallimagebehaviorlrhtmlfromrev176354trunkLayoutTestsfastmulticoltallimagebehaviorlrhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior-lr.html (from rev 176354, trunk/LayoutTests/fast/multicol/tall-image-behavior-lr.html) (0 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior-lr.html                                (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior-lr.html        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;body style=&quot;-webkit-writing-mode:vertical-lr&quot;&gt;
+&lt;div style=&quot;-webkit-columns:2; width:300px; border:2px solid blue;-webkit-line-box-contain:glyphs replaced&quot;&gt;
+&lt;p&gt;This image should not be split across columns.&lt;br&gt;
+The reason it should not be split is that the line contains no
+text and so we should be willing to allow it to sit at the top of a new
+page.
+&lt;/p&gt;
+&lt;div style=&quot;display:inline-block; width:100%; height:50px;background-color:lime&quot;&gt;&lt;/div&gt;
+
+&lt;div style=&quot;display:inline-block; height:100%; width:50px;background-color:purple&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;&lt;/div&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsfastmulticoltallimagebehaviorrlhtmlfromrev176354trunkLayoutTestsfastmulticoltallimagebehaviorrlhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior-rl.html (from rev 176354, trunk/LayoutTests/fast/multicol/tall-image-behavior-rl.html) (0 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior-rl.html                                (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior-rl.html        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;body style=&quot;-webkit-writing-mode:vertical-rl&quot;&gt;
+&lt;div style=&quot;-webkit-columns:2; width:300px; border:2px solid blue;-webkit-line-box-contain:glyphs replaced&quot;&gt;
+&lt;p&gt;This image should not be split across columns.&lt;br&gt;
+The reason it should not be split is that the line contains no
+text and so we should be willing to allow it to sit at the top of a new
+page.
+&lt;/p&gt;
+&lt;div style=&quot;display:inline-block; width:100%; height:50px;background-color:lime&quot;&gt;&lt;/div&gt;
+
+&lt;div style=&quot;display:inline-block; height:100%; width:50px;background-color:purple&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;&lt;/div&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsfastmulticoltallimagebehaviorhtmlfromrev176354trunkLayoutTestsfastmulticoltallimagebehaviorhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior.html (from rev 176354, trunk/LayoutTests/fast/multicol/tall-image-behavior.html) (0 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior.html                                (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/tall-image-behavior.html        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;div style=&quot;-webkit-columns:2; height:300px; border:2px solid blue;-webkit-line-box-contain:glyphs replaced&quot;&gt;
+&lt;p&gt;This image should not be split across columns.&lt;br&gt;
+The reason it should not be split is that the line contains no
+text and so we should be willing to allow it to sit at the top of a new
+page.
+&lt;/p&gt;
+&lt;div style=&quot;display:inline-block; height:100%; width:50px;background-color:lime&quot;&gt;&lt;/div&gt;
+
+&lt;div style=&quot;display:inline-block; width:100%; height:50px;background-color:purple&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;&lt;/div&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorexpectedpngfromrev176354trunkLayoutTestsplatformmacfastmulticoltallimagebehaviorexpectedpng"></a>
<div class="binary"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-expected.png (from rev 176354, trunk/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-expected.png)</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorexpectedtxtfromrev176354trunkLayoutTestsplatformmacfastmulticoltallimagebehaviorexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-expected.txt (from rev 176354, trunk/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-expected.txt) (0 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-expected.txt                                (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-expected.txt        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+layer at (0,0) size 1188x585
+  RenderView at (0,0) size 800x585
+layer at (0,0) size 800x320
+  RenderBlock {HTML} at (0,0) size 800x320
+    RenderBody {BODY} at (8,8) size 784x304
+layer at (8,8) size 784x304
+  RenderBlock {DIV} at (0,0) size 784x304 [border: (2px solid #0000FF)]
+    RenderMultiColumnSet at (2,2) size 780x300
+layer at (10,10) size 382x650 backgroundClip at (0,0) size 1188x585 clip at (0,0) size 1188x585 outlineClip at (0,0) size 1188x585
+  RenderMultiColumnFlowThread at (2,2) size 382x650
+    RenderBlock {P} at (0,16) size 382x60
+      RenderText {#text} at (0,-3) size 293x18
+        text run at (0,-3) width 293: &quot;This image should not be split across columns.&quot;
+      RenderBR {BR} at (293,-3) size 0x18
+      RenderText {#text} at (0,12) size 368x48
+        text run at (0,12) width 368: &quot;The reason it should not be split is that the line contains no&quot;
+        text run at (0,27) width 367: &quot;text and so we should be willing to allow it to sit at the top&quot;
+        text run at (0,42) width 93: &quot;of a new page.&quot;
+    RenderBlock (anonymous) at (0,92) size 382x558
+      RenderBlock {DIV} at (0,208) size 50x300 [bgcolor=#00FF00]
+      RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,508) size 382x50 [bgcolor=#800080]
+      RenderText {#text} at (0,0) size 0x0
</ins></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorlrexpectedpngfromrev176354trunkLayoutTestsplatformmacfastmulticoltallimagebehaviorlrexpectedpng"></a>
<div class="binary"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.png (from rev 176354, trunk/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.png)</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorlrexpectedtxtfromrev176354trunkLayoutTestsplatformmacfastmulticoltallimagebehaviorlrexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt (from rev 176354, trunk/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt) (0 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt                                (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+layer at (0,0) size 785x888
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 320x600
+  RenderBlock {HTML} at (0,0) size 320x600
+    RenderBody {BODY} at (8,8) size 304x584
+layer at (8,8) size 304x584
+  RenderBlock {DIV} at (0,0) size 304x584 [border: (2px solid #0000FF)]
+    RenderMultiColumnSet at (2,2) size 300x580
+layer at (10,10) size 650x282
+  RenderMultiColumnFlowThread at (2,2) size 650x282
+    RenderBlock {P} at (16,0) size 108x282
+      RenderText {#text} at (0,0) size 36x232
+        text run at (0,0) width 232: &quot;This image should not be split across&quot;
+        text run at (18,0) width 57: &quot;columns.&quot;
+      RenderBR {BR} at (18,57) size 18x0
+      RenderText {#text} at (36,0) size 72x266
+        text run at (36,0) width 265: &quot;The reason it should not be split is that the&quot;
+        text run at (54,0) width 259: &quot;line contains no text and so we should be&quot;
+        text run at (72,0) width 266: &quot;willing to allow it to sit at the top of a new&quot;
+        text run at (90,0) width 34: &quot;page.&quot;
+    RenderBlock (anonymous) at (140,0) size 510x282
+      RenderBlock {DIV} at (160,0) size 300x50 [bgcolor=#00FF00]
+      RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (464,0) size 50x282 [bgcolor=#800080]
+      RenderText {#text} at (0,0) size 0x0
</ins></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorrlexpectedpngfromrev176354trunkLayoutTestsplatformmacfastmulticoltallimagebehaviorrlexpectedpng"></a>
<div class="binary"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-rl-expected.png (from rev 176354, trunk/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-rl-expected.png)</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsplatformmacfastmulticoltallimagebehaviorrlexpectedtxtfromrev176354trunkLayoutTestsplatformmacfastmulticoltallimagebehaviorrlexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-rl-expected.txt (from rev 176354, trunk/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-rl-expected.txt) (0 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-rl-expected.txt                                (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/platform/mac/fast/multicol/tall-image-behavior-rl-expected.txt        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+layer at (0,0) size 785x888
+  RenderView at (0,0) size 785x600
+layer at (465,0) size 320x600
+  RenderBlock {HTML} at (0,0) size 320x600
+    RenderBody {BODY} at (8,8) size 304x584
+layer at (473,8) size 304x584
+  RenderBlock {DIV} at (0,0) size 304x584 [border: (2px solid #0000FF)]
+    RenderMultiColumnSet at (2,2) size 300x580
+layer at (125,10) size 650x282
+  RenderMultiColumnFlowThread at (2,2) size 650x282
+    RenderBlock {P} at (16,0) size 108x282
+      RenderText {#text} at (0,0) size 36x232
+        text run at (0,0) width 232: &quot;This image should not be split across&quot;
+        text run at (18,0) width 57: &quot;columns.&quot;
+      RenderBR {BR} at (18,57) size 18x0
+      RenderText {#text} at (36,0) size 72x266
+        text run at (36,0) width 265: &quot;The reason it should not be split is that the&quot;
+        text run at (54,0) width 259: &quot;line contains no text and so we should be&quot;
+        text run at (72,0) width 266: &quot;willing to allow it to sit at the top of a new&quot;
+        text run at (90,0) width 34: &quot;page.&quot;
+    RenderBlock (anonymous) at (140,0) size 510x282
+      RenderBlock {DIV} at (160,0) size 300x50 [bgcolor=#00FF00]
+      RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (460,0) size 50x282 [bgcolor=#800080]
+      RenderText {#text} at (0,0) size 0x0
</ins></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog (178829 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog        2015-01-21 18:20:32 UTC (rev 178829)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2015-01-21  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r176354.
+
+    2014-11-19  David Hyatt  &lt;hyatt@apple.com&gt;
+
+            Images/replaced elements that are as tall as a page should be on their own page
+            https://bugs.webkit.org/show_bug.cgi?id=138886 - &lt;rdar://problem/18296371&gt;
+
+            Reviewed by Dean Jackson.
+
+            Added fast/multicol/tall-image-behavior.html (and RL/LR variants)
+
+            * rendering/InlineFlowBox.cpp:
+            (WebCore::InlineFlowBox::computeReplacedAndTextLineTopAndBottom):
+            * rendering/InlineFlowBox.h:
+            Add a new method that computes the line top and line bottom ignoring all margins,
+            overflow and line-height. This allows us to see if a line that is taller than a page
+            can be made to fit if we ignored margins and unused descent.
+
+            * rendering/RenderBlockFlow.cpp:
+            (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
+            Call the new helper function, computeReplacedAndTextLineTopAndBottom and push
+            to a new page if we see that we can fit on a page by ourselves without blank space
+            included.
+
+2015-01-21  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
</ins><span class="cx">         Merge r176318.
</span><span class="cx"> 
</span><span class="cx">     2014-11-19  Chris Fleizach  &lt;cfleizach@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorerenderingInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/InlineFlowBox.cpp (178829 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/InlineFlowBox.cpp        2015-01-21 18:20:32 UTC (rev 178829)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/InlineFlowBox.cpp        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -1638,6 +1638,20 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InlineFlowBox::computeReplacedAndTextLineTopAndBottom(LayoutUnit&amp; lineTop, LayoutUnit&amp; lineBottom) const
+{
+    for (const auto* box = firstChild(); box; box = box-&gt;nextOnLine()) {
+        if (box-&gt;isInlineFlowBox())
+            toInlineFlowBox(box)-&gt;computeReplacedAndTextLineTopAndBottom(lineTop, lineBottom);
+        else {
+            if (box-&gt;logicalTop() &lt; lineTop)
+                lineTop = box-&gt;logicalTop();
+            if (box-&gt;logicalBottom() &gt; lineBottom)
+                lineBottom = box-&gt;logicalBottom();
+        }
+    }
+}
+
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> 
</span><span class="cx"> const char* InlineFlowBox::boxName() const
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorerenderingInlineFlowBoxh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/InlineFlowBox.h (178829 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/InlineFlowBox.h        2015-01-21 18:20:32 UTC (rev 178829)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/InlineFlowBox.h        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -291,6 +291,8 @@
</span><span class="cx">             parent()-&gt;clearDescendantsHaveSameLineHeightAndBaseline();
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    void computeReplacedAndTextLineTopAndBottom(LayoutUnit&amp; lineTop, LayoutUnit&amp; lineBottom) const;
+    
</ins><span class="cx"> private:
</span><span class="cx">     virtual bool isInlineFlowBox() const override final { return true; }
</span><span class="cx">     void boxModelObject() const = delete;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlockFlow.cpp (178829 => 178830)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-01-21 18:20:32 UTC (rev 178829)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-01-21 18:24:47 UTC (rev 178830)
</span><span class="lines">@@ -1655,11 +1655,28 @@
</span><span class="cx">     bool hasUniformPageLogicalHeight = !flowThread || flowThread-&gt;regionsHaveUniformLogicalHeight();
</span><span class="cx">     // If lineHeight is greater than pageLogicalHeight, but logicalVisualOverflow.height() still fits, we are
</span><span class="cx">     // still going to add a strut, so that the visible overflow fits on a single page.
</span><del>-    if (!pageLogicalHeight || (hasUniformPageLogicalHeight &amp;&amp; logicalVisualOverflow.height() &gt; pageLogicalHeight)
-        || !hasNextPage(logicalOffset))
</del><ins>+    if (!pageLogicalHeight || !hasNextPage(logicalOffset)) {
</ins><span class="cx">         // FIXME: In case the line aligns with the top of the page (or it's slightly shifted downwards) it will not be marked as the first line in the page.
</span><span class="cx">         // From here, the fix is not straightforward because it's not easy to always determine when the current line is the first in the page.
</span><span class="cx">         return;
</span><ins>+    }
+
+    if (hasUniformPageLogicalHeight &amp;&amp; logicalVisualOverflow.height() &gt; pageLogicalHeight) {
+        // We are so tall that we are bigger than a page. Before we give up and just leave the line where it is, try drilling into the
+        // line and computing a new height that excludes anything we consider &quot;blank space&quot;. We will discard margins, descent, and even overflow. If we are
+        // able to fit with the blank space and overflow excluded, we will give the line its own page with the highest non-blank element being aligned with the
+        // top of the page.
+        // FIXME: We are still honoring gigantic margins, which does leave open the possibility of blank pages caused by this heuristic. It remains to be seen whether or not
+        // this will be a real-world issue. For now we don't try to deal with this problem.
+        logicalOffset = intMaxForLayoutUnit;
+        logicalBottom = intMinForLayoutUnit;
+        lineBox-&gt;computeReplacedAndTextLineTopAndBottom(logicalOffset, logicalBottom);
+        lineHeight = logicalBottom - logicalOffset;
+        if (logicalOffset == intMaxForLayoutUnit || lineHeight &gt; pageLogicalHeight)
+            return; // Give up. We're genuinely too big even after excluding blank space and overflow.
+        pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
+    }
+    
</ins><span class="cx">     LayoutUnit remainingLogicalHeight = pageRemainingLogicalHeightForOffset(logicalOffset, ExcludePageBoundary);
</span><span class="cx">     overflowsRegion = (lineHeight &gt; remainingLogicalHeight);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>