mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Don't set the dependent bit on windows not being opened at chrome, even if it's
in the features. Bug 344257, r=bsmedberg, sr=jst
This commit is contained in:
parent
b6bd2833c5
commit
17cc2750ad
@ -101,7 +101,12 @@ interface nsIWebBrowserChrome : nsISupports
|
||||
const unsigned long CHROME_WINDOW_RAISED = 0x02000000;
|
||||
const unsigned long CHROME_WINDOW_LOWERED = 0x04000000;
|
||||
const unsigned long CHROME_CENTER_SCREEN = 0x08000000;
|
||||
|
||||
// Make the new window dependent on the parent. This flag is only
|
||||
// meaningful if CHROME_OPENAS_CHROME is set; content windows should not be
|
||||
// dependent.
|
||||
const unsigned long CHROME_DEPENDENT = 0x10000000;
|
||||
|
||||
// Note: The modal style bit just affects the way the window looks and does
|
||||
// mean it's actually modal.
|
||||
const unsigned long CHROME_MODAL = 0x20000000;
|
||||
|
@ -577,12 +577,10 @@ nsWindowWatcher::OpenWindowJSInternal(nsIDOMWindow *aParent,
|
||||
|
||||
// Now check whether it's ok to ask a window provider for a window. Don't
|
||||
// do it if we're opening a dialog or if our parent is a chrome window or
|
||||
// if we're opening something that has dependent, modal, dialog, or chrome
|
||||
// flags set.
|
||||
// if we're opening something that has modal, dialog, or chrome flags set.
|
||||
nsCOMPtr<nsIDOMChromeWindow> chromeWin = do_QueryInterface(aParent);
|
||||
if (!aDialog && !chromeWin &&
|
||||
!(chromeFlags & (nsIWebBrowserChrome::CHROME_DEPENDENT |
|
||||
nsIWebBrowserChrome::CHROME_MODAL |
|
||||
!(chromeFlags & (nsIWebBrowserChrome::CHROME_MODAL |
|
||||
nsIWebBrowserChrome::CHROME_OPENAS_DIALOG |
|
||||
nsIWebBrowserChrome::CHROME_OPENAS_CHROME))) {
|
||||
nsCOMPtr<nsIWindowProvider> provider = do_GetInterface(parentTreeOwner);
|
||||
@ -1417,6 +1415,11 @@ PRUint32 nsWindowWatcher::CalculateChromeFlags(const char *aFeatures,
|
||||
chromeFlags &= ~(nsIWebBrowserChrome::CHROME_MODAL | nsIWebBrowserChrome::CHROME_OPENAS_CHROME);
|
||||
}
|
||||
|
||||
if (!(chromeFlags & nsIWebBrowserChrome::CHROME_OPENAS_CHROME)) {
|
||||
// Remove the dependent flag if we're not opening as chrome
|
||||
chromeFlags &= ~nsIWebBrowserChrome::CHROME_DEPENDENT;
|
||||
}
|
||||
|
||||
return chromeFlags;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user