mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-21 14:55:37 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
3
src/external-patches/librewolf/README.md
Normal file
3
src/external-patches/librewolf/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Patches imported from LibreWolf
|
||||
|
||||
Firefox sometimes makes changes without considering the impact on forks. This is the case of the patches that are imported from LibreWolf, which are already present in LibreWolf but not yet (or never) present in Firefox. Thanks to LibreWolf for making these patches available and for their work in maintaining them. We will keep these patches as long as they are needed, and we will remove them once they are no longer necessary (for example, when they are merged into Firefox or when the issue they solve is no longer present).
|
||||
12
src/external-patches/librewolf/firefox-in-ua.patch
Normal file
12
src/external-patches/librewolf/firefox-in-ua.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
|
||||
--- a/toolkit/moz.configure
|
||||
+++ b/toolkit/moz.configure
|
||||
@@ -28,7 +28,7 @@ project_flag(
|
||||
|
||||
project_flag(
|
||||
env="MOZ_APP_UA_NAME",
|
||||
- default="",
|
||||
+ default="Firefox",
|
||||
nargs=1,
|
||||
help="Application name in the User Agent string",
|
||||
)
|
||||
65
src/external-patches/librewolf/xdg-dir.patch
Normal file
65
src/external-patches/librewolf/xdg-dir.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
|
||||
index 3cf7073..b1c782a 100644
|
||||
--- a/toolkit/xre/nsXREDirProvider.cpp
|
||||
+++ b/toolkit/xre/nsXREDirProvider.cpp
|
||||
@@ -1283,9 +1283,11 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
|
||||
// Similar to nsXREDirProvider::AppendProfilePath.
|
||||
// TODO: Bug 1990407 - Evaluate if refactoring might be required there in the
|
||||
// future?
|
||||
- if (gAppData->profile) {
|
||||
+ // Use aIsDotted for a different purpose here, will probably break in the future
|
||||
+ if (gAppData->profile && aIsDotted) {
|
||||
nsAutoCString profile;
|
||||
profile = gAppData->profile;
|
||||
+ profile = "."_ns + nsDependentCString(gAppData->profile);
|
||||
MOZ_TRY(aFile->AppendRelativeNativePath(profile));
|
||||
} else {
|
||||
nsAutoCString vendor;
|
||||
@@ -1295,8 +1297,8 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
|
||||
ToLowerCase(vendor);
|
||||
ToLowerCase(appName);
|
||||
|
||||
- MOZ_TRY(aFile->AppendRelativeNativePath(aIsDotted ? ("."_ns + vendor)
|
||||
- : vendor));
|
||||
+ //MOZ_TRY(aFile->AppendRelativeNativePath(aIsDotted ? ("."_ns + vendor)
|
||||
+ // : vendor));
|
||||
MOZ_TRY(aFile->AppendRelativeNativePath(appName));
|
||||
}
|
||||
|
||||
@@ -1435,28 +1437,22 @@ nsresult nsXREDirProvider::GetLegacyOrXDGHomePath(const char* aHomeDir,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
- // If the build was made against a specific profile name, MOZ_APP_PROFILE=
|
||||
- // then make sure we respect this and dont move to XDG directory
|
||||
- if (gAppData->profile) {
|
||||
- MOZ_TRY(NS_NewNativeLocalFile(nsDependentCString(aHomeDir),
|
||||
- getter_AddRefs(localDir)));
|
||||
- } else {
|
||||
- MOZ_TRY(GetLegacyOrXDGConfigHome(aHomeDir, getter_AddRefs(localDir)));
|
||||
- MOZ_TRY(localDir->Clone(getter_AddRefs(parentDir)));
|
||||
- }
|
||||
+ // Since we set gAppData->profile and don't want to force legacy behaviour
|
||||
+ MOZ_TRY(GetLegacyOrXDGConfigHome(aHomeDir, getter_AddRefs(localDir)));
|
||||
+ MOZ_TRY(localDir->Clone(getter_AddRefs(parentDir)));
|
||||
|
||||
MOZ_TRY(AppendFromAppData(localDir, false));
|
||||
}
|
||||
|
||||
+ // The profile root directory needs to exists at that point.
|
||||
+ MOZ_TRY(EnsureDirectoryExists(localDir));
|
||||
+
|
||||
// If required return the parent directory that matches the profile root
|
||||
// directory.
|
||||
if (aFile) {
|
||||
- parentDir.forget(aFile);
|
||||
+ localDir.forget(aFile);
|
||||
}
|
||||
|
||||
- // The profile root directory needs to exists at that point.
|
||||
- MOZ_TRY(EnsureDirectoryExists(localDir));
|
||||
-
|
||||
return NS_OK;
|
||||
}
|
||||
#endif // defined(MOZ_WIDGET_GTK)
|
||||
|
||||
29
src/external-patches/manifest.json
Normal file
29
src/external-patches/manifest.json
Normal file
@@ -0,0 +1,29 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// 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/.
|
||||
[
|
||||
{
|
||||
"type": "phabricator",
|
||||
"id": "D279007",
|
||||
"name": "Fix MacOS Crash on Shutdown Firefox 149"
|
||||
},
|
||||
{
|
||||
"type": "local",
|
||||
"path": "firefox/no_liquid_glass_icon.patch"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"url": "https://codeberg.org/librewolf/source/raw/branch/main/patches/firefox-in-ua.patch",
|
||||
"dest": "librewolf",
|
||||
"replaces": {
|
||||
// They don't correctly export this patch, so we need to replace
|
||||
// the parameter's help description with the correct one.
|
||||
"application": "Application"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"url": "https://codeberg.org/librewolf/source/raw/branch/main/patches/xdg-dir.patch",
|
||||
"dest": "librewolf"
|
||||
}
|
||||
]
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build
|
||||
index d2330003caf35c43d6831fb0d356ece513906f78..76c2faf822ddaf645eb03d93380c58b4e3b510c0 100644
|
||||
--- a/netwerk/protocol/http/moz.build
|
||||
+++ b/netwerk/protocol/http/moz.build
|
||||
@@ -227,7 +227,7 @@ LOCAL_INCLUDES += [
|
||||
"/netwerk/url-classifier",
|
||||
]
|
||||
|
||||
-DEFINES["MOZ_APP_UA_NAME"] = f'"{CONFIG["MOZ_APP_UA_NAME"]}"'
|
||||
+DEFINES["MOZ_APP_UA_NAME"] = f'"Firefox"'
|
||||
|
||||
if CONFIG["MOZ_AUTH_EXTENSION"]:
|
||||
LOCAL_INCLUDES += [
|
||||
@@ -7,7 +7,7 @@ index 0d7a3e505b6bd30548c6dda1504dd343a517b083..54400def5e02e886765fab68c3854a6b
|
||||
getBrowserInfo: function () {
|
||||
const { name, vendor, version, appBuildID } = Services.appinfo;
|
||||
- const info = { name, vendor, version, buildID: appBuildID };
|
||||
+ const info = { name: 'firefox', vendor, version: AppConstants.ZEN_FIREFOX_VERSION, buildID: appBuildID };
|
||||
+ const info = { name: 'Firefox', vendor, version: AppConstants.ZEN_FIREFOX_VERSION, buildID: appBuildID };
|
||||
return Promise.resolve(info);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user