<!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>[191557] releases/WebKitGTK/webkit-2.10</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/191557">191557</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-10-26 00:28:25 -0700 (Mon, 26 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/191195">r191195</a> - First line box in paragraph using initial-letter overflows.
https://bugs.webkit.org/show_bug.cgi?id=147977
&lt;rdar://problem/22901553&gt;

Reviewed by David Hyatt.

When initial-letter float is present, we should shrink the first
line even if it's not intersected with the block's current height.
This is because of the sunken behaviour of initial-letter.

Source/WebCore:

Test: fast/css-generated-content/initial-letter-first-line-wrapping.html

* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleFloat):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/line/LineBreaker.h:
(WebCore::LineBreaker::positionNewFloatOnLine):
* rendering/line/LineWidth.cpp:
(WebCore::newFloatShrinksLine):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/line/LineWidth.h:

LayoutTests:

* fast/css-generated-content/initial-letter-first-line-wrapping-expected.html: Added.
* fast/css-generated-content/initial-letter-first-line-wrapping.html: Added.
* platform/mac/fast/css-generated-content/initial-letter-basic-expected.txt: progression.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210LayoutTestsplatformmacfastcssgeneratedcontentinitialletterbasicexpectedtxt">releases/WebKitGTK/webkit-2.10/LayoutTests/platform/mac/fast/css-generated-content/initial-letter-basic-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderingRenderBlockFlowh">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockFlow.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderingRenderBlockLineLayoutcpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderinglineBreakingContexth">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/BreakingContext.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderinglineLineBreakercpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineBreaker.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderinglineLineBreakerh">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineBreaker.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderinglineLineWidthcpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineWidth.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderinglineLineWidthh">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineWidth.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210LayoutTestsfastcssgeneratedcontentinitialletterfirstlinewrappingexpectedhtml">releases/WebKitGTK/webkit-2.10/LayoutTests/fast/css-generated-content/initial-letter-first-line-wrapping-expected.html</a></li>
<li><a href="#releasesWebKitGTKwebkit210LayoutTestsfastcssgeneratedcontentinitialletterfirstlinewrappinghtml">releases/WebKitGTK/webkit-2.10/LayoutTests/fast/css-generated-content/initial-letter-first-line-wrapping.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit210LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-10-16  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        First line box in paragraph using initial-letter overflows.
+        https://bugs.webkit.org/show_bug.cgi?id=147977
+        &lt;rdar://problem/22901553&gt;
+
+        Reviewed by David Hyatt.
+
+        When initial-letter float is present, we should shrink the first
+        line even if it's not intersected with the block's current height.
+        This is because of the sunken behaviour of initial-letter. 
+
+        * fast/css-generated-content/initial-letter-first-line-wrapping-expected.html: Added.
+        * fast/css-generated-content/initial-letter-first-line-wrapping.html: Added.
+        * platform/mac/fast/css-generated-content/initial-letter-basic-expected.txt: progression.
+
</ins><span class="cx"> 2015-10-15  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSSKeyframesRule::appendRule is deprecated, but is actually the spec
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210LayoutTestsfastcssgeneratedcontentinitialletterfirstlinewrappingexpectedhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/css-generated-content/initial-letter-first-line-wrapping-expected.html (0 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/css-generated-content/initial-letter-first-line-wrapping-expected.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/css-generated-content/initial-letter-first-line-wrapping-expected.html        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+    body {
+        font-family: Ahem;
+    }
+
+    .container { 
+            width: 200px; 
+            border-right: 1px solid red;
+    }
+
+  .float {
+          width: 80px;
+          height: 80px;
+          float: left;
+  }
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div class=container&gt;&lt;div class=float&gt;&lt;/div&gt;ext should wrap at the red border.&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210LayoutTestsfastcssgeneratedcontentinitialletterfirstlinewrappinghtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/css-generated-content/initial-letter-first-line-wrapping.html (0 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/css-generated-content/initial-letter-first-line-wrapping.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/css-generated-content/initial-letter-first-line-wrapping.html        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+    body {
+        font-family: Ahem;
+    }
+
+    div { 
+            width: 200px; 
+            border-right: 1px solid red;
+    }
+
+    div::first-letter {
+        -webkit-initial-letter: 5;
+        color: white;
+    }
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div&gt;Text should wrap at the red border.&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210LayoutTestsplatformmacfastcssgeneratedcontentinitialletterbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/platform/mac/fast/css-generated-content/initial-letter-basic-expected.txt (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/LayoutTests/platform/mac/fast/css-generated-content/initial-letter-basic-expected.txt        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/platform/mac/fast/css-generated-content/initial-letter-basic-expected.txt        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -7,21 +7,21 @@
</span><span class="cx">         RenderBlock (floating) at (2,3) size 51x48
</span><span class="cx">           RenderText {#text} at (0,-17) size 51x82
</span><span class="cx">             text run at (0,-17) width 51: &quot;A&quot;
</span><del>-        RenderText {#text} at (54,0) size 454x90
-          text run at (54,0) width 400: &quot;n example of first-letter. This letter should span 3 lines of text,&quot;
-          text run at (54,18) width 312: &quot;and so it should align itself cleanly with the cap-&quot;
-          text run at (54,36) width 326: &quot;height of the A lining up with the cap-height of the&quot;
-          text run at (0,54) width 394: &quot;first line, and the baseline of the A lining up with the baseline&quot;
-          text run at (0,72) width 104: &quot;of the third line.&quot;
</del><ins>+        RenderText {#text} at (54,0) size 394x90
+          text run at (54,0) width 316: &quot;n example of first-letter. This letter should span 3&quot;
+          text run at (54,18) width 340: &quot;lines of text, and so it should align itself cleanly with&quot;
+          text run at (54,36) width 337: &quot;the cap-height of the A lining up with the cap-height&quot;
+          text run at (0,54) width 378: &quot;of the first line, and the baseline of the A lining up with the&quot;
+          text run at (0,72) width 160: &quot;baseline of the third line.&quot;
</ins><span class="cx">       RenderBlock {SPAN} at (0,106) size 784x90
</span><span class="cx">         RenderBlock {DIV} at (368,0) size 400x90
</span><span class="cx">           RenderBlock (floating) at (347,3) size 51x48
</span><span class="cx">             RenderText {#text} at (0,-17) size 51x82
</span><span class="cx">               text run at (0,-17) width 51: &quot;A&quot;
</span><del>-          RenderText {#text} at (-53,0) size 454x90
-            text run at (-53,0) width 399: &quot;n RTL example of first-letter. This letter should span 3 lines of&quot;
-            text run at (2,18) width 344: &quot;text, and so it should align itself cleanly with the cap-&quot;
-            text run at (20,36) width 326: &quot;height of the A lining up with the cap-height of the&quot;
-            text run at (6,54) width 394: &quot;first line, and the baseline of the A lining up with the baseline&quot;
-            text run at (296,72) width 5 RTL: &quot;.&quot;
-            text run at (300,72) width 100: &quot;of the third line&quot;
</del><ins>+          RenderText {#text} at (9,0) size 399x90
+            text run at (9,0) width 337: &quot;n RTL example of first-letter. This letter should span&quot;
+            text run at (26,18) width 320: &quot;3 lines of text, and so it should align itself cleanly&quot;
+            text run at (17,36) width 329: &quot;with the cap-height of the A lining up with the cap-&quot;
+            text run at (1,54) width 399: &quot;height of the first line, and the baseline of the A lining up with&quot;
+            text run at (216,72) width 5 RTL: &quot;.&quot;
+            text run at (220,72) width 180: &quot;the baseline of the third line&quot;
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2015-10-16  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        First line box in paragraph using initial-letter overflows.
+        https://bugs.webkit.org/show_bug.cgi?id=147977
+        &lt;rdar://problem/22901553&gt;
+
+        Reviewed by David Hyatt.
+
+        When initial-letter float is present, we should shrink the first
+        line even if it's not intersected with the block's current height.
+        This is because of the sunken behaviour of initial-letter. 
+
+        Test: fast/css-generated-content/initial-letter-first-line-wrapping.html
+
+        * rendering/RenderBlockFlow.h:
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::positionNewFloatOnLine):
+        * rendering/line/BreakingContext.h:
+        (WebCore::BreakingContext::handleFloat):
+        * rendering/line/LineBreaker.cpp:
+        (WebCore::LineBreaker::skipLeadingWhitespace):
+        * rendering/line/LineBreaker.h:
+        (WebCore::LineBreaker::positionNewFloatOnLine):
+        * rendering/line/LineWidth.cpp:
+        (WebCore::newFloatShrinksLine):
+        (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
+        * rendering/line/LineWidth.h:
+
</ins><span class="cx"> 2015-10-16  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GStreamer] ASSERTION FAILED: !m_adoptionIsRequired in MediaSourceGStreamer::addSourceBuffer
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderingRenderBlockFlowh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockFlow.h (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockFlow.h        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockFlow.h        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -580,7 +580,7 @@
</span><span class="cx">     void checkLinesForTextOverflow();
</span><span class="cx">     // Positions new floats and also adjust all floats encountered on the line if any of them
</span><span class="cx">     // have to move to the next page/column.
</span><del>-    bool positionNewFloatOnLine(FloatingObject* newFloat, FloatingObject* lastFloatFromPreviousLine, LineInfo&amp;, LineWidth&amp;);
</del><ins>+    bool positionNewFloatOnLine(const FloatingObject&amp; newFloat, FloatingObject* lastFloatFromPreviousLine, LineInfo&amp;, LineWidth&amp;);
</ins><span class="cx">     // This function is called to test a line box that has moved in the block direction to see if it has ended up in a new
</span><span class="cx">     // region/page/column that has a different available line width than the old one. Used to know when you have to dirty a
</span><span class="cx">     // line, i.e., that it can't be re-used.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockLineLayout.cpp (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -2030,7 +2030,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderBlockFlow::positionNewFloatOnLine(FloatingObject* newFloat, FloatingObject* lastFloatFromPreviousLine, LineInfo&amp; lineInfo, LineWidth&amp; width)
</del><ins>+bool RenderBlockFlow::positionNewFloatOnLine(const FloatingObject&amp; newFloat, FloatingObject* lastFloatFromPreviousLine, LineInfo&amp; lineInfo, LineWidth&amp; width)
</ins><span class="cx"> {
</span><span class="cx">     if (!positionNewFloats())
</span><span class="cx">         return false;
</span><span class="lines">@@ -2040,14 +2040,14 @@
</span><span class="cx">     // We only connect floats to lines for pagination purposes if the floats occur at the start of
</span><span class="cx">     // the line and the previous line had a hard break (so this line is either the first in the block
</span><span class="cx">     // or follows a &lt;br&gt;).
</span><del>-    if (!newFloat-&gt;paginationStrut() || !lineInfo.previousLineBrokeCleanly() || !lineInfo.isEmpty())
</del><ins>+    if (!newFloat.paginationStrut() || !lineInfo.previousLineBrokeCleanly() || !lineInfo.isEmpty())
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     const FloatingObjectSet&amp; floatingObjectSet = m_floatingObjects-&gt;set();
</span><del>-    ASSERT(floatingObjectSet.last().get() == newFloat);
</del><ins>+    ASSERT(floatingObjectSet.last().get() == &amp;newFloat);
</ins><span class="cx"> 
</span><del>-    LayoutUnit floatLogicalTop = logicalTopForFloat(newFloat);
-    LayoutUnit paginationStrut = newFloat-&gt;paginationStrut();
</del><ins>+    LayoutUnit floatLogicalTop = logicalTopForFloat(&amp;newFloat);
+    LayoutUnit paginationStrut = newFloat.paginationStrut();
</ins><span class="cx"> 
</span><span class="cx">     if (floatLogicalTop - paginationStrut != logicalHeight() + lineInfo.floatPaginationStrut())
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderinglineBreakingContexth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/BreakingContext.h (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/BreakingContext.h        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/BreakingContext.h        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -444,7 +444,7 @@
</span><span class="cx">     // If it does, position it now, otherwise, position
</span><span class="cx">     // it after moving to next line (in clearFloats() func)
</span><span class="cx">     if (m_floatsFitOnLine &amp;&amp; m_width.fitsOnLineExcludingTrailingWhitespace(m_block.logicalWidthForFloat(floatingObject))) {
</span><del>-        m_lineBreaker.positionNewFloatOnLine(floatingObject, m_lastFloatFromPreviousLine, m_lineInfo, m_width);
</del><ins>+        m_lineBreaker.positionNewFloatOnLine(*floatingObject, m_lastFloatFromPreviousLine, m_lineInfo, m_width);
</ins><span class="cx">         if (m_lineBreakHistory.renderer() == m_current.renderer()) {
</span><span class="cx">             ASSERT(!m_lineBreakHistory.offset());
</span><span class="cx">             m_lineBreakHistory.increment();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderinglineLineBreakercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineBreaker.cpp (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineBreaker.cpp        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineBreaker.cpp        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">                 lineInfo.incrementRunsFromLeadingWhitespace();
</span><span class="cx">             }
</span><span class="cx">         } else if (object.isFloating())
</span><del>-            m_block.positionNewFloatOnLine(m_block.insertFloatingObject(downcast&lt;RenderBox&gt;(object)), lastFloatFromPreviousLine, lineInfo, width);
</del><ins>+            m_block.positionNewFloatOnLine(*m_block.insertFloatingObject(downcast&lt;RenderBox&gt;(object)), lastFloatFromPreviousLine, lineInfo, width);
</ins><span class="cx">         else if (object.style().hasTextCombine() &amp;&amp; is&lt;RenderCombineText&gt;(object)) {
</span><span class="cx">             downcast&lt;RenderCombineText&gt;(object).combineText();
</span><span class="cx">             if (downcast&lt;RenderCombineText&gt;(object).isCombined())
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderinglineLineBreakerh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineBreaker.h (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineBreaker.h        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineBreaker.h        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">     void skipLeadingWhitespace(InlineBidiResolver&amp;, LineInfo&amp;, FloatingObject* lastFloatFromPreviousLine, LineWidth&amp;);
</span><span class="cx"> 
</span><span class="cx">     FloatingObject* insertFloatingObject(RenderBox&amp; floatBox) { return m_block.insertFloatingObject(floatBox); }
</span><del>-    bool positionNewFloatOnLine(FloatingObject* newFloat, FloatingObject* lastFloatFromPreviousLine, LineInfo&amp; lineInfo, LineWidth&amp; width)
</del><ins>+    bool positionNewFloatOnLine(const FloatingObject&amp; newFloat, FloatingObject* lastFloatFromPreviousLine, LineInfo&amp; lineInfo, LineWidth&amp; width)
</ins><span class="cx">     {
</span><span class="cx">         return m_block.positionNewFloatOnLine(newFloat, lastFloatFromPreviousLine, lineInfo, width);
</span><span class="cx">     }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderinglineLineWidthcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineWidth.cpp (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineWidth.cpp        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineWidth.cpp        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -76,22 +76,33 @@
</span><span class="cx">     computeAvailableWidthFromLeftAndRight();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(FloatingObject* newFloat)
</del><ins>+static bool newFloatShrinksLine(const FloatingObject&amp; newFloat, const RenderBlockFlow&amp; block, bool isFirstLine)
</ins><span class="cx"> {
</span><del>-    LayoutUnit height = m_block.logicalHeight();
-    if (height &lt; m_block.logicalTopForFloat(newFloat) || height &gt;= m_block.logicalBottomForFloat(newFloat))
</del><ins>+    LayoutUnit blockOffset = block.logicalHeight();
+    if (blockOffset &gt;= block.logicalTopForFloat(&amp;newFloat) &amp;&amp; blockOffset &lt; block.logicalBottomForFloat(&amp;newFloat))
+        return true;
+
+    // initial-letter float always shrinks the first line.
+    const auto&amp; style = newFloat.renderer().style();
+    if (isFirstLine &amp;&amp; style.styleType() == FIRST_LETTER &amp;&amp; !style.initialLetter().isEmpty())
+        return true;
+    return false;
+}
+
+void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&amp; newFloat)
+{
+    if (!newFloatShrinksLine(newFloat, m_block, m_isFirstLine))
</ins><span class="cx">         return;
</span><del>-
</del><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx">     ShapeOutsideDeltas shapeDeltas;
</span><del>-    if (ShapeOutsideInfo* shapeOutsideInfo = newFloat-&gt;renderer().shapeOutsideInfo()) {
</del><ins>+    if (ShapeOutsideInfo* shapeOutsideInfo = newFloat.renderer().shapeOutsideInfo()) {
</ins><span class="cx">         LayoutUnit lineHeight = m_block.lineHeight(m_isFirstLine, m_block.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
</span><del>-        shapeDeltas = shapeOutsideInfo-&gt;computeDeltasForContainingBlockLine(m_block, *newFloat, m_block.logicalHeight(), lineHeight);
</del><ins>+        shapeDeltas = shapeOutsideInfo-&gt;computeDeltasForContainingBlockLine(m_block, newFloat, m_block.logicalHeight(), lineHeight);
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (newFloat-&gt;type() == FloatingObject::FloatLeft) {
-        float newLeft = m_block.logicalRightForFloat(newFloat);
</del><ins>+    if (newFloat.type() == FloatingObject::FloatLeft) {
+        float newLeft = m_block.logicalRightForFloat(&amp;newFloat);
</ins><span class="cx">         if (shouldIndentText() &amp;&amp; m_block.style().isLeftToRightDirection())
</span><span class="cx">             newLeft += floorToInt(m_block.textIndentOffset());
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="lines">@@ -104,7 +115,7 @@
</span><span class="cx"> #endif
</span><span class="cx">         m_left = std::max&lt;float&gt;(m_left, newLeft);
</span><span class="cx">     } else {
</span><del>-        float newRight = m_block.logicalLeftForFloat(newFloat);
</del><ins>+        float newRight = m_block.logicalLeftForFloat(&amp;newFloat);
</ins><span class="cx">         if (shouldIndentText() &amp;&amp; !m_block.style().isLeftToRightDirection())
</span><span class="cx">             newRight -= floorToInt(m_block.textIndentOffset());
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderinglineLineWidthh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineWidth.h (191556 => 191557)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineWidth.h        2015-10-26 07:13:57 UTC (rev 191556)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/line/LineWidth.h        2015-10-26 07:28:25 UTC (rev 191557)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     bool hasCommitted() const { return m_committedWidth &gt; 0 || m_hasCommittedReplaced; }
</span><span class="cx"> 
</span><span class="cx">     void updateAvailableWidth(LayoutUnit minimumHeight = 0);
</span><del>-    void shrinkAvailableWidthForNewFloatIfNeeded(FloatingObject*);
</del><ins>+    void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&amp;);
</ins><span class="cx">     void addUncommittedWidth(float delta)
</span><span class="cx">     {
</span><span class="cx">         m_uncommittedWidth += delta;
</span></span></pre>
</div>
</div>

</body>
</html>