Bug 1374460 - Remove internal code that used to be used for showModalDialog. r=smaug
authorBlake Kaplan <mrbkap@gmail.com>
Thu, 13 Jul 2017 17:20:10 -0700
changeset 373302 19345715779436d99f781f48a390bdfaf7e54c30
parent 373301 0cc8d1037a36fe36d8edb9c19490a8e32d00e668
child 373303 c3692bad764d5eadb0f8adf69eeb8aca8643ac83
push id48209
push usermrbkap@mozilla.com
push dateTue, 08 Aug 2017 05:53:31 +0000
treeherderautoland@193457157794 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1374460
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1374460 - Remove internal code that used to be used for showModalDialog. r=smaug MozReview-Commit-ID: 4QuUpvbOiOA
toolkit/components/browser/nsIWebBrowserChrome.idl
toolkit/components/windowwatcher/nsWindowWatcher.cpp
--- 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;