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

Unified Diff: ui/gfx/render_text_harfbuzz.cc

Issue 968923004: Use GetDisplayText() instead of text() for rendering text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failed tests Created 5 years, 9 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_harfbuzz.cc
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
index 0580abe3375e09bddae437c08a958ee6a7d16977..72caa5901788843c2b31fe04476abb553e6c4622 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -1453,17 +1453,6 @@ base::i18n::BreakIterator* RenderTextHarfBuzz::GetGraphemeIterator() {
return grapheme_iterator_.get();
}
-size_t RenderTextHarfBuzz::TextIndexToGivenTextIndex(
- const base::string16& given_text,
- size_t index) {
- DCHECK(given_text == layout_text() || given_text == display_text());
- DCHECK_LE(index, text().length());
- ptrdiff_t i = obscured() ? UTF16IndexToOffset(text(), 0, index) : index;
- CHECK_GE(i, 0);
- // Clamp indices to the length of the given layout or display text.
- return std::min<size_t>(given_text.length(), i);
-}
-
internal::TextRunList* RenderTextHarfBuzz::GetRunList() {
DCHECK(!update_layout_run_list_);
DCHECK(!update_display_run_list_);

Powered by Google App Engine
This is Rietveld 408576698