<!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>[170947] 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/170947">170947</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2014-07-09 18:42:43 -0700 (Wed, 09 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Revert <a href="http://trac.webkit.org/projects/webkit/changeset/170413">r170413</a> and <a href="http://trac.webkit.org/projects/webkit/changeset/170390">r170390</a>
https://bugs.webkit.org/show_bug.cgi?id=134741

Reviewed by Benjamin Poulain.

These patches caused a variety of failures. I'm going to break them up into
smaller chunks and commit them separately at some point in the future.

Requesting a review from Ben Poulain because there were some conflicts with
<a href="http://trac.webkit.org/projects/webkit/changeset/170561">r170561</a> in InlineTextBox.cpp and InlineTextBox.h.

* WebCore.exp.in:
* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::adjustSelectionRectForText):
(WebCore::computeUnderlineType):
* platform/graphics/Font.h:
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText):
(WebCore::Font::drawSimpleText):
(WebCore::Font::drawEmphasisMarksForSimpleText):
(WebCore::Font::drawGlyphBuffer):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::adjustSelectionRectForSimpleText):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::size):
(WebCore::GlyphBuffer::glyphs):
(WebCore::GlyphBuffer::advances):
(WebCore::GlyphBuffer::fontDataAt):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::offsetAt):
(WebCore::GlyphBuffer::reverse):
(WebCore::GlyphBuffer::offsetInString):
(WebCore::GlyphBuffer::swap):
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/Latin1TextIterator.h:
(WebCore::Latin1TextIterator::Latin1TextIterator):
(WebCore::Latin1TextIterator::currentCharacter):
* platform/graphics/SimpleFontData.h:
* platform/graphics/SurrogatePairAwareTextIterator.cpp:
(WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
* platform/graphics/SurrogatePairAwareTextIterator.h:
(WebCore::SurrogatePairAwareTextIterator::currentCharacter):
* platform/graphics/TextRun.h:
(WebCore::TextRun::length):
(WebCore::TextRun::charactersLength):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::glyphDataForCharacter):
(WebCore::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::advance):
(WebCore::WidthIterator::advanceOneCharacter):
* platform/graphics/WidthIterator.h:
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
(WebCore::Font::adjustSelectionRectForComplexText):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setNormalizedBuffer):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::adjustSelectionRectForComplexText):
(WebCore::Font::getGlyphsAndAdvancesForComplexText):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontCGWin.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontWin.cpp:
(WebCore::Font::adjustSelectionRectForComplexText):
(WebCore::Font::getGlyphsAndAdvancesForComplexText):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::Font::drawGlyphs):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
(WebCore::Font::selectionRectForComplexText):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
(WebCore::InlineTextBox::selectionState):
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintCompositionUnderline):
(WebCore::InlineTextBox::positionForOffset):
(WebCore::InlineTextBox::constructTextRun):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::truncation):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::getStringToRender):
* rendering/RenderCombineText.h:
* rendering/RenderTextLineBoxes.cpp:
(WebCore::ellipsisRectForBox):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::positionForOffset):
(WebCore::SVGInlineTextBox::localSelectionRect):
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
(WebCore::SVGInlineTextBox::paintText):
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
(WebCore::SVGTextMetricsBuilder::advance):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
(WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
(WebCore::SVGTextQuery::subStringLengthCallback):
(WebCore::SVGTextQuery::startPositionOfCharacterCallback):
(WebCore::SVGTextQuery::endPositionOfCharacterCallback):
(WebCore::SVGTextQuery::rotationOfCharacterCallback):
(WebCore::SVGTextQuery::extentOfCharacterCallback):
(WebCore::SVGTextQuery::characterNumberAtPositionCallback):
* rendering/svg/SVGTextQuery.h:
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
* rendering/svg/SVGTextRunRenderingContext.h:
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection):
* svg/SVGFontData.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontcpp">trunk/Source/WebCore/platform/graphics/Font.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFonth">trunk/Source/WebCore/platform/graphics/Font.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontFastPathcpp">trunk/Source/WebCore/platform/graphics/FontFastPath.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="#trunkSourceWebCoreplatformgraphicsLatin1TextIteratorh">trunk/Source/WebCore/platform/graphics/Latin1TextIterator.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSimpleFontDatah">trunk/Source/WebCore/platform/graphics/SimpleFontData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSurrogatePairAwareTextIteratorcpp">trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSurrogatePairAwareTextIteratorh">trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.h</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="#trunkSourceWebCoreplatformgraphicsWidthIteratorh">trunk/Source/WebCore/platform/graphics/WidthIterator.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoFontCairocpp">trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoFontCairoHarfbuzzNGcpp">trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp">trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontComplexTextMaccpp">trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontMacmm">trunk/Source/WebCore/platform/graphics/mac/FontMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinFontCGWincpp">trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinFontWincpp">trunk/Source/WebCore/platform/graphics/win/FontWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinceFontWinCEcpp">trunk/Source/WebCore/platform/graphics/wince/FontWinCE.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxh">trunk/Source/WebCore/rendering/InlineTextBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCombineTextcpp">trunk/Source/WebCore/rendering/RenderCombineText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCombineTexth">trunk/Source/WebCore/rendering/RenderCombineText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextLineBoxescpp">trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGInlineFlowBoxcpp">trunk/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGInlineTextBoxcpp">trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGInlineTextBoxh">trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextMetricsBuildercpp">trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextQuerycpp">trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextQueryh">trunk/Source/WebCore/rendering/svg/SVGTextQuery.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextRunRenderingContextcpp">trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextRunRenderingContexth">trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontDatacpp">trunk/Source/WebCore/svg/SVGFontData.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontDatah">trunk/Source/WebCore/svg/SVGFontData.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/ChangeLog        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -1,3 +1,137 @@
</span><ins>+2014-07-09  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Revert r170413 and r170390
+        https://bugs.webkit.org/show_bug.cgi?id=134741
+
+        Reviewed by Benjamin Poulain.
+
+        These patches caused a variety of failures. I'm going to break them up into
+        smaller chunks and commit them separately at some point in the future.
+
+        Requesting a review from Ben Poulain because there were some conflicts with
+        r170561 in InlineTextBox.cpp and InlineTextBox.h.
+
+        * WebCore.exp.in:
+        * platform/graphics/Font.cpp:
+        (WebCore::Font::drawText):
+        (WebCore::Font::drawEmphasisMarks):
+        (WebCore::Font::adjustSelectionRectForText):
+        (WebCore::computeUnderlineType):
+        * platform/graphics/Font.h:
+        * platform/graphics/FontFastPath.cpp:
+        (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
+        (WebCore::Font::drawSimpleText):
+        (WebCore::Font::drawEmphasisMarksForSimpleText):
+        (WebCore::Font::drawGlyphBuffer):
+        (WebCore::Font::drawEmphasisMarks):
+        (WebCore::Font::adjustSelectionRectForSimpleText):
+        * platform/graphics/GlyphBuffer.h:
+        (WebCore::GlyphBuffer::size):
+        (WebCore::GlyphBuffer::glyphs):
+        (WebCore::GlyphBuffer::advances):
+        (WebCore::GlyphBuffer::fontDataAt):
+        (WebCore::GlyphBuffer::advanceAt):
+        (WebCore::GlyphBuffer::offsetAt):
+        (WebCore::GlyphBuffer::reverse):
+        (WebCore::GlyphBuffer::offsetInString):
+        (WebCore::GlyphBuffer::swap):
+        * platform/graphics/GraphicsContext.cpp:
+        * platform/graphics/Latin1TextIterator.h:
+        (WebCore::Latin1TextIterator::Latin1TextIterator):
+        (WebCore::Latin1TextIterator::currentCharacter):
+        * platform/graphics/SimpleFontData.h:
+        * platform/graphics/SurrogatePairAwareTextIterator.cpp:
+        (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
+        * platform/graphics/SurrogatePairAwareTextIterator.h:
+        (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
+        * platform/graphics/TextRun.h:
+        (WebCore::TextRun::length):
+        (WebCore::TextRun::charactersLength):
+        * platform/graphics/WidthIterator.cpp:
+        (WebCore::WidthIterator::glyphDataForCharacter):
+        (WebCore::applyFontTransforms):
+        (WebCore::WidthIterator::advanceInternal):
+        (WebCore::WidthIterator::advance):
+        (WebCore::WidthIterator::advanceOneCharacter):
+        * platform/graphics/WidthIterator.h:
+        * platform/graphics/cairo/FontCairo.cpp:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::drawEmphasisMarksForComplexText):
+        (WebCore::Font::adjustSelectionRectForComplexText):
+        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
+        (WebCore::HarfBuzzShaper::setNormalizedBuffer):
+        * platform/graphics/mac/FontComplexTextMac.cpp:
+        (WebCore::Font::adjustSelectionRectForComplexText):
+        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::drawEmphasisMarksForComplexText):
+        * platform/graphics/mac/FontMac.mm:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/win/FontCGWin.cpp:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/win/FontWin.cpp:
+        (WebCore::Font::adjustSelectionRectForComplexText):
+        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::drawEmphasisMarksForComplexText):
+        * platform/graphics/wince/FontWinCE.cpp:
+        (WebCore::Font::drawGlyphs):
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::drawEmphasisMarksForComplexText):
+        (WebCore::Font::selectionRectForComplexText):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::isSelected):
+        (WebCore::InlineTextBox::selectionState):
+        (WebCore::InlineTextBox::localSelectionRect):
+        (WebCore::InlineTextBox::paint):
+        (WebCore::InlineTextBox::selectionStartEnd):
+        (WebCore::InlineTextBox::paintSelection):
+        (WebCore::InlineTextBox::paintCompositionBackground):
+        (WebCore::InlineTextBox::paintDocumentMarker):
+        (WebCore::InlineTextBox::paintTextMatchMarker):
+        (WebCore::InlineTextBox::computeRectForReplacementMarker):
+        (WebCore::InlineTextBox::paintCompositionUnderline):
+        (WebCore::InlineTextBox::positionForOffset):
+        (WebCore::InlineTextBox::constructTextRun):
+        * rendering/InlineTextBox.h:
+        (WebCore::InlineTextBox::truncation):
+        * rendering/RenderCombineText.cpp:
+        (WebCore::RenderCombineText::getStringToRender):
+        * rendering/RenderCombineText.h:
+        * rendering/RenderTextLineBoxes.cpp:
+        (WebCore::ellipsisRectForBox):
+        * rendering/svg/SVGInlineFlowBox.cpp:
+        (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
+        * rendering/svg/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::positionForOffset):
+        (WebCore::SVGInlineTextBox::localSelectionRect):
+        (WebCore::SVGInlineTextBox::paintSelectionBackground):
+        (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
+        (WebCore::SVGInlineTextBox::paintText):
+        * rendering/svg/SVGInlineTextBox.h:
+        * rendering/svg/SVGTextMetricsBuilder.cpp:
+        (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
+        (WebCore::SVGTextMetricsBuilder::advance):
+        * rendering/svg/SVGTextQuery.cpp:
+        (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
+        (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
+        (WebCore::SVGTextQuery::subStringLengthCallback):
+        (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
+        (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
+        (WebCore::SVGTextQuery::rotationOfCharacterCallback):
+        (WebCore::SVGTextQuery::extentOfCharacterCallback):
+        (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
+        * rendering/svg/SVGTextQuery.h:
+        * rendering/svg/SVGTextRunRenderingContext.cpp:
+        (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
+        (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
+        * rendering/svg/SVGTextRunRenderingContext.h:
+        * svg/SVGFontData.cpp:
+        (WebCore::SVGFontData::applySVGGlyphSelection):
+        * svg/SVGFontData.h:
+
</ins><span class="cx"> 2014-07-08  Jeffrey Pfau  &lt;jpfau@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix flaky loading tests
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -1868,7 +1868,7 @@
</span><span class="cx"> __ZNK7WebCore3URL8protocolEv
</span><span class="cx"> __ZNK7WebCore3URLcvP5NSURLEv
</span><span class="cx"> __ZNK7WebCore4Font5widthERKNS_7TextRunEPN3WTF7HashSetIPKNS_14SimpleFontDataENS4_7PtrHashIS8_EENS4_10HashTraitsIS8_EEEEPNS_13GlyphOverflowE
</span><del>-__ZNK7WebCore4Font8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_10FloatPointEjiNS0_24CustomFontNotReadyActionE
</del><ins>+__ZNK7WebCore4Font8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_10FloatPointEiiNS0_24CustomFontNotReadyActionE
</ins><span class="cx"> __ZNK7WebCore4FonteqERKS0_
</span><span class="cx"> __ZNK7WebCore4Node11textContentEb
</span><span class="cx"> __ZNK7WebCore4Node13ownerDocumentEv
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -329,7 +329,7 @@
</span><span class="cx">     m_typesettingFeatures = computeTypesettingFeatures();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::drawText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, unsigned from, int initialTo, CustomFontNotReadyAction customFontNotReadyAction) const
</del><ins>+float Font::drawText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to, CustomFontNotReadyAction customFontNotReadyAction) const
</ins><span class="cx"> {
</span><span class="cx">     // Don't draw anything while we are using custom fonts that are in the process of loading,
</span><span class="cx">     // except if the 'force' argument is set to true (in which case it will use a fallback
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx">     if (loadingCustomFonts() &amp;&amp; customFontNotReadyAction == DoNotPaintIfFontNotReady)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    unsigned to = initialTo &lt; 0 ? run.length() : initialTo;
</del><ins>+    to = (to == -1 ? run.length() : to);
</ins><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><span class="lines">@@ -350,13 +350,14 @@
</span><span class="cx">     return drawComplexText(context, run, point, from, to);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun&amp; run, const AtomicString&amp; mark, const FloatPoint&amp; point, unsigned from, int initialTo) const
</del><ins>+void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun&amp; run, const AtomicString&amp; mark, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     if (loadingCustomFonts())
</span><span class="cx">         return;
</span><del>-    
-    unsigned to = initialTo &lt; 0 ? run.length() : initialTo;
</del><span class="cx"> 
</span><ins>+    if (to &lt; 0)
+        to = run.length();
+
</ins><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><span class="cx">     if (codePathToUse != Complex &amp;&amp; typesettingFeatures() &amp;&amp; (from || to != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</span><span class="lines">@@ -506,9 +507,9 @@
</span><span class="cx">     return success;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::adjustSelectionRectForText(const TextRun&amp; run, LayoutRect&amp; selectionRect, unsigned from, int initialTo) const
</del><ins>+void Font::adjustSelectionRectForText(const TextRun&amp; run, LayoutRect&amp; selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><del>-    unsigned to = initialTo &lt; 0 ? run.length() : initialTo;
</del><ins>+    to = (to == -1 ? run.length() : to);
</ins><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><span class="lines">@@ -1053,21 +1054,18 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun&amp; textRun, const GlyphBuffer&amp; glyphBuffer, unsigned index)
</del><ins>+GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun&amp; textRun, const GlyphBuffer&amp; glyphBuffer, int index)
</ins><span class="cx"> {
</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 initialOffsetInString = glyphBuffer.offsetInString(index);
</del><ins>+    int offsetInString = glyphBuffer.offsetInString(index);
</ins><span class="cx"> 
</span><del>-    if (initialOffsetInString == GlyphBuffer::kNoOffset) {
</del><ins>+    if (offsetInString == GlyphBuffer::kNoOffset) {
</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 class="cx">     
</span><del>-    ASSERT(initialOffsetInString &gt;= 0);
-    unsigned offsetInString = static_cast&lt;unsigned&gt;(initialOffsetInString);
-    
</del><span class="cx">     if (textRun.is8Bit())
</span><span class="cx">         baseCharacter = textRun.characters8()[offsetInString];
</span><span class="cx">     else
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFonth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/Font.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">     virtual void advance() = 0;
</span><span class="cx">     virtual ~GlyphToPathTranslator() { }
</span><span class="cx"> };
</span><del>-GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun&amp;, const GlyphBuffer&amp;, unsigned index);
</del><ins>+GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun&amp;, const GlyphBuffer&amp;, int index);
</ins><span class="cx"> 
</span><span class="cx"> class Font {
</span><span class="cx"> public:
</span><span class="lines">@@ -133,9 +133,9 @@
</span><span class="cx">     void update(PassRefPtr&lt;FontSelector&gt;) const;
</span><span class="cx"> 
</span><span class="cx">     enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontNotReady };
</span><del>-    float drawText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, unsigned from = 0, int to = -1, CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const;
-    void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&amp;, unsigned from, unsigned numGlyphs, const FloatPoint&amp;) const;
-    void drawEmphasisMarks(GraphicsContext*, const TextRun&amp;, const AtomicString&amp; mark, const FloatPoint&amp;, unsigned from = 0, int to = -1) const;
</del><ins>+    float drawText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, int from = 0, int to = -1, CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const;
+    void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&amp;, int from, int numGlyphs, const FloatPoint&amp;) const;
+    void drawEmphasisMarks(GraphicsContext*, const TextRun&amp;, const AtomicString&amp; mark, const FloatPoint&amp;, int from = 0, int to = -1) const;
</ins><span class="cx"> 
</span><span class="cx">     DashArray dashesForIntersectionsWithRect(const TextRun&amp;, const FloatPoint&amp; textOrigin, const FloatRect&amp; lineExtents) const;
</span><span class="cx"> 
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx">     static float width(TextLayout&amp;, unsigned from, unsigned len, HashSet&lt;const SimpleFontData*&gt;* fallbackFonts = 0);
</span><span class="cx"> 
</span><span class="cx">     int offsetForPosition(const TextRun&amp;, float position, bool includePartialGlyphs) const;
</span><del>-    void adjustSelectionRectForText(const TextRun&amp;, LayoutRect&amp; selectionRect, unsigned from = 0, int to = -1) const;
</del><ins>+    void adjustSelectionRectForText(const TextRun&amp;, LayoutRect&amp; selectionRect, int from = 0, int to = -1) const;
</ins><span class="cx"> 
</span><span class="cx">     bool isSmallCaps() const { return m_fontDescription.smallCaps(); }
</span><span class="cx"> 
</span><span class="lines">@@ -218,14 +218,14 @@
</span><span class="cx">     enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis };
</span><span class="cx"> 
</span><span class="cx">     // Returns the initial in-stream advance.
</span><del>-    float getGlyphsAndAdvancesForSimpleText(const TextRun&amp;, unsigned from, unsigned to, GlyphBuffer&amp;, ForTextEmphasisOrNot = NotForTextEmphasis) const;
-    float drawSimpleText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, unsigned from, unsigned to) const;
-    void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRun&amp;, const AtomicString&amp; mark, const FloatPoint&amp;, unsigned from, unsigned to) const;
</del><ins>+    float getGlyphsAndAdvancesForSimpleText(const TextRun&amp;, int from, int to, GlyphBuffer&amp;, ForTextEmphasisOrNot = NotForTextEmphasis) const;
+    float drawSimpleText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, int from, int to) const;
+    void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRun&amp;, const AtomicString&amp; mark, const FloatPoint&amp;, int from, int to) const;
</ins><span class="cx">     void drawGlyphBuffer(GraphicsContext*, const TextRun&amp;, const GlyphBuffer&amp;, FloatPoint&amp;) const;
</span><span class="cx">     void drawEmphasisMarks(GraphicsContext*, const TextRun&amp;, const GlyphBuffer&amp;, const AtomicString&amp;, const FloatPoint&amp;) const;
</span><span class="cx">     float floatWidthForSimpleText(const TextRun&amp;, HashSet&lt;const SimpleFontData*&gt;* fallbackFonts = 0, GlyphOverflow* = 0) const;
</span><span class="cx">     int offsetForPositionForSimpleText(const TextRun&amp;, float position, bool includePartialGlyphs) const;
</span><del>-    void adjustSelectionRectForSimpleText(const TextRun&amp;, LayoutRect&amp; selectionRect, unsigned from, unsigned to) const;
</del><ins>+    void adjustSelectionRectForSimpleText(const TextRun&amp;, LayoutRect&amp; selectionRect, int from, int to) const;
</ins><span class="cx"> 
</span><span class="cx">     bool getEmphasisMarkGlyphData(const AtomicString&amp;, GlyphData&amp;) const;
</span><span class="cx"> 
</span><span class="lines">@@ -233,12 +233,12 @@
</span><span class="cx">     static bool canExpandAroundIdeographsInComplexText();
</span><span class="cx"> 
</span><span class="cx">     // Returns the initial in-stream advance.
</span><del>-    float getGlyphsAndAdvancesForComplexText(const TextRun&amp;, unsigned from, unsigned to, GlyphBuffer&amp;, ForTextEmphasisOrNot = NotForTextEmphasis) const;
-    float drawComplexText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, unsigned from, unsigned to) const;
-    void drawEmphasisMarksForComplexText(GraphicsContext*, const TextRun&amp;, const AtomicString&amp; mark, const FloatPoint&amp;, unsigned from, unsigned to) const;
</del><ins>+    float getGlyphsAndAdvancesForComplexText(const TextRun&amp;, int from, int to, GlyphBuffer&amp;, ForTextEmphasisOrNot = NotForTextEmphasis) const;
+    float drawComplexText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, int from, int to) const;
+    void drawEmphasisMarksForComplexText(GraphicsContext*, const TextRun&amp;, const AtomicString&amp; mark, const FloatPoint&amp;, int from, int to) const;
</ins><span class="cx">     float floatWidthForComplexText(const TextRun&amp;, HashSet&lt;const SimpleFontData*&gt;* fallbackFonts = 0, GlyphOverflow* = 0) const;
</span><span class="cx">     int offsetForPositionForComplexText(const TextRun&amp;, float position, bool includePartialGlyphs) const;
</span><del>-    void adjustSelectionRectForComplexText(const TextRun&amp;, LayoutRect&amp; selectionRect, unsigned from, unsigned to) const;
</del><ins>+    void adjustSelectionRectForComplexText(const TextRun&amp;, LayoutRect&amp; selectionRect, int from, int to) const;
</ins><span class="cx"> 
</span><span class="cx">     friend struct WidthIterator;
</span><span class="cx">     friend class SVGTextRunRenderingContext;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontFastPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontFastPath.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontFastPath.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/FontFastPath.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx">     return markFontData-&gt;fontMetrics().height();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::getGlyphsAndAdvancesForSimpleText(const TextRun&amp; run, unsigned from, unsigned to, GlyphBuffer&amp; glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</del><ins>+float Font::getGlyphsAndAdvancesForSimpleText(const TextRun&amp; run, int from, int to, GlyphBuffer&amp; glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</ins><span class="cx"> {
</span><span class="cx">     float initialAdvance;
</span><span class="cx"> 
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">     return initialAdvance;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::drawSimpleText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, unsigned from, unsigned to) const
</del><ins>+float Font::drawSimpleText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     // This glyph buffer holds our glyphs+advances+font data for each glyph.
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     return startPoint.x() - startX;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawEmphasisMarksForSimpleText(GraphicsContext* context, const TextRun&amp; run, const AtomicString&amp; mark, const FloatPoint&amp; point, unsigned from, unsigned to) const
</del><ins>+void Font::drawEmphasisMarksForSimpleText(GraphicsContext* context, const TextRun&amp; run, const AtomicString&amp; mark, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="cx">     float initialAdvance = getGlyphsAndAdvancesForSimpleText(run, from, to, glyphBuffer, ForTextEmphasis);
</span><span class="lines">@@ -195,8 +195,8 @@
</span><span class="cx">     FloatPoint startPoint(point.x(), point.y() - glyphBuffer.initialAdvance().height());
</span><span class="cx">     float nextX = startPoint.x() + glyphBuffer.advanceAt(0).width();
</span><span class="cx">     float nextY = startPoint.y() + glyphBuffer.advanceAt(0).height();
</span><del>-    unsigned lastFrom = 0;
-    unsigned nextGlyph = 1;
</del><ins>+    int lastFrom = 0;
+    int nextGlyph = 1;
</ins><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx">     TextRun::RenderingContext* renderingContext = run.renderingContext();
</span><span class="cx"> #endif
</span><span class="lines">@@ -210,10 +210,7 @@
</span><span class="cx">                 renderingContext-&gt;drawSVGGlyphs(context, fontData, glyphBuffer, lastFrom, nextGlyph - lastFrom, startPoint);
</span><span class="cx">             else
</span><span class="cx"> #endif
</span><del>-            {
-                ASSERT(nextGlyph &gt;= lastFrom);
</del><span class="cx">                 drawGlyphs(context, fontData, glyphBuffer, lastFrom, nextGlyph - lastFrom, startPoint);
</span><del>-            }
</del><span class="cx"> 
</span><span class="cx">             lastFrom = nextGlyph;
</span><span class="cx">             fontData = nextFontData;
</span><span class="lines">@@ -272,7 +269,7 @@
</span><span class="cx">     FloatPoint startPoint(point.x() + middleOfLastGlyph - offsetToMiddleOfGlyph(markFontData, markGlyph), point.y());
</span><span class="cx"> 
</span><span class="cx">     GlyphBuffer markBuffer;
</span><del>-    for (unsigned i = 0; i + 1 &lt; glyphBuffer.size(); ++i) {
</del><ins>+    for (int i = 0; i + 1 &lt; glyphBuffer.size(); ++i) {
</ins><span class="cx">         float middleOfNextGlyph = offsetToMiddleOfGlyphAtIndex(glyphBuffer, i + 1);
</span><span class="cx">         float advance = glyphBuffer.advanceAt(i).width() - middleOfLastGlyph + middleOfNextGlyph;
</span><span class="cx">         markBuffer.add(glyphBuffer.glyphAt(i) ? markGlyph : spaceGlyph, markFontData, advance);
</span><span class="lines">@@ -299,7 +296,7 @@
</span><span class="cx">     return it.m_runWidthSoFar;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::adjustSelectionRectForSimpleText(const TextRun&amp; run, LayoutRect&amp; selectionRect, unsigned from, unsigned to) const
</del><ins>+void Font::adjustSelectionRectForSimpleText(const TextRun&amp; run, LayoutRect&amp; selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="cx">     WidthIterator it(this, run);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGlyphBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GlyphBuffer.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GlyphBuffer.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/GlyphBuffer.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> class GlyphBuffer {
</span><span class="cx"> public:
</span><span class="cx">     bool isEmpty() const { return m_fontData.isEmpty(); }
</span><del>-    unsigned size() const { return m_fontData.size(); }
</del><ins>+    int size() const { return m_fontData.size(); }
</ins><span class="cx">     
</span><span class="cx">     void clear()
</span><span class="cx">     {
</span><span class="lines">@@ -90,12 +90,12 @@
</span><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    GlyphBufferGlyph* glyphs(unsigned from) { return m_glyphs.data() + from; }
-    GlyphBufferAdvance* advances(unsigned from) { return m_advances.data() + from; }
-    const GlyphBufferGlyph* glyphs(unsigned from) const { return m_glyphs.data() + from; }
-    const GlyphBufferAdvance* advances(unsigned from) const { return m_advances.data() + from; }
</del><ins>+    GlyphBufferGlyph* glyphs(int from) { return m_glyphs.data() + from; }
+    GlyphBufferAdvance* advances(int from) { return m_advances.data() + from; }
+    const GlyphBufferGlyph* glyphs(int from) const { return m_glyphs.data() + from; }
+    const GlyphBufferAdvance* advances(int from) const { return m_advances.data() + from; }
</ins><span class="cx"> 
</span><del>-    const SimpleFontData* fontDataAt(unsigned index) const { return m_fontData[index]; }
</del><ins>+    const SimpleFontData* fontDataAt(int index) const { return m_fontData[index]; }
</ins><span class="cx"> 
</span><span class="cx">     void setInitialAdvance(GlyphBufferAdvance initialAdvance) { m_initialAdvance = initialAdvance; }
</span><span class="cx">     const GlyphBufferAdvance&amp; initialAdvance() const { return m_initialAdvance; }
</span><span class="lines">@@ -109,12 +109,12 @@
</span><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    GlyphBufferAdvance advanceAt(unsigned index) const
</del><ins>+    GlyphBufferAdvance advanceAt(int index) const
</ins><span class="cx">     {
</span><span class="cx">         return m_advances[index];
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    FloatSize offsetAt(unsigned index) const
</del><ins>+    FloatSize offsetAt(int index) const
</ins><span class="cx">     {
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">         return m_offsets[index];
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void reverse(unsigned from, unsigned length)
</del><ins>+    void reverse(int from, int length)
</ins><span class="cx">     {
</span><span class="cx">         for (int i = from, end = from + length - 1; i &lt; end; ++i, --end)
</span><span class="cx">             swap(i, end);
</span><span class="lines">@@ -194,14 +194,14 @@
</span><span class="cx">         m_offsetsInString.reset(new Vector&lt;int, 2048&gt;());
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    int offsetInString(unsigned index) const
</del><ins>+    int offsetInString(int index) const
</ins><span class="cx">     {
</span><span class="cx">         ASSERT(m_offsetsInString);
</span><span class="cx">         return (*m_offsetsInString)[index];
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    void swap(unsigned index1, unsigned index2)
</del><ins>+    void swap(int index1, int index2)
</ins><span class="cx">     {
</span><span class="cx">         const SimpleFontData* f = m_fontData[index1];
</span><span class="cx">         m_fontData[index1] = m_fontData[index2];
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</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>-    unsigned m_offset;
</del><ins>+    int m_offset;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class InterpolationQualityMaintainer {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsLatin1TextIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Latin1TextIterator.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Latin1TextIterator.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/Latin1TextIterator.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> public:
</span><span class="cx">     // The passed in LChar pointer starts at 'currentCharacter'. The iterator operates on the range [currentCharacter, lastCharacter].
</span><span class="cx">     // 'endCharacter' denotes the maximum length of the UChar array, which might exceed 'lastCharacter'.
</span><del>-    Latin1TextIterator(const LChar* characters, unsigned currentCharacter, unsigned lastCharacter, unsigned /*endCharacter*/)
</del><ins>+    Latin1TextIterator(const LChar* characters, int currentCharacter, int lastCharacter, int /*endCharacter*/)
</ins><span class="cx">         : m_characters(characters)
</span><span class="cx">         , m_currentCharacter(currentCharacter)
</span><span class="cx">         , m_lastCharacter(lastCharacter)
</span><span class="lines">@@ -53,13 +53,13 @@
</span><span class="cx">         m_currentCharacter += advanceLength;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    unsigned currentCharacter() const { return m_currentCharacter; }
</del><ins>+    int currentCharacter() const { return m_currentCharacter; }
</ins><span class="cx">     const LChar* characters() const { return m_characters; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     const LChar* m_characters;
</span><del>-    unsigned m_currentCharacter;
-    unsigned m_lastCharacter;
</del><ins>+    int m_currentCharacter;
+    int m_lastCharacter;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSimpleFontDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/SimpleFontData.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SimpleFontData.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/SimpleFontData.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">         virtual void initializeFontData(SimpleFontData*, float fontSize) = 0;
</span><span class="cx">         virtual float widthForSVGGlyph(Glyph, float fontSize) const = 0;
</span><span class="cx">         virtual bool fillSVGGlyphPage(GlyphPage*, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength, const SimpleFontData*) const = 0;
</span><del>-        virtual bool applySVGGlyphSelection(WidthIterator&amp;, GlyphData&amp;, bool mirror, unsigned currentCharacter, unsigned&amp; advanceLength) const = 0;
</del><ins>+        virtual bool applySVGGlyphSelection(WidthIterator&amp;, GlyphData&amp;, bool mirror, int currentCharacter, unsigned&amp; advanceLength) const = 0;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     // Used to create platform fonts.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSurrogatePairAwareTextIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator(const UChar* characters, unsigned currentCharacter, unsigned lastCharacter, unsigned endCharacter)
</del><ins>+SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator(const UChar* characters, int currentCharacter, int lastCharacter, int endCharacter)
</ins><span class="cx">     : m_characters(characters)
</span><span class="cx">     , m_currentCharacter(currentCharacter)
</span><span class="cx">     , m_lastCharacter(lastCharacter)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSurrogatePairAwareTextIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> public:
</span><span class="cx">     // The passed in UChar pointer starts at 'currentCharacter'. The iterator operatoes on the range [currentCharacter, lastCharacter].
</span><span class="cx">     // 'endCharacter' denotes the maximum length of the UChar array, which might exceed 'lastCharacter'.
</span><del>-    SurrogatePairAwareTextIterator(const UChar*, unsigned currentCharacter, unsigned lastCharacter, unsigned endCharacter);
</del><ins>+    SurrogatePairAwareTextIterator(const UChar*, int currentCharacter, int lastCharacter, int endCharacter);
</ins><span class="cx"> 
</span><span class="cx">     inline bool consume(UChar32&amp; character, unsigned&amp; clusterLength)
</span><span class="cx">     {
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">         m_currentCharacter += advanceLength;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    unsigned currentCharacter() const { return m_currentCharacter; }
</del><ins>+    int currentCharacter() const { return m_currentCharacter; }
</ins><span class="cx">     const UChar* characters() const { return m_characters; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -60,9 +60,9 @@
</span><span class="cx">     UChar32 normalizeVoicingMarks();
</span><span class="cx"> 
</span><span class="cx">     const UChar* m_characters;
</span><del>-    unsigned m_currentCharacter;
-    unsigned m_lastCharacter;
-    unsigned m_endCharacter;
</del><ins>+    int m_currentCharacter;
+    int m_lastCharacter;
+    int m_endCharacter;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTextRunh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TextRun.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TextRun.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/TextRun.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -171,8 +171,8 @@
</span><span class="cx">     const UChar* characters16() const { ASSERT(!is8Bit()); return m_data.characters16; }
</span><span class="cx">     
</span><span class="cx">     bool is8Bit() const { return m_is8Bit; }
</span><del>-    unsigned length() const { return m_len; }
-    unsigned charactersLength() const { return m_charactersLength; }
</del><ins>+    int length() const { return m_len; }
+    int charactersLength() const { return m_charactersLength; }
</ins><span class="cx">     String string() const
</span><span class="cx">     {
</span><span class="cx">         if (is8Bit())
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx">         virtual ~RenderingContext() { }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><del>-        virtual GlyphData glyphDataForCharacter(const Font&amp;, WidthIterator&amp;, UChar32 character, bool mirror, unsigned currentCharacter, unsigned&amp; advanceLength) = 0;
</del><ins>+        virtual GlyphData glyphDataForCharacter(const Font&amp;, WidthIterator&amp;, UChar32 character, bool mirror, int currentCharacter, unsigned&amp; advanceLength) = 0;
</ins><span class="cx">         virtual void drawSVGGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&amp;, int from, int to, const FloatPoint&amp;) const = 0;
</span><span class="cx">         virtual float floatWidthUsingSVGFont(const Font&amp;, const TextRun&amp;, int&amp; charsConsumed, String&amp; glyphName) const = 0;
</span><span class="cx">         virtual bool applySVGKerning(const SimpleFontData*, WidthIterator&amp;, GlyphBuffer*, int from) const = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GlyphData WidthIterator::glyphDataForCharacter(UChar32 character, bool mirror, unsigned currentCharacter, unsigned&amp; advanceLength)
</del><ins>+GlyphData WidthIterator::glyphDataForCharacter(UChar32 character, bool mirror, int currentCharacter, unsigned&amp; advanceLength)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_font);
</span><span class="cx"> 
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> 
</span><span class="cx"> typedef Vector&lt;std::pair&lt;int, OriginalAdvancesForCharacterTreatedAsSpace&gt;, 64&gt; CharactersTreatedAsSpace;
</span><span class="cx"> 
</span><del>-static inline float applyFontTransforms(GlyphBuffer* glyphBuffer, bool ltr, unsigned&amp; lastGlyphCount, const SimpleFontData* fontData, WidthIterator&amp; iterator, TypesettingFeatures typesettingFeatures, CharactersTreatedAsSpace&amp; charactersTreatedAsSpace)
</del><ins>+static inline float applyFontTransforms(GlyphBuffer* glyphBuffer, bool ltr, int&amp; lastGlyphCount, const SimpleFontData* fontData, WidthIterator&amp; iterator, TypesettingFeatures typesettingFeatures, CharactersTreatedAsSpace&amp; charactersTreatedAsSpace)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(typesettingFeatures &amp; (Kerning | Ligatures));
</span><span class="cx"> 
</span><span class="lines">@@ -165,14 +165,14 @@
</span><span class="cx"> 
</span><span class="cx">     const SimpleFontData* primaryFont = m_font-&gt;primaryFont();
</span><span class="cx">     const SimpleFontData* lastFontData = primaryFont;
</span><del>-    unsigned lastGlyphCount = glyphBuffer ? glyphBuffer-&gt;size() : 0;
</del><ins>+    int lastGlyphCount = glyphBuffer ? glyphBuffer-&gt;size() : 0;
</ins><span class="cx"> 
</span><span class="cx">     UChar32 character = 0;
</span><span class="cx">     unsigned clusterLength = 0;
</span><span class="cx">     CharactersTreatedAsSpace charactersTreatedAsSpace;
</span><span class="cx">     while (textIterator.consume(character, clusterLength)) {
</span><span class="cx">         unsigned advanceLength = clusterLength;
</span><del>-        unsigned currentCharacter = textIterator.currentCharacter();
</del><ins>+        int currentCharacter = textIterator.currentCharacter();
</ins><span class="cx">         const GlyphData&amp; glyphData = glyphDataForCharacter(character, rtl, currentCharacter, advanceLength);
</span><span class="cx">         Glyph glyph = glyphData.glyph;
</span><span class="cx">         const SimpleFontData* fontData = glyphData.fontData;
</span><span class="lines">@@ -327,14 +327,14 @@
</span><span class="cx">     return consumedCharacters;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned WidthIterator::advance(unsigned offset, GlyphBuffer* glyphBuffer)
</del><ins>+unsigned WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer)
</ins><span class="cx"> {
</span><del>-    unsigned length = m_run.length();
</del><ins>+    int length = m_run.length();
</ins><span class="cx"> 
</span><span class="cx">     if (offset &gt; length)
</span><span class="cx">         offset = length;
</span><span class="cx"> 
</span><del>-    if (m_currentCharacter &gt;= offset)
</del><ins>+    if (m_currentCharacter &gt;= static_cast&lt;unsigned&gt;(offset))
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     if (m_run.is8Bit()) {
</span><span class="lines">@@ -348,10 +348,10 @@
</span><span class="cx"> 
</span><span class="cx"> bool WidthIterator::advanceOneCharacter(float&amp; width, GlyphBuffer&amp; glyphBuffer)
</span><span class="cx"> {
</span><del>-    unsigned oldSize = glyphBuffer.size();
</del><ins>+    int oldSize = glyphBuffer.size();
</ins><span class="cx">     advance(m_currentCharacter + 1, &amp;glyphBuffer);
</span><span class="cx">     float w = 0;
</span><del>-    for (unsigned i = oldSize; i &lt; glyphBuffer.size(); ++i)
</del><ins>+    for (int i = oldSize; i &lt; glyphBuffer.size(); ++i)
</ins><span class="cx">         w += glyphBuffer.advanceAt(i).width();
</span><span class="cx">     width = w;
</span><span class="cx">     return glyphBuffer.size() &gt; oldSize;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> public:
</span><span class="cx">     WidthIterator(const Font*, const TextRun&amp;, HashSet&lt;const SimpleFontData*&gt;* fallbackFonts = 0, bool accountForGlyphBounds = false, bool forTextEmphasis = false);
</span><span class="cx"> 
</span><del>-    unsigned advance(unsigned to, GlyphBuffer*);
</del><ins>+    unsigned advance(int to, GlyphBuffer*);
</ins><span class="cx">     bool advanceOneCharacter(float&amp; width, GlyphBuffer&amp;);
</span><span class="cx"> 
</span><span class="cx">     float maxGlyphBoundingBoxY() const { ASSERT(m_accountForGlyphBounds); return m_maxGlyphBoundingBoxY; }
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    GlyphData glyphDataForCharacter(UChar32, bool mirror, unsigned currentCharacter, unsigned&amp; advanceLength);
</del><ins>+    GlyphData glyphDataForCharacter(UChar32, bool mirror, int currentCharacter, unsigned&amp; advanceLength);
</ins><span class="cx">     template &lt;typename TextIterator&gt;
</span><span class="cx">     inline unsigned advanceInternal(TextIterator&amp;, GlyphBuffer*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoFontCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer&amp; glyphBuffer,
</span><del>-    unsigned from, unsigned numGlyphs, const FloatPoint&amp; point) const
</del><ins>+    int from, int numGlyphs, const FloatPoint&amp; point) const
</ins><span class="cx"> {
</span><span class="cx">     if (!font-&gt;platformData().size())
</span><span class="cx">         return;
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     GlyphBufferGlyph* glyphs = const_cast&lt;GlyphBufferGlyph*&gt;(glyphBuffer.glyphs(from));
</span><span class="cx"> 
</span><span class="cx">     float offset = point.x();
</span><del>-    for (unsigned i = 0; i &lt; numGlyphs; i++) {
</del><ins>+    for (int i = 0; i &lt; numGlyphs; i++) {
</ins><span class="cx">         glyphs[i].x = offset;
</span><span class="cx">         glyphs[i].y = point.y();
</span><span class="cx">         offset += glyphBuffer.advanceAt(from + i).width();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoFontCairoHarfbuzzNGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-float Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, unsigned, unsigned) const
</del><ins>+float Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, int, int) const
</ins><span class="cx"> {
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="cx">     HarfBuzzShaper shaper(this, run);
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRun&amp; /* run */, const AtomicString&amp; /* mark */, const FloatPoint&amp; /* point */, unsigned /* from */, unsigned /* to */) const
</del><ins>+void Font::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRun&amp; /* run */, const AtomicString&amp; /* mark */, const FloatPoint&amp; /* point */, int /* from */, int /* to */) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::adjustSelectionRectForComplexText(const TextRun&amp; run, LayoutRect&amp; selectionRect, unsigned from, unsigned to) const
</del><ins>+void Font::adjustSelectionRectForComplexText(const TextRun&amp; run, LayoutRect&amp; selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     HarfBuzzShaper shaper(this, run);
</span><span class="cx">     if (shaper.shape()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</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 (unsigned i = 0; i &lt; m_run.length(); ++i) {
</del><ins>+    for (int 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="trunkSourceWebCoreplatformgraphicsmacFontComplexTextMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-void Font::adjustSelectionRectForComplexText(const TextRun&amp; run, LayoutRect&amp; selectionRect, unsigned from, unsigned to) const
</del><ins>+void Font::adjustSelectionRectForComplexText(const TextRun&amp; run, LayoutRect&amp; selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     ComplexTextController controller(this, run);
</span><span class="cx">     controller.advance(from);
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     selectionRect.setWidth(afterWidth - beforeWidth);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::getGlyphsAndAdvancesForComplexText(const TextRun&amp; run, unsigned from, unsigned to, GlyphBuffer&amp; glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</del><ins>+float Font::getGlyphsAndAdvancesForComplexText(const TextRun&amp; run, int from, int to, GlyphBuffer&amp; glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</ins><span class="cx"> {
</span><span class="cx">     float initialAdvance;
</span><span class="cx"> 
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">     return initialAdvance;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, unsigned from, unsigned to) const
</del><ins>+float Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     // This glyph buffer holds our glyphs + advances + font data for each glyph.
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">     return startPoint.x() - startX;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun&amp; run, const AtomicString&amp; mark, const FloatPoint&amp; point, unsigned from, unsigned to) const
</del><ins>+void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun&amp; run, const AtomicString&amp; mark, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="cx">     float initialAdvance = getGlyphsAndAdvancesForComplexText(run, from, to, glyphBuffer, ForTextEmphasis);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacFontMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontMac.mm (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontMac.mm        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/mac/FontMac.mm        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer&amp; glyphBuffer, unsigned from, unsigned numGlyphs, const FloatPoint&amp; anchorPoint) const
</del><ins>+void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer&amp; glyphBuffer, int from, int numGlyphs, const FloatPoint&amp; anchorPoint) const
</ins><span class="cx"> {
</span><span class="cx">     const FontPlatformData&amp; platformData = font-&gt;platformData();
</span><span class="cx">     if (!platformData.size())
</span><span class="lines">@@ -468,7 +468,7 @@
</span><span class="cx">     virtual void advance() override;
</span><span class="cx">     void moveToNextValidGlyph();
</span><span class="cx"> 
</span><del>-    unsigned m_index;
</del><ins>+    int m_index;
</ins><span class="cx">     const TextRun&amp; m_textRun;
</span><span class="cx">     const GlyphBuffer&amp; m_glyphBuffer;
</span><span class="cx">     const SimpleFontData* m_fontData;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinFontCGWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* font, const GlyphBuffer&amp; glyphBuffer, 
</span><del>-    unsigned from, unsigned numGlyphs, const FloatPoint&amp; point) const
</del><ins>+    int from, int numGlyphs, const FloatPoint&amp; point) const
</ins><span class="cx"> {
</span><span class="cx">     CGContextRef cgContext = graphicsContext-&gt;platformContext();
</span><span class="cx">     bool shouldUseFontSmoothing = WebCoreShouldUseFontSmoothing();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinFontWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/FontWin.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/FontWin.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/win/FontWin.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::adjustSelectionRectForComplexText(const TextRun&amp; run, LayoutRect&amp; selectionRect, unsigned from, unsigned to) const
</del><ins>+void Font::adjustSelectionRectForComplexText(const TextRun&amp; run, LayoutRect&amp; selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     UniscribeController it(this, run);
</span><span class="cx">     it.advance(from);
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">     selectionRect.setWidth(afterWidth - beforeWidth);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::getGlyphsAndAdvancesForComplexText(const TextRun&amp; run, unsigned from, unsigned to, GlyphBuffer&amp; glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</del><ins>+float Font::getGlyphsAndAdvancesForComplexText(const TextRun&amp; run, int from, int to, GlyphBuffer&amp; glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</ins><span class="cx"> {
</span><span class="cx">     if (forTextEmphasis) {
</span><span class="cx">         // FIXME: Add forTextEmphasis paremeter to UniscribeController and use it.
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">     return beforeWidth;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, unsigned from, unsigned to) const
</del><ins>+float Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     // This glyph buffer holds our glyphs + advances + font data for each glyph.
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx">     return startPoint.x() - startX;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun&amp; run, const AtomicString&amp; mark, const FloatPoint&amp; point, unsigned from, unsigned to) const
</del><ins>+void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun&amp; run, const AtomicString&amp; mark, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="cx">     float initialAdvance = getGlyphsAndAdvancesForComplexText(run, from, to, glyphBuffer, ForTextEmphasis);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinceFontWinCEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/wince/FontWinCE.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/wince/FontWinCE.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/platform/graphics/wince/FontWinCE.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> ScreenDcReleaser releaseScreenDc;
</span><span class="cx"> 
</span><span class="cx"> void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* fontData, const GlyphBuffer&amp; glyphBuffer,
</span><del>-    unsigned from, unsigned numGlyphs, const FloatPoint&amp; point) const
</del><ins>+    int from, int numGlyphs, const FloatPoint&amp; point) const
</ins><span class="cx"> {
</span><span class="cx">     graphicsContext-&gt;drawText(fontData, glyphBuffer, from, numGlyphs, point);
</span><span class="cx"> }
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">     return offset;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, unsigned from, unsigned to) const
</del><ins>+float Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     if (to &lt; 0)
</span><span class="cx">         to = run.length();
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">     return widthOfDrawnText;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRun&amp; /* run */, const AtomicString&amp; /* mark */, const FloatPoint&amp; /* point */, unsigned /* from */, unsigned /* to */) const
</del><ins>+void Font::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRun&amp; /* run */, const AtomicString&amp; /* mark */, const FloatPoint&amp; /* point */, int /* from */, int /* to */) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="lines">@@ -321,7 +321,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FloatRect Font::selectionRectForComplexText(const TextRun&amp; run, const FloatPoint&amp; pt,
</span><del>-    int h, unsigned from, unsigned to) const
</del><ins>+    int h, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     TextRunComponents components;
</span><span class="cx">     int w = generateComponents(&amp;components, *this, run);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx"> struct SameSizeAsInlineTextBox : public InlineBox {
</span><span class="cx">     unsigned variables[1];
</span><del>-    unsigned variables2[2];
</del><ins>+    unsigned short variables2[2];
</ins><span class="cx">     void* pointers[2];
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -196,26 +196,21 @@
</span><span class="cx">     return root().selectionHeight();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InlineTextBox::isSelected(unsigned startPos, unsigned endPos) const
</del><ins>+bool InlineTextBox::isSelected(int startPos, int endPos) const
</ins><span class="cx"> {
</span><del>-    unsigned sPos = startPos &gt; m_start ? startPos - m_start : 0;
-    if (endPos &lt;= m_start)
-        return false;
-    unsigned ePos = std::min(endPos - m_start, m_len);
-    return sPos &lt; ePos;
</del><ins>+    int sPos = std::max(startPos - m_start, 0);
+    int ePos = std::min(endPos - m_start, static_cast&lt;int&gt;(m_len));
+    return (sPos &lt; ePos);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderObject::SelectionState InlineTextBox::selectionState()
</span><span class="cx"> {
</span><span class="cx">     RenderObject::SelectionState state = renderer().selectionState();
</span><span class="cx">     if (state == RenderObject::SelectionStart || state == RenderObject::SelectionEnd || state == RenderObject::SelectionBoth) {
</span><del>-        int initialStartPos, initialEndPos;
-        renderer().selectionStartEnd(initialStartPos, initialEndPos);
-        ASSERT(initialStartPos &gt;= 0 &amp;&amp; initialEndPos &gt;= 0);
-        unsigned startPos = initialStartPos;
-        unsigned endPos = initialEndPos;
</del><ins>+        int startPos, endPos;
+        renderer().selectionStartEnd(startPos, endPos);
</ins><span class="cx">         // The position after a hard line break is considered to be past its end.
</span><del>-        unsigned lastSelectable = start() + len() - (isLineBreak() ? 1 : 0);
</del><ins>+        int lastSelectable = start() + len() - (isLineBreak() ? 1 : 0);
</ins><span class="cx"> 
</span><span class="cx">         bool start = (state != RenderObject::SelectionEnd &amp;&amp; startPos &gt;= m_start &amp;&amp; startPos &lt; m_start + m_len);
</span><span class="cx">         bool end = (state != RenderObject::SelectionStart &amp;&amp; endPos &gt; m_start &amp;&amp; endPos &lt;= lastSelectable);
</span><span class="lines">@@ -236,7 +231,7 @@
</span><span class="cx">     if (m_truncation != cNoTruncation &amp;&amp; root().ellipsisBox()) {
</span><span class="cx">         EllipsisBox* ellipsis = root().ellipsisBox();
</span><span class="cx">         if (state != RenderObject::SelectionNone) {
</span><del>-            unsigned start, end;
</del><ins>+            int start, end;
</ins><span class="cx">             selectionStartEnd(start, end);
</span><span class="cx">             // The ellipsis should be considered to be selected if the end of
</span><span class="cx">             // the selection is past the beginning of the truncation and the
</span><span class="lines">@@ -261,15 +256,11 @@
</span><span class="cx">     return style.font();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutRect InlineTextBox::localSelectionRect(unsigned startPos, unsigned endPos) const
</del><ins>+LayoutRect InlineTextBox::localSelectionRect(int startPos, int endPos) const
</ins><span class="cx"> {
</span><del>-    unsigned sPos = startPos &gt; m_start ? startPos - m_start : 0;
</del><ins>+    int sPos = std::max(startPos - m_start, 0);
+    int ePos = std::min(endPos - m_start, (int)m_len);
</ins><span class="cx">     
</span><del>-    if (endPos &lt; m_start)
-        return LayoutRect();
-
-    unsigned ePos = std::min(endPos - m_start, m_len);
-    
</del><span class="cx">     if (sPos &gt; ePos)
</span><span class="cx">         return LayoutRect();
</span><span class="cx"> 
</span><span class="lines">@@ -283,10 +274,12 @@
</span><span class="cx">     String hyphenatedStringBuffer;
</span><span class="cx">     bool respectHyphen = ePos == m_len &amp;&amp; hasHyphen();
</span><span class="cx">     TextRun textRun = constructTextRun(lineStyle, font, respectHyphen ? &amp;hyphenatedStringBuffer : 0);
</span><ins>+    if (respectHyphen)
+        endPos = textRun.length();
</ins><span class="cx"> 
</span><span class="cx">     LayoutRect selectionRect = LayoutRect(LayoutPoint(logicalLeft(), selectionTop), LayoutSize(m_logicalWidth, selectionHeight));
</span><span class="cx">     // Avoid computing the font width when the entire line box is selected as an optimization.
</span><del>-    if (sPos || ePos != m_len)
</del><ins>+    if (sPos || ePos != static_cast&lt;int&gt;(m_len))
</ins><span class="cx">         font.adjustSelectionRectForText(textRun, selectionRect, sPos, ePos);
</span><span class="cx">     IntRect snappedSelectionRect = enclosingIntRect(selectionRect);
</span><span class="cx">     LayoutUnit logicalWidth = snappedSelectionRect.width();
</span><span class="lines">@@ -603,16 +596,15 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // 2. Now paint the foreground, including text and decorations like underline/overline (in quirks mode only).
</span><del>-    unsigned length = m_len;
-    unsigned maximumLength;
</del><ins>+    int length = m_len;
+    int maximumLength;
</ins><span class="cx">     String string;
</span><span class="cx">     if (!combinedText) {
</span><span class="cx">         string = renderer().text();
</span><del>-        if (length != string.length() || m_start) {
-            ASSERT_WITH_SECURITY_IMPLICATION(m_start + length &lt;= string.length());
</del><ins>+        if (static_cast&lt;unsigned&gt;(length) != string.length() || m_start) {
+            ASSERT_WITH_SECURITY_IMPLICATION(static_cast&lt;unsigned&gt;(m_start + length) &lt;= string.length());
</ins><span class="cx">             string = string.substringSharingImpl(m_start, length);
</span><span class="cx">         }
</span><del>-        ASSERT(renderer().textLength() &gt;= m_start);
</del><span class="cx">         maximumLength = renderer().textLength() - m_start;
</span><span class="cx">     } else {
</span><span class="cx">         combinedText-&gt;getStringToRender(m_start, string, length);
</span><span class="lines">@@ -624,14 +616,14 @@
</span><span class="cx">     if (hasHyphen())
</span><span class="cx">         length = textRun.length();
</span><span class="cx"> 
</span><del>-    unsigned sPos = 0;
-    unsigned ePos = 0;
</del><ins>+    int sPos = 0;
+    int ePos = 0;
</ins><span class="cx">     if (haveSelection &amp;&amp; (paintSelectedTextOnly || paintSelectedTextSeparately))
</span><span class="cx">         selectionStartEnd(sPos, ePos);
</span><span class="cx"> 
</span><span class="cx">     if (m_truncation != cNoTruncation) {
</span><del>-        sPos = std::min(sPos, m_truncation);
-        ePos = std::min(ePos, m_truncation);
</del><ins>+        sPos = std::min&lt;int&gt;(sPos, m_truncation);
+        ePos = std::min&lt;int&gt;(ePos, m_truncation);
</ins><span class="cx">         length = m_truncation;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -691,27 +683,22 @@
</span><span class="cx">         context-&gt;concatCTM(rotation(boxRect, Counterclockwise));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InlineTextBox::selectionStartEnd(unsigned&amp; sPos, unsigned&amp; ePos)
</del><ins>+void InlineTextBox::selectionStartEnd(int&amp; sPos, int&amp; ePos)
</ins><span class="cx"> {
</span><del>-    unsigned startPos, endPos;
</del><ins>+    int startPos, endPos;
</ins><span class="cx">     if (renderer().selectionState() == RenderObject::SelectionInside) {
</span><span class="cx">         startPos = 0;
</span><span class="cx">         endPos = renderer().textLength();
</span><span class="cx">     } else {
</span><del>-        int originalStartPos, originalEndPos;
-        renderer().selectionStartEnd(originalStartPos, originalEndPos);
-        ASSERT(originalStartPos &gt;= 0 &amp;&amp; originalEndPos &gt;= 0);
-        startPos = originalStartPos;
-        endPos = originalEndPos;
</del><ins>+        renderer().selectionStartEnd(startPos, endPos);
</ins><span class="cx">         if (renderer().selectionState() == RenderObject::SelectionStart)
</span><span class="cx">             endPos = renderer().textLength();
</span><span class="cx">         else if (renderer().selectionState() == RenderObject::SelectionEnd)
</span><span class="cx">             startPos = 0;
</span><span class="cx">     }
</span><del>-    
-    sPos = startPos &gt; m_start ? startPos - m_start : 0;
-    ePos = endPos &gt; m_start ? endPos - m_start : 0;
-    ePos = std::min(ePos, m_len);
</del><ins>+
+    sPos = std::max(startPos - m_start, 0);
+    ePos = std::min(endPos - m_start, (int)m_len);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InlineTextBox::paintSelection(GraphicsContext* context, const FloatPoint&amp; boxOrigin, const RenderStyle&amp; style, const Font&amp; font, Color textColor)
</span><span class="lines">@@ -721,7 +708,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // See if we have a selection to paint at all.
</span><del>-    unsigned sPos, ePos;
</del><ins>+    int sPos, ePos;
</ins><span class="cx">     selectionStartEnd(sPos, ePos);
</span><span class="cx">     if (sPos &gt;= ePos)
</span><span class="cx">         return;
</span><span class="lines">@@ -740,15 +727,14 @@
</span><span class="cx">     
</span><span class="cx">     // If the text is truncated, let the thing being painted in the truncation
</span><span class="cx">     // draw its own highlight.
</span><del>-    unsigned length = m_truncation != cNoTruncation ? m_truncation : m_len;
</del><ins>+    int length = m_truncation != cNoTruncation ? m_truncation : m_len;
</ins><span class="cx">     String string = renderer().text();
</span><span class="cx"> 
</span><del>-    if (string.length() != length || m_start) {
-        ASSERT_WITH_SECURITY_IMPLICATION(m_start + length &lt;= string.length());
</del><ins>+    if (string.length() != static_cast&lt;unsigned&gt;(length) || m_start) {
+        ASSERT_WITH_SECURITY_IMPLICATION(static_cast&lt;unsigned&gt;(m_start + length) &lt;= string.length());
</ins><span class="cx">         string = string.substringSharingImpl(m_start, length);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ASSERT(renderer().textLength() &gt;= m_start);
</del><span class="cx">     String hyphenatedStringBuffer;
</span><span class="cx">     bool respectHyphen = ePos == length &amp;&amp; hasHyphen();
</span><span class="cx">     TextRun textRun = constructTextRun(style, font, string, renderer().textLength() - m_start, respectHyphen ? &amp;hyphenatedStringBuffer : nullptr);
</span><span class="lines">@@ -774,12 +760,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InlineTextBox::paintCompositionBackground(GraphicsContext* context, const FloatPoint&amp; boxOrigin, const RenderStyle&amp; style, const Font&amp; font, unsigned startPos, unsigned endPos)
</del><ins>+void InlineTextBox::paintCompositionBackground(GraphicsContext* context, const FloatPoint&amp; boxOrigin, const RenderStyle&amp; style, const Font&amp; font, int startPos, int endPos)
</ins><span class="cx"> {
</span><del>-    unsigned offset = m_start;
-    unsigned sPos = startPos &gt; offset ? startPos - offset : 0;
-    ASSERT(endPos &gt;= offset);
-    unsigned ePos = std::min(endPos - offset, m_len);
</del><ins>+    int offset = m_start;
+    int sPos = std::max(startPos - offset, 0);
+    int ePos = std::min(endPos - offset, (int)m_len);
</ins><span class="cx"> 
</span><span class="cx">     if (sPos &gt;= ePos)
</span><span class="cx">         return;
</span><span class="lines">@@ -1118,7 +1103,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Determine whether we need to measure text
</span><span class="cx">     bool markerSpansWholeBox = true;
</span><del>-    if (m_start &lt;= marker-&gt;startOffset())
</del><ins>+    if (m_start &lt;= (int)marker-&gt;startOffset())
</ins><span class="cx">         markerSpansWholeBox = false;
</span><span class="cx">     if ((end() + 1) != marker-&gt;endOffset()) // end points at the last char, not past it
</span><span class="cx">         markerSpansWholeBox = false;
</span><span class="lines">@@ -1127,12 +1112,11 @@
</span><span class="cx"> 
</span><span class="cx">     bool isDictationMarker = marker-&gt;type() == DocumentMarker::DictationAlternatives;
</span><span class="cx">     if (!markerSpansWholeBox || grammar || isDictationMarker) {
</span><del>-        unsigned startPosition = marker-&gt;startOffset() &gt; m_start ? marker-&gt;startOffset() - m_start : 0;
-        ASSERT(marker-&gt;endOffset() &gt;= m_start);
-        unsigned endPosition = std::min(marker-&gt;endOffset() - m_start, m_len);
</del><ins>+        int startPosition = std::max&lt;int&gt;(marker-&gt;startOffset() - m_start, 0);
+        int endPosition = std::min&lt;int&gt;(marker-&gt;endOffset() - m_start, m_len);
</ins><span class="cx">         
</span><span class="cx">         if (m_truncation != cNoTruncation)
</span><del>-            endPosition = std::min(endPosition, m_truncation);
</del><ins>+            endPosition = std::min&lt;int&gt;(endPosition, m_truncation);
</ins><span class="cx"> 
</span><span class="cx">         // Calculate start &amp; width
</span><span class="cx">         int deltaY = renderer().style().isFlippedLinesWritingMode() ? selectionBottom() - logicalBottom() : logicalTop() - selectionTop();
</span><span class="lines">@@ -1179,9 +1163,8 @@
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit selectionHeight = this-&gt;selectionHeight();
</span><span class="cx"> 
</span><del>-    unsigned sPos = marker-&gt;startOffset() &gt; m_start ? marker-&gt;startOffset() - m_start : 0;
-    ASSERT(marker-&gt;endOffset() &gt;= m_start);
-    unsigned ePos = std::min(marker-&gt;endOffset() - m_start, m_len);
</del><ins>+    int sPos = std::max(marker-&gt;startOffset() - m_start, (unsigned)0);
+    int ePos = std::min(marker-&gt;endOffset() - m_start, (unsigned)m_len);
</ins><span class="cx">     TextRun run = constructTextRun(style, font);
</span><span class="cx"> 
</span><span class="cx">     // Always compute and store the rect associated with this marker. The computed rect is in absolute coordinates.
</span><span class="lines">@@ -1213,9 +1196,8 @@
</span><span class="cx">     LayoutUnit top = selectionTop();
</span><span class="cx">     LayoutUnit h = selectionHeight();
</span><span class="cx">     
</span><del>-    unsigned sPos = marker-&gt;startOffset() &gt; m_start ? marker-&gt;startOffset() - m_start : 0;
-    ASSERT(marker-&gt;endOffset() &gt;= m_start);
-    unsigned ePos = std::min(marker-&gt;endOffset() - m_start, m_len);
</del><ins>+    int sPos = std::max(marker-&gt;startOffset() - m_start, (unsigned)0);
+    int ePos = std::min(marker-&gt;endOffset() - m_start, (unsigned)m_len);
</ins><span class="cx">     TextRun run = constructTextRun(style, font);
</span><span class="cx"> 
</span><span class="cx">     // Compute and store the rect associated with this marker.
</span><span class="lines">@@ -1322,11 +1304,11 @@
</span><span class="cx">         start = renderer().width(m_start, paintStart - m_start, textPos(), isFirstLine());
</span><span class="cx">     }
</span><span class="cx">     if (paintEnd != underline.endOffset) {      // end points at the last char, not past it
</span><del>-        paintEnd = std::min(paintEnd, underline.endOffset);
</del><ins>+        paintEnd = std::min(paintEnd, (unsigned)underline.endOffset);
</ins><span class="cx">         useWholeWidth = false;
</span><span class="cx">     }
</span><span class="cx">     if (m_truncation != cNoTruncation) {
</span><del>-        paintEnd = std::min(paintEnd, m_start + m_truncation);
</del><ins>+        paintEnd = std::min(paintEnd, (unsigned)m_start + m_truncation);
</ins><span class="cx">         useWholeWidth = false;
</span><span class="cx">     }
</span><span class="cx">     if (!useWholeWidth) {
</span><span class="lines">@@ -1387,7 +1369,7 @@
</span><span class="cx">     return font.offsetForPosition(constructTextRun(lineStyle, font), lineOffset - logicalLeft(), includePartialGlyphs);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float InlineTextBox::positionForOffset(unsigned offset) const
</del><ins>+float InlineTextBox::positionForOffset(int offset) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(offset &gt;= m_start);
</span><span class="cx">     ASSERT(offset &lt;= m_start + m_len);
</span><span class="lines">@@ -1399,8 +1381,8 @@
</span><span class="cx"> 
</span><span class="cx">     const RenderStyle&amp; lineStyle = this-&gt;lineStyle();
</span><span class="cx">     const Font&amp; font = fontToUse(lineStyle, renderer());
</span><del>-    unsigned from = !isLeftToRightDirection() ? offset - m_start : 0;
-    unsigned to = !isLeftToRightDirection() ? m_len : offset - m_start;
</del><ins>+    int from = !isLeftToRightDirection() ? offset - m_start : 0;
+    int to = !isLeftToRightDirection() ? m_len : offset - m_start;
</ins><span class="cx">     // FIXME: Do we need to add rightBearing here?
</span><span class="cx">     LayoutRect selectionRect = LayoutRect(logicalLeft(), 0, 0, 0);
</span><span class="cx">     TextRun run = constructTextRun(lineStyle, font);
</span><span class="lines">@@ -1418,8 +1400,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (string.length() != length || startPos)
</span><span class="cx">         string = string.substringSharingImpl(startPos, length);
</span><del>-    
-    ASSERT(renderer().textLength() &gt;= startPos);
</del><ins>+
</ins><span class="cx">     return constructTextRun(style, font, string, renderer().textLength() - startPos, hyphenatedStringBuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -33,8 +33,8 @@
</span><span class="cx"> class DocumentMarker;
</span><span class="cx"> class TextPainter;
</span><span class="cx"> 
</span><del>-const unsigned cNoTruncation = std::numeric_limits&lt;unsigned&gt;::max();
-const unsigned cFullTruncation = std::numeric_limits&lt;unsigned&gt;::max() - 1;
</del><ins>+const unsigned short cNoTruncation = USHRT_MAX;
+const unsigned short cFullTruncation = USHRT_MAX - 1;
</ins><span class="cx"> 
</span><span class="cx"> class InlineTextBox : public InlineBox {
</span><span class="cx"> public:
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> 
</span><span class="cx">     void offsetRun(int d) { ASSERT(!isDirty()); m_start += d; }
</span><span class="cx"> 
</span><del>-    unsigned truncation() const { return m_truncation; }
</del><ins>+    unsigned short truncation() const { return m_truncation; }
</ins><span class="cx"> 
</span><span class="cx">     virtual void markDirty(bool dirty = true) override final;
</span><span class="cx"> 
</span><span class="lines">@@ -110,9 +110,9 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual FloatRect calculateBoundaries() const { return FloatRect(x(), y(), width(), height()); }
</span><span class="cx"> 
</span><del>-    virtual LayoutRect localSelectionRect(unsigned startPos, unsigned endPos) const;
-    bool isSelected(unsigned startPos, unsigned endPos) const;
-    void selectionStartEnd(unsigned&amp; sPos, unsigned&amp; ePos);
</del><ins>+    virtual LayoutRect localSelectionRect(int startPos, int endPos) const;
+    bool isSelected(int startPos, int endPos) const;
+    void selectionStartEnd(int&amp; sPos, int&amp; ePos);
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     virtual void paint(PaintInfo&amp;, const LayoutPoint&amp;, LayoutUnit lineTop, LayoutUnit lineBottom);
</span><span class="lines">@@ -152,13 +152,13 @@
</span><span class="cx"> 
</span><span class="cx"> public:
</span><span class="cx">     virtual int offsetForPosition(float x, bool includePartialGlyphs = true) const;
</span><del>-    virtual float positionForOffset(unsigned offset) const;
</del><ins>+    virtual float positionForOffset(int offset) const;
</ins><span class="cx"> 
</span><span class="cx">     // Needs to be public, so the static paintTextWithShadows() function can use it.
</span><span class="cx">     static FloatSize applyShadowToGraphicsContext(GraphicsContext*, const ShadowData*, const FloatRect&amp; textRect, bool stroked, bool opaque, bool horizontal);
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    void paintCompositionBackground(GraphicsContext*, const FloatPoint&amp; boxOrigin, const RenderStyle&amp;, const Font&amp;, unsigned startPos, unsigned endPos);
</del><ins>+    void paintCompositionBackground(GraphicsContext*, const FloatPoint&amp; boxOrigin, const RenderStyle&amp;, const Font&amp;, int startPos, int endPos);
</ins><span class="cx">     void paintDocumentMarkers(GraphicsContext*, const FloatPoint&amp; boxOrigin, const RenderStyle&amp;, const Font&amp;, bool background);
</span><span class="cx">     void paintCompositionUnderline(GraphicsContext*, const FloatPoint&amp; boxOrigin, const CompositionUnderline&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -181,12 +181,12 @@
</span><span class="cx">     InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderObject
</span><span class="cx">     InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObject
</span><span class="cx"> 
</span><del>-    unsigned m_start;
-    unsigned m_len;
</del><ins>+    int m_start;
+    unsigned short m_len;
</ins><span class="cx"> 
</span><span class="cx">     // Where to truncate when text overflow is applied. We use special constants to
</span><span class="cx">     // denote no truncation (the whole run paints) and full truncation (nothing paints at all).
</span><del>-    unsigned m_truncation;
</del><ins>+    unsigned short m_truncation;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> INLINE_BOX_OBJECT_TYPE_CASTS(InlineTextBox, isInlineTextBox())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCombineTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCombineText.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCombineText.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/RenderCombineText.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -72,8 +72,9 @@
</span><span class="cx">         textOrigin.move(boxRect.height() / 2 - ceilf(m_combinedTextWidth) / 2, style().font().pixelSize());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderCombineText::getStringToRender(unsigned start, String&amp; string, unsigned&amp; length) const
</del><ins>+void RenderCombineText::getStringToRender(int start, String&amp; string, int&amp; length) const
</ins><span class="cx"> {
</span><ins>+    ASSERT(start &gt;= 0);
</ins><span class="cx">     if (m_isCombined) {
</span><span class="cx">         string = originalText();
</span><span class="cx">         length = string.length();
</span><span class="lines">@@ -81,7 +82,7 @@
</span><span class="cx">     }
</span><span class="cx">  
</span><span class="cx">     string = text();
</span><del>-    string = string.substringSharingImpl(start, length);
</del><ins>+    string = string.substringSharingImpl(static_cast&lt;unsigned&gt;(start), length);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderCombineText::combineText()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCombineTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCombineText.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCombineText.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/RenderCombineText.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> 
</span><span class="cx">     void combineText();
</span><span class="cx">     void adjustTextOrigin(FloatPoint&amp; textOrigin, const FloatRect&amp; boxRect) const;
</span><del>-    void getStringToRender(unsigned, String&amp;, unsigned&amp; length) const;
</del><ins>+    void getStringToRender(int, String&amp;, int&amp; length) const;
</ins><span class="cx">     bool isCombined() const { return m_isCombined; }
</span><span class="cx">     float combinedTextWidth(const Font&amp; font) const { return font.size(); }
</span><span class="cx">     const Font&amp; originalFont() const { return parent()-&gt;style().font(); }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextLineBoxescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx"> 
</span><span class="cx"> static IntRect ellipsisRectForBox(const InlineTextBox&amp; box, unsigned start, unsigned end)
</span><span class="cx"> {
</span><del>-    unsigned truncation = box.truncation();
</del><ins>+    unsigned short truncation = box.truncation();
</ins><span class="cx">     if (truncation == cNoTruncation)
</span><span class="cx">         return IntRect();
</span><span class="cx"> 
</span><span class="lines">@@ -473,9 +473,8 @@
</span><span class="cx">         return IntRect();
</span><span class="cx">     
</span><span class="cx">     IntRect rect;
</span><del>-    unsigned ellipsisStartPosition = start &gt; box.start() ? start - box.start() : 0;
-    ASSERT(end &gt;= box.start());
-    unsigned ellipsisEndPosition = std::min(end - box.start(), box.len());
</del><ins>+    int ellipsisStartPosition = std::max&lt;int&gt;(start - box.start(), 0);
+    int ellipsisEndPosition = std::min&lt;int&gt;(end - box.start(), box.len());
</ins><span class="cx">     
</span><span class="cx">     // The ellipsis should be considered to be selected if the end of
</span><span class="cx">     // the selection is past the beginning of the truncation and the
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -106,8 +106,8 @@
</span><span class="cx">             if (markerStartPosition &gt;= markerEndPosition)
</span><span class="cx">                 continue;
</span><span class="cx"> 
</span><del>-            unsigned fragmentStartPosition = 0;
-            unsigned fragmentEndPosition = 0;
</del><ins>+            int fragmentStartPosition = 0;
+            int fragmentEndPosition = 0;
</ins><span class="cx"> 
</span><span class="cx">             const Vector&lt;SVGTextFragment&gt;&amp; fragments = textBox-&gt;textFragments();
</span><span class="cx">             unsigned textFragmentsSize = fragments.size();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">     return fragment.characterOffset - start() + renderer().scaledFont().offsetForPosition(textRun, position * scalingFactor, includePartialGlyphs);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float SVGInlineTextBox::positionForOffset(unsigned) const
</del><ins>+float SVGInlineTextBox::positionForOffset(int) const
</ins><span class="cx"> {
</span><span class="cx">     // SVG doesn't use the offset &lt;-&gt; position selection system. 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="lines">@@ -137,15 +137,11 @@
</span><span class="cx">     return snappedSelectionRect;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutRect SVGInlineTextBox::localSelectionRect(unsigned startPosition, unsigned endPosition) const
</del><ins>+LayoutRect SVGInlineTextBox::localSelectionRect(int startPosition, int endPosition) const
</ins><span class="cx"> {
</span><del>-    unsigned boxStart = start();
-    startPosition = startPosition &gt; boxStart ? startPosition - boxStart : 0;
-
-    if (endPosition &lt; boxStart)
-        return LayoutRect();
-
-    endPosition = std::min(endPosition - boxStart, len());
</del><ins>+    int boxStart = start();
+    startPosition = std::max(startPosition - boxStart, 0);
+    endPosition = std::min(endPosition - boxStart, static_cast&lt;int&gt;(len()));
</ins><span class="cx">     if (startPosition &gt;= endPosition)
</span><span class="cx">         return LayoutRect();
</span><span class="cx"> 
</span><span class="lines">@@ -153,8 +149,8 @@
</span><span class="cx"> 
</span><span class="cx">     AffineTransform fragmentTransform;
</span><span class="cx">     FloatRect selectionRect;
</span><del>-    unsigned fragmentStartPosition = 0;
-    unsigned fragmentEndPosition = 0;
</del><ins>+    int fragmentStartPosition = 0;
+    int fragmentEndPosition = 0;
</ins><span class="cx"> 
</span><span class="cx">     unsigned textFragmentsSize = m_textFragments.size();
</span><span class="cx">     for (unsigned i = 0; i &lt; textFragmentsSize; ++i) {
</span><span class="lines">@@ -217,11 +213,11 @@
</span><span class="cx">             selectionStyle = &amp;style;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    unsigned startPosition, endPosition;
</del><ins>+    int startPosition, endPosition;
</ins><span class="cx">     selectionStartEnd(startPosition, endPosition);
</span><span class="cx"> 
</span><del>-    unsigned fragmentStartPosition = 0;
-    unsigned fragmentEndPosition = 0;
</del><ins>+    int fragmentStartPosition = 0;
+    int fragmentEndPosition = 0;
</ins><span class="cx">     AffineTransform fragmentTransform;
</span><span class="cx">     unsigned textFragmentsSize = m_textFragments.size();
</span><span class="cx">     for (unsigned i = 0; i &lt; textFragmentsSize; ++i) {
</span><span class="lines">@@ -444,24 +440,21 @@
</span><span class="cx">     return run;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment&amp; fragment, unsigned&amp; startPosition, unsigned&amp; endPosition) const
</del><ins>+bool SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment&amp; fragment, int&amp; startPosition, int&amp; endPosition) const
</ins><span class="cx"> {
</span><span class="cx">     if (startPosition &gt;= endPosition)
</span><span class="cx">         return false;
</span><del>-    
-    ASSERT(fragment.characterOffset &gt;= start());
-    unsigned offset = fragment.characterOffset - start();
-    unsigned length = fragment.length;
</del><span class="cx"> 
</span><ins>+    int offset = static_cast&lt;int&gt;(fragment.characterOffset) - start();
+    int length = static_cast&lt;int&gt;(fragment.length);
+
</ins><span class="cx">     if (startPosition &gt;= offset + length || endPosition &lt;= offset)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (startPosition &lt; offset)
</span><span class="cx">         startPosition = 0;
</span><del>-    else {
-        ASSERT(startPosition &gt;= offset);
</del><ins>+    else
</ins><span class="cx">         startPosition -= offset;
</span><del>-    }
</del><span class="cx"> 
</span><span class="cx">     if (endPosition &gt; offset + length)
</span><span class="cx">         endPosition = length;
</span><span class="lines">@@ -633,8 +626,8 @@
</span><span class="cx">     ASSERT(style);
</span><span class="cx">     ASSERT(selectionStyle);
</span><span class="cx"> 
</span><del>-    unsigned startPosition = 0;
-    unsigned endPosition = 0;
</del><ins>+    int startPosition = 0;
+    int endPosition = 0;
</ins><span class="cx">     if (hasSelection) {
</span><span class="cx">         selectionStartEnd(startPosition, endPosition);
</span><span class="cx">         hasSelection = mapStartEndPositionsIntoFragmentCoordinates(fragment, startPosition, endPosition);
</span><span class="lines">@@ -662,7 +655,7 @@
</span><span class="cx">         SVGResourcesCache::clientStyleChanged(parent()-&gt;renderer(), StyleDifferenceRepaint, *style);
</span><span class="cx"> 
</span><span class="cx">     // Eventually draw text using regular style from the end position of the selection to the end of the current chunk part
</span><del>-    if (endPosition &lt; fragment.length &amp;&amp; !paintSelectedTextOnly)
</del><ins>+    if (endPosition &lt; static_cast&lt;int&gt;(fragment.length) &amp;&amp; !paintSelectedTextOnly)
</ins><span class="cx">         paintTextWithShadows(context, style, textRun, fragment, endPosition, fragment.length);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -43,13 +43,13 @@
</span><span class="cx">     virtual int selectionTop() { return top(); }
</span><span class="cx">     virtual int selectionHeight() { return static_cast&lt;int&gt;(ceilf(m_logicalHeight)); }
</span><span class="cx">     virtual int offsetForPosition(float x, bool includePartialGlyphs = true) const;
</span><del>-    virtual float positionForOffset(unsigned offset) const;
</del><ins>+    virtual float positionForOffset(int offset) const;
</ins><span class="cx"> 
</span><span class="cx">     void paintSelectionBackground(PaintInfo&amp;);
</span><span class="cx">     virtual void paint(PaintInfo&amp;, const LayoutPoint&amp;, LayoutUnit lineTop, LayoutUnit lineBottom);
</span><del>-    virtual LayoutRect localSelectionRect(unsigned startPosition, unsigned endPosition) const override;
</del><ins>+    virtual LayoutRect localSelectionRect(int startPosition, int endPosition) const override;
</ins><span class="cx"> 
</span><del>-    bool mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment&amp;, unsigned&amp; startPosition, unsigned&amp; endPosition) const;
</del><ins>+    bool mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment&amp;, int&amp; startPosition, int&amp; endPosition) const;
</ins><span class="cx"> 
</span><span class="cx">     virtual FloatRect calculateBoundaries() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextMetricsBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</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; 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; int(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 (m_textPosition &gt;= m_run.charactersLength())
</del><ins>+    if (int(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="trunkSourceWebCorerenderingsvgSVGTextQuerycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -133,15 +133,13 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates(Data* queryData, const SVGTextFragment&amp; fragment, unsigned&amp; startPosition, unsigned&amp; endPosition) const
</del><ins>+bool SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates(Data* queryData, const SVGTextFragment&amp; fragment, int&amp; startPosition, int&amp; endPosition) const
</ins><span class="cx"> {
</span><span class="cx">     // Reuse the same logic used for text selection &amp; painting, to map our query start/length into start/endPositions of the current text fragment.
</span><del>-    ASSERT(startPosition &gt;= queryData-&gt;processedCharacters);
-    ASSERT(endPosition &gt;= queryData-&gt;processedCharacters);
</del><span class="cx">     startPosition -= queryData-&gt;processedCharacters;
</span><span class="cx">     endPosition -= queryData-&gt;processedCharacters;
</span><span class="cx"> 
</span><del>-    if (startPosition &gt;= endPosition)
</del><ins>+    if (startPosition &gt;= endPosition || startPosition &lt; 0 || endPosition &lt; 0)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     modifyStartEndPositionsRespectingLigatures(queryData, startPosition, endPosition);
</span><span class="lines">@@ -152,7 +150,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SVGTextQuery::modifyStartEndPositionsRespectingLigatures(Data* queryData, unsigned&amp; startPosition, unsigned&amp; endPosition) const
</del><ins>+void SVGTextQuery::modifyStartEndPositionsRespectingLigatures(Data* queryData, int&amp; startPosition, int&amp; endPosition) const
</ins><span class="cx"> {
</span><span class="cx">     SVGTextLayoutAttributes* layoutAttributes = queryData-&gt;textRenderer-&gt;layoutAttributes();
</span><span class="cx">     Vector&lt;SVGTextMetrics&gt;&amp; textMetricsValues = layoutAttributes-&gt;textMetricsValues();
</span><span class="lines">@@ -183,21 +181,21 @@
</span><span class="cx">             break;
</span><span class="cx"> 
</span><span class="cx">         // If the start position maps to a character in the metrics list, we don't need to modify it.
</span><del>-        if (startPosition == positionOffset)
</del><ins>+        if (startPosition == static_cast&lt;int&gt;(positionOffset))
</ins><span class="cx">             alterStartPosition = false;
</span><span class="cx"> 
</span><span class="cx">         // If the start position maps to a character in the metrics list, we don't need to modify it.
</span><del>-        if (endPosition == positionOffset)
</del><ins>+        if (endPosition == static_cast&lt;int&gt;(positionOffset))
</ins><span class="cx">             alterEndPosition = false;
</span><span class="cx"> 
</span><span class="cx">         // Detect ligatures.
</span><span class="cx">         if (lastPositionOffset != -1 &amp;&amp; lastPositionOffset - positionOffset &gt; 1) {
</span><del>-            if (alterStartPosition &amp;&amp; startPosition &gt; static_cast&lt;unsigned&gt;(lastPositionOffset) &amp;&amp; startPosition &lt; positionOffset) {
</del><ins>+            if (alterStartPosition &amp;&amp; startPosition &gt; lastPositionOffset &amp;&amp; startPosition &lt; static_cast&lt;int&gt;(positionOffset)) {
</ins><span class="cx">                 startPosition = lastPositionOffset;
</span><span class="cx">                 alterStartPosition = false;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            if (alterEndPosition &amp;&amp; endPosition &gt; static_cast&lt;unsigned&gt;(lastPositionOffset) &amp;&amp; endPosition &lt; positionOffset) {
</del><ins>+            if (alterEndPosition &amp;&amp; endPosition &gt; lastPositionOffset &amp;&amp; endPosition &lt; static_cast&lt;int&gt;(positionOffset)) {
</ins><span class="cx">                 endPosition = positionOffset;
</span><span class="cx">                 alterEndPosition = false;
</span><span class="cx">             }
</span><span class="lines">@@ -214,12 +212,12 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (lastPositionOffset != -1 &amp;&amp; lastPositionOffset - positionOffset &gt; 1) {
</span><del>-        if (alterStartPosition &amp;&amp; startPosition &gt; static_cast&lt;unsigned&gt;(lastPositionOffset) &amp;&amp; startPosition &lt; positionOffset) {
</del><ins>+        if (alterStartPosition &amp;&amp; startPosition &gt; lastPositionOffset &amp;&amp; startPosition &lt; static_cast&lt;int&gt;(positionOffset)) {
</ins><span class="cx">             startPosition = lastPositionOffset;
</span><span class="cx">             alterStartPosition = false;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (alterEndPosition &amp;&amp; endPosition &gt; static_cast&lt;unsigned&gt;(lastPositionOffset) &amp;&amp; endPosition &lt; positionOffset) {
</del><ins>+        if (alterEndPosition &amp;&amp; endPosition &gt; lastPositionOffset &amp;&amp; endPosition &lt; static_cast&lt;int&gt;(positionOffset)) {
</ins><span class="cx">             endPosition = positionOffset;
</span><span class="cx">             alterEndPosition = false;
</span><span class="cx">         }
</span><span class="lines">@@ -289,8 +287,8 @@
</span><span class="cx"> {
</span><span class="cx">     SubStringLengthData* data = static_cast&lt;SubStringLengthData*&gt;(queryData);
</span><span class="cx"> 
</span><del>-    unsigned startPosition = data-&gt;startPosition;
-    unsigned endPosition = startPosition + data-&gt;length;
</del><ins>+    int startPosition = data-&gt;startPosition;
+    int endPosition = startPosition + data-&gt;length;
</ins><span class="cx">     if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -324,8 +322,8 @@
</span><span class="cx"> {
</span><span class="cx">     StartPositionOfCharacterData* data = static_cast&lt;StartPositionOfCharacterData*&gt;(queryData);
</span><span class="cx"> 
</span><del>-    unsigned startPosition = data-&gt;position;
-    unsigned endPosition = startPosition + 1;
</del><ins>+    int startPosition = data-&gt;position;
+    int endPosition = startPosition + 1;
</ins><span class="cx">     if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -373,8 +371,8 @@
</span><span class="cx"> {
</span><span class="cx">     EndPositionOfCharacterData* data = static_cast&lt;EndPositionOfCharacterData*&gt;(queryData);
</span><span class="cx"> 
</span><del>-    unsigned startPosition = data-&gt;position;
-    unsigned endPosition = startPosition + 1;
</del><ins>+    int startPosition = data-&gt;position;
+    int endPosition = startPosition + 1;
</ins><span class="cx">     if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -421,8 +419,8 @@
</span><span class="cx"> {
</span><span class="cx">     RotationOfCharacterData* data = static_cast&lt;RotationOfCharacterData*&gt;(queryData);
</span><span class="cx"> 
</span><del>-    unsigned startPosition = data-&gt;position;
-    unsigned endPosition = startPosition + 1;
</del><ins>+    int startPosition = data-&gt;position;
+    int endPosition = startPosition + 1;
</ins><span class="cx">     if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -489,8 +487,8 @@
</span><span class="cx"> {
</span><span class="cx">     ExtentOfCharacterData* data = static_cast&lt;ExtentOfCharacterData*&gt;(queryData);
</span><span class="cx"> 
</span><del>-    unsigned startPosition = data-&gt;position;
-    unsigned endPosition = startPosition + 1;
</del><ins>+    int startPosition = data-&gt;position;
+    int endPosition = startPosition + 1;
</ins><span class="cx">     if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -524,8 +522,8 @@
</span><span class="cx"> 
</span><span class="cx">     FloatRect extent;
</span><span class="cx">     for (unsigned i = 0; i &lt; fragment.length; ++i) {
</span><del>-        unsigned startPosition = data-&gt;processedCharacters + i;
-        unsigned endPosition = startPosition + 1;
</del><ins>+        int startPosition = data-&gt;processedCharacters + i;
+        int endPosition = startPosition + 1;
</ins><span class="cx">         if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
</span><span class="cx">             continue;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextQueryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextQuery.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextQuery.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/svg/SVGTextQuery.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -52,8 +52,8 @@
</span><span class="cx">     bool executeQuery(Data*, ProcessTextFragmentCallback) const;
</span><span class="cx"> 
</span><span class="cx">     void collectTextBoxesInFlowBox(InlineFlowBox*);
</span><del>-    bool mapStartEndPositionsIntoFragmentCoordinates(Data*, const SVGTextFragment&amp;, unsigned&amp; startPosition, unsigned&amp; endPosition) const;
-    void modifyStartEndPositionsRespectingLigatures(Data*, unsigned&amp; startPosition, unsigned&amp; endPosition) const;
</del><ins>+    bool mapStartEndPositionsIntoFragmentCoordinates(Data*, const SVGTextFragment&amp;, int&amp; startPosition, int&amp; endPosition) const;
+    void modifyStartEndPositionsRespectingLigatures(Data*, int&amp; startPosition, int&amp; endPosition) const;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     bool numberOfCharactersCallback(Data*, const SVGTextFragment&amp;) const;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextRunRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> 
</span><span class="cx"> class SVGGlyphToPathTranslator final : public GlyphToPathTranslator {
</span><span class="cx"> public:
</span><del>-    SVGGlyphToPathTranslator(const TextRun* const, const GlyphBuffer&amp;, const FloatPoint&amp;, const SVGFontData&amp;, SVGFontElement&amp;, unsigned from, unsigned numGlyphs, float scale, bool isVerticalText);
</del><ins>+    SVGGlyphToPathTranslator(const TextRun* const, const GlyphBuffer&amp;, const FloatPoint&amp;, const SVGFontData&amp;, SVGFontElement&amp;, const int from, const int numGlyphs, float scale, bool isVerticalText);
</ins><span class="cx"> private:
</span><span class="cx">     virtual bool containsMorePaths() override
</span><span class="cx">     {
</span><span class="lines">@@ -123,15 +123,15 @@
</span><span class="cx">     FloatPoint m_currentPoint;
</span><span class="cx">     FloatPoint m_glyphOrigin;
</span><span class="cx">     SVGGlyph m_svgGlyph;
</span><del>-    unsigned m_index;
</del><ins>+    int m_index;
</ins><span class="cx">     Glyph m_glyph;
</span><span class="cx">     SVGFontElement&amp; m_fontElement;
</span><del>-    const unsigned m_stoppingPoint;
</del><ins>+    const float m_stoppingPoint;
</ins><span class="cx">     const float m_scale;
</span><span class="cx">     const bool m_isVerticalText;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-SVGGlyphToPathTranslator::SVGGlyphToPathTranslator(const TextRun* const textRun, const GlyphBuffer&amp; glyphBuffer, const FloatPoint&amp; point, const SVGFontData&amp; svgFontData, SVGFontElement&amp; fontElement, unsigned from, unsigned numGlyphs, float scale, bool isVerticalText)
</del><ins>+SVGGlyphToPathTranslator::SVGGlyphToPathTranslator(const TextRun* const textRun, const GlyphBuffer&amp; glyphBuffer, const FloatPoint&amp; point, const SVGFontData&amp; svgFontData, SVGFontElement&amp; fontElement, const int from, const int numGlyphs, float scale, bool isVerticalText)
</ins><span class="cx">     : m_textRun(textRun)
</span><span class="cx">     , m_glyphBuffer(glyphBuffer)
</span><span class="cx">     , m_svgFontData(svgFontData)
</span><span class="lines">@@ -287,7 +287,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GlyphData SVGTextRunRenderingContext::glyphDataForCharacter(const Font&amp; font, WidthIterator&amp; iterator, UChar32 character, bool mirror, unsigned currentCharacter, unsigned&amp; advanceLength)
</del><ins>+GlyphData SVGTextRunRenderingContext::glyphDataForCharacter(const Font&amp; font, WidthIterator&amp; iterator, UChar32 character, bool mirror, int currentCharacter, unsigned&amp; advanceLength)
</ins><span class="cx"> {
</span><span class="cx">     const SimpleFontData* primaryFont = font.primaryFont();
</span><span class="cx">     ASSERT(primaryFont);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextRunRenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     RenderSVGResource* activePaintingResource() const { return m_activePaintingResource; }
</span><span class="cx">     void setActivePaintingResource(RenderSVGResource* object) { m_activePaintingResource = object; }
</span><span class="cx"> 
</span><del>-    virtual GlyphData glyphDataForCharacter(const Font&amp;, WidthIterator&amp;, UChar32 character, bool mirror, unsigned currentCharacter, unsigned&amp; advanceLength) override;
</del><ins>+    virtual GlyphData glyphDataForCharacter(const Font&amp;, WidthIterator&amp;, UChar32 character, bool mirror, int currentCharacter, unsigned&amp; advanceLength) override;
</ins><span class="cx">     virtual void drawSVGGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&amp;, int from, int to, const FloatPoint&amp;) const override;
</span><span class="cx">     virtual float floatWidthUsingSVGFont(const Font&amp;, const TextRun&amp;, int&amp; charsConsumed, String&amp; glyphName) const override;
</span><span class="cx">     virtual bool applySVGKerning(const SimpleFontData*, WidthIterator&amp;, GlyphBuffer*, int from) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontData.cpp (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontData.cpp        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/svg/SVGFontData.cpp        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -130,11 +130,11 @@
</span><span class="cx">     return svgGlyph.horizontalAdvanceX * scaleEmToUnits(fontSize, svgFontFaceElement-&gt;unitsPerEm());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGFontData::applySVGGlyphSelection(WidthIterator&amp; iterator, GlyphData&amp; glyphData, bool mirror, unsigned currentCharacter, unsigned&amp; advanceLength) const
</del><ins>+bool SVGFontData::applySVGGlyphSelection(WidthIterator&amp; iterator, GlyphData&amp; glyphData, bool mirror, int currentCharacter, unsigned&amp; advanceLength) const
</ins><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(int(run.charactersLength()) &gt;= currentCharacter);
</ins><span class="cx"> 
</span><span class="cx">     // Associate text with arabic forms, if needed.
</span><span class="cx">     String remainingTextInRun;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontData.h (170946 => 170947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontData.h        2014-07-10 01:13:45 UTC (rev 170946)
+++ trunk/Source/WebCore/svg/SVGFontData.h        2014-07-10 01:42:43 UTC (rev 170947)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">     virtual void initializeFontData(SimpleFontData*, float fontSize) override;
</span><span class="cx">     virtual float widthForSVGGlyph(Glyph, float fontSize) const override;
</span><span class="cx">     virtual bool fillSVGGlyphPage(GlyphPage*, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength, const SimpleFontData*) const override;
</span><del>-    virtual bool applySVGGlyphSelection(WidthIterator&amp;, GlyphData&amp;, bool mirror, unsigned currentCharacter, unsigned&amp; advanceLength) const override;
</del><ins>+    virtual bool applySVGGlyphSelection(WidthIterator&amp;, GlyphData&amp;, bool mirror, int currentCharacter, unsigned&amp; advanceLength) const override;
</ins><span class="cx"> 
</span><span class="cx">     SVGFontFaceElement* svgFontFaceElement() const { return m_svgFontFaceElement; }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>