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

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

Issue 782673002: MacViews: tryjobs for toolkit_views=1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: latest crrev/901823002 Created 5 years, 10 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 | « ui/views/controls/textfield/textfield.h ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 6e0dc0d19b369e28d75105b131b203ce7e6aac69..ccb433cf421947069cdeb3774f8421c7685a8c5f 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -669,7 +669,7 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event) {
// it isn't null before proceeding.
base::WeakPtr<Textfield> textfield(weak_ptr_factory_.GetWeakPtr());
- bool handled = controller_ && controller_->HandleKeyEvent(this, event);
+ bool handled = HandleAsKeyEventOnly(event);
if (!textfield)
return handled;
@@ -700,7 +700,7 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event) {
}
ui::TextInputClient* Textfield::GetTextInputClient() {
- return read_only_ ? NULL : this;
+ return this;
}
void Textfield::OnGestureEvent(ui::GestureEvent* event) {
@@ -1612,6 +1612,10 @@ void Textfield::ExecuteEditingCommand(int command_id) {
ExecuteCommand(command_id);
}
+bool Textfield::HandleAsKeyEventOnly(const ui::KeyEvent& key_event) {
+ return controller_ && controller_->HandleKeyEvent(this, key_event);
+}
+
////////////////////////////////////////////////////////////////////////////////
// Textfield, protected:
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698