Bug 862918 - Only pass aIsModalContentWindow if we're actually a content docshell. r=bz
Currently, the parent browser.xul docshell ends up getting created as an nsGlobalModalWindow, because we pass nsIWebBrowserChrome::CHROME_OPENAS_CHROME from nsWindowWatcher when creating the initial container window. The other plausible thing to do here would be to add CHROME_OPENAS_CHROME to the call to CreateTopLevelWindow in nsXULWindow::CreateNewContentWindow, since it's very clear there that we're just creating the containing browser.xul docshell and not creating the actual docshell of interest to the caller. But that seems more likely to have unintended consequences, so we fix it here.
This commit is contained in:
@@ -11416,9 +11416,8 @@ nsDocShell::EnsureScriptEnvironment()
|
||||
uint32_t chromeFlags;
|
||||
browserChrome->GetChromeFlags(&chromeFlags);
|
||||
|
||||
bool isModalContentWindow =
|
||||
(chromeFlags & nsIWebBrowserChrome::CHROME_MODAL) &&
|
||||
!(chromeFlags & nsIWebBrowserChrome::CHROME_OPENAS_CHROME);
|
||||
bool isModalContentWindow = (mItemType == typeContent) &&
|
||||
(chromeFlags & nsIWebBrowserChrome::CHROME_MODAL);
|
||||
|
||||
// If our window is modal and we're not opened as chrome, make
|
||||
// this window a modal content window.
|
||||
|
||||
Reference in New Issue
Block a user