From 41de3c60c76cc146145a70a9074f8e47312b957b Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Sat, 20 Nov 2021 07:31:09 +0100 Subject: [PATCH] Added patches and themes from LibreWolf>Browser>Common --- patches/.created | 0 patches/about-dialog.patch | 12 + patches/allow-ubo-private-mode.patch | 18 + patches/allow_dark_preference_with_rfp.patch | 29 + patches/arm.patch | 12 + patches/browser-confvars.patch | 28 + patches/context-menu.patch | 43 + patches/megabar.patch | 118 + patches/mozilla-vpn-ad.patch | 30 + patches/mozilla_dirs.patch | 76 + patches/remove_addons.patch | 74 + patches/search-config.patch | 4338 ++++++++++++++ .../allow-searchengines-non-esr.patch | 13 + patches/sed-patches/disable-pocket.patch | 38 + .../remove-internal-plugin-certs.patch | 18 + .../sed-patches/stop-undesired-requests.patch | 55 + patches/ui-patches/add-language-warning.patch | 8 + patches/ui-patches/pref-naming.patch | 66 + .../ui-patches/remove-branding-urlbar.patch | 11 + patches/ui-patches/remove-cfrprefs.patch | 19 + .../remove-organization-policy-banner.patch | 11 + .../remove-snippets-from-home.patch | 22 + .../ui-patches/sanitizing-description.patch | 11 + patches/unity-menubar.patch | 5298 +++++++++++++++++ patches/urlbarprovider-interventions.patch | 13 + themes/.created | 0 .../branding/librewolf/VisualElements_150.png | Bin 0 -> 7170 bytes .../branding/librewolf/VisualElements_70.png | Bin 0 -> 3318 bytes .../browser/branding/librewolf/background.png | Bin 0 -> 1480 bytes themes/browser/branding/librewolf/bgstub.jpg | Bin 0 -> 1228 bytes .../browser/branding/librewolf/bgstub_2x.jpg | Bin 0 -> 3663 bytes .../browser/branding/librewolf/branding.nsi | 50 + .../browser/branding/librewolf/configure.sh | 12 + .../librewolf/content/about-background.png | Bin 0 -> 39974 bytes .../branding/librewolf/content/about-logo.png | Bin 0 -> 272 bytes .../librewolf/content/about-wordmark.svg | 22 + .../branding/librewolf/content/about.png | Bin 0 -> 6139 bytes .../librewolf/content/aboutDialog.css | 56 + .../librewolf/content/horizontal-lockup.svg | 5 + .../content/identity-icons-brand.svg | 7 + .../browser/branding/librewolf/content/jar.mn | 18 + .../branding/librewolf/content/moz.build | 7 + .../browser/branding/librewolf/default128.png | Bin 0 -> 6139 bytes .../browser/branding/librewolf/default16.png | Bin 0 -> 695 bytes .../browser/branding/librewolf/default32.png | Bin 0 -> 1481 bytes .../browser/branding/librewolf/default48.png | Bin 0 -> 2242 bytes .../browser/branding/librewolf/default64.png | Bin 0 -> 3038 bytes themes/browser/branding/librewolf/disk.icns | Bin 0 -> 710029 bytes .../browser/branding/librewolf/document.icns | Bin 0 -> 22118 bytes .../browser/branding/librewolf/document.ico | Bin 0 -> 79414 bytes themes/browser/branding/librewolf/dsstore | Bin 0 -> 12292 bytes .../firefox.VisualElementsManifest.xml | 8 + .../browser/branding/librewolf/firefox.icns | Bin 0 -> 22524 bytes themes/browser/branding/librewolf/firefox.ico | Bin 0 -> 32038 bytes .../browser/branding/librewolf/firefox64.ico | Bin 0 -> 32038 bytes .../librewolf/locales/en-US/brand.dtd | 13 + .../librewolf/locales/en-US/brand.ftl | 22 + .../librewolf/locales/en-US/brand.properties | 14 + .../browser/branding/librewolf/locales/jar.mn | 13 + .../branding/librewolf/locales/moz.build | 9 + themes/browser/branding/librewolf/moz.build | 13 + themes/browser/branding/librewolf/newtab.ico | Bin 0 -> 6518 bytes .../browser/branding/librewolf/newwindow.ico | Bin 0 -> 6518 bytes themes/browser/branding/librewolf/pbmode.ico | Bin 0 -> 6518 bytes .../librewolf/pref/firefox-branding.js | 6 + .../librewolf/stubinstaller/bgstub.jpg | Bin 0 -> 1228 bytes .../stubinstaller/installing_page.css | 61 + .../stubinstaller/profile_cleanup_page.css | 42 + .../browser/branding/librewolf/wizHeader.bmp | Bin 0 -> 34322 bytes .../branding/librewolf/wizHeaderRTL.bmp | Bin 0 -> 34322 bytes .../branding/librewolf/wizWatermark.bmp | Bin 0 -> 154544 bytes 71 files changed, 10739 insertions(+) create mode 100644 patches/.created create mode 100644 patches/about-dialog.patch create mode 100644 patches/allow-ubo-private-mode.patch create mode 100644 patches/allow_dark_preference_with_rfp.patch create mode 100644 patches/arm.patch create mode 100644 patches/browser-confvars.patch create mode 100644 patches/context-menu.patch create mode 100644 patches/megabar.patch create mode 100644 patches/mozilla-vpn-ad.patch create mode 100644 patches/mozilla_dirs.patch create mode 100644 patches/remove_addons.patch create mode 100644 patches/search-config.patch create mode 100644 patches/sed-patches/allow-searchengines-non-esr.patch create mode 100644 patches/sed-patches/disable-pocket.patch create mode 100644 patches/sed-patches/remove-internal-plugin-certs.patch create mode 100644 patches/sed-patches/stop-undesired-requests.patch create mode 100644 patches/ui-patches/add-language-warning.patch create mode 100644 patches/ui-patches/pref-naming.patch create mode 100644 patches/ui-patches/remove-branding-urlbar.patch create mode 100644 patches/ui-patches/remove-cfrprefs.patch create mode 100644 patches/ui-patches/remove-organization-policy-banner.patch create mode 100644 patches/ui-patches/remove-snippets-from-home.patch create mode 100644 patches/ui-patches/sanitizing-description.patch create mode 100644 patches/unity-menubar.patch create mode 100644 patches/urlbarprovider-interventions.patch create mode 100644 themes/.created create mode 100644 themes/browser/branding/librewolf/VisualElements_150.png create mode 100644 themes/browser/branding/librewolf/VisualElements_70.png create mode 100644 themes/browser/branding/librewolf/background.png create mode 100644 themes/browser/branding/librewolf/bgstub.jpg create mode 100644 themes/browser/branding/librewolf/bgstub_2x.jpg create mode 100644 themes/browser/branding/librewolf/branding.nsi create mode 100644 themes/browser/branding/librewolf/configure.sh create mode 100644 themes/browser/branding/librewolf/content/about-background.png create mode 100644 themes/browser/branding/librewolf/content/about-logo.png create mode 100644 themes/browser/branding/librewolf/content/about-wordmark.svg create mode 100644 themes/browser/branding/librewolf/content/about.png create mode 100644 themes/browser/branding/librewolf/content/aboutDialog.css create mode 100644 themes/browser/branding/librewolf/content/horizontal-lockup.svg create mode 100644 themes/browser/branding/librewolf/content/identity-icons-brand.svg create mode 100644 themes/browser/branding/librewolf/content/jar.mn create mode 100644 themes/browser/branding/librewolf/content/moz.build create mode 100644 themes/browser/branding/librewolf/default128.png create mode 100644 themes/browser/branding/librewolf/default16.png create mode 100644 themes/browser/branding/librewolf/default32.png create mode 100644 themes/browser/branding/librewolf/default48.png create mode 100644 themes/browser/branding/librewolf/default64.png create mode 100644 themes/browser/branding/librewolf/disk.icns create mode 100644 themes/browser/branding/librewolf/document.icns create mode 100644 themes/browser/branding/librewolf/document.ico create mode 100644 themes/browser/branding/librewolf/dsstore create mode 100644 themes/browser/branding/librewolf/firefox.VisualElementsManifest.xml create mode 100644 themes/browser/branding/librewolf/firefox.icns create mode 100644 themes/browser/branding/librewolf/firefox.ico create mode 100644 themes/browser/branding/librewolf/firefox64.ico create mode 100644 themes/browser/branding/librewolf/locales/en-US/brand.dtd create mode 100644 themes/browser/branding/librewolf/locales/en-US/brand.ftl create mode 100644 themes/browser/branding/librewolf/locales/en-US/brand.properties create mode 100644 themes/browser/branding/librewolf/locales/jar.mn create mode 100644 themes/browser/branding/librewolf/locales/moz.build create mode 100644 themes/browser/branding/librewolf/moz.build create mode 100644 themes/browser/branding/librewolf/newtab.ico create mode 100644 themes/browser/branding/librewolf/newwindow.ico create mode 100644 themes/browser/branding/librewolf/pbmode.ico create mode 100644 themes/browser/branding/librewolf/pref/firefox-branding.js create mode 100644 themes/browser/branding/librewolf/stubinstaller/bgstub.jpg create mode 100644 themes/browser/branding/librewolf/stubinstaller/installing_page.css create mode 100644 themes/browser/branding/librewolf/stubinstaller/profile_cleanup_page.css create mode 100644 themes/browser/branding/librewolf/wizHeader.bmp create mode 100644 themes/browser/branding/librewolf/wizHeaderRTL.bmp create mode 100644 themes/browser/branding/librewolf/wizWatermark.bmp diff --git a/patches/.created b/patches/.created new file mode 100644 index 0000000..e69de29 diff --git a/patches/about-dialog.patch b/patches/about-dialog.patch new file mode 100644 index 0000000..556d7b5 --- /dev/null +++ b/patches/about-dialog.patch @@ -0,0 +1,12 @@ +diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml +--- a/browser/base/content/aboutDialog.xhtml ++++ b/browser/base/content/aboutDialog.xhtml +@@ -147,7 +147,7 @@ + + + +- + diff --git a/patches/allow-ubo-private-mode.patch b/patches/allow-ubo-private-mode.patch new file mode 100644 index 0000000..ef08f46 --- /dev/null +++ b/patches/allow-ubo-private-mode.patch @@ -0,0 +1,18 @@ +--- a/toolkit/components/extensions/Extension.jsm ++++ b/toolkit/components/extensions/Extension.jsm +@@ -2658,6 +2658,15 @@ + this.permissions.add(PRIVATE_ALLOWED_PERMISSION); + } + ++ if (this.id === "uBlock0@raymondhill.net") { ++ ExtensionPermissions.add(this.id, { ++ permissions: [PRIVATE_ALLOWED_PERMISSION], ++ origins: [], ++ }); ++ this.permissions.add(PRIVATE_ALLOWED_PERMISSION); ++ } ++ ++ + // We only want to update the SVG_CONTEXT_PROPERTIES_PERMISSION during install and + // upgrade/downgrade startups. + if (INSTALL_AND_UPDATE_STARTUP_REASONS.has(this.startupReason)) { diff --git a/patches/allow_dark_preference_with_rfp.patch b/patches/allow_dark_preference_with_rfp.patch new file mode 100644 index 0000000..69ec48a --- /dev/null +++ b/patches/allow_dark_preference_with_rfp.patch @@ -0,0 +1,29 @@ +diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp +index ce2cbca..60fda48 100644 +--- a/dom/base/Document.cpp ++++ b/dom/base/Document.cpp +@@ -17084,6 +17084,7 @@ void Document::RemoveToplevelLoadingDocument(Document* aDoc) { + StylePrefersColorScheme Document::PrefersColorScheme( + IgnoreRFP aIgnoreRFP) const { + if (aIgnoreRFP == IgnoreRFP::No && ++ !StaticPrefs::privacy_override_rfp_for_color_scheme() && + nsContentUtils::ShouldResistFingerprinting(this)) { + return StylePrefersColorScheme::Light; + } +diff --git a/modules/libref/init/StaticPrefList.yaml b/modules/libref/init/StaticPrefList.yaml +index b4b2dc7..e65d43f 100644 +--- a/modules/libpref/init/StaticPrefList.yaml ++++ b/modules/libpref/init/StaticPrefList.yaml +@@ -9863,6 +9863,12 @@ + value: false + mirror: always + ++# Allows overriding RFP for only the dark/light pref ++- name: privacy.override_rfp_for_color_scheme ++ type: bool ++ value: false ++ mirror: always ++ + # We automatically decline canvas permission requests if they are not initiated + # from user input. Just in case that breaks something, we allow the user to + # revert this behavior with this obscure pref. We do not intend to support this diff --git a/patches/arm.patch b/patches/arm.patch new file mode 100644 index 0000000..0e0d648 --- /dev/null +++ b/patches/arm.patch @@ -0,0 +1,12 @@ +diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp +index f8977a6..34f52fc 100644 +--- a/js/src/wasm/WasmSignalHandlers.cpp ++++ b/js/src/wasm/WasmSignalHandlers.cpp +@@ -243,7 +243,7 @@ using mozilla::DebugOnly; + // If you run into compile problems on a tier-3 platform, you can disable the + // emulation here. + +-#if defined(__linux__) && defined(__arm__) ++#if 0 && defined(__linux__) && defined(__arm__) + # define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS + #endif diff --git a/patches/browser-confvars.patch b/patches/browser-confvars.patch new file mode 100644 index 0000000..9b40dce --- /dev/null +++ b/patches/browser-confvars.patch @@ -0,0 +1,28 @@ +diff --git a/browser/confvars.sh b/browser/confvars.sh +index 92871c9516..1e151180dd 100644 +--- a/browser/confvars.sh ++++ b/browser/confvars.sh +@@ -3,8 +3,10 @@ + # 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/. + +-MOZ_APP_VENDOR=Mozilla +-MOZ_UPDATER=1 ++MOZ_APP_BASENAME=LibreWolf ++MOZ_APP_VENDOR="LibreWolf Community" ++ ++MOZ_UPDATER=0 + + if test "$OS_ARCH" = "WINNT"; then + if ! test "$HAVE_64BIT_BUILD"; then +@@ -34,8 +36,8 @@ BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml + # For mozilla-beta, mozilla-release, or mozilla-central repositories, use + # "unofficial" branding. + # For the mozilla-aurora repository, use "aurora". +-MOZ_BRANDING_DIRECTORY=browser/branding/unofficial +-MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/official ++MOZ_BRANDING_DIRECTORY=browser/branding/librewolf ++MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/librewolf + MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} + + MOZ_PROFILE_MIGRATOR=1 diff --git a/patches/context-menu.patch b/patches/context-menu.patch new file mode 100644 index 0000000..5685f96 --- /dev/null +++ b/patches/context-menu.patch @@ -0,0 +1,43 @@ +diff --git a/browser/base/content/browser-context.inc b/browser/base/content/browser-context.inc +--- a/browser/base/content/browser-context.inc ++++ b/browser/base/content/browser-context.inc +@@ -102,19 +102,16 @@ + oncommand="gContextMenu.openLinkInPrivateWindow();"/> + + + +- + + + + #endif + +- + +