<!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>[189717] releases/WebKitGTK/webkit-2.10/Source/WebCore</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/189717">189717</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-14 05:37:10 -0700 (Mon, 14 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/189030">r189030</a> - Simple line layout: Use float types wherever possible to match line tree.
https://bugs.webkit.org/show_bug.cgi?id=148444

Reviewed by Antti Koivisto.

To match inline tree output, we should try to match the data types as far as precision goes.

This patch also fixes the confusing mismatch between Run::baseline().x() and Run::rect().x().
They are both supposed to return the left edge of the run. However Run::rect().x() returns a rounded
LayoutUnit of the logical left, while Run::baseline().x() returns the correct logical left.
With this patch
  1. baseline position does not include logical left anymore.
  2. Run::rect().x() does not round the logical left coordinate anymore.

* rendering/RenderTreeAsText.cpp:
(WebCore::writeSimpleLine):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):
(WebCore::SimpleLineLayout::collectAbsoluteRects):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::linePosition):
(WebCore::SimpleLineLayout::lineSize):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
(WebCore::SimpleLineLayout::baselinePosition): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::baselinePosition):
(WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderingRenderTreeAsTextcpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTreeAsText.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderingSimpleLineLayoutFunctionscpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderingSimpleLineLayoutResolvercpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorerenderingSimpleLineLayoutResolverh">releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutResolver.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit210SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (189716 => 189717)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-09-14 12:35:44 UTC (rev 189716)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-09-14 12:37:10 UTC (rev 189717)
</span><span class="lines">@@ -1,5 +1,39 @@
</span><span class="cx"> 2015-08-27  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Simple line layout: Use float types wherever possible to match line tree.
+        https://bugs.webkit.org/show_bug.cgi?id=148444
+
+        Reviewed by Antti Koivisto.
+
+        To match inline tree output, we should try to match the data types as far as precision goes.
+
+        This patch also fixes the confusing mismatch between Run::baseline().x() and Run::rect().x(). 
+        They are both supposed to return the left edge of the run. However Run::rect().x() returns a rounded
+        LayoutUnit of the logical left, while Run::baseline().x() returns the correct logical left.          
+        With this patch 
+          1. baseline position does not include logical left anymore.
+          2. Run::rect().x() does not round the logical left coordinate anymore.
+
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::writeSimpleLine):
+        * rendering/SimpleLineLayoutFunctions.cpp:
+        (WebCore::SimpleLineLayout::paintFlow):
+        (WebCore::SimpleLineLayout::collectFlowOverflow):
+        (WebCore::SimpleLineLayout::collectAbsoluteRects):
+        (WebCore::SimpleLineLayout::showLineLayoutForFlow):
+        * rendering/SimpleLineLayoutResolver.cpp:
+        (WebCore::SimpleLineLayout::linePosition):
+        (WebCore::SimpleLineLayout::lineSize):
+        (WebCore::SimpleLineLayout::RunResolver::Run::rect):
+        (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
+        (WebCore::SimpleLineLayout::baselinePosition): Deleted.
+        (WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
+        * rendering/SimpleLineLayoutResolver.h:
+        (WebCore::SimpleLineLayout::RunResolver::Run::baselinePosition):
+        (WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):
+
+2015-08-27  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
</ins><span class="cx">         Subpixel positioned iframe's repaint area calculation problem.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=148422
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderingRenderTreeAsTextcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTreeAsText.cpp (189716 => 189717)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTreeAsText.cpp        2015-09-14 12:35:44 UTC (rev 189716)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTreeAsText.cpp        2015-09-14 12:37:10 UTC (rev 189717)
</span><span class="lines">@@ -484,7 +484,7 @@
</span><span class="cx">     ts &lt;&lt; &quot;\n&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void writeSimpleLine(TextStream&amp; ts, const RenderText&amp; o, const LayoutRect&amp; rect, StringView text)
</del><ins>+static void writeSimpleLine(TextStream&amp; ts, const RenderText&amp; o, const FloatRect&amp; rect, StringView text)
</ins><span class="cx"> {
</span><span class="cx">     int x = rect.x();
</span><span class="cx">     int y = rect.y();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderingSimpleLineLayoutFunctionscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (189716 => 189717)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp        2015-09-14 12:35:44 UTC (rev 189716)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp        2015-09-14 12:37:10 UTC (rev 189717)
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto resolver = runResolver(flow, layout);
</span><span class="cx">     float strokeOverflow = ceilf(flow.style().textStrokeWidth());
</span><ins>+    float deviceScaleFactor = flow.document().deviceScaleFactor();
</ins><span class="cx">     for (const auto&amp; run : resolver.rangeForRect(paintRect)) {
</span><span class="cx">         FloatRect rect = run.rect();
</span><span class="cx">         rect.inflate(strokeOverflow);
</span><span class="lines">@@ -88,11 +89,10 @@
</span><span class="cx">         TextRun textRun(run.text());
</span><span class="cx">         textRun.setTabSize(!style.collapseWhiteSpace(), style.tabSize());
</span><span class="cx">         textRun.setXPos(run.rect().x());
</span><del>-        FloatPoint textOrigin = run.baseline() + paintOffset;
-        textOrigin.setY(roundToDevicePixel(LayoutUnit(textOrigin.y()), flow.document().deviceScaleFactor()));
</del><ins>+        FloatPoint textOrigin = FloatPoint(rect.x() + paintOffset.x(), roundToDevicePixel(run.baselinePosition() + paintOffset.y(), deviceScaleFactor));
</ins><span class="cx">         context.drawText(font, textRun, textOrigin);
</span><span class="cx">         if (debugBordersEnabled)
</span><del>-            paintDebugBorders(context, run.rect(), paintOffset);
</del><ins>+            paintDebugBorders(context, LayoutRect(run.rect()), paintOffset);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">     auto resolver = lineResolver(flow, layout);
</span><span class="cx">     float strokeOverflow = ceilf(flow.style().textStrokeWidth());
</span><span class="cx">     for (auto it = resolver.begin(), end = resolver.end(); it != end; ++it) {
</span><del>-        auto rect = *it;
</del><ins>+        auto rect = LayoutRect(*it);
</ins><span class="cx">         rect.inflate(strokeOverflow);
</span><span class="cx">         flow.addLayoutOverflow(rect);
</span><span class="cx">         flow.addVisualOverflow(rect);
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx">     Vector&lt;IntRect&gt; rects;
</span><span class="cx">     auto resolver = runResolver(downcast&lt;RenderBlockFlow&gt;(*renderer.parent()), layout);
</span><span class="cx">     for (const auto&amp; run : resolver.rangeForRenderer(renderer)) {
</span><del>-        LayoutRect rect = run.rect();
</del><ins>+        FloatRect rect = run.rect();
</ins><span class="cx">         rects.append(enclosingIntRect(FloatRect(accumulatedOffset + rect.location(), rect.size())));
</span><span class="cx">     }
</span><span class="cx">     return rects;
</span><span class="lines">@@ -204,15 +204,14 @@
</span><span class="cx">     auto resolver = runResolver(flow, layout);
</span><span class="cx">     for (auto it = resolver.begin(), end = resolver.end(); it != end; ++it) {
</span><span class="cx">         const auto&amp; run = *it;
</span><del>-        LayoutRect r = run.rect();
</del><ins>+        FloatRect rect = run.rect();
</ins><span class="cx">         printPrefix(printedCharacters, depth);
</span><span class="cx">         if (run.start() &lt; run.end()) {
</span><span class="cx">             fprintf(stderr, &quot;line %u run(%u, %u) (%.2f, %.2f) (%.2f, %.2f) \&quot;%s\&quot;\n&quot;, run.lineIndex(), run.start(), run.end(),
</span><del>-                r.x().toFloat(), r.y().toFloat(), r.width().toFloat(), r.height().toFloat(), run.text().toStringWithoutCopying().utf8().data());
</del><ins>+                rect.x(), rect.y(), rect.width(), rect.height(), run.text().toStringWithoutCopying().utf8().data());
</ins><span class="cx">         } else {
</span><span class="cx">             ASSERT(run.start() == run.end());
</span><del>-            fprintf(stderr, &quot;line break %u run(%u, %u) (%.2f, %.2f) (%.2f, %.2f)\n&quot;, run.lineIndex(), run.start(), run.end(),
-                r.x().toFloat(), r.y().toFloat(), r.width().toFloat(), r.height().toFloat());
</del><ins>+            fprintf(stderr, &quot;line break %u run(%u, %u) (%.2f, %.2f) (%.2f, %.2f)\n&quot;, run.lineIndex(), run.start(), run.end(), rect.x(), rect.y(), rect.width(), rect.height());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderingSimpleLineLayoutResolvercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp (189716 => 189717)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp        2015-09-14 12:35:44 UTC (rev 189716)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp        2015-09-14 12:37:10 UTC (rev 189717)
</span><span class="lines">@@ -33,33 +33,28 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace SimpleLineLayout {
</span><span class="cx"> 
</span><del>-static float baselinePosition(float lineHeight, float baseline, int lineIndex)
</del><ins>+static FloatPoint linePosition(float logicalLeft, float logicalTop)
</ins><span class="cx"> {
</span><del>-    return lineHeight * lineIndex + baseline;
</del><ins>+    return FloatPoint(logicalLeft, roundf(logicalTop));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static LayoutPoint linePosition(float logicalLeft, float logicalTop)
</del><ins>+static FloatSize lineSize(float logicalLeft, float logicalRight, float height)
</ins><span class="cx"> {
</span><del>-    return LayoutPoint(LayoutUnit::fromFloatFloor(logicalLeft), roundToInt(logicalTop));
</del><ins>+    return FloatSize(logicalRight - logicalLeft, height);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static LayoutSize lineSize(float logicalLeft, float logicalRight, float height)
-{
-    return LayoutSize(LayoutUnit::fromFloatCeil(logicalRight) - LayoutUnit::fromFloatFloor(logicalLeft), height);
-}
-
</del><span class="cx"> RunResolver::Run::Run(const Iterator&amp; iterator)
</span><span class="cx">     : m_iterator(iterator)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutRect RunResolver::Run::rect() const
</del><ins>+FloatRect RunResolver::Run::rect() const
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; run = m_iterator.simpleRun();
</span><span class="cx">     auto&amp; resolver = m_iterator.resolver();
</span><del>-    float baseline = baselinePosition(resolver.m_lineHeight, resolver.m_baseline, m_iterator.lineIndex());
-    LayoutPoint position = linePosition(run.logicalLeft, baseline - resolver.m_ascent + resolver.m_borderAndPaddingBefore);
-    LayoutSize size = lineSize(run.logicalLeft, run.logicalRight, resolver.m_ascent + resolver.m_descent);
</del><ins>+    float baseline = computeBaselinePosition();
+    FloatPoint position = linePosition(run.logicalLeft, baseline - resolver.m_ascent);
+    FloatSize size = lineSize(run.logicalLeft, run.logicalRight, resolver.m_ascent + resolver.m_descent);
</ins><span class="cx">     bool moveLineBreakToBaseline = false;
</span><span class="cx">     if (run.start == run.end &amp;&amp; m_iterator != resolver.begin() &amp;&amp; m_iterator.inQuirksMode()) {
</span><span class="cx">         auto previousRun = m_iterator;
</span><span class="lines">@@ -67,19 +62,10 @@
</span><span class="cx">         moveLineBreakToBaseline = !previousRun.simpleRun().isEndOfLine;
</span><span class="cx">     }
</span><span class="cx">     if (moveLineBreakToBaseline)
</span><del>-        return LayoutRect(LayoutPoint(position.x(), baseline + resolver.m_borderAndPaddingBefore), LayoutSize(size.width(), std::max&lt;float&gt;(0, resolver.m_ascent - resolver.m_baseline.toFloat())));
-    return LayoutRect(position, size);
</del><ins>+        return FloatRect(FloatPoint(position.x(), baseline), FloatSize(size.width(), std::max&lt;float&gt;(0, resolver.m_ascent - resolver.m_baseline.toFloat())));
+    return FloatRect(position, size);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatPoint RunResolver::Run::baseline() const
-{
-    auto&amp; resolver = m_iterator.resolver();
-    auto&amp; run = m_iterator.simpleRun();
-
-    float baseline = baselinePosition(resolver.m_lineHeight, resolver.m_baseline, m_iterator.lineIndex());
-    return FloatPoint(run.logicalLeft, roundToInt(baseline + resolver.m_borderAndPaddingBefore));
-}
-
</del><span class="cx"> StringView RunResolver::Run::text() const
</span><span class="cx"> {
</span><span class="cx">     auto&amp; resolver = m_iterator.resolver();
</span><span class="lines">@@ -204,14 +190,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const LayoutRect LineResolver::Iterator::operator*() const
</del><ins>+const FloatRect LineResolver::Iterator::operator*() const
</ins><span class="cx"> {
</span><span class="cx">     unsigned currentLine = m_runIterator.lineIndex();
</span><span class="cx">     auto it = m_runIterator;
</span><del>-    LayoutRect rect = (*it).rect();
</del><ins>+    FloatRect rect = (*it).rect();
</ins><span class="cx">     while (it.advance().lineIndex() == currentLine)
</span><span class="cx">         rect.unite((*it).rect());
</span><del>-
</del><span class="cx">     return rect;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorerenderingSimpleLineLayoutResolverh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutResolver.h (189716 => 189717)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutResolver.h        2015-09-14 12:35:44 UTC (rev 189716)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/SimpleLineLayoutResolver.h        2015-09-14 12:37:10 UTC (rev 189717)
</span><span class="lines">@@ -61,14 +61,16 @@
</span><span class="cx">         unsigned start() const;
</span><span class="cx">         unsigned end() const;
</span><span class="cx"> 
</span><del>-        LayoutRect rect() const;
-        FloatPoint baseline() const;
</del><ins>+        FloatRect rect() const;
+        int baselinePosition() const;
</ins><span class="cx">         StringView text() const;
</span><span class="cx">         bool isEndOfLine() const;
</span><span class="cx"> 
</span><span class="cx">         unsigned lineIndex() const;
</span><span class="cx"> 
</span><span class="cx">     private:
</span><ins>+        float computeBaselinePosition() const;
+
</ins><span class="cx">         const Iterator&amp; m_iterator;
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="lines">@@ -136,7 +138,7 @@
</span><span class="cx">         bool operator==(const Iterator&amp;) const;
</span><span class="cx">         bool operator!=(const Iterator&amp;) const;
</span><span class="cx"> 
</span><del>-        const LayoutRect operator*() const;
</del><ins>+        const FloatRect operator*() const;
</ins><span class="cx"> 
</span><span class="cx">     private:
</span><span class="cx">         RunResolver::Iterator m_runIterator;
</span><span class="lines">@@ -167,6 +169,11 @@
</span><span class="cx">     return m_iterator.simpleRun().end;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline int RunResolver::Run::baselinePosition() const
+{
+    return roundToInt(computeBaselinePosition());
+}
+
</ins><span class="cx"> inline bool RunResolver::Run::isEndOfLine() const
</span><span class="cx"> {
</span><span class="cx">     return m_iterator.simpleRun().isEndOfLine;
</span><span class="lines">@@ -182,6 +189,12 @@
</span><span class="cx">     return advance();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline float RunResolver::Run::computeBaselinePosition() const
+{
+    auto&amp; resolver = m_iterator.resolver();
+    return resolver.m_lineHeight * lineIndex() + resolver.m_baseline + resolver.m_borderAndPaddingBefore;
+}
+
</ins><span class="cx"> inline RunResolver::Iterator&amp; RunResolver::Iterator::operator--()
</span><span class="cx"> {
</span><span class="cx">     --m_runIndex;
</span></span></pre>
</div>
</div>

</body>
</html>