Backed out changeset 89b76affef99 (bug 1883673) for causing multiple bc failures. CLOSED TREE
This commit is contained in:
@@ -827,6 +827,10 @@ pref("browser.privatebrowsing.vpnpromourl", "https://vpn.mozilla.org/?utm_source
|
|||||||
// Whether the user has opted-in to recommended settings for data features.
|
// Whether the user has opted-in to recommended settings for data features.
|
||||||
pref("browser.dataFeatureRecommendations.enabled", false);
|
pref("browser.dataFeatureRecommendations.enabled", false);
|
||||||
|
|
||||||
|
// Temporary pref to control whether or not Private Browsing windows show up
|
||||||
|
// as separate icons in the Windows taskbar.
|
||||||
|
pref("browser.privateWindowSeparation.enabled", true);
|
||||||
|
|
||||||
// Use dark theme variant for PBM windows. This is only supported if the theme
|
// Use dark theme variant for PBM windows. This is only supported if the theme
|
||||||
// sets darkTheme data.
|
// sets darkTheme data.
|
||||||
pref("browser.theme.dark-private-windows", true);
|
pref("browser.theme.dark-private-windows", true);
|
||||||
|
|||||||
@@ -322,7 +322,12 @@ function openBrowserWindow(
|
|||||||
Ci.nsILoadContext
|
Ci.nsILoadContext
|
||||||
).usePrivateBrowsing = true;
|
).usePrivateBrowsing = true;
|
||||||
|
|
||||||
if (AppConstants.platform == "win") {
|
if (
|
||||||
|
AppConstants.platform == "win" &&
|
||||||
|
lazy.NimbusFeatures.majorRelease2022.getVariable(
|
||||||
|
"feltPrivacyWindowSeparation"
|
||||||
|
)
|
||||||
|
) {
|
||||||
lazy.WinTaskbar.setGroupIdForWindow(
|
lazy.WinTaskbar.setGroupIdForWindow(
|
||||||
win,
|
win,
|
||||||
lazy.WinTaskbar.defaultPrivateGroupId
|
lazy.WinTaskbar.defaultPrivateGroupId
|
||||||
|
|||||||
@@ -2710,6 +2710,12 @@ BrowserGlue.prototype = {
|
|||||||
name: "ensurePrivateBrowsingShortcutExists",
|
name: "ensurePrivateBrowsingShortcutExists",
|
||||||
condition:
|
condition:
|
||||||
AppConstants.platform == "win" &&
|
AppConstants.platform == "win" &&
|
||||||
|
// Pref'ed off until Private Browsing window separation is enabled by default
|
||||||
|
// to avoid a situation where a user pins the Private Browsing shortcut to
|
||||||
|
// the Taskbar, which will end up launching into a different Taskbar icon.
|
||||||
|
lazy.NimbusFeatures.majorRelease2022.getVariable(
|
||||||
|
"feltPrivacyWindowSeparation"
|
||||||
|
) &&
|
||||||
// We don't want a shortcut if it's been disabled, eg: by enterprise policy.
|
// We don't want a shortcut if it's been disabled, eg: by enterprise policy.
|
||||||
lazy.PrivateBrowsingUtils.enabled &&
|
lazy.PrivateBrowsingUtils.enabled &&
|
||||||
// Private Browsing shortcuts for packaged builds come with the package,
|
// Private Browsing shortcuts for packaged builds come with the package,
|
||||||
@@ -4520,7 +4526,10 @@ BrowserGlue.prototype = {
|
|||||||
return "disallow-postUpdate";
|
return "disallow-postUpdate";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const useMROnboarding =
|
||||||
|
lazy.NimbusFeatures.majorRelease2022.getVariable("onboarding");
|
||||||
const showUpgradeDialog =
|
const showUpgradeDialog =
|
||||||
|
useMROnboarding ??
|
||||||
lazy.NimbusFeatures.upgradeDialog.getVariable("enabled");
|
lazy.NimbusFeatures.upgradeDialog.getVariable("enabled");
|
||||||
|
|
||||||
return showUpgradeDialog ? "" : "disabled";
|
return showUpgradeDialog ? "" : "disabled";
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Please note that some targeting attributes require stricter controls on the tele
|
|||||||
* [hasMigratedPasswords](#hasmigratedpasswords)
|
* [hasMigratedPasswords](#hasmigratedpasswords)
|
||||||
* [hasPinnedTabs](#haspinnedtabs)
|
* [hasPinnedTabs](#haspinnedtabs)
|
||||||
* [homePageSettings](#homepagesettings)
|
* [homePageSettings](#homepagesettings)
|
||||||
|
* [inMr2022Holdback](#inmr2022holdback)
|
||||||
* [isBackgroundTaskMode](#isbackgroundtaskmode)
|
* [isBackgroundTaskMode](#isbackgroundtaskmode)
|
||||||
* [isChinaRepack](#ischinarepack)
|
* [isChinaRepack](#ischinarepack)
|
||||||
* [isDefaultBrowser](#isdefaultbrowser)
|
* [isDefaultBrowser](#isdefaultbrowser)
|
||||||
@@ -971,6 +972,10 @@ mode, or `null` if this invocation is not running in background task mode.
|
|||||||
|
|
||||||
Checks if user prefers reduced motion as indicated by the value of a media query for `prefers-reduced-motion`.
|
Checks if user prefers reduced motion as indicated by the value of a media query for `prefers-reduced-motion`.
|
||||||
|
|
||||||
|
### `inMr2022Holdback`
|
||||||
|
|
||||||
|
A boolean. `true` when the user is in the Major Release 2022 holdback study.
|
||||||
|
|
||||||
### `distributionId`
|
### `distributionId`
|
||||||
|
|
||||||
A string containing the id of the distribution, or the empty string if there
|
A string containing the id of the distribution, or the empty string if there
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||||
|
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||||
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
|
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
|
||||||
Region: "resource://gre/modules/Region.sys.mjs",
|
Region: "resource://gre/modules/Region.sys.mjs",
|
||||||
TargetingContext: "resource://messaging-system/targeting/Targeting.sys.mjs",
|
TargetingContext: "resource://messaging-system/targeting/Targeting.sys.mjs",
|
||||||
@@ -877,6 +878,15 @@ const TargetingGetters = {
|
|||||||
return window?.matchMedia("(prefers-reduced-motion: reduce)")?.matches;
|
return window?.matchMedia("(prefers-reduced-motion: reduce)")?.matches;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the user is in the Major Release 2022 holdback study.
|
||||||
|
*/
|
||||||
|
get inMr2022Holdback() {
|
||||||
|
return (
|
||||||
|
lazy.NimbusFeatures.majorRelease2022.getVariable("onboarding") === false
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The distribution id, if any.
|
* The distribution id, if any.
|
||||||
* @return {string}
|
* @return {string}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ const MESSAGES = () => {
|
|||||||
// Add the highest possible cap to ensure impressions are recorded while allowing the Spotlight to sync across windows/tabs with Firefox View open
|
// Add the highest possible cap to ensure impressions are recorded while allowing the Spotlight to sync across windows/tabs with Firefox View open
|
||||||
lifetime: 100,
|
lifetime: 100,
|
||||||
},
|
},
|
||||||
targeting: `source == "about:firefoxview" &&
|
targeting: `!inMr2022Holdback && source == "about:firefoxview" &&
|
||||||
!'browser.newtabpage.activity-stream.asrouter.providers.cfr'|preferenceIsUserSet &&
|
!'browser.newtabpage.activity-stream.asrouter.providers.cfr'|preferenceIsUserSet &&
|
||||||
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
|
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
|
||||||
${matchCurrentScreenTargeting(
|
${matchCurrentScreenTargeting(
|
||||||
@@ -303,7 +303,7 @@ const MESSAGES = () => {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
priority: 3,
|
priority: 3,
|
||||||
targeting: `source == "about:firefoxview" && ${matchCurrentScreenTargeting(
|
targeting: `!inMr2022Holdback && source == "about:firefoxview" && ${matchCurrentScreenTargeting(
|
||||||
FIREFOX_VIEW_PREF,
|
FIREFOX_VIEW_PREF,
|
||||||
"FEATURE_CALLOUT_[0-9]"
|
"FEATURE_CALLOUT_[0-9]"
|
||||||
)} && ${matchIncompleteTargeting(FIREFOX_VIEW_PREF)}`,
|
)} && ${matchIncompleteTargeting(FIREFOX_VIEW_PREF)}`,
|
||||||
@@ -376,7 +376,7 @@ const MESSAGES = () => {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
priority: 2,
|
priority: 2,
|
||||||
targeting: `source == "about:firefoxview" && "browser.firefox-view.view-count" | preferenceValue > 2
|
targeting: `!inMr2022Holdback && source == "about:firefoxview" && "browser.firefox-view.view-count" | preferenceValue > 2
|
||||||
&& (("identity.fxaccounts.enabled" | preferenceValue == false) || !(("services.sync.engine.tabs" | preferenceValue == true) && ("services.sync.username" | preferenceValue))) && (!messageImpressions.FIREFOX_VIEW_SPOTLIGHT[messageImpressions.FIREFOX_VIEW_SPOTLIGHT | length - 1] || messageImpressions.FIREFOX_VIEW_SPOTLIGHT[messageImpressions.FIREFOX_VIEW_SPOTLIGHT | length - 1] < currentDate|date - ${ONE_DAY_IN_MS})`,
|
&& (("identity.fxaccounts.enabled" | preferenceValue == false) || !(("services.sync.engine.tabs" | preferenceValue == true) && ("services.sync.username" | preferenceValue))) && (!messageImpressions.FIREFOX_VIEW_SPOTLIGHT[messageImpressions.FIREFOX_VIEW_SPOTLIGHT | length - 1] || messageImpressions.FIREFOX_VIEW_SPOTLIGHT[messageImpressions.FIREFOX_VIEW_SPOTLIGHT | length - 1] < currentDate|date - ${ONE_DAY_IN_MS})`,
|
||||||
frequency: {
|
frequency: {
|
||||||
lifetime: 1,
|
lifetime: 1,
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ const lazy = {};
|
|||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||||
|
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||||
ShellService: "resource:///modules/ShellService.sys.mjs",
|
ShellService: "resource:///modules/ShellService.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -870,7 +871,7 @@ const BASE_MESSAGES = () => [
|
|||||||
],
|
],
|
||||||
lifetime: 12,
|
lifetime: 12,
|
||||||
},
|
},
|
||||||
targeting: "doesAppNeedPrivatePin",
|
targeting: "!inMr2022Holdback && doesAppNeedPrivatePin",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "PB_NEWTAB_COOKIE_BANNERS_PROMO",
|
id: "PB_NEWTAB_COOKIE_BANNERS_PROMO",
|
||||||
@@ -1373,8 +1374,9 @@ export const OnboardingMessageProvider = {
|
|||||||
return checkDefault && !isDefault;
|
return checkDefault && !isDefault;
|
||||||
},
|
},
|
||||||
_shouldShowPrivacySegmentationScreen() {
|
_shouldShowPrivacySegmentationScreen() {
|
||||||
return Services.prefs.getBoolPref(
|
// Fall back to pref: browser.privacySegmentation.preferences.show
|
||||||
"browser.privacySegmentation.preferences.show"
|
return lazy.NimbusFeatures.majorRelease2022.getVariable(
|
||||||
|
"feltPrivacyShowPreferencesSection"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_doesHomepageNeedReset() {
|
_doesHomepageNeedReset() {
|
||||||
|
|||||||
@@ -1226,6 +1226,47 @@ add_task(async function check_userPrefersReducedMotion() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
add_task(async function test_mr2022Holdback() {
|
||||||
|
await ExperimentAPI.ready();
|
||||||
|
|
||||||
|
ok(
|
||||||
|
!ASRouterTargeting.Environment.inMr2022Holdback,
|
||||||
|
"Should not be in holdback (no experiment)"
|
||||||
|
);
|
||||||
|
|
||||||
|
{
|
||||||
|
const doExperimentCleanup = await ExperimentFakes.enrollWithFeatureConfig({
|
||||||
|
featureId: "majorRelease2022",
|
||||||
|
value: {
|
||||||
|
onboarding: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
ok(
|
||||||
|
!ASRouterTargeting.Environment.inMr2022Holdback,
|
||||||
|
"Should not be in holdback (onboarding = true)"
|
||||||
|
);
|
||||||
|
|
||||||
|
await doExperimentCleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
const doExperimentCleanup = await ExperimentFakes.enrollWithFeatureConfig({
|
||||||
|
featureId: "majorRelease2022",
|
||||||
|
value: {
|
||||||
|
onboarding: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
ok(
|
||||||
|
ASRouterTargeting.Environment.inMr2022Holdback,
|
||||||
|
"Should be in holdback (onboarding = false)"
|
||||||
|
);
|
||||||
|
|
||||||
|
await doExperimentCleanup();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
add_task(async function test_distributionId() {
|
add_task(async function test_distributionId() {
|
||||||
is(
|
is(
|
||||||
ASRouterTargeting.Environment.distributionId,
|
ASRouterTargeting.Environment.distributionId,
|
||||||
|
|||||||
@@ -3227,8 +3227,8 @@ var gPrivacyPane = {
|
|||||||
initDataCollection() {
|
initDataCollection() {
|
||||||
if (
|
if (
|
||||||
!AppConstants.MOZ_DATA_REPORTING &&
|
!AppConstants.MOZ_DATA_REPORTING &&
|
||||||
!Services.prefs.getBoolPref(
|
!NimbusFeatures.majorRelease2022.getVariable(
|
||||||
"browser.privacySegmentation.preferences.show"
|
"feltPrivacyShowPreferencesSection"
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
// Nothing to control in the data collection section, remove it.
|
// Nothing to control in the data collection section, remove it.
|
||||||
@@ -3255,19 +3255,16 @@ var gPrivacyPane = {
|
|||||||
// Section visibility
|
// Section visibility
|
||||||
let section = document.getElementById("privacySegmentationSection");
|
let section = document.getElementById("privacySegmentationSection");
|
||||||
let updatePrivacySegmentationSectionVisibilityState = () => {
|
let updatePrivacySegmentationSectionVisibilityState = () => {
|
||||||
section.hidden = !Services.prefs.getBoolPref(
|
section.hidden = !NimbusFeatures.majorRelease2022.getVariable(
|
||||||
"browser.privacySegmentation.preferences.show"
|
"feltPrivacyShowPreferencesSection"
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
Services.prefs.addObserver(
|
NimbusFeatures.majorRelease2022.onUpdate(
|
||||||
"browser.privacySegmentation.preferences.show",
|
|
||||||
updatePrivacySegmentationSectionVisibilityState
|
updatePrivacySegmentationSectionVisibilityState
|
||||||
);
|
);
|
||||||
|
|
||||||
window.addEventListener("unload", () => {
|
window.addEventListener("unload", () => {
|
||||||
Services.prefs.removeObserver(
|
NimbusFeatures.majorRelease2022.offUpdate(
|
||||||
"browser.privacySegmentation.preferences.show",
|
|
||||||
updatePrivacySegmentationSectionVisibilityState
|
updatePrivacySegmentationSectionVisibilityState
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -54,3 +54,57 @@ add_task(async function test_pin_promo() {
|
|||||||
await BrowserTestUtils.closeWindow(win3);
|
await BrowserTestUtils.closeWindow(win3);
|
||||||
await BrowserTestUtils.closeWindow(win4);
|
await BrowserTestUtils.closeWindow(win4);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
add_task(async function test_pin_promo_mr2022_holdback() {
|
||||||
|
ASRouter.resetMessageState();
|
||||||
|
// Set majorRelease2022 feature onboarding variable fallback pref
|
||||||
|
// for inMr2022Holdback targeting to evaluate true
|
||||||
|
await SpecialPowers.pushPrefEnv({
|
||||||
|
set: [["browser.majorrelease.onboarding", false]],
|
||||||
|
});
|
||||||
|
await ASRouter.onPrefChange();
|
||||||
|
let { win: win1, tab: tab1 } = await openTabAndWaitForRender();
|
||||||
|
|
||||||
|
await SpecialPowers.spawn(tab1, [], async function () {
|
||||||
|
const promoContainer = content.document.querySelector(".promo");
|
||||||
|
const promoButton = content.document.querySelector(
|
||||||
|
"#private-browsing-promo-link"
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(promoContainer, "Promo is shown");
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
promoButton.getAttribute("data-l10n-id"),
|
||||||
|
"about-private-browsing-focus-promo-cta",
|
||||||
|
"Pin Promo not shown for holdback user"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
await BrowserTestUtils.closeWindow(win1);
|
||||||
|
});
|
||||||
|
|
||||||
|
add_task(async function test_pin_promo_mr2022_not_holdback() {
|
||||||
|
ASRouter.resetMessageState();
|
||||||
|
// Set majorRelease2022 feature onboarding variable fallback pref
|
||||||
|
// for inMr2022Holdback targeting to evaluate false
|
||||||
|
await SpecialPowers.pushPrefEnv({
|
||||||
|
set: [["browser.majorrelease.onboarding", true]],
|
||||||
|
});
|
||||||
|
await ASRouter.onPrefChange();
|
||||||
|
let { win: win1, tab: tab1 } = await openTabAndWaitForRender();
|
||||||
|
|
||||||
|
await SpecialPowers.spawn(tab1, [], async function () {
|
||||||
|
const promoContainer = content.document.querySelector(".promo");
|
||||||
|
const promoHeader = content.document.getElementById("promo-header");
|
||||||
|
|
||||||
|
ok(promoContainer, "Promo is shown");
|
||||||
|
|
||||||
|
is(
|
||||||
|
promoHeader.getAttribute("data-l10n-id"),
|
||||||
|
"about-private-browsing-pin-promo-header",
|
||||||
|
"Pin Promo is shown"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
await BrowserTestUtils.closeWindow(win1);
|
||||||
|
});
|
||||||
|
|||||||
@@ -1420,6 +1420,33 @@ gleanInternalSdk:
|
|||||||
branch: user
|
branch: user
|
||||||
pref: telemetry.glean.internal.maxPingsPerMinute
|
pref: telemetry.glean.internal.maxPingsPerMinute
|
||||||
|
|
||||||
|
majorRelease2022:
|
||||||
|
description: Major Release 2022
|
||||||
|
owner: firefoxview@mozilla.com
|
||||||
|
hasExposure: false
|
||||||
|
isEarlyStartup: true
|
||||||
|
variables:
|
||||||
|
feltPrivacyPBMDarkTheme:
|
||||||
|
type: boolean
|
||||||
|
fallbackPref: "browser.theme.dark-private-windows"
|
||||||
|
description: "Use dark theme variant for PBM windows. This is only supported if the theme sets darkTheme data."
|
||||||
|
feltPrivacyShowPreferencesSection:
|
||||||
|
type: boolean
|
||||||
|
fallbackPref: "browser.privacySegmentation.preferences.show"
|
||||||
|
description: "Controls visibility of the privacy segmentation preferences section."
|
||||||
|
feltPrivacyWindowSeparation:
|
||||||
|
type: boolean
|
||||||
|
fallbackPref: "browser.privateWindowSeparation.enabled"
|
||||||
|
description: "Whether or not private browsing windows use a separate icon in the Windows taskbar"
|
||||||
|
colorwayCloset:
|
||||||
|
type: boolean
|
||||||
|
fallbackPref: "browser.theme.colorway-closet"
|
||||||
|
description: "Whether or not to show the colorway closet modal"
|
||||||
|
onboarding:
|
||||||
|
type: boolean
|
||||||
|
fallbackPref: "browser.majorrelease.onboarding"
|
||||||
|
description: "Whether or not to use the MR2022 onboarding settings."
|
||||||
|
|
||||||
browserLowMemoryPrefs:
|
browserLowMemoryPrefs:
|
||||||
description: Prefs which control the browser's behaviour under low memory.
|
description: Prefs which control the browser's behaviour under low memory.
|
||||||
owner: haftandilian@mozilla.com
|
owner: haftandilian@mozilla.com
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ NIMBUS_FALLBACK_PREFS = (
|
|||||||
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1875331 for details.
|
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1875331 for details.
|
||||||
ALLOWED_ISEARLYSTARTUP_FEATURE_IDS = {
|
ALLOWED_ISEARLYSTARTUP_FEATURE_IDS = {
|
||||||
"aboutwelcome",
|
"aboutwelcome",
|
||||||
|
"majorRelease2022",
|
||||||
"newtab",
|
"newtab",
|
||||||
"pocketNewtab",
|
"pocketNewtab",
|
||||||
"searchConfiguration",
|
"searchConfiguration",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ const lazy = {};
|
|||||||
// Get the theme variables from the app resource directory.
|
// Get the theme variables from the app resource directory.
|
||||||
// This allows per-app variables.
|
// This allows per-app variables.
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||||
ThemeContentPropertyList: "resource:///modules/ThemeVariableMap.sys.mjs",
|
ThemeContentPropertyList: "resource:///modules/ThemeVariableMap.sys.mjs",
|
||||||
ThemeVariableMap: "resource:///modules/ThemeVariableMap.sys.mjs",
|
ThemeVariableMap: "resource:///modules/ThemeVariableMap.sys.mjs",
|
||||||
@@ -254,7 +255,9 @@ LightweightThemeConsumer.prototype = {
|
|||||||
|
|
||||||
// If enabled, apply the dark theme variant to private browsing windows.
|
// If enabled, apply the dark theme variant to private browsing windows.
|
||||||
if (
|
if (
|
||||||
Services.prefs.getBoolPref("browser.theme.dark-private-windows") ||
|
!lazy.NimbusFeatures.majorRelease2022.getVariable(
|
||||||
|
"feltPrivacyPBMDarkTheme"
|
||||||
|
) ||
|
||||||
!lazy.PrivateBrowsingUtils.isWindowPrivate(this._win) ||
|
!lazy.PrivateBrowsingUtils.isWindowPrivate(this._win) ||
|
||||||
lazy.PrivateBrowsingUtils.permanentPrivateBrowsing
|
lazy.PrivateBrowsingUtils.permanentPrivateBrowsing
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -166,6 +166,7 @@
|
|||||||
#include "mozilla/StaticPrefs_ui.h"
|
#include "mozilla/StaticPrefs_ui.h"
|
||||||
#include "mozilla/StaticPrefs_widget.h"
|
#include "mozilla/StaticPrefs_widget.h"
|
||||||
#include "nsNativeAppSupportWin.h"
|
#include "nsNativeAppSupportWin.h"
|
||||||
|
#include "mozilla/browser/NimbusFeatures.h"
|
||||||
|
|
||||||
#include "nsIGfxInfo.h"
|
#include "nsIGfxInfo.h"
|
||||||
#include "nsUXThemeConstants.h"
|
#include "nsUXThemeConstants.h"
|
||||||
@@ -988,11 +989,13 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (aInitData->mIsPrivate) {
|
if (aInitData->mIsPrivate) {
|
||||||
|
if (NimbusFeatures::GetBool("majorRelease2022"_ns,
|
||||||
|
"feltPrivacyWindowSeparation"_ns, true) &&
|
||||||
// Although permanent Private Browsing mode is indeed Private Browsing,
|
// Although permanent Private Browsing mode is indeed Private Browsing,
|
||||||
// we choose to make it look like regular Firefox in terms of the icon
|
// we choose to make it look like regular Firefox in terms of the icon
|
||||||
// it uses (which also means we shouldn't use the Private Browsing
|
// it uses (which also means we shouldn't use the Private Browsing
|
||||||
// AUMID).
|
// AUMID).
|
||||||
if (!StaticPrefs::browser_privatebrowsing_autostart()) {
|
!StaticPrefs::browser_privatebrowsing_autostart()) {
|
||||||
RefPtr<IPropertyStore> pPropStore;
|
RefPtr<IPropertyStore> pPropStore;
|
||||||
if (!FAILED(SHGetPropertyStoreForWindow(mWnd, IID_IPropertyStore,
|
if (!FAILED(SHGetPropertyStoreForWindow(mWnd, IID_IPropertyStore,
|
||||||
getter_AddRefs(pPropStore)))) {
|
getter_AddRefs(pPropStore)))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user