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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm

Issue 82193002: [rAC, OSX] Autofill text field hot keys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Trying to fix "old chunk mismatch" Created 7 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
Index: chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
index c7ab45689916b9c13dcc4bc6452f4e911bf24b3f..4bcd543c693be75a34166f8985ff473736c8b024 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
@@ -56,6 +56,18 @@ const CGFloat kDecorationHeight = kAccountChooserHeight +
[super mouseDown:event];
}
+// Intercept key down messages and forward them to the text fields delegate.
+// This needs to happen in the field editor, since it handles all keyDown
+// messages for NSTextField.
+- (void)keyDown:(NSEvent*)event {
+ AutofillTextField* textfield =
+ base::mac::ObjCCastStrict<AutofillTextField>([self delegate]);
+ if ([[textfield inputDelegate] keyEvent:event
+ forInput:textfield] != kKeyEventHandled) {
+ [super keyDown:event];
+ }
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698