<!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>[174269] 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/174269">174269</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2014-10-03 09:57:10 -0700 (Fri, 03 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>TextRun::length() should return an unsigned
https://bugs.webkit.org/show_bug.cgi?id=137354

Patch by Myles C. Maxfield &lt;mmaxfield@apple.com&gt; on 2014-10-03
Reviewed by Antti Koivisto.

Currently, the m_len instance variable that backs the TextRun::length() function is
an unsigned, but the length() function implicitly casts that to an int when
returning it. This patch makes the function return an unsigned, and makes the
do any casting if necessary.

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::Font::drawText): Cast result to int.
(WebCore::Font::drawEmphasisMarks): Ditto.
(WebCore::Font::adjustSelectionRectForText): Ditto.
(WebCore::computeUnderlineType): Update internal type to be unsigned.
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::add): Update sentinel value to be unsigned.
(WebCore::GlyphBuffer::saveOffsetsInString): Ditto.
* platform/graphics/GraphicsContext.cpp: Update internal type to be unsigned.
* platform/graphics/TextRun.h:
(WebCore::TextRun::length): Update return type.
(WebCore::TextRun::charactersLength): Ditto.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal): Cast result to int.
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair): Remove
unnecessary casts.
(WebCore::SVGTextMetricsBuilder::advance): Ditto.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection): Cast result to int.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontcpp">trunk/Source/WebCore/platform/graphics/Font.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGlyphBufferh">trunk/Source/WebCore/platform/graphics/GlyphBuffer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContextcpp">trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsTextRunh">trunk/Source/WebCore/platform/graphics/TextRun.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsWidthIteratorcpp">trunk/Source/WebCore/platform/graphics/WidthIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp">trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextMetricsBuildercpp">trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontDatacpp">trunk/Source/WebCore/svg/SVGFontData.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/ChangeLog        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2014-10-03  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        TextRun::length() should return an unsigned
+        https://bugs.webkit.org/show_bug.cgi?id=137354
+
+        Reviewed by Antti Koivisto.
+
+        Currently, the m_len instance variable that backs the TextRun::length() function is
+        an unsigned, but the length() function implicitly casts that to an int when
+        returning it. This patch makes the function return an unsigned, and makes the
+        do any casting if necessary.
+
+        No new tests because there is no behavior change.
+
+        * platform/graphics/Font.cpp:
+        (WebCore::Font::drawText): Cast result to int.
+        (WebCore::Font::drawEmphasisMarks): Ditto.
+        (WebCore::Font::adjustSelectionRectForText): Ditto.
+        (WebCore::computeUnderlineType): Update internal type to be unsigned.
+        * platform/graphics/GlyphBuffer.h:
+        (WebCore::GlyphBuffer::add): Update sentinel value to be unsigned.
+        (WebCore::GlyphBuffer::saveOffsetsInString): Ditto.
+        * platform/graphics/GraphicsContext.cpp: Update internal type to be unsigned.
+        * platform/graphics/TextRun.h:
+        (WebCore::TextRun::length): Update return type.
+        (WebCore::TextRun::charactersLength): Ditto.
+        * platform/graphics/WidthIterator.cpp:
+        (WebCore::WidthIterator::advanceInternal): Cast result to int.
+        * rendering/svg/SVGTextMetricsBuilder.cpp:
+        (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair): Remove
+        unnecessary casts.
+        (WebCore::SVGTextMetricsBuilder::advance): Ditto.
+        * svg/SVGFontData.cpp:
+        (WebCore::SVGFontData::applySVGGlyphSelection): Cast result to int.
+
</ins><span class="cx"> 2014-10-03  Gyuyoung Kim  &lt;gyuyoung.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Fix build break since r174231 and r174256
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.cpp        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx"> 
</span><span class="cx">     CodePath codePathToUse = codePath(run);
</span><span class="cx">     // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
</span><del>-    if (codePathToUse != Complex &amp;&amp; typesettingFeatures() &amp;&amp; (from || to != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; typesettingFeatures() &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</ins><span class="cx">         codePathToUse = Complex;
</span><span class="cx"> 
</span><span class="cx">     if (codePathToUse != Complex)
</span><span class="lines">@@ -360,7 +360,7 @@
</span><span class="cx"> 
</span><span class="cx">     CodePath codePathToUse = codePath(run);
</span><span class="cx">     // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
</span><del>-    if (codePathToUse != Complex &amp;&amp; typesettingFeatures() &amp;&amp; (from || to != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; typesettingFeatures() &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</ins><span class="cx">         codePathToUse = Complex;
</span><span class="cx"> 
</span><span class="cx">     if (codePathToUse != Complex)
</span><span class="lines">@@ -513,7 +513,7 @@
</span><span class="cx"> 
</span><span class="cx">     CodePath codePathToUse = codePath(run);
</span><span class="cx">     // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
</span><del>-    if (codePathToUse != Complex &amp;&amp; typesettingFeatures() &amp;&amp; (from || to != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; typesettingFeatures() &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</ins><span class="cx">         codePathToUse = Complex;
</span><span class="cx"> 
</span><span class="cx">     if (codePathToUse != Complex)
</span><span class="lines">@@ -1059,9 +1059,9 @@
</span><span class="cx">     // In general, we want to skip descenders. However, skipping descenders on CJK characters leads to undesirable renderings,
</span><span class="cx">     // so we want to draw through CJK characters (on a character-by-character basis).
</span><span class="cx">     UChar32 baseCharacter;
</span><del>-    int offsetInString = glyphBuffer.offsetInString(index);
</del><ins>+    unsigned offsetInString = glyphBuffer.offsetInString(index);
</ins><span class="cx"> 
</span><del>-    if (offsetInString == GlyphBuffer::kNoOffset) {
</del><ins>+    if (offsetInString == GlyphBuffer::noOffset) {
</ins><span class="cx">         // We have no idea which character spawned this glyph. Bail.
</span><span class="cx">         return GlyphToPathTranslator::GlyphUnderlineType::DrawOverGlyph;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGlyphBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GlyphBuffer.h (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GlyphBuffer.h        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/platform/graphics/GlyphBuffer.h        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FloatSize.h&quot;
</span><span class="cx"> #include &quot;Glyph.h&quot;
</span><ins>+#include &lt;climits&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if USE(CG)
</span><span class="lines">@@ -124,8 +125,8 @@
</span><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    static const int kNoOffset = -1;
-    void add(Glyph glyph, const SimpleFontData* font, float width, int offsetInString = kNoOffset, const FloatSize* offset = 0)
</del><ins>+    static const unsigned noOffset = UINT_MAX;
+    void add(Glyph glyph, const SimpleFontData* font, float width, unsigned offsetInString = noOffset, const FloatSize* offset = 0)
</ins><span class="cx">     {
</span><span class="cx">         m_fontData.append(font);
</span><span class="cx"> 
</span><span class="lines">@@ -153,12 +154,12 @@
</span><span class="cx">         UNUSED_PARAM(offset);
</span><span class="cx"> #endif
</span><span class="cx">         
</span><del>-        if (offsetInString != kNoOffset &amp;&amp; m_offsetsInString)
</del><ins>+        if (offsetInString != noOffset &amp;&amp; m_offsetsInString)
</ins><span class="cx">             m_offsetsInString-&gt;append(offsetInString);
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx"> #if !USE(WINGDI)
</span><del>-    void add(Glyph glyph, const SimpleFontData* font, GlyphBufferAdvance advance, int offsetInString = kNoOffset)
</del><ins>+    void add(Glyph glyph, const SimpleFontData* font, GlyphBufferAdvance advance, unsigned offsetInString = noOffset)
</ins><span class="cx">     {
</span><span class="cx">         m_fontData.append(font);
</span><span class="cx"> #if USE(CAIRO)
</span><span class="lines">@@ -171,7 +172,7 @@
</span><span class="cx"> 
</span><span class="cx">         m_advances.append(advance);
</span><span class="cx">         
</span><del>-        if (offsetInString != kNoOffset &amp;&amp; m_offsetsInString)
</del><ins>+        if (offsetInString != noOffset &amp;&amp; m_offsetsInString)
</ins><span class="cx">             m_offsetsInString-&gt;append(offsetInString);
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -191,9 +192,10 @@
</span><span class="cx">     
</span><span class="cx">     void saveOffsetsInString()
</span><span class="cx">     {
</span><del>-        m_offsetsInString.reset(new Vector&lt;int, 2048&gt;());
</del><ins>+        m_offsetsInString.reset(new Vector&lt;unsigned, 2048&gt;());
</ins><span class="cx">     }
</span><del>-    
</del><ins>+
+    // FIXME: This converts from an unsigned to an int
</ins><span class="cx">     int offsetInString(int index) const
</span><span class="cx">     {
</span><span class="cx">         ASSERT(m_offsetsInString);
</span><span class="lines">@@ -226,7 +228,7 @@
</span><span class="cx">     Vector&lt;GlyphBufferGlyph, 2048&gt; m_glyphs;
</span><span class="cx">     Vector&lt;GlyphBufferAdvance, 2048&gt; m_advances;
</span><span class="cx">     GlyphBufferAdvance m_initialAdvance;
</span><del>-    std::unique_ptr&lt;Vector&lt;int, 2048&gt;&gt; m_offsetsInString;
</del><ins>+    std::unique_ptr&lt;Vector&lt;unsigned, 2048&gt;&gt; m_offsetsInString;
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     Vector&lt;FloatSize, 2048&gt; m_offsets;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     const TextRun* m_textRun;
</span><del>-    int m_offset;
</del><ins>+    unsigned m_offset;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class InterpolationQualityMaintainer {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTextRunh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TextRun.h (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TextRun.h        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/platform/graphics/TextRun.h        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -153,10 +153,10 @@
</span><span class="cx"> 
</span><span class="cx">     const LChar* characters8() const { ASSERT(is8Bit()); return m_text.characters8(); }
</span><span class="cx">     const UChar* characters16() const { ASSERT(!is8Bit()); return m_text.characters16(); }
</span><del>-    
</del><ins>+
</ins><span class="cx">     bool is8Bit() const { return m_text.is8Bit(); }
</span><del>-    int length() const { return m_text.length(); }
-    int charactersLength() const { return m_charactersLength; }
</del><ins>+    unsigned length() const { return m_text.length(); }
+    unsigned charactersLength() const { return m_charactersLength; }
</ins><span class="cx">     String string() const { return m_text.toString(); }
</span><span class="cx"> 
</span><span class="cx">     void setText(const LChar* c, unsigned len) { m_text = StringView(c, len); }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -298,8 +298,8 @@
</span><span class="cx">         } else {
</span><span class="cx">             // Check to see if the next character is a &quot;rounding hack character&quot;, if so, adjust
</span><span class="cx">             // width so that the total run width will be on an integer boundary.
</span><del>-            if ((m_run.applyWordRounding() &amp;&amp; textIterator.currentCharacter() &lt; m_run.length() &amp;&amp; Font::isRoundingHackCharacter(*(textIterator.characters())))
-                || (m_run.applyRunRounding() &amp;&amp; textIterator.currentCharacter() &gt;= m_run.length())) {
</del><ins>+            if ((m_run.applyWordRounding() &amp;&amp; static_cast&lt;unsigned&gt;(textIterator.currentCharacter()) &lt; m_run.length() &amp;&amp; Font::isRoundingHackCharacter(*(textIterator.characters())))
+                || (m_run.applyRunRounding() &amp;&amp; static_cast&lt;unsigned&gt;(textIterator.currentCharacter()) &gt;= m_run.length())) {
</ins><span class="cx">                 float totalWidth = widthSinceLastRounding + width;
</span><span class="cx">                 widthSinceLastRounding = ceilf(totalWidth);
</span><span class="cx">                 width += widthSinceLastRounding - totalWidth;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -254,7 +254,7 @@
</span><span class="cx">     } else
</span><span class="cx">         runCharacters = m_run.characters16();
</span><span class="cx"> 
</span><del>-    for (int i = 0; i &lt; m_run.length(); ++i) {
</del><ins>+    for (unsigned i = 0; i &lt; m_run.length(); ++i) {
</ins><span class="cx">         UChar ch = runCharacters[i];
</span><span class="cx">         if (::ublock_getCode(ch) == UBLOCK_COMBINING_DIACRITICAL_MARKS) {
</span><span class="cx">             icu::Normalizer::normalize(icu::UnicodeString(runCharacters,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextMetricsBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -37,13 +37,13 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair() const
</span><span class="cx"> {
</span><del>-    return U16_IS_LEAD(m_run[m_textPosition]) &amp;&amp; int(m_textPosition + 1) &lt; m_run.charactersLength() &amp;&amp; U16_IS_TRAIL(m_run[m_textPosition + 1]);
</del><ins>+    return U16_IS_LEAD(m_run[m_textPosition]) &amp;&amp; (m_textPosition + 1) &lt; m_run.charactersLength() &amp;&amp; U16_IS_TRAIL(m_run[m_textPosition + 1]);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SVGTextMetricsBuilder::advance()
</span><span class="cx"> {
</span><span class="cx">     m_textPosition += m_currentMetrics.length();
</span><del>-    if (int(m_textPosition) &gt;= m_run.charactersLength())
</del><ins>+    if (m_textPosition &gt;= m_run.charactersLength())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (m_isComplexText)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontData.cpp (174268 => 174269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontData.cpp        2014-10-03 16:47:06 UTC (rev 174268)
+++ trunk/Source/WebCore/svg/SVGFontData.cpp        2014-10-03 16:57:10 UTC (rev 174269)
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx"> {
</span><span class="cx">     const TextRun&amp; run = iterator.run();
</span><span class="cx">     Vector&lt;SVGGlyph::ArabicForm&gt;&amp; arabicForms = iterator.arabicForms();
</span><del>-    ASSERT(run.charactersLength() &gt;= currentCharacter);
</del><ins>+    ASSERT(run.charactersLength() &gt;= static_cast&lt;unsigned&gt;(currentCharacter));
</ins><span class="cx"> 
</span><span class="cx">     SVGFontFaceElement* svgFontFaceElement = this-&gt;svgFontFaceElement();
</span><span class="cx">     ASSERT(svgFontFaceElement);
</span></span></pre>
</div>
</div>

</body>
</html>