Issue #1366 - Completely remove showModalDialog

This commit is contained in:
Gaming4JC
2020-01-21 20:00:48 -05:00
committed by Roy Tam
parent abb2afe2a7
commit 8d600c51ed
38 changed files with 14 additions and 1313 deletions
+1 -16
View File
@@ -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);