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

Unified Diff: third_party/WebKit/Source/core/paint/TextPainter.cpp

Issue 2018253002: Change TextRun's length() and charactersLength() to return an unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and remove one static_cast added in r396668 Created 4 years, 7 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: third_party/WebKit/Source/core/paint/TextPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/TextPainter.cpp b/third_party/WebKit/Source/core/paint/TextPainter.cpp
index 4b0bd92e84eed5819695f9596aa77cdbe99f2daf..e95993564267088304de98e6dc153cddd6db203f 100644
--- a/third_party/WebKit/Source/core/paint/TextPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TextPainter.cpp
@@ -54,7 +54,7 @@ void TextPainter::setEmphasisMark(const AtomicString& emphasisMark, TextEmphasis
}
}
-void TextPainter::paint(int startOffset, int endOffset, int length, const Style& textStyle, TextBlobPtr* cachedTextBlob)
+void TextPainter::paint(unsigned startOffset, unsigned endOffset, unsigned length, const Style& textStyle, TextBlobPtr* cachedTextBlob)
{
GraphicsContextStateSaver stateSaver(m_graphicsContext, false);
updateGraphicsContext(textStyle, stateSaver);
@@ -183,7 +183,7 @@ TextPainter::Style TextPainter::selectionPaintingStyle(LineLayoutItem lineLayout
}
template <TextPainter::PaintInternalStep step>
-void TextPainter::paintInternalRun(TextRunPaintInfo& textRunPaintInfo, int from, int to)
+void TextPainter::paintInternalRun(TextRunPaintInfo& textRunPaintInfo, unsigned from, unsigned to)
{
ASSERT(from <= textRunPaintInfo.run.length());
ASSERT(to <= textRunPaintInfo.run.length());
@@ -201,7 +201,7 @@ void TextPainter::paintInternalRun(TextRunPaintInfo& textRunPaintInfo, int from,
}
template <TextPainter::PaintInternalStep Step>
-void TextPainter::paintInternal(int startOffset, int endOffset, int truncationPoint, TextBlobPtr* cachedTextBlob)
+void TextPainter::paintInternal(unsigned startOffset, unsigned endOffset, unsigned truncationPoint, TextBlobPtr* cachedTextBlob)
{
TextRunPaintInfo textRunPaintInfo(m_run);
textRunPaintInfo.bounds = FloatRect(m_textBounds);
« no previous file with comments | « third_party/WebKit/Source/core/paint/TextPainter.h ('k') | third_party/WebKit/Source/platform/fonts/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698