зеркало из https://github.com/mozilla/pjs.git
Bug 175815. Accessibiltiy API's: don't fire MENUPOPUPSTART or MENUPOPUPEND events for HTML/XUL comboboxes. r=kyle, sr=alecf, a=dbaron
This commit is contained in:
Родитель
2241088a7b
Коммит
f1118b17d1
|
@ -601,10 +601,6 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
|
|||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible, nsnull);
|
||||
}
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("popupshowing"))
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPSTART, accessible, nsnull);
|
||||
else if (eventType.EqualsIgnoreCase("popuphiding"))
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPEND, accessible, nsnull);
|
||||
else if (eventType.EqualsIgnoreCase("DOMMenuBarActive"))
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUSTART, accessible, nsnull);
|
||||
else if (eventType.EqualsIgnoreCase("DOMMenuBarInactive")) {
|
||||
|
@ -615,6 +611,20 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
|
|||
FireAccessibleFocusEvent(accessible, targetNode);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Menu popup events
|
||||
PRUint32 menuEvent = 0;
|
||||
if (eventType.EqualsIgnoreCase("popupshowing"))
|
||||
menuEvent = nsIAccessibleEventListener::EVENT_MENUPOPUPSTART;
|
||||
else if (eventType.EqualsIgnoreCase("popuphiding"))
|
||||
menuEvent = nsIAccessibleEventListener::EVENT_MENUPOPUPEND;
|
||||
if (menuEvent) {
|
||||
PRUint32 role = ROLE_NOTHING;
|
||||
accessible->GetAccRole(&role);
|
||||
if (role == ROLE_MENUPOPUP)
|
||||
mListener->HandleEvent(menuEvent, accessible, nsnull);
|
||||
}
|
||||
}
|
||||
#else
|
||||
AtkStateChange stateData;
|
||||
AtkTextChange textData;
|
||||
|
|
Загрузка…
Ссылка в новой задаче