From a93c974f2b73841a07abfb0b4c75ae16db9dcf26 Mon Sep 17 00:00:00 2001 From: BeatLink Date: Wed, 12 Jun 2019 15:44:32 -0500 Subject: Initial Commit --- .../browser/branding/librewolf/background.png | Bin 0 -> 110777 bytes .../browser/branding/librewolf/bgstub.jpg | Bin 0 -> 17593 bytes .../browser/branding/librewolf/bgstub_2x.jpg | Bin 0 -> 53107 bytes .../browser/branding/librewolf/branding.nsi | 50 +++++ .../browser/branding/librewolf/configure.sh | 9 + .../librewolf/content/about-background.png | Bin 0 -> 82254 bytes .../branding/librewolf/content/about-logo.png | Bin 0 -> 30342 bytes .../branding/librewolf/content/about-wordmark.svg | 22 ++ .../browser/branding/librewolf/content/about.png | Bin 0 -> 54209 bytes .../branding/librewolf/content/aboutDialog.css | 25 +++ .../librewolf/content/horizontal-lockup.svg | 5 + .../librewolf/content/identity-icons-brand.svg | 7 + .../browser/branding/librewolf/content/jar.mn | 18 ++ .../browser/branding/librewolf/content/moz.build | 7 + .../browser/branding/librewolf/disk.icns | Bin 0 -> 710029 bytes .../browser/branding/librewolf/document.icns | Bin 0 -> 746810 bytes .../browser/branding/librewolf/document.ico | Bin 0 -> 79414 bytes .../browser/branding/librewolf/dsstore | Bin 0 -> 12292 bytes .../librewolf/firefox.VisualElementsManifest.xml | 8 + .../browser/branding/librewolf/firefox.icns | Bin 0 -> 648208 bytes .../browser/branding/librewolf/firefox.ico | Bin 0 -> 74588 bytes .../browser/branding/librewolf/firefox64.ico | Bin 0 -> 32038 bytes .../branding/librewolf/locales/en-US/brand.dtd | 13 ++ .../branding/librewolf/locales/en-US/brand.ftl | 22 ++ .../librewolf/locales/en-US/brand.properties | 14 ++ .../browser/branding/librewolf/locales/jar.mn | 13 ++ .../browser/branding/librewolf/locales/moz.build | 9 + .../browser/branding/librewolf/moz.build | 13 ++ .../browser/branding/librewolf/newtab.ico | Bin 0 -> 6518 bytes .../browser/branding/librewolf/newwindow.ico | Bin 0 -> 6518 bytes .../browser/branding/librewolf/pbmode.ico | Bin 0 -> 6518 bytes .../branding/librewolf/pref/firefox-branding.js | 29 +++ .../browser/branding/librewolf/wizHeader.bmp | Bin 0 -> 25820 bytes .../browser/branding/librewolf/wizHeaderRTL.bmp | Bin 0 -> 25820 bytes .../browser/branding/librewolf/wizWatermark.bmp | Bin 0 -> 154544 bytes .../docshell/base/nsAboutRedirector.cpp | 232 +++++++++++++++++++++ browser/source_files/mozconfig | 9 + browser/source_files/mozconfig-android | 0 38 files changed, 505 insertions(+) create mode 100644 browser/source_files/browser/branding/librewolf/background.png create mode 100644 browser/source_files/browser/branding/librewolf/bgstub.jpg create mode 100644 browser/source_files/browser/branding/librewolf/bgstub_2x.jpg create mode 100644 browser/source_files/browser/branding/librewolf/branding.nsi create mode 100644 browser/source_files/browser/branding/librewolf/configure.sh create mode 100644 browser/source_files/browser/branding/librewolf/content/about-background.png create mode 100644 browser/source_files/browser/branding/librewolf/content/about-logo.png create mode 100644 browser/source_files/browser/branding/librewolf/content/about-wordmark.svg create mode 100644 browser/source_files/browser/branding/librewolf/content/about.png create mode 100644 browser/source_files/browser/branding/librewolf/content/aboutDialog.css create mode 100644 browser/source_files/browser/branding/librewolf/content/horizontal-lockup.svg create mode 100644 browser/source_files/browser/branding/librewolf/content/identity-icons-brand.svg create mode 100644 browser/source_files/browser/branding/librewolf/content/jar.mn create mode 100644 browser/source_files/browser/branding/librewolf/content/moz.build create mode 100644 browser/source_files/browser/branding/librewolf/disk.icns create mode 100644 browser/source_files/browser/branding/librewolf/document.icns create mode 100644 browser/source_files/browser/branding/librewolf/document.ico create mode 100644 browser/source_files/browser/branding/librewolf/dsstore create mode 100644 browser/source_files/browser/branding/librewolf/firefox.VisualElementsManifest.xml create mode 100644 browser/source_files/browser/branding/librewolf/firefox.icns create mode 100644 browser/source_files/browser/branding/librewolf/firefox.ico create mode 100644 browser/source_files/browser/branding/librewolf/firefox64.ico create mode 100644 browser/source_files/browser/branding/librewolf/locales/en-US/brand.dtd create mode 100644 browser/source_files/browser/branding/librewolf/locales/en-US/brand.ftl create mode 100644 browser/source_files/browser/branding/librewolf/locales/en-US/brand.properties create mode 100644 browser/source_files/browser/branding/librewolf/locales/jar.mn create mode 100644 browser/source_files/browser/branding/librewolf/locales/moz.build create mode 100644 browser/source_files/browser/branding/librewolf/moz.build create mode 100644 browser/source_files/browser/branding/librewolf/newtab.ico create mode 100644 browser/source_files/browser/branding/librewolf/newwindow.ico create mode 100644 browser/source_files/browser/branding/librewolf/pbmode.ico create mode 100644 browser/source_files/browser/branding/librewolf/pref/firefox-branding.js create mode 100644 browser/source_files/browser/branding/librewolf/wizHeader.bmp create mode 100644 browser/source_files/browser/branding/librewolf/wizHeaderRTL.bmp create mode 100644 browser/source_files/browser/branding/librewolf/wizWatermark.bmp create mode 100644 browser/source_files/docshell/base/nsAboutRedirector.cpp create mode 100644 browser/source_files/mozconfig create mode 100644 browser/source_files/mozconfig-android (limited to 'browser/source_files') diff --git a/browser/source_files/browser/branding/librewolf/background.png b/browser/source_files/browser/branding/librewolf/background.png new file mode 100644 index 0000000..1aa7a15 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/background.png differ diff --git a/browser/source_files/browser/branding/librewolf/bgstub.jpg b/browser/source_files/browser/branding/librewolf/bgstub.jpg new file mode 100644 index 0000000..79e381b Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/bgstub.jpg differ diff --git a/browser/source_files/browser/branding/librewolf/bgstub_2x.jpg b/browser/source_files/browser/branding/librewolf/bgstub_2x.jpg new file mode 100644 index 0000000..b971ce9 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/bgstub_2x.jpg differ diff --git a/browser/source_files/browser/branding/librewolf/branding.nsi b/browser/source_files/browser/branding/librewolf/branding.nsi new file mode 100644 index 0000000..36cc1d4 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/branding.nsi @@ -0,0 +1,50 @@ +# 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/. + +# NSIS branding defines for unofficial builds. +# The official release build branding.nsi is located in other-license/branding/firefox/ +# The nightly build branding.nsi is located in browser/installer/windows/nsis/ + +# BrandFullNameInternal is used for some registry and file system values +# instead of BrandFullName and typically should not be modified. +!define BrandFullNameInternal "LibreWolf" +!define BrandFullName "LibreWolf" +!define CompanyName "LibreWolf" +!define URLInfoAbout "https://www.libreWolf.gitlab.io" +!define HelpLink "https://github.com/LibreWolf-Browser" + +!define URLStubDownloadX86 "https://github.com/LibreWolf-Browser/LibreWolf/releases" +!define URLStubDownloadAMD64 "https://github.com/LibreWolf-Browser/LibreWolf/releases" +!define URLStubDownloadAArch64 "https://github.com/LibreWolf-Browser/LibreWolf/releases" +!define URLManualDownload "https://github.com/LibreWolf-Browser/LibreWolf/releases" +!define URLSystemRequirements "https://github.com/LibreWolf-Browser/LibreWolf" +!define Channel "unofficial" + +# The installer's certificate name and issuer expected by the stub installer +!define CertNameDownload "Mozilla Corporation" +!define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA" + +# Dialog units are used so the UI displays correctly with the system's DPI +# settings. +# The dialog units for the bitmap's dimensions should match exactly with the +# bitmap's width and height in pixels. +!define APPNAME_BMP_WIDTH_DU 159u +!define APPNAME_BMP_HEIGHT_DU 50u +!define INTRO_BLURB_WIDTH_DU "230u" +!define INTRO_BLURB_EDGE_DU "198u" +!define INTRO_BLURB_LTR_TOP_DU "16u" +!define INTRO_BLURB_RTL_TOP_DU "11u" +!define INSTALL_FOOTER_TOP_DU "-48u" + +# UI Colors that can be customized for each channel +!define FOOTER_CONTROL_TEXT_COLOR_NORMAL 0x000000 +!define FOOTER_CONTROL_TEXT_COLOR_FADED 0x999999 +!define FOOTER_BKGRD_COLOR 0xFFFFFF +!define INSTALL_FOOTER_TEXT_COLOR 0xFFFFFF +!define INTRO_BLURB_TEXT_COLOR 0xFFFFFF +!define INSTALL_BLURB_TEXT_COLOR 0xFFFFFF +!define INSTALL_PROGRESS_TEXT_COLOR_NORMAL 0xFFFFFF +!define COMMON_TEXT_COLOR_NORMAL 0xFFFFFF +!define COMMON_TEXT_COLOR_FADED 0xA1AAB3 +!define COMMON_BKGRD_COLOR 0x0F1B26 diff --git a/browser/source_files/browser/branding/librewolf/configure.sh b/browser/source_files/browser/branding/librewolf/configure.sh new file mode 100644 index 0000000..69a5b64 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/configure.sh @@ -0,0 +1,9 @@ +# 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/. + +MOZ_APP_NAME=librewolf +MOZ_APP_BASENAME="LibreWolf" +MOZ_APP_PROFILE=librewolf +MOZ_APP_VENDOR=LibreWolf + diff --git a/browser/source_files/browser/branding/librewolf/content/about-background.png b/browser/source_files/browser/branding/librewolf/content/about-background.png new file mode 100644 index 0000000..9d2aa7d Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/content/about-background.png differ diff --git a/browser/source_files/browser/branding/librewolf/content/about-logo.png b/browser/source_files/browser/branding/librewolf/content/about-logo.png new file mode 100644 index 0000000..3da143e Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/content/about-logo.png differ diff --git a/browser/source_files/browser/branding/librewolf/content/about-wordmark.svg b/browser/source_files/browser/branding/librewolf/content/about-wordmark.svg new file mode 100644 index 0000000..60b278d --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/content/about-wordmark.svg @@ -0,0 +1,22 @@ + + + + + diff --git a/browser/source_files/browser/branding/librewolf/content/about.png b/browser/source_files/browser/branding/librewolf/content/about.png new file mode 100644 index 0000000..58f4928 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/content/about.png differ diff --git a/browser/source_files/browser/branding/librewolf/content/aboutDialog.css b/browser/source_files/browser/branding/librewolf/content/aboutDialog.css new file mode 100644 index 0000000..e6a1d9e --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/content/aboutDialog.css @@ -0,0 +1,25 @@ +/* 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/. */ + +#aboutDialogContainer { + background-image: url("chrome://branding/content/about-background.png"); + background-repeat: no-repeat; + background-color: #00acff; + color: #fff; +} + +.text-link { + color: #fff !important; + text-decoration: underline; +} + +#rightBox { + /* this margin prevents text from overlapping the planet image */ + margin-left: 280px; + margin-right: 20px; +} + +#bottomBox { + background-color: rgba(0,0,0,.7); +} diff --git a/browser/source_files/browser/branding/librewolf/content/horizontal-lockup.svg b/browser/source_files/browser/branding/librewolf/content/horizontal-lockup.svg new file mode 100644 index 0000000..07dc4e0 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/content/horizontal-lockup.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/browser/source_files/browser/branding/librewolf/content/identity-icons-brand.svg b/browser/source_files/browser/branding/librewolf/content/identity-icons-brand.svg new file mode 100644 index 0000000..6c33113 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/content/identity-icons-brand.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/browser/source_files/browser/branding/librewolf/content/jar.mn b/browser/source_files/browser/branding/librewolf/content/jar.mn new file mode 100644 index 0000000..acb0c10 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/content/jar.mn @@ -0,0 +1,18 @@ +# 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/. + +browser.jar: +% content branding %content/branding/ contentaccessible=yes + content/branding/about.png + content/branding/about-background.png + content/branding/about-logo.png + content/branding/about-wordmark.svg + content/branding/icon16.png (../default16.png) + content/branding/icon32.png (../default32.png) + content/branding/icon48.png (../default48.png) + content/branding/icon64.png (../default64.png) + content/branding/icon128.png (../default128.png) + content/branding/identity-icons-brand.svg + content/branding/aboutDialog.css + content/branding/horizontal-lockup.svg diff --git a/browser/source_files/browser/branding/librewolf/content/moz.build b/browser/source_files/browser/branding/librewolf/content/moz.build new file mode 100644 index 0000000..eb4454d --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/content/moz.build @@ -0,0 +1,7 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/browser/source_files/browser/branding/librewolf/disk.icns b/browser/source_files/browser/branding/librewolf/disk.icns new file mode 100644 index 0000000..718f1a3 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/disk.icns differ diff --git a/browser/source_files/browser/branding/librewolf/document.icns b/browser/source_files/browser/branding/librewolf/document.icns new file mode 100644 index 0000000..ff419f2 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/document.icns differ diff --git a/browser/source_files/browser/branding/librewolf/document.ico b/browser/source_files/browser/branding/librewolf/document.ico new file mode 100644 index 0000000..584a0a1 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/document.ico differ diff --git a/browser/source_files/browser/branding/librewolf/dsstore b/browser/source_files/browser/branding/librewolf/dsstore new file mode 100644 index 0000000..2d11482 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/dsstore differ diff --git a/browser/source_files/browser/branding/librewolf/firefox.VisualElementsManifest.xml b/browser/source_files/browser/branding/librewolf/firefox.VisualElementsManifest.xml new file mode 100644 index 0000000..7654e0a --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/firefox.VisualElementsManifest.xml @@ -0,0 +1,8 @@ + + + diff --git a/browser/source_files/browser/branding/librewolf/firefox.icns b/browser/source_files/browser/branding/librewolf/firefox.icns new file mode 100644 index 0000000..0c6941a Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/firefox.icns differ diff --git a/browser/source_files/browser/branding/librewolf/firefox.ico b/browser/source_files/browser/branding/librewolf/firefox.ico new file mode 100644 index 0000000..5217a6c Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/firefox.ico differ diff --git a/browser/source_files/browser/branding/librewolf/firefox64.ico b/browser/source_files/browser/branding/librewolf/firefox64.ico new file mode 100644 index 0000000..a684412 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/firefox64.ico differ diff --git a/browser/source_files/browser/branding/librewolf/locales/en-US/brand.dtd b/browser/source_files/browser/branding/librewolf/locales/en-US/brand.dtd new file mode 100644 index 0000000..8375aaa --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/locales/en-US/brand.dtd @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/browser/source_files/browser/branding/librewolf/locales/en-US/brand.ftl b/browser/source_files/browser/branding/librewolf/locales/en-US/brand.ftl new file mode 100644 index 0000000..9627fd6 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/locales/en-US/brand.ftl @@ -0,0 +1,22 @@ +# 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/. + +## Firefox Brand +## +## Firefox must be treated as a brand, and kept in English. +## It cannot be: +## - Declined to adapt to grammatical case. +## - Transliterated. +## - Translated. +## +## Reference: https://www.mozilla.org/styleguide/communications/translation/ + +-brand-shorter-name = LibreWolf +-brand-short-name = LibreWolf +-brand-full-name = LibreWolf +# This brand name can be used in messages where the product name needs to +# remain unchanged across different versions (Nightly, Beta, etc.). +-brand-product-name = LibreWolf +-vendor-short-name = LibreWolf +trademarkInfo = { " " } diff --git a/browser/source_files/browser/branding/librewolf/locales/en-US/brand.properties b/browser/source_files/browser/branding/librewolf/locales/en-US/brand.properties new file mode 100644 index 0000000..40c64c4 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/locales/en-US/brand.properties @@ -0,0 +1,14 @@ +# 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/. + +brandShorterName=LibreWolf +brandShortName=LibreWolf +brandFullName=LibreWolf +# LOCALIZATION NOTE(brandProductName): +# This brand name can be used in messages where the product name needs to +# remain unchanged across different versions (Nightly, Beta, etc.). +brandProductName=LibreWolf +vendorShortName=LibreWolf + +syncBrandShortName=LibreWolf Sync diff --git a/browser/source_files/browser/branding/librewolf/locales/jar.mn b/browser/source_files/browser/branding/librewolf/locales/jar.mn new file mode 100644 index 0000000..d007b20 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/locales/jar.mn @@ -0,0 +1,13 @@ +#filter substitution +# 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/. + +[localization] @AB_CD@.jar: + branding (en-US/**/*.ftl) + +@AB_CD@.jar: +% locale branding @AB_CD@ %locale/branding/ +# Unofficial branding only exists in en-US + locale/branding/brand.dtd (en-US/brand.dtd) + locale/branding/brand.properties (en-US/brand.properties) diff --git a/browser/source_files/browser/branding/librewolf/locales/moz.build b/browser/source_files/browser/branding/librewolf/locales/moz.build new file mode 100644 index 0000000..8bad131 --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/locales/moz.build @@ -0,0 +1,9 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID'] + +JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file diff --git a/browser/source_files/browser/branding/librewolf/moz.build b/browser/source_files/browser/branding/librewolf/moz.build new file mode 100644 index 0000000..9045cee --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/moz.build @@ -0,0 +1,13 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +DIRS += ['content', 'locales'] + +DIST_SUBDIR = 'browser' +export('DIST_SUBDIR') + +include('../branding-common.mozbuild') +FirefoxBranding() diff --git a/browser/source_files/browser/branding/librewolf/newtab.ico b/browser/source_files/browser/branding/librewolf/newtab.ico new file mode 100644 index 0000000..a9b37c0 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/newtab.ico differ diff --git a/browser/source_files/browser/branding/librewolf/newwindow.ico b/browser/source_files/browser/branding/librewolf/newwindow.ico new file mode 100644 index 0000000..5537207 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/newwindow.ico differ diff --git a/browser/source_files/browser/branding/librewolf/pbmode.ico b/browser/source_files/browser/branding/librewolf/pbmode.ico new file mode 100644 index 0000000..47677c1 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/pbmode.ico differ diff --git a/browser/source_files/browser/branding/librewolf/pref/firefox-branding.js b/browser/source_files/browser/branding/librewolf/pref/firefox-branding.js new file mode 100644 index 0000000..a4e8cfd --- /dev/null +++ b/browser/source_files/browser/branding/librewolf/pref/firefox-branding.js @@ -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/. */ + +//---------------------- Updates --------------------------------------------- +// URL user can browse to manually if for some reason all update installation attempts fail. +pref("app.update.url.manual", "https://github.com/librewolf-browser"); + +// A default value for the "More information about this update" link supplied in +//the "An update is available" page of the update wizard. +pref("app.update.url.details", "https://github.com/librewolf-browser"); + +// The time interval between checks for a new version (in seconds) +pref("app.update.interval", 86400); // 24 hours + +// Give the user x seconds to react before showing the big UI. +pref("app.update.promptWaitTime", 86400); // 24 hours + +// The number of days a binary is permitted to be old without checking for an update. +// This assumes that app.update.checkInstallTime is true. +pref("app.update.checkInstallTime.days", 2); + +// Give the user x seconds to reboot before showing a badge on the hamburger +// button. default=immediately +pref("app.update.badgeWaitTime", 0); + +// Number of usages of the web console or scratchpad. +// If this is less than 5, then pasting code into the web console or scratchpad is disabled +pref("devtools.selfxss.count", 5); diff --git a/browser/source_files/browser/branding/librewolf/wizHeader.bmp b/browser/source_files/browser/branding/librewolf/wizHeader.bmp new file mode 100644 index 0000000..f67b452 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/wizHeader.bmp differ diff --git a/browser/source_files/browser/branding/librewolf/wizHeaderRTL.bmp b/browser/source_files/browser/branding/librewolf/wizHeaderRTL.bmp new file mode 100644 index 0000000..7c57e46 Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/wizHeaderRTL.bmp differ diff --git a/browser/source_files/browser/branding/librewolf/wizWatermark.bmp b/browser/source_files/browser/branding/librewolf/wizWatermark.bmp new file mode 100644 index 0000000..05f0e7f Binary files /dev/null and b/browser/source_files/browser/branding/librewolf/wizWatermark.bmp differ diff --git a/browser/source_files/docshell/base/nsAboutRedirector.cpp b/browser/source_files/docshell/base/nsAboutRedirector.cpp new file mode 100644 index 0000000..32b7363 --- /dev/null +++ b/browser/source_files/docshell/base/nsAboutRedirector.cpp @@ -0,0 +1,232 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* 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/. */ + +#include "nsAboutRedirector.h" +#include "nsNetUtil.h" +#include "nsAboutProtocolUtils.h" +#include "nsBaseChannel.h" +#include "mozilla/ArrayUtils.h" +#include "nsIProtocolHandler.h" + +#if defined(MOZ_WIDGET_ANDROID) && defined(RELEASE_OR_BETA) +# define ABOUT_CONFIG_BLOCKED_GV +#endif + +#ifdef ABOUT_CONFIG_BLOCKED_GV +# include "mozilla/jni/Utils.h" // for mozilla::jni::IsFennec() +#endif + +NS_IMPL_ISUPPORTS(nsAboutRedirector, nsIAboutModule) + +struct RedirEntry { + const char* id; + const char* url; + uint32_t flags; +}; + +class CrashChannel final : public nsBaseChannel { + public: + explicit CrashChannel(nsIURI* aURI) { SetURI(aURI); } + + nsresult OpenContentStream(bool async, nsIInputStream** stream, + nsIChannel** channel) override { + nsAutoCString spec; + mURI->GetSpec(spec); + + if (spec.EqualsASCII("about:crashparent") && XRE_IsParentProcess()) { + MOZ_CRASH("Crash via about:crashparent"); + } + + if (spec.EqualsASCII("about:crashcontent") && XRE_IsContentProcess()) { + MOZ_CRASH("Crash via about:crashcontent"); + } + + NS_WARNING("Unhandled about:crash* URI or wrong process"); + return NS_ERROR_NOT_IMPLEMENTED; + } + + protected: + virtual ~CrashChannel() = default; +}; + +/* + Entries which do not have URI_SAFE_FOR_UNTRUSTED_CONTENT will run with chrome + privileges. This is potentially dangerous. Please use + URI_SAFE_FOR_UNTRUSTED_CONTENT in the third argument to each map item below + unless your about: page really needs chrome privileges. Security review is + required before adding new map entries without + URI_SAFE_FOR_UNTRUSTED_CONTENT. + + URI_SAFE_FOR_UNTRUSTED_CONTENT is not enough to let web pages load that page, + for that you need MAKE_LINKABLE. + */ +static const RedirEntry kRedirMap[] = { + {"about", "chrome://global/content/aboutAbout.xhtml", 0}, + {"addons", "chrome://mozapps/content/extensions/extensions.xul", + nsIAboutModule::ALLOW_SCRIPT}, + {"library", "chrome://browser/content/places/places.xul", + nsIAboutModule::ALLOW_SCRIPT}, + {"buildconfig", "chrome://global/content/buildconfig.html", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT}, + {"checkerboard", "chrome://global/content/aboutCheckerboard.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::ALLOW_SCRIPT}, + {"config", "chrome://global/content/config.xul", 0}, +#ifdef MOZ_CRASHREPORTER + {"crashes", "chrome://global/content/crashes.xhtml", 0}, +#endif + {"credits", "https://www.mozilla.org/credits/", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT}, + {"license", "chrome://global/content/license.html", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::MAKE_LINKABLE}, + {"logo", "chrome://branding/content/about.png", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + // Linkable for testing reasons. + nsIAboutModule::MAKE_LINKABLE}, + {"memory", "chrome://global/content/aboutMemory.xhtml", + nsIAboutModule::ALLOW_SCRIPT}, + {"mozilla", "chrome://global/content/mozilla.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT}, + {"neterror", "chrome://global/content/netError.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::URI_CAN_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT}, + {"networking", "chrome://global/content/aboutNetworking.xhtml", + nsIAboutModule::ALLOW_SCRIPT}, + {"performance", "chrome://global/content/aboutPerformance.xhtml", + nsIAboutModule::ALLOW_SCRIPT}, + {"plugins", "chrome://global/content/plugins.html", + nsIAboutModule::URI_MUST_LOAD_IN_CHILD}, + {"serviceworkers", "chrome://global/content/aboutServiceWorkers.xhtml", + nsIAboutModule::URI_CAN_LOAD_IN_CHILD | + nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT}, +#ifndef ANDROID + {"profiles", "chrome://global/content/aboutProfiles.xhtml", + nsIAboutModule::ALLOW_SCRIPT}, +#endif + // about:srcdoc is unresolvable by specification. It is included here + // because the security manager would disallow srcdoc iframes otherwise. + {"srcdoc", "about:blank", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT | + // Needs to be linkable so content can touch its own srcdoc frames + nsIAboutModule::MAKE_LINKABLE | nsIAboutModule::URI_CAN_LOAD_IN_CHILD}, + {"support", "chrome://global/content/aboutSupport.xhtml", + nsIAboutModule::ALLOW_SCRIPT}, + {"telemetry", "chrome://global/content/aboutTelemetry.xhtml", + nsIAboutModule::ALLOW_SCRIPT}, + {"url-classifier", "chrome://global/content/aboutUrlClassifier.xhtml", + nsIAboutModule::ALLOW_SCRIPT}, + {"webrtc", "chrome://global/content/aboutwebrtc/aboutWebrtc.html", + nsIAboutModule::ALLOW_SCRIPT}, + {"printpreview", "about:blank", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::HIDE_FROM_ABOUTABOUT | + nsIAboutModule::URI_CAN_LOAD_IN_CHILD}, + {"crashparent", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT}, + {"crashcontent", "about:blank", + nsIAboutModule::HIDE_FROM_ABOUTABOUT | + nsIAboutModule::URI_CAN_LOAD_IN_CHILD | + nsIAboutModule::URI_MUST_LOAD_IN_CHILD}}; +static const int kRedirTotal = mozilla::ArrayLength(kRedirMap); + +NS_IMETHODIMP +nsAboutRedirector::NewChannel(nsIURI* aURI, nsILoadInfo* aLoadInfo, + nsIChannel** aResult) { + NS_ENSURE_ARG_POINTER(aURI); + NS_ENSURE_ARG_POINTER(aLoadInfo); + NS_ASSERTION(aResult, "must not be null"); + + nsAutoCString path; + nsresult rv = NS_GetAboutModuleName(aURI, path); + NS_ENSURE_SUCCESS(rv, rv); + + nsCOMPtr ioService = do_GetIOService(&rv); + NS_ENSURE_SUCCESS(rv, rv); + + if (path.EqualsASCII("crashparent") || path.EqualsASCII("crashcontent")) { + bool isExternal; + aLoadInfo->GetLoadTriggeredFromExternal(&isExternal); + if (isExternal) { + return NS_ERROR_NOT_AVAILABLE; + } + + nsCOMPtr channel = new CrashChannel(aURI); + channel->SetLoadInfo(aLoadInfo); + channel.forget(aResult); + return NS_OK; + } + +#ifdef ABOUT_CONFIG_BLOCKED_GV + // We don't want to allow access to about:config from + // GeckoView on release or beta, but it's fine for Fennec. + if (path.EqualsASCII("config") && !mozilla::jni::IsFennec()) { + return NS_ERROR_NOT_AVAILABLE; + } +#endif + + for (int i = 0; i < kRedirTotal; i++) { + if (!strcmp(path.get(), kRedirMap[i].id)) { + nsCOMPtr tempChannel; + nsCOMPtr tempURI; + rv = NS_NewURI(getter_AddRefs(tempURI), kRedirMap[i].url); + NS_ENSURE_SUCCESS(rv, rv); + + rv = NS_NewChannelInternal(getter_AddRefs(tempChannel), tempURI, + aLoadInfo); + NS_ENSURE_SUCCESS(rv, rv); + + // If tempURI links to an external URI (i.e. something other than + // chrome:// or resource://) then set result principal URI on the + // load info which forces the channel principal to reflect the displayed + // URL rather then being the systemPrincipal. + bool isUIResource = false; + rv = NS_URIChainHasFlags(tempURI, nsIProtocolHandler::URI_IS_UI_RESOURCE, + &isUIResource); + NS_ENSURE_SUCCESS(rv, rv); + + bool isAboutBlank = NS_IsAboutBlank(tempURI); + + if (!isUIResource && !isAboutBlank) { + aLoadInfo->SetResultPrincipalURI(tempURI); + } + + tempChannel->SetOriginalURI(aURI); + + tempChannel.forget(aResult); + return rv; + } + } + + NS_ERROR("nsAboutRedirector called for unknown case"); + return NS_ERROR_ILLEGAL_VALUE; +} + +NS_IMETHODIMP +nsAboutRedirector::GetURIFlags(nsIURI* aURI, uint32_t* aResult) { + NS_ENSURE_ARG_POINTER(aURI); + + nsAutoCString name; + nsresult rv = NS_GetAboutModuleName(aURI, name); + NS_ENSURE_SUCCESS(rv, rv); + + for (int i = 0; i < kRedirTotal; i++) { + if (name.EqualsASCII(kRedirMap[i].id)) { + *aResult = kRedirMap[i].flags; + return NS_OK; + } + } + + NS_ERROR("nsAboutRedirector called for unknown case"); + return NS_ERROR_ILLEGAL_VALUE; +} + +nsresult nsAboutRedirector::Create(nsISupports* aOuter, REFNSIID aIID, + void** aResult) { + RefPtr about = new nsAboutRedirector(); + return about->QueryInterface(aIID, aResult); +} diff --git a/browser/source_files/mozconfig b/browser/source_files/mozconfig new file mode 100644 index 0000000..a79ddd8 --- /dev/null +++ b/browser/source_files/mozconfig @@ -0,0 +1,9 @@ +# This is for the desktop version of librewolf +ac_add_options --enable-application=browser + +# Folder to output the build files: +mk_add_options MOZ_OBJDIR=./obj_BUILD_OUTPUT + +# Setting the branding options +ac_add_options --with-branding=browser/branding/librewolf +ac_add_options --with-distribution-id=io.github.librewolf diff --git a/browser/source_files/mozconfig-android b/browser/source_files/mozconfig-android new file mode 100644 index 0000000..e69de29 -- cgit