Bug 957209 - Don't set ewindowtype_sheet if parent is hidden window. r=smichaud.
authorstefanh@inbox.com
Sat, 18 Jan 2014 12:49:47 +0100
changeset 164134 15b13a7c66a55238b7ca02f6e5e35e044896bd79
parent 164133 3d2f331a57a470535cc355fa071e14ecb774f90e
child 164135 dddfd63f1414f6f5742ed90d7ded0968a45b38e4
push id26026
push userphilringnalda@gmail.com
push dateSat, 18 Jan 2014 23:17:27 +0000
treeherdermozilla-central@61fd0f987cf2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs957209
milestone29.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 957209 - Don't set ewindowtype_sheet if parent is hidden window. r=smichaud.
xpfe/appshell/src/nsAppShellService.cpp
--- a/xpfe/appshell/src/nsAppShellService.cpp
+++ b/xpfe/appshell/src/nsAppShellService.cpp
@@ -522,18 +522,21 @@ nsAppShellService::JustCreateTopWindow(n
   // Adding CHROME_OPENAS_CHROME to sheetMask makes modal windows opened from
   // nsGlobalWindow::ShowModalDialog() be dialogs (not sheets), while modal
   // windows opened from nsPromptService::DoDialog() still are sheets.  This
   // fixes bmo bug 395465 (see nsCocoaWindow::StandardCreate() and
   // nsCocoaWindow::SetModal()).
   uint32_t sheetMask = nsIWebBrowserChrome::CHROME_OPENAS_DIALOG |
                        nsIWebBrowserChrome::CHROME_MODAL |
                        nsIWebBrowserChrome::CHROME_OPENAS_CHROME;
-  if (parent && ((aChromeMask & sheetMask) == sheetMask))
+  if (parent &&
+      (parent != mHiddenWindow && parent != mHiddenPrivateWindow) &&
+      ((aChromeMask & sheetMask) == sheetMask)) {
     widgetInitData.mWindowType = eWindowType_sheet;
+  }
 #endif
 
 #if defined(XP_WIN)
   if (widgetInitData.mWindowType == eWindowType_toplevel ||
       widgetInitData.mWindowType == eWindowType_dialog)
     widgetInitData.clipChildren = true;
 #endif