From 239ba386c866ac79cf72a453d917cfad0d89c3eb Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 7 Mar 2014 20:17:48 -0600 Subject: [PATCH] Bug 435164 - Stop mapping Ctrl+Space to context menu on Cocoa. r=smichaud --- widget/cocoa/TextInputHandler.mm | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/widget/cocoa/TextInputHandler.mm b/widget/cocoa/TextInputHandler.mm index af13174991a9..03ab1703df56 100644 --- a/widget/cocoa/TextInputHandler.mm +++ b/widget/cocoa/TextInputHandler.mm @@ -1539,28 +1539,6 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent) return currentKeyEvent->IsDefaultPrevented(); } - // If this is the context menu key command, send a context menu key event. - // XXX Should we dispatch context menu event at pressing kVK_PC_ContextMenu? - NSUInteger modifierFlags = - [aNativeEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask; - if (modifierFlags == NSControlKeyMask && - [[aNativeEvent charactersIgnoringModifiers] isEqualToString:@" "]) { - WidgetMouseEvent contextMenuEvent(true, NS_CONTEXTMENU, [mView widget], - WidgetMouseEvent::eReal, - WidgetMouseEvent::eContextMenuKey); - contextMenuEvent.modifiers = 0; - - bool cmEventHandled = DispatchEvent(contextMenuEvent); - PR_LOG(gLog, PR_LOG_ALWAYS, - ("%p TextInputHandler::HandleKeyDownEvent, " - "context menu event dispatched, handled=%s%s", - this, TrueOrFalse(cmEventHandled), - Destroyed() ? " and widget was destroyed" : "")); - [mView maybeInitContextMenuTracking]; - // Bail, there is nothing else to do here. - return (cmEventHandled || currentKeyEvent->IsDefaultPrevented()); - } - if (currentKeyEvent->IsDefaultPrevented()) { PR_LOG(gLog, PR_LOG_ALWAYS, ("%p TextInputHandler::HandleKeyDownEvent, "