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

Unified Diff: ui/gfx/render_text.h

Issue 8044004: Clean up of SelectionModel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698