Bug 307548. Same page links inside of a frame not firing jump event. r=parente, sr=jst, a=asa

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@180766 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
aaronleventhal%moonset.net
2005-09-21 20:25:16 +00:00
parent 6f73ff7364
commit cd9f1a140a
2 changed files with 10 additions and 7 deletions

View File

@@ -193,14 +193,7 @@ NS_IMETHODIMP nsAccessibilityService::OnStateChange(nsIWebProgress *aWebProgress
nsCOMPtr<nsPIAccessibleDocument> docAccessible =
do_QueryInterface(accessible);
NS_ENSURE_TRUE(docAccessible, NS_ERROR_FAILURE);
nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
docShellTreeItem->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
PRBool isFinished = !(aStateFlags & STATE_START);
if (sameTypeRoot != docShellTreeItem) {
// Frame and iframe handling done via DOMContentLoaded in nsRootAccessible::HandleEvent()
return NS_OK;
}
docAccessible->FireDocLoadingEvent(isFinished);

View File

@@ -450,6 +450,16 @@ 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