diff options
author | Moonchild <moonchild@palemoon.org> | 2021-05-03 12:26:37 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-05-03 12:26:37 +0000 |
commit | aa0fd3d68c856504646e1d7eb499bc890ef44101 (patch) | |
tree | 70066c56efbbfe430472baac892e32a3bab4f04f /layout/xul/nsMenuFrame.cpp | |
parent | 1bf0734a7249eb0dc1a96d825e7310eb46cac6dc (diff) | |
download | uxp-aa0fd3d68c856504646e1d7eb499bc890ef44101.tar.gz |
Issue #1751 -- Remove XP_MACOSX conditionals from /layout
Diffstat (limited to 'layout/xul/nsMenuFrame.cpp')
-rw-r--r-- | layout/xul/nsMenuFrame.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index a8e81adb55..087323a875 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -404,26 +404,12 @@ nsMenuFrame::HandleEvent(nsPresContext* aPresContext, if (aEvent->mMessage == eKeyPress && !IsDisabled()) { WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent(); uint32_t keyCode = keyEvent->mKeyCode; -#ifdef XP_MACOSX - // On mac, open menulist on either up/down arrow or space (w/o Cmd pressed) - if (!IsOpen() && ((keyEvent->mCharCode == ' ' && !keyEvent->IsMeta()) || - (keyCode == NS_VK_UP || keyCode == NS_VK_DOWN))) { - - // When pressing space, don't open the menu if performing an incremental search. - if (keyEvent->mCharCode != ' ' || - !nsMenuPopupFrame::IsWithinIncrementalTime(keyEvent->mTime)) { - *aEventStatus = nsEventStatus_eConsumeNoDefault; - OpenMenu(false); - } - } -#else - // On other platforms, toggle menulist on unmodified F4 or Alt arrow + // Toggle menulist on unmodified F4 or Alt arrow if ((keyCode == NS_VK_F4 && !keyEvent->IsAlt()) || ((keyCode == NS_VK_UP || keyCode == NS_VK_DOWN) && keyEvent->IsAlt())) { *aEventStatus = nsEventStatus_eConsumeNoDefault; ToggleMenuState(); } -#endif } else if (aEvent->mMessage == eMouseDown && aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton && |