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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/SimpleShaper.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/platform/fonts/shaping/SimpleShaper.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/SimpleShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/SimpleShaper.cpp
index 07ea532c4be994cf530374459eb811949916efa5..1b92dfa06dd2edd13f60b28ee7646743e2afd194 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/SimpleShaper.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/SimpleShaper.cpp
@@ -99,7 +99,7 @@ float SimpleShaper::adjustSpacing(float width, const CharacterData& charData)
m_runWidthSoFar += m_expansionPerOpportunity;
}
if (m_textRun.allowsTrailingExpansion()
- || (m_textRun.ltr() && charData.characterOffset + charData.clusterLength < static_cast<size_t>(m_textRun.length()))
+ || (m_textRun.ltr() && charData.characterOffset + charData.clusterLength < m_textRun.length())
|| (m_textRun.rtl() && charData.characterOffset)) {
m_expansion -= m_expansionPerOpportunity;
width += m_expansionPerOpportunity;

Powered by Google App Engine
This is Rietveld 408576698