<!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 <bshafiei@apple.com>
</span><span class="cx">
</span><ins>+ Merge r176354.
+
+ 2014-11-19 David Hyatt <hyatt@apple.com>
+
+ 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 - <rdar://problem/18296371>
+
+ 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 <bshafiei@apple.com>
+
</ins><span class="cx"> Merge r176285.
</span><span class="cx">
</span><span class="cx"> 2014-11-18 Myles C. Maxfield <litherum@gmail.com>
</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>+<!doctype html>
+<body style="-webkit-writing-mode:vertical-lr">
+<div style="-webkit-columns:2; width:300px; border:2px solid blue;-webkit-line-box-contain:glyphs replaced">
+<p>This image should not be split across columns.<br>
+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.
+</p>
+<div style="display:inline-block; width:100%; height:50px;background-color:lime"></div>
+
+<div style="display:inline-block; height:100%; width:50px;background-color:purple"></div>
+</div></div>
</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>+<!doctype html>
+<body style="-webkit-writing-mode:vertical-rl">
+<div style="-webkit-columns:2; width:300px; border:2px solid blue;-webkit-line-box-contain:glyphs replaced">
+<p>This image should not be split across columns.<br>
+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.
+</p>
+<div style="display:inline-block; width:100%; height:50px;background-color:lime"></div>
+
+<div style="display:inline-block; height:100%; width:50px;background-color:purple"></div>
+</div></div>
</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>+<!doctype html>
+<div style="-webkit-columns:2; height:300px; border:2px solid blue;-webkit-line-box-contain:glyphs replaced">
+<p>This image should not be split across columns.<br>
+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.
+</p>
+<div style="display:inline-block; height:100%; width:50px;background-color:lime"></div>
+
+<div style="display:inline-block; width:100%; height:50px;background-color:purple"></div>
+</div></div>
</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: "This image should not be split across columns."
+ RenderBR {BR} at (293,-3) size 0x18
+ RenderText {#text} at (0,12) size 368x48
+ text run at (0,12) width 368: "The reason it should not be split is that the line contains no"
+ text run at (0,27) width 367: "text and so we should be willing to allow it to sit at the top"
+ text run at (0,42) width 93: "of a new page."
+ 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: "This image should not be split across"
+ text run at (18,0) width 57: "columns."
+ RenderBR {BR} at (18,57) size 18x0
+ RenderText {#text} at (36,0) size 72x266
+ text run at (36,0) width 265: "The reason it should not be split is that the"
+ text run at (54,0) width 259: "line contains no text and so we should be"
+ text run at (72,0) width 266: "willing to allow it to sit at the top of a new"
+ text run at (90,0) width 34: "page."
+ 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: "This image should not be split across"
+ text run at (18,0) width 57: "columns."
+ RenderBR {BR} at (18,57) size 18x0
+ RenderText {#text} at (36,0) size 72x266
+ text run at (36,0) width 265: "The reason it should not be split is that the"
+ text run at (54,0) width 259: "line contains no text and so we should be"
+ text run at (72,0) width 266: "willing to allow it to sit at the top of a new"
+ text run at (90,0) width 34: "page."
+ 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 <bshafiei@apple.com>
</span><span class="cx">
</span><ins>+ Merge r176354.
+
+ 2014-11-19 David Hyatt <hyatt@apple.com>
+
+ 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 - <rdar://problem/18296371>
+
+ 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 <bshafiei@apple.com>
+
</ins><span class="cx"> Merge r176318.
</span><span class="cx">
</span><span class="cx"> 2014-11-19 Chris Fleizach <cfleizach@apple.com>
</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& lineTop, LayoutUnit& lineBottom) const
+{
+ for (const auto* box = firstChild(); box; box = box->nextOnLine()) {
+ if (box->isInlineFlowBox())
+ toInlineFlowBox(box)->computeReplacedAndTextLineTopAndBottom(lineTop, lineBottom);
+ else {
+ if (box->logicalTop() < lineTop)
+ lineTop = box->logicalTop();
+ if (box->logicalBottom() > lineBottom)
+ lineBottom = box->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()->clearDescendantsHaveSameLineHeightAndBaseline();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ void computeReplacedAndTextLineTopAndBottom(LayoutUnit& lineTop, LayoutUnit& 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->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 && logicalVisualOverflow.height() > 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 && logicalVisualOverflow.height() > 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 "blank space". 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->computeReplacedAndTextLineTopAndBottom(logicalOffset, logicalBottom);
+ lineHeight = logicalBottom - logicalOffset;
+ if (logicalOffset == intMaxForLayoutUnit || lineHeight > 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 > remainingLogicalHeight);
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>