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

Unified Diff: Source/platform/text/TextRun.h

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
Index: Source/platform/text/TextRun.h
diff --git a/Source/platform/text/TextRun.h b/Source/platform/text/TextRun.h
index 4bac69429a4074df44ba494e1c26f6bd3871edf7..02372883ad11d6d8ebb9c639a9a3f0bf9181d3ea 100644
--- a/Source/platform/text/TextRun.h
+++ b/Source/platform/text/TextRun.h
@@ -172,8 +172,8 @@ public:
const UChar* characters16() const { ASSERT(!is8Bit()); return m_data.characters16; }
bool is8Bit() const { return m_is8Bit; }
- int length() const { return m_len; }
- int charactersLength() const { return m_charactersLength; }
+ unsigned length() const { return m_len; }
+ unsigned charactersLength() const { return m_charactersLength; }
bool normalizeSpace() const { return m_normalizeSpace; }
void setNormalizeSpace(bool normalizeSpace) { m_normalizeSpace = normalizeSpace; }
@@ -215,7 +215,7 @@ public:
virtual GlyphData glyphDataForCharacter(const Font&, const TextRun&, SimpleShaper&, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength) = 0;
virtual void drawSVGGlyphs(GraphicsContext*, const TextRun&, const SimpleFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&) const = 0;
- virtual float floatWidthUsingSVGFont(const Font&, const TextRun&, int& charsConsumed, Glyph& glyphId) const = 0;
+ virtual float floatWidthUsingSVGFont(const Font&, const TextRun&, unsigned& charsConsumed, Glyph& glyphId) const = 0;
};
RenderingContext* renderingContext() const { return m_renderingContext.get(); }
@@ -265,8 +265,8 @@ struct TextRunPaintInfo {
}
const TextRun& run;
- int from;
- int to;
+ unsigned from;
+ unsigned to;
FloatRect bounds;
};

Powered by Google App Engine
This is Rietveld 408576698