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

Unified Diff: ui/gfx/render_text.h

Issue 968923004: Use GetDisplayText() instead of text() for rendering text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 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 | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text_mac.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 4d629a00a0479cefddad8a86a0d5b453e9941288..c7dec6f385671725766b3cde2eff7e49118c2ebd 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -581,6 +581,12 @@ class GFX_EXPORT RenderText {
// |text|.
base::i18n::TextDirection GetTextDirection(const base::string16& text);
+ // Convert an index in |text_| to the index in |given_text|. The
+ // |given_text| should be either |display_text_| or |layout_text_|
+ // depending on the elide state.
+ size_t TextIndexToGivenTextIndex(const base::string16& given_text,
+ size_t index);
+
// A convenience function to check whether the glyph attached to the caret
// is within the given range.
static bool RangeContainsCaret(const Range& range,
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698