mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 13:58:49 +00:00
Issue #1366 - Completely remove showModalDialog
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user