diff --git a/.gitignore b/.gitignore index bd637ad..241f013 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,248 @@ /icecat-52.7.0-gnu1.tar.bz2 /icecat-52.7.2-gnu1.tar.bz2 /icecat-52.7.3-gnu1.tar.bz2 +/icecat-52.8.0-gnu1.tar.bz2 +/icecat-52.8.0-gnu1-clean.tar.bz2 +/icecat-52.8.0-gnu2.tar.bz2 +/icecat-52.8.1-gnu1.tar.bz2 +/icecat-52.9.0-gnu1.tar.bz2 +/icecat-60.2.0-gnu1.tar.bz2 +/icecat-60.2.0-langpacks.tar.gz +/icecat-60.2.1-gnu1.tar.bz2 +/icecat-60.2.2-gnu1.tar.bz2 +/icecat-60.3.0-gnu1.tar.bz2 +/icecat-60.4.0-gnu1.tar.bz2 +/icecat-60.5.0-gnu1.tar.bz2 +/icecat-60.5.1-gnu1.tar.bz2 +/icecat-60.5.2-gnu1.tar.bz2 +/icecat-60.6.0-gnu1.tar.bz2 +/icecat-60.6.0-langpacks.tar.gz +/icecat-60.6.1-gnu1.tar.bz2 +/icecat-60.6.1-langpacks.tar.gz +/icecat-60.6.1-gnu2.tar.bz2 +/icecat-60.6.2-gnu1.tar.bz2 +/icecat-60.6.3-gnu1.tar.bz2 +/icecat-60.6.3-langpacks.tar.gz +/icecat-60.6.3-gnu2.tar.bz2 +/icecat-60.7.0-gnu1.tar.bz2 +/icecat-60.7.0-langpacks.tar.gz +/icecat-60.7.0-gnu2.tar.bz2 +/icecat-60.7.1-gnu1.tar.bz2 +/icecat-60.7.1-langpacks.tar.gz +/icecat-60.7.2-gnu1.tar.bz2 +/icecat-60.7.2-langpacks.tar.gz +/icecat-60.8.0-gnu1.tar.bz2 +/icecat-60.8.0-langpacks.tar.gz +/cbindgen-vendor.tar.xz +/icecat-68.0.2-gnu1.tar.bz2 +/icecat-68.0.2-langpacks.tar.gz +/icecat-68.0.2-gnu2.tar.bz2 +/icecat-68.0.2-gnu3.tar.bz2 +/icecat-68.1.0-gnu1.tar.bz2 +/icecat-68.1.0-langpacks.tar.gz +/icecat-68.2.0-gnu1.tar.bz2 +/icecat-68.2.0-langpacks.tar.gz +/icecat-68.2.0-gnu2.tar.bz2 +/icecat-68.3.0-gnu1.tar.bz2 +/icecat-68.3.0-langpacks.tar.gz +/icecat-68.4.0-gnu1.tar.bz2 +/icecat-68.4.0-rh1.tar.bz2 +/icecat-68.4.0-langpacks.tar.gz +/icecat-68.4.0-rh2.tar.bz2 +/icecat-68.4.1-langpacks.tar.gz +/icecat-68.4.1-rh1.tar.bz2 +/icecat-68.5.0-langpacks.tar.gz +/icecat-68.5.0-rh1.tar.bz2 +/icecat-68.6.0-rh1.tar.bz2 +/icecat-68.6.0-langpacks.tar.gz +/icecat-68.6.0-rh2.tar.bz2 +/icecat-68.6.0-rh3.tar.bz2 +/icecat-68.6.0-rh4.tar.bz2 +/icecat-68.7.0-langpacks.tar.gz +/icecat-68.7.0-rh1.tar.bz2 +/icecat.png +/icecat-68.8.0-langpacks.tar.gz +/icecat-68.8.0-rh1.tar.bz2 +/icecat-68.9.0-rh1.tar.bz2 +/icecat-68.9.0-rh2.tar.bz2 +/icecat-68.9.0-langpacks.tar.gz +/icecat-78.0-langpacks.tar.gz +/icecat-78.0-rh1.tar.bz2 +/icecat-78.0.1-langpacks.tar.gz +/icecat-78.0.1-rh1.tar.bz2 +/icecat-78.2.0-rh1.tar.bz2 +/icecat-78.2.0-langpacks.tar.gz +/icecat-78.2.0-rh2.tar.bz2 +/icecat-78.2.0-rh3.tar.bz2 +/icecat-78.2.0-rh4.tar.bz2 +/icecat-78.2.0-rh5.tar.bz2 +/icecat-78.2.0-rh6.tar.bz2 +/icecat-78.3.0-langpacks.tar.gz +/icecat-78.3.0-rh1.tar.bz2 +/icecat-78.3.1-langpacks.tar.gz +/icecat-78.3.1-rh1.tar.bz2 +/icecat-78.4.0-langpacks.tar.gz +/icecat-78.4.0-rh1.tar.bz2 +/icecat-78.5.0-langpacks.tar.gz +/icecat-78.5.0-rh1.tar.bz2 +/icecat-78.5.0-rh2.tar.bz2 +/icecat-78.6.0-langpacks.tar.gz +/icecat-78.6.0-rh1.tar.bz2 +/icecat-78.6.1-langpacks.tar.gz +/icecat-78.6.1-rh1.tar.bz2 +/icecat-78.7.0-langpacks.tar.gz +/icecat-78.7.0-rh1.tar.bz2 +/icecat-78.7.0-rh2.tar.bz2 +/icecat-78.7.1-langpacks.tar.gz +/icecat-78.7.1-rh1.tar.bz2 +/icecat-78.8.0-langpacks.tar.gz +/icecat-78.8.0-rh1.tar.bz2 +/icecat-78.9.0-langpacks.tar.gz +/icecat-78.9.0-rh1.tar.bz2 +/icecat-78.10.0-langpacks.tar.gz +/icecat-78.10.0-rh1.tar.bz2 +/icecat-78.10.1-langpacks.tar.gz +/icecat-78.10.1-rh1.tar.bz2 +/icecat-78.11.0-langpacks.tar.gz +/icecat-78.11.0-rh1.tar.bz2 +/icecat-78.12.0-langpacks.tar.gz +/icecat-78.12.0-rh1.tar.bz2 +/icecat-78.12.0-rh2.tar.bz2 +/icecat-78.13.0-rh1.tar.bz2 +/icecat-78.13.0-rh2.tar.bz2 +/icecat-78.13.0-langpacks.tar.gz +/icecat-78.13.0-rh3.tar.bz2 +/icecat-78.14.0-langpacks.tar.gz +/icecat-78.14.0-rh1.tar.bz2 +/icecat-78.15.0-langpacks.tar.gz +/icecat-78.15.0-rh1.tar.bz2 +/icecat-91.2.0-langpacks.tar.gz +/icecat-91.2.0-rh1.tar.bz2 +/icecat-91.3.0-langpacks.tar.gz +/icecat-91.3.0-rh1.tar.bz2 +/icecat-91.4.0-langpacks.tar.gz +/icecat-91.4.0-rh1.tar.bz2 +/icecat-91.4.1-langpacks.tar.gz +/icecat-91.4.1-rh1.tar.bz2 +/icecat-91.5.0-langpacks.tar.gz +/icecat-91.5.0-rh1.tar.bz2 +/icecat-91.6.0-langpacks.tar.gz +/icecat-91.6.0-rh1.tar.bz2 +/icecat-91.6.1-langpacks.tar.gz +/icecat-91.6.1-rh1.tar.bz2 +/icecat-91.7.0-langpacks.tar.gz +/icecat-91.7.0-rh1.tar.bz2 +/icecat-91.7.1-langpacks.tar.gz +/icecat-91.7.1-rh1.tar.bz2 +/icecat-91.8.0-langpacks.tar.gz +/icecat-91.8.0-rh1.tar.bz2 +/icecat-91.9.0-langpacks.tar.gz +/icecat-91.9.0-rh1.tar.bz2 +/icecat-91.9.1-langpacks.tar.gz +/icecat-91.9.1-rh1.tar.bz2 +/icecat-91.10.0-langpacks.tar.gz +/icecat-91.10.0-rh1.tar.bz2 +/icecat-91.10.0-rh2.tar.bz2 +/icecat-91.10.0-rh3.tar.bz2 +/icecat-91.11.0-langpacks.tar.gz +/icecat-91.11.0-rh1.tar.bz2 +/icecat-91.12.0-langpacks.tar.gz +/icecat-91.12.0-rh1.tar.bz2 +/icecat-91.13.0-langpacks.tar.gz +/icecat-91.13.0-rh1.tar.bz2 +/icecat-102.2.0-langpacks.tar.gz +/icecat-102.2.0-rh1.tar.bz2 +/icecat-102.3.0-langpacks.tar.gz +/icecat-102.3.0-rh1.tar.bz2 +/icecat-102.4.0-langpacks.tar.gz +/icecat-102.4.0-rh1.tar.bz2 +/icecat-102.5.0-langpacks.tar.gz +/icecat-102.5.0-rh1.tar.bz2 +/icecat-102.6.0-langpacks.tar.gz +/icecat-102.6.0-rh1.tar.bz2 +/icecat-102.7.0-langpacks.tar.gz +/icecat-102.7.0-rh1.tar.bz2 +/icecat-102.8.0-langpacks.tar.gz +/icecat-102.8.0-rh1.tar.bz2 +/icecat-102.9.0-langpacks.tar.gz +/icecat-102.9.0-rh1.tar.bz2 +/icecat-102.10.0-langpacks.tar.gz +/icecat-102.10.0-rh1.tar.bz2 +/icecat-102.11.0-langpacks.tar.gz +/icecat-102.11.0-rh1.tar.bz2 +/icecat-102.11.0-rh2.tar.bz2 +/icecat-102.12.0-langpacks.tar.gz +/icecat-102.12.0-rh1.tar.bz2 +/icecat-102.13.0-langpacks.tar.gz +/icecat-102.13.0-rh1.tar.bz2 +/icecat-102.14.0-langpacks.tar.gz +/icecat-102.14.0-rh1.tar.bz2 +/icecat-102.15.0-langpacks.tar.gz +/icecat-102.15.0-rh1.tar.bz2 +/icecat-115.3.1-langpacks.tar.gz +/icecat-115.3.1-rh1.tar.bz2 +/icecat-115.3.1-rh2.tar.bz2 +/icecat-115.4.0-langpacks.tar.gz +/icecat-115.4.0-rh1.tar.bz2 +/icecat-115.4.0-rh2.tar.bz2 +/icecat-115.5.0-langpacks.tar.gz +/icecat-115.5.0-rh1.tar.bz2 +/icecat-115.6.0-langpacks.tar.gz +/icecat-115.6.0-rh1.tar.bz2 +/icecat-115.7.0-langpacks.tar.gz +/icecat-115.7.0-rh1.tar.bz2 +/icecat-115.8.0-langpacks.tar.gz +/icecat-115.8.0-rh1.tar.bz2 +/icecat-115.9.0-langpacks.tar.gz +/icecat-115.9.0-rh1.tar.bz2 +/icecat-115.10.0-langpacks.tar.gz +/icecat-115.10.0-rh1.tar.bz2 +/icecat-115.11.0-langpacks.tar.gz +/icecat-115.11.0-rh1.tar.bz2 +/icecat-115.12.0-langpacks.tar.gz +/icecat-115.12.0-rh1.tar.bz2 +/icecat-115.13.0-langpacks.tar.gz +/icecat-115.13.0-rh1.tar.bz2 +/icecat-115.14.0-langpacks.tar.gz +/icecat-115.14.0-rh1.tar.bz2 +/icecat-115.15.0-langpacks.tar.gz +/icecat-115.15.0-rh1.tar.bz2 +/icecat-115.16.0-langpacks.tar.gz +/icecat-115.16.0-rh1.tar.bz2 +/icecat-115.16.1-langpacks.tar.gz +/icecat-115.16.1-rh1.tar.bz2 +/icecat-115.17.0-langpacks.tar.gz +/icecat-115.17.0-rh1.tar.bz2 +/icecat-115.18.0-langpacks.tar.gz +/icecat-115.18.0-rh1.tar.bz2 +/icecat-115.18.0-rh2.tar.bz2 +/icecat-115.19.0-langpacks.tar.gz +/icecat-115.19.0-rh1.tar.bz2 +/icecat-115.20.0-langpacks.tar.gz +/icecat-115.20.0-rh1.tar.bz2 +/icecat-115.21.0-langpacks.tar.gz +/icecat-115.21.0-rh1.tar.bz2 +/icecat-115.22.0-langpacks.tar.gz +/icecat-115.22.0-rh1.tar.bz2 +/icecat-115.23.0-langpacks.tar.gz +/icecat-115.23.0-rh1.tar.bz2 +/icecat-115.23.1-langpacks.tar.gz +/icecat-115.23.1-rh1.tar.bz2 +/icecat-115.24.0-langpacks.tar.gz +/icecat-115.24.0-rh1.tar.bz2 +/icecat-128.12.0-langpacks.tar.gz +/icecat-128.12.0-rh1.tar.bz2 +/icecat-128.13.0-langpacks.tar.gz +/icecat-128.13.0-rh1.tar.bz2 +/icecat-128.14.0-langpacks.tar.gz +/icecat-128.14.0-rh1.tar.bz2 +/icecat-140.3.0-langpacks.tar.gz +/icecat-140.3.0-rh1.tar.bz2 +/icecat-140.4.0-langpacks.tar.gz +/icecat-140.4.0-rh1.tar.bz2 +/icecat-140.5.0-langpacks.tar.gz +/icecat-140.5.0-rh1.tar.bz2 +/icecat-140.6.0-langpacks.tar.gz +/icecat-140.6.0-rh1.tar.bz2 +/icecat-140.7.0-langpacks.tar.gz +/icecat-140.7.0-rh1.tar.bz2 diff --git a/README.md b/README.md new file mode 100644 index 0000000..f490435 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +[GNU IceCat](https://www.gnu.org/software/gnuzilla/) is the GNU version of the Firefox ESR browser. +Extensions included to this version of IceCat: + + * LibreJS + + GNU LibreJS aims to address the JavaScript problem described in the article + "[The JavaScript Trap](https://www.gnu.org/philosophy/javascript-trap.html)" of Richard Stallman. + + + * JShelter + + Mitigates potential threats from JavaScript, including fingerprinting, + tracking, and data collection. Slightly modifies the results of API calls, + differently on different domains, so that the cross-site fingerprint is not + stable. Applies security counter-measures that are likely not to break web pages. + Allows fine-grained control over the restrictions and counter-measures applied + to each domain. + + + * A set of companion extensions for LibreJS by Nathan Nichols + are pre-installed, and provide workarounds to use some services at USPS, + RSF.org, SumOfUs.org, pay.gov, McDonalds, goteo.org and Google Docs + without using nonfree JavaScript. + + + * A series of configuration changes and tweaks were applied to ensure that + IceCat does not initiate network connections that the user has not explicitly + requested. This implies not downloading feeds, updates, blacklists or any + other similar data needed during startup. + + +Origin of the name + +The name “IceCat” was coined to show our relationship to the Mozilla Firefox browser. Ice isn't Fire and a Cat isn't a Fox, so it is clearly a different package (we don't want Mozilla blamed for our mistakes, nor cause confusion with their trademarks), but is equally clearly intimately related (of course nearly all of the work comes from the Mozilla foundation effort, so we want to give credit). + +The gNewSense BurningDog browser and the Debian IceWeasel browser are similarly derived from Firefox, also with the intent of being free software. Technically, however, these projects are maintained entirely independently of IceCat. (Previously, this GNU browser project was also named IceWeasel, but that proved confusing.) +About GNU and the GNU Philosophy + +The [GNU Project](https://www.gnu.org/) was launched in 1984 to develop a complete Unix-like operating system which is [free software—free as in freedom, not price](https://www.gnu.org/philosophy/free-sw.html). Its principal sponsor is the [Free Software Foundation](https://www.fsf.org/). + +The [free software philosophy](https://www.gnu.org/philosophy/philosophy.html) is the root and motivation of the guidelines and goals of the whole free software movement, a worldwide community. diff --git a/build-icu-big-endian.patch b/build-icu-big-endian.patch deleted file mode 100644 index 68fbea1..0000000 --- a/build-icu-big-endian.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-aurora/build/autoconf/icu.m4.icu-endian mozilla-aurora/build/autoconf/icu.m4 ---- mozilla-aurora/build/autoconf/icu.m4.icu-endian 2016-12-09 09:11:01.227317790 +0100 -+++ mozilla-aurora/build/autoconf/icu.m4 2016-12-09 09:18:40.608712247 +0100 -@@ -78,7 +78,7 @@ if test -n "$USE_ICU"; then - # TODO: the l is actually endian-dependent - # We could make this set as 'l' or 'b' for little or big, respectively, - # but we'd need to check in a big-endian version of the file. -- ICU_DATA_FILE="icudt${version}l.dat" -+ ICU_DATA_FILE="icudt${version}b.dat" - - dnl We won't build ICU data as a separate file when building - dnl JS standalone so that embedders don't have to deal with it. diff --git a/firefox-build-prbool.patch b/firefox-build-prbool.patch deleted file mode 100644 index f271631..0000000 --- a/firefox-build-prbool.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -up firefox-52.0/dom/u2f/U2F.cpp.prbool firefox-52.0/dom/u2f/U2F.cpp ---- firefox-52.0/dom/u2f/U2F.cpp.prbool 2017-03-03 13:42:22.613691228 +0100 -+++ firefox-52.0/dom/u2f/U2F.cpp 2017-03-03 13:48:20.864647727 +0100 -@@ -4,6 +4,7 @@ - * 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 "prtypes.h" - #include "hasht.h" - #include "mozilla/dom/CallbackFunction.h" - #include "mozilla/dom/ContentChild.h" -diff -up firefox-52.0/security/certverifier/CTLogVerifier.cpp.prbool firefox-52.0/security/certverifier/CTLogVerifier.cpp ---- firefox-52.0/security/certverifier/CTLogVerifier.cpp.prbool 2017-01-16 17:16:51.000000000 +0100 -+++ firefox-52.0/security/certverifier/CTLogVerifier.cpp 2017-03-03 13:42:22.613691228 +0100 -@@ -7,6 +7,7 @@ - #include "CTLogVerifier.h" - - #include "CTSerialization.h" -+#include "prtypes.h" - #include "hasht.h" - #include "mozilla/ArrayUtils.h" - #include "mozilla/Assertions.h" -diff -up firefox-52.0/security/certverifier/CTObjectsExtractor.cpp.prbool firefox-52.0/security/certverifier/CTObjectsExtractor.cpp ---- firefox-52.0/security/certverifier/CTObjectsExtractor.cpp.prbool 2017-01-16 17:16:51.000000000 +0100 -+++ firefox-52.0/security/certverifier/CTObjectsExtractor.cpp 2017-03-03 13:42:22.613691228 +0100 -@@ -6,6 +6,7 @@ - - #include "CTObjectsExtractor.h" - -+#include "prtypes.h" - #include "hasht.h" - #include "mozilla/Assertions.h" - #include "mozilla/Casting.h" -diff -up firefox-52.0/security/certverifier/OCSPCache.h.prbool firefox-52.0/security/certverifier/OCSPCache.h ---- firefox-52.0/security/certverifier/OCSPCache.h.prbool 2017-02-27 17:11:06.000000000 +0100 -+++ firefox-52.0/security/certverifier/OCSPCache.h 2017-03-03 13:42:22.613691228 +0100 -@@ -25,6 +25,7 @@ - #ifndef mozilla_psm_OCSPCache_h - #define mozilla_psm_OCSPCache_h - -+#include "prtypes.h" - #include "hasht.h" - #include "mozilla/Mutex.h" - #include "mozilla/Vector.h" diff --git a/firefox-fedora-ua.patch b/firefox-fedora-ua.patch deleted file mode 100644 index a5b7866..0000000 --- a/firefox-fedora-ua.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up firefox-35.0.1/mozilla-release/media/webrtc/trunk/Makefile.old firefox-35.0.1/mozilla-release/media/webrtc/trunk/Makefile -diff -up firefox-35.0.1/mozilla-release/netwerk/protocol/http/nsHttpHandler.cpp.old firefox-35.0.1/mozilla-release/netwerk/protocol/http/nsHttpHandler.cpp ---- firefox-35.0.1/mozilla-release/netwerk/protocol/http/nsHttpHandler.cpp.old 2015-01-23 07:00:06.000000000 +0100 -+++ firefox-35.0.1/mozilla-release/netwerk/protocol/http/nsHttpHandler.cpp 2015-02-09 16:40:42.983220596 +0100 -@@ -607,7 +607,7 @@ nsHttpHandler::BuildUserAgent() - mUserAgent.SetCapacity(mLegacyAppName.Length() + - mLegacyAppVersion.Length() + - #ifndef UA_SPARE_PLATFORM -- mPlatform.Length() + -+ mPlatform.Length() + 8 + - #endif - mOscpu.Length() + - mMisc.Length() + -@@ -631,6 +631,7 @@ nsHttpHandler::BuildUserAgent() - if (!mPlatform.IsEmpty()) { - mUserAgent += mPlatform; - mUserAgent.AppendLiteral("; "); -+ mUserAgent.AppendLiteral("Fedora; "); - } - #endif - if (!mCompatDevice.IsEmpty()) { diff --git a/firefox-install-dir.patch b/firefox-install-dir.patch deleted file mode 100644 index 646e0c9..0000000 --- a/firefox-install-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-45.0/firefox-45.0/config/baseconfig.mk.orig firefox-45.0/firefox-45.0/config/baseconfig.mk ---- firefox-45.0/config/baseconfig.mk.orig 2016-03-02 13:26:31.981927073 +0100 -+++ firefox-45.0/config/baseconfig.mk 2016-03-02 13:30:09.044756473 +0100 -@@ -4,7 +4,7 @@ - # whether a normal build is happening or whether the check is running. - includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) - sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - ifeq (.,$(DEPTH)) - DIST = dist diff --git a/firefox-nss-addon-hack.patch b/firefox-nss-addon-hack.patch new file mode 100644 index 0000000..0322707 --- /dev/null +++ b/firefox-nss-addon-hack.patch @@ -0,0 +1,19 @@ +diff -up firefox-84.0.2/security/certverifier/NSSCertDBTrustDomain.cpp.nss-hack firefox-84.0.2/security/certverifier/NSSCertDBTrustDomain.cpp +--- firefox-84.0.2/security/certverifier/NSSCertDBTrustDomain.cpp.nss-hack 2021-01-11 12:12:02.585514543 +0100 ++++ firefox-84.0.2/security/certverifier/NSSCertDBTrustDomain.cpp 2021-01-11 12:47:50.345984582 +0100 +@@ -1619,6 +1619,15 @@ SECStatus InitializeNSS(const nsACString + return srv; + } + ++ /* Sets the NSS_USE_ALG_IN_ANY_SIGNATURE bit. ++ * does not change NSS_USE_ALG_IN_CERT_SIGNATURE, ++ * so policy will still disable use of sha1 in ++ * certificate related signature processing. */ ++ srv = NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_ANY_SIGNATURE, 0); ++ if (srv != SECSuccess) { ++ NS_WARNING("Unable to use SHA1 for Add-ons, expect broken/disabled Add-ons. See https://bugzilla.redhat.com/show_bug.cgi?id=1908018 for details."); ++ } ++ + if (nssDbConfig == NSSDBConfig::ReadWrite) { + UniquePK11SlotInfo slot(PK11_GetInternalKeySlot()); + if (!slot) { diff --git a/icecat-GLIBCXX-fix-for-GCC-12.patch b/icecat-GLIBCXX-fix-for-GCC-12.patch new file mode 100644 index 0000000..8fdc264 --- /dev/null +++ b/icecat-GLIBCXX-fix-for-GCC-12.patch @@ -0,0 +1,45 @@ +From efd5bc0715e5477318be95a76811cda0a89e8289 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= +Date: Fri, 4 Mar 2022 12:00:26 +0100 +Subject: [PATCH] GLIBCXX fix for GCC 12? + +--- + build/unix/stdc++compat/stdc++compat.cpp | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/stdc++compat.cpp +index 0180f6bcfa998..8d7a542ff11f0 100644 +--- a/build/unix/stdc++compat/stdc++compat.cpp ++++ b/build/unix/stdc++compat/stdc++compat.cpp +@@ -24,6 +24,7 @@ + GLIBCXX_3.4.27 is from gcc 10 + GLIBCXX_3.4.28 is from gcc 10 + GLIBCXX_3.4.29 is from gcc 11 ++ GLIBCXX_3.4.30 is from gcc 12 + + This file adds the necessary compatibility tricks to avoid symbols with + version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with +@@ -69,6 +70,19 @@ void __attribute__((weak)) __throw_bad_array_new_length() { MOZ_CRASH(); } + } // namespace std + #endif + ++#if _GLIBCXX_RELEASE >= 12 ++namespace std { ++ ++/* This avoids the GLIBCXX_3.4.30 symbol version. */ ++void __attribute__((weak)) ++__glibcxx_assert_fail(const char* __file, int __line, const char* __function, ++ const char* __condition) { ++ MOZ_CRASH(); ++} ++ ++} // namespace std ++#endif ++ + /* While we generally don't build with exceptions, we have some host tools + * that do use them. libstdc++ from GCC 5.0 added exception constructors with + * char const* argument. Older versions only have a constructor with +-- +2.35.1 + + diff --git a/icecat-fix_installer.patch b/icecat-fix_installer.patch deleted file mode 100644 index 80a5060..0000000 --- a/icecat-fix_installer.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- browser/installer/package-manifest.orig.in 2017-03-24 21:09:39.027022000 +0100 -+++ browser/installer/package-manifest.in 2017-03-24 23:07:21.881504771 +0100 -@@ -74,9 +74,9 @@ - #endif - #ifndef MOZ_SYSTEM_NSPR - #ifndef MOZ_FOLD_LIBS --@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ --@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@ --@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@ - #endif - #endif - #ifdef XP_MACOSX -@@ -622,9 +622,9 @@ - @RESPATH@/chrome/recording.manifest - @RESPATH@/chrome/recording/* - #ifdef MOZ_GTK --@RESPATH@/browser/chrome/icons/default/default16.png --@RESPATH@/browser/chrome/icons/default/default32.png --@RESPATH@/browser/chrome/icons/default/default48.png -+#@RESPATH@/browser/branding/official/default16.png -+#@RESPATH@/browser/branding/official/default32.png -+#@RESPATH@/browser/branding/official/default48.png - #endif - @RESPATH@/browser/features/* - -@@ -642,7 +642,7 @@ - #ifdef XP_UNIX - #ifndef XP_MACOSX - ; shell icons --@RESPATH@/browser/icons/*.png -+#@RESPATH@/browser/icons/*.png - #ifdef MOZ_UPDATER - ; updater icon - @RESPATH@/icons/updater.png ---- browser/installer/allowed-dupes.orig.mn 2017-03-19 19:59:09.000000000 +0100 -+++ browser/installer/allowed-dupes.mn 2017-03-24 23:15:37.026964374 +0100 -@@ -110,6 +110,37 @@ - browser/features/flyweb@mozilla.org/chrome/skin/windows/icon-64-anchored.png - browser/features/flyweb@mozilla.org/chrome/skin/windows/icon-64.png - browser/icons/mozicon128.png -+# -+browser/extensions/abouticecat@gnu.org/defaults/preferences/preferences.js -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/lib/settings/settings.js -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/addon-warning.md -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/content-policy.md -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/test/test-userstyles.css -+browser/extensions/html5-video-everywhere@lejenome.me/bootstrap.js -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/bootstrap.js -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/data/assets/images/README -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/data/widget/images/README -+browser/chrome/browser/content/browser/aboutaccounts/images/fox.png -+browser/extensions/spyblock@gnu.org/chrome/content/ui/ext/common.js -+browser/extensions/spyblock@gnu.org/lib/ext_common.js -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/data/widget/images/librejs-64.png -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/icon.png -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/data/images/gnu-icon.png -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/notification-box/data/gnu-icon.png -+browser/extensions/html5-video-everywhere@lejenome.me/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-break/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-dailymotion/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-facebook/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-metacafe/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-vimeo/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-youtube/LICENSE -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/data/licenses/mpl-2.0.txt -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/notification-box/LICENSE -+browser/extensions/spyblock@gnu.org/chrome/content/ui/skin/abp-128.png -+browser/extensions/spyblock@gnu.org/chrome/skin/abp-icon-big.png -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/COPYING -+browser/extensions/jid1-KtlZuoiikVfFew@jetpack/data/licenses/gpl-3.0.txt -+# - chrome.manifest - chrome/en-US/locale/en-US/browser/overrides/AccessFu.properties - chrome/en-US/locale/en-US/browser/overrides/about.dtd diff --git a/icecat-fix_jar.patch b/icecat-fix_jar.patch deleted file mode 100644 index f62bc0f..0000000 --- a/icecat-fix_jar.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- browser/locales/jar.orig.mn 2017-03-19 19:59:09.000000000 +0100 -+++ browser/locales/jar.mn 2017-03-22 19:49:57.602190867 +0100 -@@ -6,7 +6,7 @@ - - @AB_CD@.jar: - % locale browser @AB_CD@ %locale/browser/ --* locale/browser/bookmarks.html (generic/profile/bookmarks.html.in) -+ locale/browser/bookmarks.html (generic/profile/bookmarks.html.in) - locale/browser/aboutAccounts.dtd (%chrome/browser/aboutAccounts.dtd) - locale/browser/aboutDialog.dtd (%chrome/browser/aboutDialog.dtd) - locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd) diff --git a/icecat-gcc-always-inline.patch b/icecat-gcc-always-inline.patch new file mode 100644 index 0000000..d7af60f --- /dev/null +++ b/icecat-gcc-always-inline.patch @@ -0,0 +1,14 @@ +diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline firefox-114.0.2/gfx/wr/swgl/src/gl.cc +--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22 11:08:53.294593327 +0200 ++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734 +0200 +@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF + } + + #else +-// GCC is slower when dealing with always_inline, especially in debug builds. +-// When using Clang, use always_inline more aggressively. +-# if defined(__clang__) || defined(NDEBUG) ++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG) + # define ALWAYS_INLINE __attribute__((always_inline)) inline + # else + # define ALWAYS_INLINE inline diff --git a/icecat-lang_download.sh b/icecat-lang_download.sh index cc2193d..3c0c445 100755 --- a/icecat-lang_download.sh +++ b/icecat-lang_download.sh @@ -1,17 +1,23 @@ #!/bin/bash -URL=http://ftp.gnu.org/gnu/gnuzilla/52.6.0/langpacks/ +VERSION=140.7.0 +URL=https://ftp.mozilla.org/pub/firefox/releases/${VERSION}esr/linux-x86_64/xpi/ for u in $URL; do -mkdir -p langpacks && cd langpacks -wget -erobots=off -c -r -l1 -nd -nc -A.xpi -U langpacks $u -rm -f icecat-52.6.0.ja-JP-mac.langpack.xpi icecat-52.6.0.compare-locales.langpack.xpi + mkdir -p langpacks && pushd langpacks + wget -erobots=off -c -r -l1 -nd -nc -A.xpi -U langpacks $u +popd done -find . -type f -name '*.xpi' | while read FILE ; do - newfile="$(echo ${FILE} |sed -e 's/52.3.0.//g' -e 's/icecat-//g')" ; - mv "${FILE}" "${newfile}" ; -done -cd .. -tar -zcvf icecat-52.6.0-langpacks.tar.gz langpacks +#pushd langpacks +#for u in `ls *.xpi`; do +# mv $u icecat-${VERSION}.$u +#done +#find . -type f -name '*.xpi' | while read FILE ; do +# newfile="$(echo ${FILE} |sed -e 's/.xpi/.langpack.xpi/g')" ; +# mv "${FILE}" "${newfile}" ; +#done +#popd +rm -f icecat-*-langpacks.tar.gz +tar -zcvf icecat-${VERSION}-langpacks.tar.gz langpacks rm -rf langpacks exit 0 diff --git a/icecat-locale.patch b/icecat-locale.patch deleted file mode 100644 index 802b49c..0000000 --- a/icecat-locale.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- intl/icu/source/i18n/digitlst.orig.cpp 2017-07-25 16:08:42.000000000 +0000 -+++ intl/icu/source/i18n/digitlst.cpp 2017-08-03 19:20:54.808813010 +0000 -@@ -64,7 +64,7 @@ - # if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN - # include - # else --# include -+# include - # endif - #endif - - diff --git a/icecat-mozconfig-common b/icecat-mozconfig-common index f5578fa..bb3300d 100644 --- a/icecat-mozconfig-common +++ b/icecat-mozconfig-common @@ -2,24 +2,15 @@ export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 -export MOZ_TELEMETRY_REPORTING=1 +export MOZ_TELEMETRY_REPORTING= mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir - -ac_add_options --enable-default-toolkit=cairo-gtk3 +ac_add_options --without-wasm-sandboxed-libraries ac_add_options --prefix="$PREFIX" ac_add_options --libdir="$LIBDIR" -ac_add_options --with-pthreads -#ac_add_options --enable-libnotify ac_add_options --enable-necko-wifi -ac_add_options --enable-startup-notification -#ac_add_options --disable-cpp-exceptions ac_add_options --disable-updater -ac_add_options --enable-url-classifier -ac_add_options --enable-gio -#ac_add_options --disable-gnomevfs ac_add_options --enable-chrome-format=omni ac_add_options --enable-release -ac_add_options --enable-pie diff --git a/icecat-remove_unrecognized_flags.patch b/icecat-remove_unrecognized_flags.patch deleted file mode 100644 index 0283a3b..0000000 --- a/icecat-remove_unrecognized_flags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- gfx/angle/moz.orig.build 2016-08-29 02:17:57.000000000 +0200 -+++ gfx/angle/moz.build 2016-09-01 13:09:17.936098501 +0200 -@@ -124,8 +124,7 @@ - ] - else: - CXXFLAGS += [ -- '-Wno-shadow-compatible-local', -- '-Wno-shadow-local', -+ '-Wno-shadow', - ] - - if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: diff --git a/icecat-virtualenv.patch b/icecat-virtualenv.patch deleted file mode 100644 index fe646c8..0000000 --- a/icecat-virtualenv.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- python/mozbuild/mozbuild/virtualenv.orig.py 2014-10-07 21:44:49.000000000 +0200 -+++ python/mozbuild/mozbuild/virtualenv.py 2014-10-11 12:34:19.292241319 +0200 -@@ -56,8 +56,7 @@ - @property - def virtualenv_script_path(self): - """Path to virtualenv's own populator script.""" -- return os.path.join(self.topsrcdir, 'python', 'virtualenv', -- 'virtualenv.py') -+ return '/usr/bin/virtualenv' - - @property - def bin_path(self): - diff --git a/icecat.1 b/icecat.1 deleted file mode 100644 index 1df25a0..0000000 --- a/icecat.1 +++ /dev/null @@ -1,139 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. -.TH ICECAT "24" "Jan 2018" "IceCat 52.6.0" "User Commands" -.SH NAME -IceCat \- GNU version of Firefox browser -.SH SYNOPSIS -.B icecat -[ \fI\,options \/\fR... ] [\fI\,URL\/\fR] -.SH DESCRIPTION -GNUzilla is the GNU version of the Mozilla suite, and GNU IceCat is the GNU version of the Firefox browser. Its main advantage is an ethical one: it is entirely free software. While the Firefox source code from the Mozilla project is free software, they distribute and recommend non-free software as plug-ins and addons. - -In addition, GNU IceCat includes some privacy protection features, included in a separate addon: - -Some sites refer to zero-size images on other hosts to keep track of cookies. When IceCat detects this mechanism it blocks cookies from the site hosting the zero-length image file. (It is possible to re-enable such a site by removing it from the blocked hosts list.) -Other sites rewrite the host name in links redirecting the user to another site, mainly to "spy" on clicks. When this behavior is detected, IceCat shows a message alerting the user. - - -Origin of the name - -The name IceCat was coined to show our relationship to the Mozilla Firefox browser. Ice isn't Fire and a Cat isn't a Fox, so it is clearly a different package (we don't want Mozilla blamed for our mistakes, nor cause confusion with their trademarks), but is equally clearly intimately related (of course nearly all of the work comes from the Mozilla foundation effort, so we want to give credit). - -The gNewSense BurningDog browser and the Debian IceWeasel browser are similarly derived from Firefox, also with the intent of being free software. Technically, however, these projects are maintained entirely independently of IceCat. (Previously, this GNU browser project was also named IceWeasel, but that proved confusing.) - -Extensions included to this version of IceCat: - -- LibreJS - GNU LibreJS aims to address the JavaScript problem described in Richard - Stallman's article The JavaScript Trap. - -- SpyBlock - Blocks privacy trackers while in normal browsing mode, and all third party - requests when in private browsing mode. Based on Adblock Plus. - -- AboutIceCat - Adds a custom "about:icecat" homepage with links to information about the - free software and privacy features in IceCat, and check-boxes to enable - and disable the ones more prone to break websites. - -- HTML5-video-everywhere - Uses the native video player to play embedded videos from different sources - -- Fingerprinting countermeasures: Fingerprinting is a series of techniques - allowing to uniquely identify a browser based on specific characterisics of - that particular instance (like what fonts are available in that machine). - Unlike cookies the user cannot opt-out of being tracked this way, - so the browser has to avoid giving away that kind of hints. - -`icecat' generates a man page out of `--help' and `--version' output. -.IP -where options include: -.PP -X11 options -.TP -\fB\-\-display\fR=\fI\,DISPLAY\/\fR -X display to use -.TP -\fB\-\-sync\fR -Make X calls synchronous -.HP -\fB\-\-g\-fatal\-warnings\fR Make all warnings fatal -.PP -IceCat options -.TP -\fB\-h\fR or \fB\-\-help\fR -Print this message. -.TP -\fB\-v\fR or \fB\-\-version\fR -Print IceCat version. -.TP -\fB\-P\fR -Start with . -.TP -\fB\-\-profile\fR -Start with profile at . -.TP -\fB\-\-migration\fR -Start with migration wizard. -.TP -\fB\-\-ProfileManager\fR -Start with ProfileManager. -.TP -\fB\-\-no\-remote\fR -Do not accept or send remote commands; implies \fB\-\-new\-instance\fR. -.TP -\fB\-\-new\-instance\fR -Open new instance, not a new window in running instance. -.HP -\fB\-\-UILocale\fR Start with resources as UI Locale. -.TP -\fB\-\-safe\-mode\fR -Disables extensions and themes for this session. -.TP -\fB\-\-jsconsole\fR -Open the Browser Console. -.TP -\fB\-\-jsdebugger\fR -Open the Browser Toolbox. -.TP -\fB\-\-devtools\fR -Open DevTools on initial load. -.TP -\fB\-\-start\-debugger\-server\fR [port|path] Start the debugger server on a TCP port or Unix domain socket path. -Defaults to TCP port 6000. -.TP -\fB\-\-browser\fR -Open a browser window. -.HP -\fB\-\-new\-window\fR Open in a new window. -.TP -\fB\-\-new\-tab\fR -Open in a new tab. -.HP -\fB\-\-private\-window\fR Open in a new private window. -.TP -\fB\-\-preferences\fR -Open Preferences dialog. -.TP -\fB\-\-search\fR -Search with your default search engine. -.HP -\fB\-\-recording\fR Record drawing for a given URL. -.HP -\fB\-\-recording\-output\fR Specify destination file for a drawing recording. -.HP -\fB\-\-setDefaultBrowser\fR Set this app as the default browser. -.PP -Gnuzilla IceCat 52.6.0 -.SH FILES - -/usr/bin/icecat - icecat executable - -/usr/lib(64)/icecat-52.6.0/icecat-bin - icecat executable -.SH BUGS -To report a bug, please mail to bug-gnuzilla@gnu.org -.SH VERSION -52.6.0 -.SH AUTHORS -For a full list of the people who are credited with making a contribution to Mozilla, see http://www.mozilla.org/credits/ . -.SH "SEE ALSO" -https://www.gnu.org/software/gnuzilla/ diff --git a/icecat.appdata.xml b/icecat.appdata.xml new file mode 100644 index 0000000..ad0171c --- /dev/null +++ b/icecat.appdata.xml @@ -0,0 +1,63 @@ + + + icecat.desktop + CC0-1.0 + GNU version of Firefox browser + GNU IceCat + (MPL-1.1 or GPL-2.0+ or LGPL-2.0+) and GPL-3.0+ and MIT and BSD and ISC and ASL-2.0 and MPL-2.0 + + Internet + Web Browser + + +

+ GNU IceCat is the GNU version of the Firefox ESR browser. +

+

+ Its main advantage is an ethical one: it is entirely free software: + while the Firefox source code from the Mozilla project is free software, + they distribute and recommend non-free software as plug-ins and addons. + Also their trademark license restricts distribution in several ways incompatible with freedom 0. +

+

+ Extensions included to this version of IceCat: +

+
    +
  • + LibreJS + GNU LibreJS aims to address the JavaScript problem described in Richard + Stallman's article The JavaScript Trap +
  • +
  • + HTTPS Everywhere + HTTPS Everywhere is an extension that encrypts your communications with many major websites, making your browsing more secure +
  • +
  • + A set of companion extensions for LibreJS by Nathan Nichols (https://addons.mozilla.org/en-US/firefox/user/NateN1222/) + are pre-installed, and provide workarounds to use some services at USPS, RSF.org, SumOfUs.org, pay.gov, McDonald's, goteo.org + and Google Docs without using nonfree JavaScript. +
  • +
  • + A series of configuration changes and tweaks were applied to ensure that IceCat does not initiate network connections + that the user has not explicitly requested. This implies not downloading feeds, updates, blacklists or any other similar + data needed during startup. +
  • +
+
+ http://www.gnu.org/software/gnuzilla/ + + + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1021.png + + + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1022.png + + + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1023.png + + + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1024.png + + + sagitter_at_fedoraproject.org +
diff --git a/icecat.desktop b/icecat.desktop index 20aca99..92cf4c8 100644 --- a/icecat.desktop +++ b/icecat.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Version=1.0 -Name=Icecat +Name=GNU IceCat Comment=Browse the World Wide Web Comment[ar]=تصفح الشبكة العنكبوتية العالمية Comment[ast]=Restola pela Rede @@ -118,8 +118,7 @@ Type=Application MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; Categories=Network;WebBrowser; StartupNotify=true -StartupWMClass=icecat -Name[en_US]=Icecat +Name[en_US]=GNU IceCat Actions=new-window;new-private-window; [Desktop Action new-window] diff --git a/icecat.png b/icecat.png deleted file mode 100644 index aac883e..0000000 Binary files a/icecat.png and /dev/null differ diff --git a/icecat.rpmlintrc b/icecat.rpmlintrc new file mode 100644 index 0000000..562f383 --- /dev/null +++ b/icecat.rpmlintrc @@ -0,0 +1,54 @@ +# Whitelisting errors +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#whitelist +# https://src.fedoraproject.org/rpms/python3/blob/master/f/python3.rpmlintrc +# Edited by sagitter (sagitter@fedoraproject.org) + +# KNOWN BUGS: +# + +# TESTS: +##### SRPMs ##### + +# ifarch applied patches are okay +# https://fedoraproject.org/wiki/Packaging:Guidelines#Architecture_Support +addFilter(r'(%ifarch-applied-patch) Patch*') +# Different file size due to the signature of the source code tarbz archive +addFilter(r'file-size-mismatch') + +addFilter(r'(invalid-url) Source0') +addFilter(r'(invalid-url) Source4') +addFilter(r'(invalid-url) Source5') +addFilter(r'(invalid-url) Source17') + +addFilter(r'(strange-permission) icecat-lang_download.sh') +addFilter(r'(strange-permission) node-stdout-nonblocking-wrapper') + +# ERRORS: +##### RPMs ##### + +# chroot function (??) +addFilter(r'(missing-call-to-chdir-with-chroot) /usr/lib64/icecat/libmozsandbox.so') +addFilter(r'(missing-call-to-setgroups-before-setuid) /usr/lib64/icecat/libxul.so') +addFilter(r'(missing-call-to-chdir-with-chroot) /usr/lib/icecat/libmozsandbox.so') +addFilter(r'(missing-call-to-setgroups-before-setuid) /usr/lib/icecat/libxul.so') + +# Expected on FF browser +# https://support.mozilla.org/en-US/questions/1045418 +addFilter(r'(zero-length) /usr/lib(64)?/icecat/chrome.manifest') +addFilter(r'(zero-length) /usr/lib(64)?/icecat/browser/chrome.manifest') + +addFilter(r'E:library-not-linked-against-libc /usr/lib64/icecat/gtk2/libmozgtk.so') +addFilter(r'E:library-not-linked-against-libc /usr/lib64/icecat/libmozgtk.so') +addFilter(r'E:library-not-linked-against-libc /usr/lib/icecat/gtk2/libmozgtk.so') +addFilter(r'E:library-not-linked-against-libc /usr/lib/icecat/libmozgtk.so') + +# False positive +addFilter(r'(dangling-symlink) /usr/lib(64)?/icecat/dictionaries /usr/share/myspell') +addFilter(r'(unversioned-explicit-provides) webclient') + +# WARNINGS: +##### RPMs ##### + +addFilter(r'(no-manual-page-for-binary) icecat-wayland') +addFilter(r'(no-manual-page-for-binary) icecat-x11') + diff --git a/icecat.sh.in b/icecat.sh.in new file mode 100644 index 0000000..a269749 --- /dev/null +++ b/icecat.sh.in @@ -0,0 +1,279 @@ +#!/bin/bash +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +## +## Usage: +## +## $ icecat +## +## This script is meant to run a mozilla program from the mozilla +## rpm installation. +## +## The script will setup all the environment voodoo needed to make +## mozilla work. + +cmdname=`basename $0` + +## +## Variables +## +MOZ_ARCH=$(uname -m) +case $MOZ_ARCH in + x86_64 | s390x | sparc64) + MOZ_LIB_DIR="/__PREFIX__/lib64" + SECONDARY_LIB_DIR="/__PREFIX__/lib" + ;; + * ) + MOZ_LIB_DIR="/__PREFIX__/lib" + SECONDARY_LIB_DIR="/__PREFIX__/lib64" + ;; +esac + +MOZ_FIREFOX_FILE="icecat" + +if [ ! -r $MOZ_LIB_DIR/icecat/$MOZ_FIREFOX_FILE ]; then + if [ ! -r $SECONDARY_LIB_DIR/icecat/$MOZ_FIREFOX_FILE ]; then + echo "Error: $MOZ_LIB_DIR/icecat/$MOZ_FIREFOX_FILE not found" + if [ -d $SECONDARY_LIB_DIR ]; then + echo " $SECONDARY_LIB_DIR/icecat/$MOZ_FIREFOX_FILE not found" + fi + exit 1 + fi + MOZ_LIB_DIR="$SECONDARY_LIB_DIR" +fi +MOZ_DIST_BIN="$MOZ_LIB_DIR/icecat" +MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" +MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" +MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" +MOZ_LAUNCHER="$MOZ_DIST_BIN/icecat" +GETENFORCE_FILE="/usr/sbin/getenforce" + +## +## Enable Wayland backend? +## +if ! [ $MOZ_DISABLE_WAYLAND ] && [ "$WAYLAND_DISPLAY" ]; then + if [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then + export MOZ_ENABLE_WAYLAND=1 + fi +## Enable Wayland on KDE/Sway +## + if [ "$XDG_SESSION_TYPE" == "wayland" ]; then + export MOZ_ENABLE_WAYLAND=1 + fi +fi + +## +## Use D-Bus remote exclusively when there's Wayland display. +## +if [ "$WAYLAND_DISPLAY" ]; then + export MOZ_DBUS_REMOTE=1 +fi + +## +## Set MOZ_GRE_CONF +## +MOZ_GRE_CONF=/etc/gre.d/gre.conf +if [ "$MOZ_LIB_DIR" == "/__PREFIX__/lib64" ]; then + MOZ_GRE_CONF=/etc/gre.d/gre64.conf +fi +export MOZ_GRE_CONF + +## +## Set MOZILLA_FIVE_HOME +## +MOZILLA_FIVE_HOME="$MOZ_DIST_BIN" + +export MOZILLA_FIVE_HOME + +## +## Make sure that we set the plugin path +## +MOZ_PLUGIN_DIR="plugins" + +if [ "$MOZ_PLUGIN_PATH" ] +then + MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$MOZ_LIB_DIR/icecat/$MOZ_PLUGIN_DIR:$MOZ_DIST_BIN/$MOZ_PLUGIN_DIR +else + MOZ_PLUGIN_PATH=$MOZ_LIB_DIR/icecat/$MOZ_PLUGIN_DIR:$MOZ_DIST_BIN/$MOZ_PLUGIN_DIR +fi +export MOZ_PLUGIN_PATH + +## +## Set MOZ_APP_LAUNCHER for gnome-session +## +export MOZ_APP_LAUNCHER="/__PREFIX__/bin/icecat" + + +## +## Set FONTCONFIG_PATH for Xft/fontconfig +## +FONTCONFIG_PATH="/etc/fonts:${MOZILLA_FIVE_HOME}/res/Xft" +export FONTCONFIG_PATH + +## +## In order to better support certain scripts (such as Indic and some CJK +## scripts), Fedora builds its Firefox, with permission from the Mozilla +## Corporation, with the Pango system as its text renderer. This change +## may negatively impact performance on some pages. To disable the use of +## Pango, set MOZ_DISABLE_PANGO=1 in your environment before launching +## Firefox. +## +# +# MOZ_DISABLE_PANGO=1 +# export MOZ_DISABLE_PANGO +# + +## +## Disable the GNOME crash dialog, Moz has it's own +## +GNOME_DISABLE_CRASH_DIALOG=1 +export GNOME_DISABLE_CRASH_DIALOG + +## +## Disable the SLICE allocator (rhbz#1014858) +## +export G_SLICE=always-malloc + +## +## Enable Xinput2 (mozbz#1207973) +## +export MOZ_USE_XINPUT2=1 + +# OK, here's where all the real work gets done + + +## +## To disable the use of IceCat localization, set MOZ_DISABLE_LANGPACKS=1 +## in your environment before launching Firefox. +## +# +# MOZ_DISABLE_LANGPACKS=1 +# export MOZ_DISABLE_LANGPACKS +# + +## +## Automatically installed langpacks are tracked by .fedora-langpack-install +## config file. +## +FEDORA_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.fedora-langpack-install" + +# MOZ_DISABLE_LANGPACKS disables language packs completely +MOZILLA_DOWN=0 +if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then + if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then + # Is icecat running? + /__PREFIX__/pidof icecat > /dev/null 2>&1 + MOZILLA_DOWN=$? + fi +fi + +# When IceCat is not running, restore SELinux labels for profile files +# (rhbz#1731371) +if [ $MOZILLA_DOWN -ne 0 ]; then + if [ -x $GETENFORCE_FILE ] && [ `getenforce` != "Disabled" ]; then + (restorecon -vr ~/.mozilla/icecat/* &) + fi +fi + +# Modify language pack configuration only when icecat is not running +# and language packs are not disabled +if [ $MOZILLA_DOWN -ne 0 ]; then + + # Clear already installed langpacks + mkdir -p $MOZ_EXTENSIONS_PROFILE_DIR + if [ -f $FEDORA_LANGPACK_CONFIG ]; then + rm `cat $FEDORA_LANGPACK_CONFIG` > /dev/null 2>&1 + rm $FEDORA_LANGPACK_CONFIG > /dev/null 2>&1 + # remove all empty langpacks dirs while they block installation of langpacks + rmdir $MOZ_EXTENSIONS_PROFILE_DIR/langpack* > /dev/null 2>&1 + fi + + # Get locale from system + CURRENT_LOCALE=$LC_ALL + CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES} + CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG} + + # Try with a local variant first, then without a local variant + SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g" | sed "s|\..*||g"` + MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g" | sed "s|\..*||g"` + + function create_langpack_link() { + local language=$* + local langpack=langpack-${language}@icecat.mozilla.org.xpi + if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then + rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + # If the target file is a symlink (the fallback langpack), + # install the original file instead of the fallback one + if [ -h $MOZ_LANGPACKS_DIR/$langpack ]; then + langpack=`readlink $MOZ_LANGPACKS_DIR/$langpack` + fi + ln -s $MOZ_LANGPACKS_DIR/$langpack \ + $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $FEDORA_LANGPACK_CONFIG + return 0 + fi + return 1 + } + + create_langpack_link $MOZLOCALE || create_langpack_link $SHORTMOZLOCALE || true +fi + +# BEAST fix (rhbz#1005611) +NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV-1} +export NSS_SSL_CBC_RANDOM_IV + +# Prepare command line arguments +script_args="" +pass_arg_count=0 +while [ $# -gt $pass_arg_count ] +do + case "$1" in + -g | --debug) + script_args="$script_args -g" + debugging=1 + shift + ;; + -d | --debugger) + if [ $# -gt 1 ]; then + script_args="$script_args -d $2" + shift 2 + else + shift + fi + ;; + *) + # Move the unrecognized argument to the end of the list. + arg="$1" + shift + set -- "$@" "$arg" + pass_arg_count=`expr $pass_arg_count + 1` + ;; + esac +done + +## Allow downgrade because during distro upgrade the build time can be +## older in newer version than the previous one. +## +export MOZ_ALLOW_DOWNGRADE=1 + + +exec $MOZ_PROGRAM "$@" diff --git a/icecat.spec b/icecat.spec index 90a85f9..6e50c61 100644 --- a/icecat.spec +++ b/icecat.spec @@ -1,368 +1,359 @@ -# Filtering of private libraries -%global privlibs libbrowsercomps -%global privlibs %{privlibs}|libclearkey -%global privlibs %{privlibs}|libdbusservice -%global privlibs %{privlibs}|libmozalloc -%global privlibs %{privlibs}|libmozgnome -%global privlibs %{privlibs}|liblgpllibs +### Naming ### +# Set to true if it's going to be submitted as update +%global release_build 1 -%global __provides_exclude ^(%{privlibs})\\.so -%global __requires_exclude ^(%{privlibs})\\.so -# +# Set new source-code build version for Fedora and, not necessarily, for upstream too +%global redhat_ver rh1 -##Active/Deactive language files handling -%global build_langpacks 0 +ExcludeArch: %{ix86} %{arm} -%define default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html +# Bundled cbindgen makes build slow. +# Enable only if system cbindgen is not available. +%global use_bundled_cbindgen 0 -##Define installation directories -%global icecatappdir %{_libdir}/%{name} -%global icecat_ver %{name}-%{version} -%global icecat_devel %{name}-devel-%{version} - -##Define language files directory -%global langpackdir %{icecatappdir}/langpacks - -%global toolkit_gtk3 1 +#################### +### Optimization ### # Builds for debugging -%global debug_build 0 +%global debug_build 0 + +# Downgrade optimization +%global less_optbuild 0 + +# Build PGO+LTO on x86_64 and aarch64 only +%ifarch x86_64 %{arm64} +%if 0%{?release_build} +%global build_with_pgo 1 +%global pgo_wayland 1 +%global launch_wayland_compositor 1 +%else +%global build_with_pgo 0 +%global pgo_wayland 0 +%global launch_wayland_compositor 0 +%endif +%endif + +#################### + +# Active/Deactive language files handling +%bcond_without langpacks + +%if %{with langpacks} +%bcond_without langpacks_subpkg +%endif + +# Define installation directories +%global icecatappdir %{_libdir}/%{name} +# Define language files directory +%global langpackdir %{icecatappdir}/langpacks + +%global icecat_ver %{name}-%{version} +%global icecat_devel %{name}-devel-%{version} + +%global toolkit_gtk3 1 # Big endian platforms -%ifarch ppc64 s390x +%ifarch s390x %{power64} # Javascript Intl API is not supported on big endian platforms right now: # https://bugzilla.mozilla.org/show_bug.cgi?id=1322212 -%global big_endian 1 +%global big_endian 1 %endif -# Use system sqlite? -%global system_sqlite 1 - -%if %{?system_sqlite} -%global sqlite_version 3.8.4.2 -# The actual sqlite version (see #480989): -%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) -%endif - -# Use system libicu? -%if 0%{?fedora} > 28 -%global system_libicu 1 +%if 0%{?fedora} +%global system_nss 1 %else -%global system_libicu 0 +%global system_nss 0 %endif - -# Use system nspr/nss? -%global system_nss 1 - %if %{?system_nss} -%global nspr_version 4.17.0 -# NSS/NSPR quite often ends in build override, so as requirement the version -# we're building against could bring us some broken dependencies from time to time. -#%%global nspr_build_version %%(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) +%global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.34 -#%%global nss_build_version %%(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) +%global nss_version 3.100 %global nss_build_version %{nss_version} %endif -## Audio backends +# Audio backends %bcond_without pulseaudio -%bcond_without jack +%bcond_with alsa + +%global with_vpx 1 +%if %{?with_vpx} +%global libvpx_version 1.8.2 +%endif + +# Use clang? +%bcond_without toolchain_clang + +%if %{with toolchain_clang} +%global toolchain clang +%endif + +# https://bugzilla.redhat.com/show_bug.cgi?id=1908792 +# https://bugzilla.redhat.com/show_bug.cgi?id=2255254 +%global __provides_exclude_from ^%{icecatappdir} +%global __requires_exclude ^(%%(find %{buildroot}%{icecatappdir} -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -)) Name: icecat -Version: 52.7.3 -Release: 1%{?dist} +Epoch: 4 +Version: 140.7.0 +Release: %autorelease -e %{redhat_ver} Summary: GNU version of Firefox browser -## Tri-licensing scheme for Gnuzilla/IceCat in parentheses, and licenses for the extensions included -License: (MPLv1.1 or GPLv2+ or LGPLv2+) and GPLv3+ and MIT and BSD and ISC and ASL 2.0 and MPLv2.0 +# Tri-licensing scheme for Gnuzilla/IceCat in parentheses, and licenses for the extensions included +License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND GPL-3.0-or-later AND MIT AND BSD-4-Clause-UC AND ISC AND Apache-2.0 AND MPL-2.0 URL: http://www.gnu.org/software/gnuzilla/ ## Source archive created by scripts based on Gnuzilla files. -## Modified files are hosted in a dedicated fork repository: -## https://fedorapeople.org/cgit/sagitter/public_git/icecat.git/ -Source0: https://sagitter.fedorapeople.org/icecat/v%{version}/%{name}-%{version}-gnu1.tar.bz2 -Source1: %{name}.desktop +## All modified files are hosted in a dedicated fork repository: +## https://gitlab.com/anto.trande/icecat +Source0: %{name}-%{version}-%{redhat_ver}.tar.bz2 + Source2: %{name}.png Source3: %{name}-mozconfig-common -%if %{build_langpacks} -##Language files downloaded by source7 script +# Language files downloaded by source7 script +%if %{with langpacks} Source4: %{name}-%{version}-langpacks.tar.gz %endif -Source7: %{name}-lang_download.sh -##All license files -##Download from http://www.gnu.org/licenses -##Download from http://www.mozilla.org/MPL/1.1/index.txt -##Download from https://www.mozilla.org/MPL/2.0/index.txt +# All license files +# Download from http://www.gnu.org/licenses +# Download from http://www.mozilla.org/MPL/1.1/index.txt +# Download from https://www.mozilla.org/MPL/2.0/index.txt Source5: %{name}-COPYING-licensefiles.tar.gz -##manpage file -Source6: %{name}.1 +Source7: %{name}-lang_download.sh -# Build patches -Patch0: firefox-install-dir.patch -Patch3: mozilla-build-arm.patch +# Desktop files +Source10: %{name}.appdata.xml +Source13: %{name}.sh.in +Source14: %{name}.desktop -##Using system Python Virtualenv -Patch1: %{name}-virtualenv.patch - -# Remove unrecognized flags -Patch6: %{name}-remove_unrecognized_flags.patch - -# Unrecognized file? -Patch7: %{name}-fix_jar.patch - -# Fix files list for installer -Patch8: %{name}-fix_installer.patch - -# xlocale.h not provided by glibc-headers -# Set path of libcxx-devel -Patch9: %{name}-locale.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 -Patch18: xulrunner-24.0-jemalloc-ppc.patch - -# workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) -Patch19: xulrunner-24.0-s390-inlines.patch -Patch20: firefox-build-prbool.patch -Patch26: build-icu-big-endian.patch +# cbingen +Source17: cbindgen-vendor.tar.xz +Source18: node-stdout-nonblocking-wrapper +Source19: run-wayland-compositor # Fedora specific patches -# Unable to install addons from https pages -Patch204: rhbz-966424.patch -Patch219: rhbz-1173156.patch -Patch221: firefox-fedora-ua.patch -Patch224: mozilla-1170092.patch -Patch225: mozilla-1005640-accept-lang.patch -#ARM run-time patch -Patch226: rhbz-1354671.patch +Patch221: firefox-nss-addon-hack.patch +Patch224: %{name}-GLIBCXX-fix-for-GCC-12.patch -# Fix depends on p11-kit-trust 0.23.4 and enhanced ca-certificates.rpm -Patch227: rhbz-1400293-fix-mozilla-1324096.patch +# ARM run-time patch +Patch226: rhbz-1354671.patch -# Upstream patches -Patch304: mozilla-1253216.patch -Patch402: mozilla-1196777.patch -Patch406: mozilla-256180.patch -# Rebase Gtk3 widget code to latest trunk to -# fix various rendering problems -Patch407: widget-rebase.patch -Patch409: mozilla-1158076.patch -Patch411: mozilla-1158076-1.patch -Patch412: mozilla-1158076-2.patch +# Fix crash on ppc64le (mozilla#1512162) +Patch423: mozilla-1512162.patch -# Debian patches -Patch500: mozilla-440908.patch +# PGO/LTO patches +Patch603: %{name}-gcc-always-inline.patch -BuildRequires: alsa-lib-devel -BuildRequires: autoconf213 -BuildRequires: bzip2-devel -BuildRequires: cairo-devel -BuildRequires: ccache -BuildRequires: dbus-devel -BuildRequires: dbus-glib-devel -BuildRequires: dconf -BuildRequires: desktop-file-utils -BuildRequires: gcc, gcc-c++ -BuildRequires: fedora-bookmarks -BuildRequires: freetype-devel -BuildRequires: gdk-pixbuf2 -BuildRequires: glib2-devel -BuildRequires: pkgconfig(gtk+-2.0) -%if %{toolkit_gtk3} -BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: alsa-lib-devel +BuildRequires: autoconf213 +BuildRequires: bzip2-devel +BuildRequires: cairo-devel +BuildRequires: cargo +%if !0%{?use_bundled_cbindgen} +BuildRequires: cbindgen %endif -BuildRequires: gstreamer1-devel -BuildRequires: gstreamer1-plugins-base-devel -BuildRequires: gstreamer-devel -BuildRequires: gstreamer-plugins-base-devel -BuildRequires: hunspell-devel -BuildRequires: ImageMagick -BuildRequires: java-1.8.0-openjdk-headless -BuildRequires: intltool -BuildRequires: libappstream-glib -BuildRequires: libevent-devel -BuildRequires: libicu-devel -BuildRequires: libIDL-devel -BuildRequires: libjpeg-turbo-devel -BuildRequires: libjpeg-devel -BuildRequires: libX11-devel -BuildRequires: libXt-devel -BuildRequires: libXrender-devel -BuildRequires: libyuv-devel -BuildRequires: libXinerama-devel -BuildRequires: libffi-devel -BuildRequires: libnotify-devel -BuildRequires: libpng-devel -BuildRequires: libvpx-devel -BuildRequires: libzip-devel -BuildRequires: mesa-libGL-devel +BuildRequires: ccache +BuildRequires: dbus-devel +BuildRequires: dbus-glib-devel +BuildRequires: dbus-x11 +BuildRequires: dconf +BuildRequires: desktop-file-utils +BuildRequires: dos2unix +BuildRequires: gcc, gcc-c++ +BuildRequires: make +BuildRequires: freetype-devel +BuildRequires: gdk-pixbuf2 +BuildRequires: glib2-devel +BuildRequires: pkgconfig(gtk+-2.0) +%if 0%{?toolkit_gtk3} +BuildRequires: pkgconfig(gtk+-3.0) +%endif +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel +BuildRequires: hunspell-devel +BuildRequires: ImageMagick, autotrace +BuildRequires: intltool +BuildRequires: libappstream-glib +BuildRequires: libavcodec-free-devel +BuildRequires: libevent-devel +BuildRequires: libjpeg-turbo-devel +BuildRequires: libjpeg-devel +BuildRequires: libX11-devel +BuildRequires: libXt-devel +BuildRequires: libXrender-devel +BuildRequires: libyuv-devel +BuildRequires: libXinerama-devel +BuildRequires: libffi-devel +BuildRequires: libnotify-devel +BuildRequires: libpng-devel +%if %{?with_vpx} +BuildRequires: libvpx-devel >= %{libvpx_version} +%endif +BuildRequires: libzip-devel +BuildRequires: mesa-libGL-devel +BuildRequires: nodejs +BuildRequires: nasm >= 1.13 +BuildRequires: strace + %if %{?system_nss} -BuildRequires: pkgconfig(nspr) >= %{nspr_version} -BuildRequires: pkgconfig(nss) >= %{nss_version} -BuildRequires: nss-static >= %{nss_version} +BuildRequires: pkgconfig(nspr) >= %{nspr_version} +BuildRequires: pkgconfig(nss) >= %{nss_version} +BuildRequires: nss-static >= %{nss_version} %endif -# xlocale.h not provided by glibc-headers > 2.24 -# Set path of libcxx-devel -%if 0%{?fedora} > 26 -BuildRequires: libcxx-devel -%endif -BuildRequires: openjpeg-devel -BuildRequires: pango-devel -BuildRequires: python2-devel -%if 0%{?fedora} > 26 -BuildRequires: python2-blessings -%else -BuildRequires: python-blessings -%endif -BuildRequires: python2-mock -BuildRequires: python2-ply -BuildRequires: python2-psutil -BuildRequires: python2-setuptools -BuildRequires: python2-virtualenv -%if 0%{?fedora} > 27 -BuildRequires: python2-which -%else -BuildRequires: python-which -%endif -BuildRequires: pkgconfig(gconf-2.0) -BuildRequires: pkgconfig(xrender) -BuildRequires: pkgconfig(libstartup-notification-1.0) -BuildRequires: pkgconfig(dri) -BuildRequires: pkgconfig(libcurl) +BuildRequires: pango-devel +BuildRequires: pciutils-libs +BuildRequires: pipewire-devel +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3.11-devel +BuildRequires: python3-orjson +BuildRequires: perl-interpreter +BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(libstartup-notification-1.0) +BuildRequires: pkgconfig(dri) +BuildRequires: pkgconfig(libcurl) %if %{with pulseaudio} -BuildRequires: pulseaudio-libs-devel +BuildRequires: pulseaudio-libs-devel %endif -%if %{with jack} -BuildRequires: jack-audio-connection-kit-devel +BuildRequires: llvm +%if 0%{?fedora} >= 42 || 0%{?rhel} >= 10 +BuildRequires: clang19 +BuildRequires: clang19-libs +BuildRequires: llvm19-devel +BuildRequires: compiler-rt19 +%global llvm_suffix -19 +%else +BuildRequires: clang17 +BuildRequires: clang17-libs +BuildRequires: llvm17-devel +BuildRequires: compiler-rt17 +%global llvm_suffix -17 %endif -BuildRequires: yasm +%if "%toolchain" == "clang" +BuildRequires: lld +%endif +BuildRequires: rust +BuildRequires: rustfmt -%if %{?system_sqlite} -BuildRequires: pkgconfig(sqlite3) >= %{sqlite_version} -Requires: sqlite >= %{sqlite_build_version} +%if 0%{?pgo_wayland} +BuildRequires: xorg-x11-server-Xvfb +BuildRequires: mutter +BuildRequires: gsettings-desktop-schemas +BuildRequires: gnome-settings-daemon +BuildRequires: mesa-dri-drivers +BuildRequires: mesa-libEGL +BuildRequires: xorg-x11-server-Xwayland +BuildRequires: dbus-x11 +BuildRequires: gnome-keyring %endif -Requires: dconf -Requires: mozilla-filesystem +%if 0%{?big_endian} +BuildRequires: icu +%endif + +Requires: dconf +Requires: mozilla-filesystem +Requires: p11-kit-trust %if %{?system_nss} -Requires: nspr >= %{nspr_build_version} -Requires: nss >= %{nss_build_version} +Requires: nspr >= %{nspr_build_version} +Requires: nss >= %{nss_build_version} %endif -Requires: fedora-bookmarks -Suggests: mozilla-https-everywhere -Suggests: mozilla-ublock-origin -Provides: webclient +%if 0%{?fedora} +BuildRequires: fedora-bookmarks +Requires: fedora-bookmarks +%endif + +Suggests: mozilla-ublock-origin +Provides: webclient %description -GNUZilla Icecat is a fully-free fork of Mozilla Firefox ESR. +GNU IceCat is the GNU version of the Firefox ESR browser. Extensions included to this version of IceCat: - - * LibreJS - GNU LibreJS aims to address the JavaScript problem described in Richard - Stallman's article The JavaScript Trap. - - * SpyBlock - Blocks privacy trackers while in normal browsing mode, and all third party - requests when in private browsing mode. Based on Adblock Plus. - - * AboutIceCat - Adds a custom "about:icecat" homepage with links to information about the - free software and privacy features in IceCat, and check-boxes to enable - and disable the ones more prone to break websites. - - * HTML5-video-everywhere - Uses the native video player to play embedded videos from different sources - * Fingerprinting countermeasures: Fingerprinting is a series of techniques - allowing to uniquely identify a browser based on specific characteristics of - that particular instance (like what fonts are available in that machine). - Unlike cookies the user cannot opt-out of being tracked this way, - so the browser has to avoid giving away that kind of hints. + * LibreJS + GNU LibreJS aims to address the JavaScript problem described in the article + "The JavaScript Trap" of Richard Stallman. + + * JShelter: Mitigates potential threats from JavaScript, including fingerprinting, + tracking, and data collection. Slightly modifies the results of API calls, + differently on different domains, so that the cross-site fingerprint is not + stable. Applies security counter-measures that are likely not to break web pages. + Allows fine-grained control over the restrictions and counter-measures applied + to each domain. + + * A set of companion extensions for LibreJS by Nathan Nichols + are pre-installed, and provide workarounds to use some services at USPS, + RSF.org, SumOfUs.org, pay.gov, McDonalds, goteo.org and Google Docs + without using nonfree JavaScript. + + * A series of configuration changes and tweaks were applied to ensure that + IceCat does not initiate network connections that the user has not explicitly + requested. This implies not downloading feeds, updates, blacklists or any + other similar data needed during startup. + +%if %{with langpacks_subpkg} +%package langpacks +Summary: IceCat langpacks +Requires: %{name} = 4:%{version}-%{release} +%description langpacks +The icecat-langpacks package contains all the localization +and translations langpack add-ons. +%files langpacks -f %{name}.lang +%dir %{langpackdir} +%endif %prep -%setup -q -n %{name}-%{version} +%autosetup -N -n %{name}-%{version} -##Copy license files +# Copy license files tar -xf %{SOURCE5} -##Prevent HTTPS-everywhere addon's installation -sed '/https-everywhere/d' -i ./browser/installer/package-manifest.in - -# Build patches, can't change backup suffix from default because during build -# there is a compare of config and js/config directories and .orig suffix is -# ignored during this compare. -%patch0 -p1 - -%patch18 -p1 -b .jemalloc-ppc -%patch19 -p2 -b .s390-inlines -%patch20 -p1 -b .prbool - -%patch3 -p1 -b .arm - -%patch1 -p0 -%patch6 -p0 -%patch7 -p0 -%patch8 -p0 - # Fedora patches -%patch204 -p2 -b .966424 -%patch219 -p2 -b .rhbz-1173156 -%patch221 -p2 -b .fedora-ua -%patch224 -p1 -b .1170092 -%patch225 -p1 -b .1005640-accept-lang -#ARM run-time patch -%ifarch aarch64 -%patch226 -p1 -b .1354671 +%if 0%{?fedora} +%patch -P 221 -p 1 -b .firefox-nss-addon-hack +%endif +%patch -P 224 -p 1 -b .glibcxx + +# ARM64 +%ifarch %{arm64} +%patch -P 226 -p 1 -b .1354671 %endif -# Fix depends on p11-kit-trust 0.23.4 and enhanced ca-certificates.rpm -%patch227 -p1 -b .rh1400293 - -%patch304 -p1 -b .1253216 -%patch402 -p1 -b .1196777 -%patch406 -p0 -b .256180 -# Rebase Gtk3 widget code to latest trunk to -# fix various rendering problems -%patch407 -p1 -b .widget-rebase -#%%patch409 -p1 -b .1158076 -%patch411 -p1 -b .1158076-1 -%patch412 -p1 -b .1158076-2 - -# Debian extension patch -%patch500 -p1 -b .440908 - -# Patch for big endian platforms only -%if 0%{?big_endian} -%patch26 -p1 -b .icu -%if 0%{?fedora} > 26 -%patch9 -p0 -b .locale -%endif +%ifarch %{power64} +%patch -P 423 -p 1 -b .1512162 %endif +%patch -P 603 -p1 -b .inline -##Remove default configuration and copy the customized one -%{__rm} -f .mozconfig +# Remove default configuration and copy the customized one +rm -f .mozconfig cp -p %{SOURCE3} .mozconfig -echo "ac_add_options --enable-official-branding" >> .mozconfig +# Disable signature checking for extensions that are bundled with IceCat. +# Add these options to allow loading unsigned add-ons in app and system scopes. +echo "ac_add_options --with-unsigned-addon-scopes=app,system" >> .mozconfig +echo "ac_add_options --allow-addon-sideload" >> .mozconfig -%ifnarch %{arm} -echo "ac_add_options --enable-webrtc" >> .mozconfig -%else +echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig +echo "ac_add_options --enable-official-branding" >> .mozconfig echo "ac_add_options --disable-webrtc" >> .mozconfig + +# Hide DRM Content option +# This option does not work on other architectures +%ifarch x86_64 +echo "ac_add_options --disable-eme" >> .mozconfig %endif %if %{with pulseaudio} echo "ac_add_options --enable-pulseaudio" >> .mozconfig %endif -%if %{with jack} -echo "ac_add_options --enable-jack" >> .mozconfig +%if %{with alsa} +echo "ac_add_options --enable-alsa" >> .mozconfig %endif %ifarch s390x @@ -370,181 +361,239 @@ echo "ac_add_options --disable-jemalloc" >> .mozconfig %endif %if %{?system_nss} -echo "ac_add_options --with-nspr-cflags='%(%{_bindir}/nspr-config --cflags)'" >> .mozconfig -echo "ac_add_options --with-nspr-libs='%(%{_bindir}/nspr-config --libs)'" >> .mozconfig -echo "ac_add_options --with-system-nss" >>.mozconfig -%endif -%ifarch %{arm} -echo "ac_add_options --disable-elf-hack" >> .mozconfig -%endif -%if %{?system_libicu} -echo "ac_add_options --with-system-icu" >> .mozconfig +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +echo 'ac_add_options BINDGEN_CFLAGS="%(pkg-config nspr pixman-1 --cflags)"' >> .mozconfig %else -echo "ac_add_options --without-system-icu" >> .mozconfig +echo "ac_add_options --without-system-nspr" >> .mozconfig +echo "ac_add_options --without-system-nss" >> .mozconfig %endif -echo "ac_add_options --disable-system-cairo" >> .mozconfig -echo "ac_add_options --enable-system-hunspell" >> .mozconfig +# Workaround for mozbz#1341234 +echo "ac_add_options --allow-addon-sideload" >> .mozconfig echo "ac_add_options --enable-system-pixman" >> .mozconfig -%if %{?system_sqlite} -echo "ac_add_options --enable-system-sqlite" >> .mozconfig -%else -echo "ac_add_options --disable-system-sqlite" >> .mozconfig -%endif -echo "ac_add_options --with-system-zlib" >> .mozconfig -echo "ac_add_options --with-system-bz2" >> .mozconfig -echo "ac_add_options --with-system-libevent=%{_prefix}" >> .mozconfig -echo "ac_add_options --enable-llvm-hacks" >> .mozconfig +echo "ac_add_options --with-system-libevent" >> .mozconfig +%if %{?with_vpx} echo "ac_add_options --with-system-libvpx" >> .mozconfig -echo "ac_add_options --disable-libjpeg-turbo" >> .mozconfig -echo "ac_add_options --with-system-jpeg" >> .mozconfig -echo "ac_add_options --disable-crashreporter" >> .mozconfig -echo "ac_add_options --disable-eme" >> .mozconfig - -%ifarch aarch64 ppc64 s390x %{arm} %{ix86} -echo "ac_add_options --disable-skia" >> .mozconfig +%else +echo "ac_add_options --without-system-libvpx" >> .mozconfig %endif -%if %{?debug_build} +echo "ac_add_options --with-system-jpeg" >> .mozconfig +echo "ac_add_options --enable-ffmpeg" >> .mozconfig +echo "ac_add_options --enable-av1" >> .mozconfig + +%if 0%{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig -echo "ac_add_options --enable-dtrace" >> .mozconfig +echo "ac_add_options --enable-rust-debug" >> .mozconfig %else -%define optimize_flags "none" -# Fedora with GCC-7 needs to disable default build flags (mozbz#1342344) -%ifnarch s390 s390x -%define optimize_flags "-g -O2" -%endif -%ifarch %{arm} s390 s390x -# ARMv7 need that (rhbz#1426850) -%define optimize_flags "-g -O2 -fno-schedule-insns" -%endif -%ifarch ppc64le aarch64 -%define optimize_flags "-g -O2" -%endif -%if %{optimize_flags} != "none" +%global optimize_flags "none" +%if %{?optimize_flags} != "none" echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig %else echo 'ac_add_options --enable-optimize' >> .mozconfig %endif echo "ac_add_options --disable-debug" >> .mozconfig %endif - -%if %{?debug_build} -echo "ac_add_options --enable-debug" >> .mozconfig -echo "ac_add_options --disable-optimize" >> .mozconfig -%else -echo "ac_add_options --disable-debug" >> .mozconfig -%endif echo "ac_add_options --disable-strip" >> .mozconfig echo "ac_add_options --disable-install-strip" >> .mozconfig echo "ac_add_options --disable-tests" >> .mozconfig +echo "ac_add_options --disable-crashreporter" >> .mozconfig + +# Localization +%if %{with langpacks} echo "ac_add_options --with-l10n-base=$PWD/l10n" >> .mozconfig +%endif + +%if "%toolchain" == "clang" +echo "ac_add_options --with-libclang-path=`llvm-config%{?llvm_suffix} --libdir`" >> .mozconfig +%endif + +%ifarch s390x %{arm64} +echo "ac_add_options --disable-jit" >> .mozconfig +%endif + +%if 0%{?build_with_pgo} +echo "ac_add_options MOZ_PGO=1" >> .mozconfig +echo "ac_add_options --enable-lto" >> .mozconfig +%else +echo "ac_add_options --disable-lto" >> .mozconfig +%endif + +echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig + +# Remove executable bit to make brp-mangle-shebangs happy. +chmod -x third_party/rust/itertools/src/lib.rs +chmod a-x third_party/rust/ash/src/extensions/ext/*.rs +chmod a-x third_party/rust/ash/src/extensions/khr/*.rs +chmod a-x third_party/rust/ash/src/extensions/nv/*.rs + +# Remove unrecognized files +find extensions/gnu -name cose.manifest -delete + +#--------------------------------------------------------------------- %build -%if %{?system_sqlite} -# Do not proceed with build if the sqlite require would be broken: -# make sure the minimum requirement is non-empty, ... -sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 -# ... and that major number of the computed build-time version matches: -case "%{sqlite_build_version}" in - "$sqlite_version"*) ;; - *) exit 1 ;; -esac +# cbindgen +%if 0%{?use_bundled_cbindgen} +mkdir -p my_rust_vendor +cd my_rust_vendor +%{__tar} xf %{SOURCE17} +cd - +mkdir -p .cargo +cat > .cargo/config <> .mozconfig +echo "export AR=\"llvm-ar\"" >> .mozconfig +echo "export NM=\"llvm-nm\"" >> .mozconfig +echo "export RANLIB=\"llvm-ranlib\"" >> .mozconfig +echo "ac_add_options --enable-linker=lld" >> .mozconfig +echo "export CC=clang%{?llvm_suffix}" >> .mozconfig +echo "export CXX=clang++%{?llvm_suffix}" >> .mozconfig +%else +echo "export CC=gcc" >> .mozconfig +echo "export CXX=g++" >> .mozconfig +echo "export AR=\"gcc-ar\"" >> .mozconfig +echo "export NM=\"gcc-nm\"" >> .mozconfig +echo "export RANLIB=\"gcc-ranlib\"" >> .mozconfig +%endif + +%if 0%{?build_with_pgo} +echo "ac_add_options MOZ_PGO=1" >> .mozconfig +# PGO build doesn't work with ccache +export CCACHE_DISABLE=1 +%endif + +# Require 4 GB of RAM per CPU core +%global _smp_tasksize_proc 4096 +%if %{?less_optbuild} +echo "mk_add_options MOZ_MAKE_FLAGS=\"-j1\"" >> .mozconfig +%else +echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig +%endif + +echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig +echo "export STRIP=/bin/true" >> .mozconfig + +%if 0%{?launch_wayland_compositor} +cp -p %{SOURCE19} . +. ./run-wayland-compositor +%endif + +%if %{?debug_build} +export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true +%endif + +#Use python 3.11 for mach +sed -i -e 's|#!/usr/bin/env python3|#!/usr/bin/env python3.11|' mach + +./mach build -v 2>&1 | cat - || exit 1 + +%if 0%{?build_with_pgo} +kill $MUTTER_PID +%endif %install # set up our default bookmarks -%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html +%if 0%{?fedora} +%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html +cp -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html +%endif -make -C objdir install DESTDIR=$RPM_BUILD_ROOT +%make_install -C objdir ##Resize IceCat icon for i in 16 22 24 32 36 48 64 72 96 128 256 ; do - mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x${i}/apps - convert -geometry ${i} %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps + convert -geometry ${i} %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png done ##desktop file installation -mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications -install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/applications +mkdir -p %{buildroot}%{_datadir}/applications +desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE14} -##Install man page -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/man1 - -##Make sure locale works for langpacks -cat > objdir/dist/bin/browser/defaults/preferences/icecat-l10n.js << EOF -pref("general.useragent.locale", "chrome://global/locale/intl.properties"); -EOF +rm -rf %{buildroot}%{_bindir}/%{name} +%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE13} > %{buildroot}%{_bindir}/%{name} +chmod 755 %{buildroot}%{_bindir}/%{name} +# ##Extract langpacks, make any mods needed, repack the langpack, and install it. -%if %{build_langpacks} echo > %{name}.lang -mkdir -p $RPM_BUILD_ROOT%{langpackdir} +%if %{with langpacks} +mkdir -p %{buildroot}%{langpackdir} tar xf %{SOURCE4} for langpack in `ls langpacks/*.xpi`; do language=`basename $langpack .xpi` @@ -557,7 +606,7 @@ tar xf %{SOURCE4} zip -qq -r9mX ../${extensionID}.xpi * cd - - install -p -m 644 ${extensionID}.xpi $RPM_BUILD_ROOT%{langpackdir} + install -p -m 644 ${extensionID}.xpi %{buildroot}%{langpackdir} language=`echo $language | sed -e 's/-/_/g'` echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> %{name}.lang done @@ -567,17 +616,32 @@ rm -rf %{name}-langpacks function create_default_langpack() { language_long=$1 language_short=$2 -cd $RPM_BUILD_ROOT%{langpackdir} +cd %{buildroot}%{langpackdir} ln -s langpack-$language_long@icecat.mozilla.org.xpi langpack-$language_short@icecat.mozilla.org.xpi cd - echo "%%lang($language_short) %{langpackdir}/langpack-$language_short@icecat.mozilla.org.xpi" >> %{name}.lang } + +# Table of fallbacks for each language +#create_default_langpack "bn-IN" "bn" +create_default_langpack "es-AR" "es" +create_default_langpack "fy-NL" "fy" +create_default_langpack "ga-IE" "ga" +create_default_langpack "gu-IN" "gu" +create_default_langpack "hi-IN" "hi" +create_default_langpack "hy-AM" "hy" +create_default_langpack "nb-NO" "nb" +create_default_langpack "nn-NO" "nn" +create_default_langpack "pa-IN" "pa" +create_default_langpack "pt-PT" "pt" +create_default_langpack "sv-SE" "sv" +create_default_langpack "zh-TW" "zh" %endif # Remove copied libraries to speed up build -ln -sf %{icecatappdir}/libmozjs.so ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libmozjs.so -ln -sf %{icecatappdir}/libmozalloc.so ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libmozalloc.so -ln -sf %{icecatappdir}/libxul.so ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libxul.so +rm -f ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libmozjs.so +rm -f ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libmozalloc.so +rm -f ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libxul.so # Remove useless backup files rm -rf ${RPM_BUILD_ROOT}%{icecatappdir}/browser/extensions/SimpleSumOfUs@0xbeef.coffee @@ -587,89 +651,19 @@ ln -sf %{icecatappdir}/%{name}-bin ${RPM_BUILD_ROOT}%{icecatappdir}/%{name} # Use the system hunspell dictionaries rm -rf ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries -ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries +ln -s %{_datadir}/hunspell ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries -##Fix executable permissions of some files -for i in `find $RPM_BUILD_ROOT -type f \( -name "*.sh" -o -name "*.py" -o -name "xpcshell" \)`; do -chmod a+x $i -done +# Remove unused directories +rm -rf %{buildroot}%{_libdir}/%{icecat_devel} +rm -rf %{buildroot}%{_datadir}/idl/%{icecat_ver} +rm -rf %{buildroot}%{_includedir}/%{icecat_ver} +rm -rf %{buildroot}%{icecatappdir}/removed-files -mkdir -p $RPM_BUILD_ROOT%{_datadir}/metainfo -cat > $RPM_BUILD_ROOT%{_datadir}/metainfo/icecat.appdata.xml < - - icecat.desktop - CC0-1.0 - GNU version of Firefox browser - icecat - (MPL-1.1 or GPL-2.0+ or LGPL-2.0+) and GPL-3.0+ and MIT and BSD and ISC and ASL-2.0 and MPL-2.0 - - Internet - Web Browser - - -

- GNUzilla is the GNU version of the Mozilla suite, and GNU IceCat is the GNU version of the Firefox ESR browser. -

-

- Its main advantage is an ethical one: it is entirely free software: - while the Firefox source code from the Mozilla project is free software, - they distribute and recommend non-free software as plug-ins and addons. - Also their trademark license restricts distribution in several ways incompatible with freedom 0. -

-

- Extensions included to this version of IceCat: - - LibreJS - GNU LibreJS aims to address the JavaScript problem described in Richard - Stallman's article The JavaScript Trap. - - SpyBlock - Blocks privacy trackers while in normal browsing mode, and all third party - requests when in private browsing mode. Based on Adblock Plus. - - AboutIceCat - Adds a custom "about:icecat" homepage with links to information about the - free software and privacy features in IceCat, and check-boxes to enable - and disable the ones more prone to break websites. - - HTML5-video-everywhere - Uses the native video player to play embedded videos from different sources - - Fingerprinting countermeasures: Fingerprinting is a series of techniques - allowing to uniquely identify a browser based on specific characteristics of - that particular instance (like what fonts are available in that machine). - Unlike cookies the user cannot opt-out of being tracked this way, - so the browser has to avoid giving away that kind of hints. -

-
- http://www.gnu.org/software/gnuzilla/ - - - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1.png - - - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat2.png - - - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat3.png - - - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat4.png - - - sagitter_at_fedoraproject.org -
-EOF +# Remove gtk2 support as flash plugin is no longer supported +rm -rf %{buildroot}%{icecatappdir}/gtk2 -cat > $RPM_BUILD_ROOT%{_datadir}/metainfo/icecat.metainfo.xml < - - mozilla-requestpolicy - icecat.desktop - mozilla-requestpolicy - Extension that gives you control over cross-site requests - https://requestpolicycontinued.github.io/ - https://github.com/requestpolicycontinued/requestpolicy/issues - CC0-1.0 - GPL-3.0+ and LGPL-3.0+ - -EOF +mkdir -p %{buildroot}%{_metainfodir} +install -pm 644 %{SOURCE10} %{buildroot}%{_metainfodir}/ # Moves defaults/preferences to browser/defaults/preferences %pretrans -p @@ -691,543 +685,38 @@ if (posix.stat("%{icecatappdir}/browser/defaults/preferences", "type") == "link" end %check -desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop -appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/*.appdata.xml +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml +desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop -%if %{build_langpacks} -%files -f %{name}.lang -%else +%if %{with langpacks_subpkg} %files +%dir %{langpackdir} +%else +%files -f %{name}.lang %endif -%doc Changelog.IceCat README.* AUTHORS -%license LICENSE LEGAL COPYING-* +%doc README.* AUTHORS +%license LICENSE COPYING-* %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*x*/apps/%{name}*.png -%{_datadir}/metainfo/%{name}.appdata.xml -%{_datadir}/metainfo/%{name}.metainfo.xml -%{_mandir}/man1/%{name}* +%{_metainfodir}/*.appdata.xml +%dir %{icecatappdir} +%{icecatappdir}/glxtest +%{icecatappdir}/vaapitest %{icecatappdir}/browser/ %{icecatappdir}/defaults/ %{icecatappdir}/dictionaries %{icecatappdir}/icecat* +%{icecatappdir}/fonts/ %{icecatappdir}/*.so %{icecatappdir}/*.ini %{icecatappdir}/omni.ja -%{icecatappdir}/run-icecat.sh %{icecatappdir}/dependentlibs.list -%{icecatappdir}/plugin-container +%{icecatappdir}/pingsender %{icecatappdir}/gmp-clearkey/ -%{icecatappdir}/chrome.manifest -%{icecatappdir}/fonts/EmojiOneMozilla.ttf -%{icecatappdir}/gtk2/*.so -%if !%{?system_libicu} -%{icecatappdir}/icudt*.dat +%ifarch %{arm64} riscv64 +%{icecatappdir}/v4l2test %endif -%if !%{?system_nss} -%{icecatappdir}/libfreeblpriv3.chk -%{icecatappdir}/libnssdbm3.chk -%{icecatappdir}/libsoftokn3.chk -%endif -%exclude %{icecatappdir}/removed-files -%if 0%{build_langpacks} -%dir %{langpackdir} -%endif -%exclude %{_libdir}/%{icecat_devel}/ -%exclude %{_datadir}/idl/%{icecat_ver}/ -%exclude %{_includedir}/%{icecat_ver}/ %changelog -* Tue Mar 27 2018 Antonio Trande - 52.7.3-1 -- Update to 52.7.3 - -* Tue Mar 20 2018 Antonio Trande - 52.7.2-1 -- Update to 52.7.2 - -* Sat Mar 10 2018 Antonio Trande - 52.7.0-1 -- Update to 52.7.0 - -* Tue Feb 27 2018 Antonio Trande - 52.6.0-7 -- HTTPS Everywhere updated to 2018.1.11 -- "goteo.org payments with free JS" updated to 1.1 -- "LibreJS compatible Pay.gov" updated to 1.3 -- "Reveal hidden HTML" updated to 1.6 -- Enabled WebRTC, but prevent leaking the LAN ip - -* Sun Feb 18 2018 Antonio Trande - 52.6.0-6 -- Add gcc gcc-c++ BR - -* Sun Feb 18 2018 Antonio Trande - 52.6.0-5 -- Rebuild for libevent-2.1.8 - -* Wed Feb 07 2018 Fedora Release Engineering - 52.6.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sun Jan 28 2018 Antonio Trande - 52.6.0-3 -- Rebuild for libvpx again - -* Fri Jan 26 2018 Tom Callaway - 52.6.0-2 -- rebuild for new libvpx - -* Wed Jan 24 2018 Antonio Trande - 52.6.0-1 -- Update to 52.6.0 - -* Thu Jan 11 2018 Igor Gnatenko - 52.5.3-4 -- Remove obsolete scriptlets - -* Sun Jan 07 2018 Antonio Trande - 52.5.3-3 -- Set build against NSS-3.34/NSPR-4.17.0 at least - -* Sun Jan 07 2018 Antonio Trande - 52.5.3-2 -- Patched for mozilla bug-1427870 - -* Sun Dec 31 2017 Antonio Trande - 52.5.3-1 -- Update to 52.5.3 -- Use 'with-l10n' option - -* Fri Dec 29 2017 Antonio Trande - 52.5.2-1 -- Update to 52.5.2 -- WebRTC is always disabled -- Add JACK audio backend (bz#1528742) - -* Thu Dec 21 2017 Antonio Trande - 52.3.0-4 -- Appdata file moved into metainfo data directory - -* Mon Dec 04 2017 Caolán McNamara - 52.3.0-3 -- rebuild for hunspell-1.5.2 - -* Sat Sep 02 2017 Antonio Trande - 52.3.0-2 -- Enable language files - -* Wed Aug 16 2017 Antonio Trande - 52.3.0-1 -- Update to 52.3.0 - -* Thu Aug 03 2017 Antonio Trande - 52.2.1-1 -- Update to 52.2.1 -- ICU source code patched to work on big-endian architectures - -* Wed Jul 26 2017 Fedora Release Engineering - 52.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Mon May 15 2017 Fedora Release Engineering - 52.1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Sat May 06 2017 Antonio Trande - 52.1.0-2 -- Fix language files - -* Sat May 06 2017 Jens Lody - 52.1.0-1 -- Update to 52.1.0 -- Remove obsolete firefox-debug.patch -- Spec-file: fix typo in description - -* Sun Apr 16 2017 Antonio Trande - 52.0.2-3 -- Enable languages - -* Fri Apr 14 2017 Antonio Trande - 52.0.2-2 -- Update to 52.0.2 -- Add patch for mozbz#1158076 - enable dark theme by pref - -* Sun Mar 26 2017 Antonio Trande - 52.0.1-5 -- Skia support disabled on ARM/ix86 builds (failed for memory exhausted) - -* Sun Mar 26 2017 Antonio Trande - 52.0.1-4 -- Downgrade optimization level on ARM builds (failed for memory exhausted) -- Use one job with Make on ix86 - -* Wed Mar 22 2017 Antonio Trande - 52.0.1-3 -- Added fix for mozbz#1158076 - -* Mon Mar 20 2017 Antonio Trande - 52.0.1-2 -- Set cflags/libs options for NSS/NSPR -- Add --disable-elf-hack - -* Sun Mar 19 2017 Antonio Trande - 52.0.1-1 -- Update to 52.0.1 -- All patches synchronized with firefox - -* Mon Mar 06 2017 Jens Lody - 45.7.0-8 -- aarch64build-fix (taken from mozjs45) -- include aarch64 again - -* Sun Mar 05 2017 Antonio Trande - 45.7.0-7 -- Build with language files -- Use new source archive -- Exclude aarch64 - -* Sun Mar 05 2017 Jens Lody - 45.7.0-6 -- do not set debug-build-flag - -* Sun Mar 05 2017 Jens Lody - 45.7.0-5 -- (Re-)add language-download.script and make Source-tag unconditional. -- Fix debug build. - -* Sat Feb 18 2017 Antonio Trande - 45.7.0-3 -- Optimization flags disabled on arm/arm64 - -* Thu Feb 16 2017 Jens Lody - - 45.7.0-3 -- Fix gcc7 build, with backport of fix for mozb#1269171 - -* Fri Feb 10 2017 Fedora Release Engineering - 45.7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Sat Feb 04 2017 Antonio Trande - 45.7.0-1 -- Update to 45.7.0 - -* Sat Jan 21 2017 Antonio Trande - 45.5.1-7 -- Test for trying ICU patch - -* Fri Jan 20 2017 Antonio Trande - 45.5.1-6 -- System ICU disabled on Fedora > 25 - -* Fri Jan 20 2017 Antonio Trande - 45.5.1-5 -- Patched to make compatible with NSS 3.28.1 (bz#1414987) - -* Thu Jan 05 2017 Antonio Trande - 45.5.1-4 -- Conformed to new rules for scriptlets - -* Tue Dec 13 2016 Caolán McNamara - 45.5.1-3 -- rebuild for hunspell-1.5.4 - -* Fri Dec 02 2016 Antonio Trande - 45.5.1-2 -- Keep workaround for bz#1332926 - -* Fri Dec 02 2016 Antonio Trande - 45.5.1-1 -- Update to 45.5.1 - -* Sun Nov 27 2016 Antonio Trande - 45.3.0-0.6.beta -- Debug build -- Debug builds patched (mozb#1013882) -- Patched for removing unnecessary warns - -* Sun Sep 04 2016 Antonio Trande - 45.3.0-0.5.beta -- Drop obsolete patch - -* Sat Sep 03 2016 Antonio Trande - 45.3.0-0.4.beta -- Use MOZ_SMP_FLAGS instead of MOZ_MAKE_FLAGS - -* Thu Sep 01 2016 Antonio Trande - 45.3.0-0.3.beta -- Update desktop file's translations -- Enable jemalloc - -* Thu Sep 01 2016 Antonio Trande - 45.3.0-0.2.beta -- Disable optimization on ARM - -* Mon Aug 29 2016 Antonio Trande - 45.3.0-0.1.beta -- Update to 45.3.0 (beta) -- Drop old patches -- Reset default compiler flags -- Filtering private libraries - -* Fri Jul 22 2016 Tom Callaway - 38.8.0-13 -- rebuild for libvpx 1.6.0 - -* Wed Jun 29 2016 Antonio Trande - 38.8.0-12 -- Optimization level increased to -O1 - -* Tue Jun 28 2016 Antonio Trande - 38.8.0-11 -- Fix appadata file's tags - -* Sun Jun 26 2016 Antonio Trande - 38.8.0-10 -- Rebuild with newest icecat-38.8.0-gnu2 source archive (24 June) - -* Sun Jun 26 2016 Jens Lody - 38.8.0-9 -- Workaround for #1332926 - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-8 -- Set MOZ_SMP_FLAGS - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-7 -- Undo latest change - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-6 -- Set C++14 standard flag - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-5 -- Set C++ standard flag - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-4 -- Disable install stripping -- Disable builds for debugging - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-3 -- Enable builds for debugging - -* Fri May 13 2016 Antonio Trande - 38.8.0-2 -- Remove additional flag - -* Fri May 13 2016 Antonio Trande - 38.8.0-1 -- Update to 38.8.0 - -* Mon Apr 18 2016 Caolán McNamara - 38.7.1-4 -- rebuild for hunspell 1.4.0 - -* Fri Apr 15 2016 David Tardon - 38.7.1-3 -- rebuild for ICU 57.1 - -* Sat Apr 09 2016 Antonio Trande - 38.7.1-2 -- Downgrade optimization level on ARM - -* Fri Apr 08 2016 Antonio Trande - 38.7.1-1 -- Update to 38.7.1 - -* Thu Feb 04 2016 Antonio Trande - 38.6.0-1 -- Update to 38.6.0 -- Patched for GCC6 builds -- Cut off Provides bundled libraries except xulrunner - -* Thu Feb 04 2016 Fedora Release Engineering - 38.5.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Jan 04 2016 Antonio Trande - 38.5.2-4 -- Fix description of appdata file - -* Mon Jan 04 2016 Antonio Trande - 38.5.2-3 -- Fix validating of desktop file - -* Sun Jan 03 2016 Antonio Trande - 38.5.2-2 -- .desktop .appdata and .metainfo files renamed (bz#1295234) - -* Fri Jan 01 2016 Antonio Trande - 38.5.2-1 -- Update to 38.5.2 - -* Fri Dec 18 2015 Antonio Trande - 38.5.0-1 -- Update to 38.5.0 - -* Tue Dec 08 2015 Antonio Trande - 38.4.0-3 -- Force -fstack-protector-all flag (bz#1283307) - -* Tue Dec 1 2015 Tom Callaway - 38.4.0-2 -- rebuild for libvpx 1.5.0 - -* Tue Nov 17 2015 Antonio Trande - 38.4.0-1 -- Update to 38.4.0 - -* Tue Nov 03 2015 Antonio Trande - 38.3.0-12 -- ARM neon support disabled on aarch64 - -* Sat Oct 31 2015 Antonio Trande - 38.3.0-11 -- Rebuild for ICU 56 - -* Wed Oct 28 2015 Antonio Trande - 38.3.0-10 -- Rebuild with RPM_LD_FLAGS - -* Wed Oct 28 2015 David Tardon - 38.3.0-9 -- rebuild for ICU 56.1 - -* Tue Oct 20 2015 Antonio Trande - 38.3.0-8 -- Active hardened_build - -* Tue Oct 13 2015 Antonio Trande - 38.3.0-7 -- Rebuilt with updated Addons - -* Mon Oct 12 2015 Antonio Trande - 38.3.0-6 -- Fixed header files directory for freetype-2.6.1 - -* Mon Oct 12 2015 Antonio Trande - 38.3.0-5 -- Languages packaged - -* Tue Oct 06 2015 Antonio Trande - 38.3.0-4 -- WebRTC disabled on extra arches - -* Tue Oct 06 2015 Antonio Trande - 38.3.0-3 -- Updated appdata and manpage files - -* Mon Oct 05 2015 Antonio Trande - 38.3.0-2 -- Disabled crashreporter on F22+ - -* Sat Oct 03 2015 Antonio Trande - 38.3.0-1 -- Update to 38.3.0 -- Patches updated -- Language files not packaged -- Build defined for Gtk3 - -* Thu Aug 13 2015 Antonio Trande - 31.8.0-5 -- Added backported patch for CVE-2015-4473_4482_4488_4489_4491_4492 vulnerabilities - -* Thu Aug 13 2015 Antonio Trande - 31.8.0-4 -- Added backported patch for CVE-2015-4495 vulnerability - -* Tue Jul 21 2015 Antonio Trande - 31.8.0-3 -- Fixed on secondary arches - -* Mon Jul 20 2015 Antonio Trande - 31.8.0-2 -- Un-bundle libvpx-1.4 - -* Fri Jul 17 2015 Antonio Trande - 31.8.0-1 -- Update to 31.8.0 - -* Sun Jul 12 2015 Antonio Trande - 31.7.0-8 -- Packaged IceCat 31.7 in Fedora 21 - -* Fri Jul 03 2015 Antonio Trande - 31.7.0-7 -- Fix .metainfo.xml file - -* Thu Jul 02 2015 Antonio Trande - 31.7.0-6 -- Added .metainfo.xml file - -* Thu Jun 18 2015 Antonio Trande - 31.7.0-5 -- Added options --enable-tree-freetype --enable-stdcxx-compat -- Added patch for Freetype-2.6 headers - -* Wed Jun 17 2015 Fedora Release Engineering - 31.7.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sun Jun 14 2015 Antonio Trande - 31.7.0-3 -- Re-built locale files -- Re-organized mozconfig options -- Compiled with ccache - -* Wed Jun 10 2015 Antonio Trande - 31.7.0-2 -- Unpacked files found - -* Mon Jun 08 2015 Antonio Trande - 31.7.0-1 -- Update to 31.7.0 -- Make sure locale works for langpacks -- Set default bookmarks -- Made appdata file -- devel package obsoleted - -* Mon May 04 2015 Antonio Trande - 31.6.0-6 -- Required VPX from system for < F23 - -* Sun May 03 2015 Antonio Trande - 31.6.0-5 -- libvpx-1.3.0 bundled only in >= F23 - -* Tue Apr 07 2015 Antonio Trande - 31.6.0-4 -- Disable optimization flags (when GCC5 compiles) on ARM - -* Tue Apr 07 2015 Antonio Trande - 31.6.0-3 -- Compiled against bundle libvpx-1.3.0 - -* Mon Apr 06 2015 Tom Callaway - 31.6.0-2 -- Rebuild for libvpx 1.4.0 - -* Sat Apr 04 2015 Antonio Trande - 31.6.0-1 -- Update to 31.6.0 - -* Mon Mar 16 2015 Antonio Trande - 31.5.0-2 -- New rebuild to fix profile's storage problem - -* Thu Mar 12 2015 Antonio Trande - 31.5.0-1 -- Update to 31.5.0 -- Patched to fix Mozilla Bug1021171 -- crashreporter disabled on > F21 -- Improved .desktop file - -* Wed Feb 04 2015 Petr Machata - 31.4.0-5 -- Bump for rebuild. - -* Mon Feb 02 2015 Antonio Trande - 31.4.0-4 -- Desktop file missing %%u (bz#1188078) - -* Sat Jan 31 2015 Antonio Trande - 31.4.0-3 -- Annulled the user-agent string customization - -* Thu Jan 29 2015 Antonio Trande - 31.4.0-2 -- Added %%license macro - -* Thu Jan 29 2015 Antonio Trande - 31.4.0-1 -- Update to 31.4.0 -- Added MPLv2.0 license of HTML5-video-everywhere extension -- Description updated - -* Mon Jan 26 2015 David Tardon - 31.2.0-8 -- rebuild for ICU 54.1 - -* Wed Jan 21 2015 Antonio Trande - 31.2.0-7 -- Package now requires system-bookmarks (bz#1184297) - -* Wed Nov 26 2014 Antonio Trande - 31.2.0-6 -- libjpeg-turbo unbundled (bz#1164815) - -* Thu Nov 06 2014 Antonio Trande - 31.2.0-5 -- Added -Wno-error=declaration-after-statement -- Built against GStreamer-1.0 -- Package compiled against bundled JPEG - -* Sat Oct 25 2014 Antonio Trande - 31.2.0-4 -- Removed -fexceptions flags from Fedora optflags - -* Thu Oct 23 2014 Antonio Trande - 31.2.0-3 -- Added -Wformat-security flags -- Added special link flags for ARM - -* Wed Oct 22 2014 Antonio Trande - 31.2.0-2 -- Fixed compiler flags - -* Tue Oct 21 2014 Antonio Trande - 31.2.0-1 -- Update to 31.2.0 -- Added 'configure' options -- Built against system NSS/NSPR - -* Thu Oct 16 2014 Antonio Trande - 31.1.1-1 -- Update to 31.1.1 -- New bundled files (bz#1153135) -- Static sub-package is not built anymore -- Man-page updated -- Spyblock addon included - -* Tue Aug 26 2014 Antonio Trande - 24.0-14 -- Added "Provides: webclient" -- Installed manpage file - -* Tue Aug 19 2014 Antonio Trande - 24.0-13 -- Removed system xulrunner conditional -- Ghosted all .xpi language files (handled by %%find_lang) -- Added BSD, ISC, MIT, Apache2.0 licenses - -* Sat Aug 09 2014 Antonio Trande - 24.0-12 -- Removed HTTPS-everywhere RequestPolicy extensions (patch7) - -* Thu Jul 24 2014 Antonio Trande - 24.0-11 -- Remove precompiled .egg files -- Remove bundled jar/class files -- Delete chrpaths -- Added 'Public Domain' license -- Added a patch for using system Python Virtualenv (patch6) - -* Wed Jul 16 2014 Antonio Trande - 24.0-10 -- Added freetype2 system-headers list for Fedora>=21 (patch5) - -* Fri Apr 04 2014 Antonio Trande - 24.0-9 -- Defined other bundled() Provides - -* Sat Mar 29 2014 Antonio Trande - 24.0-8 -- Use system nspr - -* Wed Mar 26 2014 Antonio Trande - 24.0-7 -- Removed much more bundled files (added related BR packages) -- Build browser and xulrunner -- Added freetype2 reference patch - -* Thu Feb 27 2014 Antonio Trande - 24.0-6 -- Sources patched to use system ogg/opus/vorbis libraries -- Build browser alone - -* Wed Feb 05 2014 Antonio Trande - 24.0-5 -- Fix some executable permissions -- Added some tricks -- Build browser and xulrunner -- Defined a conditional macro for xulrunner -- Built a static sub-package -- Added COPYING separated license files -- Added bundled() Provides - -* Mon Jan 27 2014 Antonio Trande - 24.0-4 -- Build browser alone -- Added libffi/libpng linkage from system to .mozconfig file -- Added a patch to exclude APNG support missing error for libpng -- Added libpng-devel BR - -* Tue Jan 14 2014 Antonio Trande - 24.0-3 -- Removed bundled files -- Added nspr/nss Requires - -* Wed Jan 08 2014 Antonio Trande - 24.0-2 -- Timestamp preserving for the 'install' commands -- Added a comment interpretation to the License tag -- Defined all command calls in normal mode - -* Sun Jan 05 2014 Antonio Trande - 24.0-1 -- Initial package - +%autochangelog diff --git a/mozilla-1005640-accept-lang.patch b/mozilla-1005640-accept-lang.patch deleted file mode 100644 index 29d3833..0000000 --- a/mozilla-1005640-accept-lang.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm.1005640-accept-lang firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm ---- firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm.1005640-accept-lang 2017-01-16 17:16:52.000000000 +0100 -+++ firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm 2017-01-18 12:35:29.380394216 +0100 -@@ -2852,6 +2852,11 @@ this.XPIProvider = { - this.addAddonsToCrashReporter(); - } - -+ // Save locale settings to compare it later to check whenever some addon -+ // changed it. -+ var previousLocale = Cc["@mozilla.org/chrome/chrome-registry;1"] -+ .getService(Ci.nsIXULChromeRegistry).getSelectedLocale("global"); -+ - try { - AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_begin"); - -@@ -2880,6 +2885,14 @@ this.XPIProvider = { - AddonManagerPrivate.recordException("XPI-BOOTSTRAP", "startup failed", e); - } - -+ var currentLocale = Cc["@mozilla.org/chrome/chrome-registry;1"] -+ .getService(Ci.nsIXULChromeRegistry).getSelectedLocale("global"); -+ if (currentLocale != previousLocale) { -+ // We have to flush string cache if the locale was changed during loading -+ // of addons -+ Services.obs.notifyObservers(null, "chrome-flush-caches", null); -+ } -+ - // Let these shutdown a little earlier when they still have access to most - // of XPCOM - Services.obs.addObserver({ diff --git a/mozilla-1158076-1.patch b/mozilla-1158076-1.patch deleted file mode 100644 index e409386..0000000 --- a/mozilla-1158076-1.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -up firefox-52.0.2/modules/libpref/init/all.js.1158076-1 firefox-52.0.2/modules/libpref/init/all.js ---- firefox-52.0.2/modules/libpref/init/all.js.1158076-1 2017-03-31 09:44:28.377647329 +0200 -+++ firefox-52.0.2/modules/libpref/init/all.js 2017-03-31 09:46:02.847234586 +0200 -@@ -4646,6 +4646,8 @@ pref("gfx.apitrace.enabled",false); - pref("gfx.content.use-native-pushlayer", true); - #ifdef MOZ_WIDGET_GTK - pref("gfx.xrender.enabled",false); -+pref("widget.chrome.allow-gtk-dark-theme", false); -+pref("widget.content.allow-gtk-dark-theme", false); - #endif - #endif - -diff -up firefox-52.0.2/widget/gtk/nsLookAndFeel.cpp.1158076-1 firefox-52.0.2/widget/gtk/nsLookAndFeel.cpp ---- firefox-52.0.2/widget/gtk/nsLookAndFeel.cpp.1158076-1 2017-03-31 09:44:28.374647342 +0200 -+++ firefox-52.0.2/widget/gtk/nsLookAndFeel.cpp 2017-03-31 09:44:35.125617758 +0200 -@@ -1134,16 +1134,27 @@ nsLookAndFeel::Init() - // with wrong color theme, see Bug 972382 - GtkSettings *settings = gtk_settings_get_for_screen(gdk_screen_get_default()); - -- // Disable dark theme because it interacts poorly with widget styling in -- // web content (see bug 1216658). -- // To avoid triggering reload of theme settings unnecessarily, only set the -- // setting when necessary. - const gchar* dark_setting = "gtk-application-prefer-dark-theme"; -- gboolean dark; -- g_object_get(settings, dark_setting, &dark, nullptr); -+ gboolean darkThemeDefault; -+ g_object_get(settings, dark_setting, &darkThemeDefault, nullptr); - -- if (dark && !PR_GetEnv("MOZ_ALLOW_GTK_DARK_THEME")) { -- g_object_set(settings, dark_setting, FALSE, nullptr); -+ // Dark themes interacts poorly with widget styling (see bug 1216658). -+ // We disable dark themes by default for all processes (chrome, web content) -+ // but allow user to overide it by prefs. -+ if (darkThemeDefault) { -+ bool allowDarkTheme; -+ if (XRE_IsContentProcess()) { -+ allowDarkTheme = -+ mozilla::Preferences::GetBool("widget.content.allow-gtk-dark-theme", -+ false); -+ } else { -+ allowDarkTheme = (PR_GetEnv("MOZ_ALLOW_GTK_DARK_THEME") != nullptr) || -+ mozilla::Preferences::GetBool("widget.chrome.allow-gtk-dark-theme", -+ false); -+ } -+ if (!allowDarkTheme) { -+ g_object_set(settings, dark_setting, FALSE, nullptr); -+ } - } - - // Scrollbar colors diff --git a/mozilla-1158076-2.patch b/mozilla-1158076-2.patch deleted file mode 100644 index 16079b3..0000000 --- a/mozilla-1158076-2.patch +++ /dev/null @@ -1,184 +0,0 @@ -diff --git a/widget/gtk/nsLookAndFeel.h b/widget/gtk/nsLookAndFeel.h ---- a/widget/gtk/nsLookAndFeel.h -+++ b/widget/gtk/nsLookAndFeel.h -@@ -76,13 +76,14 @@ protected: - nscolor sTextSelectedBackground; - nscolor sMozScrollbar; - #if (MOZ_WIDGET_GTK == 3) - nscolor sInfoBarText; - #endif - char16_t sInvisibleCharacter; - float sCaretRatio; - bool sMenuSupportsDrag; -+ bool mInitialized; - -- void Init(); -+ void EnsureInit(); - }; - - #endif - -diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp ---- a/widget/gtk/nsLookAndFeel.cpp -+++ b/widget/gtk/nsLookAndFeel.cpp -@@ -45,19 +45,19 @@ using mozilla::LookAndFeel; - (int)((c).blue*255), (int)((c).alpha*255))) - - nsLookAndFeel::nsLookAndFeel() - : nsXPLookAndFeel(), - #if (MOZ_WIDGET_GTK == 2) - mStyle(nullptr), - #endif - mDefaultFontCached(false), mButtonFontCached(false), -- mFieldFontCached(false), mMenuFontCached(false) -+ mFieldFontCached(false), mMenuFontCached(false), -+ mInitialized(false) - { -- Init(); - } - - nsLookAndFeel::~nsLookAndFeel() - { - #if (MOZ_WIDGET_GTK == 2) - g_object_unref(mStyle); - #endif - } -@@ -219,16 +219,18 @@ GetBorderColors(GtkStyleContext* aContex - *aDarkColor = GDK_RGBA_TO_NS_RGBA(darkColor); - return ret; - } - #endif - - nsresult - nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - { -+ EnsureInit(); -+ - #if (MOZ_WIDGET_GTK == 3) - GdkRGBA gdk_color; - #endif - nsresult res = NS_OK; - - switch (aID) { - // These colors don't seem to be used for anything anymore in Mozilla - // (except here at least TextSelectBackground and TextSelectForeground) -@@ -670,16 +672,21 @@ nsLookAndFeel::GetIntImpl(IntID aID, int - break; - } - - res = nsXPLookAndFeel::GetIntImpl(aID, aResult); - if (NS_SUCCEEDED(res)) - return res; - res = NS_OK; - -+ // We use delayed initialization by EnsureInit() here -+ // to make sure mozilla::Preferences is available (Bug 115807). -+ // eIntID_UseAccessibilityTheme is requested before user preferences -+ // are read, and so EnsureInit(), which depends on preference values, -+ // is deliberately delayed until required. - switch (aID) { - case eIntID_CaretBlinkTime: - { - GtkSettings *settings; - gint blink_time; - gboolean blink; - - settings = gtk_settings_get_default (); -@@ -832,16 +839,17 @@ nsLookAndFeel::GetIntImpl(IntID aID, int - case eIntID_IMESelectedRawTextUnderlineStyle: - case eIntID_IMESelectedConvertedTextUnderline: - aResult = NS_STYLE_TEXT_DECORATION_STYLE_NONE; - break; - case eIntID_SpellCheckerUnderlineStyle: - aResult = NS_STYLE_TEXT_DECORATION_STYLE_WAVY; - break; - case eIntID_MenuBarDrag: -+ EnsureInit(); - aResult = sMenuSupportsDrag; - break; - case eIntID_ScrollbarButtonAutoRepeatBehavior: - aResult = 1; - break; - case eIntID_SwipeAnimationEnabled: - aResult = 0; - break; -@@ -872,16 +880,17 @@ nsLookAndFeel::GetFloatImpl(FloatID aID, - switch (aID) { - case eFloatID_IMEUnderlineRelativeSize: - aResult = 1.0f; - break; - case eFloatID_SpellCheckerUnderlineRelativeSize: - aResult = 1.0f; - break; - case eFloatID_CaretAspectRatio: -+ EnsureInit(); - aResult = sCaretRatio; - break; - default: - aResult = -1.0; - res = NS_ERROR_FAILURE; - } - return res; - } -@@ -1052,21 +1061,25 @@ nsLookAndFeel::GetFontImpl(FontID aID, n - } - - aFontName = *cachedFontName; - aFontStyle = *cachedFontStyle; - return true; - } - - void --nsLookAndFeel::Init() -+nsLookAndFeel::EnsureInit() - { - GdkColor colorValue; - GdkColor *colorValuePtr; - -+ if (mInitialized) -+ return; -+ mInitialized = true; -+ - #if (MOZ_WIDGET_GTK == 2) - NS_ASSERTION(!mStyle, "already initialized"); - // GtkInvisibles come with a refcount that is not floating - // (since their initialization code calls g_object_ref_sink) and - // their destroy code releases that reference (which means they - // have to be explicitly destroyed, since calling unref enough - // to cause destruction would lead to *another* unref). - // However, this combination means that it's actually still ok -@@ -1445,16 +1458,17 @@ nsLookAndFeel::Init() - - gtk_widget_destroy(window); - } - - // virtual - char16_t - nsLookAndFeel::GetPasswordCharacterImpl() - { -+ EnsureInit(); - return sInvisibleCharacter; - } - - void - nsLookAndFeel::RefreshImpl() - { - nsXPLookAndFeel::RefreshImpl(); - -@@ -1463,15 +1477,15 @@ nsLookAndFeel::RefreshImpl() - mFieldFontCached = false; - mMenuFontCached = false; - - #if (MOZ_WIDGET_GTK == 2) - g_object_unref(mStyle); - mStyle = nullptr; - #endif - -- Init(); -+ mInitialized = false; - } - - bool - nsLookAndFeel::GetEchoPasswordImpl() { - return false; - } diff --git a/mozilla-1158076.patch b/mozilla-1158076.patch deleted file mode 100644 index 8a90be5..0000000 --- a/mozilla-1158076.patch +++ /dev/null @@ -1,185 +0,0 @@ -diff -up firefox-52.0/modules/libpref/init/all.js.1158076 firefox-52.0/modules/libpref/init/all.js ---- firefox-52.0/modules/libpref/init/all.js.1158076 2017-03-22 10:05:22.318067553 +0100 -+++ firefox-52.0/modules/libpref/init/all.js 2017-03-22 10:07:15.360555913 +0100 -@@ -4646,6 +4646,7 @@ pref("gfx.apitrace.enabled",false); - pref("gfx.content.use-native-pushlayer", true); - #ifdef MOZ_WIDGET_GTK - pref("gfx.xrender.enabled",false); -+pref("widget.allow-gtk-dark-theme", false); - #endif - #endif - -diff -up firefox-52.0/widget/gtk/mozgtk/mozgtk.c.1158076 firefox-52.0/widget/gtk/mozgtk/mozgtk.c ---- firefox-52.0/widget/gtk/mozgtk/mozgtk.c.1158076 2017-03-22 10:05:22.313067576 +0100 -+++ firefox-52.0/widget/gtk/mozgtk/mozgtk.c 2017-03-22 10:08:34.122199432 +0100 -@@ -522,6 +522,7 @@ STUB(gdk_x11_display_get_type) - STUB(gtk_box_new) - STUB(gtk_cairo_should_draw_window) - STUB(gtk_cairo_transform_to_window) -+STUB(gtk_css_provider_get_named) - STUB(gtk_combo_box_text_append) - STUB(gtk_drag_set_icon_surface) - STUB(gtk_get_major_version) -@@ -548,6 +549,7 @@ STUB(gtk_scale_new) - STUB(gtk_scrollbar_new) - STUB(gtk_style_context_add_class) - STUB(gtk_style_context_add_region) -+STUB(gtk_style_context_add_provider_for_screen) - STUB(gtk_style_context_get) - STUB(gtk_style_context_get_background_color) - STUB(gtk_style_context_get_border) -@@ -573,6 +575,7 @@ STUB(gtk_style_context_set_path) - STUB(gtk_style_context_set_parent) - STUB(gtk_style_context_set_state) - STUB(gtk_style_properties_lookup_property) -+STUB(gtk_style_provider_get_type) - STUB(gtk_tree_view_column_get_button) - STUB(gtk_widget_get_preferred_size) - STUB(gtk_widget_get_state_flags) -diff -up firefox-52.0/widget/gtk/nsLookAndFeel.cpp.1158076 firefox-52.0/widget/gtk/nsLookAndFeel.cpp ---- firefox-52.0/widget/gtk/nsLookAndFeel.cpp.1158076 2017-03-22 10:05:22.314067571 +0100 -+++ firefox-52.0/widget/gtk/nsLookAndFeel.cpp 2017-03-22 10:07:56.914367838 +0100 -@@ -50,9 +50,9 @@ nsLookAndFeel::nsLookAndFeel() - mStyle(nullptr), - #endif - mDefaultFontCached(false), mButtonFontCached(false), -- mFieldFontCached(false), mMenuFontCached(false) -+ mFieldFontCached(false), mMenuFontCached(false), -+ mInitialized(false) - { -- Init(); - } - - nsLookAndFeel::~nsLookAndFeel() -@@ -224,6 +224,8 @@ GetBorderColors(GtkStyleContext* aContex - nsresult - nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - { -+ EnsureInit(); -+ - #if (MOZ_WIDGET_GTK == 3) - GdkRGBA gdk_color; - #endif -@@ -675,6 +677,8 @@ nsLookAndFeel::GetIntImpl(IntID aID, int - return res; - res = NS_OK; - -+ // We use delayed initialization by EnsureInit() here -+ // to ensure mozilla::Preferences is available (see Bug 1158076). - switch (aID) { - case eIntID_CaretBlinkTime: - { -@@ -837,6 +841,7 @@ nsLookAndFeel::GetIntImpl(IntID aID, int - aResult = NS_STYLE_TEXT_DECORATION_STYLE_WAVY; - break; - case eIntID_MenuBarDrag: -+ EnsureInit(); - aResult = sMenuSupportsDrag; - break; - case eIntID_ScrollbarButtonAutoRepeatBehavior: -@@ -877,6 +882,7 @@ nsLookAndFeel::GetFloatImpl(FloatID aID, - aResult = 1.0f; - break; - case eFloatID_CaretAspectRatio: -+ EnsureInit(); - aResult = sCaretRatio; - break; - default: -@@ -1057,11 +1063,15 @@ nsLookAndFeel::GetFontImpl(FontID aID, n - } - - void --nsLookAndFeel::Init() -+nsLookAndFeel::EnsureInit() - { - GdkColor colorValue; - GdkColor *colorValuePtr; - -+ if (mInitialized) -+ return; -+ mInitialized = true; -+ - #if (MOZ_WIDGET_GTK == 2) - NS_ASSERTION(!mStyle, "already initialized"); - // GtkInvisibles come with a refcount that is not floating -@@ -1133,17 +1143,40 @@ nsLookAndFeel::Init() - // ask Gtk to create it explicitly. Otherwise we may end up - // with wrong color theme, see Bug 972382 - GtkSettings *settings = gtk_settings_get_for_screen(gdk_screen_get_default()); -+ bool e10sActive = mozilla::BrowserTabsRemoteAutostart(); -+ -+ if (!e10sActive || XRE_IsContentProcess()) { -+ // Disable dark theme in processes with web content because it -+ // interacts poorly with widget styling (see bug 1216658). -+ // To avoid triggering reload of theme settings unnecessarily, only set the -+ // setting when necessary. -+ const gchar* dark_setting = "gtk-application-prefer-dark-theme"; -+ gboolean dark; -+ g_object_get(settings, dark_setting, &dark, nullptr); -+ -+ bool allowDarkEnv = PR_GetEnv("MOZ_ALLOW_GTK_DARK_THEME") != nullptr; -+ bool allowDarkPref = -+ mozilla::Preferences::GetBool("widget.allow-gtk-dark-theme", false); - -- // Disable dark theme because it interacts poorly with widget styling in -- // web content (see bug 1216658). -- // To avoid triggering reload of theme settings unnecessarily, only set the -- // setting when necessary. -- const gchar* dark_setting = "gtk-application-prefer-dark-theme"; -- gboolean dark; -- g_object_get(settings, dark_setting, &dark, nullptr); -+ if (dark && !allowDarkEnv && !allowDarkPref) { -+ g_object_set(settings, dark_setting, FALSE, nullptr); -+ } - -- if (dark && !PR_GetEnv("MOZ_ALLOW_GTK_DARK_THEME")) { -- g_object_set(settings, dark_setting, FALSE, nullptr); -+ // Allow Gtk+ theme override for web content only. -+ if (e10sActive) { -+ auto contentThemeName = -+ mozilla::Preferences::GetCString("widget.content-gtk-theme"); -+ if (!contentThemeName.IsEmpty()) { -+ // TODO: It should be enough to change theme by "gtk-theme-name" -+ // settings but that does not have any effect here. Maybe we -+ // call it too late? -+ GtkCssProvider *styleProvider = -+ gtk_css_provider_get_named(contentThemeName, NULL); -+ gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), -+ GTK_STYLE_PROVIDER(styleProvider), -+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); -+ } -+ } - } - - // Scrollbar colors -@@ -1439,6 +1472,7 @@ nsLookAndFeel::Init() - char16_t - nsLookAndFeel::GetPasswordCharacterImpl() - { -+ EnsureInit(); - return sInvisibleCharacter; - } - -@@ -1457,7 +1491,7 @@ nsLookAndFeel::RefreshImpl() - mStyle = nullptr; - #endif - -- Init(); -+ mInitialized = false; - } - - bool -diff -up firefox-52.0/widget/gtk/nsLookAndFeel.h.1158076 firefox-52.0/widget/gtk/nsLookAndFeel.h ---- firefox-52.0/widget/gtk/nsLookAndFeel.h.1158076 2016-05-12 19:13:34.000000000 +0200 -+++ firefox-52.0/widget/gtk/nsLookAndFeel.h 2017-03-22 10:06:36.461731972 +0100 -@@ -84,8 +84,9 @@ protected: - char16_t sInvisibleCharacter; - float sCaretRatio; - bool sMenuSupportsDrag; -+ bool mInitialized; - -- void Init(); -+ void EnsureInit(); - }; - - #endif diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch deleted file mode 100644 index 2b10f06..0000000 --- a/mozilla-1170092.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff -up firefox-45.0.1/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-45.0.1/extensions/pref/autoconfig/src/nsReadConfig.cpp ---- firefox-45.0.1/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2016-03-15 23:37:54.000000000 +0100 -+++ firefox-45.0.1/extensions/pref/autoconfig/src/nsReadConfig.cpp 2016-03-21 16:10:42.540417899 +0100 -@@ -245,8 +245,20 @@ nsresult nsReadConfig::openAndEvaluateJS - return rv; - - rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); -- if (NS_FAILED(rv)) -- return rv; -+ if (NS_FAILED(rv)) { -+ // Look for cfg file in /etc//pref -+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, -+ getter_AddRefs(jsFile)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = jsFile->AppendNative(NS_LITERAL_CSTRING("pref")); -+ NS_ENSURE_SUCCESS(rv, rv); -+ rv = jsFile->AppendNative(nsDependentCString(aFileName)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } - - } else { - nsAutoCString location("resource://gre/defaults/autoconfig/"); -diff -up firefox-45.0.1/modules/libpref/Preferences.cpp.1170092 firefox-45.0.1/modules/libpref/Preferences.cpp ---- firefox-45.0.1/modules/libpref/Preferences.cpp.1170092 2016-03-21 16:10:42.540417899 +0100 -+++ firefox-45.0.1/modules/libpref/Preferences.cpp 2016-03-21 16:13:29.145888710 +0100 -@@ -1214,6 +1214,8 @@ static nsresult pref_InitInitialObjects( - // - jar:$gre/omni.jar!/defaults/preferences/*.js - // Thus, in omni.jar case, we always load app-specific default preferences - // from omni.jar, whether or not $app == $gre. -+ // At very end load configuration from system config location: -+ // - /etc/firefox/pref/*.js - - nsZipFind *findPtr; - nsAutoPtr find; -diff -up firefox-45.0.1/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-45.0.1/toolkit/xre/nsXREDirProvider.cpp ---- firefox-45.0.1/toolkit/xre/nsXREDirProvider.cpp.1170092 2016-03-15 23:37:46.000000000 +0100 -+++ firefox-45.0.1/toolkit/xre/nsXREDirProvider.cpp 2016-03-21 16:12:06.498655156 +0100 -@@ -51,6 +51,7 @@ - #endif - #ifdef XP_UNIX - #include -+#include "nsIXULAppInfo.h" - #endif - #ifdef XP_IOS - #include "UIKitDirProvider.h" -@@ -457,6 +458,20 @@ nsXREDirProvider::GetFile(const char* aP - } - } - } -+#if defined(XP_UNIX) -+ if (!strcmp(aProperty, NS_APP_PREFS_SYSTEM_CONFIG_DIR)) { -+ nsCString sysConfigDir = NS_LITERAL_CSTRING("/etc/"); -+ nsCOMPtr appInfo = do_GetService("@mozilla.org/xre/app-info;1"); -+ if (!appInfo) -+ return NS_ERROR_NOT_AVAILABLE; -+ nsCString appName; -+ appInfo->GetName(appName); -+ ToLowerCase(appName); -+ sysConfigDir.Append(appName); -+ return NS_NewNativeLocalFile(sysConfigDir, false, aFile); -+ } -+#endif -+ - if (NS_FAILED(rv) || !file) - return NS_ERROR_FAILURE; - -@@ -753,6 +768,14 @@ nsXREDirProvider::GetFilesInternal(const - LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories); - LoadDirsIntoArray(mAppBundleDirectories, - kAppendPrefDir, directories); -+ // Add /etc//pref/ directory if it exists -+ nsCOMPtr systemPrefDir; -+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, getter_AddRefs(systemPrefDir)); -+ if (NS_SUCCEEDED(rv)) { -+ rv = systemPrefDir->AppendNative(NS_LITERAL_CSTRING("pref")); -+ if (NS_SUCCEEDED(rv)) -+ directories.AppendObject(systemPrefDir); -+ } - - rv = NS_NewArrayEnumerator(aResult, directories); - } -diff -up firefox-45.0.1/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-45.0.1/xpcom/io/nsAppDirectoryServiceDefs.h ---- firefox-45.0.1/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2016-03-15 23:37:47.000000000 +0100 -+++ firefox-45.0.1/xpcom/io/nsAppDirectoryServiceDefs.h 2016-03-21 16:10:42.541417902 +0100 -@@ -67,6 +67,7 @@ - #define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL" - #define NS_EXT_PREFS_DEFAULTS_DIR_LIST "ExtPrefDL" - #define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults -+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration - - #define NS_APP_USER_PROFILE_50_DIR "ProfD" - #define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD" diff --git a/mozilla-1196777.patch b/mozilla-1196777.patch deleted file mode 100644 index ba5e4b7..0000000 --- a/mozilla-1196777.patch +++ /dev/null @@ -1,28 +0,0 @@ -# HG changeset patch -# User Martin Stransky -# Parent 4e3ad95d689a5beabf3c1f41d958794fe00e3767 -Bug 1196777 - Ask GDK to receive focus events, r=?karlt - -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -142,17 +142,18 @@ const gint kEvents = GDK_EXPOSURE_MASK | - GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - #if GTK_CHECK_VERSION(3,4,0) - GDK_SMOOTH_SCROLL_MASK | - GDK_TOUCH_MASK | - #endif - GDK_SCROLL_MASK | - GDK_POINTER_MOTION_MASK | -- GDK_PROPERTY_CHANGE_MASK; -+ GDK_PROPERTY_CHANGE_MASK | -+ GDK_FOCUS_CHANGE_MASK; - - /* utility functions */ - static bool is_mouse_in_window(GdkWindow* aWindow, - gdouble aMouseX, gdouble aMouseY); - static nsWindow *get_window_for_gtk_widget(GtkWidget *widget); - static nsWindow *get_window_for_gdk_window(GdkWindow *window); - static GtkWidget *get_gtk_widget_for_gdk_window(GdkWindow *window); - static GdkCursor *get_gtk_cursor(nsCursor aCursor); diff --git a/mozilla-1253216.patch b/mozilla-1253216.patch deleted file mode 100644 index c9252da..0000000 --- a/mozilla-1253216.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-48.0/js/src/jit/AtomicOperations.h.old firefox-48.0/js/src/jit/AtomicOperations.h ---- firefox-48.0/js/src/jit/AtomicOperations.h.old 2016-07-27 09:42:43.148175449 +0200 -+++ firefox-48.0/js/src/jit/AtomicOperations.h 2016-07-27 09:41:13.000000000 +0200 -@@ -340,7 +340,7 @@ AtomicOperations::isLockfree(int32_t siz - # elif defined(__aarch64__) - # include "jit/arm64/AtomicOperations-arm64.h" - # else --# include "jit/none/AtomicOperations-none.h" // These MOZ_CRASH() always -+# include "jit/none/AtomicOperations-ppc.h" - # endif - #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) - # include "jit/x86-shared/AtomicOperations-x86-shared.h" diff --git a/mozilla-1512162.patch b/mozilla-1512162.patch new file mode 100644 index 0000000..02e9585 --- /dev/null +++ b/mozilla-1512162.patch @@ -0,0 +1,20 @@ +--- a/js/xpconnect/src/XPCWrappedNative.cpp.1512162 2019-07-17 22:51:30.000000000 +0200 ++++ b/js/xpconnect/src/XPCWrappedNative.cpp 2019-07-25 08:08:18.512528313 +0200 +@@ -1055,7 +1055,7 @@ + MOZ_ALWAYS_INLINE bool GetOutParamSource(uint8_t paramIndex, + MutableHandleValue srcp) const; + +- MOZ_ALWAYS_INLINE bool GatherAndConvertResults(); ++ bool GatherAndConvertResults(); + + MOZ_ALWAYS_INLINE bool QueryInterfaceFastPath(); + +@@ -1102,7 +1102,7 @@ + + ~CallMethodHelper(); + +- MOZ_ALWAYS_INLINE bool Call(); ++ bool Call(); + + // Trace implementation so we can put our CallMethodHelper in a Rooted. + void trace(JSTracer* aTrc); diff --git a/mozilla-256180.patch b/mozilla-256180.patch deleted file mode 100644 index cf1b6d6..0000000 --- a/mozilla-256180.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- layout/generic/nsIFrame.h.old 2016-07-11 13:41:39.688276559 +0200 -+++ layout/generic/nsIFrame.h 2016-07-11 13:42:12.791406976 +0200 -@@ -13,7 +13,7 @@ - #error This header/class should only be used within GNU code. It should not be used by extensions. - #endif - --#define MAX_REFLOW_DEPTH 200 -+#define MAX_REFLOW_DEPTH 1000 - - /* nsIFrame is in the process of being deCOMtaminated, i.e., this file is eventually - going to be eliminated, and all callers will use nsFrame instead. At the moment diff --git a/mozilla-440908.patch b/mozilla-440908.patch deleted file mode 100644 index 2d4a609..0000000 --- a/mozilla-440908.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -up firefox-50.0/modules/libpref/prefapi.cpp.440908 firefox-50.0/modules/libpref/prefapi.cpp ---- firefox-50.0/modules/libpref/prefapi.cpp.440908 2016-10-31 21:15:26.000000000 +0100 -+++ firefox-50.0/modules/libpref/prefapi.cpp 2016-11-10 10:32:48.796115692 +0100 -@@ -997,8 +997,8 @@ void PREF_ReaderCallback(void *clo - PrefValue value, - PrefType type, - bool isDefault, -- bool isStickyDefault) -- -+ bool isStickyDefault, -+ bool isLocked) - { - uint32_t flags = 0; - if (isDefault) { -@@ -1010,4 +1010,6 @@ void PREF_ReaderCallback(void *clo - flags |= kPrefForceSet; - } - pref_HashPref(pref, value, type, flags); -+ if (isLocked) -+ PREF_LockPref(pref, true); - } -diff -up firefox-50.0/modules/libpref/prefapi.h.440908 firefox-50.0/modules/libpref/prefapi.h ---- firefox-50.0/modules/libpref/prefapi.h.440908 2016-11-10 10:32:48.796115692 +0100 -+++ firefox-50.0/modules/libpref/prefapi.h 2016-11-10 10:34:58.013159112 +0100 -@@ -243,8 +243,8 @@ void PREF_ReaderCallback( void *closure, - PrefValue value, - PrefType type, - bool isDefault, -- bool isStickyDefault); -- -+ bool isStickyDefault, -+ bool isLocked); - - /* - * Callback whenever we change a preference -diff -up firefox-50.0/modules/libpref/prefread.cpp.440908 firefox-50.0/modules/libpref/prefread.cpp ---- firefox-50.0/modules/libpref/prefread.cpp.440908 2016-09-05 22:12:58.000000000 +0200 -+++ firefox-50.0/modules/libpref/prefread.cpp 2016-11-10 10:32:48.796115692 +0100 -@@ -43,6 +43,7 @@ enum { - #define BITS_PER_HEX_DIGIT 4 - - static const char kUserPref[] = "user_pref"; -+static const char kLockPref[] = "lockPref"; - static const char kPref[] = "pref"; - static const char kPrefSticky[] = "sticky_pref"; - static const char kTrue[] = "true"; -@@ -146,7 +147,7 @@ pref_DoCallback(PrefParseState *ps) - break; - } - (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault, -- ps->fstickydefault); -+ ps->fstickydefault, ps->flock); - return true; - } - -@@ -215,6 +216,7 @@ PREF_ParseBuf(PrefParseState *ps, const - ps->vtype = PrefType::Invalid; - ps->fdefault = false; - ps->fstickydefault = false; -+ ps->flock = false; - } - switch (c) { - case '/': /* begin comment block or line? */ -@@ -225,11 +227,14 @@ PREF_ParseBuf(PrefParseState *ps, const - break; - case 'u': /* indicating user_pref */ - case 's': /* indicating sticky_pref */ -+ case 'l': /* indicating lockPref */ - case 'p': /* indicating pref */ - if (c == 'u') { - ps->smatch = kUserPref; - } else if (c == 's') { - ps->smatch = kPrefSticky; -+ } else if (c == 'l') { -+ ps->smatch = kLockPref; - } else { - ps->smatch = kPref; - } -@@ -277,8 +282,10 @@ PREF_ParseBuf(PrefParseState *ps, const - /* name parsing */ - case PREF_PARSE_UNTIL_NAME: - if (c == '\"' || c == '\'') { -- ps->fdefault = (ps->smatch == kPref || ps->smatch == kPrefSticky); -+ ps->fdefault = (ps->smatch == kPref || ps->smatch == kPrefSticky -+ || ps->smatch == kLockPref); - ps->fstickydefault = (ps->smatch == kPrefSticky); -+ ps->flock = (ps->smatch == kLockPref); - ps->quotechar = c; - ps->nextstate = PREF_PARSE_UNTIL_COMMA; /* return here when done */ - state = PREF_PARSE_QUOTED_STRING; -diff -up firefox-50.0/modules/libpref/prefread.h.440908 firefox-50.0/modules/libpref/prefread.h ---- firefox-50.0/modules/libpref/prefread.h.440908 2016-09-05 22:12:58.000000000 +0200 -+++ firefox-50.0/modules/libpref/prefread.h 2016-11-10 10:32:48.796115692 +0100 -@@ -34,7 +34,8 @@ typedef void (*PrefReader)(void *c - PrefValue val, - PrefType type, - bool defPref, -- bool stickyPref); -+ bool stickyPref, -+ bool lockPref); - - /** - * Report any errors or warnings we encounter during parsing. -@@ -62,6 +63,7 @@ typedef struct PrefParseState { - PrefType vtype; /* PREF_STRING,INT,BOOL */ - bool fdefault; /* true if (default) pref */ - bool fstickydefault; /* true if (sticky) pref */ -+ bool flock; /* true if pref to be locked */ - } PrefParseState; - - /** -@@ -90,7 +92,7 @@ void PREF_InitParseState(PrefParseState - * - * @param ps - * PrefParseState instance. -- */ -+ */ - void PREF_FinalizeParseState(PrefParseState *ps); - - /** diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch deleted file mode 100644 index 1e1e57c..0000000 --- a/mozilla-build-arm.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -up firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h ---- firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm 2017-03-03 13:53:52.480754536 +0100 -+++ firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h 2017-03-03 13:56:01.476018102 +0100 -@@ -203,6 +203,10 @@ - #define SK_ARM_HAS_CRC32 - #endif - -+#if defined(__aarch64__) -+ #undef SK_ARM_HAS_NEON -+#endif -+ - ////////////////////////////////////////////////////////////////////// - - #if !defined(SKIA_IMPLEMENTATION) -diff -up firefox-52.0/media/webrtc/trunk/webrtc/build/common.gypi.arm firefox-52.0/media/webrtc/trunk/webrtc/build/common.gypi ---- firefox-52.0/media/webrtc/trunk/webrtc/build/common.gypi.arm 2016-09-05 22:12:57.000000000 +0200 -+++ firefox-52.0/media/webrtc/trunk/webrtc/build/common.gypi 2017-03-03 13:53:52.480754536 +0100 -@@ -312,20 +312,6 @@ - 'defines': [ - 'WEBRTC_ARCH_ARM', - ], -- 'conditions': [ -- ['arm_version>=7', { -- 'defines': ['WEBRTC_ARCH_ARM_V7', -- 'WEBRTC_BUILD_NEON_LIBS'], -- 'conditions': [ -- ['arm_neon==1', { -- 'defines': ['WEBRTC_ARCH_ARM_NEON',], -- }], -- ['arm_neon==0 and arm_neon_optional==1', { -- 'defines': ['WEBRTC_DETECT_ARM_NEON',], -- }], -- ], -- }], -- ], - }], - ['os_bsd==1', { - 'defines': [ diff --git a/node-stdout-nonblocking-wrapper b/node-stdout-nonblocking-wrapper new file mode 100755 index 0000000..b2814b8 --- /dev/null +++ b/node-stdout-nonblocking-wrapper @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/node "$@" 2>&1 | cat - diff --git a/rhbz-1173156.patch b/rhbz-1173156.patch deleted file mode 100644 index 9855710..0000000 --- a/rhbz-1173156.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-31.3.0/mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp.old firefox-31.3.0/mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp ---- firefox-31.3.0/mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp.old 2014-11-25 12:23:22.000000000 +0100 -+++ firefox-31.3.0/mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp 2014-12-23 15:26:36.606674625 +0100 -@@ -174,7 +174,7 @@ nsAuthSambaNTLM::SpawnNTLMAuthHelper() - return NS_ERROR_FAILURE; - - const char* const args[] = { -- "ntlm_auth", -+ "/usr/bin/ntlm_auth", - "--helper-protocol", "ntlmssp-client-1", - "--use-cached-creds", - "--username", username, diff --git a/rhbz-1354671.patch b/rhbz-1354671.patch index 7164e3d..9770fa6 100644 --- a/rhbz-1354671.patch +++ b/rhbz-1354671.patch @@ -1,16 +1,11 @@ -@@ -, +, @@ ---- - layout/base/nsIPresShell.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/layout/base/nsIPresShell.h -+++ a/layout/base/nsIPresShell.h -@@ -224,7 +224,7 @@ public: - * to the same aSize value. AllocateFrame returns zero-filled memory. - * AllocateFrame is infallible and will abort on out-of-memory. +--- firefox-78.0/layout/base/PresShell.orig.h 2020-06-26 20:10:50.168878803 +0200 ++++ firefox-78.0/layout/base/PresShell.h 2020-06-26 23:13:24.174571951 +0200 +@@ -257,7 +257,7 @@ + * to the same aSize value. AllocateFrame is infallible and will abort + * on out-of-memory. */ -- void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) -+ void* __attribute__((optimize("no-lifetime-dse"))) AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) - { - void* result = mFrameArena.AllocateByFrameID(aID, aSize); - RecordAlloc(result); --- +- void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) { ++ void* __attribute__((optimize("no-lifetime-dse"))) AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) { + #define FRAME_ID(classname, ...) \ + static_assert(size_t(nsQueryFrame::FrameIID::classname##_id) == \ + size_t(eArenaObjectID_##classname), \ diff --git a/rhbz-1400293-fix-mozilla-1324096.patch b/rhbz-1400293-fix-mozilla-1324096.patch deleted file mode 100644 index 4a2691e..0000000 --- a/rhbz-1400293-fix-mozilla-1324096.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/security/certverifier/CertVerifier.cpp b/security/certverifier/CertVerifier.cpp ---- a/security/certverifier/CertVerifier.cpp -+++ b/security/certverifier/CertVerifier.cpp -@@ -120,16 +120,20 @@ IsCertChainRootBuiltInRoot(const UniqueC - } - CERTCertificate* root = rootNode->cert; - if (!root) { - return Result::FATAL_ERROR_LIBRARY_FAILURE; - } - return IsCertBuiltInRoot(root, result); - } - -+// The term "builtin root" traditionally refers to a root CA certificate that -+// has been added to the NSS trust store, because it has been approved -+// for inclusion according to the Mozilla CA policy, and might be accepted -+// by Mozilla applications as an issuer for certificates seen on the public web. - Result - IsCertBuiltInRoot(CERTCertificate* cert, bool& result) - { - result = false; - #ifdef DEBUG - nsCOMPtr component(do_GetService(PSM_COMPONENT_CONTRACTID)); - if (!component) { - return Result::FATAL_ERROR_LIBRARY_FAILURE; -@@ -142,25 +146,38 @@ IsCertBuiltInRoot(CERTCertificate* cert, - return Success; - } - #endif // DEBUG - AutoSECMODListReadLock lock; - for (SECMODModuleList* list = SECMOD_GetDefaultModuleList(); list; - list = list->next) { - for (int i = 0; i < list->module->slotCount; i++) { - PK11SlotInfo* slot = list->module->slots[i]; -- // PK11_HasRootCerts should return true if and only if the given slot has -- // an object with a CKA_CLASS of CKO_NETSCAPE_BUILTIN_ROOT_LIST, which -- // should be true only of the builtin root list. -- // If we can find a copy of the given certificate on the slot with the -- // builtin root list, that certificate must be a builtin. -- if (PK11_IsPresent(slot) && PK11_HasRootCerts(slot) && -- PK11_FindCertInSlot(slot, cert, nullptr) != CK_INVALID_HANDLE) { -- result = true; -- return Success; -+ // We're searching for the "builtin root module", which is a module that -+ // contains an object with a CKA_CLASS of CKO_NETSCAPE_BUILTIN_ROOT_LIST. -+ // We use PK11_HasRootCerts() to identify a module with that property. -+ // In the past, we exclusively used the PKCS#11 module named nssckbi, -+ // which is provided by the NSS library. -+ // Nowadays, some distributions use a replacement module, which contains -+ // the builtin roots, but which also contains additional CA certificates, -+ // such as CAs trusted in a local deployment. -+ // We want to be able to distinguish between these two categories, -+ // because a CA, which may issue certificates for the public web, -+ // is expected to comply with additional requirements. -+ // If the certificate has attribute CKA_NSS_MOZILLA_CA_POLICY set to true, -+ // then we treat it as a "builtin root". -+ if (PK11_IsPresent(slot) && PK11_HasRootCerts(slot)) { -+ CK_OBJECT_HANDLE handle = PK11_FindCertInSlot(slot, cert, nullptr); -+ if (handle != CK_INVALID_HANDLE && -+ PK11_HasAttributeSet(slot, handle, CKA_NSS_MOZILLA_CA_POLICY, -+ false)) { -+ // Attribute was found, and is set to true -+ result = true; -+ break; -+ } - } - } - } - return Success; - } - - static Result - BuildCertChainForOneKeyUsage(NSSCertDBTrustDomain& trustDomain, Input certDER, diff --git a/rhbz-966424.patch b/rhbz-966424.patch deleted file mode 100644 index 7579d09..0000000 --- a/rhbz-966424.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm ---- firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 2014-10-14 08:12:14.358697255 +0200 -+++ firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm 2014-10-14 08:17:59.962181908 +0200 -@@ -174,7 +174,9 @@ this.checkCert = - } - - function isBuiltinToken(tokenName) { -- return tokenName == "Builtin Object Token"; -+ return tokenName == "Builtin Object Token" || -+ tokenName == "Default Trust" || -+ tokenName == "System Trust"; - } - - /** diff --git a/run-wayland-compositor b/run-wayland-compositor new file mode 100755 index 0000000..23ead19 --- /dev/null +++ b/run-wayland-compositor @@ -0,0 +1,60 @@ +#!/usr/bin/bash +# Run wayland compositor and set WAYLAND_DISPLAY env variable + +set -x + +echo export DESKTOP_SESSION=gnome > $HOME/.xsessionrc +echo export XDG_CURRENT_DESKTOP=GNOME > $HOME/.xsessionrc +echo export XDG_SESSION_TYPE=wayland >> $HOME/.xsessionrc + +# Turn off the screen saver and screen locking +gsettings set org.gnome.desktop.screensaver idle-activation-enabled false +gsettings set org.gnome.desktop.screensaver lock-enabled false +gsettings set org.gnome.desktop.screensaver lock-delay 3600 + +# Disable the screen saver +# This starts the gnome-keyring-daemon with an unlocked login keyring. libsecret uses this to +# store secrets. Firefox uses libsecret to store a key that protects sensitive information like +# credit card numbers. +if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + # if not found, launch a new one + eval `dbus-launch --sh-syntax` +fi + +if [ -z "$XDG_RUNTIME_DIR" ]; then + export XDG_RUNTIME_DIR=$HOME +fi + +export WAYLAND_DISPLAY=icecat-pgo-wayland-0 +if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY + rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY.lock +fi + +echo "Launch mutter for $WAYLAND_DISPLAY" +mutter --headless --virtual-monitor 1920x1080 --wayland-display=$WAYLAND_DISPLAY --no-x11 & MUTTER_PID=$! +export MUTTER_PID +echo "Mutter PID $MUTTER_PID" + +echo "Waiting for mutter to start..." +sleep 5 +retry_count=0 +max_retries=5 +until [ $retry_count -gt $max_retries ]; do + if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + retry_count=$(($max_retries + 1)) + else + retry_count=$(($retry_count + 1)) + echo "Waiting for Mutter, retry: $retry_count" + sleep 2 + fi +done + +if [ ! -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + echo "Mutter failed to start!" + exit 1 +fi + +echo "Mutter is running, $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY is here." + + diff --git a/sources b/sources index 84d93e6..889ba13 100644 --- a/sources +++ b/sources @@ -1,2 +1,5 @@ -SHA512 (icecat-52.7.3-gnu1.tar.bz2) = 5929847783cc2310428fb0bd7d12c95f87b94d30ec41ae1608da99184b081b0246939cac412b4d1a146ec5d8530e0d01145b6275d27b94941f8b31c5e5df363d +SHA512 (cbindgen-vendor.tar.xz) = 647dcadf3507bd05262613d03ff18a8c876bcbb4e83ce59f911128ae020ac16695298987c6c14f8b7a7aee5bb096740c6885c0a854d8b26431fc9a8ff864c369 +SHA512 (icecat-140.7.0-langpacks.tar.gz) = a4618e3272b48be4307c79222bdd55f321aefb6d6ba08beb10178d0b95530bc4130cf86901d0906e714bd75106ad8513957fe3ad335431c8faf5b2d9767e17de +SHA512 (icecat-140.7.0-rh1.tar.bz2) = 7a19f7928322bea905828e6a4e981395687f1b649e37518a8000bcfcb29446b424ee592f708d0c7c93ebeb901820752785f883a937e9361e9f172a0a9bacb603 SHA512 (icecat-COPYING-licensefiles.tar.gz) = ed541845170f1d209e322b0def3248d571e0c42c4a17c74e83197e743bd8a128a1475f5312d905c8e70d047eddeac17e604373892eb6d5f1720c5c361849c42c +SHA512 (icecat.png) = a3cec16cb15a27c3c91b53e2c534e78b07911011ff1331e450c0baf8e13b76da7cea2a90e5d75191fa88cfbfd40a0a7f3e553e92b64d0043dadd5ad5edfdf81c diff --git a/widget-rebase.patch b/widget-rebase.patch deleted file mode 100644 index 45a3b91..0000000 --- a/widget-rebase.patch +++ /dev/null @@ -1,1159 +0,0 @@ -diff -up firefox-52.0/widget/gtk/gtk3drawing.cpp.widget-rebase firefox-52.0/widget/gtk/gtk3drawing.cpp ---- firefox-52.0/widget/gtk/gtk3drawing.cpp.widget-rebase 2017-02-27 17:11:05.000000000 +0100 -+++ firefox-52.0/widget/gtk/gtk3drawing.cpp 2017-03-10 12:20:30.232205991 +0100 -@@ -36,6 +36,10 @@ static gboolean is_initialized; - static gint - moz_gtk_get_tab_thickness(GtkStyleContext *style); - -+static gint -+moz_gtk_menu_item_paint(WidgetNodeType widget, cairo_t *cr, GdkRectangle* rect, -+ GtkWidgetState* state, GtkTextDirection direction); -+ - // GetStateFlagsFromGtkWidgetState() can be safely used for the specific - // GtkWidgets that set both prelight and active flags. For other widgets, - // either the GtkStateFlags or Gecko's GtkWidgetState need to be carefully -@@ -167,7 +171,7 @@ moz_gtk_menuitem_get_horizontal_padding( - gint - moz_gtk_checkmenuitem_get_horizontal_padding(gint* horizontal_padding) - { -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_CHECKMENUITEM_CONTAINER); -+ GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_CHECKMENUITEM); - gtk_style_context_get_style(style, - "horizontal-padding", horizontal_padding, - nullptr); -@@ -463,7 +467,7 @@ moz_gtk_get_widget_min_size(WidgetNodeTy - } - - static void --moz_gtk_rectangle_inset(GdkRectangle* rect, GtkBorder& aBorder) -+Inset(GdkRectangle* rect, GtkBorder& aBorder) - { - MOZ_ASSERT(rect); - rect->x += aBorder.left; -@@ -472,17 +476,29 @@ moz_gtk_rectangle_inset(GdkRectangle* re - rect->height -= aBorder.top + aBorder.bottom; - } - --/* Subtracting margin is used to inset drawing of element which can have margins, -- * like scrollbar, scrollbar's trough, thumb and scrollbar's button */ -+// Inset a rectangle by the margins specified in a style context. - static void --moz_gtk_subtract_margin(GtkStyleContext* style, GdkRectangle* rect) -+InsetByMargin(GdkRectangle* rect, GtkStyleContext* style) - { - MOZ_ASSERT(rect); - GtkBorder margin; - - gtk_style_context_get_margin(style, gtk_style_context_get_state(style), - &margin); -- moz_gtk_rectangle_inset(rect, margin); -+ Inset(rect, margin); -+} -+ -+// Inset a rectangle by the border and padding specified in a style context. -+static void -+InsetByBorderPadding(GdkRectangle* rect, GtkStyleContext* style) -+{ -+ GtkStateFlags state = gtk_style_context_get_state(style); -+ GtkBorder padding, border; -+ -+ gtk_style_context_get_padding(style, state, &padding); -+ Inset(rect, padding); -+ gtk_style_context_get_border(style, state, &border); -+ Inset(rect, border); - } - - static gint -@@ -528,7 +544,7 @@ moz_gtk_scrollbar_button_paint(cairo_t * - if (gtk_check_version(3,20,0) == nullptr) { - // The "trough-border" is not used since GTK 3.20. The stepper margin - // box occupies the full width of the "contents" gadget content box. -- moz_gtk_subtract_margin(style, &rect); -+ InsetByMargin(&rect, style); - } else { - // Scrollbar button has to be inset by trough_border because its DOM - // element is filling width of vertical scrollbar's track (or height -@@ -601,7 +617,7 @@ moz_gtk_draw_styled_frame(GtkStyleContex - { - GdkRectangle rect = *aRect; - if (gtk_check_version(3, 6, 0) == nullptr) { -- moz_gtk_subtract_margin(style, &rect); -+ InsetByMargin(&rect, style); - } - gtk_render_background(style, cr, rect.x, rect.y, rect.width, rect.height); - gtk_render_frame(style, cr, rect.x, rect.y, rect.width, rect.height); -@@ -664,7 +680,7 @@ moz_gtk_scrollbar_thumb_paint(WidgetNode - - GdkRectangle rect = *aRect; - GtkStyleContext* style = ClaimStyleContext(widget, direction, state_flags); -- moz_gtk_subtract_margin(style, &rect); -+ InsetByMargin(&rect, style); - - gtk_render_slider(style, cr, - rect.x, -@@ -865,7 +881,7 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect - } - - static gint --moz_gtk_text_view_paint(cairo_t *cr, GdkRectangle* rect, -+moz_gtk_text_view_paint(cairo_t *cr, GdkRectangle* aRect, - GtkWidgetState* state, - GtkTextDirection direction) - { -@@ -882,24 +898,24 @@ moz_gtk_text_view_paint(cairo_t *cr, Gdk - - GtkStyleContext* style_frame = - ClaimStyleContext(MOZ_GTK_SCROLLED_WINDOW, direction, state_flags); -- gtk_render_frame(style_frame, cr, rect->x, rect->y, rect->width, rect->height); -+ gtk_render_frame(style_frame, cr, -+ aRect->x, aRect->y, aRect->width, aRect->height); -+ -+ GdkRectangle rect = *aRect; -+ InsetByBorderPadding(&rect, style_frame); - -- GtkBorder border, padding; -- gtk_style_context_get_border(style_frame, state_flags, &border); -- gtk_style_context_get_padding(style_frame, state_flags, &padding); - ReleaseStyleContext(style_frame); - - GtkStyleContext* style = - ClaimStyleContext(MOZ_GTK_TEXT_VIEW, direction, state_flags); -- -- gint xthickness = border.left + padding.left; -- gint ythickness = border.top + padding.top; -- -- gtk_render_background(style, cr, -- rect->x + xthickness, rect->y + ythickness, -- rect->width - 2 * xthickness, -- rect->height - 2 * ythickness); -- -+ gtk_render_background(style, cr, rect.x, rect.y, rect.width, rect.height); -+ ReleaseStyleContext(style); -+ // There is a separate "text" window, which usually provides the -+ // background behind the text. However, this is transparent in Ambiance -+ // for GTK 3.20, in which case the MOZ_GTK_TEXT_VIEW background is -+ // visible. -+ style = ClaimStyleContext(MOZ_GTK_TEXT_VIEW_TEXT, direction, state_flags); -+ gtk_render_background(style, cr, rect.x, rect.y, rect.width, rect.height); - ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; -@@ -1291,6 +1307,7 @@ moz_gtk_tooltip_paint(cairo_t *cr, const - GdkRectangle rect = *aRect; - gtk_render_background(style, cr, rect.x, rect.y, rect.width, rect.height); - gtk_render_frame(style, cr, rect.x, rect.y, rect.width, rect.height); -+ ReleaseStyleContext(style); - - // Horizontal Box drawing - // -@@ -1300,33 +1317,26 @@ moz_gtk_tooltip_paint(cairo_t *cr, const - // 6px margin. - // For drawing Horizontal Box we have to inset drawing area by that 6px - // plus its CSS margin. -- GtkStyleContext* boxStyle = -- CreateStyleForWidget(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0), style); -+ GtkStyleContext* boxStyle = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX, direction); - - rect.x += 6; - rect.y += 6; - rect.width -= 12; - rect.height -= 12; - -- moz_gtk_subtract_margin(boxStyle, &rect); -+ InsetByMargin(&rect, boxStyle); - gtk_render_background(boxStyle, cr, rect.x, rect.y, rect.width, rect.height); - gtk_render_frame(boxStyle, cr, rect.x, rect.y, rect.width, rect.height); - - // Label drawing -- GtkBorder padding, border; -- gtk_style_context_get_padding(boxStyle, GTK_STATE_FLAG_NORMAL, &padding); -- moz_gtk_rectangle_inset(&rect, padding); -- gtk_style_context_get_border(boxStyle, GTK_STATE_FLAG_NORMAL, &border); -- moz_gtk_rectangle_inset(&rect, border); -+ InsetByBorderPadding(&rect, boxStyle); -+ ReleaseStyleContext(boxStyle); - - GtkStyleContext* labelStyle = -- CreateStyleForWidget(gtk_label_new(nullptr), boxStyle); -+ ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL, direction); - moz_gtk_draw_styled_frame(labelStyle, cr, &rect, false); -- g_object_unref(labelStyle); -+ ReleaseStyleContext(labelStyle); - -- g_object_unref(boxStyle); -- -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1335,17 +1345,9 @@ moz_gtk_resizer_paint(cairo_t *cr, GdkRe - GtkWidgetState* state, - GtkTextDirection direction) - { -- GtkStyleContext* style; -- -- // gtk_render_handle() draws a background, so use GtkTextView and its -- // GTK_STYLE_CLASS_VIEW to match the background with textarea elements. -- // The resizer is drawn with shaded variants of the background color, and -- // so a transparent background would lead to a transparent resizer. -- style = ClaimStyleContext(MOZ_GTK_TEXT_VIEW, GTK_TEXT_DIR_LTR, -- GetStateFlagsFromGtkWidgetState(state)); -- // TODO - we need to save/restore style when gtk 3.20 CSS node path -- // is used -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_GRIP); -+ GtkStyleContext* style = -+ ClaimStyleContext(MOZ_GTK_RESIZER, GTK_TEXT_DIR_LTR, -+ GetStateFlagsFromGtkWidgetState(state)); - - // Workaround unico not respecting the text direction for resizers. - // See bug 1174248. -@@ -1392,17 +1394,8 @@ moz_gtk_progress_chunk_paint(cairo_t *cr - GtkTextDirection direction, - WidgetNodeType widget) - { -- GtkStyleContext* style; -- -- if (gtk_check_version(3, 20, 0) != nullptr) { -- /* Ask for MOZ_GTK_PROGRESS_TROUGH instead of MOZ_GTK_PROGRESSBAR -- * because ClaimStyleContext() saves/restores that style */ -- style = ClaimStyleContext(MOZ_GTK_PROGRESS_TROUGH, direction); -- gtk_style_context_remove_class(style, GTK_STYLE_CLASS_TROUGH); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_PROGRESSBAR); -- } else { -- style = ClaimStyleContext(MOZ_GTK_PROGRESS_CHUNK, direction); -- } -+ GtkStyleContext* style = -+ ClaimStyleContext(MOZ_GTK_PROGRESS_CHUNK, direction); - - if (widget == MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE || - widget == MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE) { -@@ -1786,6 +1779,13 @@ static gint - moz_gtk_menu_separator_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { -+ GtkWidgetState defaultState = { 0 }; -+ moz_gtk_menu_item_paint(MOZ_GTK_MENUSEPARATOR, cr, rect, -+ &defaultState, direction); -+ -+ if (gtk_get_minor_version() >= 20) -+ return MOZ_GTK_SUCCESS; -+ - GtkStyleContext* style; - gboolean wide_separators; - gint separator_height; -@@ -1833,36 +1833,39 @@ moz_gtk_menu_item_paint(WidgetNodeType w - GtkWidgetState* state, GtkTextDirection direction) - { - gint x, y, w, h; -+ guint minorVersion = gtk_get_minor_version(); -+ GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); - -- if (state->inHover && !state->disabled) { -- GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); -- GtkStyleContext* style = -- ClaimStyleContext(widget, direction, state_flags); -- -- bool pre_3_6 = gtk_check_version(3, 6, 0) != nullptr; -- if (pre_3_6) { -- // GTK+ 3.4 saves the style context and adds the menubar class to -- // menubar children, but does each of these only when drawing, not -- // during layout. -- gtk_style_context_save(style); -- if (widget == MOZ_GTK_MENUBARITEM) { -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUBAR); -- } -+ // GTK versions prior to 3.8 render the background and frame only when not -+ // a separator and in hover prelight. -+ if (minorVersion < 8 && (widget == MOZ_GTK_MENUSEPARATOR || -+ !(state_flags & GTK_STATE_FLAG_PRELIGHT))) -+ return MOZ_GTK_SUCCESS; -+ -+ GtkStyleContext* style = ClaimStyleContext(widget, direction, state_flags); -+ -+ if (minorVersion < 6) { -+ // GTK+ 3.4 saves the style context and adds the menubar class to -+ // menubar children, but does each of these only when drawing, not -+ // during layout. -+ gtk_style_context_save(style); -+ if (widget == MOZ_GTK_MENUBARITEM) { -+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUBAR); - } -+ } - -- x = rect->x; -- y = rect->y; -- w = rect->width; -- h = rect->height; -+ x = rect->x; -+ y = rect->y; -+ w = rect->width; -+ h = rect->height; - -- gtk_render_background(style, cr, x, y, w, h); -- gtk_render_frame(style, cr, x, y, w, h); -+ gtk_render_background(style, cr, x, y, w, h); -+ gtk_render_frame(style, cr, x, y, w, h); - -- if (pre_3_6) { -- gtk_style_context_restore(style); -- } -- ReleaseStyleContext(style); -+ if (minorVersion < 6) { -+ gtk_style_context_restore(style); - } -+ ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -1882,16 +1885,16 @@ moz_gtk_menu_arrow_paint(cairo_t *cr, Gd - return MOZ_GTK_SUCCESS; - } - --// See gtk_real_check_menu_item_draw_indicator() for reference. -+// For reference, see gtk_check_menu_item_size_allocate() in GTK versions after -+// 3.20 and gtk_real_check_menu_item_draw_indicator() in earlier versions. - static gint --moz_gtk_check_menu_item_paint(cairo_t *cr, GdkRectangle* rect, -+moz_gtk_check_menu_item_paint(WidgetNodeType widgetType, -+ cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state, -- gboolean checked, gboolean isradio, -- GtkTextDirection direction) -+ gboolean checked, GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); - GtkStyleContext* style; -- GtkBorder padding; - gint indicator_size, horizontal_padding; - gint x, y; - -@@ -1901,35 +1904,44 @@ moz_gtk_check_menu_item_paint(cairo_t *c - state_flags = static_cast(state_flags|checkbox_check_state); - } - -- style = ClaimStyleContext(isradio ? MOZ_GTK_RADIOMENUITEM_CONTAINER : -- MOZ_GTK_CHECKMENUITEM_CONTAINER, -- direction); -+ bool pre_3_20 = gtk_get_minor_version() < 20; -+ gint offset; -+ style = ClaimStyleContext(widgetType, direction); - gtk_style_context_get_style(style, - "indicator-size", &indicator_size, - "horizontal-padding", &horizontal_padding, - NULL); -+ if (pre_3_20) { -+ GtkBorder padding; -+ gtk_style_context_get_padding(style, state_flags, &padding); -+ offset = horizontal_padding + padding.left + 2; -+ } else { -+ GdkRectangle r = { 0 }; -+ InsetByMargin(&r, style); -+ InsetByBorderPadding(&r, style); -+ offset = r.x; -+ } - ReleaseStyleContext(style); - -- style = ClaimStyleContext(isradio ? MOZ_GTK_RADIOMENUITEM : -- MOZ_GTK_CHECKMENUITEM, -- direction, state_flags); -- gtk_style_context_get_padding(style, state_flags, &padding); -- gint offset = padding.left + 2; -+ bool isRadio = (widgetType == MOZ_GTK_RADIOMENUITEM); -+ WidgetNodeType indicatorType = isRadio ? MOZ_GTK_RADIOMENUITEM_INDICATOR -+ : MOZ_GTK_CHECKMENUITEM_INDICATOR; -+ style = ClaimStyleContext(indicatorType, direction, state_flags); - - if (direction == GTK_TEXT_DIR_RTL) { -- x = rect->width - indicator_size - offset - horizontal_padding; -+ x = rect->width - indicator_size - offset; - } - else { -- x = rect->x + offset + horizontal_padding; -+ x = rect->x + offset; - } - y = rect->y + (rect->height - indicator_size) / 2; - -- if (gtk_check_version(3, 20, 0) == nullptr) { -+ if (!pre_3_20) { - gtk_render_background(style, cr, x, y, indicator_size, indicator_size); - gtk_render_frame(style, cr, x, y, indicator_size, indicator_size); - } - -- if (isradio) { -+ if (isRadio) { - gtk_render_option(style, cr, x, y, indicator_size, indicator_size); - } else { - gtk_render_check(style, cr, x, y, indicator_size, indicator_size); -@@ -2033,9 +2045,6 @@ moz_gtk_get_widget_border(WidgetNodeType - if (widget == MOZ_GTK_TOOLBAR_BUTTON) - gtk_style_context_restore(style); - -- // XXX: Subtract 1 pixel from the border to account for the added -- // -moz-focus-inner border (Bug 1228281). -- *left -= 1; *top -= 1; *right -= 1; *bottom -= 1; - moz_gtk_add_style_border(style, left, top, right, bottom); - - ReleaseStyleContext(style); -@@ -2174,12 +2183,15 @@ moz_gtk_get_widget_border(WidgetNodeType - { - // Bug 1274143 for MOZ_GTK_MENUBARITEM - WidgetNodeType type = -- widget == MOZ_GTK_MENUBARITEM || widget == MOZ_GTK_MENUITEM ? -- MOZ_GTK_MENUITEM : MOZ_GTK_CHECKMENUITEM_CONTAINER; -+ widget == MOZ_GTK_MENUBARITEM ? MOZ_GTK_MENUITEM : widget; - style = ClaimStyleContext(type); - -- moz_gtk_add_style_padding(style, left, top, right, bottom); -- -+ if (gtk_get_minor_version() < 20) { -+ moz_gtk_add_style_padding(style, left, top, right, bottom); -+ } else { -+ moz_gtk_add_margin_border_padding(style, -+ left, top, right, bottom); -+ } - ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } -@@ -2188,7 +2200,6 @@ moz_gtk_get_widget_border(WidgetNodeType - break; - case MOZ_GTK_TOOLTIP: - { -- style = ClaimStyleContext(MOZ_GTK_TOOLTIP); - // In GTK 3 there are 6 pixels of additional margin around the box. - // See details there: - // https://github.com/GNOME/gtk/blob/5ea69a136bd7e4970b3a800390e20314665aaed2/gtk/ui/gtktooltipwindow.ui#L11 -@@ -2197,21 +2208,16 @@ moz_gtk_get_widget_border(WidgetNodeType - // We also need to add margin/padding/borders from Tooltip content. - // Tooltip contains horizontal box, where icon and label is put. - // We ignore icon as long as we don't have support for it. -- GtkStyleContext* boxStyle = -- CreateStyleForWidget(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0), -- style); -+ GtkStyleContext* boxStyle = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX); - moz_gtk_add_margin_border_padding(boxStyle, - left, top, right, bottom); -+ ReleaseStyleContext(boxStyle); - -- GtkStyleContext* labelStyle = -- CreateStyleForWidget(gtk_label_new(nullptr), boxStyle); -+ GtkStyleContext* labelStyle = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL); - moz_gtk_add_margin_border_padding(labelStyle, - left, top, right, bottom); -+ ReleaseStyleContext(labelStyle); - -- g_object_unref(labelStyle); -- g_object_unref(boxStyle); -- -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_SCROLLBAR_VERTICAL: -@@ -2500,11 +2506,11 @@ void - moz_gtk_get_scale_metrics(GtkOrientation orient, gint* scale_width, - gint* scale_height) - { -- WidgetNodeType widget = (orient == GTK_ORIENTATION_HORIZONTAL) ? -- MOZ_GTK_SCALE_HORIZONTAL : -- MOZ_GTK_SCALE_VERTICAL; -- - if (gtk_check_version(3, 20, 0) != nullptr) { -+ WidgetNodeType widget = (orient == GTK_ORIENTATION_HORIZONTAL) ? -+ MOZ_GTK_SCALE_HORIZONTAL : -+ MOZ_GTK_SCALE_VERTICAL; -+ - gint thumb_length, thumb_height, trough_border; - moz_gtk_get_scalethumb_metrics(orient, &thumb_length, &thumb_height); - -@@ -2520,12 +2526,10 @@ moz_gtk_get_scale_metrics(GtkOrientation - } - ReleaseStyleContext(style); - } else { -- GtkStyleContext* style = ClaimStyleContext(widget); -- gtk_style_context_get(style, gtk_style_context_get_state(style), -- "min-width", scale_width, -- "min-height", scale_height, -- nullptr); -- ReleaseStyleContext(style); -+ WidgetNodeType widget = (orient == GTK_ORIENTATION_HORIZONTAL) ? -+ MOZ_GTK_SCALE_TROUGH_HORIZONTAL : -+ MOZ_GTK_SCALE_TROUGH_VERTICAL; -+ moz_gtk_get_widget_min_size(widget, scale_width, scale_height); - } - } - -@@ -2548,10 +2552,28 @@ moz_gtk_get_scalethumb_metrics(GtkOrient - MOZ_GTK_SCALE_THUMB_HORIZONTAL: - MOZ_GTK_SCALE_THUMB_VERTICAL; - GtkStyleContext* style = ClaimStyleContext(widget); -- gtk_style_context_get(style, gtk_style_context_get_state(style), -- "min-width", thumb_length, -- "min-height", thumb_height, -+ -+ gint min_width, min_height; -+ GtkStateFlags state = gtk_style_context_get_state(style); -+ gtk_style_context_get(style, state, -+ "min-width", &min_width, -+ "min-height", &min_height, - nullptr); -+ GtkBorder margin; -+ gtk_style_context_get_margin(style, state, &margin); -+ gint margin_width = margin.left + margin.right; -+ gint margin_height = margin.top + margin.bottom; -+ -+ // Negative margin of slider element also determines its minimal size -+ // so use bigger of those two values. -+ if (min_width < -margin_width) -+ min_width = -margin_width; -+ if (min_height < -margin_height) -+ min_height = -margin_height; -+ -+ *thumb_length = min_width; -+ *thumb_height = min_height; -+ - ReleaseStyleContext(style); - } - -@@ -2791,10 +2813,8 @@ moz_gtk_widget_paint(WidgetNodeType widg - break; - case MOZ_GTK_CHECKMENUITEM: - case MOZ_GTK_RADIOMENUITEM: -- return moz_gtk_check_menu_item_paint(cr, rect, state, -- (gboolean) flags, -- (widget == MOZ_GTK_RADIOMENUITEM), -- direction); -+ return moz_gtk_check_menu_item_paint(widget, cr, rect, state, -+ (gboolean) flags, direction); - break; - case MOZ_GTK_SPLITTER_HORIZONTAL: - return moz_gtk_vpaned_paint(cr, rect, state); -diff -up firefox-52.0/widget/gtk/gtkdrawing.h.widget-rebase firefox-52.0/widget/gtk/gtkdrawing.h ---- firefox-52.0/widget/gtk/gtkdrawing.h.widget-rebase 2017-02-27 17:11:05.000000000 +0100 -+++ firefox-52.0/widget/gtk/gtkdrawing.h 2017-03-10 12:20:30.233205986 +0100 -@@ -145,8 +145,11 @@ typedef enum { - MOZ_GTK_ENTRY, - /* Paints a GtkExpander. */ - MOZ_GTK_EXPANDER, -- /* Paints a GtkTextView. */ -+ /* Paints a GtkTextView or gets the style context corresponding to the -+ root node of a GtkTextView. */ - MOZ_GTK_TEXT_VIEW, -+ /* The "text" window or node of a GtkTextView */ -+ MOZ_GTK_TEXT_VIEW_TEXT, - /* Paints a GtkOptionMenu. */ - MOZ_GTK_DROPDOWN, - /* Paints a dropdown arrow (a GtkButton containing a down GtkArrow). */ -@@ -160,11 +163,15 @@ typedef enum { - MOZ_GTK_TOOLBAR_SEPARATOR, - /* Paints a GtkToolTip */ - MOZ_GTK_TOOLTIP, -+ /* Paints a GtkBox from GtkToolTip */ -+ MOZ_GTK_TOOLTIP_BOX, -+ /* Paints a GtkLabel of GtkToolTip */ -+ MOZ_GTK_TOOLTIP_BOX_LABEL, - /* Paints a GtkFrame (e.g. a status bar panel). */ - MOZ_GTK_FRAME, - /* Paints the border of a GtkFrame */ - MOZ_GTK_FRAME_BORDER, -- /* Paints a resize grip for a GtkWindow */ -+ /* Paints a resize grip for a GtkTextView */ - MOZ_GTK_RESIZER, - /* Paints a GtkProgressBar. */ - MOZ_GTK_PROGRESSBAR, -@@ -210,11 +217,13 @@ typedef enum { - MOZ_GTK_MENUBARITEM, - /* Paints items of popup menus. */ - MOZ_GTK_MENUITEM, -- MOZ_GTK_IMAGEMENUITEM, -- MOZ_GTK_CHECKMENUITEM_CONTAINER, -- MOZ_GTK_RADIOMENUITEM_CONTAINER, -+ /* Paints a menuitem with check indicator, or the gets the style context for -+ a menuitem that contains a checkbox. */ - MOZ_GTK_CHECKMENUITEM, -+ /* Gets the style context for a checkbox in a check menuitem. */ -+ MOZ_GTK_CHECKMENUITEM_INDICATOR, - MOZ_GTK_RADIOMENUITEM, -+ MOZ_GTK_RADIOMENUITEM_INDICATOR, - MOZ_GTK_MENUSEPARATOR, - /* GtkVPaned base class */ - MOZ_GTK_SPLITTER_HORIZONTAL, -diff -up firefox-52.0/widget/gtk/mozgtk/mozgtk.c.widget-rebase firefox-52.0/widget/gtk/mozgtk/mozgtk.c ---- firefox-52.0/widget/gtk/mozgtk/mozgtk.c.widget-rebase 2017-02-27 17:11:05.000000000 +0100 -+++ firefox-52.0/widget/gtk/mozgtk/mozgtk.c 2017-03-10 12:20:30.233205986 +0100 -@@ -245,7 +245,6 @@ STUB(gtk_icon_theme_get_icon_sizes) - STUB(gtk_icon_theme_lookup_by_gicon) - STUB(gtk_icon_theme_lookup_icon) - STUB(gtk_image_get_type) --STUB(gtk_image_menu_item_new) - STUB(gtk_image_new) - STUB(gtk_image_new_from_stock) - STUB(gtk_image_set_from_pixbuf) -diff -up firefox-52.0/widget/gtk/nsLookAndFeel.cpp.widget-rebase firefox-52.0/widget/gtk/nsLookAndFeel.cpp ---- firefox-52.0/widget/gtk/nsLookAndFeel.cpp.widget-rebase 2017-02-27 17:11:05.000000000 +0100 -+++ firefox-52.0/widget/gtk/nsLookAndFeel.cpp 2017-03-10 13:54:36.918205357 +0100 -@@ -24,6 +24,7 @@ - #include "nsStyleConsts.h" - #include "gfxFontConstants.h" - #include "WidgetUtils.h" -+#include "nsIXULRuntime.h" - - #include - -@@ -47,9 +48,6 @@ nsLookAndFeel::nsLookAndFeel() - : nsXPLookAndFeel(), - #if (MOZ_WIDGET_GTK == 2) - mStyle(nullptr), --#else -- mBackgroundStyle(nullptr), -- mButtonStyle(nullptr), - #endif - mDefaultFontCached(false), mButtonFontCached(false), - mFieldFontCached(false), mMenuFontCached(false) -@@ -61,13 +59,27 @@ nsLookAndFeel::~nsLookAndFeel() - { - #if (MOZ_WIDGET_GTK == 2) - g_object_unref(mStyle); --#else -- g_object_unref(mBackgroundStyle); -- g_object_unref(mButtonStyle); - #endif - } - - #if MOZ_WIDGET_GTK != 2 -+// Modifies color |*aDest| as if a pattern of color |aSource| was painted with -+// CAIRO_OPERATOR_OVER to a surface with color |*aDest|. -+static void -+ApplyColorOver(const GdkRGBA& aSource, GdkRGBA* aDest) { -+ gdouble sourceCoef = aSource.alpha; -+ gdouble destCoef = aDest->alpha * (1.0 - sourceCoef); -+ gdouble resultAlpha = sourceCoef + destCoef; -+ if (resultAlpha != 0.0) { // don't divide by zero -+ destCoef /= resultAlpha; -+ sourceCoef /= resultAlpha; -+ aDest->red = sourceCoef * aSource.red + destCoef * aDest->red; -+ aDest->green = sourceCoef * aSource.green + destCoef * aDest->green; -+ aDest->blue = sourceCoef * aSource.blue + destCoef * aDest->blue; -+ aDest->alpha = resultAlpha; -+ } -+} -+ - static void - GetLightAndDarkness(const GdkRGBA& aColor, - double* aLightness, double* aDarkness) -@@ -377,30 +389,39 @@ nsLookAndFeel::NativeGetColor(ColorID aI - break; - #else - // css2 http://www.w3.org/TR/REC-CSS2/ui.html#system-colors -- case eColorID_activeborder: -+ case eColorID_activeborder: { - // active window border -- gtk_style_context_get_border_color(mBackgroundStyle, -+ GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_WINDOW); -+ gtk_style_context_get_border_color(style, - GTK_STATE_FLAG_NORMAL, &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ ReleaseStyleContext(style); - break; -- case eColorID_inactiveborder: -+ } -+ case eColorID_inactiveborder: { - // inactive window border -- gtk_style_context_get_border_color(mBackgroundStyle, -- GTK_STATE_FLAG_INSENSITIVE, -+ GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_WINDOW); -+ gtk_style_context_get_border_color(style, -+ GTK_STATE_FLAG_INSENSITIVE, - &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ ReleaseStyleContext(style); - break; -+ } - case eColorID_graytext: // disabled text in windows, menus, etc. - case eColorID_inactivecaptiontext: // text in inactive window caption - aColor = sMenuTextInactive; - break; -- case eColorID_inactivecaption: -+ case eColorID_inactivecaption: { - // inactive window caption -- gtk_style_context_get_background_color(mBackgroundStyle, -+ GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_WINDOW); -+ gtk_style_context_get_background_color(style, - GTK_STATE_FLAG_INSENSITIVE, - &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ ReleaseStyleContext(style); - break; -+ } - #endif - case eColorID_infobackground: - // tooltip background color -@@ -521,18 +542,24 @@ nsLookAndFeel::NativeGetColor(ColorID aI - case eColorID__moz_fieldtext: - aColor = sMozFieldText; - break; -- case eColorID__moz_buttondefault: -- // default button border color -- gtk_style_context_get_border_color(mButtonStyle, -+ case eColorID__moz_buttondefault: { -+ // default button border color -+ GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ gtk_style_context_get_border_color(style, - GTK_STATE_FLAG_NORMAL, &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ ReleaseStyleContext(style); - break; -- case eColorID__moz_buttonhoverface: -- gtk_style_context_get_background_color(mButtonStyle, -+ } -+ case eColorID__moz_buttonhoverface: { -+ GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ gtk_style_context_get_background_color(style, - GTK_STATE_FLAG_PRELIGHT, - &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ ReleaseStyleContext(style); - break; -+ } - case eColorID__moz_buttonhovertext: - aColor = sButtonHoverText; - break; -@@ -1029,16 +1056,6 @@ nsLookAndFeel::GetFontImpl(FontID aID, n - return true; - } - --#if (MOZ_WIDGET_GTK == 3) --static GtkStyleContext* --create_context(GtkWidgetPath *path) --{ -- GtkStyleContext *style = gtk_style_context_new(); -- gtk_style_context_set_path(style, path); -- return(style); --} --#endif -- - void - nsLookAndFeel::Init() - { -@@ -1129,78 +1146,54 @@ nsLookAndFeel::Init() - g_object_set(settings, dark_setting, FALSE, nullptr); - } - -- GtkWidgetPath *path = gtk_widget_path_new(); -- gtk_widget_path_append_type(path, GTK_TYPE_WINDOW); -- -- mBackgroundStyle = create_context(path); -- gtk_style_context_add_class(mBackgroundStyle, GTK_STYLE_CLASS_BACKGROUND); -- -- mButtonStyle = create_context(path); -- gtk_style_context_add_class(mButtonStyle, GTK_STYLE_CLASS_BUTTON); -- - // Scrollbar colors -- style = create_context(path); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_SCROLLBAR); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_TROUGH); -+ style = ClaimStyleContext(MOZ_GTK_SCROLLBAR_TROUGH_VERTICAL); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozScrollbar = GDK_RGBA_TO_NS_RGBA(color); -- g_object_unref(style); -+ ReleaseStyleContext(style); - - // Window colors -- style = create_context(path); -- gtk_style_context_save(style); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND); -+ style = ClaimStyleContext(MOZ_GTK_WINDOW); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozWindowBackground = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozWindowText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_restore(style); -- g_object_unref(style); -+ ReleaseStyleContext(style); - - // tooltip foreground and background - style = ClaimStyleContext(MOZ_GTK_TOOLTIP); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sInfoBackground = GDK_RGBA_TO_NS_RGBA(color); -- { -- GtkStyleContext* boxStyle = -- CreateStyleForWidget(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0), -- style); -- GtkStyleContext* labelStyle = -- CreateStyleForWidget(gtk_label_new(nullptr), boxStyle); -- gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color); -- g_object_unref(labelStyle); -- g_object_unref(boxStyle); -- } -- sInfoText = GDK_RGBA_TO_NS_RGBA(color); - ReleaseStyleContext(style); - -- // menu foreground & menu background -- GtkWidget *accel_label = gtk_accel_label_new("M"); -- GtkWidget *menuitem = gtk_menu_item_new(); -- GtkWidget *menu = gtk_menu_new(); -- -- g_object_ref_sink(menu); -- -- gtk_container_add(GTK_CONTAINER(menuitem), accel_label); -- gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); -- -- style = gtk_widget_get_style_context(accel_label); -+ style = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); -- sMenuText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_INSENSITIVE, &color); -- sMenuTextInactive = GDK_RGBA_TO_NS_RGBA(color); -+ sInfoText = GDK_RGBA_TO_NS_RGBA(color); -+ ReleaseStyleContext(style); - -- style = gtk_widget_get_style_context(menu); -+ style = ClaimStyleContext(MOZ_GTK_MENUITEM); -+ { -+ GtkStyleContext* accelStyle = -+ CreateStyleForWidget(gtk_accel_label_new("M"), style); -+ gtk_style_context_get_color(accelStyle, GTK_STATE_FLAG_NORMAL, &color); -+ sMenuText = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_get_color(accelStyle, GTK_STATE_FLAG_INSENSITIVE, &color); -+ sMenuTextInactive = GDK_RGBA_TO_NS_RGBA(color); -+ g_object_unref(accelStyle); -+ } -+ ReleaseStyleContext(style); -+ -+ style = ClaimStyleContext(MOZ_GTK_MENUPOPUP); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMenuBackground = GDK_RGBA_TO_NS_RGBA(color); -+ ReleaseStyleContext(style); - -- style = gtk_widget_get_style_context(menuitem); -+ style = ClaimStyleContext(MOZ_GTK_MENUITEM); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_PRELIGHT, &color); - sMenuHover = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); - sMenuHoverText = GDK_RGBA_TO_NS_RGBA(color); -- -- g_object_unref(menu); -+ ReleaseStyleContext(style); - #endif - - // button styles -@@ -1211,9 +1204,6 @@ nsLookAndFeel::Init() - GtkWidget *combobox = gtk_combo_box_new(); - GtkWidget *comboboxLabel = gtk_label_new("M"); - gtk_container_add(GTK_CONTAINER(combobox), comboboxLabel); --#else -- GtkWidget *combobox = gtk_combo_box_new_with_entry(); -- GtkWidget *comboboxLabel = gtk_bin_get_child(GTK_BIN(combobox)); - #endif - GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP); - GtkWidget *treeView = gtk_tree_view_new(); -@@ -1227,7 +1217,9 @@ nsLookAndFeel::Init() - gtk_container_add(GTK_CONTAINER(parent), button); - gtk_container_add(GTK_CONTAINER(parent), treeView); - gtk_container_add(GTK_CONTAINER(parent), linkButton); -+#if (MOZ_WIDGET_GTK == 2) - gtk_container_add(GTK_CONTAINER(parent), combobox); -+#endif - gtk_container_add(GTK_CONTAINER(parent), menuBar); - gtk_menu_shell_append(GTK_MENU_SHELL(menuBar), menuBarItem); - gtk_container_add(GTK_CONTAINER(window), parent); -@@ -1310,11 +1302,19 @@ nsLookAndFeel::Init() - } - #else - // Text colors -- style = gtk_widget_get_style_context(textView); -- gtk_style_context_save(style); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_VIEW); -- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); -- sMozFieldBackground = GDK_RGBA_TO_NS_RGBA(color); -+ GdkRGBA bgColor; -+ // If the text window background is translucent, then the background of -+ // the textview root node is visible. -+ style = ClaimStyleContext(MOZ_GTK_TEXT_VIEW); -+ gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, -+ &bgColor); -+ ReleaseStyleContext(style); -+ -+ style = ClaimStyleContext(MOZ_GTK_TEXT_VIEW_TEXT); -+ gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, -+ &color); -+ ApplyColorOver(color, &bgColor); -+ sMozFieldBackground = GDK_RGBA_TO_NS_RGBA(bgColor); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozFieldText = GDK_RGBA_TO_NS_RGBA(color); - -@@ -1327,26 +1327,34 @@ nsLookAndFeel::Init() - static_cast(GTK_STATE_FLAG_FOCUSED|GTK_STATE_FLAG_SELECTED), - &color); - sTextSelectedText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_restore(style); -+ ReleaseStyleContext(style); - -- // Button text, background, border -- style = gtk_widget_get_style_context(label); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); -- sButtonText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); -- sButtonHoverText = GDK_RGBA_TO_NS_RGBA(color); -+ // Button text color -+ style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ { -+ GtkStyleContext* labelStyle = -+ CreateStyleForWidget(gtk_label_new("M"), style); -+ gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color); -+ sButtonText = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_PRELIGHT, &color); -+ sButtonHoverText = GDK_RGBA_TO_NS_RGBA(color); -+ g_object_unref(labelStyle); -+ } -+ ReleaseStyleContext(style); - - // Combobox text color -- style = gtk_widget_get_style_context(comboboxLabel); -+ style = ClaimStyleContext(MOZ_GTK_COMBOBOX_ENTRY_TEXTAREA); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sComboBoxText = GDK_RGBA_TO_NS_RGBA(color); -+ ReleaseStyleContext(style); - - // Menubar text and hover text colors -- style = gtk_widget_get_style_context(menuBarItem); -+ style = ClaimStyleContext(MOZ_GTK_MENUBARITEM); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMenuBarText = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); - sMenuBarHoverText = GDK_RGBA_TO_NS_RGBA(color); -+ ReleaseStyleContext(style); - - // GTK's guide to fancy odd row background colors: - // 1) Check if a theme explicitly defines an odd row color -@@ -1354,7 +1362,7 @@ nsLookAndFeel::Init() - // slightly by a hardcoded value (gtkstyle.c) - // 3) If neither are defined, take the base background color and - // darken that by a hardcoded value -- style = gtk_widget_get_style_context(treeView); -+ style = ClaimStyleContext(MOZ_GTK_TREEVIEW); - - // Get odd row background color - gtk_style_context_save(style); -@@ -1362,8 +1370,7 @@ nsLookAndFeel::Init() - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_restore(style); -- -- gtk_widget_path_free(path); -+ ReleaseStyleContext(style); - - // GtkFrame has a "border" subnode on which Adwaita draws the border. - // Some themes do not draw on this node but draw a border on the widget -@@ -1448,12 +1455,6 @@ nsLookAndFeel::RefreshImpl() - #if (MOZ_WIDGET_GTK == 2) - g_object_unref(mStyle); - mStyle = nullptr; --#else -- g_object_unref(mBackgroundStyle); -- g_object_unref(mButtonStyle); -- -- mBackgroundStyle = nullptr; -- mButtonStyle = nullptr; - #endif - - Init(); -diff -up firefox-52.0/widget/gtk/WidgetStyleCache.cpp.widget-rebase firefox-52.0/widget/gtk/WidgetStyleCache.cpp ---- firefox-52.0/widget/gtk/WidgetStyleCache.cpp.widget-rebase 2017-02-27 17:11:05.000000000 +0100 -+++ firefox-52.0/widget/gtk/WidgetStyleCache.cpp 2017-03-10 12:20:30.235205976 +0100 -@@ -434,15 +434,6 @@ CreateScrolledWindowWidget() - } - - static GtkWidget* --CreateTextViewWidget() --{ -- GtkWidget* widget = gtk_text_view_new(); -- gtk_container_add(GTK_CONTAINER(GetWidget(MOZ_GTK_SCROLLED_WINDOW)), -- widget); -- return widget; --} -- --static GtkWidget* - CreateMenuSeparatorWidget() - { - GtkWidget* widget = gtk_separator_menu_item_new(); -@@ -591,8 +582,6 @@ CreateWidget(WidgetNodeType aWidgetType) - return CreateEntryWidget(); - case MOZ_GTK_SCROLLED_WINDOW: - return CreateScrolledWindowWidget(); -- case MOZ_GTK_TEXT_VIEW: -- return CreateTextViewWidget(); - case MOZ_GTK_TREEVIEW: - return CreateTreeViewWidget(); - case MOZ_GTK_TREE_HEADER_CELL: -@@ -744,16 +733,38 @@ GetWidgetRootStyle(WidgetNodeType aNodeT - case MOZ_GTK_MENUITEM: - style = CreateStyleForWidget(gtk_menu_item_new(), MOZ_GTK_MENUPOPUP); - break; -- case MOZ_GTK_IMAGEMENUITEM: -- style = CreateStyleForWidget(gtk_image_menu_item_new(), MOZ_GTK_MENUPOPUP); -- break; -- case MOZ_GTK_CHECKMENUITEM_CONTAINER: -+ case MOZ_GTK_CHECKMENUITEM: - style = CreateStyleForWidget(gtk_check_menu_item_new(), MOZ_GTK_MENUPOPUP); - break; -- case MOZ_GTK_RADIOMENUITEM_CONTAINER: -+ case MOZ_GTK_RADIOMENUITEM: - style = CreateStyleForWidget(gtk_radio_menu_item_new(nullptr), - MOZ_GTK_MENUPOPUP); - break; -+ case MOZ_GTK_TEXT_VIEW: -+ style = CreateStyleForWidget(gtk_text_view_new(), -+ MOZ_GTK_SCROLLED_WINDOW); -+ break; -+ case MOZ_GTK_TOOLTIP: -+ if (gtk_check_version(3, 20, 0) != nullptr) { -+ // The tooltip style class is added first in CreateTooltipWidget() -+ // and transfered to style in CreateStyleForWidget(). -+ GtkWidget* tooltipWindow = CreateTooltipWidget(); -+ style = CreateStyleForWidget(tooltipWindow, nullptr); -+ gtk_widget_destroy(tooltipWindow); // Release GtkWindow self-reference. -+ } else { -+ // We create this from the path because GtkTooltipWindow is not public. -+ style = CreateCSSNode("tooltip", nullptr, GTK_TYPE_TOOLTIP); -+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND); -+ } -+ break; -+ case MOZ_GTK_TOOLTIP_BOX: -+ style = CreateStyleForWidget(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0), -+ MOZ_GTK_TOOLTIP); -+ break; -+ case MOZ_GTK_TOOLTIP_BOX_LABEL: -+ style = CreateStyleForWidget(gtk_label_new(nullptr), -+ MOZ_GTK_TOOLTIP_BOX); -+ break; - default: - GtkWidget* widget = GetWidget(aNodeType); - MOZ_ASSERT(widget); -@@ -827,13 +838,13 @@ GetCssNodeStyleInternal(WidgetNodeType a - style = CreateChildCSSNode(GTK_STYLE_CLASS_CHECK, - MOZ_GTK_CHECKBUTTON_CONTAINER); - break; -- case MOZ_GTK_RADIOMENUITEM: -+ case MOZ_GTK_RADIOMENUITEM_INDICATOR: - style = CreateChildCSSNode(GTK_STYLE_CLASS_RADIO, -- MOZ_GTK_RADIOMENUITEM_CONTAINER); -+ MOZ_GTK_RADIOMENUITEM); - break; -- case MOZ_GTK_CHECKMENUITEM: -+ case MOZ_GTK_CHECKMENUITEM_INDICATOR: - style = CreateChildCSSNode(GTK_STYLE_CLASS_CHECK, -- MOZ_GTK_CHECKMENUITEM_CONTAINER); -+ MOZ_GTK_CHECKMENUITEM); - break; - case MOZ_GTK_PROGRESS_TROUGH: - /* Progress bar background (trough) */ -@@ -844,11 +855,6 @@ GetCssNodeStyleInternal(WidgetNodeType a - style = CreateChildCSSNode("progress", - MOZ_GTK_PROGRESS_TROUGH); - break; -- case MOZ_GTK_TOOLTIP: -- // We create this from the path because GtkTooltipWindow is not public. -- style = CreateCSSNode("tooltip", nullptr, GTK_TYPE_TOOLTIP); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND); -- break; - case MOZ_GTK_GRIPPER: - // TODO - create from CSS node - return GetWidgetStyleWithClass(MOZ_GTK_GRIPPER, -@@ -865,10 +871,28 @@ GetCssNodeStyleInternal(WidgetNodeType a - // TODO - create from CSS node - return GetWidgetStyleWithClass(MOZ_GTK_SCROLLED_WINDOW, - GTK_STYLE_CLASS_FRAME); -- case MOZ_GTK_TEXT_VIEW: -- // TODO - create from CSS node -- return GetWidgetStyleWithClass(MOZ_GTK_TEXT_VIEW, -- GTK_STYLE_CLASS_VIEW); -+ case MOZ_GTK_TEXT_VIEW_TEXT: -+ case MOZ_GTK_RESIZER: -+ style = CreateChildCSSNode("text", MOZ_GTK_TEXT_VIEW); -+ if (aNodeType == MOZ_GTK_RESIZER) { -+ // The "grip" class provides the correct builtin icon from -+ // gtk_render_handle(). The icon is drawn with shaded variants of -+ // the background color, and so a transparent background would lead to -+ // a transparent resizer. gtk_render_handle() also uses the -+ // background color to draw a background, and so this style otherwise -+ // matches what is used in GtkTextView to match the background with -+ // textarea elements. -+ GdkRGBA color; -+ gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, -+ &color); -+ if (color.alpha == 0.0) { -+ g_object_unref(style); -+ style = CreateStyleForWidget(gtk_text_view_new(), -+ MOZ_GTK_SCROLLED_WINDOW); -+ } -+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_GRIP); -+ } -+ break; - case MOZ_GTK_FRAME_BORDER: - style = CreateChildCSSNode("border", MOZ_GTK_FRAME); - break; -@@ -971,27 +995,20 @@ GetWidgetStyleInternal(WidgetNodeType aN - case MOZ_GTK_CHECKBUTTON: - return GetWidgetStyleWithClass(MOZ_GTK_CHECKBUTTON_CONTAINER, - GTK_STYLE_CLASS_CHECK); -- case MOZ_GTK_RADIOMENUITEM: -- return GetWidgetStyleWithClass(MOZ_GTK_RADIOMENUITEM_CONTAINER, -+ case MOZ_GTK_RADIOMENUITEM_INDICATOR: -+ return GetWidgetStyleWithClass(MOZ_GTK_RADIOMENUITEM, - GTK_STYLE_CLASS_RADIO); -- case MOZ_GTK_CHECKMENUITEM: -- return GetWidgetStyleWithClass(MOZ_GTK_CHECKMENUITEM_CONTAINER, -+ case MOZ_GTK_CHECKMENUITEM_INDICATOR: -+ return GetWidgetStyleWithClass(MOZ_GTK_CHECKMENUITEM, - GTK_STYLE_CLASS_CHECK); - case MOZ_GTK_PROGRESS_TROUGH: - return GetWidgetStyleWithClass(MOZ_GTK_PROGRESSBAR, - GTK_STYLE_CLASS_TROUGH); -- case MOZ_GTK_TOOLTIP: { -- GtkStyleContext* style = sStyleStorage[aNodeType]; -- if (style) -- return style; -- -- // The tooltip style class is added first in CreateTooltipWidget() so -- // that gtk_widget_path_append_for_widget() in CreateStyleForWidget() -- // will find it. -- GtkWidget* tooltipWindow = CreateTooltipWidget(); -- style = CreateStyleForWidget(tooltipWindow, nullptr); -- gtk_widget_destroy(tooltipWindow); // Release GtkWindow self-reference. -- sStyleStorage[aNodeType] = style; -+ case MOZ_GTK_PROGRESS_CHUNK: { -+ GtkStyleContext* style = -+ GetWidgetStyleWithClass(MOZ_GTK_PROGRESSBAR, -+ GTK_STYLE_CLASS_PROGRESSBAR); -+ gtk_style_context_remove_class(style, GTK_STYLE_CLASS_TROUGH); - return style; - } - case MOZ_GTK_GRIPPER: -@@ -1006,9 +1023,25 @@ GetWidgetStyleInternal(WidgetNodeType aN - case MOZ_GTK_SCROLLED_WINDOW: - return GetWidgetStyleWithClass(MOZ_GTK_SCROLLED_WINDOW, - GTK_STYLE_CLASS_FRAME); -- case MOZ_GTK_TEXT_VIEW: -- return GetWidgetStyleWithClass(MOZ_GTK_TEXT_VIEW, -- GTK_STYLE_CLASS_VIEW); -+ case MOZ_GTK_TEXT_VIEW_TEXT: -+ case MOZ_GTK_RESIZER: { -+ // GTK versions prior to 3.20 do not have the view class on the root -+ // node, but add this to determine the background for the text window. -+ GtkStyleContext* style = -+ GetWidgetStyleWithClass(MOZ_GTK_TEXT_VIEW, GTK_STYLE_CLASS_VIEW); -+ if (aNodeType == MOZ_GTK_RESIZER) { -+ // The "grip" class provides the correct builtin icon from -+ // gtk_render_handle(). The icon is drawn with shaded variants of -+ // the background color, and so a transparent background would lead to -+ // a transparent resizer. gtk_render_handle() also uses the -+ // background color to draw a background, and so this style otherwise -+ // matches MOZ_GTK_TEXT_VIEW_TEXT to match the background with -+ // textarea elements. GtkTextView creates a separate text window and -+ // so the background should not be transparent. -+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_GRIP); -+ } -+ return style; -+ } - case MOZ_GTK_FRAME_BORDER: - return GetWidgetRootStyle(MOZ_GTK_FRAME); - case MOZ_GTK_TREEVIEW_VIEW: diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch deleted file mode 100644 index b2aaae6..0000000 --- a/xulrunner-24.0-jemalloc-ppc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-48.0/memory/mozjemalloc/jemalloc.c.jemalloc-ppc firefox-48.0/memory/mozjemalloc/jemalloc.c ---- firefox-48.0/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2016-07-26 10:51:46.385434384 +0200 -+++ firefox-48.0/memory/mozjemalloc/jemalloc.c 2016-07-26 10:53:49.061023106 +0200 -@@ -1090,7 +1090,7 @@ static const bool config_recycle = false - * controlling the malloc behavior are defined as compile-time constants - * for best performance and cannot be altered at runtime. - */ --#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) -+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !(defined(__powerpc__)) - #define MALLOC_STATIC_SIZES 1 - #endif - diff --git a/xulrunner-24.0-s390-inlines.patch b/xulrunner-24.0-s390-inlines.patch deleted file mode 100644 index 074f8d9..0000000 --- a/xulrunner-24.0-s390-inlines.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp ---- xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-10-23 16:04:01.773093979 +0200 -+++ xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-10-23 16:04:44.551134551 +0200 -@@ -4,6 +4,8 @@ - * 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 "jscntxtinlines.h" -+ - #include "vm/SPSProfiler.h" - - #include "mozilla/DebugOnly.h"