зеркало из https://github.com/mozilla/gecko-dev.git
Bug 356414. Firefox window/dialog accessible is still app root child after closed.
Patch by Evan.Yan@Sun.COM. r=aaronleventhal.
This commit is contained in:
Родитель
f1496bd5d4
Коммит
1fa7b35889
|
@ -104,6 +104,17 @@ nsresult nsRootAccessibleWrap::HandleEventWithTarget(nsIDOMEvent *aEvent,
|
|||
// we start doing platform-specific things
|
||||
nsRootAccessible::HandleEventWithTarget(aEvent, aTargetNode);
|
||||
|
||||
nsAutoString eventType;
|
||||
aEvent->GetType(eventType);
|
||||
nsAutoString localName;
|
||||
aTargetNode->GetLocalName(localName);
|
||||
|
||||
if (eventType.LowerCaseEqualsLiteral("pagehide")) {
|
||||
// nsRootAccessible::HandleEventWithTarget() has destoryed the accessible object
|
||||
// we don't want to create it again
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
nsCOMPtr<nsIAccessibilityService> accService = GetAccService();
|
||||
if (NS_FAILED(accService->GetAccessibleFor(aTargetNode, getter_AddRefs(accessible))))
|
||||
|
@ -111,11 +122,6 @@ nsresult nsRootAccessibleWrap::HandleEventWithTarget(nsIDOMEvent *aEvent,
|
|||
|
||||
nsCOMPtr<nsPIAccessible> privAcc(do_QueryInterface(accessible));
|
||||
|
||||
nsAutoString eventType;
|
||||
aEvent->GetType(eventType);
|
||||
nsAutoString localName;
|
||||
aTargetNode->GetLocalName(localName);
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
// If it's a tree element, need the currently selected item
|
||||
nsCOMPtr<nsIAccessible> treeItemAccessible;
|
||||
|
|
Загрузка…
Ссылка в новой задаче