This commit is contained in:
Jonas Sicking 2011-06-29 11:54:46 -07:00
Родитель 5cbb3ca1f6
Коммит 77e1745e86
1 изменённых файлов: 5 добавлений и 5 удалений

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

@ -2074,7 +2074,7 @@ nsXULPopupManager::IsValidMenuItem(nsPresContext* aPresContext,
nsresult nsresult
nsXULPopupManager::HandleEvent(nsIDOMEvent* aEvent) nsXULPopupManager::HandleEvent(nsIDOMEvent* aEvent)
{ {
nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(aKeyEvent); nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(aEvent);
NS_ENSURE_TRUE(keyEvent, NS_ERROR_UNEXPECTED); NS_ENSURE_TRUE(keyEvent, NS_ERROR_UNEXPECTED);
nsAutoString eventType; nsAutoString eventType;
@ -2134,16 +2134,16 @@ nsXULPopupManager::KeyDown(nsIDOMKeyEvent* aKeyEvent)
if (theChar == (PRUint32)menuAccessKey) { if (theChar == (PRUint32)menuAccessKey) {
PRBool ctrl = PR_FALSE; PRBool ctrl = PR_FALSE;
if (menuAccessKey != nsIDOMKeyEvent::DOM_VK_CONTROL) if (menuAccessKey != nsIDOMKeyEvent::DOM_VK_CONTROL)
keyEvent->GetCtrlKey(&ctrl); aKeyEvent->GetCtrlKey(&ctrl);
PRBool alt=PR_FALSE; PRBool alt=PR_FALSE;
if (menuAccessKey != nsIDOMKeyEvent::DOM_VK_ALT) if (menuAccessKey != nsIDOMKeyEvent::DOM_VK_ALT)
keyEvent->GetAltKey(&alt); aKeyEvent->GetAltKey(&alt);
PRBool shift=PR_FALSE; PRBool shift=PR_FALSE;
if (menuAccessKey != nsIDOMKeyEvent::DOM_VK_SHIFT) if (menuAccessKey != nsIDOMKeyEvent::DOM_VK_SHIFT)
keyEvent->GetShiftKey(&shift); aKeyEvent->GetShiftKey(&shift);
PRBool meta=PR_FALSE; PRBool meta=PR_FALSE;
if (menuAccessKey != nsIDOMKeyEvent::DOM_VK_META) if (menuAccessKey != nsIDOMKeyEvent::DOM_VK_META)
keyEvent->GetMetaKey(&meta); aKeyEvent->GetMetaKey(&meta);
if (!(ctrl || alt || shift || meta)) { if (!(ctrl || alt || shift || meta)) {
// The access key just went down and no other // The access key just went down and no other
// modifiers are already down. // modifiers are already down.