<!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>[214995] releases/WebKitGTK/webkit-2.14</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/214995">214995</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2017-04-05 23:59:03 -0700 (Wed, 05 Apr 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/210239">r210239</a> - A floating element within &lt;li&gt; overlaps with the marker
https://bugs.webkit.org/show_bug.cgi?id=166528

Reviewed by Zalan Bujtas.

Source/WebCore:

Merged from Blink (patch by trobhogan@gmail.com):
https://crrev.com/c896e79e5ba348d7ed87438cd3a19d0176f3036d
https://crbug.com/548616

Establish a list marker's offset before floats have been added to its line.

Computing the offset for a list marker after the rest of the objects on the line
it is on have been laid out, means it will avoid floats it ought not to.

Instead, compute the offset when laying out the marker and cache it for use later.

Tests: fast/lists/list-marker-before-float-nested-rtl.html
       fast/lists/list-marker-before-float-nested.html
       fast/lists/list-marker-before-float-rtl.html
       fast/lists/list-marker-before-float.html

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::RenderListMarker):
(WebCore::RenderListMarker::layout):
* rendering/RenderListMarker.h:

LayoutTests:

* fast/lists/list-marker-before-float-expected.html: Added.
* fast/lists/list-marker-before-float-nested-expected.html: Added.
* fast/lists/list-marker-before-float-nested-rtl-expected.html: Added.
* fast/lists/list-marker-before-float-nested-rtl.html: Added.
* fast/lists/list-marker-before-float-nested.html: Added.
* fast/lists/list-marker-before-float-rtl-expected.html: Added.
* fast/lists/list-marker-before-float-rtl.html: Added.
* fast/lists/list-marker-before-float.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderListItemcpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListItem.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderListMarkercpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderListMarkerh">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatexpectedhtml">releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-expected.html</a></li>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatnestedexpectedhtml">releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-expected.html</a></li>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatnestedrtlexpectedhtml">releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-rtl-expected.html</a></li>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatnestedrtlhtml">releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-rtl.html</a></li>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatnestedhtml">releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested.html</a></li>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatrtlexpectedhtml">releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-rtl-expected.html</a></li>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatrtlhtml">releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-rtl.html</a></li>
<li><a href="#releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloathtml">releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit214LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog (214994 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog        2017-04-06 06:37:16 UTC (rev 214994)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2017-01-03  Carlos Alberto Lopez Perez  &lt;clopez@igalia.com&gt;
+
+        A floating element within &lt;li&gt; overlaps with the marker
+        https://bugs.webkit.org/show_bug.cgi?id=166528
+
+        Reviewed by Zalan Bujtas.
+
+        * fast/lists/list-marker-before-float-expected.html: Added.
+        * fast/lists/list-marker-before-float-nested-expected.html: Added.
+        * fast/lists/list-marker-before-float-nested-rtl-expected.html: Added.
+        * fast/lists/list-marker-before-float-nested-rtl.html: Added.
+        * fast/lists/list-marker-before-float-nested.html: Added.
+        * fast/lists/list-marker-before-float-rtl-expected.html: Added.
+        * fast/lists/list-marker-before-float-rtl.html: Added.
+        * fast/lists/list-marker-before-float.html: Added.
+
</ins><span class="cx"> 2016-12-09  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSP] Policy of window opener not applied to about:blank window
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatexpectedhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-expected.html (0 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-expected.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-expected.html        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.&lt;/p&gt;
+&lt;ol&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+  &lt;/li&gt;
+&lt;/ol&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatnestedexpectedhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-expected.html (0 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-expected.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-expected.html        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.&lt;/p&gt;
+&lt;ol&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+    &lt;li&gt;
+      &lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+    &lt;/li&gt;
+  &lt;/li&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+  &lt;/li&gt;
+&lt;/ol&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatnestedrtlexpectedhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-rtl-expected.html (0 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-rtl-expected.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-rtl-expected.html        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.&lt;/p&gt;
+&lt;ol dir=rtl&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+    &lt;li&gt;
+      &lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+    &lt;/li&gt;
+  &lt;/li&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+  &lt;/li&gt;
+&lt;/ol&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatnestedrtlhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-rtl.html (0 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-rtl.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested-rtl.html        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.&lt;/p&gt;
+&lt;ol dir=rtl&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;float: right; background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+    &lt;li&gt;
+      &lt;img width=20 height=20 style=&quot;float: right; background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+    &lt;/li&gt;
+  &lt;/li&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;float: right; background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+  &lt;/li&gt;
+&lt;/ol&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatnestedhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested.html (0 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-nested.html        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.&lt;/p&gt;
+&lt;ol&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;float: left; background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+    &lt;li&gt;
+      &lt;img width=20 height=20 style=&quot;float: left; background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+    &lt;/li&gt;
+  &lt;/li&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;float: left; background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+  &lt;/li&gt;
+&lt;/ol&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatrtlexpectedhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-rtl-expected.html (0 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-rtl-expected.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-rtl-expected.html        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.&lt;/p&gt;
+&lt;ol dir=rtl&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+  &lt;/li&gt;
+&lt;/ol&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloatrtlhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-rtl.html (0 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-rtl.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float-rtl.html        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.&lt;/p&gt;
+&lt;ol dir=rtl&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;float: right; background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+  &lt;/li&gt;
+&lt;/ol&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit214LayoutTestsfastlistslistmarkerbeforefloathtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float.html (0 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/lists/list-marker-before-float.html        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.&lt;/p&gt;
+&lt;ol&gt;
+  &lt;li&gt;
+    &lt;img width=20 height=20 style=&quot;float: left; background-color:black;&quot;&gt;&lt;img width=20 height=20 style=&quot;background-color:black;&quot;&gt;
+  &lt;/li&gt;
+&lt;/ol&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (214994 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog        2017-04-06 06:37:16 UTC (rev 214994)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2017-01-03  Carlos Alberto Lopez Perez  &lt;clopez@igalia.com&gt;
+
+        A floating element within &lt;li&gt; overlaps with the marker
+        https://bugs.webkit.org/show_bug.cgi?id=166528
+
+        Reviewed by Zalan Bujtas.
+
+        Merged from Blink (patch by trobhogan@gmail.com):
+        https://crrev.com/c896e79e5ba348d7ed87438cd3a19d0176f3036d
+        https://crbug.com/548616
+
+        Establish a list marker's offset before floats have been added to its line.
+
+        Computing the offset for a list marker after the rest of the objects on the line
+        it is on have been laid out, means it will avoid floats it ought not to.
+
+        Instead, compute the offset when laying out the marker and cache it for use later.
+
+        Tests: fast/lists/list-marker-before-float-nested-rtl.html
+               fast/lists/list-marker-before-float-nested.html
+               fast/lists/list-marker-before-float-rtl.html
+               fast/lists/list-marker-before-float.html
+
+        * rendering/RenderListItem.cpp:
+        (WebCore::RenderListItem::positionListMarker):
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::RenderListMarker):
+        (WebCore::RenderListMarker::layout):
+        * rendering/RenderListMarker.h:
+
</ins><span class="cx"> 2016-12-09  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSP] Policy of window opener not applied to about:blank window
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderListItemcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListItem.cpp (214994 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListItem.cpp        2017-04-06 06:37:16 UTC (rev 214994)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListItem.cpp        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -356,8 +356,7 @@
</span><span class="cx"> 
</span><span class="cx">         // FIXME: Need to account for relative positioning in the layout overflow.
</span><span class="cx">         if (style().isLeftToRightDirection()) {
</span><del>-            LayoutUnit leftLineOffset = logicalLeftOffsetForLine(blockOffset, logicalLeftOffsetForLine(blockOffset, DoNotIndentText), false);
-            markerLogicalLeft = leftLineOffset - lineOffset - paddingStart() - borderStart() + m_marker-&gt;marginStart();
</del><ins>+            markerLogicalLeft = m_marker-&gt;lineOffsetForListItem() - lineOffset - paddingStart() - borderStart() + m_marker-&gt;marginStart();
</ins><span class="cx">             m_marker-&gt;inlineBoxWrapper()-&gt;adjustLineDirectionPosition(markerLogicalLeft - markerOldLogicalLeft);
</span><span class="cx">             for (InlineFlowBox* box = m_marker-&gt;inlineBoxWrapper()-&gt;parent(); box; box = box-&gt;parent()) {
</span><span class="cx">                 LayoutRect newLogicalVisualOverflowRect = box-&gt;logicalVisualOverflowRect(lineTop, lineBottom);
</span><span class="lines">@@ -379,8 +378,7 @@
</span><span class="cx">                     hitSelfPaintingLayer = true;
</span><span class="cx">             }
</span><span class="cx">         } else {
</span><del>-            LayoutUnit rightLineOffset = logicalRightOffsetForLine(blockOffset, logicalRightOffsetForLine(blockOffset, DoNotIndentText), false);
-            markerLogicalLeft = rightLineOffset - lineOffset + paddingStart() + borderStart() + m_marker-&gt;marginEnd();
</del><ins>+            markerLogicalLeft = m_marker-&gt;lineOffsetForListItem() - lineOffset + paddingStart() + borderStart() + m_marker-&gt;marginEnd();
</ins><span class="cx">             m_marker-&gt;inlineBoxWrapper()-&gt;adjustLineDirectionPosition(markerLogicalLeft - markerOldLogicalLeft);
</span><span class="cx">             for (InlineFlowBox* box = m_marker-&gt;inlineBoxWrapper()-&gt;parent(); box; box = box-&gt;parent()) {
</span><span class="cx">                 LayoutRect newLogicalVisualOverflowRect = box-&gt;logicalVisualOverflowRect(lineTop, lineBottom);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderListMarkercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.cpp (214994 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.cpp        2017-04-06 06:37:16 UTC (rev 214994)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.cpp        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -1370,6 +1370,14 @@
</span><span class="cx"> {
</span><span class="cx">     StackStats::LayoutCheckPoint layoutCheckPoint;
</span><span class="cx">     ASSERT(needsLayout());
</span><ins>+
+    LayoutUnit blockOffset;
+    for (auto* box = parentBox(); box &amp;&amp; box != &amp;m_listItem; box = box-&gt;parentBox())
+        blockOffset += box-&gt;logicalTop();
+    if (style().isLeftToRightDirection())
+        m_lineOffsetForListItem = m_listItem.logicalLeftOffsetForLine(blockOffset, DoNotIndentText, LayoutUnit());
+    else
+        m_lineOffsetForListItem = m_listItem.logicalRightOffsetForLine(blockOffset, DoNotIndentText, LayoutUnit());
</ins><span class="cx">  
</span><span class="cx">     if (isImage()) {
</span><span class="cx">         updateMarginsAndContent();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderListMarkerh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.h (214994 => 214995)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.h        2017-04-06 06:37:16 UTC (rev 214994)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.h        2017-04-06 06:59:03 UTC (rev 214995)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool isInside() const;
</span><span class="cx"> 
</span><ins>+    LayoutUnit lineOffsetForListItem() const { return m_lineOffsetForListItem; }
+
</ins><span class="cx">     void updateMarginsAndContent();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -83,6 +85,7 @@
</span><span class="cx">     String m_text;
</span><span class="cx">     RefPtr&lt;StyleImage&gt; m_image;
</span><span class="cx">     RenderListItem&amp; m_listItem;
</span><ins>+    LayoutUnit m_lineOffsetForListItem;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>

</body>
</html>