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

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

Issue 2399603002: views: don't send OnKeypressUnhandled for all keys (Closed)
Patch Set: OnKeypressUnhandled -> OnEditFailed Created 4 years, 2 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/style/platform_style.h » ('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 56ae56b8dd9d7be85ec284cd0eb4e95767f20934..99f747b6ddd1f3ceefbf09c794a79d8c3c02c8de 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -689,9 +689,6 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event) {
ExecuteTextEditCommand(edit_command);
handled = true;
}
-
- if (!handled)
- OnKeypressUnhandled();
return handled;
}
@@ -1297,7 +1294,7 @@ void Textfield::InsertText(const base::string16& new_text) {
void Textfield::InsertChar(const ui::KeyEvent& event) {
if (read_only()) {
- OnKeypressUnhandled();
+ OnEditFailed();
return;
}
@@ -2053,8 +2050,8 @@ void Textfield::PasteSelectionClipboard(const ui::MouseEvent& event) {
OnAfterUserAction();
}
-void Textfield::OnKeypressUnhandled() {
- PlatformStyle::OnTextfieldKeypressUnhandled();
+void Textfield::OnEditFailed() {
+ PlatformStyle::OnTextfieldEditFailed();
}
bool Textfield::ShouldShowCursor() const {
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | ui/views/style/platform_style.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698