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:
alfred.peng%sun.com 2006-10-16 03:06:10 +00:00
Родитель f1496bd5d4
Коммит 1fa7b35889
1 изменённых файлов: 11 добавлений и 5 удалений

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

@ -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;