mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1814889: Ensure that opening private windows continues to display a private browsing icon on the Windows taskbar. r=bhearsum,mstange
Differential Revision: https://phabricator.services.mozilla.com/D168821
This commit is contained in:
parent
7cf616d209
commit
c28258d54c
@ -671,22 +671,21 @@ nsresult nsAppShellService::JustCreateTopWindow(
|
||||
|
||||
widgetInitData.mRTL = LocaleService::GetInstance()->IsAppLocaleRTL();
|
||||
|
||||
nsresult rv =
|
||||
window->Initialize(parent, center ? aParent : nullptr, aInitialWidth,
|
||||
aInitialHeight, aIsHiddenWindow, widgetInitData);
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Enforce the Private Browsing autoStart pref first.
|
||||
bool isPrivateBrowsingWindow =
|
||||
StaticPrefs::browser_privatebrowsing_autostart();
|
||||
|
||||
if (aChromeMask & nsIWebBrowserChrome::CHROME_PRIVATE_WINDOW) {
|
||||
// Caller requested a private window
|
||||
isPrivateBrowsingWindow = true;
|
||||
}
|
||||
widgetInitData.mIsPrivate = isPrivateBrowsingWindow;
|
||||
|
||||
nsresult rv =
|
||||
window->Initialize(parent, center ? aParent : nullptr, aInitialWidth,
|
||||
aInitialHeight, aIsHiddenWindow, widgetInitData);
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<mozIDOMWindowProxy> domWin = do_GetInterface(aParent);
|
||||
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(domWin);
|
||||
nsCOMPtr<nsILoadContext> parentContext = do_QueryInterface(webNav);
|
||||
|
Loading…
Reference in New Issue
Block a user