Bug 860941 - Add an explicit flag to track modal content windows. r=jst

Tracking this with CHROME_MODAL is problematic, because that gets inherited by
any dependent windows opened by the modal content window, which may or may not
be modal content windows themselves. Thankfully, we have a few free bits lying
around.
This commit is contained in:
Bobby Holley
2013-05-17 10:43:18 -07:00
parent 5c956fa545
commit 2cf86c04f6
3 changed files with 10 additions and 1 deletions

View File

@@ -11452,7 +11452,7 @@ nsDocShell::EnsureScriptEnvironment()
browserChrome->GetChromeFlags(&chromeFlags);
bool isModalContentWindow = (mItemType == typeContent) &&
(chromeFlags & nsIWebBrowserChrome::CHROME_MODAL);
(chromeFlags & nsIWebBrowserChrome::CHROME_MODAL_CONTENT_WINDOW);
// There can be various other content docshells associated with the
// top-level window, like sidebars. Make sure that we only create an
// nsGlobalModalWindow for the primary content shell.