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

Unified Diff: ui/gfx/render_text_harfbuzz.cc

Issue 1671403002: Switch gfx::Range to use uint32_t instead of size_t. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 10 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 | « ui/gfx/render_text.cc ('k') | ui/gfx/selection_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.cc
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
index 39fc88cb2c14c6deb78d57a5ffe5e39c2fad7ce4..a9a05ef7d153ca44d72278555677de847ae2d403 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -460,7 +460,8 @@ class HarfBuzzLineBreaker {
}
const size_t valid_end_pos = std::max(
- segment.char_range.start(), FindValidBoundaryBefore(text_, end_pos));
+ segment.char_range.start(),
+ static_cast<uint32_t>(FindValidBoundaryBefore(text_, end_pos)));
if (end_pos != valid_end_pos) {
end_pos = valid_end_pos;
width = run.GetGlyphWidthForCharRange(
@@ -472,8 +473,9 @@ class HarfBuzzLineBreaker {
// not separate surrogate pair or combining characters.
// See RenderTextTest.Multiline_MinWidth for an example.
if (width == 0 && available_width_ == max_width_) {
- end_pos = std::min(segment.char_range.end(),
- FindValidBoundaryAfter(text_, end_pos + 1));
+ end_pos = std::min(
+ segment.char_range.end(),
+ static_cast<uint32_t>(FindValidBoundaryAfter(text_, end_pos + 1)));
}
return end_pos;
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/selection_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698