зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1711508 - remove protonToolbarEnabled property from CustomizableUI, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D119274
This commit is contained in:
Родитель
6e1012d2e4
Коммит
a7bc26c7f3
|
@ -45,13 +45,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
false
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"gProtonToolbarEnabled",
|
||||
"browser.proton.enabled",
|
||||
false
|
||||
);
|
||||
|
||||
const kDefaultThemeID = "default-theme@mozilla.org";
|
||||
|
||||
const kSpecialWidgetPfx = "customizableui-special-";
|
||||
|
@ -255,7 +248,6 @@ var CustomizableUIInternal = {
|
|||
"back-button",
|
||||
"forward-button",
|
||||
"stop-reload-button",
|
||||
gProtonToolbarEnabled &&
|
||||
Services.policies.isAllowed("removeHomeButtonByDefault")
|
||||
? null
|
||||
: "home-button",
|
||||
|
@ -264,9 +256,7 @@ var CustomizableUIInternal = {
|
|||
"spring",
|
||||
"save-to-pocket-button",
|
||||
"downloads-button",
|
||||
gProtonToolbarEnabled ? null : "library-button",
|
||||
AppConstants.MOZ_DEV_EDITION ? "developer-button" : null,
|
||||
gProtonToolbarEnabled ? null : "sidebar-button",
|
||||
"fxa-toolbar-menu-button",
|
||||
].filter(name => name);
|
||||
|
||||
|
@ -637,7 +627,7 @@ var CustomizableUIInternal = {
|
|||
kPrefProtonToolbarVersion,
|
||||
0
|
||||
);
|
||||
if (!gProtonToolbarEnabled || currentVersion >= VERSION) {
|
||||
if (currentVersion >= VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4669,10 +4659,6 @@ var CustomizableUI = {
|
|||
getCustomizationTarget(aElement) {
|
||||
return CustomizableUIInternal.getCustomizationTarget(aElement);
|
||||
},
|
||||
|
||||
get protonToolbarEnabled() {
|
||||
return gProtonToolbarEnabled;
|
||||
},
|
||||
};
|
||||
Object.freeze(CustomizableUI);
|
||||
Object.freeze(CustomizableUI.windows);
|
||||
|
|
|
@ -333,9 +333,7 @@ add_task(async function insertBeforeFirstItemInOverflow() {
|
|||
testNode && testNode.remove();
|
||||
|
||||
urlbar.style.removeProperty("min-width");
|
||||
if (CustomizableUI.protonToolbarEnabled) {
|
||||
CustomizableUI.removeWidgetFromArea(kLibraryButton);
|
||||
}
|
||||
CustomizableUI.removeWidgetFromArea(kLibraryButton);
|
||||
window.resizeTo(originalWindowWidth, window.outerHeight);
|
||||
await TestUtils.waitForCondition(() => !navbar.hasAttribute("overflowing"));
|
||||
await resetCustomization();
|
||||
|
|
|
@ -27,7 +27,6 @@ const kExtensionControllerPref =
|
|||
const kHomePageIgnoreListId = "homepage-urls";
|
||||
const kWidgetId = "home-button";
|
||||
const kWidgetRemovedPref = "browser.engagement.home-button.has-removed";
|
||||
const kProtonToolbarEnabledPref = "browser.proton.enabled";
|
||||
|
||||
function getHomepagePref(useDefault) {
|
||||
let homePage;
|
||||
|
@ -331,7 +330,6 @@ let HomePage = {
|
|||
if (
|
||||
homePage !== "about:home" &&
|
||||
homePage !== "about:blank" &&
|
||||
Services.prefs.getBoolPref(kProtonToolbarEnabledPref, false) &&
|
||||
!Services.prefs.getBoolPref(kExtensionControllerPref, false) &&
|
||||
!Services.prefs.getBoolPref(kWidgetRemovedPref, false) &&
|
||||
!CustomizableUI.getWidget(kWidgetId).areaType
|
||||
|
@ -353,10 +351,7 @@ let HomePage = {
|
|||
},
|
||||
|
||||
_addCustomizableUiListener() {
|
||||
if (
|
||||
Services.prefs.getBoolPref(kProtonToolbarEnabledPref, false) &&
|
||||
!Services.prefs.getBoolPref(kWidgetRemovedPref, false)
|
||||
) {
|
||||
if (!Services.prefs.getBoolPref(kWidgetRemovedPref, false)) {
|
||||
CustomizableUI.addListener(this);
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче