Bug 109851. Fix extra accessible events being generated. sr=brendan, r=jgaunt

git-svn-id: svn://10.0.0.236/trunk@108536 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
aaronl%netscape.com 2001-11-20 02:29:14 +00:00
parent 5908cb604b
commit aa5543cad0
2 changed files with 28 additions and 28 deletions

View File

@ -176,7 +176,7 @@ NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
/*
// Commenting this out for now.
// It was requested that we always use pane objects instead of client objects.
// It was requested that we always use MSAA ROLE_PANE objects instead of client objects.
// However, it might be asked that we put client objects back.
nsCOMPtr<nsIPresContext> context;
@ -278,21 +278,21 @@ NS_IMETHODIMP nsRootAccessible::AddAccessibleEventListener(nsIAccessibleEventLis
StartDocReadyTimer();
// Set up web progress listener - we need to know when page loading is finished
// That way we can send the STATE_CHANGE events for the pane, and change the STATE_BUSY bit flag
// That way we can send the STATE_CHANGE events for the MSAA root "pane" object (ROLE_PANE),
// and change the STATE_BUSY bit flag
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
nsCOMPtr<nsIPresContext> context;
if (presShell)
if (presShell) {
nsCOMPtr<nsIPresContext> context;
presShell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsISupports> container;
if (context)
context->GetContainer(getter_AddRefs(container));
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
if (docShell)
mWebProgress = do_GetInterface(docShell);
if (context) {
nsCOMPtr<nsISupports> container; context->GetContainer(getter_AddRefs(container));
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
if (docShell) {
mWebProgress = do_GetInterface(docShell);
mWebProgress->AddProgressListener(this);
}
}
}
NS_ASSERTION(mWebProgress, "Could not get nsIWebProgress for nsRootAccessible");
mWebProgress->AddProgressListener(this);
}

View File

@ -176,7 +176,7 @@ NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
/*
// Commenting this out for now.
// It was requested that we always use pane objects instead of client objects.
// It was requested that we always use MSAA ROLE_PANE objects instead of client objects.
// However, it might be asked that we put client objects back.
nsCOMPtr<nsIPresContext> context;
@ -278,21 +278,21 @@ NS_IMETHODIMP nsRootAccessible::AddAccessibleEventListener(nsIAccessibleEventLis
StartDocReadyTimer();
// Set up web progress listener - we need to know when page loading is finished
// That way we can send the STATE_CHANGE events for the pane, and change the STATE_BUSY bit flag
// That way we can send the STATE_CHANGE events for the MSAA root "pane" object (ROLE_PANE),
// and change the STATE_BUSY bit flag
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
nsCOMPtr<nsIPresContext> context;
if (presShell)
if (presShell) {
nsCOMPtr<nsIPresContext> context;
presShell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsISupports> container;
if (context)
context->GetContainer(getter_AddRefs(container));
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
if (docShell)
mWebProgress = do_GetInterface(docShell);
if (context) {
nsCOMPtr<nsISupports> container; context->GetContainer(getter_AddRefs(container));
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
if (docShell) {
mWebProgress = do_GetInterface(docShell);
mWebProgress->AddProgressListener(this);
}
}
}
NS_ASSERTION(mWebProgress, "Could not get nsIWebProgress for nsRootAccessible");
mWebProgress->AddProgressListener(this);
}