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

Unified Diff: ui/gfx/render_text.cc

Issue 351963002: RenderTextHarfBuzz: Allow mid-glyph cursors in multi-grapheme clusters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 5 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: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 8497aa5bef99a204079b8b47364ee0f284f98910..a3a95f3fe9f3c7a6c14504259521a6145e311d8b 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -1233,6 +1233,11 @@ void RenderText::UpdateLayoutText() {
if (!multiline_)
base::ReplaceChars(layout_text_, kNewline, kNewlineSymbol, &layout_text_);
+ grapheme_iterator_.reset(new base::i18n::BreakIterator(layout_text_,
+ base::i18n::BreakIterator::BREAK_CHARACTER));
+ if (!grapheme_iterator_->Init())
+ grapheme_iterator_.reset();
+
ResetLayout();
}

Powered by Google App Engine
This is Rietveld 408576698