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

Unified Diff: ui/gfx/render_text.h

Issue 2639493002: MacViews: Enable word lookup for selectable views::Labels and multi-line text. (Closed)
Patch Set: Address nits. Created 3 years, 11 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') | no next file with comments »
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 44ec07708ff3c2fafe2ddcfc5e63b09545ff490d..567a647f93fb34299d8cc3ffbde06c9c1e36be17 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -682,6 +682,11 @@ class GFX_EXPORT RenderText {
// Adjust ranged styles to accommodate a new text length.
void UpdateStyleLengths();
+ // Returns the line index for the given argument. |text_y| is relative to
+ // the text bounds. Returns -1 if |text_y| is above the text and
+ // lines().size() if |text_y| is below it.
+ int GetLineContainingYCoord(float text_y);
+
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698