mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Back out Enn's patch for bug 393721, as it turned all unit test machines orange except for Mac.
This commit is contained in:
parent
e535810c50
commit
0b098ee8c5
@ -1686,28 +1686,22 @@ nsXULPopupManager::IsValidMenuItem(nsPresContext* aPresContext,
|
||||
nsresult
|
||||
nsXULPopupManager::KeyUp(nsIDOMEvent* aKeyEvent)
|
||||
{
|
||||
// don't do anything if a menu isn't open or a menubar isn't active
|
||||
if (!mActiveMenuBar) {
|
||||
nsMenuChainItem* item = GetTopVisibleMenu();
|
||||
if (!item || item->PopupType() != ePopupTypeMenu)
|
||||
return NS_OK;
|
||||
nsMenuChainItem* item = GetTopVisibleMenu();
|
||||
if (item && item->PopupType() == ePopupTypeMenu) {
|
||||
aKeyEvent->StopPropagation();
|
||||
aKeyEvent->PreventDefault();
|
||||
}
|
||||
|
||||
aKeyEvent->StopPropagation();
|
||||
aKeyEvent->PreventDefault();
|
||||
|
||||
return NS_OK; // I am consuming event
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsXULPopupManager::KeyDown(nsIDOMEvent* aKeyEvent)
|
||||
{
|
||||
// don't do anything if a menu isn't open or a menubar isn't active
|
||||
if (!mActiveMenuBar) {
|
||||
nsMenuChainItem* item = GetTopVisibleMenu();
|
||||
if (!item || item->PopupType() != ePopupTypeMenu)
|
||||
return NS_OK;
|
||||
}
|
||||
// don't do anything if a menu isn't open
|
||||
nsMenuChainItem* item = GetTopVisibleMenu();
|
||||
if (!item || item->PopupType() != ePopupTypeMenu)
|
||||
return NS_OK;
|
||||
|
||||
PRInt32 menuAccessKey = -1;
|
||||
|
||||
@ -1832,8 +1826,8 @@ nsXULPopupManager::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
HandleShortcutNavigation(keyEvent, nsnull);
|
||||
}
|
||||
|
||||
if (mCurrentMenu || mActiveMenuBar) {
|
||||
// if a menu is open or a menubar is active, it consumes the key event
|
||||
if (mCurrentMenu) {
|
||||
// if a menu is open, it consumes the key event
|
||||
aKeyEvent->StopPropagation();
|
||||
aKeyEvent->PreventDefault();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user