From 29158b63d4bee9edda6ebe1cdece4db0deb9df91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20J=C3=BCrgens?= Date: Wed, 15 Feb 2023 11:20:09 +0100 Subject: [PATCH 1/2] backport D169570, D167444 and D167563 --- assets/patches.txt | 2 + ...extensions-dont-show-recommendations.patch | 93 +++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 patches/unified-extensions-dont-show-recommendations.patch diff --git a/assets/patches.txt b/assets/patches.txt index f6d9213..0f4c0a1 100644 --- a/assets/patches.txt +++ b/assets/patches.txt @@ -10,6 +10,7 @@ patches/librewolf-pref-pane.patch patches/librewolf-prefs.patch patches/mozilla_dirs.patch patches/remove_addons.patch +patches/rfp-performance-api.patch patches/sed-patches/allow-searchengines-non-esr.patch patches/sed-patches/disable-pocket.patch patches/sed-patches/stop-undesired-requests.patch @@ -25,4 +26,5 @@ patches/ui-patches/remove-cfrprefs.patch patches/ui-patches/remove-organization-policy-banner.patch patches/ui-patches/remove-snippets-from-home.patch patches/ui-patches/website-appearance-ui-rfp.patch +patches/unified-extensions-dont-show-recommendations.patch patches/urlbarprovider-interventions.patch diff --git a/patches/unified-extensions-dont-show-recommendations.patch b/patches/unified-extensions-dont-show-recommendations.patch new file mode 100644 index 0000000..073ad0f --- /dev/null +++ b/patches/unified-extensions-dont-show-recommendations.patch @@ -0,0 +1,93 @@ +# Backport of https://phabricator.services.mozilla.com/D169570 +# Should land in 112.0 +--- a/browser/base/content/browser-addons.js ++++ b/browser/base/content/browser-addons.js +@@ -1472,11 +1472,19 @@ + } + + // The button should directly open `about:addons` when the user does not + // have any active extensions listed in the unified extensions panel. + if (!this.hasExtensionsInPanel()) { +- await BrowserOpenAddonsMgr("addons://discover/"); ++ let viewID; ++ if ( ++ Services.prefs.getBoolPref("extensions.getAddons.showPane", true) ++ ) { ++ viewID = "addons://discover/"; ++ } else { ++ viewID = "addons://list/extension"; ++ } ++ await BrowserOpenAddonsMgr(viewID); + return; + } + } + + let panel = this.panel; +--- a/browser/components/extensions/test/browser/browser_unified_extensions.js ++++ b/browser/components/extensions/test/browser/browser_unified_extensions.js +@@ -485,10 +485,64 @@ + + gUnifiedExtensions.getActivePolicies = origGetActivePolicies; + }); + + add_task( ++ async function test_button_opens_extlist_when_no_extension_and_pane_disabled() { ++ // If extensions.getAddons.showPane is set to false, there is no "Recommended" tab, ++ // so we need to make sure we don't navigate to it. ++ ++ // The test harness registers regular extensions so we need to mock the ++ // `getActivePolicies` extension to simulate zero extensions installed. ++ const origGetActivePolicies = gUnifiedExtensions.getActivePolicies; ++ gUnifiedExtensions.getActivePolicies = () => []; ++ ++ await SpecialPowers.pushPrefEnv({ ++ set: [ ++ // Set this to another value to make sure not to "accidentally" land on the right page ++ ["extensions.ui.lastCategory", "addons://list/theme"], ++ ["extensions.getAddons.showPane", false], ++ ], ++ }); ++ ++ await BrowserTestUtils.withNewTab( ++ { gBrowser, url: "about:robots" }, ++ async () => { ++ const { button } = gUnifiedExtensions; ++ ok(button, "expected button"); ++ ++ // Primary click should open about:addons. ++ const tabPromise = BrowserTestUtils.waitForNewTab( ++ gBrowser, ++ "about:addons", ++ true ++ ); ++ ++ button.click(); ++ ++ const tab = await tabPromise; ++ is( ++ gBrowser.currentURI.spec, ++ "about:addons", ++ "expected about:addons to be open" ++ ); ++ is( ++ gBrowser.selectedBrowser.contentWindow.gViewController.currentViewId, ++ "addons://list/extension", ++ "expected about:addons to show the extension list" ++ ); ++ BrowserTestUtils.removeTab(tab); ++ } ++ ); ++ ++ await SpecialPowers.popPrefEnv(); ++ ++ gUnifiedExtensions.getActivePolicies = origGetActivePolicies; ++ } ++); ++ ++add_task( + async function test_unified_extensions_panel_not_open_in_customization_mode() { + const listView = getListView(); + ok(listView, "expected list view"); + const throwIfExecuted = () => { + throw new Error("panel should not have been shown"); + From 10b2be78bf38ce890c3f79539b05936ab93f83cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20J=C3=BCrgens?= Date: Wed, 15 Feb 2023 11:20:49 +0100 Subject: [PATCH 2/2] 110.0-1 --- release | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release b/release index 0cfbf08..d00491f 100644 --- a/release +++ b/release @@ -1 +1 @@ -2 +1 diff --git a/version b/version index 5d210f3..84aa03b 100644 --- a/version +++ b/version @@ -1 +1 @@ -109.0.1 +110.0