<!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>[183904] trunk/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/183904">183904</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-05-06 19:09:26 -0700 (Wed, 06 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean up TextRun constructors
https://bugs.webkit.org/show_bug.cgi?id=144712

Reviewed by Zalan Bujtas.

This patch uses constructor forwarding to make TextRun's constructors much simpler. It then
updates the implementations of RenderBlock::constructTextRun() to be more consistent with
TextRun (via using StringViews).

No new tests because there is no behavior change.

* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::longDivLeftPadding):
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
(WebCore::constructTextRunInternal): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::SVGTextMetricsBuilder):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLMencloseElementcpp">trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsTextRunh">trunk/Source/WebCore/platform/graphics/TextRun.h</a></li>
<li><a href="#trunkSourceWebCoreplatformwinDragImageWincpp">trunk/Source/WebCore/platform/win/DragImageWin.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockh">trunk/Source/WebCore/rendering/RenderBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderEmbeddedObjectcpp">trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextMetricsBuildercpp">trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183903 => 183904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-05-07 01:23:12 UTC (rev 183903)
+++ trunk/Source/WebCore/ChangeLog        2015-05-07 02:09:26 UTC (rev 183904)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2015-05-06  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Clean up TextRun constructors
+        https://bugs.webkit.org/show_bug.cgi?id=144712
+
+        Reviewed by Zalan Bujtas.
+
+        This patch uses constructor forwarding to make TextRun's constructors much simpler. It then
+        updates the implementations of RenderBlock::constructTextRun() to be more consistent with
+        TextRun (via using StringViews).
+
+        No new tests because there is no behavior change.
+
+        * mathml/MathMLMencloseElement.cpp:
+        (WebCore::MathMLMencloseElement::longDivLeftPadding):
+        * platform/graphics/TextRun.h:
+        (WebCore::TextRun::TextRun):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::constructTextRun):
+        (WebCore::constructTextRunInternal): Deleted.
+        * rendering/RenderBlock.h:
+        * rendering/RenderEmbeddedObject.cpp:
+        (WebCore::RenderEmbeddedObject::paintReplaced):
+        (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
+        (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
+        * rendering/svg/SVGTextMetricsBuilder.cpp:
+        (WebCore::SVGTextMetricsBuilder::SVGTextMetricsBuilder):
+        * platform/win/DragImageWin.cpp:
+        (WebCore::createDragImageForLink):
+
</ins><span class="cx"> 2015-05-06  Sungmann Cho  &lt;sungmann.cho@navercorp.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rename URL::copy() to URL::isolatedCopy() to match String.
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLMencloseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp (183903 => 183904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp        2015-05-07 01:23:12 UTC (rev 183903)
+++ trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp        2015-05-07 02:09:26 UTC (rev 183904)
</span><span class="lines">@@ -129,8 +129,8 @@
</span><span class="cx"> String MathMLMencloseElement::longDivLeftPadding() const
</span><span class="cx"> {
</span><span class="cx">     StringBuilder padding;
</span><del>-    String closingBrace = &quot;)&quot;;
-    TextRun run(closingBrace.impl(), closingBrace.length());
</del><ins>+    String closingBrace(&quot;)&quot;, String::ConstructFromLiteral);
+    TextRun run(closingBrace);
</ins><span class="cx">     Node* node = parentNode();
</span><span class="cx">     if (node &amp;&amp; node-&gt;renderer()) {
</span><span class="cx">         const FontCascade&amp; font = node-&gt;renderer()-&gt;style().fontCascade();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTextRunh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TextRun.h (183903 => 183904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TextRun.h        2015-05-07 01:23:12 UTC (rev 183903)
+++ trunk/Source/WebCore/platform/graphics/TextRun.h        2015-05-07 02:09:26 UTC (rev 183904)
</span><span class="lines">@@ -52,9 +52,9 @@
</span><span class="cx"> 
</span><span class="cx">     typedef unsigned RoundingHacks;
</span><span class="cx"> 
</span><del>-    TextRun(const LChar* c, unsigned len, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)
-        : m_text(c, len)
-        , m_charactersLength(len)
</del><ins>+    explicit TextRun(StringView s, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)
+        : m_text(s)
+        , m_charactersLength(s.length())
</ins><span class="cx">         , m_tabSize(0)
</span><span class="cx">         , m_xpos(xpos)
</span><span class="cx">         , m_horizontalGlyphStretch(1)
</span><span class="lines">@@ -70,57 +70,18 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    TextRun(const UChar* c, unsigned len, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)
-        : m_text(c, len)
-        , m_charactersLength(len)
-        , m_tabSize(0)
-        , m_xpos(xpos)
-        , m_horizontalGlyphStretch(1)
-        , m_expansion(expansion)
-        , m_expansionBehavior(expansionBehavior)
-        , m_allowTabs(false)
-        , m_direction(direction)
-        , m_directionalOverride(directionalOverride)
-        , m_characterScanForCodePath(characterScanForCodePath)
-        , m_applyRunRounding((roundingHacks &amp; RunRounding) &amp;&amp; s_allowsRoundingHacks)
-        , m_applyWordRounding((roundingHacks &amp; WordRounding) &amp;&amp; s_allowsRoundingHacks)
-        , m_disableSpacing(false)
</del><ins>+    explicit TextRun(const String&amp; s)
+        : TextRun(StringView(s))
</ins><span class="cx">     {
</span><span class="cx">     }
</span><del>-    
-    explicit TextRun(const String&amp; s, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)
-        : m_text(StringView(s))
-        , m_charactersLength(s.length())
-        , m_tabSize(0)
-        , m_xpos(xpos)
-        , m_horizontalGlyphStretch(1)
-        , m_expansion(expansion)
-        , m_expansionBehavior(expansionBehavior)
-        , m_allowTabs(false)
-        , m_direction(direction)
-        , m_directionalOverride(directionalOverride)
-        , m_characterScanForCodePath(characterScanForCodePath)
-        , m_applyRunRounding((roundingHacks &amp; RunRounding) &amp;&amp; s_allowsRoundingHacks)
-        , m_applyWordRounding((roundingHacks &amp; WordRounding) &amp;&amp; s_allowsRoundingHacks)
-        , m_disableSpacing(false)
</del><ins>+
+    TextRun(const LChar* c, unsigned len)
+        : TextRun(StringView(c, len))
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    explicit TextRun(StringView s, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)
-        : m_text(s)
-        , m_charactersLength(s.length())
-        , m_tabSize(0)
-        , m_xpos(xpos)
-        , m_horizontalGlyphStretch(1)
-        , m_expansion(expansion)
-        , m_expansionBehavior(expansionBehavior)
-        , m_allowTabs(false)
-        , m_direction(direction)
-        , m_directionalOverride(directionalOverride)
-        , m_characterScanForCodePath(characterScanForCodePath)
-        , m_applyRunRounding((roundingHacks &amp; RunRounding) &amp;&amp; s_allowsRoundingHacks)
-        , m_applyWordRounding((roundingHacks &amp; WordRounding) &amp;&amp; s_allowsRoundingHacks)
-        , m_disableSpacing(false)
</del><ins>+    TextRun(const UChar* c, unsigned len)
+        : TextRun(StringView(c, len))
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -213,7 +174,8 @@
</span><span class="cx"> 
</span><span class="cx">     // m_xpos is the x position relative to the left start of the text line, not relative to the left
</span><span class="cx">     // start of the containing block. In the case of right alignment or center alignment, left start of
</span><del>-    // the text line is not the same as left start of the containing block.
</del><ins>+    // the text line is not the same as left start of the containing block. This variable is only used
+    // to calculate the width of \t
</ins><span class="cx">     float m_xpos;  
</span><span class="cx">     float m_horizontalGlyphStretch;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformwinDragImageWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/win/DragImageWin.cpp (183903 => 183904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/win/DragImageWin.cpp        2015-05-07 01:23:12 UTC (rev 183903)
+++ trunk/Source/WebCore/platform/win/DragImageWin.cpp        2015-05-07 02:09:26 UTC (rev 183904)
</span><span class="lines">@@ -150,8 +150,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // First step in drawing the link drag image width.
</span><del>-    TextRun labelRun(label.impl());
-    TextRun urlRun(urlString.impl());
</del><ins>+    TextRun labelRun(label);
+    TextRun urlRun(urlString);
</ins><span class="cx">     IntSize labelSize(labelFont-&gt;width(labelRun), labelFont-&gt;fontMetrics().ascent() + labelFont-&gt;fontMetrics().descent());
</span><span class="cx"> 
</span><span class="cx">     if (labelSize.width() &gt; MaxDragLabelStringWidth) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (183903 => 183904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2015-05-07 01:23:12 UTC (rev 183903)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2015-05-07 02:09:26 UTC (rev 183904)
</span><span class="lines">@@ -3674,33 +3674,17 @@
</span><span class="cx">     return &quot;RenderBlock&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;typename CharacterType&gt;
-static inline TextRun constructTextRunInternal(RenderObject* context, const FontCascade&amp; font, const CharacterType* characters, int length, const RenderStyle&amp; style, ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, StringView stringView, const RenderStyle&amp; style, ExpansionBehavior expansion, TextRunFlags flags)
</ins><span class="cx"> {
</span><span class="cx">     TextDirection textDirection = LTR;
</span><span class="cx">     bool directionalOverride = style.rtlOrdering() == VisualOrder;
</span><del>-
-    TextRun run(characters, length, 0, 0, expansion, textDirection, directionalOverride);
-    if (font.primaryFont().isSVGFont()) {
-        ASSERT(context); // FIXME: Thread a RenderObject&amp; to this point so we don't have to dereference anything.
-        run.setRenderingContext(SVGTextRunRenderingContext::create(*context));
-    }
-
-    return run;
-}
-
-template &lt;typename CharacterType&gt;
-static inline TextRun constructTextRunInternal(RenderObject* context, const FontCascade&amp; font, const CharacterType* characters, int length, const RenderStyle&amp; style, ExpansionBehavior expansion, TextRunFlags flags)
-{
-    TextDirection textDirection = LTR;
-    bool directionalOverride = style.rtlOrdering() == VisualOrder;
</del><span class="cx">     if (flags != DefaultTextRunFlags) {
</span><span class="cx">         if (flags &amp; RespectDirection)
</span><span class="cx">             textDirection = style.direction();
</span><span class="cx">         if (flags &amp; RespectDirectionOverride)
</span><span class="cx">             directionalOverride |= isOverride(style.unicodeBidi());
</span><span class="cx">     }
</span><del>-    TextRun run(characters, length, 0, 0, expansion, textDirection, directionalOverride);
</del><ins>+    TextRun run(stringView, 0, 0, expansion, textDirection, directionalOverride);
</ins><span class="cx">     if (font.primaryFont().isSVGFont()) {
</span><span class="cx">         ASSERT(context); // FIXME: Thread a RenderObject&amp; to this point so we don't have to dereference anything.
</span><span class="cx">         run.setRenderingContext(SVGTextRunRenderingContext::create(*context));
</span><span class="lines">@@ -3709,38 +3693,31 @@
</span><span class="cx">     return run;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, const LChar* characters, int length, const RenderStyle&amp; style, ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, const String&amp; string, const RenderStyle&amp; style, ExpansionBehavior expansion, TextRunFlags flags)
</ins><span class="cx"> {
</span><del>-    return constructTextRunInternal(context, font, characters, length, style, expansion);
</del><ins>+    return constructTextRun(context, font, StringView(string), style, expansion, flags);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, const UChar* characters, int length, const RenderStyle&amp; style, ExpansionBehavior expansion)
-{
-    return constructTextRunInternal(context, font, characters, length, style, expansion);
-}
-
</del><span class="cx"> TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, const RenderText* text, const RenderStyle&amp; style, ExpansionBehavior expansion)
</span><span class="cx"> {
</span><del>-    if (text-&gt;is8Bit())
-        return constructTextRunInternal(context, font, text-&gt;characters8(), text-&gt;textLength(), style, expansion);
-    return constructTextRunInternal(context, font, text-&gt;characters16(), text-&gt;textLength(), style, expansion);
</del><ins>+    return constructTextRun(context, font, text-&gt;stringView(), style, expansion);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, const RenderText* text, unsigned offset, unsigned length, const RenderStyle&amp; style, ExpansionBehavior expansion)
</span><span class="cx"> {
</span><del>-    ASSERT(offset + length &lt;= text-&gt;textLength());
-    if (text-&gt;is8Bit())
-        return constructTextRunInternal(context, font, text-&gt;characters8() + offset, length, style, expansion);
-    return constructTextRunInternal(context, font, text-&gt;characters16() + offset, length, style, expansion);
</del><ins>+    unsigned stop = offset + length;
+    ASSERT(stop &lt;= text-&gt;textLength());
+    return constructTextRun(context, font, text-&gt;stringView(offset, stop), style, expansion);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, const String&amp; string, const RenderStyle&amp; style, ExpansionBehavior expansion, TextRunFlags flags)
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, const LChar* characters, int length, const RenderStyle&amp; style, ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><del>-    unsigned length = string.length();
</del><ins>+    return constructTextRun(context, font, StringView(characters, length), style, expansion);
+}
</ins><span class="cx"> 
</span><del>-    if (!length || string.is8Bit())
-        return constructTextRunInternal(context, font, string.characters8(), length, style, expansion, flags);
-    return constructTextRunInternal(context, font, string.characters16(), length, style, expansion, flags);
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&amp; font, const UChar* characters, int length, const RenderStyle&amp; style, ExpansionBehavior expansion)
+{
+    return constructTextRun(context, font, StringView(characters, length), style, expansion);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderBlock* RenderBlock::createAnonymousWithParentRendererAndDisplay(const RenderObject* parent, EDisplay display)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.h (183903 => 183904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.h        2015-05-07 01:23:12 UTC (rev 183903)
+++ trunk/Source/WebCore/rendering/RenderBlock.h        2015-05-07 02:09:26 UTC (rev 183904)
</span><span class="lines">@@ -204,21 +204,16 @@
</span><span class="cx">         return obj-&gt;isFloating() || (obj-&gt;isOutOfFlowPositioned() &amp;&amp; !obj-&gt;style().isOriginalDisplayInlineType() &amp;&amp; !obj-&gt;container()-&gt;isRenderInline());
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    static TextRun constructTextRun(RenderObject* context, const FontCascade&amp;, StringView, const RenderStyle&amp;,
+        ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextRunFlags = DefaultTextRunFlags);
</ins><span class="cx">     static TextRun constructTextRun(RenderObject* context, const FontCascade&amp;, const String&amp;, const RenderStyle&amp;,
</span><span class="cx">         ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextRunFlags = DefaultTextRunFlags);
</span><del>-
</del><span class="cx">     static TextRun constructTextRun(RenderObject* context, const FontCascade&amp;, const RenderText*, const RenderStyle&amp;,
</span><span class="cx">         ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
</span><del>-
</del><span class="cx">     static TextRun constructTextRun(RenderObject* context, const FontCascade&amp;, const RenderText*, unsigned offset, unsigned length, const RenderStyle&amp;,
</span><span class="cx">         ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
</span><del>-
-    static TextRun constructTextRun(RenderObject* context, const FontCascade&amp;, const RenderText*, unsigned offset, const RenderStyle&amp;,
-        ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
-
</del><span class="cx">     static TextRun constructTextRun(RenderObject* context, const FontCascade&amp;, const LChar* characters, int length, const RenderStyle&amp;,
</span><span class="cx">         ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
</span><del>-
</del><span class="cx">     static TextRun constructTextRun(RenderObject* context, const FontCascade&amp;, const UChar* characters, int length, const RenderStyle&amp;,
</span><span class="cx">         ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderEmbeddedObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp (183903 => 183904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp        2015-05-07 01:23:12 UTC (rev 183903)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp        2015-05-07 02:09:26 UTC (rev 183904)
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx">     FloatRect replacementTextRect;
</span><span class="cx">     FloatRect arrowRect;
</span><span class="cx">     FontCascade font;
</span><del>-    TextRun run(&quot;&quot;);
</del><ins>+    TextRun run(emptyString());
</ins><span class="cx">     float textWidth;
</span><span class="cx">     if (!getReplacementTextGeometry(paintOffset, contentRect, indicatorRect, replacementTextRect, arrowRect, font, run, textWidth))
</span><span class="cx">         return;
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">     FloatRect replacementTextRect;
</span><span class="cx">     FloatRect arrowRect;
</span><span class="cx">     FontCascade font;
</span><del>-    TextRun run(&quot;&quot;, 0);
</del><ins>+    TextRun run(emptyString());
</ins><span class="cx">     float textWidth;
</span><span class="cx">     if (getReplacementTextGeometry(accumulatedOffset, contentRect, indicatorRect, replacementTextRect, arrowRect, font, run, textWidth))
</span><span class="cx">         return LayoutRect(indicatorRect);
</span><span class="lines">@@ -586,7 +586,7 @@
</span><span class="cx">     FloatRect replacementTextRect;
</span><span class="cx">     FloatRect arrowRect;
</span><span class="cx">     FontCascade font;
</span><del>-    TextRun run(&quot;&quot;);
</del><ins>+    TextRun run(emptyString());
</ins><span class="cx">     float textWidth;
</span><span class="cx">     return getReplacementTextGeometry(IntPoint(), contentRect, indicatorRect, replacementTextRect, arrowRect, font, run, textWidth)
</span><span class="cx">         &amp;&amp; indicatorRect.contains(point);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextMetricsBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp (183903 => 183904)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp        2015-05-07 01:23:12 UTC (rev 183903)
+++ trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp        2015-05-07 02:09:26 UTC (rev 183904)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGTextMetricsBuilder::SVGTextMetricsBuilder()
</span><span class="cx">     : m_text(0)
</span><del>-    , m_run(static_cast&lt;const UChar*&gt;(0), 0)
</del><ins>+    , m_run(StringView())
</ins><span class="cx">     , m_textPosition(0)
</span><span class="cx">     , m_isComplexText(false)
</span><span class="cx">     , m_totalWidth(0)
</span></span></pre>
</div>
</div>

</body>
</html>