<!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>[197030] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/197030">197030</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2016-02-24 09:13:33 -0800 (Wed, 24 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Background of an absolutely positioned inline element inside text-indented parent is positioned statically.
https://bugs.webkit.org/show_bug.cgi?id=154019

Reviewed by Simon Fraser.

This patch ensures that statically positioned out-of-flow renderers are also text-aligned
even when none of the renderers on the first line generate a linebox (so we end up with no bidi runs at all).
The fix is to pass IndentTextOrNot information to startAlignedOffsetForLine through updateStaticInlinePositionForChild
so that we can compute the left position for this statically positioned out of flow renderer.

Source/WebCore:

Test: fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustPositionedBlock):
(WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipTrailingWhitespace):
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/line/LineInlineHeaders.h: webkit.org/b/154628 fixes the bool vs IndentTextOrNot issue.
(WebCore::setStaticPositions):

LayoutTests:

* fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child-expected.html: Added.
* fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowh">trunk/Source/WebCore/rendering/RenderBlockFlow.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockLineLayoutcpp">trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderinglineLineBreakercpp">trunk/Source/WebCore/rendering/line/LineBreaker.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderinglineLineInlineHeadersh">trunk/Source/WebCore/rendering/line/LineInlineHeaders.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcss3textcss3textindenttextindentwithabsoluteposchildexpectedhtml">trunk/LayoutTests/fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcss3textcss3textindenttextindentwithabsoluteposchildhtml">trunk/LayoutTests/fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (197029 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-24 17:06:50 UTC (rev 197029)
+++ trunk/LayoutTests/ChangeLog        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-02-24  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Background of an absolutely positioned inline element inside text-indented parent is positioned statically.
+        https://bugs.webkit.org/show_bug.cgi?id=154019
+
+        Reviewed by Simon Fraser.
+
+        This patch ensures that statically positioned out-of-flow renderers are also text-aligned
+        even when none of the renderers on the first line generate a linebox (so we end up with no bidi runs at all).
+        The fix is to pass IndentTextOrNot information to startAlignedOffsetForLine through updateStaticInlinePositionForChild
+        so that we can compute the left position for this statically positioned out of flow renderer.
+
+        * fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child-expected.html: Added.
+        * fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html: Added.
+
</ins><span class="cx"> 2016-02-24  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r195949): [GTK] Test /webkit2/WebKitWebView/insert/link is failing since r195949
</span></span></pre></div>
<a id="trunkLayoutTestsfastcss3textcss3textindenttextindentwithabsoluteposchildexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child-expected.html (0 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child-expected.html        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This tests that first line text-indent is applied properly when the child is a statically positioned out-of-flow renderer.&lt;/title&gt;
+&lt;style&gt;
+ body {
+         margin: 40px;
+ }

+.container {
+  display: block;
+  background-color: green;
+  width: 100px;
+  height: 20px;
+  color: green;
+  font-family: Ahem;
+  font-size: 10px;
+}
+
+.inner {
+  display: block;
+  background-color: blue;
+  width: 20px;
+  height: 20px;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-left: 20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-left: 20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-left: 20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-left: 20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;position: relative; left: 70px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-left: -20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;left: 40px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;position: relative; top: 10px&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div style=&quot;direction: rtl;&quot;&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-right: 20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-right: 20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-right: 20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-right: 20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;position: relative; right: 70px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;margin-right: -20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;right: 40px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner style=&quot;position: relative; top: 10px&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&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="trunkLayoutTestsfastcss3textcss3textindenttextindentwithabsoluteposchildhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html (0 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html                                (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This tests that first line text-indent is applied properly when the child is a statically positioned out-of-flow renderer.&lt;/title&gt;
+&lt;style&gt;
+ body {
+         margin: 40px;
+ }

+.container {
+  display: block;
+  background-color: green;
+  width: 100px;
+  height: 20px;
+  color: green;
+  font-family: Ahem;
+  font-size: 10px;
+}
+
+.inner {
+  display: inline;
+  position: absolute;
+  background-color: blue;
+  width: 20px;
+  height: 20px;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;display: inline-block;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner&gt;&lt;/div&gt;foobar&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;text-indent: 20px;&quot;&gt;f&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 10px&quot;&gt;foobar&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: -20px&quot;&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;left: 40px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;display: block;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;position: relative; display: block;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;foobar&lt;br&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div style=&quot;direction: rtl;&quot;&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;display: inline-block;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner&gt;&lt;/div&gt;foobar&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;text-indent: 20px;&quot;&gt;f&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 10px&quot;&gt;foobar&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: -20px&quot;&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;right: 40px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;display: block;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;&lt;div class=inner style=&quot;position: relative; display: block;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container style=&quot;text-indent: 20px&quot;&gt;foobar&lt;br&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=container&gt;&lt;div class=inner&gt;&lt;/div&gt;&lt;/div&gt;
+&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="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197029 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-24 17:06:50 UTC (rev 197029)
+++ trunk/Source/WebCore/ChangeLog        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-02-24  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Background of an absolutely positioned inline element inside text-indented parent is positioned statically.
+        https://bugs.webkit.org/show_bug.cgi?id=154019
+
+        Reviewed by Simon Fraser.
+
+        This patch ensures that statically positioned out-of-flow renderers are also text-aligned
+        even when none of the renderers on the first line generate a linebox (so we end up with no bidi runs at all).
+        The fix is to pass IndentTextOrNot information to startAlignedOffsetForLine through updateStaticInlinePositionForChild
+        so that we can compute the left position for this statically positioned out of flow renderer.
+
+        Test: fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html
+
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::adjustPositionedBlock):
+        (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
+        * rendering/RenderBlockFlow.h:
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
+        * rendering/line/LineBreaker.cpp:
+        (WebCore::LineBreaker::skipTrailingWhitespace):
+        (WebCore::LineBreaker::skipLeadingWhitespace):
+        * rendering/line/LineInlineHeaders.h: webkit.org/b/154628 fixes the bool vs IndentTextOrNot issue.
+        (WebCore::setStaticPositions):
+
</ins><span class="cx"> 2016-02-24  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove IteratorKey and IteratorValue declarations from JSXX class declarations.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (197029 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-02-24 17:06:50 UTC (rev 197029)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -7135,7 +7135,7 @@
</span><span class="cx">                 FFB698CF183402BB00158A31 /* LineInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FFB698CD1833F17600158A31 /* LineInfo.cpp */; };
</span><span class="cx">                 FFD5B97A135CC97800D5E92A /* PageVisibilityState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FFD5B977135CC97800D5E92A /* PageVisibilityState.cpp */; };
</span><span class="cx">                 FFD5B97B135CC97800D5E92A /* PageVisibilityState.h in Headers */ = {isa = PBXBuildFile; fileRef = FFD5B978135CC97800D5E92A /* PageVisibilityState.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                FFDBC047183D27B700407109 /* LineWidth.h in Headers */ = {isa = PBXBuildFile; fileRef = FFDBC045183D27B700407109 /* LineWidth.h */; };
</del><ins>+                FFDBC047183D27B700407109 /* LineWidth.h in Headers */ = {isa = PBXBuildFile; fileRef = FFDBC045183D27B700407109 /* LineWidth.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 FFDBC048183D27B700407109 /* LineWidth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FFDBC046183D27B700407109 /* LineWidth.cpp */; };
</span><span class="cx">                 FFEFAB2A18380DA000514534 /* LineLayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = FFEFAB2918380DA000514534 /* LineLayoutState.h */; };
</span><span class="cx"> /* End PBXBuildFile section */
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (197029 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-02-24 17:06:50 UTC (rev 197029)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -798,7 +798,7 @@
</span><span class="cx">     bool hasStaticBlockPosition = child.style().hasStaticBlockPosition(isHorizontal);
</span><span class="cx">     
</span><span class="cx">     LayoutUnit logicalTop = logicalHeight();
</span><del>-    updateStaticInlinePositionForChild(child, logicalTop);
</del><ins>+    updateStaticInlinePositionForChild(child, logicalTop, DoNotIndentText);
</ins><span class="cx"> 
</span><span class="cx">     if (!marginInfo.canCollapseWithMarginBefore()) {
</span><span class="cx">         // Positioned blocks don't collapse margins, so add the margin provided by
</span><span class="lines">@@ -865,10 +865,10 @@
</span><span class="cx">     setLogicalHeight(logicalHeight() - marginOffset);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBlockFlow::updateStaticInlinePositionForChild(RenderBox&amp; child, LayoutUnit logicalTop)
</del><ins>+void RenderBlockFlow::updateStaticInlinePositionForChild(RenderBox&amp; child, LayoutUnit logicalTop, IndentTextOrNot shouldIndentText)
</ins><span class="cx"> {
</span><span class="cx">     if (child.style().isOriginalDisplayInlineType())
</span><del>-        setStaticInlinePositionForChild(child, logicalTop, startAlignedOffsetForLine(logicalTop, false));
</del><ins>+        setStaticInlinePositionForChild(child, logicalTop, startAlignedOffsetForLine(logicalTop, shouldIndentText));
</ins><span class="cx">     else
</span><span class="cx">         setStaticInlinePositionForChild(child, logicalTop, startOffsetForContent(logicalTop));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (197029 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.h        2016-02-24 17:06:50 UTC (rev 197029)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> #define RenderBlockFlow_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FloatingObjects.h&quot;
</span><ins>+#include &quot;LineWidth.h&quot;
</ins><span class="cx"> #include &quot;RenderBlock.h&quot;
</span><span class="cx"> #include &quot;RenderLineBoxList.h&quot;
</span><span class="cx"> #include &quot;SimpleLineLayout.h&quot;
</span><span class="lines">@@ -246,7 +247,7 @@
</span><span class="cx">     void adjustFloatingBlock(const MarginInfo&amp;);
</span><span class="cx"> 
</span><span class="cx">     void setStaticInlinePositionForChild(RenderBox&amp; child, LayoutUnit blockOffset, LayoutUnit inlinePosition);
</span><del>-    void updateStaticInlinePositionForChild(RenderBox&amp; child, LayoutUnit logicalTop);
</del><ins>+    void updateStaticInlinePositionForChild(RenderBox&amp; child, LayoutUnit logicalTop, IndentTextOrNot shouldIndentText);
</ins><span class="cx"> 
</span><span class="cx">     LayoutUnit collapseMargins(RenderBox&amp; child, MarginInfo&amp;);
</span><span class="cx">     LayoutUnit collapseMarginsWithChildInfo(RenderBox* child, RenderObject* prevSibling, MarginInfo&amp;);
</span><span class="lines">@@ -543,7 +544,7 @@
</span><span class="cx">     static void appendRunsForObject(BidiRunList&lt;BidiRun&gt;*, int start, int end, RenderObject&amp;, InlineBidiResolver&amp;);
</span><span class="cx">     RootInlineBox* createAndAppendRootInlineBox();
</span><span class="cx"> 
</span><del>-    LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentText);
</del><ins>+    LayoutUnit startAlignedOffsetForLine(LayoutUnit position, IndentTextOrNot shouldIndentText);
</ins><span class="cx">     virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
</span><span class="cx">     virtual void adjustInlineDirectionLineBounds(int /* expansionOpportunityCount */, float&amp; /* logicalLeft */, float&amp; /* logicalWidth */) const { }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (197029 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2016-02-24 17:06:50 UTC (rev 197029)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -1372,7 +1372,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         for (size_t i = 0; i &lt; lineBreaker.positionedObjects().size(); ++i)
</span><del>-            setStaticPositions(*this, *lineBreaker.positionedObjects()[i]);
</del><ins>+            setStaticPositions(*this, *lineBreaker.positionedObjects()[i], DoNotIndentText);
</ins><span class="cx"> 
</span><span class="cx">         if (!layoutState.lineInfo().isEmpty()) {
</span><span class="cx">             layoutState.lineInfo().setFirstLine(false);
</span><span class="lines">@@ -2119,16 +2119,31 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBlockFlow::startAlignedOffsetForLine(LayoutUnit position, bool firstLine)
</del><ins>+LayoutUnit RenderBlockFlow::startAlignedOffsetForLine(LayoutUnit position, IndentTextOrNot shouldIndentText)
</ins><span class="cx"> {
</span><span class="cx">     ETextAlign textAlign = style().textAlign();
</span><del>-
</del><ins>+    bool shouldApplyIndentText = false;
+    switch (textAlign) {
+    case LEFT:
+    case WEBKIT_LEFT:
+        shouldApplyIndentText = style().isLeftToRightDirection();
+        break;
+    case RIGHT:
+    case WEBKIT_RIGHT:
+        shouldApplyIndentText = !style().isLeftToRightDirection();
+        break;
+    case TASTART:
+        shouldApplyIndentText = true;
+        break;
+    default:
+        shouldApplyIndentText = false;
+    }
</ins><span class="cx">     // &lt;rdar://problem/15427571&gt;
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=124522
</span><span class="cx">     // This quirk is for legacy content that doesn't work properly with the center positioning scheme
</span><span class="cx">     // being honored (e.g., epubs).
</span><del>-    if (textAlign == TASTART || document().settings()-&gt;useLegacyTextAlignPositionedElementBehavior()) // FIXME: Handle TAEND here
-        return startOffsetForLine(position, firstLine);
</del><ins>+    if (shouldApplyIndentText || document().settings()-&gt;useLegacyTextAlignPositionedElementBehavior()) // FIXME: Handle TAEND here
+        return startOffsetForLine(position, shouldIndentText == IndentText);
</ins><span class="cx"> 
</span><span class="cx">     // updateLogicalWidthForAlignment() handles the direction of the block so no need to consider it here
</span><span class="cx">     float totalLogicalWidth = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineLineBreakercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/LineBreaker.cpp (197029 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/LineBreaker.cpp        2016-02-24 17:06:50 UTC (rev 197029)
+++ trunk/Source/WebCore/rendering/line/LineBreaker.cpp        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">     while (!iterator.atEnd() &amp;&amp; !requiresLineBox(iterator, lineInfo, TrailingWhitespace)) {
</span><span class="cx">         RenderObject&amp; object = *iterator.renderer();
</span><span class="cx">         if (object.isOutOfFlowPositioned())
</span><del>-            setStaticPositions(m_block, downcast&lt;RenderBox&gt;(object));
</del><ins>+            setStaticPositions(m_block, downcast&lt;RenderBox&gt;(object), DoNotIndentText);
</ins><span class="cx">         else if (object.isFloating())
</span><span class="cx">             m_block.insertFloatingObject(downcast&lt;RenderBox&gt;(object));
</span><span class="cx">         iterator.increment();
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">     while (!resolver.position().atEnd() &amp;&amp; !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) {
</span><span class="cx">         RenderObject&amp; object = *resolver.position().renderer();
</span><span class="cx">         if (object.isOutOfFlowPositioned()) {
</span><del>-            setStaticPositions(m_block, downcast&lt;RenderBox&gt;(object));
</del><ins>+            setStaticPositions(m_block, downcast&lt;RenderBox&gt;(object), width.shouldIndentText() ? IndentText : DoNotIndentText);
</ins><span class="cx">             if (object.style().isOriginalDisplayInlineType()) {
</span><span class="cx">                 resolver.runs().addRun(new BidiRun(0, 1, object, resolver.context(), resolver.dir()));
</span><span class="cx">                 lineInfo.incrementRunsFromLeadingWhitespace();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineLineInlineHeadersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/LineInlineHeaders.h (197029 => 197030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/LineInlineHeaders.h        2016-02-24 17:06:50 UTC (rev 197029)
+++ trunk/Source/WebCore/rendering/line/LineInlineHeaders.h        2016-02-24 17:13:33 UTC (rev 197030)
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">     return notJustWhitespace || rendererIsEmptyInline;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void setStaticPositions(RenderBlockFlow&amp; block, RenderBox&amp; child)
</del><ins>+inline void setStaticPositions(RenderBlockFlow&amp; block, RenderBox&amp; child, IndentTextOrNot shouldIndentText)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: The math here is actually not really right. It's a best-guess approximation that
</span><span class="cx">     // will work for the common cases
</span><span class="lines">@@ -130,10 +130,10 @@
</span><span class="cx">         // A relative positioned inline encloses us. In this case, we also have to determine our
</span><span class="cx">         // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned
</span><span class="cx">         // inline so that we can obtain the value later.
</span><del>-        downcast&lt;RenderInline&gt;(*containerBlock).layer()-&gt;setStaticInlinePosition(block.startAlignedOffsetForLine(blockHeight, false));
</del><ins>+        downcast&lt;RenderInline&gt;(*containerBlock).layer()-&gt;setStaticInlinePosition(block.startAlignedOffsetForLine(blockHeight, DoNotIndentText));
</ins><span class="cx">         downcast&lt;RenderInline&gt;(*containerBlock).layer()-&gt;setStaticBlockPosition(blockHeight);
</span><span class="cx">     }
</span><del>-    block.updateStaticInlinePositionForChild(child, blockHeight);
</del><ins>+    block.updateStaticInlinePositionForChild(child, blockHeight, shouldIndentText);
</ins><span class="cx">     child.layer()-&gt;setStaticBlockPosition(blockHeight);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>