Bug 311430. Not firing EVENT_REORDER for frames/iframes that finish loading. r=parente, sr=jst

This commit is contained in:
aaronleventhal%moonset.net 2005-10-09 02:36:27 +00:00
parent 11c4d8e7f9
commit 51dd2d7ff8

View File

@ -450,16 +450,6 @@ NS_IMETHODIMP nsDocAccessibleWrap::FireDocLoadingEvent(PRBool aIsFinished)
nsDocAccessible::FireDocLoadingEvent(aIsFinished);
nsCOMPtr<nsIDocShellTreeItem> treeItem = GetDocShellTreeItemFor(mDOMNode);
if (!treeItem) {
return NS_OK;
}
nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
treeItem->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
if (sameTypeRoot != treeItem) {
return NS_OK; // We only fire MSAA doc loading events for root content frame
}
if (aIsFinished) {
// Use short timer before firing state change event for finished doc,
// because the window is made visible asynchronously by Microsoft Windows
@ -472,6 +462,17 @@ NS_IMETHODIMP nsDocAccessibleWrap::FireDocLoadingEvent(PRBool aIsFinished)
}
}
else {
nsCOMPtr<nsIDocShellTreeItem> treeItem = GetDocShellTreeItemFor(mDOMNode);
if (!treeItem) {
return NS_OK;
}
nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
treeItem->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
if (sameTypeRoot != treeItem) {
return NS_OK; // We only fire MSAA doc loading events for root content frame
}
FireToolkitEvent(nsIAccessibleEvent::EVENT_STATE_CHANGE, this, nsnull);
}