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

Unified Diff: ui/views/controls/textfield/textfield_views_model.cc

Issue 10693160: Add and specify Views::Textfield::SelectAll |reversed| flag, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove redundant comments. Created 8 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: ui/views/controls/textfield/textfield_views_model.cc
diff --git a/ui/views/controls/textfield/textfield_views_model.cc b/ui/views/controls/textfield/textfield_views_model.cc
index f052df96d4708200c9c5932a6533d83df152eb1e..372fcf1b941820a36587ee9b359d077f378800c1 100644
--- a/ui/views/controls/textfield/textfield_views_model.cc
+++ b/ui/views/controls/textfield/textfield_views_model.cc
@@ -317,7 +317,7 @@ bool TextfieldViewsModel::SetText(const string16& text) {
size_t old_cursor = GetCursorPosition();
// SetText moves the cursor to the end.
size_t new_cursor = text.length();
- SelectAll();
+ SelectAll(false);
// If there is a composition text, don't merge with previous edit.
// Otherwise, force merge the edits.
ExecuteAndRecordReplace(
@@ -439,10 +439,10 @@ void TextfieldViewsModel::SelectSelectionModel(const gfx::SelectionModel& sel) {
render_text_->MoveCursorTo(sel);
}
-void TextfieldViewsModel::SelectAll() {
+void TextfieldViewsModel::SelectAll(bool reversed) {
if (HasCompositionText())
ConfirmCompositionText();
- render_text_->SelectAll();
+ render_text_->SelectAll(reversed);
}
void TextfieldViewsModel::SelectWord() {
« no previous file with comments | « ui/views/controls/textfield/textfield_views_model.h ('k') | ui/views/controls/textfield/textfield_views_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698