summaryrefslogtreecommitdiffstats
path: root/docshell/base/nsDocShell.cpp
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2020-01-27 22:59:08 -0600
committerathenian200 <athenian200@outlook.com>2020-01-27 22:59:08 -0600
commit3c4f414db74b84f7d2a6fb13fd888a47a153699b (patch)
treeea81fca559849967a79d598a6f460830762ec9ea /docshell/base/nsDocShell.cpp
parent1f8d508258ac5d7d57fc4eb35cac90f28bc8ca03 (diff)
parentc4b0715baaffc541670fd1158557aa7e61e521d3 (diff)
downloadUXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.tar
UXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.tar.gz
UXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.tar.lz
UXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.tar.xz
UXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into form-disabled-issue
Diffstat (limited to 'docshell/base/nsDocShell.cpp')
-rw-r--r--docshell/base/nsDocShell.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index ebaf07bcd..6104ebfa7 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);