| Index: ui/gfx/render_text.h
|
| diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
|
| index 44ec07708ff3c2fafe2ddcfc5e63b09545ff490d..0076635b877111a445703f0401ecf30e06da6cf4 100644
|
| --- a/ui/gfx/render_text.h
|
| +++ b/ui/gfx/render_text.h
|
| @@ -682,6 +682,20 @@ 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);
|
| +
|
| + // Returns the line segment index for the |line|, |text_x| pair. |text_x| is
|
| + // relative to text in the given line. Returns -1 if |text_x| is to the left
|
| + // of text in the line and |line|.segments.size() if it's to the right.
|
| + // |offset_relative_segment| will contain the offset of |text_x| relative to
|
| + // the start of the segment it is contained in.
|
| + int GetLineSegmentContainingXCoord(const internal::Line& line,
|
| + float text_x,
|
| + float* offset_relative_segment);
|
| +
|
| // A convenience function to check whether the glyph attached to the caret
|
| // is within the given range.
|
| static bool RangeContainsCaret(const Range& range,
|
|
|