Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(987)

Unified Diff: Source/platform/fonts/Font.cpp

Issue 652483002: TextRun::length() should return an unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/Font.h ('k') | Source/platform/fonts/WidthCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/Font.cpp
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp
index 2aca587e3924ba04b548f1afc031d91c538b9dfa..ce2503fec478398de6990aca9f6332df5ebdae8c 100644
--- a/Source/platform/fonts/Font.cpp
+++ b/Source/platform/fonts/Font.cpp
@@ -178,7 +178,7 @@ float Font::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFo
return result;
}
-float Font::width(const TextRun& run, int& charsConsumed, Glyph& glyphId) const
+float Font::width(const TextRun& run, unsigned& charsConsumed, Glyph& glyphId) const
{
#if ENABLE(SVG_FONTS)
if (TextRun::RenderingContext* renderingContext = run.renderingContext())
@@ -279,6 +279,8 @@ PassTextBlobPtr Font::buildTextBlob(const GlyphBuffer& glyphBuffer, float initia
FloatRect Font::selectionRectForText(const TextRun& run, const FloatPoint& point, int h, int from, int to, bool accountForGlyphBounds) const
{
to = (to == -1 ? run.length() : to);
+ ASSERT(from >= 0);
jochen (gone - plz use gerrit) 2014/10/20 11:44:25 this is hit in FindInPageControllerTest.FindInPage
+ ASSERT(to >= 0);
TextRunPaintInfo runInfo(run);
runInfo.from = from;
« no previous file with comments | « Source/platform/fonts/Font.h ('k') | Source/platform/fonts/WidthCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698