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, |