зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1440106 - Filter out hidden window. r=Jamie
--HG-- extra : rebase_source : 09bafc19dd602319c3b5f3d4bec0cab886dfc059
This commit is contained in:
Родитель
15bca2be15
Коммит
9785857f82
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "mozilla/EventListenerManager.h"
|
||||
#include "mozilla/dom/Event.h" // for nsIDOMEvent::InternalDOMEvent()
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsDocShellLoadTypes.h"
|
||||
#include "nsIChannel.h"
|
||||
|
@ -478,6 +479,16 @@ DocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
nsIDocShell* docShell = aDocument->GetDocShell();
|
||||
if (!docShell || docShell->IsInvisible()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIWidget* widget = nsContentUtils::WidgetForDocument(aDocument);
|
||||
if (!widget || widget->WindowType() == eWindowType_invisible) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Ignore documents without presshell and not having root frame.
|
||||
nsIPresShell* presShell = aDocument->GetShell();
|
||||
if (!presShell || presShell->IsDestroying())
|
||||
|
|
|
@ -64,12 +64,6 @@
|
|||
const accTree = {
|
||||
role: ROLE_APP_ROOT,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_CHROME_WINDOW
|
||||
},
|
||||
{
|
||||
role: ROLE_CHROME_WINDOW
|
||||
},
|
||||
{
|
||||
role: ROLE_CHROME_WINDOW
|
||||
},
|
||||
|
|
|
@ -80,12 +80,6 @@
|
|||
const accTree = {
|
||||
role: ROLE_APP_ROOT,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_CHROME_WINDOW
|
||||
},
|
||||
{
|
||||
role: ROLE_CHROME_WINDOW
|
||||
},
|
||||
{
|
||||
role: ROLE_CHROME_WINDOW
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче