mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 813533 - Ensure windows opened in global private browsing mode with no parent present are still marked as private. r=ehsan
This commit is contained in:
parent
cc5c8dd282
commit
3708bf0225
@ -3536,15 +3536,18 @@ function OpenBrowserWindow(options)
|
||||
var wintype = document.documentElement.getAttribute('windowtype');
|
||||
|
||||
var extraFeatures = "";
|
||||
var forcePrivate = false;
|
||||
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
if (typeof options == "object" &&
|
||||
"private" in options &&
|
||||
options.private) {
|
||||
forcePrivate = typeof options == "object" && "private" in options && options.private;
|
||||
#else
|
||||
forcePrivate = gPrivateBrowsingUI.privateBrowsingEnabled;
|
||||
#endif
|
||||
|
||||
if (forcePrivate) {
|
||||
extraFeatures = ",private";
|
||||
// Force the new window to load about:privatebrowsing instead of the default home page
|
||||
defaultArgs = "about:privatebrowsing";
|
||||
}
|
||||
#endif
|
||||
|
||||
// if and only if the current window is a browser window and it has a document with a character
|
||||
// set, then extract the current charset menu setting from the current document and use it to
|
||||
|
Loading…
Reference in New Issue
Block a user