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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/TextPainter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
index 5c05772642645297c144ac83287cb1dfe9f4a22b..276da9a6da7ec1ca3610a5abf3818567fa5b802c 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
@@ -197,7 +197,7 @@ inline bool isValidSurrogatePair(const TextRun& run, unsigned index)
{
if (!U16_IS_LEAD(run[index]))
return false;
- if (index + 1 >= static_cast<unsigned>(run.length()))
+ if (index + 1 >= run.length())
return false;
return U16_IS_TRAIL(run[index + 1]);
}
@@ -275,7 +275,7 @@ void LayoutSVGInlineText::addMetricsFromRun(
const float cachedFontHeight = scaledFont().getFontMetrics().floatHeight() / m_scalingFactor;
const bool preserveWhiteSpace = styleRef().whiteSpace() == PRE;
- const unsigned runLength = static_cast<unsigned>(run.length());
+ const unsigned runLength = run.length();
// TODO(pdr): Character-based iteration is ambiguous and error-prone. It
// should be unified under a single concept. See: https://crbug.com/593570
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/TextPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698