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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 389016: Address post-commit comments from codereview.chromium.org/371059 and codereview.chromium.org/293019 (Closed)
Patch Set: Created 11 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 | « chrome/browser/cocoa/download_shelf_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index 82720be1acbb639f0fa244293e19b60c2c688dfd..784f091de3a7271af82be439a7165088febfd905 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -665,10 +665,11 @@ void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) {
if ([self retainCount] > 1 && [theEvent type] == NSKeyDown) {
[self interpretKeyEvents:[NSArray arrayWithObject:theEvent]];
- // We don't get insertText: calls if ctrl is down, so synthesize a keypress
- // event for that case. Note that this makes our behavior deviate from the
- // windows and linux versions of chrome (however, see http://crbug.com/13891
- // ), but it makes us similar to how Safari behaves.
+ // We don't get insertText: calls if ctrl is down and not even a keyDown:
+ // call if cmd is down, so synthesize a keypress event for these cases.
+ // Note that this makes our behavior deviate from the windows and linux
+ // versions of chrome (however, see http://crbug.com/13891 ), but it makes
+ // us behave similar to how Safari behaves.
if ([theEvent modifierFlags] & (NSControlKeyMask | NSCommandKeyMask) &&
lastKeyPressedEvent_.get() != theEvent &&
[[theEvent characters] length] > 0 &&
« no previous file with comments | « chrome/browser/cocoa/download_shelf_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698