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

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

Issue 6314012: Make uneditable when readonly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 11 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
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | views/controls/textfield/textfield_views_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield_views_model.cc
diff --git a/views/controls/textfield/textfield_views_model.cc b/views/controls/textfield/textfield_views_model.cc
index 462c97088410f8cff7ee296325c3b4e0a4e1842b..585840d8dbf38da63a5ab9364794e2935a1948a8 100644
--- a/views/controls/textfield/textfield_views_model.cc
+++ b/views/controls/textfield/textfield_views_model.cc
@@ -230,8 +230,9 @@ void TextfieldViewsModel::SelectRange(const TextRange& range) {
}
void TextfieldViewsModel::SelectAll() {
- cursor_pos_ = 0;
- selection_begin_ = text_.length();
+ // SelectAll selects towards the end.
+ cursor_pos_ = text_.length();
+ selection_begin_ = 0;
}
void TextfieldViewsModel::ClearSelection() {
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | views/controls/textfield/textfield_views_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698