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

Unified Diff: views/controls/textfield/textfield_views_model.h

Issue 7461102: modification to RenderText for inheritance/SelectionModel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: update per comments Created 9 years, 5 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: views/controls/textfield/textfield_views_model.h
===================================================================
--- views/controls/textfield/textfield_views_model.h (revision 95245)
+++ views/controls/textfield/textfield_views_model.h (working copy)
@@ -134,10 +134,11 @@
void MoveCursorLeft(gfx::BreakType break_type, bool select);
void MoveCursorRight(gfx::BreakType break_type, bool select);
- // Moves the cursor to the specified |position|.
- // If |select| is true, it updates the selection accordingly.
- // The current composition text will be confirmed.
- bool MoveCursorTo(size_t position, bool select);
+ // Moves the selection to the specified selection in |selection|.
+ // If there is composition text, it will be confirmed, which will update the
+ // selection range, and it overrides the selection_start to which the
+ // selection will move to.
+ bool MoveCursorTo(const gfx::SelectionModel& selection);
// Helper function to call MoveCursorTo on the TextfieldViewsModel.
bool MoveCursorTo(const gfx::Point& point, bool select);
@@ -158,6 +159,10 @@
// the cursor position becomes the end position.
void SelectRange(const ui::Range& range);
+ // The current composition text will be confirmed.
+ // render_text_'s selection model is set to |sel|.
+ void SelectSelectionModel(const gfx::SelectionModel& sel);
+
// Selects all text.
// The current composition text will be confirmed.
void SelectAll();
« no previous file with comments | « views/controls/textfield/native_textfield_views_unittest.cc ('k') | views/controls/textfield/textfield_views_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698