Backout 2823fca4f547 (bug 429824) for causing bug 1334140 in e10s. r=backout

This commit is contained in:
Stephen A Pohl 2017-01-26 16:14:19 -05:00
Родитель 005e29fb24
Коммит a309057692
3 изменённых файлов: 3 добавлений и 28 удалений

Просмотреть файл

@ -5474,23 +5474,10 @@ GetIntegerDeltaForEvent(NSEvent* aEvent)
handled = mTextInputHandler->HandleKeyDownEvent(theEvent);
}
// We always allow keyboard events to propagate to keyDown: but if they are
// not handled we give menu items a chance to act. This allows for handling of
// custom shortcuts. Note that existing shortcuts cannot be reassigned yet and
// will have been handled by keyDown: before we get here.
if (!handled && mGeckoChild) {
nsCocoaWindow* widget = mGeckoChild->GetXULWindowWidget();
if (widget) {
nsMenuBarX* mb = widget->GetMenuBar();
if (mb) {
// Check if main menu wants to handle the event.
handled = mb->PerformKeyEquivalent(theEvent);
}
}
}
// We always allow keyboard events to propagate to keyDown: but if they are not
// handled we give special Application menu items a chance to act.
if (!handled && sApplicationMenu) {
// Check if application menu wants to handle the event.
handled = [sApplicationMenu performKeyEquivalent:theEvent];
[sApplicationMenu performKeyEquivalent:theEvent];
}
NS_OBJC_END_TRY_ABORT_BLOCK;

Просмотреть файл

@ -47,7 +47,6 @@ protected:
@interface GeckoNSMenu : NSMenu
{
}
- (BOOL)performSuperKeyEquivalent:(NSEvent*)theEvent;
@end
// Objective-C class used as action target for menu items
@ -120,7 +119,6 @@ public:
static void ResetNativeApplicationMenu();
void SetNeedsRebuild();
void ApplicationMenuOpened();
bool PerformKeyEquivalent(NSEvent* theEvent);
protected:
void ConstructNativeMenus();

Просмотреть файл

@ -527,11 +527,6 @@ void nsMenuBarX::ApplicationMenuOpened()
}
}
bool nsMenuBarX::PerformKeyEquivalent(NSEvent* theEvent)
{
return [mNativeMenu performSuperKeyEquivalent:theEvent];
}
// Hide the item in the menu by setting the 'hidden' attribute. Returns it in |outHiddenNode| so
// the caller can hang onto it if they so choose. It is acceptable to pass nsull
// for |outHiddenNode| if the caller doesn't care about the hidden node.
@ -881,11 +876,6 @@ static BOOL gMenuItemsExecuteCommands = YES;
return NO;
}
- (BOOL)performSuperKeyEquivalent:(NSEvent*)theEvent
{
return [super performKeyEquivalent:theEvent];
}
@end
//