| Index: content/browser/renderer_host/render_widget_host_view_mac.mm
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| index 5fd0b1b2e23be0b57cb740280dfa3cab11645c7b..e29590b1a577c4092543cc0ca4f59d178977e317 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| @@ -2517,6 +2517,10 @@ void RenderWidgetHostViewMac::AcceleratedLayerDidDrawFrame(bool succeeded) {
|
| if ([[self window] firstResponder] != self)
|
| return NO;
|
|
|
| + // If the event is reserved by the system, then do not pass it to web content.
|
| + if ([responderDelegate_ eventIsReservedBySystem:theEvent])
|
| + return NO;
|
| +
|
| // If we return |NO| from this function, cocoa will send the key event to
|
| // the menu and only if the menu does not process the event to |keyDown:|. We
|
| // want to send the event to a renderer _before_ sending it to the menu, so
|
| @@ -2564,6 +2568,18 @@ void RenderWidgetHostViewMac::AcceleratedLayerDidDrawFrame(bool succeeded) {
|
|
|
| - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
| TRACE_EVENT0("browser", "RenderWidgetHostViewCocoa::keyEvent");
|
| +
|
| + // If the user changes the system hotkey mapping after Chrome has been
|
| + // launched, then it is possible that a formerly reserved system hotkey is no
|
| + // longer reserved. The hotkey would have skipped the renderer, but would
|
| + // also have not been handled by the system. If this is the case, immediately
|
| + // return.
|
| + // TODO(erikchen): SystemHotkeyHelperMac should use FS api to monitor changes
|
| + // to system hotkeys. This logic will have to be updated.
|
| + // http://crbug.com/383558.
|
| + if ([responderDelegate_ eventIsReservedBySystem:theEvent])
|
| + return;
|
| +
|
| DCHECK([theEvent type] != NSKeyDown ||
|
| !equiv == !([theEvent modifierFlags] & NSCommandKeyMask));
|
|
|
|
|