зеркало из https://github.com/mozilla/pjs.git
Bug 413778. Avoid creating and destroying extra empty nsDocAccessible when new tab opened. r=ginn.chen, a=blocking1.9
This commit is contained in:
Родитель
ce39c9c786
Коммит
07ae6f322d
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче