morgan pushed to branch tor-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: c837e500 by Henry Wilkes at 2026-08-24T12:55:55+00:00 fixup! BB 31575: Disable Firefox Home (Activity Stream) BB 44830: Drop the "home" setting group. - - - - - dae6e877 by Henry Wilkes at 2026-08-24T12:55:55+00:00 BB 44830: Include the newtab AboutPreferences.sys.mjs file for the home settings. Drop once we get the patch from bugzilla bug 2048379. - - - - - abfb085a by Henry Wilkes at 2026-08-24T12:55:55+00:00 fixup! TB 7494: Create local home page for TBB. TB 44830: Replace Firefox Home with Tor Browser Home. - - - - - 4 changed files: - browser/components/preferences/config/home-startup.mjs - browser/components/preferences/preferences.js - browser/extensions/moz.build - browser/extensions/newtab/lib/AboutPreferences.sys.mjs Changes: ===================================== browser/components/preferences/config/home-startup.mjs ===================================== @@ -5,6 +5,10 @@ import { SettingGroupManager } from "chrome://browser/content/preferences/config/SettingGroupManager.mjs"; import { Preferences } from "chrome://global/content/preferences/Preferences.mjs"; +const { AboutPreferences } = ChromeUtils.importESModule( + "moz-src:///browser/extensions/newtab/lib/AboutPreferences.sys.mjs" +); + /* * Preferences: * @@ -32,4 +36,7 @@ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled")) { defaultBrowserHome: window.createDefaultBrowserConfig(), startupHome: window.createStartupConfig(), }); + // Register the rest of the home settings using the "newtab" extension's file. + // tor-browser#44830. + new AboutPreferences().baseBrowserRegisterGroups(window); } ===================================== browser/components/preferences/preferences.js ===================================== @@ -330,7 +330,9 @@ const CONFIG_PANES = Object.freeze({ home: { l10nId: "home-section", iconSrc: "chrome://browser/skin/home.svg", - groupIds: ["defaultBrowserHome", "startupHome", "homepage", "home"], + // We drop the "home" settings entirely since they are only relevant for + // Firefox Home. tor-browser#44830. + groupIds: ["defaultBrowserHome", "startupHome", "homepage"], module: "chrome://browser/content/preferences/config/home-startup.mjs", replaces: "home", }, ===================================== browser/extensions/moz.build ===================================== @@ -5,3 +5,8 @@ DIRS += [] JAR_MANIFESTS += ["jar.mn"] + +# Hack in the AboutPreferences.sys.mjs file, which is needed for the home +# settings pane, and can more-or-less function without the rest of the "newtab" +# extension. tor-browser#44830. +MOZ_SRC_FILES += ["newtab/lib/AboutPreferences.sys.mjs"] ===================================== browser/extensions/newtab/lib/AboutPreferences.sys.mjs ===================================== @@ -2,15 +2,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { - actionTypes as at, - actionCreators as ac, -} from "resource://newtab/common/Actions.mjs"; -import { - WIDGET_REGISTRY, - isWidgetToggleVisible, - isWidgetsContainerVisible, -} from "resource://newtab/common/WidgetsRegistry.mjs"; +// The newtab extension is not available in base browser, so we replace the +// imports with empty objects that we do *not* expect to be used in practice. +// See tor-browser#44830. +const at = {}; +const ac = {}; +const WIDGET_REGISTRY = []; +const isWidgetToggleVisible = () => {}; +const isWidgetsContainerVisible = () => {}; const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { @@ -24,7 +23,7 @@ ChromeUtils.defineESModuleGetters(lazy, { Management: "resource://gre/modules/Extension.sys.mjs", }); -const DEFAULT_HOMEPAGE_URL = "about:home"; +const DEFAULT_HOMEPAGE_URL = "about:tor"; const BLANK_HOMEPAGE_URL = "chrome://browser/content/blanktab.html"; const HOMEPAGE_OVERRIDE_KEY = "homepage_override"; const URL_OVERRIDES_TYPE = "url_overrides"; @@ -347,6 +346,23 @@ export class AboutPreferences { this.toggleRestoreDefaults(window.gHomePane); } + /** + * Register the setting groups for base browser. + * + * Added for tor-browser#44830. + * + * @param {Window} window - The about:preferences window. + */ + baseBrowserRegisterGroups(window) { + // We do not register the "home" component, since this is specific for + // Firefox Home. tor-browser#44830. + window.MozXULElement.insertFTLIfNeeded("browser/newtab/newtab.ftl"); + window.SettingGroupManager.registerGroups({ + homepage: this._setupHomepageGroup(window), + customHomepage: this._setupCustomHomepageGroup(window), + }); + } + /** @param {Window} window */ _registerPreferences(window) { const { Preferences } = window; @@ -822,10 +838,7 @@ export class AboutPreferences { control: "moz-select", l10nId: "home-homepage-new-windows", options: [ - { - value: "home", - l10nId: "home-mode-choice-default-fx-srd", - }, + { value: "home", l10nId: "home-mode-choice-tor" }, { value: "blank", l10nId: "home-mode-choice-blank-srd" }, { value: "custom", l10nId: "home-mode-choice-custom-srd" }, ], @@ -842,10 +855,7 @@ export class AboutPreferences { control: "moz-select", l10nId: "home-homepage-new-tabs", options: [ - { - value: "home", - l10nId: "home-mode-choice-default-fx-srd", - }, + { value: "home", l10nId: "home-mode-choice-tor" }, { value: "blank", l10nId: "home-mode-choice-blank-srd" }, ], }, View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/af66963... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/af66963... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
morgan (@morgan)