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

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

Issue 2024893003: Views: Modify Textfield::ExecuteCommand to use Textfield::IsCommandIdEnabled instead of a virtual ca (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor1_IsEditCommandEnabled
Patch Set: Address review comments. Created 4 years, 6 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 | « no previous file | no next file » | 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 cfa18d1299c2098d7e46ee4fe3ef00ad9063e7f4..27857536d6a9ced3d7ac575a5805133121d74990 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1319,7 +1319,9 @@ void Textfield::ExecuteCommand(int command_id, int event_flags) {
}
}
- if (!IsCommandIdEnabled(command_id))
+ // We only execute the commands enabled in Textfield::IsCommandIdEnabled
+ // below. Hence don't do a virtual IsCommandIdEnabled call.
+ if (!Textfield::IsCommandIdEnabled(command_id))
return;
bool text_changed = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698