diff options
Diffstat (limited to 'docshell/base')
-rw-r--r-- | docshell/base/nsDocShell.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index ebaf07bcdf..6104ebfa71 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -13356,24 +13356,9 @@ nsDocShell::EnsureScriptEnvironment() uint32_t chromeFlags; browserChrome->GetChromeFlags(&chromeFlags); - bool isModalContentWindow = - (mItemType == typeContent) && - (chromeFlags & nsIWebBrowserChrome::CHROME_MODAL_CONTENT_WINDOW); - // There can be various other content docshells associated with the - // top-level window, like sidebars. Make sure that we only create an - // nsGlobalModalWindow for the primary content shell. - if (isModalContentWindow) { - nsCOMPtr<nsIDocShellTreeItem> primaryItem; - nsresult rv = - mTreeOwner->GetPrimaryContentShell(getter_AddRefs(primaryItem)); - NS_ENSURE_SUCCESS(rv, rv); - isModalContentWindow = (primaryItem == this); - } - // If our window is modal and we're not opened as chrome, make // this window a modal content window. - mScriptGlobal = - NS_NewScriptGlobalObject(mItemType == typeChrome, isModalContentWindow); + mScriptGlobal = NS_NewScriptGlobalObject(mItemType == typeChrome); MOZ_ASSERT(mScriptGlobal); mScriptGlobal->SetDocShell(this); |