Bug 1374460 - Remove internal code that used to be used for showModalDialog. r=smaug
MozReview-Commit-ID: 4QuUpvbOiOA
--- a/toolkit/components/browser/nsIWebBrowserChrome.idl
+++ b/toolkit/components/browser/nsIWebBrowserChrome.idl
@@ -72,19 +72,16 @@ interface nsIWebBrowserChrome : nsISuppo
//
// CHROME_PRIVATE_LIFETIME causes the docshell to affect private-browsing
// session lifetime. This flag is currently respected only for remote
// docshells.
const unsigned long CHROME_PRIVATE_WINDOW = 0x00010000;
const unsigned long CHROME_NON_PRIVATE_WINDOW = 0x00020000;
const unsigned long CHROME_PRIVATE_LIFETIME = 0x00040000;
- // Whether this was opened by nsGlobalWindow::ShowModalDialog.
- const unsigned long CHROME_MODAL_CONTENT_WINDOW = 0x00080000;
-
// Whether this window should use remote (out-of-process) tabs.
const unsigned long CHROME_REMOTE_WINDOW = 0x00100000;
// Prevents new window animations on MacOS and Windows. Currently
// ignored for Linux.
const unsigned long CHROME_SUPPRESS_ANIMATION = 0x01000000;
const unsigned long CHROME_WINDOW_RAISED = 0x02000000;
--- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp
+++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp
@@ -773,32 +773,16 @@ nsWindowWatcher::OpenWindowInternal(mozI
// Until ShowModalDialog is removed, it's still possible for content to
// request dialogs, but only in single-process mode.
if (aDialog) {
MOZ_ASSERT(XRE_IsParentProcess());
chromeFlags |= nsIWebBrowserChrome::CHROME_OPENAS_DIALOG;
}
}
- // If we're not called through our JS version of the API, and we got
- // our internal modal option, treat the window we're opening as a
- // modal content window (and set the modal chrome flag).
- if (!aCalledFromJS && aArgv &&
- WinHasOption(features, "-moz-internal-modal", 0, nullptr)) {
- windowIsModalContentDialog = true;
-
- // CHROME_MODAL gets inherited by dependent windows, which affects various
- // platform-specific window state (especially on OSX). So we need some way
- // to determine that this window was actually opened by nsGlobalWindow::
- // ShowModalDialog(), and that somebody is actually going to be watching
- // for return values and all that.
- chromeFlags |= nsIWebBrowserChrome::CHROME_MODAL_CONTENT_WINDOW;
- chromeFlags |= nsIWebBrowserChrome::CHROME_MODAL;
- }
-
SizeSpec sizeSpec;
CalcSizeSpec(features, sizeSpec);
// XXXbz Why is an AutoJSAPI good enough here? Wouldn't AutoEntryScript (so
// we affect the entry global) make more sense? Or do we just want to affect
// GetSubjectPrincipal()?
dom::AutoJSAPI jsapiChromeGuard;