Backed out changeset 8c804afcc865 (bug 1272012) for test failures in test_select_change_event.html

This commit is contained in:
Carsten "Tomcat" Book 2016-05-25 13:21:58 +02:00
Родитель baa01dd21c
Коммит e7cf15b28d
1 изменённых файлов: 3 добавлений и 18 удалений

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

@ -2108,25 +2108,10 @@ nsListControlFrame::KeyDown(nsIDOMEvent* aKeyEvent)
MOZ_ASSERT(keyEvent,
"DOM event must have WidgetKeyboardEvent for its internal event");
bool dropDownMenuOnUpDown;
bool dropDownMenuOnSpace;
#ifdef XP_MACOSX
dropDownMenuOnUpDown = IsInDropDownMode() && !mComboboxFrame->IsDroppedDown();
dropDownMenuOnSpace = !keyEvent->IsAlt() && !keyEvent->IsControl() &&
!keyEvent->IsMeta();
#else
dropDownMenuOnUpDown = keyEvent->IsAlt();
dropDownMenuOnSpace = IsInDropDownMode() && !mComboboxFrame->IsDroppedDown();
#endif
if ((dropDownMenuOnUpDown &&
(keyEvent->mKeyCode == NS_VK_UP || keyEvent->mKeyCode == NS_VK_DOWN)) ||
(dropDownMenuOnSpace && keyEvent->mKeyCode == NS_VK_SPACE)) {
DropDownToggleKey(aKeyEvent);
if (keyEvent->DefaultPrevented()) {
return NS_OK;
}
}
if (keyEvent->IsAlt()) {
if (keyEvent->mKeyCode == NS_VK_UP || keyEvent->mKeyCode == NS_VK_DOWN) {
DropDownToggleKey(aKeyEvent);
}
return NS_OK;
}