mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 413778. Avoid creating and destroying extra empty nsDocAccessible when new tab opened. r=ginn.chen, a=blocking1.9
This commit is contained in:
parent
a232ebcba5
commit
32c4f34e3c
@ -419,6 +419,19 @@ nsAccessibilityService::CreateRootAccessible(nsIPresShell *aShell,
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
docShell->GetContentViewer(getter_AddRefs(contentViewer));
|
||||
NS_ENSURE_TRUE(contentViewer, NS_ERROR_FAILURE); // Doc was already shut down
|
||||
PRUint32 busyFlags;
|
||||
docShell->GetBusyFlags(&busyFlags);
|
||||
if (busyFlags != nsIDocShell::BUSY_FLAGS_NONE) {
|
||||
nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(docShell));
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
webNav->GetCurrentURI(getter_AddRefs(uri));
|
||||
NS_ENSURE_STATE(uri);
|
||||
nsCAutoString url;
|
||||
uri->GetSpec(url);
|
||||
if (url.EqualsLiteral("about:blank")) {
|
||||
return NS_OK; // No load events for a busy about:blank -- they are often temporary
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
|
||||
do_QueryInterface(container);
|
||||
|
Loading…
Reference in New Issue
Block a user