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

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

Issue 8368016: Rebase BookmarkBubble on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Textfield::[set_]select_all_on_focus, use GetInitiallyFocusedView. Created 9 years, 1 month 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield.cc
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index 8eaa0deedaab6dd1f5692d2d768af0037ab98441..bb741527cefd6d459aadad0687fdde7450a053ba 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -387,6 +387,9 @@ void Textfield::OnFocus() {
// keyboard messages.
View::OnFocus();
}
+
+ if(select_all_on_focus())
+ SelectAll();
Ben Goodger (Google) 2011/11/09 17:11:08 unit test?
msw 2011/11/10 06:12:03 Done.
}
void Textfield::OnBlur() {
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698