Command:
git range-diff --color-moved --ignore-space-change 1451ada620fc97e3541048dd0cf301ee6d1335f6..11b5208d2ac127271413d61210afed4ce4f164df FIREFOX_128_0b1_BUILD1..b59af9b76d18ac7fad46573c1b774a35af60a0cb
1: d8d6389242202 ! 1: f9672ce72b705 Bug 41454: Move focus after calling openPreferences for a sub-category. @@ Commit message Temporary fix until mozilla bug 1799153 gets a patch upstream. ## browser/components/preferences/preferences.js ## -@@ browser/components/preferences/preferences.js: async function scrollAndHighlight(subcategory, category) { +@@ browser/components/preferences/preferences.js: async function scrollAndHighlight(subcategory) { } let header = getClosestDisplayedHeader(element);
2: b53ba71165a8c = 2: 8f6d3794e8ced Bug 42194: Fix blank net error page on failed DNS resolution with active proxy.
3: 0287deab53b08 = 3: 28eb8ddaabbbb Bug 41483: Remove the firefox override for appstrings.properties
4: 63c1a73db4f94 = 4: 86a67e420e154 Bug 41459: WebRTC fails to build under mingw (Part 1)
5: d5a9ec39f6852 ! 5: 64d0066a5126c Bug 41459: WebRTC fails to build under mingw (Part 2) @@ third_party/libwebrtc/rtc_base/system/file_wrapper.cc -#include <Windows.h> +#include <windows.h> #else - #include <string.h> #endif + ## third_party/libwebrtc/rtc_base/win/create_direct3d_device.h ## @@ #ifndef RTC_BASE_WIN_CREATE_DIRECT3D_DEVICE_H_
6: 2b9d70b5fb96b = 6: c2813a0851dbd Bug 41459: WebRTC fails to build under mingw (Part 3)
7: 4eacd31a58554 ! 7: eb83c78b59b7a Bug 41459: WebRTC fails to build under mingw (Part 4) @@ netwerk/sctp/src/moz.build: if CONFIG['OS_TARGET'] in ('Linux', 'Android'): + DEFINES['_CRT_RAND_S'] = True ## netwerk/sctp/src/netinet/sctp_cc_functions.c ## -@@ netwerk/sctp/src/netinet/sctp_cc_functions.c: __FBSDID("$FreeBSD$"); +@@ #include <netinet/sctp_kdtrace.h> #endif @@ netwerk/sctp/src/netinet/sctp_cc_functions.c: __FBSDID("$FreeBSD$"); #define SHIFT_MPTCP_MULTI 8 ## netwerk/sctp/src/netinet/sctp_indata.c ## -@@ netwerk/sctp/src/netinet/sctp_indata.c: __FBSDID("$FreeBSD$"); +@@ #if defined(__FreeBSD__) && !defined(__Userspace__) #include <netinet/sctp_lock_bsd.h> #endif @@ netwerk/sctp/src/netinet/sctp_indata.c: __FBSDID("$FreeBSD$"); * see if I should generate a sack into the chunk queue (if I have data to ## netwerk/sctp/src/netinet/sctp_input.c ## -@@ netwerk/sctp/src/netinet/sctp_input.c: __FBSDID("$FreeBSD$"); +@@ #include <sys/smp.h> #endif @@ netwerk/sctp/src/netinet/sctp_input.c: __FBSDID("$FreeBSD$"); { ## netwerk/sctp/src/netinet/sctp_output.c ## -@@ netwerk/sctp/src/netinet/sctp_output.c: __FBSDID("$FreeBSD$"); +@@ #if defined(__Userspace__) && defined(INET6) #include <netinet6/sctp6_var.h> #endif @@ netwerk/sctp/src/netinet/sctp_output.c: __FBSDID("$FreeBSD$"); #define SCTP_MAX_LINKHDR 16 ## netwerk/sctp/src/netinet/sctp_usrreq.c ## -@@ netwerk/sctp/src/netinet/sctp_usrreq.c: __FBSDID("$FreeBSD$"); +@@ #include <netinet/sctp_peeloff.h> #endif /* HAVE_SCTP_PEELOFF_SOCKOPT */ @@ netwerk/sctp/src/netinet/sctp_usrreq.c: __FBSDID("$FreeBSD$"); ## netwerk/sctp/src/netinet/sctputil.c ## -@@ netwerk/sctp/src/netinet/sctputil.c: __FBSDID("$FreeBSD$"); +@@ #endif #endif
Changed in Firefox 117: 250a15682f45ebd60ece61667d32e6a3990f3d94 removed XP stuff, introducing a conflict in one of our WebRTC patches. However, it was very easy to solve (basically, upstream removed the #else branch).
8: 2531022443202 ! 8: b5acb69cbf24b Bug 41459: WebRTC fails to build under mingw (Part 5) @@ dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-win32.c: stun_getadd - addrs[n].interface.type = NR_INTERFACE_TYPE_UNKNOWN; + addrs[n].iface.type = NR_INTERFACE_TYPE_UNKNOWN; } - #if (_WIN32_WINNT >= 0x0600) - /* Note: only >= Vista provide link speed information */ - addrs[n].interface.estimated_speed = tmpAddress->TransmitLinkSpeed / 1000; + addrs[n].iface.estimated_speed = tmpAddress->TransmitLinkSpeed / 1000; - #else -- addrs[n].interface.estimated_speed = 0; -+ addrs[n].iface.estimated_speed = 0; - #endif if (stun_win32_address_temp_v6(u)) { addrs[n].flags |= NR_ADDR_FLAG_TEMPORARY; + }
Changed in Firefox 127: 066516c72f4a76557fa036b3c6ba91e105e14748. Our change here is a oneliner. I tried to match which line it became after upstream's changes and reapplied the patch.
## dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs.c ##
-@@ dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs.c: nr_stun_filter_addrs(nr_local_addr addrs[], int remove_loopback, int remove_link
- for (i = 0; i < *count; ++i) {
- if (addrs[i].addr.ip_version == NR_IPV6) {
- if (nr_transport_addr_is_teredo(&addrs[i].addr)) {
-- addrs[i].interface.type |= NR_INTERFACE_TYPE_TEREDO;
-+ addrs[i].iface.type |= NR_INTERFACE_TYPE_TEREDO;
+@@ dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs.c: nr_stun_filter_addrs_for_ifname(nr_local_addr src[], const int src_begin, const
+
+ if (src[i].addr.ip_version == NR_IPV6) {
+ if (nr_transport_addr_is_teredo(&src[i].addr)) {
+- src[i].interface.type |= NR_INTERFACE_TYPE_TEREDO;
++ src[i].iface.type |= NR_INTERFACE_TYPE_TEREDO;
/* Prefer teredo over mac-based address. Probably will never see
* both. */
filter_mac_ipv6 = 1;
9: 3b4731d492d49 = 9: 200c7fb546d03 Bug 41459: WebRTC fails to build under mingw (Part 6)
10: 3f45e54877c78 = 10: 251dffcd972ca Bug 41854: Allow overriding download spam protection.
11: 987ce30a14430 = 11: 0bb396f9229a4 Adding issue and merge request templates
12: 309081e69b8ad = 12: 0d7c404d1b393 fixup! Adding issue and merge request templates
13: 8a5f711379f9b ! 13: f3d20b0c03e8b Base Browser's .mozconfigs. @@ mobile/android/moz.configure: option( +# The Build system doesn't allow multiple imply_option() +# calls with the same key. +# imply_option("MOZ_SERVICES_HEALTHREPORT", True) - imply_option("MOZ_ANDROID_HISTORY", True) - imply_option("--enable-small-chunk-size", True) + imply_option("MOZ_GECKOVIEW_HISTORY", True) + @@ mobile/android/moz.configure: def check_target(target): )
14: cc58ae4f68232 ! 14: 0e2a82bfe045e Tweaks to the build system @@ browser/installer/package-manifest.in +; @BINPATH@/browser/VisualElements/PrivateBrowsing_150.png +; @BINPATH@/browser/VisualElements/PrivateBrowsing_70.png #else + #ifndef XP_MACOSX @BINPATH@/@MOZ_APP_NAME@-bin - @BINPATH@/@MOZ_APP_NAME@ ## mobile/android/gradle/with_gecko_binaries.gradle ## @@ mobile/android/gradle/with_gecko_binaries.gradle: def hasCompileArtifacts() {
15: 3c5aa31b6bc3e ! 15: cd73a594122d5 Bug 41108: Remove privileged macOS installation from 102 @@ toolkit/xre/MacRunFromDmgUtils.mm: static void StripQuarantineBit(NSString* aBun -#ifdef MOZ_UPDATER +#if defined(MOZ_UPDATER) && !defined(BASE_BROWSER_VERSION) bool LaunchElevatedDmgInstall(NSString* aBundlePath, NSArray* aArguments) { - NSTask* task; - if (@available(macOS 10.13, *)) { + NSTask* task = [[NSTask alloc] init]; + [task setExecutableURL:[NSURL fileURLWithPath:aBundlePath]]; @@ toolkit/xre/MacRunFromDmgUtils.mm: static bool InstallFromPath(NSString* aBundlePath, NSString* aDestPath) { installSuccessful = true; }
Changed in Firefox 122, 443b9ec33f953328606e717c2ab229e7b994fa3e: upstream moved the check from nightly (NIGHTLY_BUILD) to a custom macro (BLOCK_LOADLIBRARY_INJECTION). The intention was to disable this feature because it created problems in nightly without removing the code (more details in the Bug), but maybe we could create a configure-time flag instead.
16: 851ae1b37e65a < -: ------------- Bug 41149: Re-enable DLL injection protection in all builds not just nightlies -: ------------- > 16: 248166a8ba365 Bug 41149: Re-enable DLL injection protection in all builds not just nightlies
17: d22a238f77bc2 ! 17: adadf09ec009f Bug 24796: Comment out excess permissions from GeckoView @@ Commit message ## mobile/android/geckoview/src/main/AndroidManifest.xml ## @@ - <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="org.mozilla.geckoview"> + + <manifest xmlns:android="http://schemas.android.com/apk/res/android"> +<!--#ifdef MOZ_ANDROID_NETWORK_STATE--> + <!--
18: 07c321d1021cf = 18: 6ff4705a239ee Bug 28125: Prevent non-Necko network connections
19: e64278ba27e22 = 19: 4c3d212e446d4 Bug 12974: Disable NTLM and Negotiate HTTP Auth
20: 79f944ce76a3f = 20: 49062463dca72 Bug 40166: Disable security.certerrors.mitm.auto_enable_enterprise_roots
Changed in Firefox 123, ee4631623c2ada746f08af0d7babc8cf510b47d7: Moz added a new DLL (wmfclearkey.dll). Notice that the difference is that the patch now comments it out (by adding ; at the beginning of the line).
21: 7003fdf17a4aa ! 21: 09284272b89d1 Bug 16285: Exclude ClearKey system for now @@ browser/installer/package-manifest.in: bin/libfreebl_64int_3.so ; media -@RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@ -@RESPATH@/gmp-clearkey/0.1/manifest.json +-#if defined(MOZ_WMF_CDM) && defined(ENABLE_TESTS) +-@BINPATH@/@DLL_PREFIX@wmfclearkey@DLL_SUFFIX@ +-#endif +;@RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@ +;@RESPATH@/gmp-clearkey/0.1/manifest.json ++;#if defined(MOZ_WMF_CDM) && defined(ENABLE_TESTS) ++;@BINPATH@/@DLL_PREFIX@wmfclearkey@DLL_SUFFIX@ ++;#endif #ifdef MOZ_DMD ; DMD
22: d877f3c46d5a4 = 22: 3786fb6b91287 Bug 21431: Clean-up system extensions shipped in Firefox
23: e6f4c54992ab7 ! 23: 6c62ee4ae050b Bug 33852: Clean up about:logins (LockWise) to avoid mentioning sync, etc. @@ Commit message Disable the "Create New Login" button when security.nocertdb is true. ## browser/components/aboutlogins/AboutLoginsParent.sys.mjs ## -@@ browser/components/aboutlogins/AboutLoginsParent.sys.mjs: XPCOMUtils.defineLazyGetter(lazy, "AboutLoginsL10n", () => { +@@ browser/components/aboutlogins/AboutLoginsParent.sys.mjs: ChromeUtils.defineLazyGetter(lazy, "AboutLoginsL10n", () => { const ABOUT_LOGINS_ORIGIN = "about:logins"; const AUTH_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes const PRIMARY_PASSWORD_NOTIFICATION_ID = "primary-password-login-required"; @@ browser/components/aboutlogins/AboutLoginsParent.sys.mjs: XPCOMUtils.defineLazyG // about:logins will always use the privileged content process, // even if it is disabled for other consumers such as about:newtab. @@ browser/components/aboutlogins/AboutLoginsParent.sys.mjs: export class AboutLoginsParent extends JSWindowActorParent { - importVisible: Services.policies.isAllowed("profileImport") && AppConstants.platform != "linux", + preselectedLogin: this.preselectedLogin, + canCreateLogins: !Services.prefs.getBoolPref(NOCERTDB_PREF, false), });
Changed in Firefox 118, 25d84b79059a4b0ae1ebd879ab2dd7f36dbd1c20: upstream removed these permissions themselves.
24: bd16b51251b27 ! 24: 4eb8a525f74a9 Bug 41457: Remove Mozilla permissions @@ browser/app/permissions -# Bug 1557153: www.mozilla.org gets a special workaround in UITourChild.sys.mjs -# Bug 1837407: support.mozilla.org gets a special workaround for similar reasons. -origin uitour 1 https://www.mozilla.org --origin uitour 1 https://monitor.firefox.com --origin uitour 1 https://screenshots.firefox.com -origin uitour 1 https://support.mozilla.org --origin uitour 1 https://truecolors.firefox.com -origin uitour 1 about:home -origin uitour 1 about:newtab - @@ browser/app/permissions -# Remote troubleshooting -origin remote-troubleshooting 1 https://support.mozilla.org - --# addon install --origin install 1 https://fpn.firefox.com -- -# autoplay video/audio -origin autoplay-media 1 about:welcome
25: 6e6efc86dc2d4 ! 25: eecdf78ff016d Bug 40002: Remove about:ion @@ Commit message ## browser/components/BrowserGlue.sys.mjs ## @@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = { - this._monitorScreenshotsPref(); + this._monitorWebcompatReporterPref(); this._monitorHTTPSOnlyPref(); - this._monitorIonPref(); @@ browser/components/about/AboutRedirector.cpp: static const RedirEntry kRedirMap[ - {"ion", "chrome://browser/content/ion.html", - nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT | - nsIAboutModule::IS_SECURE_CHROME_UI}, - }; - - static nsAutoCString GetAboutModuleName(nsIURI* aURI) { + {"profilemanager", "chrome://browser/content/profiles/profiles.html", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT | ## browser/components/about/components.conf ## @@ browser/components/about/components.conf: pages = [ - 'firefoxview-next', + 'firefoxview', 'messagepreview', 'newtab', - 'ion', @@ browser/components/about/components.conf: pages = [ ## browser/components/moz.build ## @@ browser/components/moz.build: DIRS += [ - "enterprisepolicies", "extensions", "firefoxview", + "genai", - "ion", "messagepreview", "migration",
26: 8014b817d5a3f = 26: 8f43883731667 Bug 26353: Prevent speculative connect that violated FPI.
This commit needs some work on our end. We're not handling this stuff in a smart way. There were lots of conflicts here.
I restored RemoteSettings because we don't remove references to it anymore, instead we early return.
27: 5f5e979eec975 ! 27: b3ff00a090c95 Bug 31740: Remove some unnecessary RemoteSettings instances @@ Commit message We also clear the collections database on the v2 -> v3 migration. ## browser/components/search/SearchSERPTelemetry.sys.mjs ## -@@ browser/components/search/SearchSERPTelemetry.sys.mjs: const lazy = {}; - - ChromeUtils.defineESModuleGetters(lazy, { - BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs", -- RemoteSettings: "resource://services-settings/remote-settings.sys.mjs", - SearchUtils: "resource://gre/modules/SearchUtils.sys.mjs", - }); -
TELEMETRY_SETTINGS_KEY is also now referenced (in the constructor of RemoteSettings we don't strip anymore). Upstream also added new keys.
-@@ browser/components/search/SearchSERPTelemetry.sys.mjs: const SEARCH_AD_CLICKS_SCALAR_BASE = "browser.search.adclicks.";
- const SEARCH_DATA_TRANSFERRED_SCALAR = "browser.search.data_transferred";
- const SEARCH_TELEMETRY_PRIVATE_BROWSING_KEY_SUFFIX = "pb";
-
--// Exported for tests.
--export const TELEMETRY_SETTINGS_KEY = "search-telemetry-v2";
--
- const impressionIdsWithoutEngagementsSet = new Set();
-
- XPCOMUtils.defineLazyGetter(lazy, "logConsole", () => {
Indeed, here's where we do the early-returns.
@@ browser/components/search/SearchSERPTelemetry.sys.mjs: class TelemetryHandler {
+ * can be tracked.
+ */
+ async init() {
+- if (this._initialized) {
++ if (this._initialized || true) {
return;
}
-- this._telemetrySettings = lazy.RemoteSettings(TELEMETRY_SETTINGS_KEY);
- let rawProviderInfo = [];
-- try {
-- rawProviderInfo = await this._telemetrySettings.get();
-- } catch (ex) {
-- lazy.logConsole.error("Could not get settings:", ex);
-- }
-
- // Send the provider info to the child handler.
- this._contentHandler.init(rawProviderInfo);
+@@ browser/components/search/SearchSERPTelemetry.sys.mjs: class DomainToCategoriesMap {
+ * reuse the store if the version in each record matches the store.
+ */
+ async #setupClientAndStore() {
++ return;
+ if (this.#client && !this.empty) {
+ return;
+ }
Some range-diff noise.
## docshell/base/nsAboutRedirector.cpp ##
@@ docshell/base/nsAboutRedirector.cpp: static const RedirEntry kRedirMap[] = {
- nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
+ nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
nsIAboutModule::HIDE_FROM_ABOUTABOUT},
+#ifndef BASE_BROWSER_VERSION
{"url-classifier", "chrome://global/content/aboutUrlClassifier.xhtml",
@@ security/manager/ssl/RemoteSecuritySettings.sys.mjs: class CRLiteFilters {
Ci.nsICertStorage.DATA_TYPE_CRLITE_FILTER_FULL
);
- ## services/settings/IDBHelpers.jsm ##
-@@ services/settings/IDBHelpers.jsm: async function openIDB(allowUpgrades = true) {
+ ## services/settings/IDBHelpers.sys.mjs ##
+@@ services/settings/IDBHelpers.sys.mjs: async function openIDB(allowUpgrades = true) {
});
}
if (event.oldVersion < 3) {
@@ services/settings/IDBHelpers.jsm: async function openIDB(allowUpgrades = true) {
keyPath: ["cid", "attachmentId"],
In Firefox 126 with commit d1e65e8eb331012e2a5545a92131906b3a592895, upstream reorganized the settings dump. As a matter of fact, this is mostly a change of indentation for us.
## services/settings/dumps/main/moz.build ##
-@@
+@@ services/settings/dumps/main/moz.build: if CONFIG["MOZ_BUILD_APP"] == "browser":
+ # These collections are only referenced from browser/
+ FINAL_TARGET_FILES.defaults.settings.main += [
+ "language-dictionaries.json",
+- "search-telemetry-v2.json",
+- "sites-classification.json",
+- "top-sites.json",
+ ]
+
+ # These collections are referenced in toolkit/ or other core code, however
+@@ services/settings/dumps/main/moz.build: if not CONFIG["MOZ_BUILD_APP"].startswith("mobile/"):
FINAL_TARGET_FILES.defaults.settings.main += [
"anti-tracking-url-decoration.json",
"cookie-banner-rules-list.json",
@@ services/settings/dumps/main/moz.build
- "devtools-devices.json",
"example.json",
"hijack-blocklists.json",
- "language-dictionaries.json",
-- "password-recipes.json",
"password-rules.json",
+- "search-config-icons.json",
+- "search-config-overrides-v2.json",
+- "search-config-overrides.json",
+- "search-config-v2.json",
- "search-config.json",
"search-default-override-allowlist.json",
-- "search-telemetry-v2.json",
-- "sites-classification.json",
-- "top-sites.json",
+ "translations-models.json",
+ "translations-wasm.json",
- "url-classifier-skip-urls.json",
"websites-with-shared-credential-backends.json",
]
-
-
- ## services/settings/dumps/security-state/moz.build ##
-@@
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- FINAL_TARGET_FILES.defaults.settings["security-state"] += [
-- "intermediates.json",
- "onecrl.json",
- ]
-
+-
+-# These collections are referenced in toolkit/ or other core code.
+-FINAL_TARGET_FILES.defaults.settings.main += [
+- "password-recipes.json",
+-]
+-
I have no clue about whether we want these or not. I deleted them for consistency, but I wouldn't be too surprised if we could keep them. In any case, audit first. They were added with 2664458c02905ef1883d64765486345cfb249e57 in Firefox 123.
+-# These search config icons only apply to desktop.
+-if CONFIG["MOZ_BUILD_APP"] == "browser":
+- FINAL_TARGET_FILES.defaults.settings.main["search-config-icons"] += [
+- "search-config-icons/001500a9-1a6c-3f5a-ba15-a5f5a075d256",
+- "search-config-icons/001500a9-1a6c-3f5a-ba15-a5f5a075d256.meta.json",
+- "search-config-icons/06cf7432-efd7-f244-927b-5e423005e1ea",
+- "search-config-icons/06cf7432-efd7-f244-927b-5e423005e1ea.meta.json",
+- "search-config-icons/0d7668a8-c3f4-cfee-cbc8-536511528937",
+- "search-config-icons/0d7668a8-c3f4-cfee-cbc8-536511528937.meta.json",
+- "search-config-icons/0eec5640-6fde-d6fe-322a-c72c6d5bd5a2",
+- "search-config-icons/0eec5640-6fde-d6fe-322a-c72c6d5bd5a2.meta.json",
+- "search-config-icons/101ce01d-2691-b729-7f16-9d389803384b",
+- "search-config-icons/101ce01d-2691-b729-7f16-9d389803384b.meta.json",
+- "search-config-icons/177aba42-9bed-4078-e36b-580e8794cd7f",
+- "search-config-icons/177aba42-9bed-4078-e36b-580e8794cd7f.meta.json",
+- "search-config-icons/25de0352-aabb-d31f-15f7-bf9299fb004c",
+- "search-config-icons/25de0352-aabb-d31f-15f7-bf9299fb004c.meta.json",
+- "search-config-icons/2bbe48f4-d3b8-c9e0-86e3-a54c37ec3335",
+- "search-config-icons/2bbe48f4-d3b8-c9e0-86e3-a54c37ec3335.meta.json",
+- "search-config-icons/2e835b0e-9709-d1bb-9725-87f59f3445ca",
+- "search-config-icons/2e835b0e-9709-d1bb-9725-87f59f3445ca.meta.json",
+- "search-config-icons/32d26d19-aeb0-5c01-32e8-f8970be9246f",
+- "search-config-icons/32d26d19-aeb0-5c01-32e8-f8970be9246f.meta.json",
+- "search-config-icons/47da97b5-600f-c450-fd15-a52bb2169c11",
+- "search-config-icons/47da97b5-600f-c450-fd15-a52bb2169c11.meta.json",
+- "search-config-icons/4e271681-3e0f-91ac-9750-03f665efc171",
+- "search-config-icons/4e271681-3e0f-91ac-9750-03f665efc171.meta.json",
+- "search-config-icons/50f6171f-8e7a-b41b-862e-f97397038fb2",
+- "search-config-icons/50f6171f-8e7a-b41b-862e-f97397038fb2.meta.json",
+- "search-config-icons/5ded611d-44b2-dc46-fd67-fb116888d75d",
+- "search-config-icons/5ded611d-44b2-dc46-fd67-fb116888d75d.meta.json",
+- "search-config-icons/5e03d6f4-6ee9-8bc8-cf22-7a5f2cf55c41",
+- "search-config-icons/5e03d6f4-6ee9-8bc8-cf22-7a5f2cf55c41.meta.json",
+- "search-config-icons/6a83583a-f0ba-fd39-2fdb-fd2b6990ea3b",
+- "search-config-icons/6a83583a-f0ba-fd39-2fdb-fd2b6990ea3b.meta.json",
+- "search-config-icons/6d10d702-7bd6-1452-90a5-3df665a38f66",
+- "search-config-icons/6d10d702-7bd6-1452-90a5-3df665a38f66.meta.json",
+- "search-config-icons/6f4da442-d31e-28f8-03af-797d16bbdd27",
+- "search-config-icons/6f4da442-d31e-28f8-03af-797d16bbdd27.meta.json",
+- "search-config-icons/70fdd651-6c50-b7bb-09ec-7e85da259173",
+- "search-config-icons/70fdd651-6c50-b7bb-09ec-7e85da259173.meta.json",
+- "search-config-icons/74793ce1-a918-a5eb-d3c0-2aadaff3c88c",
+- "search-config-icons/74793ce1-a918-a5eb-d3c0-2aadaff3c88c.meta.json",
+- "search-config-icons/7bbe6c5c-fdb8-2845-a4f4-e1382e708a0e",
+- "search-config-icons/7bbe6c5c-fdb8-2845-a4f4-e1382e708a0e.meta.json",
+- "search-config-icons/7efbed51-813c-581d-d8d3-f8758434e451",
+- "search-config-icons/7efbed51-813c-581d-d8d3-f8758434e451.meta.json",
+- "search-config-icons/84bb4962-e571-227a-9ef6-2ac5f2aac361",
+- "search-config-icons/84bb4962-e571-227a-9ef6-2ac5f2aac361.meta.json",
+- "search-config-icons/87ac4cde-f581-398b-1e32-eb4079183b36",
+- "search-config-icons/87ac4cde-f581-398b-1e32-eb4079183b36.meta.json",
+- "search-config-icons/8831ce10-b1e4-6eb4-4975-83c67457288e",
+- "search-config-icons/8831ce10-b1e4-6eb4-4975-83c67457288e.meta.json",
+- "search-config-icons/890de5c4-0941-a116-473a-5d240e79497a",
+- "search-config-icons/890de5c4-0941-a116-473a-5d240e79497a.meta.json",
+- "search-config-icons/91a9672d-e945-8e1e-0996-aefdb0190716",
+- "search-config-icons/91a9672d-e945-8e1e-0996-aefdb0190716.meta.json",
+- "search-config-icons/96327a73-c433-5eb4-a16d-b090cadfb80b",
+- "search-config-icons/96327a73-c433-5eb4-a16d-b090cadfb80b.meta.json",
+- "search-config-icons/a06db97d-1210-ea2e-5474-0e2f7d295bfd",
+- "search-config-icons/a06db97d-1210-ea2e-5474-0e2f7d295bfd.meta.json",
+- "search-config-icons/a06dc3fd-4bdb-41f3-2ebc-4cbed06a9bd3",
+- "search-config-icons/a06dc3fd-4bdb-41f3-2ebc-4cbed06a9bd3.meta.json",
+- "search-config-icons/a2c7d4e9-f770-51e1-0963-3c2c8401631d",
+- "search-config-icons/a2c7d4e9-f770-51e1-0963-3c2c8401631d.meta.json",
+- "search-config-icons/b64f09fd-52d1-c48e-af23-4ce918e7bf3b",
+- "search-config-icons/b64f09fd-52d1-c48e-af23-4ce918e7bf3b.meta.json",
+- "search-config-icons/b8ca5a94-8fff-27ad-6e00-96e244a32e21",
+- "search-config-icons/b8ca5a94-8fff-27ad-6e00-96e244a32e21.meta.json",
+- "search-config-icons/c411adc1-9661-4fb5-a4c1-8cfe74911943",
+- "search-config-icons/c411adc1-9661-4fb5-a4c1-8cfe74911943.meta.json",
+- "search-config-icons/cbf9e891-d079-2b28-5617-283450d463dd",
+- "search-config-icons/cbf9e891-d079-2b28-5617-283450d463dd.meta.json",
+- "search-config-icons/d87f251c-3e12-a8bf-e2d0-afd43d36c5f9",
+- "search-config-icons/d87f251c-3e12-a8bf-e2d0-afd43d36c5f9.meta.json",
+- "search-config-icons/e02f23df-8d48-2b1b-3b5c-6dd27302c61c",
+- "search-config-icons/e02f23df-8d48-2b1b-3b5c-6dd27302c61c.meta.json",
+- "search-config-icons/e718e983-09aa-e8f6-b25f-cd4b395d4785",
+- "search-config-icons/e718e983-09aa-e8f6-b25f-cd4b395d4785.meta.json",
+- "search-config-icons/e7547f62-187b-b641-d462-e54a3f813d9a",
+- "search-config-icons/e7547f62-187b-b641-d462-e54a3f813d9a.meta.json",
+- "search-config-icons/f312610a-ebfb-a106-ea92-fd643c5d3636",
+- "search-config-icons/f312610a-ebfb-a106-ea92-fd643c5d3636.meta.json",
+- "search-config-icons/fa0fc42c-d91d-fca7-34eb-806ff46062dc",
+- "search-config-icons/fa0fc42c-d91d-fca7-34eb-806ff46062dc.meta.json",
+- "search-config-icons/fca3e3ee-56cd-f474-dc31-307fd24a891d",
+- "search-config-icons/fca3e3ee-56cd-f474-dc31-307fd24a891d.meta.json",
+- "search-config-icons/fed4f021-ff3e-942a-010e-afa43fda2136",
+- "search-config-icons/fed4f021-ff3e-942a-010e-afa43fda2136.meta.json",
+- ]
More noise
## services/settings/remote-settings.sys.mjs ##
@@ services/settings/remote-settings.sys.mjs: function remoteSettingsFunction() {
- full = false,
- } = {}) => {
+ return;
+ }
// When running in full mode, we ignore last polling status.
- if (full) {
+ if (full || AppConstants.BASE_BROWSER_VERSION) {
@@ toolkit/components/antitracking/components.conf: Classes = [
Upstream changed a line we used to remove in 91ba1cb671d238c90f15bec3a4ad0ba7e3ae6f14 (Firefox 120), so we now remove what replaced it.
## toolkit/components/search/SearchService.sys.mjs ##
@@ toolkit/components/search/SearchService.sys.mjs: export class SearchService {
- // See if we have a settings file so we don't have to parse a bunch of XML.
- let settings = await this._settings.get();
+ // start listening straight away.
+ Services.obs.addObserver(this, lazy.Region.REGION_TOPIC);
-- this.#setupRemoteSettings().catch(console.error);
+- this.#getIgnoreListAndSubscribe().catch(ex =>
+- console.error(ex, "Search Service could not get the ignore list.")
+- );
-
- await this.#loadEngines(settings);
-
- // If we've got this far, but the application is now shutting down,
+ if (lazy.SearchUtils.newSearchConfigEnabled) {
+ this.#engineSelector = new lazy.SearchEngineSelector(
+ this.#handleConfigurationUpdated.bind(this)
## toolkit/modules/IgnoreLists.sys.mjs ##
@@
Also a consequence of the settings dump reorganization (d1e65e8eb331012e2a5545a92131906b3a592895 of Firefox 126). I had to restore the FINAL_TARGET_FILES since upstream doesn't use it anymore. I think the rationale was to move the DOH configuration to desktop-only, but I think we do query stripping also on Android (but I haven't checked).
28: d00d9d04bf433 ! 28: f2dde5bd5945c Bug 41092: Add a RemoteSettings JSON dump for query-stripping @@ Commit message ## services/settings/static-dumps/main/moz.build ## @@ - FINAL_TARGET_FILES.defaults.settings.main += [ - "doh-config.json", - "doh-providers.json", -+ "query-stripping.json", - ] + # 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/. ++FINAL_TARGET_FILES.defaults.settings.main += [ ++ "query-stripping.json", ++] ++ if CONFIG["MOZ_BUILD_APP"] == "browser": + DIST_SUBDIR = "browser" + ## services/settings/static-dumps/main/query-stripping.json (new) ## @@
Very recently (one of the latest commits before Firefox 128b1), Moz created yet another experimentation API (featuregates). We should check them (#42623).
29: 45e5f02f49e60 ! 29: bc63e49f0e358 Bug 41635: Disable the Normandy component @@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = { + } + }, () => lazy.RFPHelper.uninit(), + () => lazy.ShoppingUtils.uninit(), () => lazy.ASRouterNewTabHook.destroy(), - () => { ## toolkit/components/moz.build ## -@@ toolkit/components/moz.build: if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android": - ] +@@ toolkit/components/moz.build: if CONFIG["MOZ_WIDGET_TOOLKIT"] not in ("android", "windows"): + DIRS += ["aboutwebauthn"] if CONFIG["MOZ_BUILD_APP"] == "browser": -- DIRS += ["normandy", "messaging-system"] +- DIRS += ["featuregates", "messaging-system", "normandy"] + if CONFIG["MOZ_NORMANDY"]: + DIRS += ["normandy"] -+ DIRS += ["messaging-system"] ++ DIRS += ["featuregates", "messaging-system"] DIRS += ["nimbus"]
30: ee4700b8993da = 30: 0d1640a37eda6 Bug 30541: Disable WebGL readPixel() for web content
Added in 125 to change the RFPTarget.
-: ------------- > 31: d7cb3bbef9be8 keepforreview! Bug 30541: Disable WebGL readPixel() for web content
Changed in Firefox 125. The change of indentation is due to d9487d16333025cc5bfd80713b19cf62e047d614 (Bug 1881360), but nothing should have changed for us. Also, new nmhproxy (Native Messaging Host Proxy) executable (macOS + Windows).
31: f15319c14c201 ! 32: 687f09765f98a Bug 28369: Stop shipping pingsender executable @@ Commit message ## browser/app/macbuild/Contents/MacOS-files.in ## @@ - #if defined(MOZ_CRASHREPORTER) /minidump-analyzer #endif + /nmhproxy -/pingsender /pk12util /ssltunnel @@ browser/installer/package-manifest.in: bin/libfreebl_64int_3.so -; -@BINPATH@/pingsender@BIN_SUFFIX@ - - ; [ Notification COM Server ] + ; [ Native Messaging Host Proxy ] ; - #if defined(MOZ_NOTIFICATION_SERVER) + #if defined(XP_WIN) || defined(XP_MACOSX) ## browser/installer/windows/nsis/shared.nsh ## @@ browser/installer/windows/nsis/shared.nsh: ${RemoveDefaultBrowserAgentShortcut} - Push "crashreporter.exe" Push "default-browser-agent.exe" Push "minidump-analyzer.exe" + Push "nmhproxy.exe" - Push "pingsender.exe" Push "updater.exe" Push "mozwer.dll" @@ python/mozbuild/mozbuild/artifacts.py: class LinuxArtifactJob(ArtifactJob): "{product}/updater", "{product}/glxtest", @@ python/mozbuild/mozbuild/artifacts.py: class MacArtifactJob(ArtifactJob): - "{product}-bin", "*.dylib", "minidump-analyzer", + "nmhproxy", - "pingsender", "plugin-container.app/Contents/MacOS/plugin-container", "updater.app/Contents/MacOS/org.mozilla.updater",
Upstream changes from Firefox 120, 9e7b132bbbb6caf3a8b69ebf6bc8345097c9497f. enabled is a getter now. It doesn't have a setter, but the pref enabled reads is set by selfDestruct.
32: d9433d84ba410 ! 33: bfd9a7fe6330d Bug 41568: Disable LaterRun @@ browser/components/BrowserContentHandler.sys.mjs: nsBrowserContentHandler.protot "startup.homepage_welcome_url.additional" ); - // Turn on 'later run' pages for new profiles. -- lazy.LaterRun.enabled = true; +- lazy.LaterRun.enable(lazy.LaterRun.ENABLE_REASON_NEW_PROFILE); + // Disable 'later run' pages for new profiles (tor-browser#41568) -+ lazy.LaterRun.enabled = false; ++ lazy.LaterRun.selfDestruct(); break; - case OVERRIDE_NEW_MSTONE: + case OVERRIDE_NEW_MSTONE: { // Check whether we will restore a session. If we will, we assume
Changed in Firefox 117, 7e60f84b6ec7c303e07f303a4838e907265a9a05. Upstream removed the entire block we used to change because Windows 7 and 8 aren't supported anymore. I copied the whole block from the old branch (but I haven't verified it works as intended, i.e., that upstream hasn't changed the selectors).
33: 13504ce319ba3 < -: ------------- Bug 40717: Hide Windows SSO in settings -: ------------- > 34: d0e7fb38e8ada Bug 40717: Hide Windows SSO in settings
34: 274b50da33373 = 35: 13ef1c1f0ecb0 Bug 41599: Always return an empty string as network ID
Changed in Firefox 124: new lazy import added in 05cb18acc49ae5397a8274bd160121ffe25714fd. I thought there was a conflict also below and I reworked the patch to comment only the various return instead of the full block, which makes it easier to deal with any additions and simplifies the patch a lot.
35: 1d221df27eb50 < -: ------------- Bug 41327: Disable UrlbarProviderInterventions -: ------------- > 36: 4a61d22b58090 Bug 41327: Disable UrlbarProviderInterventions
The main change is that upstream removed firefoxview-next in c94ba222c4815705416bd92cbad2aceca073874d (Firefox 123). Other changes include the recent addition of the genai page.
36: c1e9702c18cf6 ! 37: fde807231f0db Bug 42037: Disable about:firefoxview page @@ browser/components/about/AboutRedirector.cpp: static const RedirEntry kRedirMap[ nsIAboutModule::IS_SECURE_CHROME_UI}, - {"firefoxview", "chrome://browser/content/firefoxview/firefoxview.html", - nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI | -- nsIAboutModule::HIDE_FROM_ABOUTABOUT}, -- {"firefoxview-next", -- "chrome://browser/content/firefoxview/firefoxview-next.html", -- nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI | - nsIAboutModule::HIDE_FROM_ABOUTABOUT}, {"policies", "chrome://browser/content/policies/aboutPolicies.html", nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI}, @@ browser/components/about/components.conf: pages = [ 'logins', 'loginsimportreport', - 'firefoxview', -- 'firefoxview-next', 'messagepreview', 'newtab', 'pocket-home', @@ browser/components/moz.build: DIRS += [ "enterprisepolicies", "extensions", - "firefoxview", + "genai", "messagepreview", "migration", - "newtab",
This first block is range-diff noise.
37: e5817a1aafd8b ! 38: 31189103635f0 Firefox preference overrides. @@ Commit message reasons to keep them. ## .eslintignore ## -@@ .eslintignore: browser/extensions/translations/extension/ - # "scaffolding" used by uniffi which isn't valid JS in its original form. - toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/ - toolkit/components/uniffi-bindgen-gecko-js/components/generated/* +@@ .eslintignore: toolkit/components/uniffi-bindgen-gecko-js/components/generated/* + # Test files for circular import in modules. + dom/base/test/jsmodules/import_circular.mjs + dom/base/test/jsmodules/import_circular_1.mjs + +browser/app/profile/001-base-profile.js @@ browser/app/profile/firefox.js: pref("extensions.recommendations.themeRecommenda +pref("extensions.systemAddon.update.enabled", false); // Disable add-ons that are not installed by the user in all scopes by default. - // See the SCOPE constants in AddonManager.jsm for values to use here. + // See the SCOPE constants in AddonManager.sys.mjs for values to use here. ## browser/installer/package-manifest.in ## @@ - @RESPATH@/browser/defaults/settings/blocklists - @RESPATH@/browser/defaults/settings/main - @RESPATH@/browser/defaults/settings/security-state + @RESPATH@/browser/defaults/permissions + ; Remote Settings JSON dumps + @RESPATH@/browser/defaults/settings +@RESPATH@/browser/@PREF_DIR@/001-base-profile.js - ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325) - ; Technically this is an app pref file, but we are keeping it in the original + # channel-prefs.js has been removed on macOS. + #ifndef XP_MACOSX ## browser/moz.build ## @@ browser/moz.build: if CONFIG["MOZ_ARTIFACT_BUILDS"]: @@ browser/moz.build: if CONFIG["MOZ_ARTIFACT_BUILDS"]: "app/profile/firefox.js", ] FINAL_TARGET_FILES.defaults += ["app/permissions"] -
Changed in Firefox 116, f0c3ad095a44780e4957236341f13a8f27af9a44: app.update.url.android was removed.
- ## mobile/android/app/mobile.js ##
-@@ mobile/android/app/mobile.js: pref("app.update.timerMinimumDelay", 30); // seconds
- // used by update service to decide whether or not to
- // automatically download an update
- pref("app.update.autodownload", "wifi");
-+#ifdef BASE_BROWSER_VERSION
-+pref("app.update.url.android", "");
-+#else
- pref("app.update.url.android", "https://aus5.mozilla.org/update/4/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%MOZ_VERSION%/update.xml");
-+#endif
-
- #ifdef MOZ_UPDATER
- /* prefs used specifically for updating the app */
-
Changed in Firefox 127, ce6e44b823ff75640a04cab9f9aaf88521ffd156: the list of files to lint (for prefs) has been moved to tools/lint/lintpref.yml. The new list is directory-based, so we don't have to change it anymore.
- ## taskcluster/ci/source-test/mozlint.yml ##
-@@ taskcluster/ci/source-test/mozlint.yml: lintpref:
- files-changed:
- - 'modules/libpref/init/all.js'
- - 'modules/libpref/init/StaticPrefList.yaml'
-+ - 'browser/app/profile/001-base-profile.js'
- - 'browser/app/profile/firefox.js'
- - 'mobile/android/app/mobile.js'
- - 'devtools/client/preferences/debugger.js'
38: 912d21fe96855 = 39: 593d72e76b447 fixup! Firefox preference overrides.
39: 1f6724cb9102c = 40: 37705ed76df34 Bug 41043: Hardcode the UI font on Linux
40: ccd0ba8d29783 = 41: 956b22085ff92 Bug 41901: Hardcode normalized FontSubstitutes.
Updated the RFPTarget.
-: ------------- > 42: 015651fe3452a keepforreview! Bug 41901: Hardcode normalized FontSubstitutes.
Esmification (Firefox 116, 1057f41c45510dd6ea333901e37a43ef947b12b8) + some files are in mobile/shared rather than mobile/android (Firefox 128, 21bcae940a19e81634d0facfca620c443cd76bea). Compare with the third block
41: e21df9c2e2902 ! 43: 4ac63739251a0 Bug 30605: Honor privacy.spoof_english in Android @@ Commit message Bug 40198: Expose privacy.spoof_english pref in GeckoView - ## mobile/android/components/geckoview/GeckoViewStartup.jsm ## -@@ mobile/android/components/geckoview/GeckoViewStartup.jsm: ChromeUtils.defineESModuleGetters(lazy, { - EventDispatcher: "resource://gre/modules/Messaging.sys.mjs", - PdfJs: "resource://pdf.js/PdfJs.sys.mjs", - Preferences: "resource://gre/modules/Preferences.sys.mjs", -+ RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs", - }); - - const { XPCOMUtils } = ChromeUtils.importESModule( -@@ mobile/android/components/geckoview/GeckoViewStartup.jsm: class GeckoViewStartup { - if (aData.requestedLocales) { - Services.locale.requestedLocales = aData.requestedLocales; - } -+ lazy.RFPHelper._handleSpoofEnglishChanged(); -+ if (Services.prefs.getIntPref("privacy.spoof_english", 0) === 2) { -+ break; -+ } - const pls = Cc["@mozilla.org/pref-localizedstring;1"].createInstance( - Ci.nsIPrefLocalizedString - ); -
Range-diff noise, you can ignore it.
## mobile/android/geckoview/api.txt ##
@@ mobile/android/geckoview/api.txt: package org.mozilla.geckoview {
method public boolean getRemoteDebuggingEnabled();
method @Nullable public GeckoRuntime getRuntime();
method @Nullable public Rect getScreenSizeOverride();
+ method public boolean getSpoofEnglish();
- method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
- method public boolean getUseMaxScreenDepth();
- method public boolean getWebFontsEnabled();
+ method public boolean getTranslationsOfferPopup();
+ method @NonNull public String getTrustedRecursiveResolverUri();
+ method public int getTrustedRecusiveResolverMode();
@@ mobile/android/geckoview/api.txt: package org.mozilla.geckoview {
method @NonNull public GeckoRuntimeSettings setLoginAutofillEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int);
method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
+ method @NonNull public GeckoRuntimeSettings setSpoofEnglish(boolean);
- method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean);
- method @NonNull public GeckoRuntimeSettings setWebManifestEnabled(boolean);
- field public static final int ALLOW_ALL = 0;
+ method @NonNull public GeckoRuntimeSettings setTranslationsOfferPopup(boolean);
+ method @NonNull public GeckoRuntimeSettings setTrustedRecursiveResolverMode(int);
+ method @NonNull public GeckoRuntimeSettings setTrustedRecursiveResolverUri(@NonNull String);
@@ mobile/android/geckoview/api.txt: package org.mozilla.geckoview {
method @NonNull public GeckoRuntimeSettings.Builder preferredColorScheme(int);
method @NonNull public GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
+ method @NonNull public GeckoRuntimeSettings.Builder spoofEnglish(boolean);
- method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
- method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
- method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
+ method @NonNull public GeckoRuntimeSettings.Builder translationsOfferPopup(boolean);
+ method @NonNull public GeckoRuntimeSettings.Builder trustedRecursiveResolverMode(int);
+ method @NonNull public GeckoRuntimeSettings.Builder trustedRecursiveResolverUri(@NonNull String);
## mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java ##
@@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java: public final class GeckoRuntimeSettings extends RuntimeSettings {
- getSettings().setAllowInsecureConnections(level);
+ getSettings().setLargeKeepaliveFactor(factor);
return this;
}
+
@@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSetting
private GeckoRuntime mRuntime;
@@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java: public final class GeckoRuntimeSettings extends RuntimeSettings {
- /* package */ final Pref<Boolean> mHttpsOnlyPrivateMode =
- new Pref<Boolean>("dom.security.https_only_mode_pbm", false);
- /* package */ final Pref<Integer> mProcessCount = new Pref<>("dom.ipc.processCount", 2);
+ new Pref<Boolean>("privacy.globalprivacycontrol.pbmode.enabled", true);
+ /* package */ final Pref<Boolean> mGlobalPrivacyControlFunctionalityEnabled =
+ new Pref<Boolean>("privacy.globalprivacycontrol.functionality.enabled", true);
+ /* package */ final Pref<Integer> mSpoofEnglish = new Pref<>("privacy.spoof_english", 0);
/* package */ int mPreferredColorScheme = COLOR_SCHEME_SYSTEM;
@@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSetting
@Override // Parcelable
public void writeToParcel(final Parcel out, final int flags) {
super.writeToParcel(out, flags);
+
Here is where the first block was moved. Notice the difference in the background of the + signs.
+ ## mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs ##
+@@ mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, {
+ ActorManagerParent: "resource://gre/modules/ActorManagerParent.sys.mjs",
+ EventDispatcher: "resource://gre/modules/Messaging.sys.mjs",
+ PdfJs: "resource://pdf.js/PdfJs.sys.mjs",
++ RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs",
+ });
+
+ const { debug, warn } = GeckoViewUtils.initLogging("Startup");
+@@ mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs: export class GeckoViewStartup {
+ if (aData.requestedLocales) {
+ Services.locale.requestedLocales = aData.requestedLocales;
+ }
++ lazy.RFPHelper._handleSpoofEnglishChanged();
++ if (Services.prefs.getIntPref("privacy.spoof_english", 0) === 2) {
++ break;
++ }
+ const pls = Cc["@mozilla.org/pref-localizedstring;1"].createInstance(
+ Ci.nsIPrefLocalizedString
+ );
Changed in Firefox 125, a3d5a112ddb2d665b0c7ac2919b6f4fc6c97366c: getDefaultLocales has been renamed to getSystemLocalesForAcceptLanguage upstream.
42: 8c79dbddaa97c ! 44: 4639e6ca3f2df Bug 42562: Normalized the Accepted Languages on Android. @@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSetting * Sets whether we should spoof locale to English for webpages. * @@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java: public final class GeckoRuntimeSettings extends RuntimeSettings { - /* package */ int mScreenHeightOverride; /* package */ Class<? extends Service> mCrashHandler; /* package */ String[] mRequestedLocales; + /* package */ ExperimentDelegate mExperimentDelegate; + /* package */ HashMap<Locale, Locale> mSupportedLocales = new HashMap<>(); - /* package */ RuntimeTelemetry.Proxy mTelemetryProxy; /** + * Attach and commit the settings to the given runtime. @@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java: public final class GeckoRuntimeSettings extends RuntimeSettings { mRequestedLocales = settings.mRequestedLocales; mConfigFilePath = settings.mConfigFilePath; - mTelemetryProxy = settings.mTelemetryProxy; + mExperimentDelegate = settings.mExperimentDelegate; + mSupportedLocales = settings.mSupportedLocales; } @@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSetting } } - // OS prefs come second: -- for (final String locale : getDefaultLocales()) { +- for (final String locale : getSystemLocalesForAcceptLanguage()) { - final String localeLowerCase = locale.toLowerCase(Locale.ROOT); - if (!locales.containsKey(localeLowerCase)) { - locales.put(localeLowerCase, locale); + if (locale == null) { -+ for (final String tag : getDefaultLocales()) { ++ for (final String tag : getSystemLocalesForAcceptLanguage()) { + locale = getLocaleIfSupported(tag); + if (locale != null) { + break; @@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSetting + return acceptLanguages; } - private static String[] getDefaultLocales() { + private static String[] getSystemLocalesForAcceptLanguage() {
43: 138b275e3fbf8 = 45: cc0bf3a315214 fixup! Bug 42562: Normalized the Accepted Languages on Android.
44: 3acbff1dc98c2 = 46: c43bf4544e37d Bug 40171: Make WebRequest and GeckoWebExecutor First-Party aware
45: 700167faf5d4e ! 47: 4988e8a204d10 Bug 26345: Hide tracking protection UI @@ browser/components/about/AboutRedirector.cpp: static const RedirEntry kRedirMap[ - nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT | - nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS | - nsIAboutModule::IS_SECURE_CHROME_UI}, - }; - - static nsAutoCString GetAboutModuleName(nsIURI* aURI) { + {"profilemanager", "chrome://browser/content/profiles/profiles.html", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT | ## browser/components/about/components.conf ## @@ browser/components/about/components.conf: pages = [ @@ browser/components/about/components.conf: pages = [ 'preferences', 'privatebrowsing', - 'protections', + 'profilemanager', 'profiling', 'reader', - 'restartrequired', ## browser/components/moz.build ## @@ browser/components/moz.build: DIRS += [ @@ browser/components/moz.build: DIRS += [ "prompts", - "protections", "protocolhandler", + "reportbrokensite", "resistfingerprinting", - "screenshots", ## browser/themes/shared/preferences/privacy.css ## @@
Changed in Firefox 122, 9a99e148627e0ced4407c3d64e63872ca79f86d0: upstream removed the useProfile variable. But we still need it, so I restored it.
46: 24a0d8f36bbfd ! 48: a6d6cb78791c7 Bug 9173: Change the default Firefox profile directory to be relative. @@ toolkit/xre/nsXREDirProvider.h: class nsXREDirProvider final : public nsIDirecto ## widget/windows/WinTaskbar.cpp ## @@ widget/windows/WinTaskbar.cpp: bool WinTaskbar::GenerateAppUserModelID(nsAString& aAppUserModelId, + bool aPrivateBrowsing) { // If marked as such in prefs, use a hash of the profile path for the id // instead of the install path hash setup by the installer. - bool useProfile = Preferences::GetBool("taskbar.grouping.useprofile", false); +- if (Preferences::GetBool("taskbar.grouping.useprofile", false)) { ++ bool useProfile = Preferences::GetBool("taskbar.grouping.useprofile", false); + + { + // For portable mode, force the AUMID to be based on the profile directory @@ widget/windows/WinTaskbar.cpp: bool WinTaskbar::GenerateAppUserModelID(nsAString + } + } + - if (useProfile) { ++ if (useProfile) { nsCOMPtr<nsIFile> profileDir; NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, + getter_AddRefs(profileDir)); ## xpcom/io/nsAppFileLocationProvider.cpp ## @@ xpcom/io/nsAppFileLocationProvider.cpp: nsresult nsAppFileLocationProvider::CloneMozBinDirectory(nsIFile** aLocalFile) {
Changed in Firefox 126, a48079cd7255bf1a493480a68978faec9d1a3b6d: the bool type cannot be used in .idl anymore, instead we have to use boolean.
-: ------------- > 49: 8f90ffcad533d keepforreview! Bug 9173: Change the default Firefox profile directory to be relative.
47: 6eb2a0778188c ! 50: d9fd42d2c6e1b Bug 27604: Fix addon issues when moving the profile directory @@ Commit message Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1429838 - ## toolkit/mozapps/extensions/internal/XPIProvider.jsm ## -@@ toolkit/mozapps/extensions/internal/XPIProvider.jsm: class XPIState { + ## toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs ## +@@ toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs: class XPIState { // Builds prior to be 1512436 did not include the rootURI property. // If we're updating from such a build, add that property now. @@ toolkit/mozapps/extensions/internal/XPIProvider.jsm: class XPIState { this.rootURI = getURIForResourceInFile(this.file, "").spec; } -@@ toolkit/mozapps/extensions/internal/XPIProvider.jsm: class XPIState { +@@ toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs: class XPIState { saved.currentModifiedTime != this.lastModifiedTime ) { this.lastModifiedTime = saved.currentModifiedTime; @@ toolkit/mozapps/extensions/internal/XPIProvider.jsm: class XPIState { this.missing = true; } } -@@ toolkit/mozapps/extensions/internal/XPIProvider.jsm: var XPIStates = { +@@ toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs: var XPIStates = { if (shouldRestoreLocationData && oldState[loc.name]) { loc.restore(oldState[loc.name]);
48: b16f7dd0aa0ab = 51: 1aff0d73494a8 Bug 13028: Prevent potential proxy bypass cases.
49: 01a4a3c5e1970 = 52: 0908ad6a86230 Bug 40309: Avoid using regional OS locales
Updated the RFPTarget.
-: ------------- > 53: 1ea2e1413657e keepforreview! Bug 40309: Avoid using regional OS locales
50: 424367ba0e2cd = 54: 1d8979acd52aa Bug 40432: Prevent probing installed applications
Changed in Firefox 120, 3b1a417bd3d614c198de708eb5237ef441faac58. Dropped a part of the patch because we can now use a preference (clipboard.imageAsFile.enabled) to achieve the same result.
51: e8350aa4e59ee ! 55: 5e0dadd05998c Bug 33955: When copying an image only copy the image contents to the clipboard @@ browser/base/content/browser-context.inc #endif <menuitem id="context-copyimage" data-l10n-id="main-context-menu-image-copy-link" - - ## dom/base/nsCopySupport.cpp ## -@@ dom/base/nsCopySupport.cpp: nsresult nsCopySupport::ImageCopy(nsIImageLoadingContent* aImageElement, - trans->SetReferrerInfo(referrerInfo); - } - --#ifdef XP_WIN -+#if defined(XP_WIN) && !defined(BASE_BROWSER_VERSION) - rv = AppendImagePromise(trans, imgRequest, aImageElement); - NS_ENSURE_SUCCESS(rv, rv); - #endif
52: 93e02f1f8b4f4 = 56: 5d54301f69d80 Bug 41791: Omit the source URL when copying page contents to the clipboard
53: a625848c93569 = 57: 6748f7e2595f8 Bug 42288: Allow language spoofing in status messages.
54: 54b1161175f87 ! 58: de8d0d1554239 Bug 41659: Add canonical color definitions to base-browser @@ Commit message ## browser/themes/shared/browser-shared.css ## @@ - @import url("chrome://browser/skin/ctrlTab.css"); @import url("chrome://browser/skin/customizableui/customizeMode.css"); @import url("chrome://browser/skin/UITour.css"); + @import url("chrome://browser/skin/formautofill-notification.css"); +@import url("chrome://global/skin/browser-colors.css"); @namespace html url("http://www.w3.org/1999/xhtml");
55: 3e404bdd6b93b ! 59: 508d6432921c0 Base Browser strings @@ Commit message ## browser/base/content/browser.xhtml ## @@ - <link rel="localization" href="toolkit/branding/brandings.ftl"/> + <link rel="localization" href="toolkit/global/contextual-identity.ftl"/> <link rel="localization" href="toolkit/global/textActions.ftl"/> <link rel="localization" href="toolkit/printing/printUI.ftl"/> + <link rel="localization" href="toolkit/global/base-browser.ftl"/> <!-- Untranslated FTL files --> - <link rel="localization" href="preview/firefoxSuggest.ftl" /> - <link rel="localization" href="preview/identityCredentialNotification.ftl" /> + <link rel="localization" href="preview/enUS-searchFeatures.ftl" /> + <link rel="localization" href="preview/interventions.ftl" /> ## browser/components/preferences/preferences.xhtml ## @@
56: fd91e38e5a77b = 60: 23d1918bd5eb1 fixup! Base Browser strings
57: 4168b28dde2b7 ! 61: 26ff6da29ab32 Bug 41369: Improve Firefox language settings for multi-lingual packages @@ Commit message ## browser/base/content/browser.xhtml ## @@ - Services.scriptloader.loadSubScript("chrome://browser/content/places/places-menupopup.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this); + Services.scriptloader.loadSubScript("chrome://browser/content/shopping/shopping-sidebar.js", this); + Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this); window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
58: 5413cccf19504 = 62: 0b905b59f2a5b fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages
59: 126f146d54451 = 63: c46d05da88755 Bug 40283: Workaround for the file upload bug
Changed in Firefox 127, 1d63ed18488dd44cd0fb4a4a9721ee8069d2d14e. Major refactor: a big chunk of browser/base/content/browser.js has been moved to browser/base/content/browser-init.js, notice the difference in color. Maybe this change is easier to review in diff of diffs. The actual differences are due to linting our patch.
60: 97be599e54a7d ! 64: 21db08e444f9f Bug 18905: Hide unwanted items from help menu @@ browser/base/content/appmenu-viewcache.inc.xhtml <toolbarbutton id="appMenuClearRecentHistory" data-l10n-id="appmenu-clear-history" + ## browser/base/content/browser-init.js ## +@@ browser/base/content/browser-init.js: var gBrowserInit = { + this._boundDelayedStartup = this._delayedStartup.bind(this); + window.addEventListener("MozAfterPaint", this._boundDelayedStartup); + +- if (!PrivateBrowsingUtils.enabled) { ++ if ( ++ PrivateBrowsingUtils.permanentPrivateBrowsing || ++ !PrivateBrowsingUtils.enabled ++ ) { + document.getElementById("Tools:PrivateBrowsing").hidden = true; + // Setting disabled doesn't disable the shortcut, so we just remove + // the keybinding. + ## browser/base/content/browser-menubar.inc ## @@ have their strings defined by appmenu-data-l10n-id. --> @@ browser/base/content/browser-menubar.inc appmenu-data-l10n-id="appmenu-get-help" #ifdef XP_MACOSX @@ - #endif + appmenu-data-l10n-id="menu-report-broken-site"/> <menuitem id="feedbackPage" oncommand="openFeedbackPage()" + hidden="true" @@ browser/base/content/browser-safebrowsing.js // In order to detect whether or not we're at the phishing warning // page, we have to check the documentURI instead of the currentURI. // This is because when the DocShell loads an error page, the - - ## browser/base/content/browser.js ## -@@ browser/base/content/browser.js: var gBrowserInit = { - this._boundDelayedStartup = this._delayedStartup.bind(this); - window.addEventListener("MozAfterPaint", this._boundDelayedStartup); - -- if (!PrivateBrowsingUtils.enabled) { -+ if (PrivateBrowsingUtils.permanentPrivateBrowsing || !PrivateBrowsingUtils.enabled) { - document.getElementById("Tools:PrivateBrowsing").hidden = true; - // Setting disabled doesn't disable the shortcut, so we just remove - // the keybinding.
61: 9ed775c0a9f4d ! 65: 16185e6320107 Bug 41739: Remove "Website appearance" from about:preferences. @@ browser/components/preferences/main.inc.xhtml +<groupbox id="webAppearanceGroup" data-category="paneGeneral" hidden="true" data-hidden-from-search="true"> <html:h2 data-l10n-id="preferences-web-appearance-header"/> <html:div id="webAppearanceSettings"> - <description data-l10n-id="preferences-web-appearance-description"/> + <description class="description-deemphasized" data-l10n-id="preferences-web-appearance-description"/>
62: 51ac4fb2e151b ! 66: 46221bf36382d Bug 42019: Empty browser's clipboard on browser shutdown @@ browser/app/profile/001-base-profile.js: pref("browser.pagethumbnails.capturing_ // The previous pref automatically sets this to true (see StaticPrefList.yaml), ## browser/components/BrowserGlue.sys.mjs ## -@@ browser/components/BrowserGlue.sys.mjs: const PRIVATE_BROWSING_EXE_ICON_INDEX = 1; - const PREF_PRIVATE_BROWSING_SHORTCUT_CREATED = - "browser.privacySegmentation.createdShortcut"; +@@ browser/components/BrowserGlue.sys.mjs: let gThisInstanceIsLaunchOnLogin = false; + // a taskbar tab shortcut will contain the "taskbar-tab" flag. + let gThisInstanceIsTaskbarTab = false; +// Empty clipboard content from private windows on exit +// (tor-browser#42154)
63: f41c50a2887b8 ! 67: e54e167ed6201 Bug 42084: Ensure English spoofing works even if preferences are set out of order. @@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper { case 0: // will prompt // This should only happen when turning privacy.resistFingerprinting off. @@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper { + break; case 2: // spoof Services.prefs.setCharPref("intl.accept_languages", "en-US, en"); - Services.prefs.setBoolPref("javascript.use_us_english_locale", true); + // Ensure spoofing works if preferences are set out of order + Services.prefs.addObserver("intl.accept_languages", this); break;
64: 67a0193ab4018 ! 68: cd570bb87f711 Bug 41930: Remove the UI to customize accept_languages. @@ browser/components/preferences/main.js: var gMainPane = { + preference.value = spoofEnglish.checked ? 2 : 1; + }); + } + // TODO (Bug 1817084) Remove this code when we disable the extension setEventListener( - "translationAttributionImage", - "click", + "fxtranslateButton", ## toolkit/components/resistfingerprinting/RFPHelper.sys.mjs ## @@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper { - ) { - Services.prefs.clearUserPref("javascript.use_us_english_locale"); - } + // Works like disabling accept-language spoofing. + // fall through + case 1: // don't spoof - // We don't reset intl.accept_languages. Instead, setting - // privacy.spoof_english to 1 allows user to change preferred language - // settings through Preferences UI.
Uplifted 🎉️
65: ca52b7a9480b3 < -: ------------- Bug 42376: Pass the locale list when constructing l10n in datetimebox
Uplifted 🎉️
66: 28313cd6c6770 < -: ------------- Bug 42428: Make RFP spoof the timezone of document.lastModified.
67: 52573d4fce025 = 69: 36310747b94df Bug 42472: Spoof timezone in XSLT.
Updated the RFPTarget.
-: ------------- > 70: 38b9e3bb1bdad keepforreview! Bug 42472: Spoof timezone in XSLT.
Updated the JS file name in the comments. Also, added a note about not changing the file where these rules are defined.
68: f38de30712130 ! 71: a158f69ada11d Bug 41434: Letterboxing, preemptively apply margins in a global CSS rule to mitigate race conditions on newly created windows and tabs. @@ Commit message Bug 41434: Letterboxing, preemptively apply margins in a global CSS rule to mitigate race conditions on newly created windows and tabs. ## browser/base/content/browser.css ## -@@ browser/base/content/browser.css: body { - -moz-window-dragging: drag; - } +@@ + + @namespace html url("http://www.w3.org/1999/xhtml"); +/** + Never modify the following selector without synchronizing -+ LETTERBOX_CSS_SELECTOR in RFPHelper.jsm! ++ LETTERBOX_CSS_SELECTOR in RFPHelper.sys.mjs! ++ And you will need to update the JS also if you move the rules to another file. +**/ +.letterboxing .browserStack > browser:not(.exclude-letterboxing) { -+ margin: 0; /* to be dynamically set by RFHelper.jsm */ ++ margin: 0; /* to be dynamically set by RFHelper.sys.mjs */ +} + +browser.exclude-letterboxing { + margin: 0 !important; +} + - #toolbar-menubar[autohide="true"] { - overflow: hidden; - } + panelmultiview { + align-items: flex-start; + min-width: 0; ## toolkit/components/resistfingerprinting/RFPHelper.sys.mjs ## @@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
69: 7fc834fe50a1f = 72: 5aef30b8d045a Bug 41434: Letterboxing, improve logging.
70: 129cc9acc3d7b = 73: 73dd3f6e5fa29 Bug 31064: Letterboxing, exempt browser extensions.
71: e2906e6ecc9b0 = 74: 18c457adc8005 Bug 32411: Letterboxing, exempt view-source: URIs.
72: 8eaa4fee975bb = 75: a79671d1f1843 Bug 42574: Letterboxing, exempt pdf.js.
JS filename update
73: d5f899d4fdafd ! 76: c3028878c217b Bug 32308: Use direct browser sizing for letterboxing. @@ browser/app/profile/001-base-profile.js: pref("security.remote_settings.intermed pref("privacy.window.maxInnerHeight", 900); ## browser/base/content/browser.css ## -@@ browser/base/content/browser.css: body { +@@ /** Never modify the following selector without synchronizing -- LETTERBOX_CSS_SELECTOR in RFPHelper.jsm! -+ LETTERBOX_CSS_SELECTOR in RFPHelper.sys.jsm, where +- LETTERBOX_CSS_SELECTOR in RFPHelper.sys.mjs! ++ LETTERBOX_CSS_SELECTOR in RFPHelper.sys.mjs, where + --letterboxing-width & --letterboxing-height are actually set. + And you will need to update the JS also if you move the rules to another file. **/ -.letterboxing .browserStack > browser:not(.exclude-letterboxing) { -- margin: 0; /* to be dynamically set by RFHelper.jsm */ +- margin: 0; /* to be dynamically set by RFHelper.sys.mjs */ +.letterboxing .browserContainer { + /* + From Firefox 115 on, .browserContainer layout is flex / column,
Some lines are detected as moved, because upstream moved lots of contents from browser/base/content/browser.css to browser/themes/shared/browser-shared.css after upstream's refactor in 128 (9d9cd46085f07dd90c4c98ac305d5cc6fbac0522 and others). I initially moved stuff, but this broke letterboxing, so eventually I didn't follow upstream on this.
@@ browser/base/content/browser.css: body {
+.letterboxing.letterboxing-vcenter .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) {
+ --letterboxing-border-top-radius: var(--letterboxing-border-radius);
+ --letterboxing-vertical-alignment: center;
-+}
-+
+ }
+
+-browser.exclude-letterboxing {
+- margin: 0 !important;
+.letterboxing.letterboxing-gradient .browserContainer {
+ background: linear-gradient(283deg, var(--letterboxing-gradient-color1) 0%, var(--letterboxing-gradient-color2) 100%), var(--letterboxing-bgcolor);
+}
@@ browser/base/content/browser.css: body {
+ width: var(--letterboxing-width) !important;
+ height: var(--letterboxing-height) !important;
+ background: var(--letterboxing-gradient-color2);
- }
-
--browser.exclude-letterboxing {
-- margin: 0 !important;
++}
++
+:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserContainer:not(.responsive-mode)
+ > .browserStack:not(.exclude-letterboxing) {
+ place-content: var(--letterboxing-vertical-alignment) center;
}
- #toolbar-menubar[autohide="true"] {
-
Some content moved upstream (browser/base/content/tabbrowser.js renamed to browser/components/tabbrowser/content/tabbrowser.js in 2f419065dab7ede1db9a7a53e76125ab86c8bfe4, Firefox 128).
- ## browser/base/content/tabbrowser.js ##
-@@
- stack.className = "browserStack";
- stack.appendChild(b);
-
-+ let decorator = document.createXULElement("hbox");
-+ decorator.className = "browserDecorator";
-+ stack.appendChild(decorator);
-+
- let browserContainer = document.createXULElement("vbox");
- browserContainer.className = "browserContainer";
- browserContainer.appendChild(notificationbox);
+ panelmultiview {
## browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js ##
@@ browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js: async function test_dynamical_window_rounding(aWindow, aCheckFunc) {
@@ browser/components/resistfingerprinting/test/browser/browser_dynamical_window_ro
let findBarClosePromise = BrowserTestUtils.waitForEvent(
+ ## browser/components/tabbrowser/content/tabbrowser.js ##
+@@
+ stack.className = "browserStack";
+ stack.appendChild(b);
+
++ let decorator = document.createXULElement("hbox");
++ decorator.className = "browserDecorator";
++ stack.appendChild(decorator);
++
+ let browserContainer = document.createXULElement("vbox");
+ browserContainer.className = "browserContainer";
+ browserContainer.appendChild(stack);
+
One change is that _registerActor was renamed to _registerLetterboxingActor in c8e3989334bf98ee4fef9f0711677e36bce05c97 (Firefox 126). Another change is that in the block we remove there's a new comment, added in 360396dcbe23ab84727d42a743c9dbe18899f520 (Firefox 128).
## toolkit/components/resistfingerprinting/RFPHelper.sys.mjs ##
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: const kPrefLetterboxingDimensions =
"privacy.resistFingerprinting.letterboxing.dimensions";
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: const kPrefLetterboxi
var logConsole;
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
- // Add unconditional observers
+ Services.obs.addObserver(this, "user-characteristics-populating-data-done");
Services.prefs.addObserver(kPrefResistFingerprinting, this);
Services.prefs.addObserver(kPrefLetterboxing, this);
+ Services.prefs.addObserver(kPrefLetterboxingVcenter, this);
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
_handleLetterboxingPrefChanged() {
if (Services.prefs.getBoolPref(kPrefLetterboxing, false)) {
Services.ww.registerNotification(this);
-- this._registerActor();
+- this._registerLetterboxingActor();
this._attachAllWindows();
} else {
-- this._unregisterActor();
+- this._unregisterLetterboxingActor();
this._detachAllWindows();
Services.ww.unregisterNotification(this);
}
}
-- _registerActor() {
+- _registerLetterboxingActor() {
+- /*
+- * It turns out that this triggers a warning that we're registering a Desktop-only actor
+- * in toolkit (which will also run on mobile.) It just happens this actor only handles
+- * letterboxing, which isn't used on mobile, but we should resolve this.
+- */
- ChromeUtils.registerWindowActor("RFPHelper", {
- parent: {
- esModuleURI: "resource:///actors/RFPHelperParent.sys.mjs",
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
- });
- }
-
-- _unregisterActor() {
+- _unregisterLetterboxingActor() {
- ChromeUtils.unregisterWindowActor("RFPHelper");
- }
-
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
- `${logPrefix} calcMargins(${aWidth}, ${aHeight}) = ${result.width} x ${result.height}`
- );
- return result;
-- };
--
++ // case, we won't round the size and default to the max.
++ return targetDimensions
++ ? r(targetDimensions.width, targetDimensions.height)
++ : r(aWidth, aHeight);
+ };
+
- // Calculating the margins around the browser element in order to round the
- // content viewport. We will use a 200x100 stepping if the dimension set
- // is not given.
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
- right = marginDims.width;
-
- return `${top}px ${right}px ${bottom}px ${left}px`;
-+ // case, we won't round the size and default to the max.
-+ return targetDimensions
-+ ? r(targetDimensions.width, targetDimensions.height)
-+ : r(aWidth, aHeight);
- };
-
+- };
+-
- const marginChanges = Object.assign([], {
- queueIfNeeded({ style }, margin) {
- if (style.margin !== margin) {
74: 1e1566159b6a6 ! 77: fcf9d04150389 fixup! Bug 32308: Use direct browser sizing for letterboxing. @@ Commit message Bug 42405: Fix betterboxing + findbar horizontal bounce if the scrollbar is not an overlay. ## browser/base/content/browser.css ## -@@ browser/base/content/browser.css: body { +@@ From Firefox 115 on, .browserContainer layout is flex / column, and without this trick the .browserStack's resize observer doesn't get notified on horizontal shrinking.
Changed in Firefox 125, bf97e1553b9552d870be0b6f76350dff1300521a: upstream updated the name of the logger and moved from XPCOMUtils to ChromeUtils, I followed.
75: ea7a6f76495d9 ! 78: 9081a1aabb027 Bug 41631: Prevent weird initial window dimensions caused by subpixel computations @@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: const kPrefLetterboxi -function log(msg) { - if (!logConsole) { - logConsole = console.createInstance({ -- prefix: "RFPHelper.jsm", +- prefix: "RFPHelper", - maxLogLevelPref: "privacy.resistFingerprinting.jsmloglevel", - }); - } +const lazy = {}; + -+XPCOMUtils.defineLazyGetter(lazy, "logConsole", () => ++ChromeUtils.defineLazyGetter(lazy, "logConsole", () => + console.createInstance({ -+ prefix: "RFPHelper.jsm", ++ prefix: "RFPHelper", + maxLogLevelPref: "privacy.resistFingerprinting.jsmloglevel", + }) +);
Spurious newlines changes in code that has been removed, not a big deal.
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
}
}
-@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
- let logPrefix = `_roundContentSize[${Math.random()}]`;
- log(logPrefix);
- let win = aBrowser.ownerGlobal;
-+
- let browserContainer = aBrowser
- .getTabBrowser()
- .getBrowserContainer(aBrowser);
- let browserParent = aBrowser.parentElement;
- browserParent.classList.remove("exclude-letterboxing");
-+
- let [
- [contentWidth, contentHeight],
- [parentWidth, parentHeight],
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
])
);
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
},
});
The following seems another false-positive to me.
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
-
- _updateSizeForTabsInWindow(aWindow) {
- let tabBrowser = aWindow.gBrowser;
--
- tabBrowser.tabpanels?.classList.add("letterboxing");
- tabBrowser.tabpanels?.classList.toggle(
- "letterboxing-vcenter",
-@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
// we need to add this class late because otherwise new windows get maximized
aWindow.setTimeout(() => {
tabBrowser.tabpanels?.classList.add("letterboxing-ready");
+ if (!aWindow._rfpOriginalSize) {
+ this._recordWindowSize(aWindow);
+ }
-+ });
-+ }
-+
+ });
+ }
+
+ _recordWindowSize(aWindow) {
+ aWindow.promiseDocumentFlushed(() => {
+ aWindow._rfpOriginalSize = {
@@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
+ containerHeight: aWindow.gBrowser.getBrowserContainer()?.clientHeight,
+ };
+ log("Recording original window size", aWindow._rfpOriginalSize);
- });
- }
-
++ });
++ }
++
+ // We will attach this method to each browser window. When called
+ // it will instantly resize the window to exactly fit the selected
+ // (possibly letterboxed) browser.
Linted
76: 7a15e8ddd4b33 ! 79: df75c8c98e9e0 Bug 41918: Option to reuse last window size when letterboxing is enabled. @@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = { } + // We don't want to mess up with RFP new window / letterboxing machinery. -+ if ( -+ Services.prefs.getBoolPref("privacy.resistFingerprinting", false) -+ ) { ++ if (Services.prefs.getBoolPref("privacy.resistFingerprinting", false)) { + return; + } + @@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: class _RFPHelper {
Changed in Firefox 116, 4fff4bc6ec5e807823e211110d382112eb7945e8: upstream forced all calls to ShouldResistFingerprinting to have a target and optionally a motivation. So, the content around the patch changed a little bit.
## toolkit/components/windowwatcher/nsWindowWatcher.cpp ##
@@ toolkit/components/windowwatcher/nsWindowWatcher.cpp: static void SizeOpenedWindow(nsIDocShellTreeOwner* aTreeOwner,
- screenDesktopRect.Size() / screenCssToDesktopScale;
-
- if (aSizeSpec.SizeSpecified()) {
-- if (!nsContentUtils::ShouldResistFingerprinting()) {
-+ if (!(nsContentUtils::ShouldResistFingerprinting() &&
-+ nsContentUtils::
-+ ShouldRoundWindowSizeForResistingFingerprinting())) {
+ "complicated, and this is a conservative behavior to avoid "
+ "exempting something that shouldn't be. It also presents a "
+ "uniform behavior for something that's very browser-related.",
+- RFPTarget::RoundWindowSize)) {
++ RFPTarget::RoundWindowSize) &&
++ nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting()) {
/* Unlike position, force size out-of-bounds check only if
size actually was specified. Otherwise, intrinsically sized
windows are broken. */
@@ xpfe/appshell/AppWindow.cpp: NS_IMETHODIMP AppWindow::ForceRoundedDimensions() {
}
@@ xpfe/appshell/AppWindow.cpp: void AppWindow::SizeShell() {
- if (nsContentUtils::ShouldResistFingerprinting(
"if RFP is enabled we want to round the dimensions of the new"
- "new pop up window regardless of their origin") &&
+ "new pop up window regardless of their origin",
+ RFPTarget::RoundWindowSize) &&
- windowType.EqualsLiteral("navigator:browser")) {
+ windowType.EqualsLiteral("navigator:browser") &&
+ nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting()) {
Changed in Firefox 120, be1eb3c4b85b918cd991fcc68c0f92da1e80ce6d: no more XML stylesheets.
77: 695f1a5e7eff1 ! 80: 7f8259e2b802f Bug 41916: Letterboxing preferences UI @@ browser/components/preferences/main.inc.xhtml ## browser/components/preferences/main.js ## @@ browser/components/preferences/main.js: var gMainPane = { - ]); + ); AppearanceChooser.init(); + gLetterboxingPrefs.init(); @@ browser/components/preferences/main.js: var gMainPane = { ## browser/components/preferences/preferences.xhtml ## @@ - <?xml-stylesheet href="chrome://browser/skin/preferences/search.css"?> - <?xml-stylesheet href="chrome://browser/skin/preferences/containers.css"?> - <?xml-stylesheet href="chrome://browser/skin/preferences/privacy.css"?> -+<?xml-stylesheet href="chrome://browser/content/preferences/letterboxing.css"?> - - <!DOCTYPE html> + href="chrome://browser/skin/preferences/containers.css" + /> + <link rel="stylesheet" href="chrome://browser/skin/preferences/privacy.css" /> ++ <link ++ rel="stylesheet" ++ href="chrome://browser/content/preferences/letterboxing.css" ++ /> + <link rel="localization" href="branding/brand.ftl"/> + <link rel="localization" href="browser/browser.ftl"/>
78: b4a6f83ba8bed = 81: 7f461635e061d fixup! Bug 41916: Letterboxing preferences UI
79: 88724ab01dbac = 82: f60cc1e3cdd1e fixup! Bug 41916: Letterboxing preferences UI
80: 9e7a4270019e4 ! 83: 7433d98524051 Bug 41695: Warn on window maximization without letterboxing in RFPHelper module @@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: const kPrefLetterboxi + const lazy = {}; - XPCOMUtils.defineLazyGetter(lazy, "logConsole", () => + ChromeUtils.defineLazyGetter(lazy, "logConsole", () => @@ toolkit/components/resistfingerprinting/RFPHelper.sys.mjs: function forEachWindow(callback) { } }
81: a2debc14d99da = 84: eb0114a1eaf6d Bug 42443: Shrink window to match letterboxing size when the emtpy area is clicked.
82: 4ab84286ba9bc = 85: 1097d7a9666fd Bug 42528: Don't leak system scrollbar size on windows.
Updated the RFPTarget.
-: ------------- > 86: 001967fe5c58b keepforreview! Bug 42528: Don't leak system scrollbar size on windows.
Esmification.
83: 811f3fcfe1ae0 ! 87: 041f4a600564d Bug 31575: Disable Firefox Home (Activity Stream) @@ Commit message ## browser/base/content/browser.js ## @@ browser/base/content/browser.js: ChromeUtils.defineESModuleGetters(this, { - ReaderMode: "resource://gre/modules/ReaderMode.sys.mjs", + ReportBrokenSite: "resource:///modules/ReportBrokenSite.sys.mjs", SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs", Sanitizer: "resource:///modules/Sanitizer.sys.mjs", - SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs", @@ browser/base/content/browser.js: var XULBrowserWindow = { originalURI = aRequest.originalURI; ## browser/components/BrowserGlue.sys.mjs ## -@@ browser/components/BrowserGlue.sys.mjs: const lazy = {}; - // Ignore unused lazy property for PluginManager. - // eslint-disable-next-line mozilla/valid-lazy +@@ browser/components/BrowserGlue.sys.mjs: import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; + const lazy = {}; + ChromeUtils.defineESModuleGetters(lazy, { -- ASRouterNewTabHook: -- "resource://activity-stream/lib/ASRouterNewTabHook.sys.mjs", +- AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs", + AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs", + ASRouter: "resource:///modules/asrouter/ASRouter.sys.mjs", +- ASRouterDefaultConfig: +- "resource:///modules/asrouter/ASRouterDefaultConfig.sys.mjs", +- ASRouterNewTabHook: "resource:///modules/asrouter/ASRouterNewTabHook.sys.mjs", ActorManagerParent: "resource://gre/modules/ActorManagerParent.sys.mjs", AddonManager: "resource://gre/modules/AddonManager.sys.mjs", AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.sys.mjs", @@ browser/components/BrowserGlue.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { - RemoteSettings: "resource://services-settings/remote-settings.sys.mjs", + ResetPBMPanel: "resource:///modules/ResetPBMPanel.sys.mjs", SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs", Sanitizer: "resource:///modules/Sanitizer.sys.mjs", - SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs", ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs", + SearchSERPCategorization: "resource:///modules/SearchSERPTelemetry.sys.mjs", SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs", - SessionStartup: "resource:///modules/sessionstore/SessionStartup.sys.mjs", -@@ browser/components/BrowserGlue.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { - }); - - XPCOMUtils.defineLazyModuleGetters(lazy, { -- AboutNewTab: "resource:///modules/AboutNewTab.jsm", -- ASRouterDefaultConfig: -- "resource://activity-stream/lib/ASRouterDefaultConfig.jsm", - ASRouter: "resource://activity-stream/lib/ASRouter.jsm", - BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm", - BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
Upstream changes in code we entirely remove.
@@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = {
matches: ["about:messagepreview", "about:messagepreview?*"],
},
@@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = {
- visibilitychange: {},
- },
- },
-- // The wildcard on about:newtab is for the ?endpoint query parameter
-- // that is used for snippets debugging. The wildcard for about:home
+- // The wildcard on about:newtab is for the # parameter
+- // that is used for the newtab devtools. The wildcard for about:home
- // is similar, and also allows for falling back to loading the
- // about:home document dynamically if an attempt is made to load
- // about:home?jscache from the AboutHomeStartupCache as a top-level
@@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = {
- remoteTypes: ["privilegedabout"],
- },
-
- AboutPlugins: {
- parent: {
- esModuleURI: "resource:///actors/AboutPluginsParent.sys.mjs",
-@@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = {
-
- matches: ["about:plugins"],
- },
- AboutPocket: {
- parent: {
- esModuleURI: "resource:///actors/AboutPocketParent.sys.mjs",
@@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = {
- "about:pocket-style-guide*",
- ],
- },
-
+-
AboutPrivateBrowsing: {
parent: {
+ esModuleURI: "resource:///actors/AboutPrivateBrowsingParent.sys.mjs",
Changed in Firefox 122, 9415a9f13dc1fb4c2de4e1b9dac57aecf117a894: upstream added about:asrouter as a page that is allowed to use this actor when creating the AS Router admin page.
@@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = {
- matches: ["about:studies*"],
+ allFrames: true,
},
- ASRouter: {
@@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = {
- },
- },
- matches: [
+- "about:asrouter*",
- "about:home*",
- "about:newtab*",
- "about:welcome*",
Other stuff (no relevant changes).
@@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = {
- lazy.SaveToPocket.init();
-
- AboutHomeStartupCache.init();
+ lazy.ResetPBMPanel.init();
- Services.obs.notifyObservers(null, "browser-ui-startup-complete");
+ AboutHomeStartupCache.init();
@@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = {
// the first browser window has finished initializing
@@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = {
lazy.ProcessHangMonitor.init();
@@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = {
- }
},
() => lazy.RFPHelper.uninit(),
+ () => lazy.ShoppingUtils.uninit(),
- () => lazy.ASRouterNewTabHook.destroy(),
() => {
if (AppConstants.MOZ_UPDATER) {
@@ browser/components/about/AboutRedirector.cpp: static const RedirEntry kRedirMap[
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
nsIAboutModule::HIDE_FROM_ABOUTABOUT},
+#endif
- {"preferences", "chrome://browser/content/preferences/preferences.xhtml",
- nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI},
- {"downloads",
+ {"settings", "chrome://browser/content/preferences/preferences.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI |
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT},
@@ browser/components/about/AboutRedirector.cpp: AboutRedirector::NewChannel(nsIURI* aURI, nsILoadInfo* aLoadInfo,
// enabled about:newtab. Disabled about:newtab page uses fallback.
if (path.EqualsLiteral("home") ||
@@ browser/components/moz.build: DIRS += [
"privatebrowsing",
"prompts",
- ## browser/components/newtab/AboutNewTabService.jsm ##
-@@ browser/components/newtab/AboutNewTabService.jsm: class BaseAboutNewTabService {
+ ## browser/components/newtab/AboutNewTabService.sys.mjs ##
+@@ browser/components/newtab/AboutNewTabService.sys.mjs: class BaseAboutNewTabService {
* the newtab page has no effect on the result of this function.
*/
get defaultURL() {
@@ browser/components/preferences/home.js: var gHomePane = {
newValue = this.HOME_MODE_CUSTOM;
}
- ## browser/modules/HomePage.jsm ##
-@@ browser/modules/HomePage.jsm: ChromeUtils.defineESModuleGetters(lazy, {
+ ## browser/modules/HomePage.sys.mjs ##
+@@ browser/modules/HomePage.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, {
});
const kPrefName = "browser.startup.homepage";
@@ browser/modules/HomePage.jsm: ChromeUtils.defineESModuleGetters(lazy, {
## toolkit/modules/RemotePageAccessManager.sys.mjs ##
@@ toolkit/modules/RemotePageAccessManager.sys.mjs: export let RemotePageAccessManager = {
- "about:plugins": {
- RPMSendQuery: ["RequestPlugins"],
+ RPMSendAsyncMessage: ["ActivityStream:ContentToMain"],
+ RPMAddMessageListener: ["ActivityStream:MainToContent"],
},
- "about:pocket-saved": {
- RPMSendAsyncMessage: ["*"],
Noise.
84: d2afd3e2458c8 ! 88: ade5ddddf84f6 Bug 4234: Use the Firefox Update Process for Base Browser. @@ browser/app/Makefile.in: tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir) +ifndef BASE_BROWSER_UPDATE $(MKDIR) -p '$(dist_dest)/Contents/Library/LaunchServices' ifdef MOZ_UPDATER - mv -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices' - ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' + cp -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices' +endif endif - printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo' - endif + $(MKDIR) -p '$(dist_dest)/Contents/Frameworks' + mv '$(dist_dest)/Contents/Resources/ChannelPrefs.framework' '$(dist_dest)/Contents/Frameworks' ## browser/base/content/aboutDialog.js ## @@ browser/base/content/aboutDialog.js: function init() { @@ browser/base/content/aboutDialog.js: function init() { ## browser/base/content/aboutDialog.xhtml ## @@ - <linkset> + <html:link rel="localization" href="branding/brand.ftl"/> <html:link rel="localization" href="browser/aboutDialog.ftl"/> + <html:link rel="localization" href="toolkit/global/base-browser.ftl"/> @@ browser/base/content/aboutDialog.xhtml <html:div id="aboutDialogContainer"> ## browser/base/moz.build ## -@@ browser/base/moz.build: if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]: - # Impacts `/toolkit/content/license.html`. - DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = True +@@ browser/base/moz.build: if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk", "cocoa"): + if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk"): + DEFINES["MENUBAR_CAN_AUTOHIDE"] = 1 +if CONFIG["BASE_BROWSER_UPDATE"]: + DEFINES["BASE_BROWSER_UPDATE"] = True @@ browser/base/moz.build: if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["MOZ_DEFAULT_ JAR_MANIFESTS += ["jar.mn"] ## browser/components/BrowserContentHandler.sys.mjs ## -@@ browser/components/BrowserContentHandler.sys.mjs: XPCOMUtils.defineLazyGetter(lazy, "gWindowsAlertsService", () => { +@@ browser/components/BrowserContentHandler.sys.mjs: ChromeUtils.defineLazyGetter(lazy, "gWindowsAlertsService", () => { ?.QueryInterface(Ci.nsIWindowsAlertsService); });
Updated the comments.
@@ browser/components/BrowserContentHandler.sys.mjs: XPCOMUtils.defineLazyGetter(la
const ONCE_DOMAINS = ["mozilla.org", "firefox.com"];
const ONCE_PREF = "browser.startup.homepage_override.once";
@@ browser/components/BrowserContentHandler.sys.mjs: const OVERRIDE_NEW_BUILD_ID = 3;
- * Returns:
- * OVERRIDE_NEW_PROFILE if this is the first run with a new profile.
- * OVERRIDE_NEW_MSTONE if this is the first run with a build with a different
-- * Gecko milestone (i.e. right after an upgrade).
-+ * Gecko milestone or fork version (i.e. right after an
-+ * upgrade).
- * OVERRIDE_NEW_BUILD_ID if this is the first run with a new build ID of the
- * same Gecko milestone (i.e. after a nightly upgrade).
- * OVERRIDE_NONE otherwise.
-@@ browser/components/BrowserContentHandler.sys.mjs: function needHomepageOverride(prefb) {
+ * if this is the first run with a new profile.
+ * OVERRIDE_NEW_MSTONE
+ * if this is the first run with a build with a different Gecko milestone
+- * (i.e. right after an upgrade).
++ * or fork version (i.e. right after an upgrade).
+ * OVERRIDE_NEW_BUILD_ID
+ * if this is the first run with a new build ID of the same Gecko
+ * milestone (i.e. after a nightly upgrade).
Changed in Firefox 124, 1eb7ddbd5d22c648aee449dc7caaca352656285c (Bug 1749345): upstream stopped using prefb and started using directly Services.prefs.getCharPref, I followed.
+@@ browser/components/BrowserContentHandler.sys.mjs: function needHomepageOverride(updateMilestones = true) {
var mstone = Services.appinfo.platformVersion;
-+ var savedForkVersion = prefb.getCharPref(FORK_VERSION_PREF, null);
++ var savedForkVersion = Services.prefs.getCharPref(FORK_VERSION_PREF, null);
+
- var savedBuildID = prefb.getCharPref(
+ var savedBuildID = Services.prefs.getCharPref(
"browser.startup.homepage_override.buildID",
""
-@@ browser/components/BrowserContentHandler.sys.mjs: function needHomepageOverride(prefb) {
-
- prefb.setCharPref("browser.startup.homepage_override.mstone", mstone);
- prefb.setCharPref("browser.startup.homepage_override.buildID", buildID);
-+ prefb.setCharPref(FORK_VERSION_PREF, AppConstants.BASE_BROWSER_VERSION);
+@@ browser/components/BrowserContentHandler.sys.mjs: function needHomepageOverride(updateMilestones = true) {
+ "browser.startup.homepage_override.buildID",
+ buildID
+ );
++ Services.prefs.setCharPref(
++ FORK_VERSION_PREF,
++ AppConstants.BASE_BROWSER_VERSION
++ );
+ }
return savedmstone ? OVERRIDE_NEW_MSTONE : OVERRIDE_NEW_PROFILE;
}
In addition to the prefb updates, I added if (updateMilestones) {, i.e., I followed what actually 1eb7ddbd5d22c648aee449dc7caaca352656285c was for. The patch is specific to the --first-startup case, that we don't really use (it's a Windows installer thing), but still it made sense to me to match what upstream does.
+ if (AppConstants.BASE_BROWSER_VERSION != savedForkVersion) {
-+ prefb.setCharPref("browser.startup.homepage_override.buildID", buildID);
-+ prefb.setCharPref(FORK_VERSION_PREF, AppConstants.BASE_BROWSER_VERSION);
++ if (updateMilestones) {
++ Services.prefs.setCharPref(
++ "browser.startup.homepage_override.buildID",
++ buildID
++ );
++ Services.prefs.setCharPref(
++ FORK_VERSION_PREF,
++ AppConstants.BASE_BROWSER_VERSION
++ );
++ }
+ return OVERRIDE_NEW_MSTONE;
+ }
+
More prefb updates.
if (buildID != savedBuildID) {
- prefb.setCharPref("browser.startup.homepage_override.buildID", buildID);
- return OVERRIDE_NEW_BUILD_ID;
+ if (updateMilestones) {
+ Services.prefs.setCharPref(
@@ browser/components/BrowserContentHandler.sys.mjs: nsBrowserContentHandler.prototype = {
"browser.startup.homepage_override.buildID",
"unknown"
);
+
+ // We do the same for the fork version.
-+ let old_forkVersion = prefb.getCharPref(FORK_VERSION_PREF, null);
++ let old_forkVersion = Services.prefs.getCharPref(
++ FORK_VERSION_PREF,
++ null
++ );
+
- override = needHomepageOverride(prefb);
+ override = needHomepageOverride();
if (override != OVERRIDE_NONE) {
switch (override) {
Noise.
@@ browser/components/BrowserContentHandler.sys.mjs: nsBrowserContentHandler.prototype = {
- "startup.homepage_override_url"
- );
- let update = lazy.UpdateManager.readyUpdate;
+ }
+ }
+
+ let old_version = old_forkVersion ? old_forkVersion : old_mstone;
if (
update &&
- Services.vc.compare(update.appVersion, old_mstone) > 0
+ Services.vc.compare(update.appVersion, old_version) > 0
) {
- overridePage = getPostUpdateOverridePage(update, overridePage);
- // Send the update ping to signal that the update was successful.
+ overridePage = getPostUpdateOverridePage(
+ update,
@@ browser/components/BrowserContentHandler.sys.mjs: nsBrowserContentHandler.prototype = {
}
@@ browser/components/BrowserContentHandler.sys.mjs: nsBrowserContentHandler.protot
+ old_forkVersion
+ );
break;
+ }
case OVERRIDE_NEW_BUILD_ID:
- if (lazy.UpdateManager.readyUpdate) {
## browser/components/customizableui/content/panelUI.inc.xhtml ##
@@
@@ browser/installer/package-manifest.in
@APPNAME@/Contents/Library/LaunchServices
#endif
+#endif
+ @APPNAME@/Contents/Frameworks
@APPNAME@/Contents/PkgInfo
@RESPATH@/firefox.icns
- @RESPATH@/document.icns
## build/application.ini.in ##
@@ build/application.ini.in: ServerURL=@MOZ_CRASHREPORTER_URL@/submit?id=@MOZ_APP_ID@&version=@MOZ_APP_VERSIO
@@ toolkit/modules/AppConstants.sys.mjs: export var AppConstants = Object.freeze({
Changed in Firefox 117, 619bb7a4339cbeb1216ee4398296d5a1ea8ce13c: formatUpdateURL was refactored to send the string through encodeURIComponent before returning. I updated our patch to match upstream.
## toolkit/modules/UpdateUtils.sys.mjs ##
@@ toolkit/modules/UpdateUtils.sys.mjs: export var UpdateUtils = {
- case "PRODUCT":
- return Services.appinfo.name;
+ replacement = Services.appinfo.name;
+ break;
case "VERSION":
-- return Services.appinfo.version;
-+ return AppConstants.BASE_BROWSER_VERSION;
+- replacement = Services.appinfo.version;
++ replacement = AppConstants.BASE_BROWSER_VERSION;
+ break;
case "BUILD_ID":
- return Services.appinfo.appBuildID;
- case "BUILD_TARGET":
+ replacement = Services.appinfo.appBuildID;
Changed in Firefox 127, 75ae7f69d33dd0d265ccb93bee3c71451f97d9d6. Big refactor upstream: Bug 1894979 - Convert UpdateService.sys.mjs to use classes..
We used to add this eslint-disable-next-line complexity, but maybe it isn't required after the refactor (I haven't linted though).
@@ toolkit/modules/UpdateUtils.sys.mjs: export var UpdateUtils = {
* downloads and installs updates. This corresponds to whether or not the user
* has selected "Automatically install updates" in about:preferences.
@@ toolkit/modules/moz.build: for var in (
DEFINES["TOPOBJDIR"] = TOPOBJDIR
## toolkit/mozapps/extensions/AddonManager.sys.mjs ##
-@@ toolkit/mozapps/extensions/AddonManager.sys.mjs: const PREF_EM_STRICT_COMPATIBILITY = "extensions.strictCompatibility";
- const PREF_EM_CHECK_UPDATE_SECURITY = "extensions.checkUpdateSecurity";
+@@ toolkit/mozapps/extensions/AddonManager.sys.mjs: const PREF_EM_CHECK_UPDATE_SECURITY = "extensions.checkUpdateSecurity";
const PREF_SYS_ADDON_UPDATE_ENABLED = "extensions.systemAddon.update.enabled";
const PREF_REMOTESETTINGS_DISABLED = "extensions.remoteSettings.disabled";
+ const PREF_USE_REMOTE = "extensions.webextensions.remote";
+const PREF_EM_LAST_FORK_VERSION = "extensions.lastBaseBrowserVersion";
const PREF_MIN_WEBEXT_PLATFORM_VERSION =
@@ toolkit/mozapps/update/UpdateService.sys.mjs: function updateIsAtLeastAsOldAs(up
Services.appinfo.appBuildID
);
}
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdatePatch.prototype = {
- * @throws if the update contains no patches
- * @constructor
- */
-+// eslint-disable-next-line complexity
- function Update(update) {
- this._patches = [];
- this._properties = {};
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: function Update(update) {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Update {
this._patches.push(patch);
}
Change of indentation (which involved a line break when linting):
@@ toolkit/mozapps/update/UpdateService.sys.mjs: function Update(update) {
+ this.unsupported = Services.vc.compare(osVersion, minOSVersion) < 0;
+ } catch (e) {}
+ }
-+ if (!this.unsupported && update.hasAttribute("minSupportedInstructionSet")) {
++ if (
++ !this.unsupported &&
++ update.hasAttribute("minSupportedInstructionSet")
++ ) {
+ let minInstructionSet = update.getAttribute("minSupportedInstructionSet");
+ if (
+ ["MMX", "SSE", "SSE2", "SSE3", "SSE4A", "SSE4_1", "SSE4_2"].includes(
Noise (some changes were probably silenced by --ignore-space-change):
@@ toolkit/mozapps/update/UpdateService.sys.mjs: function Update(update) {
throw Components.Exception("", Cr.NS_ERROR_ILLEGAL_VALUE);
}
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: function Update(update) {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Update {
if (!isNaN(attr.value)) {
this.promptWaitTime = parseInt(attr.value);
}
@@ toolkit/mozapps/update/UpdateService.sys.mjs: function Update(update) {
switch (attr.name) {
case "appVersion":
case "buildID":
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: function Update(update) {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Update {
}
if (!this.previousAppVersion) {
@@ toolkit/mozapps/update/UpdateService.sys.mjs: function Update(update) {
}
if (!this.elevationFailure) {
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdateService.prototype = {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: export class UpdateService {
"UpdateService:downloadUpdate - Skipping download of update since " +
"it is for an earlier or same application version and build ID.\n" +
"current application version: " +
@@ toolkit/mozapps/update/UpdateService.sys.mjs: export class CheckerService {
## toolkit/mozapps/update/UpdateServiceStub.sys.mjs ##
-@@ toolkit/mozapps/update/UpdateServiceStub.sys.mjs: export function UpdateServiceStub() {
- // contains the status file's path
+@@ toolkit/mozapps/update/UpdateServiceStub.sys.mjs: export class UpdateServiceStub {
+ #initOnlyStub(updateDir) {
// We may need to migrate update data
+ // In Base Browser and derivatives, we skip this because we do not use an
+ // update agent and we do not want to store any data outside of the browser
+ // installation directory.
+ // For more info, see https://bugzilla.mozilla.org/show_bug.cgi?id=1458314
+ let prefUpdateDirMigrated =
+ PREF_PREFIX_UPDATE_DIR_MIGRATED + updateDir.leafName;
if (
AppConstants.platform == "win" &&
+ !AppConstants.BASE_BROWSER_UPDATE &&
@@ toolkit/mozapps/update/common/updatehelper.cpp: BOOL GetSecureOutputDirectoryPat
/**
Changed in Firefox 126, 41dc0349588145ad0a49171208cb7b0515fd9a8e (backported during beta!): the mar channel ID is passed as a function argument here and there instead of being a global variable.
## toolkit/mozapps/update/updater/launchchild_osx.mm ##
-@@ toolkit/mozapps/update/updater/launchchild_osx.mm: bool ObtainUpdaterArguments(int* argc, char*** argv) {
+@@ toolkit/mozapps/update/updater/launchchild_osx.mm: bool ObtainUpdaterArguments(int* aArgc, char*** aArgv,
@end
+#ifndef BASE_BROWSER_UPDATE
- bool ServeElevatedUpdate(int argc, const char** argv) {
+ bool ServeElevatedUpdate(int aArgc, const char** aArgv,
+ const char* aMARChannelID) {
MacAutoreleasePool pool;
-
-@@ toolkit/mozapps/update/updater/launchchild_osx.mm: bool ServeElevatedUpdate(int argc, const char** argv) {
+@@ toolkit/mozapps/update/updater/launchchild_osx.mm: bool ServeElevatedUpdate(int aArgc, const char** aArgv,
[updater release];
return didSucceed;
}
@@ toolkit/mozapps/update/updater/launchchild_osx.mm: bool ServeElevatedUpdate(int
MacAutoreleasePool pool;
## toolkit/mozapps/update/updater/updater.cpp ##
-@@ toolkit/mozapps/update/updater/updater.cpp: bool IsRecursivelyWritable(const char* aPath);
- void LaunchChild(int argc, const char** argv);
+@@ toolkit/mozapps/update/updater/updater.cpp: void LaunchChild(int argc, const char** argv);
void LaunchMacPostProcess(const char* aAppBundle);
- bool ObtainUpdaterArguments(int* argc, char*** argv);
+ bool ObtainUpdaterArguments(int* aArgc, char*** aArgv,
+ MARChannelStringTable* aMARStrings);
+# ifndef BASE_BROWSER_UPDATE
- bool ServeElevatedUpdate(int argc, const char** argv);
+ bool ServeElevatedUpdate(int aArgc, const char** aArgv,
+ const char* aMARChannelID);
+# endif
void SetGroupOwnershipAndPermissions(const char* aAppBundle);
bool PerformInstallationFromDMG(int argc, char** argv);
@@ toolkit/mozapps/update/updater/updater.cpp: static int ProcessReplaceRequest() {
}
@@ toolkit/mozapps/update/updater/updater.cpp: static void UpdateThreadFunc(void* param) {
- if (ReadMARChannelIDs(updateSettingsPath, &MARStrings) != OK) {
- rv = UPDATE_SETTINGS_FILE_CHANNEL;
- } else {
+ if (rv == OK) {
+ rv = PopulategMARStrings();
+ if (rv == OK) {
+# ifdef BASE_BROWSER_VERSION_QUOTED
+ // Use the base browser version to prevent downgrade attacks.
+ const char* appVersion = BASE_BROWSER_VERSION_QUOTED;
@@ toolkit/mozapps/update/updater/updater.cpp: static void UpdateThreadFunc(void* p
+ const char* appVersion = MOZ_APP_VERSION;
+# endif
rv = gArchiveReader.VerifyProductInformation(
-- MARStrings.MARChannelID.get(), MOZ_APP_VERSION);
-+ MARStrings.MARChannelID.get(), appVersion);
+- gMARStrings.MARChannelID.get(), MOZ_APP_VERSION);
++ gMARStrings.MARChannelID.get(), appVersion);
}
}
#endif
@@ toolkit/mozapps/update/updater/updater.cpp: static void UpdateThreadFunc(void* p
+ WriteStatusFile(ELEVATION_CANCELED);
+# else
UpdateServerThreadArgs* threadArgs = (UpdateServerThreadArgs*)param;
- gSucceeded = ServeElevatedUpdate(threadArgs->argc, threadArgs->argv);
+ gSucceeded = ServeElevatedUpdate(threadArgs->argc, threadArgs->argv,
+ threadArgs->marChannelID);
if (!gSucceeded) {
WriteStatusFile(ELEVATION_CANCELED);
}
@@ toolkit/mozapps/update/updater/updater.cpp: static void UpdateThreadFunc(void* p
}
@@ toolkit/mozapps/update/updater/updater.cpp: int NS_main(int argc, NS_tchar** argv) {
- mozilla::UniquePtr<UmaskContext> umaskContext(new UmaskContext(0));
-
+ // This will be used to set `gIsElevated`, but we are going to do it later
+ // when we are ready to set it for every OS to avoid inconsistency.
bool isElevated =
+# ifdef BASE_BROWSER_UPDATE
+ false;
@@ toolkit/mozapps/update/updater/updater.cpp: int NS_main(int argc, NS_tchar** arg
0;
+# endif
if (isElevated) {
- if (!ObtainUpdaterArguments(&argc, &argv)) {
+ if (!ObtainUpdaterArguments(&argc, &argv, &gMARStrings)) {
// Won't actually get here because ObtainUpdaterArguments will terminate
@@ toolkit/mozapps/update/updater/updater.cpp: int NS_main(int argc, NS_tchar** argv) {
if (!useService && !noServiceFallback &&
Changed in Firefox 120, 9392c6637b8fcab455db1bd042591432590c700a: upstream changed a couple fprintfs to stderr were changed to LOG around where we patched stuff. I followed and added a new LOG in a section we add.
@@ toolkit/mozapps/update/updater/updater.cpp: int NS_main(int argc, NS_tchar** arg
+ // attempt to elevate privileges. Instead, write a "failed" message to
+ // the update status file (this function will return immediately after
+ // the CloseHandle(elevatedFileHandle) call below).
++ LOG(("Refusing to elevate in Base Browser."));
+ WriteStatusFile(WRITE_ERROR_ACCESS_DENIED);
+# else
+ LOG(("Elevating via a UAC prompt"));
// Get the secure ID before trying to update so it is possible to
// determine if the updater has created a new one.
- char uuidStringBefore[UUID_LEN] = {'\0'};
@@ toolkit/mozapps/update/updater/updater.cpp: int NS_main(int argc, NS_tchar** argv) {
- gCopyOutputFiles = false;
WriteStatusFile(ELEVATION_CANCELED);
+ LOG(("Elevation canceled."));
}
+# endif /* BASE_BROWSER_UPDATE */
- }
-
- // If we started the elevated updater, and it finished, check the secure
+ } else {
+ LOG(("Not showing a UAC prompt."));
+ LOG(("useService=%s", useService ? "true" : "false"));
@@ toolkit/mozapps/update/updater/updater.cpp: int NS_main(int argc, NS_tchar** argv) {
if (!sStagedUpdate && !sReplaceRequest && _wrmdir(gDeleteDirPath)) {
LOG(("NS_main: unable to remove directory: " LOG_S ", err: %d",
This sounds like a comment upstream removed in f9a82146b7a3101c2efc42a716804b27f5720b50. I don't remember why I removed it, probably because upstream removed the check on needElevation (and some other stuff happened in Firefox 122, 33bbe4f0d38c6503c24e2fe7f33bc6c3612192a8), so the comment was outdated.
@@ toolkit/xre/nsUpdateDriver.cpp: static void ApplyUpdate(nsIFile* greDir, nsIFile
// We use execv to spawn the updater process on all UNIX systems except Mac
@@ toolkit/xre/nsUpdateDriver.cpp: static void ApplyUpdate(nsIFile* greDir, nsIFile* updateDir, nsIFile* appDir,
}
+ }
#elif defined(XP_MACOSX)
- UpdateDriverSetupMacCommandLine(argc, argv, restart);
+# ifdef DEBUG
+dump_argv("ApplyUpdate after SetupMacCommandLine", argv, argc);
+# endif
+ if (restart) {
+ // Ensure we've added URLs to load into the app command line if we're
+ // restarting.
+ CommandLineServiceMac::SetupMacCommandLine(argc, argv, restart);
+
+# ifndef BASE_BROWSER_UPDATE
-+// We need to detect whether elevation is required for this update. This can
-+// occur when an admin user installs the application, but another admin
-+// user attempts to update (see bug 394984).
- if (restart && needElevation) {
+ if (needElevation) {
bool hasLaunched = LaunchElevatedUpdate(argc, argv, outpid);
free(argv);
-@@ toolkit/xre/nsUpdateDriver.cpp: if (restart && needElevation) {
+@@ toolkit/xre/nsUpdateDriver.cpp: if (restart) {
}
exit(0);
}
+# endif
+ }
if (isStaged) {
- // Launch the updater to replace the installation with the staged updated.
@@ toolkit/xre/nsUpdateDriver.cpp: nsresult ProcessUpdates(nsIFile* greDir, nsIFile* appDir, nsIFile* updRootDir,
bool restart, ProcessType* pid) {
nsresult rv;
85: 5121d354f136f = 89: b5be384bceffe Bug 42061: Create an alpha update channel.
86: 1b483c4b98a82 = 90: b46472d1f6462 Bug 41682: Add base-browser nightly mar signing key
87: 687b6494010d0 = 91: 867e2aa70fcf9 Bug 41603: Customize the creation of MOZ_SOURCE_URL
88: 21c3b3e353a3f ! 92: e8f7f3c7932e6 Bug 41698: Reword the recommendation badges in about:addons @@ toolkit/content/widgets/moz-support-link/moz-support-link.mjs: export default cl ## toolkit/mozapps/extensions/content/aboutaddons.html ## @@ + <link rel="localization" href="branding/brand.ftl" /> <link rel="localization" href="toolkit/about/aboutAddons.ftl" /> - <link rel="localization" href="toolkit/about/abuseReports.ftl" /> + <link rel="localization" href="toolkit/global/base-browser.ftl" /> +
Changed in Firefox 122, e1336c1a0f608202ff71d7dcac903078f51f30eb: upstream added SNAP_REAL_HOME (basically a workaround similar to mine).
89: 3be660ec69438 ! 93: f82809fc14043 Bug 42438: Tweaks to the migration wizard. @@ Commit message ## browser/components/migration/ChromeMigrationUtils.sys.mjs ## @@ browser/components/migration/ChromeMigrationUtils.sys.mjs: export var ChromeMigrationUtils = { - for (let subfolders of options) { - let rootDir = subfolders[0]; - try { -- let targetPath = Services.dirsvc.get(rootDir, Ci.nsIFile).path; -+ let targetPath = -+ rootDir === "Home" && Services.env.get("BB_ORIGINAL_HOME") -+ ? Services.env.get("BB_ORIGINAL_HOME") -+ : Services.dirsvc.get(rootDir, Ci.nsIFile).path; - targetPath = PathUtils.join(targetPath, ...subfolders.slice(1)); - if (await IOUtils.exists(targetPath)) { - return targetPath; + + if (rootDir == SNAP_REAL_HOME) { + targetPath = Services.env.get("SNAP_REAL_HOME"); ++ } else if ( ++ rootDir === "Home" && ++ Services.env.get("BB_ORIGINAL_HOME") ++ ) { ++ targetPath = Services.env.get("BB_ORIGINAL_HOME"); + } else { + targetPath = Services.dirsvc.get(rootDir, Ci.nsIFile).path; + } ## browser/components/migration/content/migration-wizard.mjs ## @@ browser/components/migration/content/migration-wizard.mjs: export class MigrationWizard extends HTMLElement {
90: 755a7df415c77 ! 94: 4975d0ba00ef4 Bug 40069: Add helpers for message passing with extensions @@ Commit message ## toolkit/components/extensions/ExtensionParent.sys.mjs ## @@ toolkit/components/extensions/ExtensionParent.sys.mjs: const ProxyMessenger = { - /** @type {Map<number, ParentPort>} */ - ports: new Map(), + /** @type {Map<number, Promise>} */ + portPromises: new Map(), + _torRuntimeMessageListeners: [], + @@ toolkit/components/extensions/ExtensionParent.sys.mjs: const ProxyMessenger = { arg.firstResponse = true; let kind = await this.normalizeArgs(arg, sender); let result = await this.conduit.castRuntimeMessage(kind, arg); -@@ toolkit/components/extensions/ExtensionParent.sys.mjs: for (let name of StartupCache.STORE_NAMES) { - StartupCache[name] = new CacheStore(name); - } +@@ toolkit/components/extensions/ExtensionParent.sys.mjs: var StartupCache = { + + Services.obs.addObserver(StartupCache, "startupcache-invalidate"); +async function torSendExtensionMessage(extensionId, message) { + // This should broadcast the message to all children "conduits"
91: 5fce9486dc73d ! 95: a4afb9b5ce626 Bug 41598: Prevent NoScript from being removed/disabled. @@ toolkit/components/extensions/Extension.sys.mjs: export class Extension extends // install and upgrade/downgrade startups. if (INSTALL_AND_UPDATE_STARTUP_REASONS.has(this.startupReason)) { - ## toolkit/mozapps/extensions/internal/XPIDatabase.jsm ## -@@ toolkit/mozapps/extensions/internal/XPIDatabase.jsm: class AddonInternal { + ## toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs ## +@@ toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs: export class AddonInternal { } }
92: 39b2203ce3324 ! 96: 459013ab6bb71 Bug 41736: Hide NoScript extension's toolbar button by default. @@ Commit message shows the NoScript button and unpins it). ## browser/base/content/browser-addons.js ## -@@ browser/base/content/browser-addons.js: XPCOMUtils.defineLazyGetter(lazy, "l10n", function () { +@@ browser/base/content/browser-addons.js: ChromeUtils.defineLazyGetter(lazy, "l10n", function () { ); }); @@ browser/base/content/browser-addons.js: var gUnifiedExtensions = { + this._updateVisibility(); + }, + - onWidgetAdded(aWidgetId, aArea, aPosition) { + onWidgetAdded(aWidgetId, aArea) { + this._updateVisibility(); + // When we pin a widget to the toolbar from a narrow window, the widget @@ browser/base/content/browser-addons.js: var gUnifiedExtensions = { @@ browser/base/content/browser-addons.js: var gUnifiedExtensions = { }, - onWidgetOverflow(aNode, aContainer) { + onWidgetOverflow(aNode) { + this._updateVisibility(); + // We register a CUI listener for each window so we make sure that we @@ browser/base/content/browser-addons.js: var gUnifiedExtensions = { @@ browser/base/content/browser-addons.js: var gUnifiedExtensions = { }, - onWidgetUnderflow(aNode, aContainer) { + onWidgetUnderflow(aNode) { + this._updateVisibility(); + // We register a CUI listener for each window so we make sure that we @@ browser/components/extensions/parent/ext-browserAction.js: this.browserAction = ## browser/themes/shared/addons/unified-extensions.css ## @@ browser/themes/shared/addons/unified-extensions.css: unified-extensions-item > .subviewbutton { - border-color: transparent; + } } } + @@ toolkit/mozapps/extensions/content/aboutaddons.html + </label> + </div> + </div> - <div class="addon-detail-row addon-detail-row-updates"> - <label data-l10n-id="addon-detail-updates-label"></label> - <div class="addon-detail-actions"> + <div + class="addon-detail-row addon-detail-row-updates" + role="group" ## toolkit/mozapps/extensions/content/aboutaddons.js ## @@ toolkit/mozapps/extensions/content/aboutaddons.js: class AddonSitePermissionsList extends HTMLElement { @@ toolkit/mozapps/extensions/content/aboutaddons.js: class AddonDetails extends HT // Don't show any private browsing related section for non-extension // addon types, because not relevant or they are either always allowed @@ toolkit/mozapps/extensions/content/aboutaddons.js: class AddonCard extends HTMLElement { - // Update the card if the add-on isn't active. - this.update(); + addon.quarantineIgnoredByUser = e.target.value == "1"; + break; } + } else if (name == "noscript-visibility") { + // Update the NoScript toolbar button visibility.
93: b76e440231392 = 97: 65feb3d1d7e29 Bug 41834: Hide "Can't Be Removed - learn more" menu line for uninstallable add-ons
Again Firefox 127, 1d63ed18488dd44cd0fb4a4a9721ee8069d2d14e (part of browser/base/content/browser.js moved to browser/base/content/browser-init.js).
94: ecd6309e95b46 ! 98: 9157df3c25cf1 Bug 40925: Implemented the Security Level component @@ Commit message Bug 40125: Expose Security Level pref in GeckoView - ## browser/base/content/browser.js ## -@@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( - ["DownloadsButton", "DownloadsIndicatorView"], - "chrome://browser/content/downloads/indicator.js" - ); -+XPCOMUtils.defineLazyScriptGetter( -+ this, -+ ["SecurityLevelButton"], -+ "chrome://browser/content/securitylevel/securityLevel.js" -+); - XPCOMUtils.defineLazyScriptGetter( - this, - "gEditItemOverlay", -@@ browser/base/content/browser.js: var gBrowserInit = { + ## browser/base/content/browser-init.js ## +@@ browser/base/content/browser-init.js: var gBrowserInit = { // doesn't flicker as the window is being shown. DownloadsButton.init(); -+ // Init the SecuritySettingsButton ++ // Init the SecurityLevelButton + SecurityLevelButton.init(); + // Certain kinds of automigration rely on this notification to complete // their tasks BEFORE the browser window is shown. SessionStore uses it to // restore tabs into windows AFTER important parts like gMultiProcessBrowser -@@ browser/base/content/browser.js: var gBrowserInit = { +@@ browser/base/content/browser-init.js: var gBrowserInit = { DownloadsButton.uninit(); @@ browser/base/content/browser.js: var gBrowserInit = { ToolbarKeyboardNavigator.uninit(); } + ## browser/base/content/browser.js ## +@@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( + ["DownloadsButton", "DownloadsIndicatorView"], + "chrome://browser/content/downloads/indicator.js" + ); ++XPCOMUtils.defineLazyScriptGetter( ++ this, ++ ["SecurityLevelButton"], ++ "chrome://browser/content/securitylevel/securityLevel.js" ++); + XPCOMUtils.defineLazyScriptGetter( + this, + "gEditItemOverlay", +
Changed with Firefox 120 (be1eb3c4b85b918cd991fcc68c0f92da1e80ce6d): no more XML stylesheets.
## browser/base/content/browser.xhtml ##
@@
- <?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/content/downloads/downloads.css" type="text/css"?>
-+<?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelPanel.css"?>
-+<?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelButton.css"?>
- <?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
+ <link rel="stylesheet" href="chrome://browser/skin/places/tree-icons.css" />
+ <link rel="stylesheet" href="chrome://browser/skin/places/editBookmark.css" />
+
++ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPanel.css" />
++ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelButton.css" />
++
+ <link rel="localization" href="branding/brand.ftl"/>
+ <link rel="localization" href="browser/allTabsMenu.ftl"/>
+ <link rel="localization" href="browser/appmenu.ftl"/>
Noise
## browser/base/content/main-popupset.inc.xhtml ##
@@
- #include ../../components/downloads/content/downloadsPanel.inc.xhtml
- #include ../../components/translations/content/translationsPanel.inc.xhtml
- #include ../../../devtools/startup/enableDevToolsPopup.inc.xhtml
+ #include ../../components/translations/content/selectTranslationsPanel.inc.xhtml
+ #include ../../components/translations/content/fullPageTranslationsPanel.inc.xhtml
+ #include ../../components/tabbrowser/content/browser-allTabsMenu.inc.xhtml
+#include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml
- #include browser-allTabsMenu.inc.xhtml
<tooltip id="dynamic-shortcut-tooltip"
+ onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
## browser/base/content/navigator-toolbox.inc.xhtml ##
@@
@@ browser/components/moz.build: DIRS += [
+ "securitylevel",
"sessionstore",
"shell",
- "syncedtabs",
+ "shopping",
Stylesheets again
## browser/components/preferences/preferences.xhtml ##
@@
- <?xml-stylesheet href="chrome://browser/skin/preferences/containers.css"?>
- <?xml-stylesheet href="chrome://browser/skin/preferences/privacy.css"?>
- <?xml-stylesheet href="chrome://browser/content/preferences/letterboxing.css"?>
-+<?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelPreferences.css"?>
-
- <!DOCTYPE html>
+ href="chrome://browser/content/preferences/letterboxing.css"
+ />
++ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPreferences.css" />
++
+ <link rel="localization" href="branding/brand.ftl"/>
+ <link rel="localization" href="browser/browser.ftl"/>
+ <!-- Used by fontbuilder.js -->
Noise
## browser/components/preferences/privacy.inc.xhtml ##
@@
@@ browser/components/preferences/privacy.inc.xhtml
<label><html:h2 data-l10n-id="security-browsing-protection"/></label>
## browser/components/preferences/privacy.js ##
-@@ browser/components/preferences/privacy.js: XPCOMUtils.defineLazyGetter(this, "AlertsServiceDND", function () {
- }
- });
+@@ browser/components/preferences/privacy.js: XPCOMUtils.defineLazyServiceGetter(
+ "nsIParentalControlsService"
+ );
+// TODO: module import via ChromeUtils.defineModuleGetter
+XPCOMUtils.defineLazyScriptGetter(
@@ browser/components/preferences/privacy.js: XPCOMUtils.defineLazyGetter(this, "Al
+
XPCOMUtils.defineLazyPreferenceGetter(
this,
- "OS_AUTH_ENABLED",
+ "gIsFirstPartyIsolated",
@@ browser/components/preferences/privacy.js: function initTCPStandardSection() {
var gPrivacyPane = {
_pane: null,
@@ browser/components/preferences/privacy.js: function initTCPStandardSection() {
* Whether the prompt to restart Firefox should appear when changing the autostart pref.
*/
@@ browser/components/preferences/privacy.js: var gPrivacyPane = {
- this.trackingProtectionReadPrefs();
this.networkCookieBehaviorReadPrefs();
this._initTrackingProtectionExtensionControl();
+ this._initThirdPartyCertsToggle();
+ this._initSecurityLevel();
- Services.telemetry.setEventRecordingEnabled("pwmgr", true);
+ Services.telemetry.setEventRecordingEnabled("privacy.ui.fpp", true);
## browser/components/securitylevel/content/securityLevel.js (new) ##
@@ browser/installer/package-manifest.in
## browser/themes/shared/customizableui/panelUI-shared.css ##
@@ browser/themes/shared/customizableui/panelUI-shared.css: panelview .toolbarbutton-1 {
- border-image: var(--panel-separator-zap-gradient, none) 1;
+ }
}
+/* TODO: Check if we can/should merge with the above rule */
@@ browser/themes/shared/customizableui/panelUI-shared.css: panelview .toolbarbutto
+ padding: 0;
+}
+
- .PanelUI-remotetabs-clientcontainer > toolbarbutton[itemtype="tab"],
+ .PanelUI-tabitem-container > toolbarbutton[itemtype="tab"],
#PanelUI-historyItems > toolbarbutton {
list-style-image: url("chrome://global/skin/icons/defaultFavicon.svg");
## mobile/android/geckoview/api.txt ##
@@ mobile/android/geckoview/api.txt: package org.mozilla.geckoview {
+ method @Nullable public GeckoRuntime getRuntime();
method @Nullable public Rect getScreenSizeOverride();
method public boolean getSpoofEnglish();
- method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
+ method public int getTorSecurityLevel();
- method public boolean getUseMaxScreenDepth();
- method public boolean getWebFontsEnabled();
- method public boolean getWebManifestEnabled();
+ method public boolean getTranslationsOfferPopup();
+ method @NonNull public String getTrustedRecursiveResolverUri();
+ method public int getTrustedRecusiveResolverMode();
@@ mobile/android/geckoview/api.txt: package org.mozilla.geckoview {
method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int);
method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setSpoofEnglish(boolean);
+ method @NonNull public GeckoRuntimeSettings setTorSecurityLevel(int);
- method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean);
- method @NonNull public GeckoRuntimeSettings setWebManifestEnabled(boolean);
- field public static final int ALLOW_ALL = 0;
+ method @NonNull public GeckoRuntimeSettings setTranslationsOfferPopup(boolean);
+ method @NonNull public GeckoRuntimeSettings setTrustedRecursiveResolverMode(int);
+ method @NonNull public GeckoRuntimeSettings setTrustedRecursiveResolverUri(@NonNull String);
@@ mobile/android/geckoview/api.txt: package org.mozilla.geckoview {
+ method @NonNull public GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
method @NonNull public GeckoRuntimeSettings.Builder spoofEnglish(boolean);
- method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
+ method @NonNull public GeckoRuntimeSettings.Builder torSecurityLevel(int);
- method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
- method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
- method @NonNull public GeckoRuntimeSettings.Builder webManifest(boolean);
+ method @NonNull public GeckoRuntimeSettings.Builder translationsOfferPopup(boolean);
+ method @NonNull public GeckoRuntimeSettings.Builder trustedRecursiveResolverMode(int);
+ method @NonNull public GeckoRuntimeSettings.Builder trustedRecursiveResolverUri(@NonNull String);
## mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java ##
@@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java: public final class GeckoRuntimeSettings extends RuntimeSettings {
@@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSetting
private GeckoRuntime mRuntime;
@@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java: public final class GeckoRuntimeSettings extends RuntimeSettings {
- new Pref<Boolean>("dom.security.https_only_mode_pbm", false);
- /* package */ final Pref<Integer> mProcessCount = new Pref<>("dom.ipc.processCount", 2);
+ /* package */ final Pref<Boolean> mGlobalPrivacyControlFunctionalityEnabled =
+ new Pref<Boolean>("privacy.globalprivacycontrol.functionality.enabled", true);
/* package */ final Pref<Integer> mSpoofEnglish = new Pref<>("privacy.spoof_english", 0);
+ /* package */ final Pref<Integer> mSecurityLevel =
+ new Pref<>("browser.security_level.security_slider", 4);
@@ mobile/android/installer/package-manifest.in
## toolkit/components/moz.build ##
@@ toolkit/components/moz.build: DIRS += [
- "reputationservice",
+ "reportbrokensite",
"resistfingerprinting",
"search",
+ "securitylevel",
"sessionstore",
"shell",
- "startup",
-
Changed in Firefox 128, 66c7c878a94dccaeb8c00521b8dc36e608111900: upsteam modified getSubmission to pass only the data it actually needs (the charset). I temporarily dropped our change, as restoring it wasn't trivial, so I opened #42617 for that.
- ## toolkit/components/search/SearchEngine.sys.mjs ##
-@@ toolkit/components/search/SearchEngine.sys.mjs: const lazy = {};
- ChromeUtils.defineESModuleGetters(lazy, {
- NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
- SearchUtils: "resource://gre/modules/SearchUtils.sys.mjs",
-+ SecurityLevelPrefs: "resource://gre/modules/SecurityLevel.sys.mjs",
- });
-
- const BinaryInputStream = Components.Constructor(
-@@ toolkit/components/search/SearchEngine.sys.mjs: export class EngineURL {
- }
-
- getSubmission(searchTerms, engine, purpose) {
-- var url = ParamSubstitution(this.template, searchTerms, engine);
-+ let urlTemplate = this.template;
-+ if (
-+ engine &&
-+ (engine._extensionID === "ddg@search.mozilla.org" ||
-+ engine._extensionID === "ddg-onion@search.mozilla.org") &&
-+ this.type === lazy.SearchUtils.URL_TYPE.SEARCH &&
-+ lazy.SecurityLevelPrefs?.securityLevel === "safest"
-+ ) {
-+ urlTemplate += "html";
-+ }
-+ var url = ParamSubstitution(urlTemplate, searchTerms, engine);
- // Default to searchbar if the purpose is not provided
- var requestPurpose = purpose || "searchbar";
-
+ "shopping",
## toolkit/components/securitylevel/SecurityLevel.manifest (new) ##
@@
95: 58949e55edf6c = 99: 538fb8db7f76c fixup! Bug 40925: Implemented the Security Level component
Again Firefox 127, 1d63ed18488dd44cd0fb4a4a9721ee8069d2d14e (part of browser/base/content/browser.js moved to browser/base/content/browser-init.js).
96: 0d2dc8b0e4449 ! 100: 4bc7ec85e5984 Bug 40926: Implemented the New Identity feature @@ browser/base/content/appmenu-viewcache.inc.xhtml class="subviewbutton subviewbutton-nav" data-l10n-id="library-bookmarks-menu" + ## browser/base/content/browser-init.js ## +@@ browser/base/content/browser-init.js: var gBrowserInit = { + // Init the SecurityLevelButton + SecurityLevelButton.init(); + ++ // Init the NewIdentityButton ++ NewIdentityButton.init(); ++ + // Certain kinds of automigration rely on this notification to complete + // their tasks BEFORE the browser window is shown. SessionStore uses it to + // restore tabs into windows AFTER important parts like gMultiProcessBrowser +@@ browser/base/content/browser-init.js: var gBrowserInit = { + + SecurityLevelButton.uninit(); + ++ NewIdentityButton.uninit(); ++ + if (gToolbarKeyNavEnabled) { + ToolbarKeyboardNavigator.uninit(); + } + ## browser/base/content/browser-menubar.inc ## @@ <menuitem id="menu_newPrivateWindow" @@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( XPCOMUtils.defineLazyScriptGetter( this, "gEditItemOverlay", -@@ browser/base/content/browser.js: var gBrowserInit = { - // Init the SecuritySettingsButton - SecurityLevelButton.init(); - -+ // Init the NewIdentityButton -+ NewIdentityButton.init(); -+ - // Certain kinds of automigration rely on this notification to complete - // their tasks BEFORE the browser window is shown. SessionStore uses it to - // restore tabs into windows AFTER important parts like gMultiProcessBrowser -@@ browser/base/content/browser.js: var gBrowserInit = { - - SecurityLevelButton.uninit(); - -+ NewIdentityButton.uninit(); -+ - if (gToolbarKeyNavEnabled) { - ToolbarKeyboardNavigator.uninit(); - }
Changed in Firefox 117, 14ad5f1a886d7a8b1265659797e9d1ef0c50e825: upstream refactored OpenBrowserWindow function, so I moved our changes to the new location (browser/modules/BrowserWindowTracker.sys.mjs) and linted.
-@@ browser/base/content/browser.js: function OpenBrowserWindow(options) {
- var extraFeatures = "";
- if (options && options.private && PrivateBrowsingUtils.enabled) {
- extraFeatures = ",private";
-- if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
-+ if (!PrivateBrowsingUtils.permanentPrivateBrowsing || options.private === "no-home") {
- // Force the new window to load about:privatebrowsing instead of the default home page
- defaultArgs = "about:privatebrowsing";
- }
Noise
## browser/base/content/navigator-toolbox.inc.xhtml ##
@@
@@ browser/base/content/navigator-toolbox.inc.xhtml
## browser/components/moz.build ##
@@ browser/components/moz.build: DIRS += [
- "extensions",
+ "genai",
"messagepreview",
"migration",
+ "newidentity",
@@ browser/components/newidentity/moz.build (new)
@@
+JAR_MANIFESTS += ["jar.mn"]
What used to be in OpenBrowserWindow (notice args might be null, but I fixed that in a later commit):
+ ## browser/modules/BrowserWindowTracker.sys.mjs ##
+@@ browser/modules/BrowserWindowTracker.sys.mjs: export const BrowserWindowTracker = {
+ let loadURIString;
+ if (isPrivate && lazy.PrivateBrowsingUtils.enabled) {
+ windowFeatures += ",private";
+- if (!args && !lazy.PrivateBrowsingUtils.permanentPrivateBrowsing) {
++ if (
++ (!args && !lazy.PrivateBrowsingUtils.permanentPrivateBrowsing) ||
++ args.private === "no-home"
++ ) {
+ // Force the new window to load about:privatebrowsing instead of the
+ // default home page.
+ loadURIString = "about:privatebrowsing";
+
Noise
## browser/themes/shared/icons/new_identity.svg (new) ##
@@
+<?xml version="1.0" encoding="UTF-8"?>
@@ browser/themes/shared/jar.inc.mn
+ skin/classic/browser/new_identity.svg (../shared/icons/new_identity.svg)
## browser/themes/shared/toolbarbutton-icons.css ##
-@@ browser/themes/shared/toolbarbutton-icons.css: toolbar[brighttext]:-moz-lwtheme {
+@@
list-style-image: url("chrome://browser/skin/new-tab.svg");
}
Fixed a runtime error in new identity (args might be null).
-: ------------- > 101: 716276e181fad keepforreview! Bug 40926: Implemented the New Identity feature
97: 48d9aeff76a63 ! 102: a9b7e86f30caf Bug 41736: Customize toolbar for base-browser. @@ Commit message ## browser/components/customizableui/CustomizableUI.sys.mjs ## @@ browser/components/customizableui/CustomizableUI.sys.mjs: const kSubviewEvents = ["ViewShowing", "ViewHiding"]; */ - var kVersion = 19; + var kVersion = 20; +/** + * The current version for base browser. @@ browser/components/customizableui/CustomizableUI.sys.mjs: var CustomizableUIInte this.registerArea( CustomizableUI.AREA_FIXED_OVERFLOW_PANEL, @@ browser/components/customizableui/CustomizableUI.sys.mjs: var CustomizableUIInternal = { - Services.policies.isAllowed("removeHomeButtonByDefault") ? null : "home-button", + Services.prefs.getBoolPref("sidebar.revamp") ? "sidebar-button" : null, - "spring", + // Don't want springs either side of the urlbar. tor-browser#41736 "urlbar-container",
98: dab761e3b6732 = 103: 6c864e41aafe7 Bug 42027: Base Browser migration procedures.
99: 765527d037ad7 ! 104: fceab83510025 Bug 42583: Modify moz-support-link for Base Browser. @@ Commit message Bug 42583: Modify moz-support-link for Base Browser. ## toolkit/content/widgets/moz-support-link/moz-support-link.mjs ## -@@ toolkit/content/widgets/moz-support-link/moz-support-link.mjs: MozXULElement.insertFTLIfNeeded("browser/components/mozSupportLink.ftl"); +@@ toolkit/content/widgets/moz-support-link/moz-support-link.mjs: window.MozXULElement?.insertFTLIfNeeded("toolkit/global/mozSupportLink.ftl"); export default class MozSupportLink extends HTMLAnchorElement { static SUPPORT_URL = "https://www.mozilla.org/"; static get observedAttributes() { @@ toolkit/content/widgets/moz-support-link/moz-support-link.mjs: MozXULElement.ins @@ toolkit/content/widgets/moz-support-link/moz-support-link.mjs: export default class MozSupportLink extends HTMLAnchorElement { } - attributeChangedCallback(attrName, oldVal, newVal) { + attributeChangedCallback(attrName) { - if (attrName === "support-page" || attrName === "utm-content") { + if ( + attrName === "support-page" ||
100: b2453fc54e4c0 ! 105: 86857ca93cf04 Bug 42347: Add a notification for dropped OS version support. @@ Commit message ## browser/base/content/browser.xhtml ## @@ - Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this); + Services.scriptloader.loadSubScript("chrome://browser/content/shopping/shopping-sidebar.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this); + Services.scriptloader.loadSubScript("chrome://browser/content/droppedSupportNotification.js", this);
167: 11b5208d2ac12 = 106: d253f856dd9a7 fixup! Firefox preference overrides.
101: a86a6c706b138 = 107: 9034384174cfd Bug 42308: Create README for tor-browser.
102: be3a2824dc66a = 108: 0e84f8e4e8e68 Bug 41649: Create rebase and security backport gitlab issue templates
103: 14489b23d0781 = 109: ec03736019a03 Add CI for Tor Browser
Fixed the capitalization of the Tor Browser name 😄️.
104: 3a97e7508c712 ! 110: ace0ebc97dcc5 Bug 41089: Add tor-browser build scripts + Makefile to tor-browser @@ Commit message Bug 41089: Add tor-browser build scripts + Makefile to tor-browser ## .eslintignore ## -@@ .eslintignore: toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/ - toolkit/components/uniffi-bindgen-gecko-js/components/generated/* +@@ .eslintignore: dom/base/test/jsmodules/import_circular.mjs + dom/base/test/jsmodules/import_circular_1.mjs browser/app/profile/001-base-profile.js +tools/torbrowser/bridges.js ## .gitignore ## -@@ .gitignore: tools/esmify/package-lock.json +@@ .gitignore: mobile/android/annotations/bin/ - # Ignore automatically generated mots documentation - docs/mots/index.rst + # Ignore generated log files under media/libvpx + media/libvpx/config/**/config.log + -+# Ignore binary base of tor browser ++# Ignore binary base of Tor Browser +.binaries ## tools/geckoview/.gitignore (new) ##
105: f8186cfa35375 = 111: 382b8a735a8ca Bug 41803: Add some developer tools for working on tor-browser.
106: 44fb94b271a76 ! 112: 85bda33b3ec71 Bug 11641: Disable remoting by default. @@ toolkit/xre/nsAppRunner.cpp: static void DumpHelp() { "instance.\n" #endif @@ toolkit/xre/nsAppRunner.cpp: int XREMain::XRE_mainInit(bool* aExitFlag) { - gSafeMode); + &gSafeMode); #if defined(MOZ_HAS_REMOTE) - // Handle --no-remote and --new-instance command line arguments. Setup
107: 595ddd12fbda2 ! 113: 433843ec541d0 Add TorStrings module for localization @@ Commit message ## browser/base/content/browser.xhtml ## @@ - <?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?> - <?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?> + # 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/. +<!DOCTYPE window [ + <!ENTITY % torbuttonDTD SYSTEM "chrome://torbutton/locale/torbutton.dtd">
108: ad05bb747aaca ! 114: cfaaede2074c4 Tor Browser strings @@ browser/base/content/browser.xhtml <link rel="localization" href="toolkit/global/base-browser.ftl"/> + <link rel="localization" href="toolkit/global/tor-browser.ftl"/> <!-- Untranslated FTL files --> - <link rel="localization" href="preview/firefoxSuggest.ftl" /> - <link rel="localization" href="preview/identityCredentialNotification.ftl" /> + <link rel="localization" href="preview/enUS-searchFeatures.ftl" /> + <link rel="localization" href="preview/interventions.ftl" /> ## browser/components/preferences/preferences.xhtml ## @@
109: 8f5ecd2837d3e = 115: f6098ccec4887 Tor Browser localization migration scripts.
110: 9e2e5dcdab2f6 = 116: 7e43587d39b86 Bug 42305: Add script to combine translation files across versions.
No actual changes in this first block
111: 8b693ec5fd6ed ! 117: d83e33cbabace Bug 2176: Rebrand Firefox to TorBrowser @@ Commit message Bug 42087: New application icons (windows). ## browser/app/Makefile.in ## -@@ browser/app/Makefile.in: ifdef MOZ_UPDATER - ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' - endif +@@ browser/app/Makefile.in: endif endif + $(MKDIR) -p '$(dist_dest)/Contents/Frameworks' + mv '$(dist_dest)/Contents/Resources/ChannelPrefs.framework' '$(dist_dest)/Contents/Frameworks' - printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo' + printf APPLTORB > '$(dist_dest)/Contents/PkgInfo' endif @@ browser/app/macbuild/Contents/Info.plist.in <dict>
Changed with Firefox 120 (be1eb3c4b85b918cd991fcc68c0f92da1e80ce6d): no more XML stylesheets.
## browser/base/content/aboutDialog.xhtml ##
-@@
- <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
- <?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
-+<?xml-stylesheet href="chrome://browser/content/aboutDialogTor.css" type="text/css"?>
-
- <window xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@
data-l10n-id="aboutDialog-title"
#endif
@@ browser/base/content/aboutDialog.xhtml
#ifdef XP_MACOSX
#include macWindow.inc.xhtml
@@
+ rel="stylesheet"
+ href="chrome://branding/content/aboutDialog.css"
+ />
++ <html:link
++ rel="stylesheet"
++ href="chrome://browser/content/aboutDialogTor.css"
++ />
+
<html:link rel="localization" href="branding/brand.ftl"/>
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
<html:link rel="localization" href="toolkit/global/base-browser.ftl"/>
Changed in Firefox 126, 6b3bff6baa8dde4ba8e9533f3c3041e07d5bb905: upstream changed their donation link, but we remove it anyway.
@@ browser/base/content/aboutDialog.xhtml
+ <label is="text-link" href="https://www.torproject.org/" data-l10n-name="project-link"></label>
</description>
- <description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
-- <label is="text-link" href="https://donate.mozilla.org/?utm_source=firefox&utm_medium=referral&utm_campaign=firefox_about&utm_content=firefox_about" data-l10n-name="helpus-donateLink"/>
+- <label is="text-link" href="https://foundation.mozilla.org/?form=firefox-about" data-l10n-name="helpus-donateLink"/>
- <label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
+ <description class="text-blurb" id="helpDesc" data-l10n-id="about-dialog-help-out">
+ <label is="text-link" href="https://donate.torproject.org/" data-l10n-name="donate-link"></label>
@@ browser/base/jar.mn: browser.jar:
Changed in Firefox 122, 141305b4e4fecdde9073856c66d8dc961fec961e: upstream linted, I followed.
## browser/branding/branding-common.mozbuild ##
@@ browser/branding/branding-common.mozbuild: def FirefoxBranding():
- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
- FINAL_TARGET_FILES['..'] += [
- 'firefox.VisualElementsManifest.xml',
-- 'private_browsing.VisualElementsManifest.xml',
+ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
+ FINAL_TARGET_FILES[".."] += [
+ "firefox.VisualElementsManifest.xml",
+- "private_browsing.VisualElementsManifest.xml",
]
FINAL_TARGET_FILES.VisualElements += [
-- 'PrivateBrowsing_150.png',
-- 'PrivateBrowsing_70.png',
- 'VisualElements_150.png',
- 'VisualElements_70.png',
+- "PrivateBrowsing_150.png",
+- "PrivateBrowsing_70.png",
+ "VisualElements_150.png",
+ "VisualElements_70.png",
]
- elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
+ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
FINAL_TARGET_FILES.chrome.icons.default += [
-+ 'content/about-logo.svg',
- 'default128.png',
- 'default16.png',
-+ 'default256.png',
- 'default32.png',
- 'default48.png',
- 'default64.png',
++ "content/about-logo.svg",
+ "default128.png",
+ "default16.png",
++ "default256.png",
+ "default32.png",
+ "default48.png",
+ "default64.png",
## browser/branding/tb-alpha/VisualElements_150.png (new) ##
Binary files /dev/null and browser/branding/tb-alpha/VisualElements_150.png differ
No changes on our patches.
@@ mobile/android/branding/unofficial/locales/jar.mn
- locale/branding/brand.properties (en-US/brand.properties)
+# We provide all brand files in torbutton
- ## toolkit/content/widgets/message-bar.css ##
+ ## toolkit/content/widgets/infobar.css ##
@@
- display: block;
- width: 2px;
- position: absolute;
+ color: var(--info-bar-text-color);
+
+ &::before {
- background-image: linear-gradient(0deg, #9059ff 0%, #ff4aa2 52.08%, #ffbd4f 100%);
+ background-image: linear-gradient(0, #00dbde 0%, #9a89ff 50%, #fc00ff 100%);
- top: 0;
- inset-inline-start: 0;
- height: 100%;
+ }
+ }
+ }
## toolkit/content/widgets/moz-support-link/moz-support-link.mjs ##
@@ toolkit/content/widgets/moz-support-link/moz-support-link.mjs: export default class MozSupportLink extends HTMLAnchorElement {
@@ toolkit/content/widgets/moz-support-link/moz-support-link.mjs: export default cl
## toolkit/themes/shared/desktop-jar.inc.mn ##
@@
- skin/classic/global/icons/loading.png (../../shared/icons/loading.png)
skin/classic/global/icons/loading@2x.png (../../shared/icons/loading@2x.png)
+ skin/classic/global/icons/mdn.svg (../../shared/icons/mdn.svg)
skin/classic/global/icons/more.svg (../../shared/icons/more.svg)
+ skin/classic/global/icons/onion-site.svg (../../shared/icons/onion-site.svg)
+ skin/classic/global/icons/onion-slash.svg (../../shared/icons/onion-slash.svg)
112: cfdcd7d0e0bda = 118: 16d5457df0982 fixup! Bug 2176: Rebrand Firefox to TorBrowser
113: da11358cd8ecf = 119: ab5d7245ad4e6 Bug 42583: Modify moz-support-link for Tor Browser.
114: f624f72f31163 ! 120: 5f8cb22e39c60 Bug 41917: Tor brand-specific styles. @@ Commit message ## browser/themes/shared/browser-shared.css ## @@ - @import url("chrome://browser/skin/customizableui/customizeMode.css"); @import url("chrome://browser/skin/UITour.css"); + @import url("chrome://browser/skin/formautofill-notification.css"); @import url("chrome://global/skin/browser-colors.css"); +@import url("chrome://browser/skin/tor-branding.css"); @@ browser/themes/shared/browser-shared.css ## browser/themes/shared/jar.inc.mn ## @@ - skin/classic/browser/tabs.css (../shared/tabs.css) + skin/classic/browser/sidebar.css (../shared/sidebar.css) skin/classic/browser/toolbarbuttons.css (../shared/toolbarbuttons.css) skin/classic/browser/toolbarbutton-icons.css (../shared/toolbarbutton-icons.css) + skin/classic/browser/tor-branding.css (../shared/tor-branding.css)
115: 3042f3a0d7a45 ! 121: 1b6c858bce99b Add purple tor version of the loading APNG. @@ Commit message ## toolkit/themes/shared/desktop-jar.inc.mn ## @@ + skin/classic/global/icons/security-warning.svg (../../shared/icons/security-warning.svg) skin/classic/global/icons/settings.svg (../../shared/icons/settings.svg) - skin/classic/global/icons/shortcut.svg (../../shared/icons/shortcut.svg) skin/classic/global/icons/sort-arrow.svg (../../shared/icons/sort-arrow.svg) + skin/classic/global/icons/tor-light-loading.png (../../shared/icons/tor-light-loading.png) + skin/classic/global/icons/tor-light-loading@2x.png (../../shared/icons/tor-light-loading@2x.png) + skin/classic/global/icons/tor-dark-loading.png (../../shared/icons/tor-dark-loading.png) + skin/classic/global/icons/tor-dark-loading@2x.png (../../shared/icons/tor-dark-loading@2x.png) - skin/classic/global/icons/trackers.svg (../../shared/icons/trackers.svg) skin/classic/global/icons/trending.svg (../../shared/icons/trending.svg) skin/classic/global/icons/update-icon.svg (../../shared/icons/update-icon.svg) + skin/classic/global/icons/arrow-down-12.svg (../../shared/icons/arrow-down-12.svg) ## toolkit/themes/shared/icons/tor-dark-loading.png (new) ## Binary files /dev/null and toolkit/themes/shared/icons/tor-dark-loading.png differ
I think there's some newline change that confuses diffs (and range-diff as a consequence). However, the final result should not actually change for us.
116: 30ad4ee479876 ! 122: c11e69aad3115 Bug 40209: Implement Basic Crypto Safety @@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = { ## toolkit/content/license.html ## @@ + <li><a href="about:license#apple">Apple License</a></li> + <li><a href="about:license#apple-password-rules-parser">Apple Password Rules Parser License</a></li> <li><a href="about:license#arm">ARM License</a></li> - <li><a href="about:license#babel">Babel License</a></li> - <li><a href="about:license#babylon">Babylon License</a></li> + <li><a href="about:license#bech32">Bech32 License</a></li> - <li><a href="about:license#bincode">bincode License</a></li> <li><a href="about:license#boost">boost License</a></li> <li><a href="about:license#bsd2clause">BSD 2-Clause License</a></li> -@@ toolkit/content/license.html: furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. + <li><a href="about:license#bsd3clause">BSD 3-Clause License</a></li> +@@ toolkit/content/license.html: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + </pre> -+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -+THE SOFTWARE. -+</pre> -+ + + <hr> + @@ toolkit/content/license.html: furnished to do so, subject to the following condi +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++THE SOFTWARE. ++</pre> ++ ++ + <hr> + + <h1><a id="boost"></a>boost License</h1> ## toolkit/modules/Bech32Decode.jsm (new) ## @@
Cleaned a little bit: this commit used to remove export MOZILLA_OFFICIAL= to then add it later in the file. Removed that. Check also b0d07c28fe12006ca27fcc56a731e78db1665e4e from 115.10 to understand what I mean.
117: 638f48607fc79 ! 123: a791c59b151b3 TB3: Tor Browser's official .mozconfigs. @@ mozconfig-macos-dev # This mozconfig file is not used in official builds. # It is only intended to be used when doing incremental macOS builds - # during development. - --export MOZILLA_OFFICIAL= -- - ac_add_options --disable-strip - ac_add_options --disable-install-strip - @@ mozconfig-macos-dev: ac_add_options --disable-update-agent # Let's make sure no preference is enabling either Adobe's or Google's CDM. @@ mozconfig-macos-dev: ac_add_options --disable-update-agent +ac_add_options --with-relative-data-dir=../TorBrowser-Data/Browser + +#copied from the diff between mozconfig-linux-x86_64 and mozconfig-linux-x86_64-dev -+export MOZILLA_OFFICIAL= +export MOZ_APP_REMOTINGNAME="Tor Browser Dev" +ac_add_options --with-branding=browser/branding/tb-nightly
118: fc07dee86848b ! 124: 4f55f10727eab Bug 41340: Enable TOR_BROWSER_NIGHTLY_BUILD features for dev and nightly builds @@ intl/l10n/Localization.h: namespace intl { + defined(TOR_BROWSER_NIGHTLY_BUILD) dom::Document* doc = nullptr; if (aGlobal) { - nsPIDOMWindowInner* innerWindow = aGlobal->AsInnerWindow(); + nsPIDOMWindowInner* innerWindow = aGlobal->GetAsInnerWindow(); ## modules/libpref/init/all.js ## @@ modules/libpref/init/all.js: pref("devtools.policy.disabled", false);
Noise
119: ea41417f83f20 ! 125: 0a89a7429d4c3 Bug 40562: Added Tor Browser preferences to 000-tor-browser.js @@ Commit message apply. ## .eslintignore ## -@@ .eslintignore: toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/ - toolkit/components/uniffi-bindgen-gecko-js/components/generated/* +@@ .eslintignore: dom/base/test/jsmodules/import_circular.mjs + dom/base/test/jsmodules/import_circular_1.mjs browser/app/profile/001-base-profile.js +browser/app/profile/000-tor-browser.js @@ browser/app/profile/000-tor-browser.js (new) ## browser/installer/package-manifest.in ## @@ - @RESPATH@/browser/defaults/settings/blocklists - @RESPATH@/browser/defaults/settings/main - @RESPATH@/browser/defaults/settings/security-state + @RESPATH@/browser/defaults/permissions + ; Remote Settings JSON dumps + @RESPATH@/browser/defaults/settings -@RESPATH@/browser/@PREF_DIR@/001-base-profile.js +@RESPATH@/browser/@PREF_DIR@/000-tor-browser.js - ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325) - ; Technically this is an app pref file, but we are keeping it in the original + # channel-prefs.js has been removed on macOS. + #ifndef XP_MACOSX ## browser/moz.build ## @@ browser/moz.build: if CONFIG["MOZ_ARTIFACT_BUILDS"]: @@ mobile/android/app/000-tor-browser-android.js (new) +pref("extensions.torbutton.launch_warning", false); ## mobile/android/app/geckoview-prefs.js ## -@@ mobile/android/app/geckoview-prefs.js: pref("pdfjs.handleOctetStream", true); - pref("browser.download.open_pdf_attachments_inline", true); - pref("pdfjs.annotationEditorMode", -1); - pref("pdfjs.enableFloatingToolbar", true); +@@ mobile/android/app/geckoview-prefs.js: pref("xpinstall.signatures.required", true); + + pref("xpinstall.whitelist.add", "https://addons.mozilla.org"); + pref("xpinstall.whitelist.fileRequest", false); + +#include 000-tor-browser-android.js
Changed in Firefox 120, e1c08f9fbf3671467151c6aa8cbbee39c21f9d74: upstream removed mobile.js, which was their only preprocessed pref for mobile. So, when they removed it, they also removed JS_PREFERENCE_PP_FILES. Added it back.
## mobile/android/app/moz.build ##
-@@ mobile/android/app/moz.build: if CONFIG["MOZ_PKG_SPECIAL"]:
+@@ mobile/android/app/moz.build: for var in ("MOZ_UPDATER", "MOZ_APP_UA_NAME", "ANDROID_PACKAGE_NAME", "TARGET_CP
+ if CONFIG["MOZ_PKG_SPECIAL"]:
DEFINES["MOZ_PKG_SPECIAL"] = CONFIG["MOZ_PKG_SPECIAL"]
- JS_PREFERENCE_PP_FILES += [
++JS_PREFERENCE_PP_FILES += [
+ "000-tor-browser-android.js",
- "mobile.js",
- ]
-
-
Same as above (31189103635f0).
- ## taskcluster/ci/source-test/mozlint.yml ##
-@@ taskcluster/ci/source-test/mozlint.yml: lintpref:
- files-changed:
- - 'modules/libpref/init/all.js'
- - 'modules/libpref/init/StaticPrefList.yaml'
-- - 'browser/app/profile/001-base-profile.js'
-+ - 'browser/app/profile/000-tor-browser.js'
- - 'browser/app/profile/firefox.js'
- - 'mobile/android/app/mobile.js'
- - 'devtools/client/preferences/debugger.js'
++]
++
+ if not CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
+ # Equivalent to JS_PREFERENCE_PP_FILES[CONFIG['ANDROID_CPU_ARCH']],
+ # which isn't supported out of the box.
120: a75419eae274a = 126: b9a27b5a1af6a fixup! Bug 40562: Added Tor Browser preferences to 000-tor-browser.js
121: d3ee7b24c211e ! 127: 9e3a72e091fad Bug 13252: Customize profile management on macOS @@ toolkit/xre/nsXREDirProvider.h: class nsXREDirProvider final : public nsIDirecto nsISimpleEnumerator** aResult); ## xpcom/io/CocoaFileUtils.mm ## -@@ xpcom/io/CocoaFileUtils.mm: CFURLRef GetTemporaryFolderCFURLRef() { - } +@@ xpcom/io/CocoaFileUtils.mm: CFTypeRefPtr<CFURLRef> GetTemporaryFolder() { + CFTypeRefPtr<CFURLRef> GetProductDirectory(bool aLocal) { + nsAutoreleasePool localPool; - CFURLRef GetProductDirectoryCFURLRef(bool aLocal) { +#if defined(TOR_BROWSER) + NSSearchPathDirectory folderType = NSApplicationSupportDirectory; +#else - NSSearchPathDirectory folderType = aLocal ? NSCachesDirectory : NSLibraryDirectory; + NSSearchPathDirectory folderType = + aLocal ? NSCachesDirectory : NSLibraryDirectory; +#endif NSFileManager* manager = [NSFileManager defaultManager]; - return static_cast<CFURLRef>([[manager URLsForDirectory:folderType - inDomains:NSUserDomainMask] firstObject]); + return CFTypeRefPtr<CFURLRef>::WrapUnderGetRule((__bridge CFURLRef)[[manager + URLsForDirectory:folderType ## xpcom/io/nsAppFileLocationProvider.cpp ## @@ xpcom/io/nsAppFileLocationProvider.cpp: nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
122: 6f0effdd0031d ! 128: 9997cac3da456 Bug 40933: Add tor-launcher functionality @@ Commit message ## browser/components/BrowserGlue.sys.mjs ## @@ browser/components/BrowserGlue.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { - "resource://messaging-system/lib/SpecialMessageActions.sys.mjs", - TRRRacer: "resource:///modules/TRRPerformance.sys.mjs", + TabCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs", + TabUnloader: "resource:///modules/TabUnloader.sys.mjs", TelemetryUtils: "resource://gre/modules/TelemetryUtils.sys.mjs", + TorProviderBuilder: "resource://gre/modules/TorProviderBuilder.sys.mjs", UIState: "resource://services-sync/UIState.sys.mjs",
123: f1fc372910e10 = 129: 6711a75a13c99 fixup! Bug 40933: Add tor-launcher functionality
124: 8c513d3d72691 ! 130: b5e6d2da33c19 Lox integration @@ toolkit/components/moz.build: DIRS += [ "kvstore", + "lox", "mediasniffer", + "ml", "mozintl", - "mozprotocol",
125: 969f20fc222a9 ! 131: 53f4f57d0e23e Bug 40597: Implement TorSettings module @@ toolkit/modules/moz.build: EXTRA_JS_MODULES += [ + "BridgeDB.sys.mjs", "BrowserTelemetryUtils.sys.mjs", "BrowserUtils.sys.mjs", - "CanonicalJSON.jsm", + "CanonicalJSON.sys.mjs", @@ toolkit/modules/moz.build: EXTRA_JS_MODULES += [ + "CreditCard.sys.mjs", "DateTimePickerPanel.sys.mjs", "DeferredTask.sys.mjs", - "Deprecated.sys.mjs", + "DomainFrontedRequests.sys.mjs", "E10SUtils.sys.mjs", "EventEmitter.sys.mjs", "FileUtils.sys.mjs", @@ toolkit/modules/moz.build: EXTRA_JS_MODULES += [ - "KeywordUtils.sys.mjs", "LayoutUtils.sys.mjs", "Log.sys.mjs", + "LogManager.sys.mjs", + "Moat.sys.mjs", "NewTabUtils.sys.mjs", "NLP.sys.mjs", - "ObjectUtils.jsm", + "ObjectUtils.sys.mjs", @@ toolkit/modules/moz.build: EXTRA_JS_MODULES += [ "Sqlite.sys.mjs", "SubDialog.sys.mjs",
126: d82b904bac2d1 ! 132: e272fdcbd3086 Bug 3455: Add DomainIsolator, for isolating circuit by domain. @@ browser/themes/shared/jar.inc.mn + skin/classic/browser/new_circuit.svg (../shared/icons/new_circuit.svg) ## browser/themes/shared/toolbarbutton-icons.css ## -@@ browser/themes/shared/toolbarbutton-icons.css: toolbar[brighttext]:-moz-lwtheme { +@@ list-style-image: url("chrome://browser/skin/new_identity.svg"); } @@ browser/themes/shared/toolbarbutton-icons.css: toolbar[brighttext]:-moz-lwtheme list-style-image: url("chrome://browser/skin/privateBrowsing.svg"); } - ## mobile/android/components/geckoview/GeckoViewStartup.jsm ## -@@ mobile/android/components/geckoview/GeckoViewStartup.jsm: ChromeUtils.defineESModuleGetters(lazy, { + ## mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs ## +@@ mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { + EventDispatcher: "resource://gre/modules/Messaging.sys.mjs", PdfJs: "resource://pdf.js/PdfJs.sys.mjs", - Preferences: "resource://gre/modules/Preferences.sys.mjs", RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs", + TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.sys.mjs", }); - const { XPCOMUtils } = ChromeUtils.importESModule( -@@ mobile/android/components/geckoview/GeckoViewStartup.jsm: class GeckoViewStartup { - "GeckoView:SetLocale", + const { debug, warn } = GeckoViewUtils.initLogging("Startup"); +@@ mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs: export class GeckoViewStartup { + "GeckoView:InitialForeground", ]); + lazy.TorDomainIsolator.init();
127: e3941453fcbe4 = 133: 5721d475a7f5c fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.
Probably a false-positive due to the creation of browser/base/content/browser-init.js (Firefox 127, 1d63ed18488dd44cd0fb4a4a9721ee8069d2d14e; notice there isn't any actual change, everything is detected as moved).
128: 5cb01a480f322 ! 134: 01d6a72b18e81 Bug 41600: Add a tor circuit display panel. @@ Metadata ## Commit message ## Bug 41600: Add a tor circuit display panel. - ## browser/base/content/browser.js ## -@@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( - "gPageStyleMenu", - "chrome://browser/content/browser-pagestyle.js" - ); -+XPCOMUtils.defineLazyScriptGetter( -+ this, -+ ["gTorCircuitPanel"], -+ "chrome://browser/content/torCircuitPanel.js" -+); - - // lazy service getters - -@@ browser/base/content/browser.js: var gBrowserInit = { + ## browser/base/content/browser-init.js ## +@@ browser/base/content/browser-init.js: var gBrowserInit = { // Init the NewIdentityButton NewIdentityButton.init(); @@ browser/base/content/browser.js: var gBrowserInit = { // Certain kinds of automigration rely on this notification to complete // their tasks BEFORE the browser window is shown. SessionStore uses it to // restore tabs into windows AFTER important parts like gMultiProcessBrowser -@@ browser/base/content/browser.js: var gBrowserInit = { +@@ browser/base/content/browser-init.js: var gBrowserInit = { NewIdentityButton.uninit(); @@ browser/base/content/browser.js: var gBrowserInit = { ToolbarKeyboardNavigator.uninit(); } + ## browser/base/content/browser.js ## +@@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( + "gProfiles", + "chrome://browser/content/browser-profiles.js" + ); ++XPCOMUtils.defineLazyScriptGetter( ++ this, ++ ["gTorCircuitPanel"], ++ "chrome://browser/content/torCircuitPanel.js" ++); + + // lazy service getters + +
Changed with Firefox 120 (be1eb3c4b85b918cd991fcc68c0f92da1e80ce6d): no more XML stylesheets.
## browser/base/content/browser.xhtml ##
@@
- <?xml-stylesheet href="chrome://browser/skin/translations/panel.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?>
-+<?xml-stylesheet href="chrome://browser/content/torCircuitPanel.css" type="text/css"?>
- <!DOCTYPE window [
- <!ENTITY % torbuttonDTD SYSTEM "chrome://torbutton/locale/torbutton.dtd">
+ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPanel.css" />
+ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelButton.css" />
++ <link rel="stylesheet" href="chrome://browser/content/torCircuitPanel.css" />
+
+ <link rel="localization" href="branding/brand.ftl"/>
+ <link rel="localization" href="browser/allTabsMenu.ftl"/>
## browser/base/content/main-popupset.inc.xhtml ##
@@
- #include ../../components/downloads/content/downloadsPanel.inc.xhtml
- #include ../../components/translations/content/translationsPanel.inc.xhtml
- #include ../../../devtools/startup/enableDevToolsPopup.inc.xhtml
+ #include ../../components/translations/content/selectTranslationsPanel.inc.xhtml
+ #include ../../components/translations/content/fullPageTranslationsPanel.inc.xhtml
+ #include ../../components/tabbrowser/content/browser-allTabsMenu.inc.xhtml
+#include ../../components/torcircuit/content/torCircuitPanel.inc.xhtml
#include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml
- #include browser-allTabsMenu.inc.xhtml
+ <tooltip id="dynamic-shortcut-tooltip"
## browser/base/content/navigator-toolbox.inc.xhtml ##
@@
@@ browser/base/content/navigator-toolbox.inc.xhtml
+ hidden="true">
+ <image id="tor-circuit-button-icon"/>
+ </box>
- <box id="urlbar-search-button"
- class="chromeclass-toolbar-additional"/>
+ <box class="chromeclass-toolbar-additional urlbar-search-button"/>
<!-- Use onclick instead of normal popup= syntax since the popup
+ code fires onmousedown, and hence eats our favicon drag events. -->
## browser/components/moz.build ##
@@ browser/components/moz.build: DIRS += [
129: 9291041f4bc4b = 135: 69f82e3eca678 fixup! Bug 41600: Add a tor circuit display panel.
Changed in Firefox 128, 21bcae940a19e81634d0facfca620c443cd76bea: some code has been moved from mobile/android to mobile/shared.
130: c42593420381d ! 136: 4571ea46bc36f Bug 42247: Android helpers for the TorProvider @@ Commit message Therefore, we need to implement them in Java and plumb the data back and forth between JS and Java. - ## mobile/android/components/geckoview/GeckoViewStartup.jsm ## -@@ mobile/android/components/geckoview/GeckoViewStartup.jsm: ChromeUtils.defineESModuleGetters(lazy, { - PdfJs: "resource://pdf.js/PdfJs.sys.mjs", - Preferences: "resource://gre/modules/Preferences.sys.mjs", - RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs", -+ TorAndroidIntegration: "resource://gre/modules/TorAndroidIntegration.sys.mjs", - TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.sys.mjs", - }); - -@@ mobile/android/components/geckoview/GeckoViewStartup.jsm: class GeckoViewStartup { - "GeckoView:SetLocale", - ]); - -+ lazy.TorAndroidIntegration.init(); - lazy.TorDomainIsolator.init(); - - Services.obs.addObserver(this, "browser-idle-startup-tasks-finished"); - ## mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java ## @@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java: public final class GeckoRuntime implements Parcelable { private final ProfilerController mProfilerController; @@ mobile/android/geckoview/src/main/java/org/mozilla/geckoview/androidlegacysettin + + - ## mobile/android/modules/geckoview/GeckoViewContent.sys.mjs ## -@@ + ## mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs ## +@@ mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { + EventDispatcher: "resource://gre/modules/Messaging.sys.mjs", + PdfJs: "resource://pdf.js/PdfJs.sys.mjs", + RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs", ++ TorAndroidIntegration: "resource://gre/modules/TorAndroidIntegration.sys.mjs", + TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.sys.mjs", + }); + +@@ mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs: export class GeckoViewStartup { + "GeckoView:InitialForeground", + ]); - import { GeckoViewModule } from "resource://gre/modules/GeckoViewModule.sys.mjs"; ++ lazy.TorAndroidIntegration.init(); + lazy.TorDomainIsolator.init(); + + Services.obs.addObserver(this, "browser-idle-startup-tasks-finished"); + + ## mobile/shared/modules/geckoview/GeckoViewContent.sys.mjs ## +@@ mobile/shared/modules/geckoview/GeckoViewContent.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { + ShoppingProduct: "chrome://global/content/shopping/ShoppingProduct.mjs", + }); +const lazy = {}; + @@ mobile/android/modules/geckoview/GeckoViewContent.sys.mjs export class GeckoViewContent extends GeckoViewModule { onInit() { this.registerListener([ -@@ mobile/android/modules/geckoview/GeckoViewContent.sys.mjs: export class GeckoViewContent extends GeckoViewModule { +@@ mobile/shared/modules/geckoview/GeckoViewContent.sys.mjs: export class GeckoViewContent extends GeckoViewModule { "GeckoView:UpdateInitData", "GeckoView:ZoomToInput", "GeckoView:IsPdfJs", @@ mobile/android/modules/geckoview/GeckoViewContent.sys.mjs: export class GeckoVie ]); } -@@ mobile/android/modules/geckoview/GeckoViewContent.sys.mjs: export class GeckoViewContent extends GeckoViewModule { +@@ mobile/shared/modules/geckoview/GeckoViewContent.sys.mjs: export class GeckoViewContent extends GeckoViewModule { case "GeckoView:HasCookieBannerRuleForBrowsingContextTree": this._hasCookieBannerRuleForBrowsingContextTree(aCallback); break;
131: 1afe2f04bf7f3 ! 137: 97ad8b087c5c6 Bug 8324: Prevent DNS proxy bypasses caused by Drag&Drop @@ browser/components/BrowserGlue.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, "resource:///modules/DownloadsViewableInternally.sys.mjs", + DragDropFilter: "resource://gre/modules/DragDropFilter.sys.mjs", E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs", + ExtensionsUI: "resource:///modules/ExtensionsUI.sys.mjs", FeatureGate: "resource://featuregates/FeatureGate.sys.mjs", - FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs", @@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = { lazy.DoHController.init(); @@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = { ClipboardPrivacy.startup(); ## browser/components/places/PlacesUIUtils.sys.mjs ## -@@ browser/components/places/PlacesUIUtils.sys.mjs: XPCOMUtils.defineLazyGetter(PlacesUIUtils, "URI_FLAVORS", () => { +@@ browser/components/places/PlacesUIUtils.sys.mjs: ChromeUtils.defineLazyGetter(PlacesUIUtils, "URI_FLAVORS", () => { ]; }); - XPCOMUtils.defineLazyGetter(PlacesUIUtils, "SUPPORTED_FLAVORS", () => { + ChromeUtils.defineLazyGetter(PlacesUIUtils, "SUPPORTED_FLAVORS", () => { - return [...PlacesUIUtils.PLACES_FLAVORS, ...PlacesUIUtils.URI_FLAVORS]; + return [ + ...PlacesUIUtils.PLACES_FLAVORS, @@ browser/components/places/PlacesUIUtils.sys.mjs: XPCOMUtils.defineLazyGetter(Pla + ]; }); - XPCOMUtils.defineLazyGetter(PlacesUIUtils, "ellipsis", function () { + ChromeUtils.defineLazyGetter(PlacesUIUtils, "ellipsis", function () { ## browser/components/places/content/controller.js ## @@ browser/components/places/content/controller.js: PlacesController.prototype = { @@ dom/base/ContentAreaDropListener.sys.mjs: ContentAreaDropListener.prototype = { !types.includes("text/plain") ## toolkit/components/places/PlacesUtils.sys.mjs ## -@@ toolkit/components/places/PlacesUtils.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { +@@ toolkit/components/places/PlacesUtils.sys.mjs: const lazy = {}; + ChromeUtils.defineESModuleGetters(lazy, { Bookmarks: "resource://gre/modules/Bookmarks.sys.mjs", History: "resource://gre/modules/History.sys.mjs", - Log: "resource://gre/modules/Log.sys.mjs", + OpaqueDrag: "resource://gre/modules/DragDropFilter.sys.mjs", PlacesSyncUtils: "resource://gre/modules/PlacesSyncUtils.sys.mjs", Sqlite: "resource://gre/modules/Sqlite.sys.mjs", @@ toolkit/modules/DragDropFilter.sys.mjs (new) ## toolkit/modules/moz.build ## @@ toolkit/modules/moz.build: EXTRA_JS_MODULES += [ + "DateTimePickerPanel.sys.mjs", "DeferredTask.sys.mjs", - "Deprecated.sys.mjs", "DomainFrontedRequests.sys.mjs", + "DragDropFilter.sys.mjs", "E10SUtils.sys.mjs",
132: a16d36fce7688 = 138: f065aa8c7a5d9 Orfox: Centralized proxy applied to AbstractCommunicator and BaseResources.
133: 284d19999e516 = 139: 727d2c5f23169 Bug 25741: TBA: Disable GeckoNetworkManager
134: 2c83c23d2ac04 = 140: 6322e1a2743c8 Bug 14631: Improve profile access error messages.
Updated the JS file name.
135: 63aa1d5c034fa ! 141: 7a32ba1812e50 Bug 40807: Added QRCode.js to toolkit/modules @@ Commit message ## toolkit/content/license.html ## @@ - <li><a href="about:license#prop-types">prop-types License</a></li> + <li><a href="about:license#praton1">praton and inet_ntop License</a></li> <li><a href="about:license#qcms">qcms License</a></li> <li><a href="about:license#qrcode-generator">QR Code Generator License</a></li> + <li><a href="about:license#qrcode-js">QRCode.js License</a></li> - <li><a href="about:license#raven-js">Raven.js License</a></li> <li><a href="about:license#react">React License</a></li> - <li><a href="about:license#react-mit">React MIT License</a></li> + <li><a href="about:license#react-redux">React-Redux License</a></li> + <li><a href="about:license#xdg">Red Hat xdg_user_dir_lookup License</a></li> @@ toolkit/content/license.html: furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ toolkit/content/license.html: furnished to do so, subject to the following condi + <h1><a id="qrcode-js"></a>QRCode.js License</h1> + + <p>This license applies to the file -+ <code>toolkit/modules/QRCode.jsm</code>.</p> ++ <code>toolkit/modules/QRCode.sys.mjs</code>.</p> +<pre> +The MIT License (MIT) +--------------------- @@ toolkit/modules/QRCode.sys.mjs (new) ## toolkit/modules/moz.build ## @@ toolkit/modules/moz.build: EXTRA_JS_MODULES += [ + "PrivateBrowsingUtils.sys.mjs", "ProcessType.sys.mjs", "ProfileAge.sys.mjs", - "PromiseUtils.sys.mjs", + "QRCode.sys.mjs", "Region.sys.mjs", "RemotePageAccessManager.sys.mjs",
Changed in Firefox 125, db2b454318ee248fb68b19aad6359930835a65ba: upstream added connection-proxy-option-wpad.label in the blob of stuff we remove.
136: d3bf522508ddd ! 142: 37b589f7deff8 Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection @@ browser/components/preferences/main.inc.xhtml - connection-proxy-option-no.label, - connection-proxy-option-auto.label, - connection-proxy-option-system.label, +- connection-proxy-option-wpad.label, - connection-proxy-option-manual.label, - connection-proxy-http, - connection-proxy-https,
Changed in Firefox 116, 2766aa90e55bb81a1c71a68dc659934c044ac204: fixed some label. Anyway, it's code we remove.
@@ browser/components/preferences/main.inc.xhtml
- connection-proxy-https-sharing.label,
- connection-proxy-autotype.label,
- connection-proxy-reload.label,
-- connection-proxy-autologin.label,
+- connection-proxy-autologin-checkbox.label,
- connection-proxy-socks-remote-dns.label,
- " />
- </hbox>
@@ browser/components/preferences/preferences.js: function init_all() {
Changed with Firefox 120 (be1eb3c4b85b918cd991fcc68c0f92da1e80ce6d): no more XML stylesheets.
## browser/components/preferences/preferences.xhtml ##
@@
- <?xml-stylesheet href="chrome://browser/skin/preferences/privacy.css"?>
- <?xml-stylesheet href="chrome://browser/content/preferences/letterboxing.css"?>
- <?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelPreferences.css"?>
-+<?xml-stylesheet href="chrome://browser/content/torpreferences/torPreferences.css"?>
+ />
- <!DOCTYPE html>
+ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPreferences.css" />
++ <link rel="stylesheet" href="chrome://browser/content/torpreferences/torPreferences.css" />
+ <link rel="localization" href="branding/brand.ftl"/>
+ <link rel="localization" href="browser/browser.ftl"/>
@@
- <script type="module" src="chrome://global/content/elements/moz-support-link.mjs"/>
+ <script src="chrome://browser/content/preferences/findInPage.js"/>
<script src="chrome://browser/content/migration/migration-wizard.mjs" type="module"></script>
- <script type="module" src="chrome://global/content/elements/moz-toggle.mjs"/>
+ <script type="module" src="chrome://browser/content/backup/backup-settings.mjs"></script>
+ <script src="chrome://browser/content/torpreferences/bridgemoji/BridgeEmoji.js"/>
</head>
Some newline change due to upstream changes in Firefox 124, not a big deal for us (we now use a newline that probably upstream left).
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@
- <image class="category-icon"/>
- <label class="category-name" flex="1" data-l10n-id="more-from-moz-title"></label>
- </richlistitem>
-+
+ value="paneTranslations"
+ helpTopic="prefs-translations"/>
+
+#include ../torpreferences/content/connectionCategory.inc.xhtml
+
</richlistbox>
Changed in Firefox 127, 1d63ed18488dd44cd0fb4a4a9721ee8069d2d14e: a big chunk of browser/base/content/browser.js has been moved to browser/base/content/browser-init.js, notice the difference in color.
137: 2e9511578a1d6 ! 143: 9ec9a2b642f84 Bug 27476: Implement about:torconnect captive portal within Tor Browser @@ Commit message Bug 41608: Add a toolbar status button and a urlbar "Connect" button. - ## browser/base/content/browser.js ## -@@ browser/base/content/browser.js: ChromeUtils.defineESModuleGetters(this, { - "resource:///modules/firefox-view-tabs-setup-manager.sys.mjs", - TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs", - TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.sys.mjs", -+ TorConnect: "resource://gre/modules/TorConnect.sys.mjs", -+ TorConnectState: "resource://gre/modules/TorConnect.sys.mjs", -+ TorConnectTopics: "resource://gre/modules/TorConnect.sys.mjs", - TranslationsParent: "resource://gre/actors/TranslationsParent.sys.mjs", - UITour: "resource:///modules/UITour.sys.mjs", - UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs", -@@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( - "gPageStyleMenu", - "chrome://browser/content/browser-pagestyle.js" - ); -+XPCOMUtils.defineLazyScriptGetter( -+ this, -+ ["gTorConnectUrlbarButton"], -+ "chrome://global/content/torconnect/torConnectUrlbarButton.js" -+); -+XPCOMUtils.defineLazyScriptGetter( -+ this, -+ ["gTorConnectTitlebarStatus"], -+ "chrome://global/content/torconnect/torConnectTitlebarStatus.js" -+); - XPCOMUtils.defineLazyScriptGetter( - this, - ["gTorCircuitPanel"], -@@ browser/base/content/browser.js: var gPageIcons = { - }; - - var gInitialPages = [ -+ "about:torconnect", - "about:blank", - "about:home", - "about:firefoxview", -@@ browser/base/content/browser.js: var gBrowserInit = { + ## browser/base/content/browser-init.js ## +@@ browser/base/content/browser-init.js: var gBrowserInit = { // Init the NewIdentityButton NewIdentityButton.init(); @@ browser/base/content/browser.js: var gBrowserInit = { gTorCircuitPanel.init(); // Certain kinds of automigration rely on this notification to complete -@@ browser/base/content/browser.js: var gBrowserInit = { +@@ browser/base/content/browser-init.js: var gBrowserInit = { let defaultArgs = BrowserHandler.defaultArgs; @@ browser/base/content/browser.js: var gBrowserInit = { + willOverrideHomepage ? null : uri + ); + })(uri); - -- // The URI appears to be the the homepage. We want to load it only if -- // session restore isn't about to override the homepage. -- let willOverride = SessionStartup.willOverrideHomepage; -- if (typeof willOverride == "boolean") { -- return willOverride ? null : uri; ++ + // if using TorConnect, convert these uris to redirects + if (TorConnect.shouldShowTorConnect) { + return Promise.resolve(uri).then(aUri => { + if (aUri == null) { + aUri = []; + } -+ + +- // The URI appears to be the the homepage. We want to load it only if +- // session restore isn't about to override the homepage. +- let willOverride = SessionStartup.willOverrideHomepage; +- if (typeof willOverride == "boolean") { +- return willOverride ? null : uri; + aUri = TorConnect.getURIsToLoad(aUri); + return aUri; + }); @@ browser/base/content/browser.js: var gBrowserInit = { })()); }, -@@ browser/base/content/browser.js: var gBrowserInit = { +@@ browser/base/content/browser-init.js: var gBrowserInit = { NewIdentityButton.uninit(); @@ browser/base/content/browser.js: var gBrowserInit = { if (gToolbarKeyNavEnabled) { + ## browser/base/content/browser.js ## +@@ browser/base/content/browser.js: ChromeUtils.defineESModuleGetters(this, { + "resource:///modules/firefox-view-tabs-setup-manager.sys.mjs", + TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs", + TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.sys.mjs", ++ TorConnect: "resource://gre/modules/TorConnect.sys.mjs", ++ TorConnectState: "resource://gre/modules/TorConnect.sys.mjs", ++ TorConnectTopics: "resource://gre/modules/TorConnect.sys.mjs", + TranslationsParent: "resource://gre/actors/TranslationsParent.sys.mjs", + UITour: "resource:///modules/UITour.sys.mjs", + UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs", +@@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( + "gProfiles", + "chrome://browser/content/browser-profiles.js" + ); ++XPCOMUtils.defineLazyScriptGetter( ++ this, ++ ["gTorConnectUrlbarButton"], ++ "chrome://global/content/torconnect/torConnectUrlbarButton.js" ++); ++XPCOMUtils.defineLazyScriptGetter( ++ this, ++ ["gTorConnectTitlebarStatus"], ++ "chrome://global/content/torconnect/torConnectTitlebarStatus.js" ++); + XPCOMUtils.defineLazyScriptGetter( + this, + ["gTorCircuitPanel"], +@@ browser/base/content/browser.js: var gPageIcons = { + }; + + var gInitialPages = [ ++ "about:torconnect", + "about:blank", + "about:home", + "about:firefoxview", +
Changed with Firefox 120 (be1eb3c4b85b918cd991fcc68c0f92da1e80ce6d): no more XML stylesheets.
## browser/base/content/browser.xhtml ##
@@
- <?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/content/torCircuitPanel.css" type="text/css"?>
-+<?xml-stylesheet href="chrome://global/content/torconnect/torConnectTitlebarStatus.css" type="text/css"?>
+ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPanel.css" />
+ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelButton.css" />
+ <link rel="stylesheet" href="chrome://browser/content/torCircuitPanel.css" />
++ <link rel="stylesheet" href="chrome://global/content/torconnect/torConnectTitlebarStatus.css" />
- <!DOCTYPE window [
- <!ENTITY % torbuttonDTD SYSTEM "chrome://torbutton/locale/torbutton.dtd">
+ <link rel="localization" href="branding/brand.ftl"/>
+ <link rel="localization" href="browser/allTabsMenu.ftl"/>
## browser/base/content/navigator-toolbox.inc.xhtml ##
@@
- <label data-l10n-id="private-browsing-indicator-label"></label>
- </hbox>
+ oncommand="ContentAnalysis.showPanel(this, PanelUI);"
+ class="toolbarbutton-1 content-analysis-indicator-icon"/>
+ <html:div id="tor-connect-titlebar-status" role="status">
+ <html:img alt=""
@@ browser/components/urlbar/UrlbarInput.sys.mjs: ChromeUtils.defineESModuleGetters
UrlbarController: "resource:///modules/UrlbarController.sys.mjs",
UrlbarEventBufferer: "resource:///modules/UrlbarEventBufferer.sys.mjs",
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
-@@ browser/components/urlbar/UrlbarInput.sys.mjs: const SEARCH_BUTTON_ID = "urlbar-search-button";
+@@ browser/components/urlbar/UrlbarInput.sys.mjs: const SEARCH_BUTTON_CLASS = "urlbar-search-button";
// The scalar category of TopSites click for Contextual Services
const SCALAR_CATEGORY_TOPSITES = "contextual.services.topsites.click";
@@ browser/components/urlbar/UrlbarInput.sys.mjs: export class UrlbarInput {
}
Changed in Firefox 116, 130ce23c4cf1e2f524792d1e2a5321c1574cbd9b: esmified.
## browser/modules/URILoadingHelper.sys.mjs ##
-@@ browser/modules/URILoadingHelper.sys.mjs: import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
-
- const lazy = {};
-
-+ChromeUtils.defineESModuleGetters(lazy, {
+@@ browser/modules/URILoadingHelper.sys.mjs: const lazy = {};
+ ChromeUtils.defineESModuleGetters(lazy, {
+ AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
+ BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
+ TorConnect: "resource://gre/modules/TorConnect.sys.mjs",
-+});
-+
- XPCOMUtils.defineLazyModuleGetters(lazy, {
- AboutNewTab: "resource:///modules/AboutNewTab.jsm",
- BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
+ });
+
+ ChromeUtils.defineLazyGetter(lazy, "ReferrerInfo", () =>
Not important stuff.
@@ browser/modules/URILoadingHelper.sys.mjs: export const URILoadingHelper = {
return;
}
@@ browser/modules/URILoadingHelper.sys.mjs: export const URILoadingHelper = {
## browser/themes/shared/browser-shared.css ##
@@
- @import url("chrome://browser/skin/UITour.css");
+ @import url("chrome://browser/skin/formautofill-notification.css");
@import url("chrome://global/skin/browser-colors.css");
@import url("chrome://browser/skin/tor-branding.css");
+@import url("chrome://browser/skin/tor-urlbar-button.css");
@@ dom/base/nsGlobalWindowOuter.cpp: void nsGlobalWindowOuter::CloseOuter(bool aTru
+ // we want about:torconnect pages to be able to close themselves after
+ // bootstrap
+ !StringBeginsWith(url, u"about:torconnect"_ns) &&
- !mBrowsingContext->HadOriginalOpener() && !aTrustedCaller &&
- !IsOnlyTopLevelDocumentInSHistory()) {
+ !mBrowsingContext->GetTopLevelCreatedByWebContent() &&
+ !aTrustedCaller && !IsOnlyTopLevelDocumentInSHistory()) {
bool allowClose =
## toolkit/actors/AboutHttpsOnlyErrorParent.sys.mjs ##
@@
- const { HomePage } = ChromeUtils.import("resource:///modules/HomePage.jsm");
+ import { HomePage } from "resource:///modules/HomePage.sys.mjs";
import { PrivateBrowsingUtils } from "resource://gre/modules/PrivateBrowsingUtils.sys.mjs";
+import { TorConnect } from "resource://gre/modules/TorConnect.sys.mjs";
@@ toolkit/actors/AboutHttpsOnlyErrorParent.sys.mjs: export class AboutHttpsOnlyErr
## toolkit/actors/NetErrorParent.sys.mjs ##
@@ toolkit/actors/NetErrorParent.sys.mjs: const lazy = {};
-
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
+ HomePage: "resource:///modules/HomePage.sys.mjs",
+ TorConnect: "resource://gre/modules/TorConnect.sys.mjs",
});
- ChromeUtils.defineModuleGetter(
+ class CaptivePortalObserver {
@@ toolkit/actors/NetErrorParent.sys.mjs: export class NetErrorParent extends JSWindowActorParent {
let win = browser.ownerGlobal;
win.openPreferences("privacy-doh");
138: fb190ad7c4d21 = 144: 67bd7f5c3adc9 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
139: 040348541e798 = 145: 4c7f35181bf9d Temporary changes to about:torconnect for Android.
140: e2461a255e51e = 146: aea9cfc62d71d fixup! Temporary changes to about:torconnect for Android.
Changed in Firefox 117, 249d76638642dc052b144bf45461c5c14af46af7: the argument of isOnNewTabPage is now called only uri instead of currentURI. Also, at the beginning of the function uri is already checked, so removed ? as suggested by Henry.
141: 892332ae3df14 ! 147: e03420cd43f05 Bug 7494: Create local home page for TBB. @@ Commit message ## browser/base/content/browser-places.js ## @@ browser/base/content/browser-places.js: var BookmarkingUI = { - }, - - isOnNewTabPage({ currentURI }) { + if (!uri) { + return false; + } + // If uri is "about:tor" then we return true. See tor-browser#41717. + // NOTE: "about:newtab", "about:welcome", "about:home" and + // "about:privatebrowsing" can also redirect to "about:tor". + // NOTE: We do not simply add "about:tor" to newTabURLs below because this + // would also match "about:torconnect". -+ if (currentURI?.scheme === "about" && currentURI?.filePath === "tor") { ++ if (uri.scheme === "about" && uri.filePath === "tor") { + return true; + } - // Prevent loading AboutNewTab.jsm during startup path if it + // Prevent loading AboutNewTab.sys.mjs during startup path if it // is only the newTabURL getter we are interested in. - let newTabURL = Cu.isModuleLoaded("resource:///modules/AboutNewTab.jsm") + let newTabURL = Cu.isESModuleLoaded(
Not important changes
## browser/base/content/browser.js ##
@@ browser/base/content/browser.js: async function gLazyFindCommand(cmd, ...args) {
@@ browser/base/content/utilityOverlay.js: function isBlankPageURL(aURL) {
## browser/components/BrowserGlue.sys.mjs ##
@@ browser/components/BrowserGlue.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, {
- UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
- WebChannel: "resource://gre/modules/WebChannel.sys.mjs",
+ WindowsLaunchOnLogin: "resource://gre/modules/WindowsLaunchOnLogin.sys.mjs",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
+ WindowsGPOParser: "resource://gre/modules/policies/WindowsGPOParser.sys.mjs",
+ checkHomepageOverride: "resource:///modules/HomepageOverride.sys.mjs",
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
setTimeout: "resource://gre/modules/Timer.sys.mjs",
@@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = {
+ matches: ["about:tor"],
+ },
+
- AboutWelcome: {
+ AboutWelcomeShopping: {
parent: {
- moduleURI: "resource:///actors/AboutWelcomeParent.jsm",
+ esModuleURI: "resource:///actors/AboutWelcomeParent.sys.mjs",
@@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = {
- lazy.Normandy.init();
- }
+
+ lazy.ResetPBMPanel.init();
+ lazy.checkHomepageOverride();
+
@@ browser/components/moz.build: with Files("controlcenter/**"):
"about",
"aboutlogins",
+ "abouttor",
+ "aboutwelcome",
+ "asrouter",
"attribution",
- "contextualidentity",
- "customizableui",
- ## browser/components/newtab/AboutNewTabService.jsm ##
-@@ browser/components/newtab/AboutNewTabService.jsm: class BaseAboutNewTabService {
+ ## browser/components/newtab/AboutNewTabService.sys.mjs ##
+@@ browser/components/newtab/AboutNewTabService.sys.mjs: class BaseAboutNewTabService {
* the newtab page has no effect on the result of this function.
*/
get defaultURL() {
@@ browser/components/preferences/home.inc.xhtml
</menupopup>
</menulist>
- ## browser/modules/HomePage.jsm ##
-@@ browser/modules/HomePage.jsm: ChromeUtils.defineESModuleGetters(lazy, {
+ ## browser/modules/HomePage.sys.mjs ##
+@@ browser/modules/HomePage.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, {
});
const kPrefName = "browser.startup.homepage";
@@ browser/modules/HomePage.jsm: ChromeUtils.defineESModuleGetters(lazy, {
Changed in Firefox 117, b5828473c9fba8ac353fbcc486413db9d9e39358: new about:crashextensions page at the end of the list where we add our about:tor.
## docshell/base/nsAboutRedirector.cpp ##
@@ docshell/base/nsAboutRedirector.cpp: static const RedirEntry kRedirMap[] = {
- nsIAboutModule::HIDE_FROM_ABOUTABOUT |
nsIAboutModule::URI_CAN_LOAD_IN_CHILD |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD},
-- {"crashgpu", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT}};
-+ {"crashgpu", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT},
+ {"crashgpu", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT},
+- {"crashextensions", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT}};
++ {"crashextensions", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT},
+ {"tor", "chrome://browser/content/abouttor/aboutTor.html",
+ nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
+ nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
Linted
142: 2a119ff8365a3 ! 148: eb16683db6f2e Bug 12620: TorBrowser regression tests @@ tbb-tests/test_tor_bug2874.html (new) +</html> ## toolkit/toolkit.mozbuild ## -@@ toolkit/toolkit.mozbuild: if CONFIG['MOZ_WEBRTC'] and CONFIG['COMPILE_ENVIRONMENT']: +@@ toolkit/toolkit.mozbuild: if CONFIG["MOZ_WEBRTC"] and CONFIG["COMPILE_ENVIRONMENT"]: ] - if CONFIG['ENABLE_TESTS']: -- DIRS += ['/testing/specialpowers'] -+ DIRS += ['/testing/specialpowers', -+ '/tbb-tests'] + if CONFIG["ENABLE_TESTS"]: +- DIRS += ["/testing/specialpowers"] ++ DIRS += [ ++ "/testing/specialpowers", ++ "/tbb-tests", ++ ] DIRS += [ - '/testing/gtest', + "/testing/gtest",
Not important changes
143: 3d542383a43a3 ! 149: fffacc4a21526 Bug 41668: Tweaks to the Base Browser updater for Tor Browser @@ Commit message legacy, and we add them back to the patch set with this commit. ## browser/components/BrowserContentHandler.sys.mjs ## -@@ browser/components/BrowserContentHandler.sys.mjs: XPCOMUtils.defineLazyGetter(lazy, "gWindowsAlertsService", () => { +@@ browser/components/BrowserContentHandler.sys.mjs: ChromeUtils.defineLazyGetter(lazy, "gWindowsAlertsService", () => { }); const FORK_VERSION_PREF = @@ config/createprecomplete.py: import io rel_file_path_set = set() rel_dir_path_set = set() @@ config/createprecomplete.py: def get_build_entries(root_path): - if not ( - rel_path_file.endswith("channel-prefs.js") - or rel_path_file.endswith("update-settings.ini") + or "/UpdateSettings.framework/" in rel_path_file + or rel_path_file.startswith("UpdateSettings.framework/") + or "distribution/" in rel_path_file + or rel_path_file == "TorBrowser/Data/Browser/profiles.ini" + or rel_path_file + == "TorBrowser/Data/Browser/profile.default/bookmarks.html" + or rel_path_file == "TorBrowser/Data/Tor/torrc" - or rel_path_file.find("distribution/") != -1 ): rel_file_path_set.add(rel_path_file) + ## toolkit/mozapps/extensions/AddonManager.sys.mjs ## -@@ toolkit/mozapps/extensions/AddonManager.sys.mjs: const PREF_EM_STRICT_COMPATIBILITY = "extensions.strictCompatibility"; - const PREF_EM_CHECK_UPDATE_SECURITY = "extensions.checkUpdateSecurity"; +@@ toolkit/mozapps/extensions/AddonManager.sys.mjs: const PREF_EM_CHECK_UPDATE_SECURITY = "extensions.checkUpdateSecurity"; const PREF_SYS_ADDON_UPDATE_ENABLED = "extensions.systemAddon.update.enabled"; const PREF_REMOTESETTINGS_DISABLED = "extensions.remoteSettings.disabled"; + const PREF_USE_REMOTE = "extensions.webextensions.remote"; -const PREF_EM_LAST_FORK_VERSION = "extensions.lastBaseBrowserVersion"; +const PREF_EM_LAST_FORK_VERSION = "extensions.lastTorBrowserVersion"; @@ toolkit/mozapps/extensions/AddonManager.sys.mjs: const PREF_EM_STRICT_COMPATIBIL ## toolkit/mozapps/update/UpdateService.sys.mjs ## @@ toolkit/mozapps/update/UpdateService.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { + AddonManager: "resource://gre/modules/AddonManager.sys.mjs", AsyncShutdown: "resource://gre/modules/AsyncShutdown.sys.mjs", - CertUtils: "resource://gre/modules/CertUtils.sys.mjs", DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs", + TorProviderBuilder: "resource://gre/modules/TorProviderBuilder.sys.mjs", + UpdateLog: "resource://gre/modules/UpdateLog.sys.mjs", UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs", WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs", - ctypes: "resource://gre/modules/ctypes.sys.mjs", @@ toolkit/mozapps/update/UpdateService.sys.mjs: const SERVICE_ERRORS = [ // Custom update error codes const BACKGROUNDCHECK_MULTIPLE_FAILURES = 110; @@ toolkit/mozapps/update/UpdateService.sys.mjs: const SERVICE_ERRORS = [ // Error codes should be < 1000. Errors above 1000 represent http status codes const HTTP_ERROR_OFFSET = 1000; -@@ toolkit/mozapps/update/UpdateService.sys.mjs: XPCOMUtils.defineLazyGetter( +@@ toolkit/mozapps/update/UpdateService.sys.mjs: ChromeUtils.defineLazyGetter( } ); @@ toolkit/mozapps/update/UpdateService.sys.mjs: XPCOMUtils.defineLazyGetter( /** * Changes `nsIApplicationUpdateService.currentState` and causes * `nsIApplicationUpdateService.stateTransition` to resolve. -@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdateService.prototype = { +@@ toolkit/mozapps/update/UpdateService.sys.mjs: export class UpdateService { case "network:offline-status-changed": await this._offlineStatusChanged(data); break; + case "torconnect:bootstrap-complete": + this._bootstrapComplete(); + break; - case "nsPref:changed": - if (data == PREF_APP_UPDATE_LOG || data == PREF_APP_UPDATE_LOG_FILE) { - lazy.gLogEnabled; // Assigning this before it is lazy-loaded is an error. -@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdateService.prototype = { + case "quit-application": + Services.obs.removeObserver(this, topic); + +@@ toolkit/mozapps/update/UpdateService.sys.mjs: export class UpdateService { await this._attemptResume(); - }, + }
Changed in Firefox 127, 75ae7f69d33dd0d265ccb93bee3c71451f97d9d6: UpdateService.sys.mjs was refactored to use ES classes.
-+ _registerBootstrapObserver: function AUS__registerBootstrapObserver() {
++ _registerBootstrapObserver() {
+ if (this._registeredBootstrapObserver) {
+ LOG(
+ "UpdateService:_registerBootstrapObserver - observer already registered"
@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdateService.prototype = {
+
+ Services.obs.addObserver(this, "torconnect:bootstrap-complete");
+ this._registeredBootstrapObserver = true;
-+ },
++ }
+
-+ _bootstrapComplete: function AUS__bootstrapComplete() {
++ _bootstrapComplete() {
+ Services.obs.removeObserver(this, "torconnect:bootstrap-complete");
+ this._registeredBootstrapObserver = false;
+
@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdateService.prototype = {
+ );
+
+ this._attemptResume();
-+ },
++ }
+
Another block of not important changes.
/**
* See nsIUpdateService.idl
*/
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdateService.prototype = {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: export class UpdateService {
AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_OFFLINE);
}
return;
@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdateService.prototype = {
}
// Send the error code to telemetry
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Downloader {
var state = this._patch.state;
var shouldShowPrompt = false;
var shouldRegisterOnlineObserver = false;
@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = {
var shouldRetrySoon = false;
var deleteActiveUpdate = false;
let migratedToReadyUpdate = false;
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Downloader {
);
shouldRegisterOnlineObserver = true;
deleteActiveUpdate = false;
@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = {
// Each of NS_ERROR_NET_TIMEOUT, ERROR_CONNECTION_REFUSED,
// NS_ERROR_NET_RESET and NS_ERROR_DOCUMENT_NOT_CACHED can be returned
// when disconnecting the internet while a download of a MAR is in
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Downloader {
// Only notify listeners about the stopped state if we
// aren't handling an internal retry.
@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = {
this.updateService.forEachDownloadListener(listener => {
listener.onStopRequest(request, status);
});
-@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = {
+@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Downloader {
if (shouldRegisterOnlineObserver) {
LOG("Downloader:onStopRequest - Registering online observer");
this.updateService._registerOnlineObserver();
@@ toolkit/mozapps/update/updater/updater.cpp: int LaunchCallbackAndPostProcessApps
-#if defined(XP_WIN)
+#if defined(XP_WIN) && !defined(TOR_BROWSER)
if (gSucceeded) {
+ LOG(("Launching Windows post update process"));
if (!LaunchWinPostProcess(gInstallDirPath, gPatchDirPath)) {
- fprintf(stderr, "The post update process was not launched");
## toolkit/xre/nsAppRunner.cpp ##
@@ toolkit/xre/nsAppRunner.cpp: static bool CheckCompatibility(nsIFile* aProfileDir, const nsCString& aVersion,
@@ tools/update-packaging/make_incremental_update.sh: for ((i=0; $i<$num_oldfiles;
+
if check_for_forced_update "$requested_forced_updates" "$f"; then
# The full workdir may not exist yet, so create it if necessary.
- mkdir -p `dirname "$workdir/$f"`
+ mkdir -p "$(dirname "$workdir/$f")"
@@ tools/update-packaging/make_incremental_update.sh: for ((i=0; $i<$num_newfiles; i=$i+1)); do
if check_for_add_if_not_update "$f"; then
144: 84f07d32b2511 = 150: 54eacc30fd78e Bug 12647: Support symlinks in the updater.
Changed in Firefox 127, 75ae7f69d33dd0d265ccb93bee3c71451f97d9d6: another consequence of the refactor of UpdateService.sys.mjs to ES classes, and these blocks of code moved relatively on the file (notice the background colors).
145: 342c8d261585f ! 151: 0f0901e91d142 Bug 19121: reinstate the update.xml hash check @@ Commit message references it in the future. ## toolkit/mozapps/update/UpdateService.sys.mjs ## -@@ toolkit/mozapps/update/UpdateService.sys.mjs: function UpdatePatch(patch) { +@@ toolkit/mozapps/update/UpdateService.sys.mjs: class UpdatePatch { + // over writing nsIUpdatePatch attributes. + _attrNames = [ + "errorCode", ++ "hashFunction", ++ "hashValue", + "finalURL", + "selected", + "size", +@@ toolkit/mozapps/update/UpdateService.sys.mjs: class UpdatePatch { } break; case "finalURL": @@ toolkit/mozapps/update/UpdateService.sys.mjs: function UpdatePatch(patch) { case "state": case "type": case "URL": -@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdatePatch.prototype = { - // over writing nsIUpdatePatch attributes. - _attrNames: [ - "errorCode", -+ "hashFunction", -+ "hashValue", - "finalURL", - "selected", - "size", -@@ toolkit/mozapps/update/UpdateService.sys.mjs: UpdatePatch.prototype = { +@@ toolkit/mozapps/update/UpdateService.sys.mjs: class UpdatePatch { */ - serialize: function UpdatePatch_serialize(updates) { + serialize(updates) { var patch = updates.createElementNS(URI_UPDATE_NS, "patch"); + patch.setAttribute("hashFunction", this.hashFunction); + patch.setAttribute("hashValue", this.hashValue); patch.setAttribute("size", this.size); patch.setAttribute("type", this.type); patch.setAttribute("URL", this.URL); -@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = { +@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Downloader { } LOG("Downloader:_verifyDownload downloaded size == expected size."); @@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = { + AUSTLMY.DWNLD_ERR_VERIFY_NO_HASH_MATCH + ); + return false; - }, + } /** -@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = { +@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Downloader { " is higher than patch size: " + this._patch.size ); @@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = { AUSTLMY.pingDownloadCode( this.isCompleteUpdate, AUSTLMY.DWNLD_ERR_PATCH_SIZE_LARGER -@@ toolkit/mozapps/update/UpdateService.sys.mjs: Downloader.prototype = { +@@ toolkit/mozapps/update/UpdateService.sys.mjs: class Downloader { " is not equal to expected patch size: " + this._patch.size );
Changed in Firefox 124, 1eb7ddbd5d22c648aee449dc7caaca352656285c (Bug 1749345): upstream stopped using prefb and started using directly Services.prefs.getCharPref, I followed and linted.
146: 9a9212ff893d1 ! 152: 2ae72f613ee2d Bug 16940: After update, load local change notes. @@ browser/actors/AboutTBUpdateParent.jsm (new) ## browser/actors/moz.build ## @@ browser/actors/moz.build: FINAL_TARGET_FILES.actors += [ BROWSER_CHROME_MANIFESTS += [ - "test/browser/browser.ini", + "test/browser/browser.toml", ] + +if CONFIG["BASE_BROWSER_UPDATE"]: @@ browser/base/content/abouttbupdate/aboutTBUpdate.xhtml (new) +</html> ## browser/base/content/browser.js ## -@@ browser/base/content/browser.js: var gInitialPages = [ - "chrome://browser/content/blanktab.html", - ]; +@@ browser/base/content/browser.js: if (Services.prefs.getBoolPref("browser.profiles.enabled")) { + gInitialPages.push("about:profilemanager"); + } +if (AppConstants.BASE_BROWSER_UPDATE) { + gInitialPages.push("about:tbupdate"); @@ browser/components/BrowserContentHandler.sys.mjs: nsBrowserContentHandler.protot + // an update was applied. + var startPage = ""; + try { -+ var choice = prefb.getIntPref("browser.startup.page"); ++ var choice = Services.prefs.getIntPref("browser.startup.page"); + if (choice == 1 || choice == 3) { + startPage = lazy.HomePage.get(); + } @@ browser/components/BrowserContentHandler.sys.mjs: nsBrowserContentHandler.protot old_forkVersion ); + if (overridePage && AppConstants.BASE_BROWSER_UPDATE) { -+ prefb.setCharPref("torbrowser.post_update.url", overridePage); -+ prefb.setBoolPref("torbrowser.post_update.shouldNotify", true); ++ Services.prefs.setCharPref( ++ "torbrowser.post_update.url", ++ overridePage ++ ); ++ Services.prefs.setBoolPref( ++ "torbrowser.post_update.shouldNotify", ++ true ++ ); + // If the user's homepage is about:tor, we will inform them + // about the update on that page; otherwise, we arrange to + // open about:tor in a secondary tab. + overridePage = startPage === "about:tor" ? "" : "about:tor"; + } break; + } case OVERRIDE_NEW_BUILD_ID: - if (lazy.UpdateManager.readyUpdate) { @@ browser/components/BrowserContentHandler.sys.mjs: nsBrowserContentHandler.prototype = { } } @@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = { + }; +} + - XPCOMUtils.defineLazyGetter( + ChromeUtils.defineLazyGetter( lazy, "WeaveService", ## browser/components/about/AboutRedirector.cpp ## @@ browser/components/about/AboutRedirector.cpp: static const RedirEntry kRedirMap[] = { + nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS | nsIAboutModule::HIDE_FROM_ABOUTABOUT}, - {"restartrequired", "chrome://browser/content/aboutRestartRequired.xhtml", - nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT}, +#ifdef BASE_BROWSER_UPDATE + {"tbupdate", "chrome://browser/content/abouttbupdate/aboutTBUpdate.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
147: 8951719995597 = 153: b3660e0d5ca45 Bug 32658: Create a new MAR signing key
All changes in code we remove.
148: fa0249b8bd045 ! 154: 12888fbb00d57 Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing @@ browser/components/search/extensions/amazon/_locales/au/messages.json (deleted) - "message": "Amazon.com.au Search" - }, - "searchUrl": { -- "message": "https://www.amazon.com.au/exec/obidos/external-search/" +- "message": "https://www.amazon.com.au/s" - }, - "searchForm": { -- "message": "https://www.amazon.com.au/exec/obidos/external-search/" +- "message": "https://www.amazon.com.au/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.com.au/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=111172" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/ca/messages.json (deleted) - "message": "Amazon.ca Search" - }, - "searchUrl": { -- "message": "https://www.amazon.ca/exec/obidos/external-search/" +- "message": "https://www.amazon.ca/s" - }, - "searchForm": { -- "message": "https://www.amazon.ca/exec/obidos/external-search/" +- "message": "https://www.amazon.ca/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=mozillacanada-20&sourceid=Mozilla-search" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.ca/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=7" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/de/messages.json (deleted) - "message": "Amazon.de Suche" - }, - "searchUrl": { -- "message": "https://www.amazon.de/exec/obidos/external-search/" +- "message": "https://www.amazon.de/s" - }, - "searchForm": { - "message": "https://www.amazon.de/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=firefox-de-21&sourceid=Mozilla-search" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.de/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=4" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/en-GB/messages.json (delete - "message": "Amazon.co.uk Search" - }, - "searchUrl": { -- "message": "https://www.amazon.co.uk/exec/obidos/external-search/" +- "message": "https://www.amazon.co.uk/s" - }, - "searchForm": { - "message": "https://www.amazon.co.uk/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=firefox-uk-21&sourceid=Mozilla-search" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.co.uk/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=3" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/france/messages.json (delet - "message": "Recherche Amazon.fr" - }, - "searchUrl": { -- "message": "https://www.amazon.fr/exec/obidos/external-search/" +- "message": "https://www.amazon.fr/s" - }, - "searchForm": { - "message": "https://www.amazon.fr/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=firefox-fr-21&sourceid=Mozilla-search" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.fr/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=5" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/in/messages.json (deleted) - "message": "Amazon.in Search" - }, - "searchUrl": { -- "message": "https://www.amazon.in/exec/obidos/external-search/" +- "message": "https://www.amazon.in/s" - }, - "searchForm": { - "message": "https://www.amazon.in/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&sourceid=Mozilla-search" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.in/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=44571" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/it/messages.json (deleted) - "message": "Ricerca Amazon.it" - }, - "searchUrl": { -- "message": "https://www.amazon.it/exec/obidos/external-search/" +- "message": "https://www.amazon.it/s" - }, - "searchForm": { - "message": "https://www.amazon.it/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=firefoxit-21&sourceid=Mozilla-search" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.it/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=35691" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/nl/messages.json (deleted) - "message": "Amazon.nl Search" - }, - "searchUrl": { -- "message": "https://www.amazon.nl/gp/search" +- "message": "https://www.amazon.nl/s" - }, - "searchForm": { - "message": "https://www.amazon.nl/" - }, - "searchUrlGetParams": { -- "message": "ie={inputEncoding}&tag=mozillanether-21&index=aps&keywords={searchTerms}" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.nl/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=328451" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/spain/messages.json (delete - "message": "Amazon.es" - }, - "searchUrl": { -- "message": "https://www.amazon.es/exec/obidos/external-search/" +- "message": "https://www.amazon.es/s" - }, - "searchForm": { - "message": "https://www.amazon.es/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=mozillaspain-21&sourceid=Mozilla-search" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.es/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=44551" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazon/_locales/sweden/messages.json (delet - "message": "Amazon.se" - }, - "searchUrl": { -- "message": "https://www.amazon.se/exec/obidos/external-search/" +- "message": "https://www.amazon.se/s" - }, - "searchForm": { - "message": "https://www.amazon.se/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=mozillasweede-21&sourceid=Mozilla-search" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.se/search/complete" -- }, -- "suggestUrlGetParams": { -- "message": "q={searchTerms}&search-alias=aps&mkt=704403121" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazondotcn/_locales/default/messages.json @@ -{ - "searchUrl": { -- "message": "https://www.amazon.cn/mn/searchApp" +- "message": "https://www.amazon.cn/s" - }, - "searchUrlGetParams": { -- "message": "ix=sunray&pageletid=headsearch&searchType=&Go.x=0&Go.y=0&bestSaleNum=0&keywords={searchTerms}" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazondotcn/_locales/mozillaonline/messages @@ -{ - "searchUrl": { -- "message": "https://www.amazon.cn/gp/search" +- "message": "https://www.amazon.cn/s" - }, - "searchUrlGetParams": { -- "message": "ie=UTF8&camp=536&creative=3200&index=aps&linkCode=ur2&tag=mozilla&keywords={searchTerms}" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazondotcom/_locales/en/messages.json (del - "message": "Amazon.com Search" - }, - "searchUrl": { -- "message": "https://www.amazon.com/exec/obidos/external-search/" +- "message": "https://www.amazon.com/s" - }, - "searchForm": { -- "message": "https://www.amazon.com/exec/obidos/external-search/" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.com/search/complete?q={searchTerms}&search-alias=aps&mkt=1" +- "message": "https://www.amazon.com/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=mozilla-20&sourceid=Mozilla-search" +- "message": "k={searchTerms}" - } -} @@ browser/components/search/extensions/amazondotcom/_locales/us/messages.json (del - "message": "Amazon.com Search" - }, - "searchUrl": { -- "message": "https://www.amazon.com/exec/obidos/external-search/" +- "message": "https://www.amazon.com/s" - }, - "searchForm": { -- "message": "https://www.amazon.com/exec/obidos/external-search/" -- }, -- "suggestUrl": { -- "message": "https://completion.amazon.com/search/complete?q={searchTerms}&search-alias=aps&mkt=1" +- "message": "https://www.amazon.com/" - }, - "searchUrlGetParams": { -- "message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=moz-us-20&sourceid=Mozilla-search" +- "message": "k={searchTerms}" - } -} @@ toolkit/components/search/SearchService.sys.mjs: export class SearchService { async _fetchEngineSelectorEngines() { - let searchEngineSelectorProperties = { - locale: Services.locale.appLocaleAsBCP47, -- region: lazy.Region.home || "default", +- region: lazy.Region.home || "unknown", - channel: lazy.SearchUtils.MODIFIED_APP_CHANNEL, - experiment: - lazy.NimbusFeatures.searchConfiguration.getVariable("experiment") ?? "", @@ toolkit/components/search/SearchService.sys.mjs: export class SearchService { for (let e of engines) { if (!e.webExtension) { @@ toolkit/components/search/SearchService.sys.mjs: export class SearchService { - e.webExtension?.locale ?? lazy.SearchUtils.DEFAULT_TAG; + } } - return { engines, privateDefault }; @@ toolkit/components/search/SearchService.sys.mjs: export class SearchService { #setDefaultAndOrdersFromSelector(engines, privateDefault) { - ## toolkit/mozapps/extensions/internal/XPIProvider.jsm ## -@@ toolkit/mozapps/extensions/internal/XPIProvider.jsm: var BuiltInLocation = new (class _BuiltInLocation extends XPIStateLocation { + ## toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs ## +@@ toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs: var BuiltInLocation = new (class _BuiltInLocation extends XPIStateLocation { isLinkedAddon(/* aId */) { return false; }
149: e243802816361 = 155: f2102b26496ef fixup! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing
150: 7aa9da8c13815 ! 156: 05f2005762615 Bug 40073: Disable remote Public Suffix List fetching @@ browser/components/BrowserGlue.sys.mjs @@ browser/components/BrowserGlue.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { PluginManager: "resource:///actors/PluginParent.sys.mjs", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs", - ProvenanceData: "resource:///modules/ProvenanceData.sys.mjs", + ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.sys.mjs", - PublicSuffixList: - "resource://gre/modules/netwerk-dns/PublicSuffixList.sys.mjs", QuickSuggest: "resource:///modules/QuickSuggest.sys.mjs",
151: 31d831442be45 ! 157: fac0e6c72931d Bug 41906: Hide DNS over HTTPS preferences. @@ browser/components/preferences/privacy.inc.xhtml +<groupbox id="dohBox" data-category="panePrivacy" data-subcategory="doh" data-hidden-from-search="true" hidden="true" class="highlighting-group"> <label class="search-header" searchkeywords="doh trr" hidden="true"><html:h2 data-l10n-id="preferences-doh-header"/></label> <vbox flex="1"> - <html:span id="dohDescription" class="tail-with-learn-more" data-l10n-id="preferences-doh-description"></html:span> + <description id="dohDescription" class="tail-with-learn-more description-deemphasized" data-l10n-id="preferences-doh-description2"></description>
Changed in Firefox 123, 4c2785e75c118a6645e6fbf71f915b2b49cf6750: this isn't trivial to understand and update accordingly, so I dropped this part of our patch and opened #42613 to restore it, if needed.
152: 219d86144a954 ! 158: f2085b607ea1b Bug 23247: Communicating security expectations for .onion @@ browser/base/content/browser-siteIdentity.js: var gIdentityHandler = { + return this._uriIsOnionHost ? "onionUnknownIdentity" : "unknownIdentity"; }, - /** -@@ browser/base/content/browser-siteIdentity.js: var gIdentityHandler = { - * built-in (returns false) or imported (returns true). - */ - _hasCustomRoot() { -+ if (!this._secInfo) { -+ return false; -+ } -+ - let issuerCert = null; - issuerCert = - this._secInfo.succeededCertChain[ - this._secInfo.succeededCertChain.length - 1 - ]; -- -- return !issuerCert.isBuiltInRoot; -+ if (issuerCert) { -+ return !issuerCert.isBuiltInRoot; -+ } -+ return false; - }, - /**
Less important changes.
@@ browser/base/content/browser-siteIdentity.js: var gIdentityHandler = {
"identity.extension.label",
@@ browser/base/content/browser-siteIdentity.js: var gIdentityHandler = {
+ this._identityBox.classList.add(
+ uriIsOnionHost ? "onionMixedActiveContent" : "mixedActiveContent"
+ );
+ if (UrlbarPrefs.get("trimHttps") && warnTextOnInsecure) {
+ icon_label = gNavigatorBundle.getString("identity.notSecure.label");
+ this._identityBox.classList.add("notSecureText");
+ }
} else if (this._isMixedActiveContentBlocked) {
this._identityBox.classList.add(
- "mixedDisplayContentLoadedActiveBlocked"
@@ browser/base/content/browser-siteIdentity.js: var gIdentityHandler = {
}
} else if (this._isCertErrorPage) {
@@ browser/base/content/browser-siteIdentity.js: var gIdentityHandler = {
- } else if (this._isAboutNetErrorPage || this._isAboutBlockedPage) {
- // Network errors and blocked pages get a more neutral icon
+ // Network errors, blocked pages, and pages associated
+ // with another page get a more neutral icon
this._identityBox.className = "unknownIdentity";
+ } else if (this._uriIsOnionHost) {
+ this._identityBox.className = "onionUnknownIdentity";
@@ browser/base/content/browser-siteIdentity.js: var gIdentityHandler = {
"identity.identified.verified_by_you"
## browser/base/content/pageinfo/security.js ##
-@@ browser/base/content/pageinfo/security.js: ChromeUtils.defineESModuleGetters(this, {
+@@ browser/base/content/pageinfo/security.js: const { DownloadUtils } = ChromeUtils.importESModule(
+ ChromeUtils.defineESModuleGetters(this, {
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
- PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
});
+XPCOMUtils.defineLazyGetter(this, "gTorButtonBundle", function () {
+ return Services.strings.createBundle(
@@ dom/base/nsGlobalWindowOuter.cpp: bool nsGlobalWindowOuter::ComputeIsSecureConte
}
Changed in Firefox 116, d4e5590f4076347e35b73db96ea3b7c543f9e3b7: upstream refactor, finding how to fix this was not trivial. I dropped this part of the patch and opened #42608 to reimplement it.
- ## dom/html/HTMLFormElement.cpp ##
-@@ dom/html/HTMLFormElement.cpp: nsresult HTMLFormElement::DoSecureToInsecureSubmitCheck(nsIURI* aActionURL,
- formIsHTTPS = OwnerDoc()->GetDocumentURI()->SchemeIs("https");
- }
- if (!formIsHTTPS) {
-- return NS_OK;
-+ bool formIsOnion = nsMixedContentBlocker::IsPotentiallyTrustworthyOnion(OwnerDoc()->GetDocumentURI());
-+ if (!formIsOnion) {
-+ return NS_OK;
-+ }
- }
-
- if (nsMixedContentBlocker::IsPotentiallyTrustworthyLoopbackURL(aActionURL)) {
-
## dom/ipc/WindowGlobalActor.cpp ##
@@
#include "mozilla/dom/WindowContext.h"
@@ dom/security/nsMixedContentBlocker.cpp: nsresult nsMixedContentBlocker::ShouldLo
Changed in Firefox 120, 692c851b423532342a48507271ba0d1680f87cbc: while we already removed that if in 115, the comment was added later during a refactor upstream (by June 😄️). Anyway, since it doesn't apply after our changes, I removed it.
## dom/websocket/WebSocket.cpp ##
@@ dom/websocket/WebSocket.cpp: nsresult WebSocketImpl::Init(JSContext* aCx, bool aIsSecure,
- }
-
// Don't allow https:// to open ws://
+ // Check that we aren't a server side websocket or set to be upgraded to wss
+ // or allowing ws from https or a local websocket
- if (!mIsServerSide && !mSecure &&
+ if (!mIsServerSide && !mSecure && aIsSecure &&
!Preferences::GetBool("network.websocket.allowInsecureFromHTTPS",
false) &&
!nsMixedContentBlocker::IsPotentiallyTrustworthyLoopbackHost(
mAsciiHost)) {
+- // If aIsSecure is true then disallow loading ws
- if (aIsSecure) {
+ nsCOMPtr<nsIURI> uri;
+ nsresult rv = NS_NewURI(getter_AddRefs(uri), mURI);
@@ dom/websocket/WebSocket.cpp: nsresult WebSocketImpl::Init(JSContext* aCx, bool a
+ if (!nsMixedContentBlocker::IsPotentiallyTrustworthyOnion(uri)) {
return NS_ERROR_DOM_SECURITY_ERR;
}
- }
Less important changes.
- ## mobile/android/modules/geckoview/GeckoViewProgress.sys.mjs ##
-@@ mobile/android/modules/geckoview/GeckoViewProgress.sys.mjs: var IdentityHandler = {
+
+ ## mobile/shared/modules/geckoview/GeckoViewProgress.sys.mjs ##
+@@ mobile/shared/modules/geckoview/GeckoViewProgress.sys.mjs: var IdentityHandler = {
result.host = uri.host;
}
@@ netwerk/protocol/http/HttpBaseChannel.cpp: nsresult HttpBaseChannel::Init(nsIURI
rv = gHttpHandler->AddStandardRequestHeaders(
- &mRequestHead, isHTTPS, aContentPolicyType,
+ &mRequestHead, isSecureOrTrustworthyURL(mURI), aContentPolicyType,
- nsContentUtils::ShouldResistFingerprinting(this));
+ nsContentUtils::ShouldResistFingerprinting(this,
+ RFPTarget::HttpUserAgent));
if (NS_FAILED(rv)) return rv;
-
## security/certverifier/CertVerifier.cpp ##
@@ security/certverifier/CertVerifier.cpp: Result CertVerifier::VerifySSLServerCert(
if (rv != Success) {
@@ security/certverifier/CertVerifier.cpp: Result CertVerifier::VerifySSLServerCert
+ bool errOnionWithSelfSignedCert = false;
+
bool isBuiltChainRootBuiltInRootLocal;
- rv = VerifyCert(peerCertBytes, certificateUsageSSLServer, time, pinarg,
- PromiseFlatCString(hostname).get(), builtChain, flags,
+ rv = VerifyCert(
+ peerCertBytes, certificateUsageSSLServer, time, pinarg,
@@ security/certverifier/CertVerifier.cpp: Result CertVerifier::VerifySSLServerCert(
// In this case we didn't find any issuer for the certificate, or we did
// find other certificates with the same subject but different keys, and
Changed in Firefox 128, 5f40615f5d02b274e3cdc19abdca61cf5f8a0d77 + 6d1611afa26fe5e9230ee7bf1446a8473d9d66ff: the if now contains some checks about rv and has been moved before the if (rv != Success), but I think this should not affect us.
@@ security/certverifier/CertVerifier.cpp: Result CertVerifier::VerifySSLServerCert
if (dcInfo) {
@@ security/certverifier/CertVerifier.cpp: Result CertVerifier::VerifySSLServerCert(
- if (isBuiltChainRootBuiltInRoot) {
- *isBuiltChainRootBuiltInRoot = isBuiltChainRootBuiltInRootLocal;
+ return rv;
}
--
+
+ if (errOnionWithSelfSignedCert) {
+ return Result::ERROR_ONION_WITH_SELF_SIGNED_CERT;
+ }
Changed in Firefox 127, 1d63ed18488dd44cd0fb4a4a9721ee8069d2d14e: the usual browser-init.js refactor.
153: 600801e43e572 ! 159: e9ddab806207d Bug 30237: Add v3 onion services client authentication prompt @@ Commit message Also fixes bug 19251: use enhanced error pages for onion service errors. - ## browser/base/content/browser.js ## -@@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( - ["NewIdentityButton"], - "chrome://browser/content/newidentity.js" - ); -+XPCOMUtils.defineLazyScriptGetter( -+ this, -+ ["OnionAuthPrompt"], -+ "chrome://browser/content/onionservices/authPrompt.js" -+); - XPCOMUtils.defineLazyScriptGetter( - this, - "gEditItemOverlay", -@@ browser/base/content/browser.js: var gBrowserInit = { + ## browser/base/content/browser-init.js ## +@@ browser/base/content/browser-init.js: var gBrowserInit = { gTorConnectUrlbarButton.init(); gTorConnectTitlebarStatus.init(); @@ browser/base/content/browser.js: var gBrowserInit = { gTorCircuitPanel.init(); // Certain kinds of automigration rely on this notification to complete -@@ browser/base/content/browser.js: var gBrowserInit = { +@@ browser/base/content/browser-init.js: var gBrowserInit = { gTorConnectUrlbarButton.uninit(); gTorConnectTitlebarStatus.uninit(); @@ browser/base/content/browser.js: var gBrowserInit = { if (gToolbarKeyNavEnabled) { + ## browser/base/content/browser.js ## +@@ browser/base/content/browser.js: XPCOMUtils.defineLazyScriptGetter( + ["NewIdentityButton"], + "chrome://browser/content/newidentity.js" + ); ++XPCOMUtils.defineLazyScriptGetter( ++ this, ++ ["OnionAuthPrompt"], ++ "chrome://browser/content/onionservices/authPrompt.js" ++); + XPCOMUtils.defineLazyScriptGetter( + this, + "gEditItemOverlay", +
Changed in Firefox 120, be1eb3c4b85b918cd991fcc68c0f92da1e80ce6d: no more XML stylesheets.
## browser/base/content/browser.xhtml ##
@@
- <?xml-stylesheet href="chrome://browser/skin/translations/panel.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?>
-+<?xml-stylesheet href="chrome://browser/content/onionservices/onionservices.css" type="text/css"?>
- <?xml-stylesheet href="chrome://browser/content/torCircuitPanel.css" type="text/css"?>
- <?xml-stylesheet href="chrome://global/content/torconnect/torConnectTitlebarStatus.css" type="text/css"?>
+ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelButton.css" />
+ <link rel="stylesheet" href="chrome://browser/content/torCircuitPanel.css" />
+ <link rel="stylesheet" href="chrome://global/content/torconnect/torConnectTitlebarStatus.css" />
++ <link rel="stylesheet" href="chrome://browser/content/onionservices/onionservices.css" />
+ <link rel="localization" href="branding/brand.ftl"/>
+ <link rel="localization" href="browser/allTabsMenu.ftl"/>
Less important changes.
## browser/base/content/main-popupset.inc.xhtml ##
@@
- #include ../../../devtools/startup/enableDevToolsPopup.inc.xhtml
+ #include ../../components/tabbrowser/content/browser-allTabsMenu.inc.xhtml
#include ../../components/torcircuit/content/torCircuitPanel.inc.xhtml
#include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml
+#include ../../components/onionservices/content/authPopup.inc.xhtml
- #include browser-allTabsMenu.inc.xhtml
<tooltip id="dynamic-shortcut-tooltip"
+ onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
## browser/base/content/navigator-toolbox.inc.xhtml ##
@@
@@ browser/base/content/navigator-toolbox.inc.xhtml
<image id="password-notification-icon" class="notification-anchor-icon" role="button"
data-l10n-id="urlbar-password-notification-anchor"/>
+#include ../../components/onionservices/content/authNotificationIcon.inc.xhtml
- <stack id="plugins-notification-icon" class="notification-anchor-icon" role="button" align="center" data-l10n-id="urlbar-plugins-notification-anchor">
- <image class="plugin-icon" />
- <image id="plugin-icon-badge" />
+ <image id="web-notifications-notification-icon" class="notification-anchor-icon desktop-notification-icon" role="button"
+ data-l10n-id="urlbar-web-notification-anchor"/>
+ <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon camera-icon" role="button"
## browser/components/moz.build ##
@@ browser/components/moz.build: DIRS += [
@@ browser/components/onionservices/moz.build (new)
More stylesheets.
## browser/components/preferences/preferences.xhtml ##
@@
- <?xml-stylesheet href="chrome://browser/content/preferences/letterboxing.css"?>
- <?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelPreferences.css"?>
- <?xml-stylesheet href="chrome://browser/content/torpreferences/torPreferences.css"?>
-+<?xml-stylesheet href="chrome://browser/content/onionservices/authPreferences.css"?>
- <!DOCTYPE html>
+ <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPreferences.css" />
+ <link rel="stylesheet" href="chrome://browser/content/torpreferences/torPreferences.css" />
++ <link rel="stylesheet" href="chrome://browser/content/onionservices/authPreferences.css" />
+ <link rel="localization" href="branding/brand.ftl"/>
+ <link rel="localization" href="browser/browser.ftl"/>
Less important changes.
## browser/components/preferences/privacy.inc.xhtml ##
@@
@@ browser/components/preferences/privacy.inc.xhtml
<groupbox id="formAutofillGroupBox"
## browser/components/preferences/privacy.js ##
-@@ browser/components/preferences/privacy.js: XPCOMUtils.defineLazyGetter(this, "AlertsServiceDND", function () {
- }
- });
+@@ browser/components/preferences/privacy.js: XPCOMUtils.defineLazyServiceGetter(
+ "nsIParentalControlsService"
+ );
+XPCOMUtils.defineLazyScriptGetter(
+ this,
@@ browser/components/preferences/privacy.js: XPCOMUtils.defineLazyGetter(this, "Al
XPCOMUtils.defineLazyScriptGetter(
this,
@@ browser/components/preferences/privacy.js: var gPrivacyPane = {
- this.trackingProtectionReadPrefs();
this.networkCookieBehaviorReadPrefs();
this._initTrackingProtectionExtensionControl();
+ this._initThirdPartyCertsToggle();
+ OnionServicesAuthPreferences.init();
this._initSecurityLevel();
- Services.telemetry.setEventRecordingEnabled("pwmgr", true);
+ Services.telemetry.setEventRecordingEnabled("privacy.ui.fpp", true);
## browser/themes/shared/notification-icons.css ##
@@
@@ browser/themes/shared/notification-icons.css
+.tor-clientauth-icon,
#password-notification-icon {
list-style-image: url(chrome://browser/skin/login.svg);
- }
+
## docshell/base/nsDocShell.cpp ##
@@ docshell/base/nsDocShell.cpp: nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
@@ docshell/base/nsDocShell.cpp: nsresult nsDocShell::FilterStatusForErrorPage(
NS_ERROR_GET_MODULE(aStatus) == NS_ERROR_MODULE_SECURITY) {
// Errors to be shown for any frame
return aStatus;
-@@ docshell/base/nsDocShell.cpp: nsresult nsDocShell::CreateContentViewer(const nsACString& aContentType,
+@@ docshell/base/nsDocShell.cpp: nsresult nsDocShell::CreateDocumentViewer(const nsACString& aContentType,
FireOnLocationChange(this, aRequest, mCurrentURI, locationFlags);
}
@@ dom/ipc/BrowserParent.h: class BrowserParent final : public PBrowserParent,
## dom/ipc/PBrowser.ipdl ##
@@ dom/ipc/PBrowser.ipdl: parent:
- async RequestPointerCapture(uint32_t aPointerId) returns (bool aSuccess);
- async ReleasePointerCapture(uint32_t aPointerId);
+ */
+ async RequestPointerLock() returns (nsCString error);
+ /**
+ * This function is used to notify the parent that it should display a
@@ dom/ipc/PBrowser.ipdl: parent:
+ */
+ async ShowOnionServicesAuthPrompt(nsCString aOnionHost, nsCString aTopic);
+
- child:
- async NativeSynthesisResponse(uint64_t aObserverId, nsCString aResponse);
- async UpdateSHistory();
+ both:
+ /**
+ * informs that a pointer lock has released.
## js/xpconnect/src/xpc.msg ##
@@ js/xpconnect/src/xpc.msg: XPC_MSG_DEF(NS_ERROR_CRYPTOMINING_URI , "The URI is cryptomining
@@ netwerk/socket/nsSOCKSIOLayer.cpp: PRStatus nsSOCKSSocketInfo::ReadV5ConnectResp
LOGERROR(("socks5: connect failed."));
break;
Changed in Firefox 123, a94d5c59e66c4bff52945dba4c87f4f5f73ac867: about:neterror was converted from XHTML to HTML.
+ ## toolkit/content/aboutNetError.html ##
+@@
+ <link rel="localization" href="branding/brand.ftl" />
+ <link rel="localization" href="toolkit/neterror/certError.ftl" />
+ <link rel="localization" href="toolkit/neterror/netError.ftl" />
++ <link rel="localization" href="toolkit/global/tor-browser.ftl"/>
+ </head>
+ <body>
+ <div class="container">
+
## toolkit/content/aboutNetError.mjs ##
@@ toolkit/content/aboutNetError.mjs: function recordTRREventTelemetry(
}
@@ toolkit/content/aboutNetError.mjs: async function initPage() {
const tryAgain = document.getElementById("netErrorButtonContainer");
tryAgain.hidden = false;
- ## toolkit/content/aboutNetError.xhtml ##
-@@
- <link rel="localization" href="branding/brand.ftl"/>
- <link rel="localization" href="toolkit/neterror/certError.ftl" />
- <link rel="localization" href="toolkit/neterror/netError.ftl"/>
-+ <link rel="localization" href="toolkit/global/tor-browser.ftl"/>
- </head>
-
- <body>
-
## toolkit/modules/PopupNotifications.sys.mjs ##
@@ toolkit/modules/PopupNotifications.sys.mjs: PopupNotifications.prototype = {
* will be dismissed instead of removed after running the callback.
@@ toolkit/themes/shared/aboutNetError.css: body {
body {
--warning-color: #ffbd4f;
@@ toolkit/themes/shared/aboutNetError.css: body.certerror .title {
- color: var(--warning-color);
+ fill: var(--warning-color);
}
+body.onion-error .title {
@@ toolkit/themes/shared/aboutNetError.css: body.certerror .title {
Changed in Firefox 120, d6ead03f0cdf14888abc8fa1f996c606963848ff: upstream added a new Mod for the Windows Default Browser Agent, therefore I incremented the code we use for Onion Service errors.
## xpcom/base/ErrorList.py ##
@@ xpcom/base/ErrorList.py: modules["ERRORRESULT"] = Mod(43)
- # Win32 system error codes, which are not mapped to a specific other value,
# see Bug 1686041.
modules["WIN32"] = Mod(44)
-+modules["TOR"] = Mod(45)
+ modules["WDBA"] = Mod(45)
++modules["TOR"] = Mod(46)
# NS_ERROR_MODULE_GENERAL should be used by modules that do not
# care if return code values overlap. Callers of methods that
-@@ xpcom/base/ErrorList.py: with modules["ERRORRESULT"]:
- errors["NS_ERROR_INTERNAL_ERRORRESULT_RANGEERROR"] = FAILURE(5)
+@@ xpcom/base/ErrorList.py: with modules["WDBA"]:
+ errors["NS_ERROR_WDBA_BUILD"] = FAILURE(4)
+# =======================================================================
-+# 45: Tor-specific error codes.
++# 46: Tor-specific error codes.
+# =======================================================================
+with modules["TOR"]:
+ # Tor onion service descriptor can not be found.
@@ xpcom/base/ErrorList.py: with modules["ERRORRESULT"]:
+ errors["NS_ERROR_TOR_ONION_SVC_BAD_ADDRESS"] = FAILURE(7)
+ # Tor onion service introduction timed out.
+ errors["NS_ERROR_TOR_ONION_SVC_INTRO_TIMEDOUT"] = FAILURE(8)
++
+
# =======================================================================
# 51: NS_ERROR_MODULE_GENERAL
154: bf646944c5d00 = 160: 3628fad6c1fd5 fixup! Bug 30237: Add v3 onion services client authentication prompt
Esmified.
155: a5d25d85f1447 ! 161: 01fd75d749948 Bug 21952: Implement Onion-Location @@ Commit message presence of an onionsite alternative with a badge in the urlbar. ## browser/base/content/browser.js ## -@@ browser/base/content/browser.js: XPCOMUtils.defineLazyModuleGetters(this, { - ExtensionsUI: "resource:///modules/ExtensionsUI.jsm", - HomePage: "resource:///modules/HomePage.jsm", - NetUtil: "resource://gre/modules/NetUtil.jsm", -+ OnionLocationParent: "resource:///modules/OnionLocationParent.jsm", - OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm", - PageActions: "resource:///modules/PageActions.jsm", - ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm", +@@ browser/base/content/browser.js: ChromeUtils.defineESModuleGetters(this, { + NewTabPagePreloading: "resource:///modules/NewTabPagePreloading.sys.mjs", + NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs", + NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs", ++ OnionLocationParent: "resource:///modules/OnionLocationParent.sys.mjs", + OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.sys.mjs", + PageActions: "resource:///modules/PageActions.sys.mjs", + PageThumbs: "resource://gre/modules/PageThumbs.sys.mjs", @@ browser/base/content/browser.js: var XULBrowserWindow = { CFRPageActions.updatePageActions(gBrowser.selectedBrowser); @@ browser/base/content/popup-notifications.inc ## browser/components/BrowserGlue.sys.mjs ## @@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = { - ], + messageManagerGroups: ["browsers"], }, + OnionLocation: { @@ dom/base/Document.cpp: void Document::ResetToURI(nsIURI* aURI, nsILoadGroup* aLo mChromeXHRDocBaseURI = nullptr; + mOnionLocationURI = nullptr; - // Check if the current document is the top-level DevTools document. - // For inner DevTools frames, mIsDevToolsDocument will be set when + if (aLoadGroup) { + nsCOMPtr<nsIInterfaceRequestor> callbacks; @@ dom/base/Document.cpp: void Document::GetHeaderData(nsAtom* aHeaderField, nsAString& aData) const { } } @@ dom/webidl/Document.webidl: partial interface Document { + [ChromeOnly] readonly attribute URI? onionLocationURI; }; + Document includes NonElementParentNode; + ## xpcom/ds/StaticAtoms.py ## @@ xpcom/ds/StaticAtoms.py: STATIC_ATOMS = [ Atom("oninputsourceschange", "oninputsourceschange"),
Esmified
156: 49b886a70909d ! 162: 3849610e96def Bug 40458: Implement .tor.onion aliases @@ Commit message ## browser/components/BrowserGlue.sys.mjs ## @@ browser/components/BrowserGlue.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { - "resource://messaging-system/lib/SpecialMessageActions.sys.mjs", - TRRRacer: "resource:///modules/TRRPerformance.sys.mjs", + NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs", + NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs", + Normandy: "resource://normandy/Normandy.sys.mjs", ++ OnionAliasStore: "resource:///modules/OnionAliasStore.sys.mjs", + OnboardingMessageProvider: + "resource:///modules/asrouter/OnboardingMessageProvider.sys.mjs", + OsEnvironment: "resource://gre/modules/OsEnvironment.sys.mjs", +@@ browser/components/BrowserGlue.sys.mjs: ChromeUtils.defineESModuleGetters(lazy, { + TabCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs", + TabUnloader: "resource:///modules/TabUnloader.sys.mjs", TelemetryUtils: "resource://gre/modules/TelemetryUtils.sys.mjs", + TorConnect: "resource://gre/modules/TorConnect.sys.mjs", + TorConnectTopics: "resource://gre/modules/TorConnect.sys.mjs", TorProviderBuilder: "resource://gre/modules/TorProviderBuilder.sys.mjs", UIState: "resource://services-sync/UIState.sys.mjs", UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs", -@@ browser/components/BrowserGlue.sys.mjs: XPCOMUtils.defineLazyModuleGetters(lazy, { - NetUtil: "resource://gre/modules/NetUtil.jsm", - OnboardingMessageProvider: - "resource://activity-stream/lib/OnboardingMessageProvider.jsm", -+ OnionAliasStore: "resource:///modules/OnionAliasStore.jsm", - PageActions: "resource:///modules/PageActions.jsm", - ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm", - TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm", @@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = { enablePreference: "accessibility.blockautorefresh", }, @@ browser/components/BrowserGlue.sys.mjs: let JSWINDOWACTORS = { parent: { esModuleURI: "resource:///modules/ScreenshotsUtils.sys.mjs", @@ browser/components/BrowserGlue.sys.mjs: BrowserGlue.prototype = { - lazy.UpdateListener.reset(); - } + // can perform at-shutdown tasks later in shutdown. + Services.fog; }, + () => lazy.OnionAliasStore.uninit(), ]; @@ browser/components/about/components.conf: pages = [ 'robots', + 'rulesets', 'sessionrestore', - 'tabcrashed', - 'unloads', + 'settings', + 'shoppingsidebar', ## browser/components/moz.build ## @@ browser/components/moz.build: DIRS += [ - "prompts", "protocolhandler", + "reportbrokensite", "resistfingerprinting", + "rulesets", "screenshots", @@ browser/components/rulesets/moz.build (new)
Added a newline when merging with our uplifted commit. FWIW, I prefer having an empty line in this context to mark the start of our patch, but I can remove it if that's the general consensus.
## modules/libpref/Preferences.cpp ##
@@ modules/libpref/Preferences.cpp: static const PrefListEntry sOverrideRestrictionsList[]{
- PREF_LIST_ENTRY("services.settings.clock_skew_seconds"),
- PREF_LIST_ENTRY("services.settings.last_update_seconds"),
+ // has it set as a string...
+ PREF_LIST_ENTRY("services.settings.preview_enabled"),
PREF_LIST_ENTRY("services.settings.server"),
++
+ // tor-browser#41165, tor-browser!765: leave this static pref in
+ // gSharedMap to prevent a crash in gpu process in debug builds.
+ PREF_LIST_ENTRY("browser.urlbar.onionRewrites.enabled"),
@@ modules/libpref/Preferences.cpp: static const PrefListEntry sOverrideRestriction
## modules/libpref/init/StaticPrefList.yaml ##
@@
- value: true
+ value: false
mirror: always
+# tor-browser#28005, tor-browser#40458: enable .tor.onion aliases by default.
@@ toolkit/modules/RemotePageAccessManager.sys.mjs: export let RemotePageAccessMana
+ "rulesets:update-channel",
+ ],
+ },
- "about:tabcrashed": {
- RPMSendAsyncMessage: ["Load", "closeTab", "restoreTab", "restoreAll"],
- RPMAddMessageListener: ["*"],
+ "about:shoppingsidebar": {
+ RPMSetPref: [
+ "browser.shopping.experience2023.optedIn",
157: 36406b9408f83 = 163: 1c09dd6bc7f1f Bug 11698: Incorporate Tor Browser Manual pages into Tor Browser
158: f5d583e5f8008 = 164: ae75c471215f0 Bug 41435: Add a Tor Browser migration function
159: 66675db4636e4 ! 165: a814574874c7a Bug 42110: Add TorUIUtils module for common tor component methods. @@ browser/modules/TorUIUtils.sys.mjs (new) ## browser/modules/moz.build ## @@ browser/modules/moz.build: EXTRA_JS_MODULES += [ + "SelectionChangedMenulist.sys.mjs", + "SiteDataManager.sys.mjs", "SitePermissions.sys.mjs", - "TabsList.jsm", - "TabUnloader.jsm", + "TorUIUtils.sys.mjs", - "TransientPrefs.jsm", + "TransientPrefs.sys.mjs", "URILoadingHelper.sys.mjs", - "webrtcUI.jsm", + "webrtcUI.sys.mjs",
Changed in Firefox 116, dcb2c38e52c3f39a13d6de40d002666a7d46c43e: upstream decided to move to string constants instead of numbers in variables. I adapted our patch to follow.
160: 6a8799f60958a ! 166: b8bea58be619e Bug 40701: Add security warning when downloading a file @@ browser/components/downloads/content/contentAreaDownloadsView.js: var ContentAre + true, + suppressionFlag + ); - document.addEventListener("visibilitychange", aEvent => { + document.addEventListener("visibilitychange", () => { let indicator = DownloadsCommon.getIndicatorData(window); if (document.visibilityState === "visible") { ## browser/components/downloads/content/contentAreaDownloadsView.xhtml ## @@ - <linkset> + <html:link rel="localization" href="toolkit/global/textActions.ftl"/> <html:link rel="localization" href="browser/downloads.ftl" /> + <html:link rel="localization" href="toolkit/global/tor-browser.ftl" /> @@ browser/components/downloads/content/contentAreaDownloadsView.xhtml ## browser/components/downloads/content/downloads.css ## @@ - font: caption; + #downloadsPanel-mainView { min-width: 37em; padding: 0.62em; + /* If we don't set a width, #downloadsPanelTorWarningDescription will request @@ browser/components/downloads/content/downloads.js "resource://gre/modules/XPCOMUtils.sys.mjs" ); @@ browser/components/downloads/content/downloads.js: var DownloadsPanel = { - */ - _state: 0, + /** The panel will be shown as soon as data is available. */ + _waitingDataForOpen: false, + /** + * State of tor's download warning. It should only be initialized once (text assigned, @@ browser/components/downloads/content/downloads.js: var DownloadsPanel = { + */ + _torWarningInitialized: false, + - /** The panel is not linked to downloads data yet. */ - get kStateUninitialized() { - return 0; + /** + * Starts loading the download data in background, without opening the panel. + * Use showPanel instead to load the data and open the panel at the same time. @@ browser/components/downloads/content/downloads.js: var DownloadsPanel = { ); } @@ browser/components/downloads/content/downloads.js: var DownloadsPanel = { + this._torWarningPrefObserver(); + } + - if (this._state != this.kStateUninitialized) { + if (this._initialized) { DownloadsCommon.log("DownloadsPanel is already initialized."); return; @@ browser/components/downloads/content/downloads.js: var DownloadsPanel = { @@ browser/components/downloads/content/downloads.js: var DownloadsPanel = { + delete this._torWarningPrefObserver; + } + - this._state = this.kStateUninitialized; + this._initialized = false; DownloadsSummary.active = false; @@ browser/components/downloads/content/downloads.js: var DownloadsPanel = { @@ browser/components/downloads/content/downloads.js: var DownloadsPanel = { */ - _focusPanel() { - // We may be invoked while the panel is still waiting to be shown. -- if (this._state != this.kStateShown) { +- if (this.panel.state != "open") { - return; - } + _focusPanel(forceFocus = false) { + if (!forceFocus) { + // We may be invoked while the panel is still waiting to be shown. -+ if (this._state != this.kStateShown) { ++ if (this.panel.state != "open") { + return; + } @@ browser/components/places/content/places.xhtml + </html:message-bar> <vbox id="placesViewsBox" flex="1"> <tree id="placeContent" - class="plain placesTree" + class="placesTree" ## browser/themes/shared/customizableui/panelUI-shared.css ## @@ browser/themes/shared/customizableui/panelUI-shared.css: panelview .toolbarbutton-1 {
161: fbd6876be3987 ! 167: b50a800b27968 Bug 41736: Customize toolbar for tor-browser. @@ Commit message Bug 41736: Customize toolbar for tor-browser. ## browser/components/customizableui/CustomizableUI.sys.mjs ## -@@ browser/components/customizableui/CustomizableUI.sys.mjs: var kVersion = 19; +@@ browser/components/customizableui/CustomizableUI.sys.mjs: var kVersion = 20; var kVersionBaseBrowser = 2; const NoScriptId = "_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action";
162: f891911d8b6b5 = 168: fcd9b1f6e1dab Bug 41728: Pin bridges.torproject.org domains to Let's Encrypt's root cert public key
Changed in Firefox 120, d131087803b93be46fb1bc841b4e1a64ab521bd2: the changes were not trivial, so I didn't try to re-apply our patch during the rebase. Henry opened #42612 to follow.
163: 691cadb6831b1 < -: ------------- Customize moz-toggle for tor-browser. -: ------------- > 169: 8773ae8ab396d Customize moz-toggle for tor-browser.
164: 63d07f301b8ed = 170: a072539df5120 Bug 41822: Unconditionally disable default browser UX in about:preferences
165: d7baad64005f0 = 171: 3649e7065e687 Temporary commit: manually place generated wasm files
166: 5517e6b09dde7 = 172: b59af9b76d18a fixup! Bug 41089: Add tor-browser build scripts + Makefile to tor-browser