Chromium Code Reviews| Index: ui/gfx/render_text.h |
| =================================================================== |
| --- ui/gfx/render_text.h (revision 103758) |
| +++ ui/gfx/render_text.h (working copy) |
| @@ -100,10 +100,6 @@ |
| size_t GetCursorPosition() const; |
| void SetCursorPosition(size_t position); |
| - void SetCaretPlacement(SelectionModel::CaretPlacement placement) { |
| - selection_model_.set_caret_placement(placement); |
| - } |
| - |
| // Moves the cursor left or right. Cursor movement is visual, meaning that |
| // left and right are relative to screen, not the directionality of the text. |
| // If |select| is false, the selection start is moved to the same position. |
| @@ -123,6 +119,13 @@ |
| // Returns true if the cursor position or selection range changed. |
| bool MoveCursorTo(const Point& point, bool select); |
| + // Set the selection_model_ based on |range|. |
| + // The |range| is modified if invalid. |
|
msw
2011/10/04 07:25:41
How is the range modified if invalid? It sounds li
xji
2011/10/05 01:23:42
changed to
// If the |range| start or end is gr
|
| + // If the |range| start or |range| end is not a cursorable position (not on |
| + // grapheme boundary), it is a NO-OP and returns false. Otherwise, returns |
| + // true. |
| + bool SelectRange(const ui::Range& range); |
| + |
| size_t GetSelectionStart() const { |
| return selection_model_.selection_start(); |
| } |