diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-21 20:00:48 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-21 21:36:54 -0500 |
commit | a9290ef91ec408fa7886b99cc59be40b413a0ce0 (patch) | |
tree | 1fa82c7349a85865717c83dedbba38aae87fe8b9 /embedding | |
parent | 722161775b9ec9314d1b02f567e42b83115cf993 (diff) | |
download | uxp-a9290ef91ec408fa7886b99cc59be40b413a0ce0.tar.gz |
Issue #1366 - Completely remove showModalDialog
Diffstat (limited to 'embedding')
-rw-r--r-- | embedding/browser/nsIWebBrowserChrome.idl | 3 | ||||
-rw-r--r-- | embedding/components/windowwatcher/nsWindowWatcher.cpp | 24 |
2 files changed, 2 insertions, 25 deletions
diff --git a/embedding/browser/nsIWebBrowserChrome.idl b/embedding/browser/nsIWebBrowserChrome.idl index 40f03cbe4f..32dba42195 100644 --- a/embedding/browser/nsIWebBrowserChrome.idl +++ b/embedding/browser/nsIWebBrowserChrome.idl @@ -77,9 +77,6 @@ interface nsIWebBrowserChrome : nsISupports 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; diff --git a/embedding/components/windowwatcher/nsWindowWatcher.cpp b/embedding/components/windowwatcher/nsWindowWatcher.cpp index e0e8b4bef6..3732ea66de 100644 --- a/embedding/components/windowwatcher/nsWindowWatcher.cpp +++ b/embedding/components/windowwatcher/nsWindowWatcher.cpp @@ -683,7 +683,6 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent, bool windowNeedsName = false; bool windowIsModal = false; bool uriToLoadIsChrome = false; - bool windowIsModalContentDialog = false; uint32_t chromeFlags; nsAutoString name; // string version of aName @@ -775,30 +774,12 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent, } else { chromeFlags = CalculateChromeFlagsForChild(features); - // 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); @@ -1079,7 +1060,7 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent, MaybeDisablePersistence(features, newTreeOwner); } - if ((aDialog || windowIsModalContentDialog) && aArgv) { + if (aDialog && aArgv) { // Set the args on the new window. nsCOMPtr<nsPIDOMWindowOuter> piwin(do_QueryInterface(*aResult)); NS_ENSURE_TRUE(piwin, NS_ERROR_UNEXPECTED); @@ -1268,8 +1249,7 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent, SizeOpenedWindow(newTreeOwner, aParent, isCallerChrome, sizeSpec); } - // XXXbz isn't windowIsModal always true when windowIsModalContentDialog? - if (windowIsModal || windowIsModalContentDialog) { + if (windowIsModal) { nsCOMPtr<nsIDocShellTreeOwner> newTreeOwner; newDocShellItem->GetTreeOwner(getter_AddRefs(newTreeOwner)); nsCOMPtr<nsIWebBrowserChrome> newChrome(do_GetInterface(newTreeOwner)); |