
henry pushed to branch mullvad-browser-140.0esr-15.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 824cc87c by Henry Wilkes at 2025-07-16T12:51:48+01:00 amend! BB 31575: Disable Firefox Home (Activity Stream) BB 31575: Disable Firefox Home (Activity Stream) Treat about:blank as the default home page and new tab page. BB 43886: Disable the newtab component/addon. Bug 41624: Disable about:pocket-* pages. Bug 40144: Redirect about:privatebrowsing to the user's home - - - - - 6b7cf586 by Henry Wilkes at 2025-07-16T12:52:30+01:00 fixup! MB 39: Add home page about:mullvad-browser TB 43886: Drop mullvad-browser changes to AboutNewTabRedirector.sys.mjs since the module is now excluded. - - - - - 59f89a8f by Henry Wilkes at 2025-07-16T12:52:43+01:00 fixup! BB 31575: Disable Firefox Home (Activity Stream) TB 43886: Drop base-browser changes to AboutNewTabRedirector.sys.mjs since the module is now excluded. - - - - - fa5c1f1f by Henry Wilkes at 2025-07-16T12:53:02+01:00 fixup! MB 39: Add home page about:mullvad-browser TB 43886: Set homepage to about:mullvad-browser. - - - - - 8 changed files: - browser/actors/moz.build - browser/components/BrowserComponents.manifest - browser/components/BrowserGlue.sys.mjs - browser/components/about/AboutRedirector.cpp - browser/components/about/components.conf - browser/components/moz.build - browser/components/newtab/AboutNewTabRedirector.sys.mjs - browser/modules/AboutNewTab.sys.mjs Changes: ===================================== browser/actors/moz.build ===================================== @@ -32,8 +32,7 @@ with Files("WebRTCChild.sys.mjs"): BUG_COMPONENT = ("Firefox", "Site Permissions") FINAL_TARGET_FILES.actors += [ - "AboutNewTabChild.sys.mjs", - "AboutNewTabParent.sys.mjs", + # Remove newtab actors. tor-browser#43886. "AboutPocketChild.sys.mjs", "AboutPocketParent.sys.mjs", "AboutPrivateBrowsingChild.sys.mjs", ===================================== browser/components/BrowserComponents.manifest ===================================== @@ -16,7 +16,7 @@ category browser-before-ui-startup resource:///modules/BuiltInThemes.sys.mjs Bui category browser-before-ui-startup resource://normandy/Normandy.sys.mjs Normandy.init #endif category browser-before-ui-startup resource:///modules/ResetPBMPanel.sys.mjs ResetPBMPanel.init -category browser-before-ui-startup resource:///modules/AboutHomeStartupCache.sys.mjs AboutHomeStartupCache.init +# newtab component is disabled. tor-browser#43886 category browser-before-ui-startup resource:///modules/AccountsGlue.sys.mjs AccountsGlue.init # Browser window lifecycle consumers ===================================== browser/components/BrowserGlue.sys.mjs ===================================== @@ -8,7 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { - AboutHomeStartupCache: "resource:///modules/AboutHomeStartupCache.sys.mjs", + // newtab component is disabled. tor-browser#43886 AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs", ASRouter: "resource:///modules/asrouter/ASRouter.sys.mjs", AddonManager: "resource://gre/modules/AddonManager.sys.mjs", @@ -562,10 +562,7 @@ BrowserGlue.prototype = { // cleanup (called on application shutdown) _dispose: function BG__dispose() { - // AboutHomeStartupCache might write to the cache during - // quit-application-granted, so we defer uninitialization - // until here. - lazy.AboutHomeStartupCache.uninit(); + // newtab component is disabled. tor-browser#43886 if (this._lateTasksIdleObserver) { this._userIdleService.removeIdleObserver( ===================================== browser/components/about/AboutRedirector.cpp ===================================== @@ -21,6 +21,7 @@ #define ABOUT_WELCOME_CHROME_URL \ "chrome://browser/content/aboutwelcome/aboutwelcome.html" #define ABOUT_HOME_URL "about:home" +#define BASE_BROWSER_HOME_PAGE_URL "about:mullvad-browser" namespace mozilla { namespace browser { @@ -33,6 +34,11 @@ struct RedirEntry { uint32_t flags; }; +static const uint32_t BASE_BROWSER_HOME_PAGE_FLAGS = + nsIAboutModule::URI_MUST_LOAD_IN_CHILD | + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI; + /* Entries which do not have URI_SAFE_FOR_UNTRUSTED_CONTENT will run with chrome privileges. This is potentially dangerous. Please use @@ -79,10 +85,7 @@ static const RedirEntry kRedirMap[] = { #endif {"policies", "chrome://browser/content/policies/aboutPolicies.html", nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI}, - {"privatebrowsing", "about:blank", - nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | - nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT | - nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS}, + {"privatebrowsing", "about:blank", BASE_BROWSER_HOME_PAGE_FLAGS}, {"profiling", "chrome://devtools/content/performance-new/aboutprofiling/index.html", nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI}, @@ -103,11 +106,10 @@ static const RedirEntry kRedirMap[] = { {"welcomeback", "chrome://browser/content/aboutWelcomeBack.xhtml", nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT | nsIAboutModule::IS_SECURE_CHROME_UI}, - {"welcome", "about:blank", - nsIAboutModule::URI_MUST_LOAD_IN_CHILD | - nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS | - nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | - nsIAboutModule::ALLOW_SCRIPT}, + {"welcome", "about:blank", BASE_BROWSER_HOME_PAGE_FLAGS}, + {"home", "about:blank", BASE_BROWSER_HOME_PAGE_FLAGS}, + {"newtab", "chrome://browser/content/blanktab.html", + BASE_BROWSER_HOME_PAGE_FLAGS}, {"messagepreview", "chrome://browser/content/messagepreview/messagepreview.html", nsIAboutModule::URI_MUST_LOAD_IN_CHILD | @@ -171,9 +173,7 @@ static const RedirEntry kRedirMap[] = { #endif {"mullvad-browser", "chrome://browser/content/mullvad-browser/aboutMullvadBrowser.html", - nsIAboutModule::URI_MUST_LOAD_IN_CHILD | - nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | - nsIAboutModule::IS_SECURE_CHROME_UI}, + BASE_BROWSER_HOME_PAGE_FLAGS}, }; static nsAutoCString GetAboutModuleName(nsIURI* aURI) { @@ -220,13 +220,11 @@ AboutRedirector::NewChannel(nsIURI* aURI, nsILoadInfo* aLoadInfo, if (!strcmp(path.get(), redir.id)) { nsAutoCString url; - if (path.EqualsLiteral("welcome")) { - NimbusFeatures::RecordExposureEvent("aboutwelcome"_ns, true); - if (NimbusFeatures::GetBool("aboutwelcome"_ns, "enabled"_ns, true)) { - url.AssignASCII(ABOUT_WELCOME_CHROME_URL); - } else { - url.AssignASCII(ABOUT_HOME_URL); - } + if (path.EqualsLiteral("welcome") || path.EqualsLiteral("home") || + path.EqualsLiteral("privatebrowsing") || + (path.EqualsLiteral("newtab") && + StaticPrefs::browser_newtabpage_enabled())) { + url.AssignASCII(BASE_BROWSER_HOME_PAGE_URL); } // fall back to the specified url in the map ===================================== browser/components/about/components.conf ===================================== @@ -10,6 +10,8 @@ pages = [ 'certerror', 'downloads', 'framecrashed', + 'home', + 'newtab', 'messagepreview', 'mullvad-browser', 'policies', ===================================== browser/components/moz.build ===================================== @@ -43,7 +43,7 @@ DIRS += [ "migration", "mullvad-browser", "newidentity", - "newtab", + # Exclude newtab component. tor-browser#43886. "originattributes", "pagedata", "permissions", ===================================== browser/components/newtab/AboutNewTabRedirector.sys.mjs ===================================== @@ -416,7 +416,20 @@ class BaseAboutNewTabRedirector { * the newtab page has no effect on the result of this function. */ get defaultURL() { - return "about:mullvad-browser"; + // Generate the desired activity stream resource depending on state, e.g., + // "resource://newtab/prerendered/activity-stream.html" + // "resource://newtab/prerendered/activity-stream-debug.html" + // "resource://newtab/prerendered/activity-stream-noscripts.html" + return [ + "resource://newtab/prerendered/", + "activity-stream", + // Debug version loads dev scripts but noscripts separately loads scripts + this.activityStreamDebug && !this.privilegedAboutProcessEnabled + ? "-debug" + : "", + this.privilegedAboutProcessEnabled ? "-noscripts" : "", + ".html", + ].join(""); } newChannel() { ===================================== browser/modules/AboutNewTab.sys.mjs ===================================== @@ -154,6 +154,11 @@ export const AboutNewTab = { * onBrowserReady - Continues the initialization of Activity Stream after browser is ready. */ async onBrowserReady() { + if (AppConstants.BASE_BROWSER_VERSION) { + // Do not initialise ActivityStream, which we do not want and is not + // available. tor-browser#43886. + return; + } if (this.activityStream && this.activityStream.initialized) { return; } View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/6e1... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/6e1... You're receiving this email because of your account on gitlab.torproject.org.