diff options
55 files changed, 4959 insertions, 1103 deletions
@@ -1,5 +1,3 @@ -# Generated by mksrcinfo v8 -# Sat Nov 19 01:16:37 UTC 2022 pkgbase = firefox-kde-opensuse pkgdesc = Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE pkgver = 107.0 @@ -69,52 +67,76 @@ pkgbase = firefox-kde-opensuse source = mozconfig source = firefox.desktop source = vendor.js - source = kde.js - source = firefox-branded-icons-22b224bf3e8c1431d2d9d961ca351cf3c50fdc15.patch::https://raw.githubusercontent.com/openSUSE/firefox-maintenance/22b224bf3e8c1431d2d9d961ca351cf3c50fdc15/firefox/firefox-branded-icons.patch - source = firefox-kde-22b224bf3e8c1431d2d9d961ca351cf3c50fdc15.patch::https://raw.githubusercontent.com/openSUSE/firefox-maintenance/22b224bf3e8c1431d2d9d961ca351cf3c50fdc15/firefox/firefox-kde.patch - source = mozilla-kde-22b224bf3e8c1431d2d9d961ca351cf3c50fdc15.patch::https://raw.githubusercontent.com/openSUSE/firefox-maintenance/22b224bf3e8c1431d2d9d961ca351cf3c50fdc15/mozilla-kde.patch - source = mozilla-nongnome-proxies-22b224bf3e8c1431d2d9d961ca351cf3c50fdc15.patch::https://raw.githubusercontent.com/openSUSE/firefox-maintenance/22b224bf3e8c1431d2d9d961ca351cf3c50fdc15/mozilla-nongnome-proxies.patch - source = unity-menubar.patch - source = add_missing_pgo_rule.patch - source = pgo_fix_missing_kdejs.patch - source = 0004-bmo-847568-Support-system-harfbuzz.patch - source = 0005-bmo-847568-Support-system-graphite2.patch - source = 0006-bmo-1559213-Support-system-av1.patch - source = 5022efe33088.patch - source = build-disable-elfhack.patch - source = 0020-Make-PGO-use-toolchain.patch - source = 0022-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch - source = 0024-Fix-building-with-PGO-when-using-GCC.patch - source = 0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch - source = fix_csd_window_buttons.patch - source = fix-wayland-build.patch - source = https://src.fedoraproject.org/rpms/firefox/raw/f0029706cee042f03f836e10d51bb2245e9fa392/f/libwebrtc-screen-cast-sync.patch - source = bump-pypip-zstandard-0.18.diff + source = 0001-Bug-1005535-Get-skia-GPU-building-on-big-endian.patch + source = 0002-Allow-to-override-build-date-with-SOURCE_DATE_EPOCH.patch + source = 0003-Bug-1504834-Rough-progress-patch.patch + source = 0004-Bug-1504834-XULText-AA-fix-BE.patch + source = 0005-Fix-top-level-asm-issue.patch + source = 0006-mozilla-bmo998749.patch.patch + source = 0007-mozilla-s390x-skia-gradient.patch.patch + source = 0008-mozilla-libavcodec58_91.patch.patch + source = 0009-mozilla-silence-no-return-type.patch-to-fix-build-er.patch + source = 0010-Bug-531915-mozilla-bmo531915.patch.patch + source = 0011-imported-patch-one_swizzle_to_rule_them_all.patch.patch + source = 0012-imported-patch-svg-rendering.patch.patch + source = 0013-Bug-1792159-Add-missing-includes-to-AtomicOperations.patch + source = 0014-mozilla-s390-context.patch.patch + source = 0015-bsc-991344-Rpi3-Firefox-crashes-after-a-few-seconds-.patch + source = 0016-mozilla-fix-aarch64-libopus.patch.patch + source = 0017-Bug-634334-call-to-the-ntlm_auth-helper-fails.patch + source = 0018-Make-PGO-use-toolchain.patch + source = 0019-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch + source = 0020-Fix-building-with-PGO-when-using-GCC.patch + source = 0021-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch + source = 0022-Bug-1516081-Disable-watchdog-during-FDO-train.patch + source = 0023-Bug-559213-Support-system-av1.patch + source = 0024-Bug-847568-Support-system-harfbuzz.patch + source = 0025-Bug-847568-Support-system-graphite2.patch + source = 0026-Bug-1611386-Reenable-support-for-enable-system-sqlit.patch + source = 0027-Bug-1419151-Add-Unity-menubar-support.patch + source = 0028-Do-not-use-gconf-for-proxy-settings-if-not-running-w.patch + source = 0029-Add-KDE-integration-to-Firefox-toolkit-parts.patch + source = 0030-Add-KDE-integration-to-Firefox.patch + source = 0031-Imported-patch-firefox-branded-icons.patch.patch + source = 0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch + source = 0033-Allow-Eme-for-arm-and-Aarch64.patch md5sums = SKIP md5sums = 9530b0395a095c0b47ee42d0996ec163 md5sums = a26a061efb4def6572d5b319d657f1d6 md5sums = 4c23d9c0a691d70919beb1dafbbecbd3 - md5sums = 05bb69d25fb3572c618e3adf1ee7b670 - md5sums = 800d337d558de8201c8828252c1cd199 - md5sums = 2e2e0721f1c29b2ae786d8c6e34fa65f - md5sums = 4819b01c44ce3f6bdc3fbc096d717ca0 - md5sums = 0a5733b7a457a2786c2dd27626a1bf88 - md5sums = ee09a0bdeadfedc76c0379f170ab2dc1 - md5sums = fe24f5ea463013bb7f1c12d12dce41b2 - md5sums = 3c383d371d7f6ede5983a40310518715 - md5sums = dc47b8b0582ca8e97d68e5636b72853c - md5sums = 9e518b30cf2ff9afd0423c79d12ae7b2 - md5sums = 0ba70a7a61493cb053f93d6560b8be32 - md5sums = 548de130fc0f470bff0b6d994a0a91cd - md5sums = c7b492df4fbf42ffe8aea4c0afb89921 - md5sums = 316d71d9cec400890db2ee8c362e672f - md5sums = c6c0e47c9b517e5146a8925f442b811b - md5sums = 943b9fe2ba474f7809a41622744f97f9 - md5sums = 31f950a94966287bfa6ccf03030781cc - md5sums = f49ac3b9f5146e33ce587e6b23eb1a86 - md5sums = 2cf74781f6b742d6b7e6f7251f49311a - md5sums = 015dbab57c0d9c65d7a94a29dd8bf8a4 - md5sums = c36ef413ef998444d7d1dd543fd8f58b + md5sums = e48cd51c49f5b8b1595f9cd8f55ce819 + md5sums = 6945bb71f87e01743a6736fbdb845cfd + md5sums = 954e7d1ff4452e3c8895a186ff815383 + md5sums = f6e793369b22bd607403d9b9f0565a3c + md5sums = 8df09195607f90a097f21d35dc4d9c30 + md5sums = a1b878f2e22f096ad907630aa873698f + md5sums = 3256d35703c9a2857503921eb10c3dd7 + md5sums = efe01b463d50e30de15c03f391e0b366 + md5sums = ab2a8a5aa3aa2b52f7102466aab7eb7e + md5sums = 63a6be4970c5a999adad40f9e021c366 + md5sums = 1c1ce911bbbe548f130e6fca5e136bdd + md5sums = 831c2ccaf07c68cf4f9008692475c1d9 + md5sums = cc679a9a9abbb9e8a33800b4cb5f4deb + md5sums = 8c0af75143b8f8d4b86e0f438bd8ccc8 + md5sums = e13a08af8fa75cfebd2ca5d509784046 + md5sums = 379b26ef4582c6d15ab61c7944540c7f + md5sums = 7ee193a7b8230b68036f6db5d188f7fc + md5sums = 9266d9fa0c39e30ae2e9c93b3d7822e7 + md5sums = 101080a6f3639db7c36dcf1218a83d1a + md5sums = 39a5aa662bd007d0562beaeae4edc175 + md5sums = a067121f85949a76e709d53871f09834 + md5sums = 12f66e9f224381e73aa7e7fb6c535c13 + md5sums = ad886aed59f72e6f1ad470ab4e96ebd8 + md5sums = b69acf75b1649f965ac1637e34356038 + md5sums = d1dfbcdc4951a5d279071323160fe856 + md5sums = 3db73a1168751e27a66d7564a9492312 + md5sums = b30750c85f239ba19b6b0ba308e86990 + md5sums = 401a4da2cadcaf12546cb495d63407e4 + md5sums = 42ce462dcbdaaed8ffb45b1b5d10a49d + md5sums = f792d0ce1e4f3f260862ec70295f2f81 + md5sums = bc7676460d246f57e8f4e5db1850eaf8 + md5sums = 1bc91fa92a1a7ce337ec9b398290f5e8 + md5sums = 15a701ef094073919c43701ef4b8b85f pkgname = firefox-kde-opensuse depends = libxt @@ -135,4 +157,3 @@ pkgname = firefox-kde-opensuse depends = libicui18n.so depends = libvpx.so depends = libgtk-3.so - diff --git a/0001-Bug-1005535-Get-skia-GPU-building-on-big-endian.patch b/0001-Bug-1005535-Get-skia-GPU-building-on-big-endian.patch new file mode 100644 index 000000000000..dfdefbdfd4d4 --- /dev/null +++ b/0001-Bug-1005535-Get-skia-GPU-building-on-big-endian.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Steve Singer <steve@ssinger.info> +Date: Tue, 21 May 2019 17:12:20 +0200 +Subject: [PATCH] Bug 1005535 - Get skia GPU building on big endian. + +--- + gfx/skia/skia/src/gpu/GrColor.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gfx/skia/skia/src/gpu/GrColor.h b/gfx/skia/skia/src/gpu/GrColor.h +index 39e7bfa7bf19799bfafa5d3f5371d96138f0bd7f..57b405f3b7599689f1c3a7a7b31b0039b2a8c98d 100644 +--- a/gfx/skia/skia/src/gpu/GrColor.h ++++ b/gfx/skia/skia/src/gpu/GrColor.h +@@ -64,7 +64,7 @@ static inline GrColor GrColorPackRGBA(unsigned r, unsigned g, unsigned b, unsign + * Since premultiplied means that alpha >= color, we construct a color with + * each component==255 and alpha == 0 to be "illegal" + */ +-#define GrColor_ILLEGAL (~(0xFF << GrColor_SHIFT_A)) ++#define GrColor_ILLEGAL ((uint32_t)(~(0xFF << GrColor_SHIFT_A))) + + /** Normalizes and coverts an uint8_t to a float. [0, 255] -> [0.0, 1.0] */ + static inline float GrNormalizeByteToFloat(uint8_t value) { diff --git a/0002-Allow-to-override-build-date-with-SOURCE_DATE_EPOCH.patch b/0002-Allow-to-override-build-date-with-SOURCE_DATE_EPOCH.patch new file mode 100644 index 000000000000..5e036e0dbb08 --- /dev/null +++ b/0002-Allow-to-override-build-date-with-SOURCE_DATE_EPOCH.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" <bwiedemann@suse.de> +Date: Mon, 22 Jul 2019 00:00:00 +0200 +Subject: [PATCH] Allow to override build date with SOURCE_DATE_EPOCH + +Allow to override build date with SOURCE_DATE_EPOCH +in order to make builds reproducible. +See https://reproducible-builds.org/ for why this is good +and https://reproducible-builds.org/specs/source-date-epoch/ +for the definition of this variable. +--- + python/mozbuild/mozbuild/action/langpack_manifest.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/python/mozbuild/mozbuild/action/langpack_manifest.py b/python/mozbuild/mozbuild/action/langpack_manifest.py +index 4277c25aef3021fd6b19b05f9d5e94c1d928ea2d..aac4ca1a2a0e6f83e7eb7efe9eeb833fa1086dba 100644 +--- a/python/mozbuild/mozbuild/action/langpack_manifest.py ++++ b/python/mozbuild/mozbuild/action/langpack_manifest.py +@@ -18,6 +18,7 @@ import json + import logging + import os + import sys ++import time + + import fluent.syntax.ast as FTL + import mozpack.path as mozpath +@@ -106,7 +107,7 @@ def get_timestamp_for_locale(path): + dt = get_dt_from_hg(path) + + if dt is None: +- dt = datetime.datetime.utcnow() ++ dt = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) + + dt = dt.replace(microsecond=0) + return dt.strftime("%Y%m%d%H%M%S") diff --git a/0003-Bug-1504834-Rough-progress-patch.patch b/0003-Bug-1504834-Rough-progress-patch.patch new file mode 100644 index 000000000000..11f374d059fe --- /dev/null +++ b/0003-Bug-1504834-Rough-progress-patch.patch @@ -0,0 +1,92 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Thu, 29 Nov 2018 14:50:37 -0600 +Subject: [PATCH] Bug 1504834 - Rough progress patch + +https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c5 +--- + gfx/2d/DrawTargetSkia.cpp | 3 +-- + gfx/2d/Types.h | 7 ------- + gfx/skia/skia/third_party/skcms/skcms.cc | 18 ++++++++++++++---- + 3 files changed, 15 insertions(+), 13 deletions(-) + +diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp +index 04ee0c652db516bc03af19cf5e1b1e28e5a5f85e..e138a4e290af1293cc355b32c636a6073bf9d1dc 100644 +--- a/gfx/2d/DrawTargetSkia.cpp ++++ b/gfx/2d/DrawTargetSkia.cpp +@@ -152,8 +152,7 @@ static IntRect CalculateSurfaceBounds(const IntSize& aSize, const Rect* aBounds, + return surfaceBounds.Intersect(bounds); + } + +-static const int kARGBAlphaOffset = +- SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0; ++static const int kARGBAlphaOffset = 0; // Skia is always BGRA SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0; + + static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize, + const int32_t aStride, SurfaceFormat aFormat) { +diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h +index fc3a910daa3c4c9ee2dc70375cbbb6dfb80b84ef..2c16a9a01ca2791a610cb498d0539772c817a9a5 100644 +--- a/gfx/2d/Types.h ++++ b/gfx/2d/Types.h +@@ -92,15 +92,8 @@ enum class SurfaceFormat : int8_t { + // The following values are endian-independent synonyms. The _UINT32 suffix + // indicates that the name reflects the layout when viewed as a uint32_t + // value. +-#if MOZ_LITTLE_ENDIAN() + A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB + X8R8G8B8_UINT32 = B8G8R8X8, // 0x00RRGGBB +-#elif MOZ_BIG_ENDIAN() +- A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB +- X8R8G8B8_UINT32 = X8R8G8B8, // 0x00RRGGBB +-#else +-# error "bad endianness" +-#endif + + // The following values are OS and endian-independent synonyms. + // +diff --git a/gfx/skia/skia/third_party/skcms/skcms.cc b/gfx/skia/skia/third_party/skcms/skcms.cc +index 6b4d87b15df9353f5d596f88749507c9b4efef78..7c0559d2679038e8cb79aed993f9656d978e8f6b 100644 +--- a/gfx/skia/skia/third_party/skcms/skcms.cc ++++ b/gfx/skia/skia/third_party/skcms/skcms.cc +@@ -30,6 +30,8 @@ + #include <avx512fintrin.h> + #include <avx512dqintrin.h> + #endif ++#else ++ #define SKCMS_PORTABLE + #endif + + // sizeof(x) will return size_t, which is 32-bit on some machines and 64-bit on others. +@@ -280,20 +282,28 @@ enum { + static uint16_t read_big_u16(const uint8_t* ptr) { + uint16_t be; + memcpy(&be, ptr, sizeof(be)); +-#if defined(_MSC_VER) +- return _byteswap_ushort(be); ++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ++ return be; + #else ++ #if defined(_MSC_VER) ++ return _byteswap_ushort(be); ++ #else + return __builtin_bswap16(be); ++ #endif + #endif + } + + static uint32_t read_big_u32(const uint8_t* ptr) { + uint32_t be; + memcpy(&be, ptr, sizeof(be)); +-#if defined(_MSC_VER) +- return _byteswap_ulong(be); ++#if __BYTE_ORDER == __ORDER_BIG_ENDIAN__ ++ return be; + #else ++ #if defined(_MSC_VER) ++ return _byteswap_ulong(be); ++ #else + return __builtin_bswap32(be); ++ #endif + #endif + } + diff --git a/0004-Bug-1504834-XULText-AA-fix-BE.patch b/0004-Bug-1504834-XULText-AA-fix-BE.patch new file mode 100644 index 000000000000..e26496ad9930 --- /dev/null +++ b/0004-Bug-1504834-XULText-AA-fix-BE.patch @@ -0,0 +1,56 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Sirringhaus <msirringhaus@suse.de> +Date: Mon, 25 Nov 2019 09:31:46 +0200 +Subject: [PATCH] Bug 1504834 - XULText-AA-fix BE + +For FF68, AntiAliasing of XULTexts seem to be broken on big endian (s390x). Text and icons of the sandwich-menu to the + +right of the address bar, as well as plugin-windows appears transparant, which usually means unreadable (white on white). + +https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c9 +--- + gfx/skia/skia/include/private/SkNx.h | 11 +++++++++++ + gfx/skia/skia/src/opts/SkBlitMask_opts.h | 6 ++++++ + 2 files changed, 17 insertions(+) + +diff --git a/gfx/skia/skia/include/private/SkNx.h b/gfx/skia/skia/include/private/SkNx.h +index 06a6df9af2af67c8e9a7442905a5b519e6ee1e37..1b704eacea5e142dbe30f66c260512d7310d6eb5 100644 +--- a/gfx/skia/skia/include/private/SkNx.h ++++ b/gfx/skia/skia/include/private/SkNx.h +@@ -238,7 +238,18 @@ struct SkNx<1,T> { + AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; } + AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; } + ++ // On Big endian the commented out variant doesn't work, ++ // and honestly, I have no idea why it exists in the first place. ++ // The reason its broken is, I think, that it defaults to the double-variant of ToBits() ++ // which gets a 64-bit integer, and FromBits returns 32-bit, ++ // cutting off the wrong half again. ++ // Overall, I see no reason to have ToBits and FromBits at all (even for floats/doubles). ++ // Still we are only "fixing" this for big endian and leave little endian alone (never touch a running system) ++#ifdef SK_CPU_BENDIAN ++ AI SkNx operator&(const SkNx& y) const { return fVal & y.fVal; } ++#else + AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); } ++#endif + AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); } + AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); } + +diff --git a/gfx/skia/skia/src/opts/SkBlitMask_opts.h b/gfx/skia/skia/src/opts/SkBlitMask_opts.h +index 2dfe5ecf960e25bdb399e5bc98999bcf66730554..e86fcef1ee5fa136c5143bd70b382681b6499668 100644 +--- a/gfx/skia/skia/src/opts/SkBlitMask_opts.h ++++ b/gfx/skia/skia/src/opts/SkBlitMask_opts.h +@@ -203,7 +203,13 @@ namespace SK_OPTS_NS { + // ~~~> + // a = 1*aa + d(1-1*aa) = aa + d(1-aa) + // c = 0*aa + d(1-1*aa) = d(1-aa) ++ ++ // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0 ++#ifdef SK_CPU_BENDIAN ++ return Sk4px(Sk16b(aa) & Sk16b(255,0,0,0, 255,0,0,0, 255,0,0,0, 255,0,0,0)) ++#else + return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255)) ++#endif + + d.approxMulDiv255(aa.inv()); + }; + while (h --> 0) { diff --git a/0005-Fix-top-level-asm-issue.patch b/0005-Fix-top-level-asm-issue.patch new file mode 100644 index 000000000000..d24ec1c35cc5 --- /dev/null +++ b/0005-Fix-top-level-asm-issue.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Liska <mliska@suse.cz> +Date: Fri, 17 May 2019 14:41:35 +0200 +Subject: [PATCH] Fix top-level asm issue. + +--- + security/sandbox/linux/moz.build | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build +index 573f667812113b6a62e8c0c0bc04982c28c0e92d..be5120e4aac7b3a5b589a2c88a0218123a4adec7 100644 +--- a/security/sandbox/linux/moz.build ++++ b/security/sandbox/linux/moz.build +@@ -71,7 +71,6 @@ UNIFIED_SOURCES += [ + "../chromium/sandbox/linux/bpf_dsl/policy_compiler.cc", + "../chromium/sandbox/linux/bpf_dsl/syscall_set.cc", + "../chromium/sandbox/linux/seccomp-bpf/die.cc", +- "../chromium/sandbox/linux/seccomp-bpf/syscall.cc", + "broker/SandboxBrokerCommon.cpp", + "Sandbox.cpp", + "SandboxBrokerClient.cpp", +@@ -87,6 +86,7 @@ UNIFIED_SOURCES += [ + SOURCES += [ + "../chromium/base/strings/safe_sprintf.cc", + "../chromium/base/third_party/icu/icu_utf.cc", ++ "../chromium/sandbox/linux/seccomp-bpf/syscall.cc", + "../chromium/sandbox/linux/seccomp-bpf/trap.cc", + "../chromium/sandbox/linux/services/syscall_wrappers.cc", + ] +@@ -110,6 +110,9 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc"): + SOURCES["../chromium/sandbox/linux/services/syscall_wrappers.cc"].flags += [ + "-Wno-empty-body", + ] ++ SOURCES['../chromium/sandbox/linux/seccomp-bpf/syscall.cc'].flags += [ ++ '-fno-lto' ++ ] + + # gcc lto likes to put the top level asm in syscall.cc in a different partition + # from the function using it which breaks the build. Work around that by diff --git a/0006-mozilla-bmo998749.patch.patch b/0006-mozilla-bmo998749.patch.patch new file mode 100644 index 000000000000..32fad9d9e0ed --- /dev/null +++ b/0006-mozilla-bmo998749.patch.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "msirringhaus@suse.de" <msirringhaus@suse.de> +Date: Mon, 9 Mar 2020 08:26:10 +0100 +Subject: [PATCH] mozilla-bmo998749.patch + +--- + gfx/2d/FilterProcessing.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/gfx/2d/FilterProcessing.h b/gfx/2d/FilterProcessing.h +index d6beb626119f430cb1890685eac2dac58eccc91b..1f609c8e500612579fb31b1795381fd987126187 100644 +--- a/gfx/2d/FilterProcessing.h ++++ b/gfx/2d/FilterProcessing.h +@@ -13,10 +13,17 @@ + namespace mozilla { + namespace gfx { + ++#if MOZ_BIG_ENDIAN() ++const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_B = 3; ++const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_G = 2; ++const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_R = 1; ++const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_A = 0; ++#else + const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_B = 0; + const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_G = 1; + const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_R = 2; + const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_A = 3; ++#endif + + class FilterProcessing { + public: diff --git a/0007-mozilla-s390x-skia-gradient.patch.patch b/0007-mozilla-s390x-skia-gradient.patch.patch new file mode 100644 index 000000000000..81f5e79ef575 --- /dev/null +++ b/0007-mozilla-s390x-skia-gradient.patch.patch @@ -0,0 +1,58 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Sirringhaus <msirringhaus@suse.de> +Date: Fri, 27 Mar 2020 13:42:24 +0100 +Subject: [PATCH] mozilla-s390x-skia-gradient.patch + +--- + .../shaders/gradients/Sk4fLinearGradient.cpp | 20 ++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp b/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp +index b4266ced9d26cb6a6a44ae3d9a84de1080a0e6cb..89b478fd1c4a540ee4d275018703bb347b46c3ba 100644 +--- a/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp ++++ b/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp +@@ -7,7 +7,7 @@ + + #include "include/core/SkPaint.h" + #include "src/shaders/gradients/Sk4fLinearGradient.h" +- ++#include "src/core/SkEndian.h" + #include <cmath> + #include <utility> + +@@ -28,6 +28,9 @@ void ramp(const Sk4f& c, const Sk4f& dc, SkPMColor dst[], int n, + + while (n >= 4) { + DstTraits<premul>::store4x(c0, c1, c2, c3, dst, bias0, bias1); ++#ifdef SK_CPU_BENDIAN ++ SkEndianSwap32s(dst, 4); ++#endif + dst += 4; + + c0 = c0 + dc4; +@@ -37,12 +40,23 @@ void ramp(const Sk4f& c, const Sk4f& dc, SkPMColor dst[], int n, + n -= 4; + } + if (n & 2) { +- DstTraits<premul>::store(c0, dst++, bias0); +- DstTraits<premul>::store(c1, dst++, bias1); ++ DstTraits<premul>::store(c0, dst, bias0); ++#ifdef SK_CPU_BENDIAN ++ *dst = SkEndianSwap32(*dst); ++#endif ++ ++dst; ++ DstTraits<premul>::store(c1, dst, bias1); ++#ifdef SK_CPU_BENDIAN ++ *dst = SkEndianSwap32(*dst); ++#endif ++ ++dst; + c0 = c0 + dc2; + } + if (n & 1) { + DstTraits<premul>::store(c0, dst, bias0); ++#ifdef SK_CPU_BENDIAN ++ *dst = SkEndianSwap32(*dst); ++#endif + } + } + diff --git a/0008-mozilla-libavcodec58_91.patch.patch b/0008-mozilla-libavcodec58_91.patch.patch new file mode 100644 index 000000000000..19decfbbf11a --- /dev/null +++ b/0008-mozilla-libavcodec58_91.patch.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wolfgang Rosenauer <wr@rosenauer.org> +Date: Sun, 27 Dec 2020 10:48:12 +0100 +Subject: [PATCH] mozilla-libavcodec58_91.patch + +--- + dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp +index 91bf38df8354357d4abdb179b92ef3b663caa86a..e79bc068668ac209514f063bb746f6e5efcb158d 100644 +--- a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp ++++ b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp +@@ -39,6 +39,8 @@ static const char* sLibs[] = { + // of ffmpeg and update it regulary on ABI/API changes + #else + "libavcodec.so.59", ++ "libavcodec.so.58.134", ++ "libavcodec.so.58.91", + "libavcodec.so.58", + "libavcodec-ffmpeg.so.58", + "libavcodec-ffmpeg.so.57", diff --git a/0009-mozilla-silence-no-return-type.patch-to-fix-build-er.patch b/0009-mozilla-silence-no-return-type.patch-to-fix-build-er.patch new file mode 100644 index 000000000000..237cd410f930 --- /dev/null +++ b/0009-mozilla-silence-no-return-type.patch-to-fix-build-er.patch @@ -0,0 +1,1600 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wolfgang Rosenauer <wr@rosenauer.org> +Date: Sun, 27 Dec 2020 10:48:12 +0100 +Subject: [PATCH] mozilla-silence-no-return-type.patch to fix build errors on + some Leap versions + +--- + Cargo.lock | 2 -- + Cargo.toml | 1 + + gfx/skia/skia/include/codec/SkEncodedOrigin.h | 1 + + gfx/skia/skia/include/private/GrTypesPriv.h | 3 +++ + gfx/skia/skia/src/core/SkGeometry.h | 2 ++ + gfx/skia/skia/src/core/SkTextBlob.cpp | 1 + + gfx/skia/skia/src/core/SkTypeface_remote.cpp | 1 + + gfx/skia/skia/src/core/SkTypeface_remote.h | 12 +++++++++++- + .../src/effects/imagefilters/SkBlurImageFilter.cpp | 1 + + .../effects/imagefilters/SkLightingImageFilter.cpp | 1 + + gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp | 1 + + gfx/skia/skia/src/gpu/GrDataUtils.cpp | 2 ++ + gfx/skia/skia/src/gpu/GrFragmentProcessor.h | 1 + + gfx/skia/skia/src/gpu/GrPathRendering.cpp | 1 + + gfx/skia/skia/src/gpu/GrPathRendering.h | 1 + + gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp | 1 + + gfx/skia/skia/src/gpu/GrReducedClip.cpp | 2 ++ + gfx/skia/skia/src/gpu/GrResourceCache.cpp | 2 ++ + gfx/skia/skia/src/gpu/GrShaderVar.cpp | 2 ++ + gfx/skia/skia/src/gpu/SkGpuDevice.cpp | 1 + + gfx/skia/skia/src/gpu/SkGr.h | 1 + + gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h | 1 + + gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp | 1 + + gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h | 1 + + .../src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp | 1 + + gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp | 1 + + gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp | 2 ++ + gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp | 2 ++ + gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp | 1 + + .../skia/src/gpu/effects/GrConstColorProcessor.fp | 1 + + gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp | 1 + + .../src/gpu/effects/GrPorterDuffXferProcessor.cpp | 1 + + gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp | 2 ++ + .../gpu/effects/generated/GrConstColorProcessor.h | 1 + + gfx/skia/skia/src/gpu/geometry/GrShape.cpp | 2 ++ + gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp | 1 + + gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp | 1 + + gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp | 12 +++++++++--- + gfx/skia/skia/src/gpu/gl/GrGLPath.cpp | 1 + + gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp | 3 +++ + gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp | 1 + + gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp | 1 + + gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp | 1 + + .../skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp | 2 ++ + gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm | 2 ++ + .../skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm | 2 ++ + gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm | 1 + + gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm | 2 ++ + gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm | 1 + + gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp | 2 ++ + gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp | 1 + + gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp | 3 +++ + gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp | 3 +++ + gfx/skia/skia/src/gpu/text/GrTextBlob.h | 1 + + .../src/gpu/text/GrTextBlobVertexRegenerator.cpp | 1 + + gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp | 2 ++ + gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp | 1 + + gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp | 3 +++ + gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp | 1 + + gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h | 1 + + gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp | 2 ++ + gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp | 1 + + gfx/skia/skia/src/pdf/SkPDFTag.cpp | 1 + + .../skia/src/ports/SkFontMgr_FontConfigInterface.cpp | 6 ++++++ + gfx/skia/skia/src/shaders/SkImageShader.cpp | 1 + + gfx/skia/skia/src/utils/SkShadowUtils.cpp | 1 + + intl/icu/source/i18n/number_rounding.cpp | 2 ++ + third_party/libwebrtc/api/adaptation/resource.cc | 1 + + third_party/libwebrtc/api/rtp_parameters.cc | 1 + + .../libwebrtc/api/video/video_frame_buffer.cc | 2 ++ + .../libwebrtc/api/video_codecs/video_codec.cc | 1 + + .../video_encoder_software_fallback_wrapper.cc | 2 ++ + .../call/adaptation/video_stream_adapter.cc | 5 +++++ + third_party/libwebrtc/call/video_send_stream.cc | 1 + + .../audio_processing/agc/clipping_predictor.cc | 1 + + .../modules/audio_processing/agc2/rnn_vad/rnn_fc.cc | 2 ++ + .../audio_processing/audio_processing_impl.cc | 2 ++ + .../audio_processing/include/audio_processing.cc | 2 ++ + .../rtp_rtcp/source/create_video_rtp_depacketizer.cc | 1 + + .../libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc | 1 + + .../modules/rtp_rtcp/source/rtp_sender_audio.cc | 1 + + .../codecs/vp8/temporal_layers_checker.cc | 1 + + .../video_stream_encoder_resource_manager.cc | 1 + + .../glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp | 1 + + .../glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp | 1 + + .../src/compiler/glsl/loop_analysis.cpp | 1 + + .../src/compiler/glsl/opt_vectorize.cpp | 1 + + .../glsl-optimizer/src/compiler/glsl_types.cpp | 5 +++++ + .../glslopt/glsl-optimizer/src/mesa/main/shaderobj.h | 4 ++++ + 89 files changed, 154 insertions(+), 6 deletions(-) + +diff --git a/Cargo.lock b/Cargo.lock +index 5dde1f1aeb43728d0784cbd1b256ecdbbf7e5698..dc8f980658c2a247ed4ead378ee726bf6ecb1da3 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -2375,8 +2375,6 @@ dependencies = [ + [[package]] + name = "glslopt" + version = "0.1.9" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "74a3f5c04450dfdadb4b08f6e5ee6f5110f674de1acbd6199bfec68392a8cbaf" + dependencies = [ + "cc", + ] +diff --git a/Cargo.toml b/Cargo.toml +index 1909f0cebe4d71ab5b3ffa214372c053c99d41e0..ba23ffb01a87ff0a68395d91b7d5efd8450ab3b1 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -163,6 +163,7 @@ midir = { git = "https://github.com/mozilla/midir.git", rev = "519e651241e867af3 + minidump-writer = { git = "https://github.com/rust-minidump/minidump-writer.git", rev = "7d76616d27b9dc87fe3a94639b8b4f947d52a6aa" } + # warp 0.3.3 + https://github.com/seanmonstar/warp/pull/1007 + warp = { git = "https://github.com/glandium/warp", rev = "4af45fae95bc98b0eba1ef0db17e1dac471bb23d" } ++glslopt = { path = "third_party/rust/glslopt/" } + + cssparser = { git = "https://github.com/servo/rust-cssparser", rev = "d3670a89bae26ba3a8db4758eb7976616113987d" } + +diff --git a/gfx/skia/skia/include/codec/SkEncodedOrigin.h b/gfx/skia/skia/include/codec/SkEncodedOrigin.h +index 2eed1c6ac6cc1ba8512cbff3c5f255ef33ec1645..49d03090341e6e08525c1a0e34f5b04e6e2cfb73 100644 +--- a/gfx/skia/skia/include/codec/SkEncodedOrigin.h ++++ b/gfx/skia/skia/include/codec/SkEncodedOrigin.h +@@ -41,6 +41,7 @@ static inline SkMatrix SkEncodedOriginToMatrix(SkEncodedOrigin origin, int w, in + case kLeftBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0, 1, 0, -1, 0, w, 0, 0, 1); + } + SK_ABORT("Unexpected origin"); ++ SkUNREACHABLE; + } + + +diff --git a/gfx/skia/skia/include/private/GrTypesPriv.h b/gfx/skia/skia/include/private/GrTypesPriv.h +index 90718038e037bddf0633f33eaeef26306e8f79f9..4ec7729ab8e0885b3c5d16febd39a469a562c0a9 100644 +--- a/gfx/skia/skia/include/private/GrTypesPriv.h ++++ b/gfx/skia/skia/include/private/GrTypesPriv.h +@@ -540,6 +540,7 @@ static inline GrSLType GrSLCombinedSamplerTypeForTextureType(GrTextureType type) + default: + SK_ABORT("Unexpected texture type"); + } ++ SkUNREACHABLE; + } + + /** Rectangle and external textures only support the clamp wrap mode and do not support +@@ -556,6 +557,7 @@ static inline bool GrTextureTypeHasRestrictedSampling(GrTextureType type) { + default: + SK_ABORT("Unexpected texture type"); + } ++ SkUNREACHABLE; + } + + static constexpr bool GrSLTypeIsCombinedSamplerType(GrSLType type) { +@@ -858,6 +860,7 @@ static inline size_t GrCompressedFormatDataSize(SkImage::CompressionType compres + } + + SK_ABORT("Invalid pixel config"); ++ SkUNREACHABLE; + } + + /** +diff --git a/gfx/skia/skia/src/core/SkGeometry.h b/gfx/skia/skia/src/core/SkGeometry.h +index 23bdbc1c42591b45115d9fd025f373365c8c14d6..ea2d23f6e8e5e6cdc0a5e76d1ae265bb0bae4285 100644 +--- a/gfx/skia/skia/src/core/SkGeometry.h ++++ b/gfx/skia/skia/src/core/SkGeometry.h +@@ -182,6 +182,7 @@ static inline bool SkCubicIsDegenerate(SkCubicType type) { + return true; + } + SK_ABORT("Invalid SkCubicType"); ++ SkUNREACHABLE; + } + + static inline const char* SkCubicTypeName(SkCubicType type) { +@@ -194,6 +195,7 @@ static inline const char* SkCubicTypeName(SkCubicType type) { + case SkCubicType::kLineOrPoint: return "kLineOrPoint"; + } + SK_ABORT("Invalid SkCubicType"); ++ SkUNREACHABLE; + } + + /** Returns the cubic classification. +diff --git a/gfx/skia/skia/src/core/SkTextBlob.cpp b/gfx/skia/skia/src/core/SkTextBlob.cpp +index 3c84bda6f8e1119db457468ec257cdf876432647..e2fba375ccd358264ed64caa333abe58b8c125be 100644 +--- a/gfx/skia/skia/src/core/SkTextBlob.cpp ++++ b/gfx/skia/skia/src/core/SkTextBlob.cpp +@@ -201,6 +201,7 @@ void SkTextBlob::operator delete(void* p) { + + void* SkTextBlob::operator new(size_t) { + SK_ABORT("All blobs are created by placement new."); ++ SkUNREACHABLE; + } + + void* SkTextBlob::operator new(size_t, void* p) { +diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.cpp b/gfx/skia/skia/src/core/SkTypeface_remote.cpp +index 838a78331359ea7f8d5be746af804cb810aba7a5..d878fadc080914b7cc244be30b1a281f0ef89621 100644 +--- a/gfx/skia/skia/src/core/SkTypeface_remote.cpp ++++ b/gfx/skia/skia/src/core/SkTypeface_remote.cpp +@@ -29,6 +29,7 @@ void SkScalerContextProxy::initCache(SkStrike* cache, SkStrikeCache* strikeCache + + unsigned SkScalerContextProxy::generateGlyphCount() { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + + bool SkScalerContextProxy::generateAdvance(SkGlyph* glyph) { +diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.h b/gfx/skia/skia/src/core/SkTypeface_remote.h +index 3d454cf760f284f7df56cf17afa50e02c4ee2cfe..554f7c0617cd9a1a71b43abb425b97f3e3a08ffd 100644 +--- a/gfx/skia/skia/src/core/SkTypeface_remote.h ++++ b/gfx/skia/skia/src/core/SkTypeface_remote.h +@@ -63,23 +63,28 @@ public: + bool isLogging() const {return fIsLogging;} + + protected: +- int onGetUPEM() const override { SK_ABORT("Should never be called."); } ++ int onGetUPEM() const override { SK_ABORT("Should never be called."); SkUNREACHABLE; } + std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + std::unique_ptr<SkFontData> onMakeFontData() const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + sk_sp<SkTypeface> onMakeClone(const SkFontArguments& args) const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + int onGetVariationDesignPosition(SkFontArguments::VariationPosition::Coordinate coordinates[], + int coordinateCount) const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + int onGetVariationDesignParameters(SkFontParameters::Variation::Axis parameters[], + int parameterCount) const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + void onGetFamilyName(SkString* familyName) const override { + // Used by SkStrikeCache::DumpMemoryStatistics. +@@ -87,12 +92,15 @@ protected: + } + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + int onGetTableTags(SkFontTableTag tags[]) const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + size_t onGetTableData(SkFontTableTag, size_t offset, size_t length, void* data) const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + SkScalerContext* onCreateScalerContext(const SkScalerContextEffects& effects, + const SkDescriptor* desc) const override { +@@ -116,6 +124,7 @@ protected: + + std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override { + SK_ABORT("Should never be called."); +@@ -126,6 +135,7 @@ protected: + + void* onGetCTFontRef() const override { + SK_ABORT("Should never be called."); ++ SkUNREACHABLE; + } + + private: +diff --git a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp +index 2dde5e2be77afdf4896e01b8ab8e3842e2a68b8c..dd8550dfad56c43244b6afa7c2c5b27aa2ef0068 100644 +--- a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp ++++ b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp +@@ -144,6 +144,7 @@ static GrTextureDomain::Mode to_texture_domain_mode(SkTileMode tileMode) { + return GrTextureDomain::kRepeat_Mode; + default: + SK_ABORT("Unsupported tile mode."); ++ SkUNREACHABLE; + } + } + #endif +diff --git a/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp b/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp +index 43d32dcc915e197158858f2bf4dde206a55a951d..4a8143e2e2120ec603b7f0e0d5eceb2c5920a319 100644 +--- a/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp ++++ b/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp +@@ -1701,6 +1701,7 @@ static SkImageFilterLight* create_random_light(SkRandom* random) { + } + default: + SK_ABORT("Unexpected value."); ++ SkUNREACHABLE; + } + } + +diff --git a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp +index da7678a725e7ce076705620fe17228272e29c8f4..63330e58c2b39afc20f78acd4caa11a12cd477df 100644 +--- a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp ++++ b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp +@@ -69,6 +69,7 @@ void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const + + SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const { + SK_ABORT("Not implemented"); ++ SkUNREACHABLE; + } + + SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const { +diff --git a/gfx/skia/skia/src/gpu/GrDataUtils.cpp b/gfx/skia/skia/src/gpu/GrDataUtils.cpp +index 6265aaec2893f1c457218441d37a75595a750b7b..0da5190e4a857028117d05c50c0e1e5b0bd4fa22 100644 +--- a/gfx/skia/skia/src/gpu/GrDataUtils.cpp ++++ b/gfx/skia/skia/src/gpu/GrDataUtils.cpp +@@ -128,6 +128,7 @@ size_t GrCompressedDataSize(SkImage::CompressionType type, int width, int height + return numBlocks * sizeof(ETC1Block); + } + SK_ABORT("Unexpected compression type"); ++ SkUNREACHABLE; + } + + size_t GrCompressedRowBytes(SkImage::CompressionType type, int width) { +@@ -137,6 +138,7 @@ size_t GrCompressedRowBytes(SkImage::CompressionType type, int width) { + return numBlocksWidth * sizeof(ETC1Block); + } + SK_ABORT("Unexpected compression type"); ++ SkUNREACHABLE; + } + + // Fill in 'dest' with ETC1 blocks derived from 'colorf' +diff --git a/gfx/skia/skia/src/gpu/GrFragmentProcessor.h b/gfx/skia/skia/src/gpu/GrFragmentProcessor.h +index 21e27b868b52d729a67938a67eda960ef36ebc61..5b96868075be7ef2e81ea175c2525a4a50c9ffc4 100644 +--- a/gfx/skia/skia/src/gpu/GrFragmentProcessor.h ++++ b/gfx/skia/skia/src/gpu/GrFragmentProcessor.h +@@ -375,6 +375,7 @@ protected: + private: + virtual SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& /* inputColor */) const { + SK_ABORT("Subclass must override this if advertising this optimization."); ++ SkUNREACHABLE; + } + + /** Returns a new instance of the appropriate *GL* implementation class +diff --git a/gfx/skia/skia/src/gpu/GrPathRendering.cpp b/gfx/skia/skia/src/gpu/GrPathRendering.cpp +index 5e44531d2e95d496e8472ff97e16d0c6503fc063..a6bd5e4cbcf60a2f7e49e8400beab6c504ff03d5 100644 +--- a/gfx/skia/skia/src/gpu/GrPathRendering.cpp ++++ b/gfx/skia/skia/src/gpu/GrPathRendering.cpp +@@ -19,6 +19,7 @@ const GrUserStencilSettings& GrPathRendering::GetStencilPassSettings(FillType fi + switch (fill) { + default: + SK_ABORT("Unexpected path fill."); ++ SkUNREACHABLE; + case GrPathRendering::kWinding_FillType: { + constexpr static GrUserStencilSettings kWindingStencilPass( + GrUserStencilSettings::StaticInit< +diff --git a/gfx/skia/skia/src/gpu/GrPathRendering.h b/gfx/skia/skia/src/gpu/GrPathRendering.h +index 3e143e4d0f2e03c33b77302cef56e44c26ae169b..3a672fabc60da04b6d84b39b52503a6fd334a409 100644 +--- a/gfx/skia/skia/src/gpu/GrPathRendering.h ++++ b/gfx/skia/skia/src/gpu/GrPathRendering.h +@@ -63,6 +63,7 @@ public: + + default: + SK_ABORT("Unknown path transform type"); ++ SkUNREACHABLE; + } + } + +diff --git a/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp b/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp +index 8d8efa7685b0a30f51ab9843977e0e8aa9c963fa..2d56d2cb09fd7d83fcd7073651086458d1f1f02e 100644 +--- a/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp ++++ b/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp +@@ -20,6 +20,7 @@ std::unique_ptr<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcesso + return fp; + #else + SK_ABORT("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS"); ++ SkUNREACHABLE; + #endif + } + #endif +diff --git a/gfx/skia/skia/src/gpu/GrReducedClip.cpp b/gfx/skia/skia/src/gpu/GrReducedClip.cpp +index 9224e005c6886358c2c6eb037c786bc5281bcdeb..5c1d44b613bc1aa6a1f436acfe4b46ffd35c7c32 100644 +--- a/gfx/skia/skia/src/gpu/GrReducedClip.cpp ++++ b/gfx/skia/skia/src/gpu/GrReducedClip.cpp +@@ -525,6 +525,7 @@ GrReducedClip::ClipResult GrReducedClip::clipInsideElement(const Element* elemen + } + + SK_ABORT("Unexpected DeviceSpaceType"); ++ SkUNREACHABLE; + } + + GrReducedClip::ClipResult GrReducedClip::clipOutsideElement(const Element* element) { +@@ -591,6 +592,7 @@ GrReducedClip::ClipResult GrReducedClip::clipOutsideElement(const Element* eleme + } + + SK_ABORT("Unexpected DeviceSpaceType"); ++ SkUNREACHABLE; + } + + inline void GrReducedClip::addWindowRectangle(const SkRect& elementInteriorRect, bool elementIsAA) { +diff --git a/gfx/skia/skia/src/gpu/GrResourceCache.cpp b/gfx/skia/skia/src/gpu/GrResourceCache.cpp +index 6d9a961886ffd764dfe80b0c247c562a6d12817c..5f2e68dd7ba9e91d7f649c8185f21c6eafc87667 100644 +--- a/gfx/skia/skia/src/gpu/GrResourceCache.cpp ++++ b/gfx/skia/skia/src/gpu/GrResourceCache.cpp +@@ -40,6 +40,7 @@ GrScratchKey::ResourceType GrScratchKey::GenerateResourceType() { + int32_t type = nextType++; + if (type > SkTo<int32_t>(UINT16_MAX)) { + SK_ABORT("Too many Resource Types"); ++ SkUNREACHABLE; + } + + return static_cast<ResourceType>(type); +@@ -51,6 +52,7 @@ GrUniqueKey::Domain GrUniqueKey::GenerateDomain() { + int32_t domain = nextDomain++; + if (domain > SkTo<int32_t>(UINT16_MAX)) { + SK_ABORT("Too many GrUniqueKey Domains"); ++ SkUNREACHABLE; + } + + return static_cast<Domain>(domain); +diff --git a/gfx/skia/skia/src/gpu/GrShaderVar.cpp b/gfx/skia/skia/src/gpu/GrShaderVar.cpp +index 6f7ccccd603807f58295e7915420bc24254b8656..67156a74bc6f79956c3256c0a9bac62466848e68 100644 +--- a/gfx/skia/skia/src/gpu/GrShaderVar.cpp ++++ b/gfx/skia/skia/src/gpu/GrShaderVar.cpp +@@ -18,6 +18,7 @@ static const char* type_modifier_string(GrShaderVar::TypeModifier t) { + case GrShaderVar::kUniform_TypeModifier: return "uniform"; + } + SK_ABORT("Unknown shader variable type modifier."); ++ SkUNREACHABLE; + } + + void GrShaderVar::setIOType(GrIOType ioType) { +@@ -32,6 +33,7 @@ void GrShaderVar::setIOType(GrIOType ioType) { + return; + } + SK_ABORT("Unknown io type."); ++ SkUNREACHABLE; + } + + void GrShaderVar::appendDecl(const GrShaderCaps* shaderCaps, SkString* out) const { +diff --git a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp b/gfx/skia/skia/src/gpu/SkGpuDevice.cpp +index 77b9963ba5cb9c37bfb0942b5d8b3525aa78335a..f6d7ca05dd018368107ebe6d915e8a19f85b326f 100644 +--- a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp ++++ b/gfx/skia/skia/src/gpu/SkGpuDevice.cpp +@@ -283,6 +283,7 @@ static inline GrPrimitiveType point_mode_to_primitive_type(SkCanvas::PointMode m + return GrPrimitiveType::kLineStrip; + } + SK_ABORT("Unexpected mode"); ++ SkUNREACHABLE; + } + + void SkGpuDevice::drawPoints(SkCanvas::PointMode mode, +diff --git a/gfx/skia/skia/src/gpu/SkGr.h b/gfx/skia/skia/src/gpu/SkGr.h +index 79a68822b91b8846a71ad843e3f268200ca9025c..716f59d7e62401b9a287206fd7ffc47d7e6b0deb 100644 +--- a/gfx/skia/skia/src/gpu/SkGr.h ++++ b/gfx/skia/skia/src/gpu/SkGr.h +@@ -159,6 +159,7 @@ static inline GrPrimitiveType SkVertexModeToGrPrimitiveType(SkVertices::VertexMo + break; + } + SK_ABORT("Invalid mode"); ++ SkUNREACHABLE; + } + + ////////////////////////////////////////////////////////////////////////////// +diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h b/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h +index 5fdb488ea5a286a953c452d5ad7957df87f47765..eb81f47ba607cb9ae4f3eb916a4896f9e51402f3 100644 +--- a/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h ++++ b/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h +@@ -240,6 +240,7 @@ inline const char* GrCCCoverageProcessor::PrimitiveTypeName(PrimitiveType type) + case PrimitiveType::kConics: return "kConics"; + } + SK_ABORT("Invalid PrimitiveType"); ++ SkUNREACHABLE; + } + + inline void GrCCCoverageProcessor::TriPointInstance::set( +diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp +index 40884d7d8f2906d48d6a3a1d5852cd5d35d9a67c..c920365f50a51727d451db3788d2f385820b753e 100644 +--- a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp ++++ b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp +@@ -60,6 +60,7 @@ static GrCCStrokeGeometry::Verb join_verb_from_join(SkPaint::Join join) { + return Verb::kRoundJoin; + } + SK_ABORT("Invalid SkPaint::Join."); ++ SkUNREACHABLE; + } + + void GrCCStrokeGeometry::beginPath(const SkStrokeRec& stroke, float strokeDevWidth, +diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h +index 24569accc4e521796f7d2916d3f5e7f8c96088c3..d105836141e4b5f06b1608e2579c5255ed5d7afc 100644 +--- a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h ++++ b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h +@@ -175,5 +175,6 @@ inline bool GrCCStrokeGeometry::IsInternalJoinVerb(Verb verb) { + return false; + } + SK_ABORT("Invalid GrCCStrokeGeometry::Verb."); ++ SkUNREACHABLE; + } + #endif +diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp +index 4e86d7e07147c78b68583fbd14f41d8f9381644e..0376cf40c3bdd0462c9eaf7d42321cadfd0ba740 100644 +--- a/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp ++++ b/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp +@@ -164,6 +164,7 @@ GrPathRenderer::CanDrawPath GrCoverageCountingPathRenderer::onCanDrawPath( + } + + SK_ABORT("Invalid stroke style."); ++ SkUNREACHABLE; + } + + bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) { +diff --git a/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp b/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp +index ae5cfca504c21fbc9ced4e66b2e853a17db8a5d8..89beff076a875913592ca7b41af9200995d33d64 100644 +--- a/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp ++++ b/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp +@@ -550,4 +550,5 @@ GrGLSLPrimitiveProcessor* GrVSCoverageProcessor::onCreateGLSLInstance( + return new Impl(std::move(shader), 4); + } + SK_ABORT("Invalid PrimitiveType"); ++ SkUNREACHABLE; + } +diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp +index 48fc8a7f48a8aa3c0905db0c293f8b4215285e5e..9321f43b7eacd990225eea6241211b57e73635cb 100644 +--- a/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp ++++ b/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp +@@ -39,7 +39,9 @@ static dawn::LoadOp to_dawn_load_op(GrLoadOp loadOp) { + return dawn::LoadOp::Clear; + default: + SK_ABORT("Invalid LoadOp"); ++ SkUNREACHABLE; + } ++ SkUNREACHABLE; + } + + GrDawnOpsRenderPass::GrDawnOpsRenderPass(GrDawnGpu* gpu, GrRenderTarget* rt, GrSurfaceOrigin origin, +diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp +index 74fd1e31a4b602cf9240214b4adce6e224da629c..25461264066172fd62932563b08899a472ea6b19 100644 +--- a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp ++++ b/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp +@@ -95,6 +95,7 @@ uint32_t grsltype_to_alignment_mask(GrSLType type) { + break; + } + SK_ABORT("Unexpected type"); ++ SkUNREACHABLE; + } + + static inline uint32_t grsltype_to_size(GrSLType type) { +@@ -173,6 +174,7 @@ static inline uint32_t grsltype_to_size(GrSLType type) { + break; + } + SK_ABORT("Unexpected type"); ++ SkUNREACHABLE; + } + + uint32_t get_ubo_offset(uint32_t* currentOffset, +diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp +index b3885d20c903a7eba2742560161190bd2f14defc..0d2bac39def57ab1d7479e8651527815b9f940bc 100644 +--- a/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp ++++ b/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp +@@ -76,6 +76,7 @@ static inline int grsltype_to_location_size(GrSLType type) { + return 0; + } + SK_ABORT("Unexpected type"); ++ SkUNREACHABLE; + } + + static void finalize_helper(GrDawnVaryingHandler::VarArray& vars) { +diff --git a/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp b/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp +index 18cc91a4b12d7467f49cda9995b28ab5898a4d67..fd6694bb7648f84b0dc19f494d358a71cb47b14a 100644 +--- a/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp ++++ b/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp +@@ -58,6 +58,7 @@ void main() { + return color * input; + } + SK_ABORT("Unexpected mode"); ++ SkUNREACHABLE; + } + } + +diff --git a/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp b/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp +index b75842c94a04f8c3bea4b4cd0ff4d30b6f668acc..714fc350d5f9211dab3dc57a2c3c489ee5d6118a 100644 +--- a/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp ++++ b/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp +@@ -204,6 +204,7 @@ const GrXPFactory* GrCoverageSetOpXPFactory::Get(SkRegion::Op regionOp, bool inv + } + #undef _CONSTEXPR_ + SK_ABORT("Unknown region op."); ++ SkUNREACHABLE; + } + + sk_sp<const GrXferProcessor> GrCoverageSetOpXPFactory::makeXferProcessor( +diff --git a/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp +index 47d92dbde49572daf4fd8e77e7c271f29c02559b..1d44d9ad825945a0aea60403ff2ed7e19dcf4be6 100644 +--- a/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp ++++ b/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp +@@ -753,6 +753,7 @@ const GrXPFactory* GrPorterDuffXPFactory::Get(SkBlendMode blendMode) { + return &gScreenPDXPF; + default: + SK_ABORT("Unexpected blend mode."); ++ SkUNREACHABLE; + } + } + +diff --git a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp b/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp +index 9269ebf668fff1988ba67f1fcddd17a670bf1c57..3169ab6e3f74d4c2648c40760b7a97e51a57e923 100644 +--- a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp ++++ b/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp +@@ -154,6 +154,7 @@ public: + } + printf("%s\n", SkSL::String(type.fName).c_str()); + SK_ABORT("unsupported uniform type"); ++ SkUNREACHABLE; + } + + void emitCode(EmitArgs& args) override { +@@ -568,6 +569,7 @@ std::unique_ptr<GrFragmentProcessor> GrSkSLFP::TestCreate(GrProcessorTestData* d + } + } + SK_ABORT("unreachable"); ++ SkUNREACHABLE; + } + + #endif +diff --git a/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h b/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h +index df64bce9b79c1014c74645a8eaaaa320e527afaa..bc9024cb07ef75890c00b6e68a507c0ef29821ea 100644 +--- a/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h ++++ b/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h +@@ -41,6 +41,7 @@ public: + return color * input; + } + SK_ABORT("Unexpected mode"); ++ SkUNREACHABLE; + } + static std::unique_ptr<GrFragmentProcessor> Make(SkPMColor4f color, InputMode mode) { + return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(color, mode)); +diff --git a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp b/gfx/skia/skia/src/gpu/geometry/GrShape.cpp +index 4fc3472ffb31ae7e4ee6035bd230d4e86ec87eb4..f16a2c536e617f8da21f53141b86bea65a1d0cb3 100644 +--- a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp ++++ b/gfx/skia/skia/src/gpu/geometry/GrShape.cpp +@@ -164,6 +164,7 @@ SkRect GrShape::bounds() const { + return this->path().getBounds(); + } + SK_ABORT("Unknown shape type"); ++ SkUNREACHABLE; + } + + SkRect GrShape::styledBounds() const { +@@ -254,6 +255,7 @@ int GrShape::unstyledKeySize() const { + } + } + SK_ABORT("Should never get here."); ++ SkUNREACHABLE; + } + + void GrShape::writeUnstyledKey(uint32_t* key) const { +diff --git a/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp b/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp +index 3142399c583b971fb2cb66ed82c17f7d0bb57249..2dab83639a9a23758d89c930200047c13c66ab57 100644 +--- a/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp ++++ b/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp +@@ -4159,6 +4159,7 @@ GrBackendFormat GrGLCaps::getBackendFormatFromCompressionType( + return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D); + } + SK_ABORT("Invalid compression type"); ++ SkUNREACHABLE; + } + + GrSwizzle GrGLCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { +diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp b/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp +index 2ad38bc35ecd413d7d4fb40485c088c2f2d09e74..8dc730f1b784b7df57f7c7da92ab647358759004 100644 +--- a/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp ++++ b/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp +@@ -68,4 +68,5 @@ bool GrGLGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation + return true; + } + SK_ABORT("Unknown GL Standard"); ++ SkUNREACHABLE; + } +diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp +index 937e168db5c988477610ab8668216762d5820fba..da66902895d597988feeebe3a24ee1cbc501e35f 100644 +--- a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp ++++ b/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp +@@ -196,6 +196,7 @@ static int gl_target_to_binding_index(GrGLenum target) { + return 2; + } + SK_ABORT("Unexpected GL texture target."); ++ SkUNREACHABLE; + } + + GrGpuResource::UniqueID GrGLGpu::TextureUnitBindings::boundID(GrGLenum target) const { +@@ -234,6 +235,7 @@ static GrGLenum filter_to_gl_mag_filter(GrSamplerState::Filter filter) { + case GrSamplerState::Filter::kMipMap: return GR_GL_LINEAR; + } + SK_ABORT("Unknown filter"); ++ SkUNREACHABLE; + } + + static GrGLenum filter_to_gl_min_filter(GrSamplerState::Filter filter) { +@@ -243,6 +245,7 @@ static GrGLenum filter_to_gl_min_filter(GrSamplerState::Filter filter) { + case GrSamplerState::Filter::kMipMap: return GR_GL_LINEAR_MIPMAP_LINEAR; + } + SK_ABORT("Unknown filter"); ++ SkUNREACHABLE; + } + + static inline GrGLenum wrap_mode_to_gl_wrap(GrSamplerState::WrapMode wrapMode, +@@ -257,6 +260,7 @@ static inline GrGLenum wrap_mode_to_gl_wrap(GrSamplerState::WrapMode wrapMode, + return GR_GL_CLAMP_TO_BORDER; + } + SK_ABORT("Unknown wrap mode"); ++ SkUNREACHABLE; + } + + /////////////////////////////////////////////////////////////////////////////// +@@ -1107,7 +1111,7 @@ static bool renderbuffer_storage_msaa(const GrGLContext& ctx, + break; + case GrGLCaps::kNone_MSFBOType: + SK_ABORT("Shouldn't be here if we don't support multisampled renderbuffers."); +- break; ++ SkUNREACHABLE; + } + return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); + } +@@ -2275,9 +2279,10 @@ static GrGLenum gr_primitive_type_to_gl_mode(GrPrimitiveType primitiveType) { + return GR_GL_LINE_STRIP; + case GrPrimitiveType::kPath: + SK_ABORT("non-mesh-based GrPrimitiveType"); +- return 0; ++ SkUNREACHABLE; + } + SK_ABORT("invalid GrPrimitiveType"); ++ SkUNREACHABLE; + } + + void GrGLGpu::sendMeshToGpu(GrPrimitiveType primitiveType, const GrBuffer* vertexBuffer, +@@ -4006,7 +4011,8 @@ int GrGLGpu::TextureToCopyProgramIdx(GrTexture* texture) { + case kTextureExternalSampler_GrSLType: + return 2; + default: +- SK_ABORT("Unexpected samper type"); ++ SK_ABORT("Unexpected sampler type"); ++ SkUNREACHABLE; + } + } + +diff --git a/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp b/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp +index e001bf93a1fc1f637e7f30b95605da3a99864ad8..8d51f00e4b0e88d0c2b3f7a6fed06d53915643cd 100644 +--- a/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp ++++ b/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp +@@ -197,6 +197,7 @@ static GrPathRendering::FillType convert_skpath_filltype(SkPath::FillType fill) + switch (fill) { + default: + SK_ABORT("Incomplete Switch\n"); ++ SkUNREACHABLE; + case SkPath::kWinding_FillType: + case SkPath::kInverseWinding_FillType: + return GrPathRendering::kWinding_FillType; +diff --git a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp b/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp +index a5a1a3708bd6fbcd2a853e39b7e1a120e562f9c2..1a223cf1e2735682f4ef66ff814ca913a86b2dcd 100644 +--- a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp ++++ b/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp +@@ -25,6 +25,7 @@ GrTextureType GrGLTexture::TextureTypeFromTarget(GrGLenum target) { + return GrTextureType::kExternal; + } + SK_ABORT("Unexpected texture target"); ++ SkUNREACHABLE; + } + + static inline GrGLenum target_from_texture_type(GrTextureType type) { +@@ -37,8 +38,10 @@ static inline GrGLenum target_from_texture_type(GrTextureType type) { + return GR_GL_TEXTURE_EXTERNAL; + default: + SK_ABORT("Unexpected texture target"); ++ SkUNREACHABLE; + } + SK_ABORT("Unexpected texture type"); ++ SkUNREACHABLE; + } + + // Because this class is virtually derived from GrSurface we must explicitly call its constructor. +diff --git a/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp b/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp +index cfac573241220f12bff64b051aeca6bf8c42b5b8..4d878af131818193f6b04d13bd2e93f32c0d7c9d 100644 +--- a/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp ++++ b/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp +@@ -80,6 +80,7 @@ static AttribLayout attrib_layout(GrVertexAttribType type) { + return {true, 4, GR_GL_UNSIGNED_SHORT}; + } + SK_ABORT("Unknown vertex attrib type"); ++ SkUNREACHABLE; + }; + + void GrGLAttribArrayState::set(GrGLGpu* gpu, +diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp +index afa9159bb0c8360d5960019c52c2ec393e90720b..d073fa6f8bbe4c7d997df4c312415e29947c9eb4 100644 +--- a/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp ++++ b/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp +@@ -98,4 +98,5 @@ const char* GrGLSLTypeString(GrSLType t) { + return "sampler"; + } + SK_ABORT("Unknown shader var type."); ++ SkUNREACHABLE; + } +diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp +index ce086a9082b1e733e575658732945c076953dee0..16a0171e7dc228bb283881de11630ffdabe06e9d 100644 +--- a/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp ++++ b/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp +@@ -35,6 +35,7 @@ static bool use_flat_interpolation(GrGLSLVaryingHandler::Interpolation interpola + return true; + } + SK_ABORT("Invalid interpolation"); ++ SkUNREACHABLE; + } + + void GrGLSLVaryingHandler::addVarying(const char* name, GrGLSLVarying* varying, +diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp +index ccec08db8b57f97bae484ec378872859f16c5f90..751b40e9fe366d95c94a4eb6b1fab94b28f1d456 100644 +--- a/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp ++++ b/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp +@@ -51,6 +51,7 @@ static const char* input_type_name(GrGLSLGeometryBuilder::InputType in) { + case InputType::kTriangles: return "triangles"; + } + SK_ABORT("invalid input type"); ++ SkUNREACHABLE; + } + + static const char* output_type_name(GrGLSLGeometryBuilder::OutputType out) { +@@ -61,6 +62,7 @@ static const char* output_type_name(GrGLSLGeometryBuilder::OutputType out) { + case OutputType::kTriangleStrip: return "triangle_strip"; + } + SK_ABORT("invalid output type"); ++ SkUNREACHABLE; + } + + void GrGLSLGeometryBuilder::configure(InputType inputType, OutputType outputType, int maxVertices, +diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm +index 7511f263663bb0f86bea52f5fe862e67c7a12f88..82ff3db7721001b47b68150033873679c103e3fe 100644 +--- a/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm ++++ b/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm +@@ -506,6 +506,7 @@ size_t GrMtlCaps::GetFormatIndex(MTLPixelFormat pixelFormat) { + } + } + SK_ABORT("Invalid MTLPixelFormat"); ++ SkUNREACHABLE; + } + + void GrMtlCaps::initFormatTable() { +@@ -1011,6 +1012,7 @@ GrBackendFormat GrMtlCaps::getBackendFormatFromCompressionType( + #endif + } + SK_ABORT("Invalid compression type"); ++ SkUNREACHABLE; + } + + GrSwizzle GrMtlCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { +diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm +index 090c41b9de6623618f52b141044909369b84cb29..4be37d4c53deeda93f16f247e96e99865a3146c3 100644 +--- a/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm ++++ b/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm +@@ -155,6 +155,7 @@ static inline MTLVertexFormat attribute_type_to_mtlformat(GrVertexAttribType typ + return MTLVertexFormatUShort4Normalized; + } + SK_ABORT("Unknown vertex attribute type"); ++ SkUNREACHABLE; + } + + static MTLVertexDescriptor* create_vertex_descriptor(const GrPrimitiveProcessor& primProc) { +@@ -276,6 +277,7 @@ static MTLBlendFactor blend_coeff_to_mtl_blend(GrBlendCoeff coeff) { + } + + SK_ABORT("Unknown blend coefficient"); ++ SkUNREACHABLE; + } + + static MTLBlendOperation blend_equation_to_mtl_blend_op(GrBlendEquation equation) { +diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm +index 2d7344eff7b7a5e900e02a350950b93df4f968c4..2d03c968bfa52e607f0d58967c4f0db8e90be604 100644 +--- a/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm ++++ b/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm +@@ -38,6 +38,7 @@ static inline MTLSamplerAddressMode wrap_mode_to_mtl_sampler_address( + } + } + SK_ABORT("Unknown wrap mode."); ++ SkUNREACHABLE; + } + + GrMtlSampler* GrMtlSampler::Create(const GrMtlGpu* gpu, const GrSamplerState& samplerState) { +diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm +index 89e1263eaf9b33badf0e0ffd9be54b47c32e6de0..7a2d0079184d09b00ca0e6356a40817eee8342ef 100644 +--- a/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm ++++ b/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm +@@ -90,6 +90,7 @@ static uint32_t grsltype_to_alignment_mask(GrSLType type) { + break; + } + SK_ABORT("Unexpected type"); ++ SkUNREACHABLE; + } + + /** Returns the size in bytes taken up in Metal buffers for GrSLTypes. */ +@@ -172,6 +173,7 @@ static inline uint32_t grsltype_to_mtl_size(GrSLType type) { + break; + } + SK_ABORT("Unexpected type"); ++ SkUNREACHABLE; + } + + // Given the current offset into the ubo, calculate the offset for the uniform we're trying to add +diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm +index eccf435074c84c2a6580637f371094471a6a21d4..b49a43b7ec758e8a16fd4e766f15423d64d08e7b 100644 +--- a/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm ++++ b/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm +@@ -112,6 +112,7 @@ bool GrPixelConfigToMTLFormat(GrPixelConfig config, MTLPixelFormat* format) { + return true; + } + SK_ABORT("Unexpected config"); ++ SkUNREACHABLE; + } + + MTLTextureDescriptor* GrGetMTLTextureDescriptor(id<MTLTexture> mtlTexture) { +diff --git a/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp b/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp +index 4b311b5207082e612a2941d5ec0aeab948ac4a28..8a010a1de1fe3a708851de59b8274ea57e391dd5 100644 +--- a/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp ++++ b/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp +@@ -610,6 +610,7 @@ static uint32_t seed_vertices(GrPrimitiveType type) { + return 0; + } + SK_ABORT("Incomplete switch\n"); ++ SkUNREACHABLE; + } + + static uint32_t primitive_vertices(GrPrimitiveType type) { +@@ -627,6 +628,7 @@ static uint32_t primitive_vertices(GrPrimitiveType type) { + return 0; + } + SK_ABORT("Incomplete switch\n"); ++ SkUNREACHABLE; + } + + static SkPoint random_point(SkRandom* random, SkScalar min, SkScalar max) { +diff --git a/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp b/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp +index 6b3c023ff689df22cdd9c74ddc34e9770d50f07d..6b28723bd5c84bff56a17d8983777d8a4775ffd2 100644 +--- a/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp ++++ b/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp +@@ -823,4 +823,5 @@ static bool can_use_hw_derivatives_with_coverage( + } + } + SK_ABORT("Invalid round rect type."); ++ SkUNREACHABLE; + } +diff --git a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp b/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp +index b32758150f42c6fe7a413f8b820e2c0171f9bd77..10f0d968891f894866216e49c23cc8d7f47e1e4c 100644 +--- a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp ++++ b/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp +@@ -2283,6 +2283,7 @@ static int rrect_type_to_vert_count(RRectType type) { + return kVertsPerOverstrokeRRect; + } + SK_ABORT("Invalid type"); ++ SkUNREACHABLE; + } + + static int rrect_type_to_index_count(RRectType type) { +@@ -2295,6 +2296,7 @@ static int rrect_type_to_index_count(RRectType type) { + return kIndicesPerOverstrokeRRect; + } + SK_ABORT("Invalid type"); ++ SkUNREACHABLE; + } + + static const uint16_t* rrect_type_to_indices(RRectType type) { +@@ -2306,6 +2308,7 @@ static const uint16_t* rrect_type_to_indices(RRectType type) { + return gOverstrokeRRectIndices; + } + SK_ABORT("Invalid type"); ++ SkUNREACHABLE; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////// +diff --git a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp b/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp +index 546933bb8a46eb79ae456936e4977e68d7459b28..fadf6096c339f1ae48670fad99dd35b6a70d016e 100644 +--- a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp ++++ b/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp +@@ -155,6 +155,7 @@ static int rrect_type_to_vert_count(RRectType type) { + return kVertsPerOverstrokeRRect; + } + SK_ABORT("Invalid type"); ++ SkUNREACHABLE; + } + + static int rrect_type_to_index_count(RRectType type) { +@@ -167,6 +168,7 @@ static int rrect_type_to_index_count(RRectType type) { + return kIndicesPerOverstrokeRRect; + } + SK_ABORT("Invalid type"); ++ SkUNREACHABLE; + } + + static const uint16_t* rrect_type_to_indices(RRectType type) { +@@ -178,6 +180,7 @@ static const uint16_t* rrect_type_to_indices(RRectType type) { + return gRRectIndices; + } + SK_ABORT("Invalid type"); ++ SkUNREACHABLE; + } + + /////////////////////////////////////////////////////////////////////////////// +diff --git a/gfx/skia/skia/src/gpu/text/GrTextBlob.h b/gfx/skia/skia/src/gpu/text/GrTextBlob.h +index ddea88d15fe5bbae3661d656768d1058209931e0..d82e84704f9038c22615e4d79c83c5b5fd02014e 100644 +--- a/gfx/skia/skia/src/gpu/text/GrTextBlob.h ++++ b/gfx/skia/skia/src/gpu/text/GrTextBlob.h +@@ -125,6 +125,7 @@ public: + + void* operator new(size_t) { + SK_ABORT("All blobs are created by placement new."); ++ SkUNREACHABLE; + } + + void* operator new(size_t, void* p) { return p; } +diff --git a/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp b/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp +index 976beaf3d4e336e6b8b6ae45eb69b76ca8e0814a..f9c01dd217d9f6fc7f202b9e22558b3561699b8b 100644 +--- a/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp ++++ b/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp +@@ -284,4 +284,5 @@ bool GrTextBlob::VertexRegenerator::regenerate(GrTextBlob::VertexRegenerator::Re + return true; + } + SK_ABORT("Should not get here"); ++ SkUNREACHABLE; + } +diff --git a/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp b/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp +index 36e2436a85483fafc17a517d4e4e3b98baaf8915..a914f5a4d5ec49cd4d935c7f03899dae323878cf 100644 +--- a/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp ++++ b/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp +@@ -108,6 +108,7 @@ static FormatCompatibilityClass format_compatibility_class(VkFormat format) { + + default: + SK_ABORT("Unsupported VkFormat"); ++ SkUNREACHABLE; + } + } + +@@ -1656,6 +1657,7 @@ GrBackendFormat GrVkCaps::getBackendFormatFromCompressionType( + return GrBackendFormat::MakeVk(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK); + } + SK_ABORT("Invalid compression type"); ++ SkUNREACHABLE; + } + + GrSwizzle GrVkCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { +diff --git a/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp b/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp +index ed14a643ec94ec5b9b7c7d2c02198d328650b238..3675c953d4705bf0f79b83565312ae75cde39594 100644 +--- a/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp ++++ b/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp +@@ -28,6 +28,7 @@ static BufferUsage get_buffer_usage(GrVkBuffer::Type type, bool dynamic) { + return BufferUsage::kCpuOnly; + } + SK_ABORT("Invalid GrVkBuffer::Type"); ++ SkUNREACHABLE; + } + + bool GrVkMemory::AllocAndBindBufferMemory(const GrVkGpu* gpu, +diff --git a/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp b/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp +index 6868ff5babfe4009510b4a49bfc011c8a7d728a0..2c7a20a7dbe396c1c29650f4f59f9109b4c8b020 100644 +--- a/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp ++++ b/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp +@@ -80,6 +80,7 @@ static inline VkFormat attrib_type_to_vkformat(GrVertexAttribType type) { + return VK_FORMAT_R16G16B16A16_UNORM; + } + SK_ABORT("Unknown vertex attrib type"); ++ SkUNREACHABLE; + } + + static void setup_vertex_input_state(const GrPrimitiveProcessor& primProc, +@@ -162,8 +163,10 @@ static VkPrimitiveTopology gr_primitive_type_to_vk_topology(GrPrimitiveType prim + return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP; + case GrPrimitiveType::kPath: + SK_ABORT("Unsupported primitive type"); ++ SkUNREACHABLE; + } + SK_ABORT("invalid GrPrimitiveType"); ++ SkUNREACHABLE; + } + + static void setup_input_assembly_state(GrPrimitiveType primitiveType, +diff --git a/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp +index 5dc3544f008951b8e5ec530d4a1f00a723e7febc..306bd96816694e7970207789717fccac478a91e7 100644 +--- a/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp ++++ b/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp +@@ -23,6 +23,7 @@ static inline VkSamplerAddressMode wrap_mode_to_vk_sampler_address( + return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; + } + SK_ABORT("Unknown wrap mode."); ++ SkUNREACHABLE; + } + + GrVkSampler* GrVkSampler::Create(GrVkGpu* gpu, const GrSamplerState& samplerState, +diff --git a/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h b/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h +index 210cf228d93cae644bc933a903e1b5e8c6400309..6a6fd90d96decd88bba9011ee5c553a42c696a74 100644 +--- a/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h ++++ b/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h +@@ -34,6 +34,7 @@ private: + + bool onUpdateData(const void* src, size_t srcSizeInBytes) override { + SK_ABORT("Not implemented for transfer buffers."); ++ SkUNREACHABLE; + } + + GrVkGpu* getVkGpu() const { +diff --git a/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp +index 6df62ce6a9016e97b3eb41532b5457c2adbcd77d..4ac68735639857d0be48d759aaf2540411c45064 100644 +--- a/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp ++++ b/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp +@@ -89,6 +89,7 @@ static uint32_t grsltype_to_alignment_mask(GrSLType type) { + break; + } + SK_ABORT("Unexpected type"); ++ SkUNREACHABLE; + } + + /** Returns the size in bytes taken up in vulkanbuffers for GrSLTypes. */ +@@ -172,6 +173,7 @@ static inline uint32_t grsltype_to_vk_size(GrSLType type) { + break; + } + SK_ABORT("Unexpected type"); ++ SkUNREACHABLE; + } + + +diff --git a/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp +index 5fe2f45373674abfc750720ba43ceef25347e7a1..4b6d61813ddf56078a32c7505cf744070a7ab4ad 100644 +--- a/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp ++++ b/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp +@@ -74,6 +74,7 @@ static inline int grsltype_to_location_size(GrSLType type) { + return 1; + } + SK_ABORT("Unexpected type"); ++ SkUNREACHABLE; + } + + static void finalize_helper(GrVkVaryingHandler::VarArray& vars) { +diff --git a/gfx/skia/skia/src/pdf/SkPDFTag.cpp b/gfx/skia/skia/src/pdf/SkPDFTag.cpp +index a2248070e89cdc269614fbf19a3402dcffb5b324..15122d50477f98e92afbd48afcc68c7fdbf6fe1a 100644 +--- a/gfx/skia/skia/src/pdf/SkPDFTag.cpp ++++ b/gfx/skia/skia/src/pdf/SkPDFTag.cpp +@@ -64,6 +64,7 @@ static const char* tag_name_from_type(SkPDF::DocumentStructureType type) { + #undef M + } + SK_ABORT("bad tag"); ++ SkUNREACHABLE; + } + + struct SkPDFTagNode { +diff --git a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp b/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp +index 23986cbaaa9329d7a55fcfb654f2ca786f8f9e17..e78c47b11ad9f7483a41e0271305e4ca2de96509 100644 +--- a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp ++++ b/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp +@@ -173,18 +173,22 @@ public: + protected: + int onCountFamilies() const override { + SK_ABORT("Not implemented."); ++ SkUNREACHABLE; + } + + void onGetFamilyName(int index, SkString* familyName) const override { + SK_ABORT("Not implemented."); ++ SkUNREACHABLE; + } + + SkFontStyleSet* onCreateStyleSet(int index) const override { + SK_ABORT("Not implemented."); ++ SkUNREACHABLE; + } + + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { + SK_ABORT("Not implemented."); ++ SkUNREACHABLE; + } + + SkTypeface* onMatchFamilyStyle(const char requestedFamilyName[], +@@ -215,10 +219,12 @@ protected: + const char* bcp47[], int bcp47Count, + SkUnichar character) const override { + SK_ABORT("Not implemented."); ++ SkUNREACHABLE; + } + + SkTypeface* onMatchFaceStyle(const SkTypeface*, const SkFontStyle&) const override { + SK_ABORT("Not implemented."); ++ SkUNREACHABLE; + } + + sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override { +diff --git a/gfx/skia/skia/src/shaders/SkImageShader.cpp b/gfx/skia/skia/src/shaders/SkImageShader.cpp +index 5bc13e587c796656e5b9205d295f9e9ea5a88174..968e3cffaedb016659aef8d21dc1b1d16bf296a6 100644 +--- a/gfx/skia/skia/src/shaders/SkImageShader.cpp ++++ b/gfx/skia/skia/src/shaders/SkImageShader.cpp +@@ -183,6 +183,7 @@ static GrSamplerState::WrapMode tile_mode_to_wrap_mode(const SkTileMode tileMode + return GrSamplerState::WrapMode::kClampToBorder; + } + SK_ABORT("Unknown tile mode."); ++ SkUNREACHABLE; + } + + std::unique_ptr<GrFragmentProcessor> SkImageShader::asFragmentProcessor( +diff --git a/gfx/skia/skia/src/utils/SkShadowUtils.cpp b/gfx/skia/skia/src/utils/SkShadowUtils.cpp +index 1b47af5523749d42226401118704b9d6e19dc036..f0ae0411d0f9642c3bec9417178769d2d0c7936b 100644 +--- a/gfx/skia/skia/src/utils/SkShadowUtils.cpp ++++ b/gfx/skia/skia/src/utils/SkShadowUtils.cpp +@@ -149,6 +149,7 @@ struct SpotVerticesFactory { + return false; + } + SK_ABORT("Uninitialized occluder type?"); ++ SkUNREACHABLE; + } + + sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm, +diff --git a/intl/icu/source/i18n/number_rounding.cpp b/intl/icu/source/i18n/number_rounding.cpp +index a9b3f16c050d946c9084fe2dd3b5c567726e185f..48b2e9867350c83a7e309163bd88ec5a8ca1335e 100644 +--- a/intl/icu/source/i18n/number_rounding.cpp ++++ b/intl/icu/source/i18n/number_rounding.cpp +@@ -283,6 +283,7 @@ FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) + settings.fMaxFrac = static_cast<digits_t>(maxFrac); + settings.fMinSig = -1; + settings.fMaxSig = -1; ++ settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED; + PrecisionUnion union_; + union_.fracSig = settings; + return {RND_FRACTION, union_}; +@@ -294,6 +295,7 @@ Precision Precision::constructSignificant(int32_t minSig, int32_t maxSig) { + settings.fMaxFrac = -1; + settings.fMinSig = static_cast<digits_t>(minSig); + settings.fMaxSig = static_cast<digits_t>(maxSig); ++ settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED; + PrecisionUnion union_; + union_.fracSig = settings; + return {RND_SIGNIFICANT, union_}; +diff --git a/third_party/libwebrtc/api/adaptation/resource.cc b/third_party/libwebrtc/api/adaptation/resource.cc +index dac03fe019d89482e91a29242b3027da80f28c8b..e18a04b4c5c95d1449662cfd8f7a7f978f6461c3 100644 +--- a/third_party/libwebrtc/api/adaptation/resource.cc ++++ b/third_party/libwebrtc/api/adaptation/resource.cc +@@ -22,6 +22,7 @@ const char* ResourceUsageStateToString(ResourceUsageState usage_state) { + return "kUnderuse"; + } + RTC_CHECK_NOTREACHED(); ++ return nullptr; + } + + ResourceListener::~ResourceListener() {} +diff --git a/third_party/libwebrtc/api/rtp_parameters.cc b/third_party/libwebrtc/api/rtp_parameters.cc +index c1d12e5d8dc4be47fd751d656c99174b1433de09..e7fdfc2b7fc14a30df1d8770365985f219e7d4b7 100644 +--- a/third_party/libwebrtc/api/rtp_parameters.cc ++++ b/third_party/libwebrtc/api/rtp_parameters.cc +@@ -32,6 +32,7 @@ const char* DegradationPreferenceToString( + return "balanced"; + } + RTC_CHECK_NOTREACHED(); ++ return ""; + } + + const double kDefaultBitratePriority = 1.0; +diff --git a/third_party/libwebrtc/api/video/video_frame_buffer.cc b/third_party/libwebrtc/api/video/video_frame_buffer.cc +index 398e30b606fe8bc24fe6d89bbdaf4176507ff2d6..598ead31e889f0a67112094b08dac5f0f1248a62 100644 +--- a/third_party/libwebrtc/api/video/video_frame_buffer.cc ++++ b/third_party/libwebrtc/api/video/video_frame_buffer.cc +@@ -99,6 +99,8 @@ const char* VideoFrameBufferTypeToString(VideoFrameBuffer::Type type) { + default: + RTC_DCHECK_NOTREACHED(); + } ++ RTC_DCHECK_NOTREACHED(); ++ return nullptr; + } + + int I420BufferInterface::ChromaWidth() const { +diff --git a/third_party/libwebrtc/api/video_codecs/video_codec.cc b/third_party/libwebrtc/api/video_codecs/video_codec.cc +index c6122d3f6ac3056ebcc654e1c268923f6057a738..1c78e6c0071a4ae36913d47e67d05389270f5095 100644 +--- a/third_party/libwebrtc/api/video_codecs/video_codec.cc ++++ b/third_party/libwebrtc/api/video_codecs/video_codec.cc +@@ -118,6 +118,7 @@ const char* CodecTypeToPayloadString(VideoCodecType type) { + return kPayloadNameGeneric; + } + RTC_CHECK_NOTREACHED(); ++ return ""; + } + + VideoCodecType PayloadStringToCodecType(const std::string& name) { +diff --git a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc +index 39c52a008181cd2cf5fb2b3589816dfd3f03a6ba..24df68f62d0f27d3f0e2e099f1f694fe2fd4e982 100644 +--- a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc ++++ b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc +@@ -163,6 +163,7 @@ class VideoEncoderSoftwareFallbackWrapper final : public VideoEncoder { + return fallback_encoder_.get(); + } + RTC_CHECK_NOTREACHED(); ++ return nullptr; + } + + // Updates encoder with last observed parameters, such as callbacks, rates, +@@ -343,6 +344,7 @@ int32_t VideoEncoderSoftwareFallbackWrapper::Encode( + return fallback_encoder_->Encode(frame, frame_types); + } + RTC_CHECK_NOTREACHED(); ++ return WEBRTC_VIDEO_CODEC_ERROR; + } + + int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder( +diff --git a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc +index f30a4d7abb37a63eeea637b52d0dc8103c2fefe0..42dbaa0e8c84c6edc2c77f505a78ac47815fae3d 100644 +--- a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc ++++ b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc +@@ -168,6 +168,7 @@ const char* Adaptation::StatusToString(Adaptation::Status status) { + return "kRejectedByConstraint"; + } + RTC_CHECK_NOTREACHED(); ++ return ""; + } + + Adaptation::Adaptation(int validation_id, +@@ -390,6 +391,7 @@ VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::GetAdaptationUpStep( + return Adaptation::Status::kAdaptationDisabled; + } + RTC_CHECK_NOTREACHED(); ++ return Adaptation::Status::kAdaptationDisabled; + } + + Adaptation VideoStreamAdapter::GetAdaptationDown() { +@@ -472,6 +474,7 @@ VideoStreamAdapter::GetAdaptationDownStep( + return Adaptation::Status::kAdaptationDisabled; + } + RTC_CHECK_NOTREACHED(); ++ return Adaptation::Status::kAdaptationDisabled; + } + + VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::DecreaseResolution( +@@ -625,6 +628,8 @@ Adaptation VideoStreamAdapter::GetAdaptDownResolution() { + } + } + RTC_CHECK_NOTREACHED(); ++ return RestrictionsOrStateToAdaptation( ++ Adaptation::Status::kAdaptationDisabled, input_state); + } + + VideoStreamAdapter::RestrictionsOrState +diff --git a/third_party/libwebrtc/call/video_send_stream.cc b/third_party/libwebrtc/call/video_send_stream.cc +index 241d44a2303a10c7a13557080665ee677835c4d0..0e4e28a70c76220121bedbc7e670045b63238a9b 100644 +--- a/third_party/libwebrtc/call/video_send_stream.cc ++++ b/third_party/libwebrtc/call/video_send_stream.cc +@@ -30,6 +30,7 @@ const char* StreamTypeToString(VideoSendStream::StreamStats::StreamType type) { + return "flexfec"; + } + RTC_CHECK_NOTREACHED(); ++ return ""; + } + + } // namespace +diff --git a/third_party/libwebrtc/modules/audio_processing/agc/clipping_predictor.cc b/third_party/libwebrtc/modules/audio_processing/agc/clipping_predictor.cc +index 58b3a2769cdaa72ff4045c7c23fd006237140198..ce0fa8e417c8e77e7d449ca9d65dabf1e0b160ff 100644 +--- a/third_party/libwebrtc/modules/audio_processing/agc/clipping_predictor.cc ++++ b/third_party/libwebrtc/modules/audio_processing/agc/clipping_predictor.cc +@@ -378,6 +378,7 @@ std::unique_ptr<ClippingPredictor> CreateClippingPredictor( + /*adaptive_step_estimation=*/false); + } + RTC_DCHECK_NOTREACHED(); ++ return nullptr; + } + + } // namespace webrtc +diff --git a/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc b/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc +index 91501fb6e32cb00fa79ce170e95d7e49301717e6..d87d9586e103a8e5edf703a3e516f73e91e3516d 100644 +--- a/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc ++++ b/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc +@@ -59,6 +59,8 @@ rtc::FunctionView<float(float)> GetActivationFunction( + case ActivationFunction::kSigmoidApproximated: + return ::rnnoise::SigmoidApproximated; + } ++ // supposed to be never reached apparently therefore returning bogus ++ return ::rnnoise::TansigApproximated; + } + + } // namespace +diff --git a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc +index 81d96609a4bc796c4ef7b1fdfed53b63d57037d3..946045e0e85b89fb771a0b8ff69b9154c06f1871 100644 +--- a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc ++++ b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc +@@ -120,6 +120,7 @@ GainControl::Mode Agc1ConfigModeToInterfaceMode( + return GainControl::kFixedDigital; + } + RTC_CHECK_NOTREACHED(); ++ return GainControl::kAdaptiveAnalog; + } + + bool MinimizeProcessingForUnusedOutput() { +@@ -1985,6 +1986,7 @@ void AudioProcessingImpl::InitializeNoiseSuppressor() { + return NsConfig::SuppressionLevel::k21dB; + } + RTC_CHECK_NOTREACHED(); ++ return NsConfig::SuppressionLevel::k6dB; + }; + + NsConfig cfg; +diff --git a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc +index 86edaee0878d3e51b41b0a9f1679a6ebf825d167..784f7ad2029cb586a55c8cbb8600b09b8f80cce9 100644 +--- a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc ++++ b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc +@@ -32,6 +32,7 @@ std::string NoiseSuppressionLevelToString( + return "VeryHigh"; + } + RTC_CHECK_NOTREACHED(); ++ return ""; + } + + std::string GainController1ModeToString(const Agc1Config::Mode& mode) { +@@ -44,6 +45,7 @@ std::string GainController1ModeToString(const Agc1Config::Mode& mode) { + return "FixedDigital"; + } + RTC_CHECK_NOTREACHED(); ++ return ""; + } + + } // namespace +diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc +index f1e4eddb4b9d8855f6accf24ef980cbc11d0077d..b3fde3cda3c7c636b8f37f3778fb3b735a61d66d 100644 +--- a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc ++++ b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc +@@ -38,6 +38,7 @@ std::unique_ptr<VideoRtpDepacketizer> CreateVideoRtpDepacketizer( + return std::make_unique<VideoRtpDepacketizerGeneric>(); + } + RTC_CHECK_NOTREACHED(); ++ return nullptr; + } + + } // namespace webrtc +diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc +index b45fb12e4893fffb88b7bccff347258acada9202..22b8ef99bc77925ab8bc69f9e489d98a52c37dfa 100644 +--- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc ++++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc +@@ -142,6 +142,7 @@ bool IsNonVolatile(RTPExtensionType type) { + #endif + } + RTC_CHECK_NOTREACHED(); ++ return false; + } + + bool HasBweExtension(const RtpHeaderExtensionMap& extensions_map) { +diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc +index 244f644bd1a1ee8f61e322270012b2cfbec5afda..c2187e469c1b078223a1fdf0266a3e82d9d9a64f 100644 +--- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc ++++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc +@@ -45,6 +45,7 @@ namespace { + return "audio_cn"; + } + RTC_CHECK_NOTREACHED(); ++ return ""; + } + + constexpr char kIncludeCaptureClockOffset[] = +diff --git a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc +index 5aebd2c5268e8c58b07be4bc393f83ac5abd1c09..8d18446430ff4b7f6d0d669416e3493de3b41411 100644 +--- a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc ++++ b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc +@@ -30,6 +30,7 @@ TemporalLayersChecker::CreateTemporalLayersChecker(Vp8TemporalLayersType type, + return std::make_unique<TemporalLayersChecker>(num_temporal_layers); + } + RTC_CHECK_NOTREACHED(); ++ return nullptr; + } + + TemporalLayersChecker::TemporalLayersChecker(int num_temporal_layers) +diff --git a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc +index 2470bc889383a572605021edbaec01ac5ed34ddb..37309e4822f16d3f4a38d4c6719b6773b30b8372 100644 +--- a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc ++++ b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc +@@ -63,6 +63,7 @@ std::string ToString(VideoAdaptationReason reason) { + return "cpu"; + } + RTC_CHECK_NOTREACHED(); ++ return ""; + } + + std::vector<bool> GetActiveLayersFlags(const VideoCodec& codec) { +diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp +index c00298a160519c604ab84e089ed4dfdcc92cd28c..74b9d1aef31c0738c89423d3c5377c271dfb1f4f 100644 +--- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp ++++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp +@@ -2651,6 +2651,7 @@ get_type_name_for_precision_qualifier(const glsl_type *type) + default: + unreachable("Unsupported type"); + } /* base type */ ++ return ""; + } + + static unsigned +diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp +index 9ea8e00d310a0d14b3a8618c78b0afa377f90da7..2dee2ccdcd16b9e562fc6961c0b7bb497cf868eb 100644 +--- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp ++++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp +@@ -624,6 +624,7 @@ ir_expression::get_num_operands(ir_expression_operation op) + return 4; + + unreachable("Could not calculate number of operands"); ++ return -1; + } + + #include "ir_expression_operation_strings.h" +diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp +index 9429e69c2a7fe4c7176bf60164bcb7e311336425..8d9da42434c5877d6d5e5c91a8ebc38fd8ba2569 100644 +--- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp ++++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp +@@ -239,6 +239,7 @@ incremented_before_terminator(ir_loop *loop, ir_variable *var, + } + + unreachable("Unable to find induction variable"); ++ return false; + } + + /** +diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp +index 88318cd8a6eb7326d3b6a860918b38dcdf662536..63a535c8021436bf44bee45c571ce3e98c3b90b9 100644 +--- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp ++++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp +@@ -229,6 +229,7 @@ write_mask_to_swizzle(unsigned write_mask) + case WRITEMASK_W: return SWIZZLE_W; + } + unreachable("not reached"); ++ return 0; + } + + /** +diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp +index 445659599c2230dc21e9122b029eefccd4da3b1e..615ab6215a76ed2bb2d5a354923468765582455a 100644 +--- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp ++++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp +@@ -460,6 +460,7 @@ const glsl_type *glsl_type::get_bare_type() const + } + + unreachable("Invalid base type"); ++ return nullptr; + } + + const glsl_type *glsl_type::get_float16_type() const +@@ -2016,6 +2017,7 @@ glsl_type::get_explicit_std140_type(bool row_major) const + return type; + } else { + unreachable("Invalid type for UBO or SSBO"); ++ return nullptr; + } + } + +@@ -2374,6 +2376,7 @@ glsl_type::get_explicit_std430_type(bool row_major) const + return type; + } else { + unreachable("Invalid type for SSBO"); ++ return nullptr; + } + } + +@@ -2448,6 +2451,7 @@ glsl_type::get_explicit_type_for_size_align(glsl_type_size_align_func type_info, + this->matrix_columns, stride, false); + } else { + unreachable("Unhandled type."); ++ return nullptr; + } + } + +@@ -2948,6 +2952,7 @@ glsl_get_sampler_dim_coordinate_components(enum glsl_sampler_dim dim) + return 3; + default: + unreachable("Unknown sampler dim"); ++ return -1; + } + } + +diff --git a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h b/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h +index 0d512550de470344cb8eb371bd7fa1ed22cad6e0..ef940cabdd6e7c9326c283ae6a90e3e387bc0b51 100644 +--- a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h ++++ b/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h +@@ -185,6 +185,7 @@ _mesa_shader_stage_from_subroutine_uniform(GLenum subuniform) + return MESA_SHADER_TESS_EVAL; + } + unreachable("not reached"); ++ return MESA_SHADER_NONE; + } + + static inline gl_shader_stage +@@ -205,6 +206,7 @@ _mesa_shader_stage_from_subroutine(GLenum subroutine) + return MESA_SHADER_TESS_EVAL; + } + unreachable("not reached"); ++ return MESA_SHADER_NONE; + } + + static inline GLenum +@@ -230,6 +232,7 @@ _mesa_shader_stage_to_subroutine(gl_shader_stage stage) + break; + } + unreachable("not reached"); ++ return GL_VERTEX_PROGRAM_ARB; + } + + static inline GLenum +@@ -253,6 +256,7 @@ _mesa_shader_stage_to_subroutine_uniform(gl_shader_stage stage) + break; + } + unreachable("not reached"); ++ return GL_VERTEX_PROGRAM_ARB; + } + + extern bool diff --git a/0010-Bug-531915-mozilla-bmo531915.patch.patch b/0010-Bug-531915-mozilla-bmo531915.patch.patch new file mode 100644 index 000000000000..b6c43fc72484 --- /dev/null +++ b/0010-Bug-531915-mozilla-bmo531915.patch.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wolfgang Rosenauer <wr@rosenauer.org> +Date: Sun, 17 Oct 2021 20:18:18 +0200 +Subject: [PATCH] Bug 531915 - mozilla-bmo531915.patch + +https://bugzilla.mozilla.org/show_bug.cgi?id=1729459 +--- + modules/fdlibm/src/math_private.h | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h +index f4373f27834ab794d3ea7bf5fa72caa0a2480e8f..4430e496e8e9251e702b47e68ec88b4f9f0fa3f2 100644 +--- a/modules/fdlibm/src/math_private.h ++++ b/modules/fdlibm/src/math_private.h +@@ -30,9 +30,14 @@ + * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t + */ + ++#ifdef __i386__ ++typedef long double __double_t; ++typedef long double __float_t; ++#else + typedef double __double_t; +-typedef __double_t double_t; + typedef float __float_t; ++#endif ++typedef __double_t double_t; + + /* + * The original fdlibm code used statements like: diff --git a/0011-imported-patch-one_swizzle_to_rule_them_all.patch.patch b/0011-imported-patch-one_swizzle_to_rule_them_all.patch.patch new file mode 100644 index 000000000000..7cf13ec016fa --- /dev/null +++ b/0011-imported-patch-one_swizzle_to_rule_them_all.patch.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "M. Sirringhaus" <msirringhaus@suse.de> +Date: Tue, 22 Feb 2022 09:24:46 +0100 +Subject: [PATCH] imported patch one_swizzle_to_rule_them_all.patch + +--- + gfx/webrender_bindings/RenderCompositorSWGL.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/gfx/webrender_bindings/RenderCompositorSWGL.cpp b/gfx/webrender_bindings/RenderCompositorSWGL.cpp +index e52b8eba50cd6c243aa671285d2419e84834a898..b6d6cd0de300d2b553a22825380bb9b22a0929e4 100644 +--- a/gfx/webrender_bindings/RenderCompositorSWGL.cpp ++++ b/gfx/webrender_bindings/RenderCompositorSWGL.cpp +@@ -7,6 +7,7 @@ + #include "RenderCompositorSWGL.h" + + #include "mozilla/gfx/Logging.h" ++#include "mozilla/gfx/Swizzle.h" + #include "mozilla/widget/CompositorWidget.h" + + #ifdef MOZ_WIDGET_GTK +@@ -235,6 +236,13 @@ void RenderCompositorSWGL::CommitMappedBuffer(bool aDirty) { + } + mDT->Flush(); + ++#if MOZ_BIG_ENDIAN() ++ // One swizzle to rule them all. ++ gfx::SwizzleData(mMappedData, mMappedStride, gfx::SurfaceFormat::B8G8R8A8, ++ mMappedData, mMappedStride, gfx::SurfaceFormat::A8R8G8B8, ++ mDT->GetSize()); ++#endif ++ + // Done with the DT. Hand it back to the widget and clear out any trace of it. + mWidget->EndRemoteDrawingInRegion(mDT, mDirtyRegion); + mDirtyRegion.SetEmpty(); diff --git a/0012-imported-patch-svg-rendering.patch.patch b/0012-imported-patch-svg-rendering.patch.patch new file mode 100644 index 000000000000..47928eb61478 --- /dev/null +++ b/0012-imported-patch-svg-rendering.patch.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "M. Sirringhaus" <msirringhaus@suse.de> +Date: Tue, 22 Feb 2022 09:24:46 +0100 +Subject: [PATCH] imported patch svg-rendering.patch + +--- + image/imgFrame.cpp | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp +index 4ff6dcec197733d03e50eade0471834473bece7c..ed3e311f7a3e1b4d9e36b5cd39da1099845ce408 100644 +--- a/image/imgFrame.cpp ++++ b/image/imgFrame.cpp +@@ -372,6 +372,17 @@ nsresult imgFrame::InitWithDrawable(gfxDrawable* aDrawable, + return NS_ERROR_OUT_OF_MEMORY; + } + ++#if MOZ_BIG_ENDIAN() ++ if (aBackend == gfx::BackendType::SKIA && canUseDataSurface) { ++ // SKIA is lying about what format it returns on big endian ++ for (int ii=0; ii < mRawSurface->GetSize().Height()*mRawSurface->Stride() / 4; ++ii) { ++ uint32_t *vals = (uint32_t*)(mRawSurface->GetData()); ++ uint32_t val = ((vals[ii] << 8) & 0xFF00FF00 ) | ((vals[ii] >> 8) & 0xFF00FF ); ++ vals[ii] = (val << 16) | (val >> 16); ++ } ++ } ++#endif ++ + if (!canUseDataSurface) { + // We used an offscreen surface, which is an "optimized" surface from + // imgFrame's perspective. diff --git a/0013-Bug-1792159-Add-missing-includes-to-AtomicOperations.patch b/0013-Bug-1792159-Add-missing-includes-to-AtomicOperations.patch new file mode 100644 index 000000000000..3be19cd540ff --- /dev/null +++ b/0013-Bug-1792159-Add-missing-includes-to-AtomicOperations.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wolfgang Rosenauer <wr@rosenauer.org> +Date: Mon, 6 Mar 2023 03:29:00 +0200 +Subject: [PATCH] Bug 1792159 - Add missing includes to + AtomicOperationsGenerated.h + +--- + mozglue/misc/SIMD_avx2.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mozglue/misc/SIMD_avx2.cpp b/mozglue/misc/SIMD_avx2.cpp +index a1467c7a5593b33d7dc99c61277b3e66e0de9988..d93bc879fc8454423a9fc488f21c6c05c1ce5e90 100644 +--- a/mozglue/misc/SIMD_avx2.cpp ++++ b/mozglue/misc/SIMD_avx2.cpp +@@ -58,7 +58,7 @@ __m256i CmpEq256(__m256i a, __m256i b) { + return _mm256_cmpeq_epi64(a, b); + } + +-# if defined(__GNUC__) && !defined(__clang__) ++# if 0 + + // See the comment in SIMD.cpp over Load32BitsIntoXMM. This is just adapted + // from that workaround. Testing this, it also yields the correct instructions diff --git a/0014-mozilla-s390-context.patch.patch b/0014-mozilla-s390-context.patch.patch new file mode 100644 index 000000000000..616527dfeb55 --- /dev/null +++ b/0014-mozilla-s390-context.patch.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Sirringhaus <msirringhaus@suse.de> +Date: Tue, 21 May 2019 18:26:48 +0300 +Subject: [PATCH] mozilla-s390-context.patch + +--- + js/src/wasm/WasmSignalHandlers.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp +index cee3127507564f9d100318476a61d0a7f4307ade..b90f84f3b25b38195d9a9c1086748711538a1fe7 100644 +--- a/js/src/wasm/WasmSignalHandlers.cpp ++++ b/js/src/wasm/WasmSignalHandlers.cpp +@@ -168,6 +168,10 @@ using mozilla::DebugOnly; + # define FP_sig(p) ((p)->uc_mcontext.gregs[REG_FPRS]) + # define SP_sig(p) ((p)->uc_mcontext.gregs[REG_SP]) + # endif ++# if defined(__linux__) && defined(__s390x__) ++# define GR_sig(p,x) ((p)->uc_mcontext.gregs[x]) ++# define PSWa_sig(p) ((p)->uc_mcontext.psw.addr) ++# endif + # elif defined(__NetBSD__) + # define EIP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EIP]) + # define EBP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EBP]) +@@ -410,6 +414,10 @@ struct macos_aarch64_context { + # define FP_sig(p) RFP_sig(p) + # define SP_sig(p) R03_sig(p) + # define LR_sig(p) RRA_sig(p) ++# elif defined(__s390x__) ++# define PC_sig(p) PSWa_sig(p) ++# define SP_sig(p) GR_sig(p, 15) ++# define FP_sig(p) GR_sig(p, 11) + # endif + + static void SetContextPC(CONTEXT* context, uint8_t* pc) { diff --git a/0015-bsc-991344-Rpi3-Firefox-crashes-after-a-few-seconds-.patch b/0015-bsc-991344-Rpi3-Firefox-crashes-after-a-few-seconds-.patch new file mode 100644 index 000000000000..022e461af9be --- /dev/null +++ b/0015-bsc-991344-Rpi3-Firefox-crashes-after-a-few-seconds-.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "msirringhaus@suse.de" <msirringhaus@suse.de> +Date: Tue, 21 May 2019 15:49:58 +0200 +Subject: [PATCH] bsc#991344 - Rpi3: Firefox crashes after a few seconds of + usage + +bmo#1302554 - ARM/AARCH64: Firefox crashes on NULL nsIChannel** result pointer in nsIOService::NewChannelFromURIWithProxyFlagsInternal() +--- + netwerk/base/nsIOService.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp +index de506f59a1f38b1a90b236518395e60cf46b15f1..70473efabab7ea9fb4fc121e81a5ebdb7c94cf8f 100644 +--- a/netwerk/base/nsIOService.cpp ++++ b/netwerk/base/nsIOService.cpp +@@ -1159,7 +1159,13 @@ nsresult nsIOService::NewChannelFromURIWithProxyFlagsInternal( + } + } + ++#if defined(__aarch64__) ++ if (result) { ++ channel.forget(result); ++ } ++#else + channel.forget(result); ++#endif + return NS_OK; + } + diff --git a/0016-mozilla-fix-aarch64-libopus.patch.patch b/0016-mozilla-fix-aarch64-libopus.patch.patch new file mode 100644 index 000000000000..6012dfbf58ba --- /dev/null +++ b/0016-mozilla-fix-aarch64-libopus.patch.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wolfgang Rosenauer <wr@rosenauer.org> +Date: Thu, 5 Sep 2019 08:25:38 +0200 +Subject: [PATCH] mozilla-fix-aarch64-libopus.patch + +--- + media/libopus/silk/arm/arm_silk_map.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/media/libopus/silk/arm/arm_silk_map.c b/media/libopus/silk/arm/arm_silk_map.c +index 0b9bfec2ca974768c59e09f448aca81ceb1d8f60..f55a96da61ebf5074089afd3680a3c5234e70b82 100644 +--- a/media/libopus/silk/arm/arm_silk_map.c ++++ b/media/libopus/silk/arm/arm_silk_map.c +@@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. + # include "config.h" + #endif + +-#include "main_FIX.h" ++#include "../fixed/main_FIX.h" + #include "NSQ.h" + #include "SigProc_FIX.h" + diff --git a/0017-Bug-634334-call-to-the-ntlm_auth-helper-fails.patch b/0017-Bug-634334-call-to-the-ntlm_auth-helper-fails.patch new file mode 100644 index 000000000000..fbe65430551a --- /dev/null +++ b/0017-Bug-634334-call-to-the-ntlm_auth-helper-fails.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Petr Cerny <pcerny@novell.com> +Date: Tue, 15 Feb 2011 00:04:06 +0100 +Subject: [PATCH] Bug 634334 - call to the ntlm_auth helper fails + +--- + extensions/auth/nsAuthSambaNTLM.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp +index 5b701f2379784d3b79a5d3e4d40e414bec3d03f5..4004a5cfc79a3ea16ea20e7915b4fcacd039f6a4 100644 +--- a/extensions/auth/nsAuthSambaNTLM.cpp ++++ b/extensions/auth/nsAuthSambaNTLM.cpp +@@ -160,7 +160,7 @@ nsresult nsAuthSambaNTLM::SpawnNTLMAuthHelper() { + const char* username = PR_GetEnv("USER"); + if (!username) return NS_ERROR_FAILURE; + +- const char* const args[] = {"ntlm_auth", ++ const char* const args[] = {"/usr/bin/ntlm_auth", + "--helper-protocol", + "ntlmssp-client-1", + "--use-cached-creds", diff --git a/0020-Make-PGO-use-toolchain.patch b/0018-Make-PGO-use-toolchain.patch index eafb866e1ad9..cb291ea8a274 100644 --- a/0020-Make-PGO-use-toolchain.patch +++ b/0018-Make-PGO-use-toolchain.patch @@ -1,7 +1,7 @@ -From bb0d0a304ff3b88ab43209cca723a1fa03904aad Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann <whissi@gentoo.org> Date: Mon, 6 Apr 2020 20:13:34 +0200 -Subject: [PATCH 20/34] Make PGO use toolchain +Subject: [PATCH] Make PGO use toolchain Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> --- @@ -9,7 +9,7 @@ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> 1 file changed, 9 insertions(+) diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix -index 9ca9c97fce..9f86fe0940 100644 +index 22db5d401cd0b1081edd0ca558dfff3a77e5bd2a..b2fde82694b81eb3e2ec316088070051ad073db9 100644 --- a/build/unix/mozconfig.unix +++ b/build/unix/mozconfig.unix @@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then @@ -27,7 +27,4 @@ index 9ca9c97fce..9f86fe0940 100644 + # We want to make sure we use binutils and other binaries in the tooltool # package. - mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH" --- -2.33.1 - + mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$MOZ_FETCHES_DIR/binutils/bin:$PATH" diff --git a/0022-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch b/0019-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch index e5e1bcfee5fa..0a23d60a6029 100644 --- a/0022-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch +++ b/0019-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch @@ -1,8 +1,8 @@ -From 0539ac3b5a6574e8ba3a27b62681c0a49d89edcb Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann <whissi@gentoo.org> Date: Wed, 15 Apr 2020 00:27:25 +0200 -Subject: [PATCH 22/34] bmo#1516803: force one LTO partition for sandbox when - using GCC +Subject: [PATCH] bmo#1516803: force one LTO partition for sandbox when using + GCC Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> --- @@ -10,8 +10,10 @@ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build -index 81c89bd947..a5b76067a7 100644 -@@ -114,9 +114,10 @@ +index be5120e4aac7b3a5b589a2c88a0218123a4adec7..908e124f9e00ec28354031d5c2c9b9efb3a7bae4 100644 +--- a/security/sandbox/linux/moz.build ++++ b/security/sandbox/linux/moz.build +@@ -117,9 +117,10 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc"): # gcc lto likes to put the top level asm in syscall.cc in a different partition # from the function using it which breaks the build. Work around that by # forcing there to be only one partition. @@ -25,6 +27,3 @@ index 81c89bd947..a5b76067a7 100644 DEFINES["NS_NO_XPCOM"] = True DisableStlWrapping() --- -2.33.1 - diff --git a/0024-Fix-building-with-PGO-when-using-GCC.patch b/0020-Fix-building-with-PGO-when-using-GCC.patch index 5509359f6d6e..30440b66e5ca 100644 --- a/0024-Fix-building-with-PGO-when-using-GCC.patch +++ b/0020-Fix-building-with-PGO-when-using-GCC.patch @@ -1,7 +1,7 @@ -From 1ca9aac1bc06cee521e0e71059db3bf0b9d17ba7 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann <whissi@gentoo.org> Date: Thu, 2 Jul 2020 18:05:03 +0200 -Subject: [PATCH 24/34] Fix building with PGO when using GCC +Subject: [PATCH] Fix building with PGO when using GCC Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> --- @@ -10,35 +10,34 @@ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/build/moz.configure/lto-pgo.configure b/build/moz.configure/lto-pgo.configure -index 81c9977b57..e9c22ffb30 100644 +index 274e1b6cb620153d1afc6ca685a18783e2a8ea90..de7e424326c47799b7a81f3812d5402f24b6a9f3 100644 --- a/build/moz.configure/lto-pgo.configure +++ b/build/moz.configure/lto-pgo.configure -@@ -83,11 +83,12 @@ +@@ -83,11 +83,12 @@ set_config("PGO_PROFILE_PATH", pgo_profile_path) @imports("multiprocessing") def pgo_flags(compiler, profdata, target_is_windows): if compiler.type == "gcc": + profile_use = "-fprofile-use" return namespace( gen_cflags=["-fprofile-generate"], -- gen_ldflags=["-fprofile-generate"], + gen_ldflags=["-fprofile-generate"], - use_cflags=["-fprofile-use", "-fprofile-correction", "-Wcoverage-mismatch"], - use_ldflags=["-fprofile-use"], -+ gen_ldflags=["-fprofile-generate"], + use_cflags=[profile_use, "-fprofile-correction", "-Wcoverage-mismatch"], + use_ldflags=[profile_use], ) if compiler.type in ("clang-cl", "clang"): diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py -index 7f3de106ab..89289a7756 100755 +index 94f54cbd17369b2d9ebb6b808f8164a44f07589a..c37be30c21326b035cb1b67b090a89061c152dde 100755 --- a/build/pgo/profileserver.py +++ b/build/pgo/profileserver.py -@@ -11,7 +11,7 @@ import glob - import subprocess +@@ -11,7 +11,7 @@ import subprocess + import sys import mozcrash --from mozbuild.base import MozbuildObject, BinaryNotFoundException -+from mozbuild.base import MozbuildObject, BinaryNotFoundException, BuildEnvironmentNotFoundException +-from mozbuild.base import BinaryNotFoundException, MozbuildObject ++from mozbuild.base import BinaryNotFoundException, BuildEnvironmentNotFoundException, MozbuildObject from mozfile import TemporaryDirectory from mozhttpd import MozHttpd from mozprofile import FirefoxProfile, Preferences @@ -68,7 +67,7 @@ index 7f3de106ab..89289a7756 100755 with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -@@ -212,6 +225,11 @@ if __name__ == "__main__": +@@ -213,6 +226,11 @@ if __name__ == "__main__": print("Firefox exited successfully, but produced a crashreport") sys.exit(1) @@ -80,6 +79,3 @@ index 7f3de106ab..89289a7756 100755 llvm_profdata = env.get("LLVM_PROFDATA") if llvm_profdata: profraw_files = glob.glob("*.profraw") --- -2.33.1 - diff --git a/0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch b/0021-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch index dd173fb14324..2040689769ab 100644 --- a/0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch +++ b/0021-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch @@ -1,8 +1,7 @@ -From 3e2964adcd0b04dd72a5c0a1d6ad8e1680e6a429 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann <whissi@gentoo.org> Date: Sat, 29 Aug 2020 22:30:59 +0200 -Subject: [PATCH 27/34] LTO: Only enable LTO for Rust when complete build uses - LTO +Subject: [PATCH] LTO: Only enable LTO for Rust when complete build uses LTO Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> --- @@ -10,10 +9,10 @@ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> 1 file changed, 2 insertions(+) diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk -index e5a6d57ba7..1d7d80ca3f 100644 +index 602ba4538829bf5e082f4c9601cae67541fd3905..f3db8cf699a4bfff443f92e1640d71d6fa5ecebf 100644 --- a/config/makefiles/rust.mk +++ b/config/makefiles/rust.mk -@@ -62,6 +62,7 @@ endif +@@ -82,6 +82,7 @@ endif # These flags are passed via `cargo rustc` and only apply to the final rustc # invocation (i.e., only the top-level crate, not its dependencies). cargo_rustc_flags = $(CARGO_RUSTCFLAGS) @@ -21,7 +20,7 @@ index e5a6d57ba7..1d7d80ca3f 100644 ifndef DEVELOPER_OPTIONS ifndef MOZ_DEBUG_RUST # Enable link-time optimization for release builds, but not when linking -@@ -75,6 +76,7 @@ RUSTFLAGS += -Cembed-bitcode=yes +@@ -101,6 +102,7 @@ endif endif endif endif @@ -29,6 +28,3 @@ index e5a6d57ba7..1d7d80ca3f 100644 ifdef CARGO_INCREMENTAL export CARGO_INCREMENTAL --- -2.33.1 - diff --git a/0022-Bug-1516081-Disable-watchdog-during-FDO-train.patch b/0022-Bug-1516081-Disable-watchdog-during-FDO-train.patch new file mode 100644 index 000000000000..aa33596d87ad --- /dev/null +++ b/0022-Bug-1516081-Disable-watchdog-during-FDO-train.patch @@ -0,0 +1,51 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jan Hubicka <hubicka@ucw.cz> +Date: Sat, 22 Dec 2018 09:32:00 +0200 +Subject: [PATCH] Bug 1516081 - Disable watchdog during FDO train + +Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1516081 +--- + build/moz.configure/lto-pgo.configure | 4 ++-- + toolkit/components/terminator/nsTerminator.cpp | 7 +++++++ + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/build/moz.configure/lto-pgo.configure b/build/moz.configure/lto-pgo.configure +index de7e424326c47799b7a81f3812d5402f24b6a9f3..61310ce33a3897357a7bf75a1317c66744098c13 100644 +--- a/build/moz.configure/lto-pgo.configure ++++ b/build/moz.configure/lto-pgo.configure +@@ -85,7 +85,7 @@ def pgo_flags(compiler, profdata, target_is_windows): + if compiler.type == "gcc": + profile_use = "-fprofile-use" + return namespace( +- gen_cflags=["-fprofile-generate"], ++ gen_cflags=["-fprofile-generate", "-DMOZ_PROFILE_INSTRUMENTATION"], + gen_ldflags=["-fprofile-generate"], + use_cflags=[profile_use, "-fprofile-correction", "-Wcoverage-mismatch"], + use_ldflags=[profile_use], +@@ -99,7 +99,7 @@ def pgo_flags(compiler, profdata, target_is_windows): + else: + gen_ldflags = ["-fprofile-generate"] + +- gen_cflags = [prefix + "-fprofile-generate"] ++ gen_cflags = [prefix + "-fprofile-generate", "-DMOZ_PROFILE_INSTRUMENTATION"] + if target_is_windows: + # native llvm-profdata.exe on Windows can't read profile data + # if name compression is enabled (which cross-compiling enables +diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp +index 3a8f9f4ba63e64695083a70ccfe38cc8baeb7654..b96d9ef138b42fb114d755218c2622b40d6a3bee 100644 +--- a/toolkit/components/terminator/nsTerminator.cpp ++++ b/toolkit/components/terminator/nsTerminator.cpp +@@ -460,6 +460,13 @@ void nsTerminator::StartWatchdog() { + } + #endif + ++ // Disable watchdog for PGO train builds - writting profile information at ++ // exit may take time and it is better to make build hang rather than ++ // silently produce poorly performing binary. ++#ifdef MOZ_PROFILE_INSTRUMENTATION ++ crashAfterMS = INT32_MAX; ++#endif ++ + UniquePtr<Options> options(new Options()); + // crashAfterTicks is guaranteed to be > 0 as + // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >> HEARTBEAT_INTERVAL_MS diff --git a/0006-bmo-1559213-Support-system-av1.patch b/0023-Bug-559213-Support-system-av1.patch index 19b0b8170e88..33e8aa9dab2a 100644 --- a/0006-bmo-1559213-Support-system-av1.patch +++ b/0023-Bug-559213-Support-system-av1.patch @@ -1,24 +1,25 @@ -From 34a104c3cc36d9a4297a51d7b1cf7195c8c28a1d Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann <whissi@gentoo.org> Date: Mon, 6 Apr 2020 19:36:02 +0200 -Subject: [PATCH 06/34] bmo#1559213: Support system av1 +Subject: [PATCH] Bug 559213 - Support system av1 Allow building against system-wide av1. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1559213 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> --- - config/external/moz.build | 5 +++-- - config/system-headers.mozbuild | 8 ++++++++ - dom/media/platforms/moz.build | 5 +++++ - toolkit/moz.configure | 20 ++++++++++++++++++-- - 4 files changed, 34 insertions(+), 4 deletions(-) + config/external/moz.build | 5 +++-- + config/system-headers.mozbuild | 8 ++++++++ + dom/media/platforms/moz.build | 5 +++++ + media/ffvpx/libavcodec/moz.build | 12 ++++++++---- + toolkit/moz.configure | 20 ++++++++++++++++++-- + 5 files changed, 42 insertions(+), 8 deletions(-) diff --git a/config/external/moz.build b/config/external/moz.build -index 6a2ed9e4a2..697bb9d0bf 100644 +index a0877c9d717e84489e19ee532d61df43b8a19889..5caa2036e0ece1404b16c52a31235f12addda08b 100644 --- a/config/external/moz.build +++ b/config/external/moz.build -@@ -46,8 +46,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: +@@ -45,8 +45,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: external_dirs += ["media/libvpx"] if CONFIG["MOZ_AV1"]: @@ -31,10 +32,10 @@ index 6a2ed9e4a2..697bb9d0bf 100644 if not CONFIG["MOZ_SYSTEM_PNG"]: external_dirs += ["media/libpng"] diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild -index 4e3aef0f24..14bd336df4 100644 +index 9c07dba2f456b03cb39e6954369cf94d6b68b333..b2ccfe5a41b1026cde2184b2881754a5a9b455a5 100644 --- a/config/system-headers.mozbuild +++ b/config/system-headers.mozbuild -@@ -1300,6 +1300,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: +@@ -1293,6 +1293,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: 'proxy.h', ] @@ -50,10 +51,10 @@ index 4e3aef0f24..14bd336df4 100644 system_headers += [ 'vpx_mem/vpx_mem.h', diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build -index 16ca8a9cbc..b349dcbe6d 100644 +index c71f22a22eeead703192edfb710cc6113d42c11c..e91f57de9017e74436b03b769f04668d9dc2a869 100644 --- a/dom/media/platforms/moz.build +++ b/dom/media/platforms/moz.build -@@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]: +@@ -80,6 +80,11 @@ if CONFIG["MOZ_AV1"]: "agnostic/AOMDecoder.cpp", "agnostic/DAV1DDecoder.cpp", ] @@ -65,11 +66,34 @@ index 16ca8a9cbc..b349dcbe6d 100644 if CONFIG["MOZ_OMX"]: EXPORTS += [ +diff --git a/media/ffvpx/libavcodec/moz.build b/media/ffvpx/libavcodec/moz.build +index 61d9962a712616cd0f90332b466ecd0d9eff77c3..29b6ede31baddaa3ad8a5e0d98c1ea0b00d27c88 100644 +--- a/media/ffvpx/libavcodec/moz.build ++++ b/media/ffvpx/libavcodec/moz.build +@@ -109,10 +109,14 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']: + 'vp9recon.c', + 'vpx_rac.c', + ] +- USE_LIBS += [ +- 'dav1d', +- 'media_libdav1d_asm', +- ] ++ if CONFIG["MOZ_SYSTEM_AV1"]: ++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] ++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] ++ else: ++ USE_LIBS += [ ++ 'dav1d', ++ 'media_libdav1d_asm', ++ ] + if CONFIG['MOZ_WAYLAND']: + LOCAL_INCLUDES += ['/media/mozva'] + SOURCES += [ diff --git a/toolkit/moz.configure b/toolkit/moz.configure -index d98e748bb9..1e704a4765 100644 +index 78f31128853925cc31d754f8b42c3406ac10079a..daa9bbd9d6bc1df6ae7442e5037ac24379815d86 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure -@@ -544,14 +544,29 @@ def av1(value): +@@ -712,14 +712,29 @@ def av1(value): if value: return True @@ -101,7 +125,7 @@ index d98e748bb9..1e704a4765 100644 def dav1d_nasm(target): if target.cpu in ("x86", "x86_64"): return namespace(version="2.14", what="AV1") -@@ -561,6 +576,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) +@@ -729,6 +744,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) set_define("MOZ_DAV1D_ASM", dav1d_asm) set_config("MOZ_AV1", av1) set_define("MOZ_AV1", av1) @@ -109,30 +133,3 @@ index d98e748bb9..1e704a4765 100644 # JXL Image Codec Support # ============================================================== --- -2.33.1 - -diff --git a/media/ffvpx/libavcodec/moz.build b/media/ffvpx/libavcodec/moz.build -index 0069865..e806fc8 100644 ---- a/media/ffvpx/libavcodec/moz.build -+++ b/media/ffvpx/libavcodec/moz.build -@@ -108,10 +108,14 @@ - 'vp9prob.c', - 'vp9recon.c' - ] -- USE_LIBS += [ -- 'dav1d', -- 'media_libdav1d_asm', -- ] -+ if CONFIG["MOZ_SYSTEM_AV1"]: -+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] -+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] -+ else: -+ USE_LIBS += [ -+ 'dav1d', -+ 'media_libdav1d_asm', -+ ] - if CONFIG['MOZ_WAYLAND']: - LOCAL_INCLUDES += ['/media/mozva'] - SOURCES += [ - diff --git a/0004-bmo-847568-Support-system-harfbuzz.patch b/0024-Bug-847568-Support-system-harfbuzz.patch index d49d9d685f02..fbd0a5095206 100644 --- a/0004-bmo-847568-Support-system-harfbuzz.patch +++ b/0024-Bug-847568-Support-system-harfbuzz.patch @@ -1,7 +1,7 @@ -From 6371b00577970f715fec174eacb32c74a6946f68 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann <whissi@gentoo.org> Date: Mon, 6 Apr 2020 19:32:39 +0200 -Subject: [PATCH 04/34] bmo#847568: Support system harfbuzz +Subject: [PATCH] Bug 847568 - Support system harfbuzz Allow building against system-wide harfbuzz. @@ -21,10 +21,10 @@ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> 10 files changed, 40 insertions(+), 1 deletion(-) diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild -index e060fd2dcc..7178ada497 100644 +index b2ccfe5a41b1026cde2184b2881754a5a9b455a5..4886a4ef96ef739ee795e0309b7783c3f33856fd 100644 --- a/config/system-headers.mozbuild +++ b/config/system-headers.mozbuild -@@ -1236,6 +1236,13 @@ if CONFIG['OS_TARGET'] == 'Android': +@@ -1237,6 +1237,13 @@ if CONFIG['OS_TARGET'] == 'Android': 'vr/gvr/capi/include/gvr.h', ] @@ -39,12 +39,12 @@ index e060fd2dcc..7178ada497 100644 system_headers += [ 'jack/jack.h', diff --git a/dom/base/moz.build b/dom/base/moz.build -index 145f20810f..49453e0d56 100644 +index d4ed2d914eef0e3b52ae559d494ca298e27dc0ca..4f82e8d6e50dd3b47d0909b7125c830850cc8c02 100644 --- a/dom/base/moz.build +++ b/dom/base/moz.build -@@ -562,6 +562,9 @@ FINAL_LIBRARY = "xul" - if CONFIG["MOZ_X11"]: - CXXFLAGS += CONFIG["TK_CFLAGS"] +@@ -596,6 +596,9 @@ FINAL_LIBRARY = "xul" + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] @@ -53,7 +53,7 @@ index 145f20810f..49453e0d56 100644 "UseCounterList.h", script="gen-usecounters.py", diff --git a/gfx/moz.build b/gfx/moz.build -index 4d6d63da9d..8222b72333 100644 +index c09fcbf3cef805b66a2ecab1f7c9f797897c1b6a..4c88ac6ad8cd53d7fcf89722b44ea17c88dd3242 100644 --- a/gfx/moz.build +++ b/gfx/moz.build @@ -10,6 +10,9 @@ with Files("**"): @@ -75,10 +75,10 @@ index 4d6d63da9d..8222b72333 100644 "thebes", "ipc", diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py -index 7d6644f65e..ba37dc9f90 100755 +index 20e29297331b8a268732a3af8255af1066aa5be8..256e68e29253243accdcda7c0558c6667fa4bb29 100755 --- a/gfx/skia/generate_mozbuild.py +++ b/gfx/skia/generate_mozbuild.py -@@ -97,6 +97,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): +@@ -91,6 +91,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] @@ -89,10 +89,10 @@ index 7d6644f65e..ba37dc9f90 100755 LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build -index 4ff948f567..6e920ff27f 100755 +index 52966211bd9639fa29aa6153cc33e855fc803ba6..cdf81adf868d3414447dfb455e151f52c6b6a588 100644 --- a/gfx/skia/moz.build +++ b/gfx/skia/moz.build -@@ -489,6 +489,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): +@@ -487,6 +487,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] @@ -103,24 +103,24 @@ index 4ff948f567..6e920ff27f 100755 LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build -index 3f483d180e..4bb25233e7 100644 +index 176cc3c7e5dba33db636159486b54a71f99b2064..34ac0598acb48e21f866eedff83a22b5f7b244f1 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build -@@ -286,6 +286,9 @@ +@@ -294,6 +294,9 @@ LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] DEFINES["GRAPHITE2_STATIC"] = True +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + - if CONFIG["CC_TYPE"] in ("clang", "clang-cl"): - # Suppress warnings from Skia header files. - SOURCES["gfxPlatform.cpp"].flags += ["-Wno-implicit-fallthrough"] + CXXFLAGS += ["-Werror=switch"] + + include("/tools/fuzzing/libfuzzer-config.mozbuild") diff --git a/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build -index 301eb9a854..7cece5e06c 100644 +index b52920725e4f2937a41cb1f765d88eb2185c4caa..5272100b3e53e7d0d137b6d70442f48d04423cd1 100644 --- a/intl/unicharutil/util/moz.build +++ b/intl/unicharutil/util/moz.build -@@ -25,6 +25,9 @@ UNIFIED_SOURCES += [ +@@ -24,6 +24,9 @@ UNIFIED_SOURCES += [ "nsUnicodeProperties.cpp", ] @@ -131,10 +131,10 @@ index 301eb9a854..7cece5e06c 100644 GeneratedFile( diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build -index 8de4f64777..18ddb4e0b2 100644 +index 66b12fce447547f0cde8d769d9453e441f2b49fa..e61c7237c11a6a55c858eca65b6ca16016f14d4a 100644 --- a/netwerk/dns/moz.build +++ b/netwerk/dns/moz.build -@@ -106,6 +106,9 @@ LOCAL_INCLUDES += [ +@@ -111,4 +111,7 @@ LOCAL_INCLUDES += [ "/netwerk/protocol/http", ] @@ -142,13 +142,11 @@ index 8de4f64777..18ddb4e0b2 100644 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + USE_LIBS += ["icu"] - - if CONFIG["CC_TYPE"] in ("clang", "gcc"): diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build -index 2c3f86948e..dd6901ba9a 100644 +index 0f9d7e95bf46b678246907efc93ef32fe13adf38..a6c079d252d153041db3ee13d0f1031e4c795d70 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build -@@ -260,6 +260,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]: +@@ -291,6 +291,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]: "-lgvr", ] @@ -159,11 +157,11 @@ index 2c3f86948e..dd6901ba9a 100644 OS_LIBS += CONFIG["MOZ_JPEG_LIBS"] diff --git a/toolkit/moz.configure b/toolkit/moz.configure -index f63780b892..fb1c48abc3 100644 +index daa9bbd9d6bc1df6ae7442e5037ac24379815d86..98cc8c2fb173ba3b5b70beafce37c11a037ca1a1 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure -@@ -460,6 +460,15 @@ add_old_configure_assignment( - ) +@@ -629,6 +629,15 @@ def freetype2_combined_info(fontconfig_info, freetype2_info): + set_define("MOZ_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True)) +# HarfBuzz @@ -178,6 +176,3 @@ index f63780b892..fb1c48abc3 100644 # Apple platform decoder support # ============================================================== @depends(toolkit) --- -2.33.1 - diff --git a/0005-bmo-847568-Support-system-graphite2.patch b/0025-Bug-847568-Support-system-graphite2.patch index aec3a5cdb843..3459e5313a5b 100644 --- a/0005-bmo-847568-Support-system-graphite2.patch +++ b/0025-Bug-847568-Support-system-graphite2.patch @@ -1,7 +1,7 @@ -From 5d03cddd1c0d8eb7acef44ff7272176d33e6be51 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann <whissi@gentoo.org> Date: Mon, 6 Apr 2020 19:34:44 +0200 -Subject: [PATCH 05/34] bmo#847568: Support system graphite2 +Subject: [PATCH] Bug 847568 - Support system graphite2 Allow building against system-wide graphite2. @@ -20,10 +20,10 @@ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> create mode 100644 gfx/graphite2/geckoextra/moz.build diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild -index 7178ada497..4e3aef0f24 100644 +index 4886a4ef96ef739ee795e0309b7783c3f33856fd..004f941135a7d1045a697182b269063f2b38ff70 100644 --- a/config/system-headers.mozbuild +++ b/config/system-headers.mozbuild -@@ -1243,6 +1243,12 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']: +@@ -1244,6 +1244,12 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']: 'harfbuzz/hb.h', ] @@ -38,7 +38,7 @@ index 7178ada497..4e3aef0f24 100644 'jack/jack.h', diff --git a/gfx/graphite2/geckoextra/moz.build b/gfx/graphite2/geckoextra/moz.build new file mode 100644 -index 0000000000..24e8d7a032 +index 0000000000000000000000000000000000000000..24e8d7a03274aa43ddbd64b4e740a476244b0bf0 --- /dev/null +++ b/gfx/graphite2/geckoextra/moz.build @@ -0,0 +1,21 @@ @@ -64,7 +64,7 @@ index 0000000000..24e8d7a032 + +FINAL_LIBRARY = 'gkmedias' diff --git a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh -index b91d9c161c..a97e6eb203 100755 +index b91d9c161cc71e89024dad9fd87e358a147d3593..a97e6eb20322f952bd504b51faf92dc72735e943 100755 --- a/gfx/graphite2/moz-gr-update.sh +++ b/gfx/graphite2/moz-gr-update.sh @@ -1,6 +1,7 @@ @@ -94,7 +94,7 @@ index b91d9c161c..a97e6eb203 100755 echo echo If gfx/graphite2/src/files.mk has changed, please make corresponding diff --git a/gfx/moz.build b/gfx/moz.build -index 8222b72333..16a2b401db 100644 +index 4c88ac6ad8cd53d7fcf89722b44ea17c88dd3242..f77097768a99a49c0aba9dbe96e67aca8e2beda5 100644 --- a/gfx/moz.build +++ b/gfx/moz.build @@ -10,6 +10,11 @@ with Files("**"): @@ -118,10 +118,10 @@ index 8222b72333..16a2b401db 100644 "thebes", "ipc", diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build -index 4bb25233e7..a2dd99ceb4 100644 +index 34ac0598acb48e21f866eedff83a22b5f7b244f1..a2f8bed555d8c95ad9d3b8d460d65e8f91876510 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build -@@ -285,7 +285,10 @@ if CONFIG["MOZ_WAYLAND"]: +@@ -292,7 +292,10 @@ if CONFIG["MOZ_WAYLAND"]: LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] @@ -134,12 +134,12 @@ index 4bb25233e7..a2dd99ceb4 100644 if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] diff --git a/old-configure.in b/old-configure.in -index 1707e98471..95098e4638 100644 +index 4050cd65514b38e561751f7010d45438d2e7d5e4..aceb744de1de9044ee380528c053d958e1b037ca 100644 --- a/old-configure.in +++ b/old-configure.in -@@ -2204,6 +2204,27 @@ if test "$USE_FC_FREETYPE"; then - fi - fi +@@ -1185,6 +1185,27 @@ fi + AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID) + AC_SUBST(MOZ_MACBUNDLE_ID) +dnl ======================================================== +dnl Check for graphite2 @@ -163,13 +163,13 @@ index 1707e98471..95098e4638 100644 +fi + dnl ======================================================== - dnl Check if we need the 32-bit Linux SSE2 error dialog + dnl = Child Process Name for IPC dnl ======================================================== diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build -index dd6901ba9a..be73ac4bee 100644 +index a6c079d252d153041db3ee13d0f1031e4c795d70..32c8208306be5fc2302686e681ef576e30326241 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build -@@ -260,6 +260,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]: +@@ -291,6 +291,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]: "-lgvr", ] @@ -180,11 +180,11 @@ index dd6901ba9a..be73ac4bee 100644 OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"] diff --git a/toolkit/moz.configure b/toolkit/moz.configure -index fb1c48abc3..d98e748bb9 100644 +index 98cc8c2fb173ba3b5b70beafce37c11a037ca1a1..e2e0bc4063d460fd4a21bde7278bc26845a048ed 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure -@@ -460,6 +460,19 @@ add_old_configure_assignment( - ) +@@ -629,6 +629,19 @@ def freetype2_combined_info(fontconfig_info, freetype2_info): + set_define("MOZ_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True)) +# Graphite2 @@ -203,6 +203,3 @@ index fb1c48abc3..d98e748bb9 100644 # HarfBuzz # ============================================================== option('--with-system-harfbuzz', help="Use system harfbuzz (located with pkgconfig)") --- -2.33.1 - diff --git a/5022efe33088.patch b/0026-Bug-1611386-Reenable-support-for-enable-system-sqlit.patch index 9c12394f9472..f1a4f4c63bd9 100644 --- a/5022efe33088.patch +++ b/0026-Bug-1611386-Reenable-support-for-enable-system-sqlit.patch @@ -1,7 +1,33 @@ -diff -r 8753b16d88a2 browser/installer/package-manifest.in ---- a/browser/installer/package-manifest.in Sat Mar 05 00:24:48 2022 +0000 -+++ b/browser/installer/package-manifest.in Sun Mar 06 15:04:56 2022 +0200 -@@ -139,9 +139,11 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com> +Date: Mon, 6 Mar 2023 05:17:15 +0200 +Subject: [PATCH] Bug 1611386 - Reenable support for --enable-system-sqlite +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Revert "Bug 1611386 - Drop support for --enable-system-sqlite. r=asuth,glandium" + +This reverts commit b5b6473a6d6d59e1361e529db9b8b6e1f7448f29. + +Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com> +--- + browser/installer/package-manifest.in | 2 ++ + config/external/sqlite/moz.build | 22 +++++++++------ + storage/SQLiteMutex.h | 6 ++-- + storage/moz.build | 6 ++++ + storage/mozStorageConnection.cpp | 4 +++ + storage/mozStorageService.cpp | 39 ++++++++++++++++++++++++++ + third_party/sqlite3/src/moz.build | 2 ++ + third_party/sqlite3/src/sqlite.symbols | 1 + + toolkit/moz.configure | 14 +++++++++ + 9 files changed, 84 insertions(+), 12 deletions(-) + +diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in +index 9229a0bd0e041815331aaf2973afda22c007423d..42e26fafdf7e90a5fbda3d798d1e1d807a5b4a69 100644 +--- a/browser/installer/package-manifest.in ++++ b/browser/installer/package-manifest.in +@@ -143,9 +143,11 @@ @RESPATH@/update-settings.ini #endif @RESPATH@/platform.ini @@ -13,69 +39,44 @@ diff -r 8753b16d88a2 browser/installer/package-manifest.in @BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@ #ifdef MOZ_FFVPX @BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@ -diff -r 8753b16d88a2 config/external/sqlite/moz.build ---- a/config/external/sqlite/moz.build Sat Mar 05 00:24:48 2022 +0000 -+++ b/config/external/sqlite/moz.build Sun Mar 06 15:04:56 2022 +0200 -@@ -4,15 +4,18 @@ +diff --git a/config/external/sqlite/moz.build b/config/external/sqlite/moz.build +index 6294924c564ae8c2ebc0033895be91069179fcd2..b978fd9caba375242de1be25072b251461010044 100644 +--- a/config/external/sqlite/moz.build ++++ b/config/external/sqlite/moz.build +@@ -4,15 +4,19 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -DIRS += ["../../../third_party/sqlite3/src"] -if CONFIG["MOZ_FOLD_LIBS"]: -- Library("sqlite") ++if CONFIG["MOZ_SYSTEM_SQLITE"]: + Library("sqlite") - # When folding libraries, sqlite is actually in the nss library. - USE_LIBS += [ - "nss", - ] -+if CONFIG['MOZ_SYSTEM_SQLITE']: -+ Library('sqlite') -+ OS_LIBS += CONFIG['SQLITE_LIBS'] ++ OS_LIBS += CONFIG["SQLITE_LIBS"] else: - SharedLibrary("sqlite") - SHARED_LIBRARY_NAME = "mozsqlite3" -- -- SYMBOLS_FILE = "/third_party/sqlite3/src/sqlite.symbols" -+ if CONFIG['MOZ_FOLD_LIBS']: -+ Library('sqlite') ++ DIRS += ["../../../third_party/sqlite3/src"] ++ if CONFIG["MOZ_FOLD_LIBS"]: ++ Library("sqlite") + # When folding libraries, sqlite is actually in the nss library. + USE_LIBS += [ -+ 'nss', ++ "nss", + ] + else: -+ SharedLibrary('sqlite') -+ SHARED_LIBRARY_NAME = 'mozsqlite3' -+ SYMBOLS_FILE = '/third_party/sqlite3/src/sqlite.symbols' -+ - -diff -r 0f0ba6e8029d toolkit/moz.configure ---- a/toolkit/moz.configure Sat Feb 05 20:57:50 2022 +0000 -+++ b/toolkit/moz.configure Sun Mar 06 17:23:39 2022 +0200 -@@ -237,6 +237,21 @@ - set_config("MOZ_AUDIOUNIT_RUST", True, when=enable_audiounit_rust) - set_define("MOZ_AUDIOUNIT_RUST", True, when=enable_audiounit_rust) ++ SharedLibrary("sqlite") ++ SHARED_LIBRARY_NAME = "mozsqlite3" -+ -+# SQLite -+# ============================================================== -+option('--with-system-sqlite', help="Use system sqlite (located with pkgconfig") -+ -+@depends('--with-system-sqlite') -+def check_for_sqlite(value): -+ return bool(value) -+ -+system_sqlite = pkg_check_modules('SQLITE', 'sqlite3', -+ when=check_for_sqlite) -+ -+set_config('MOZ_SYSTEM_SQLITE', depends_if(system_sqlite)(lambda _: True)) -+set_define('MOZ_SYSTEM_SQLITE', depends_if(system_sqlite)(lambda _: True)) -+ - # Javascript engine - # ============================================================== - include("../js/moz.configure") -diff -r 8753b16d88a2 storage/SQLiteMutex.h ---- a/storage/SQLiteMutex.h Sat Mar 05 00:24:48 2022 +0000 -+++ b/storage/SQLiteMutex.h Sun Mar 06 15:04:56 2022 +0200 -@@ -56,7 +56,7 @@ +- SYMBOLS_FILE = "/third_party/sqlite3/src/sqlite.symbols" ++ SYMBOLS_FILE = "/third_party/sqlite3/src/sqlite.symbols" +diff --git a/storage/SQLiteMutex.h b/storage/SQLiteMutex.h +index b7198b1912fdc8d1182a445421aec3450474c23d..3ecc0bb997cf376e996bff2d9c184ecffc78b4be 100644 +--- a/storage/SQLiteMutex.h ++++ b/storage/SQLiteMutex.h +@@ -56,7 +56,7 @@ class SQLiteMutex : private BlockingResourceBase { */ void lock() { MOZ_ASSERT(mMutex, "No mutex associated with this wrapper!"); @@ -84,7 +85,7 @@ diff -r 8753b16d88a2 storage/SQLiteMutex.h // While SQLite Mutexes may be recursive, in our own code we do not want to // treat them as such. CheckAcquire(); -@@ -64,7 +64,7 @@ +@@ -64,7 +64,7 @@ class SQLiteMutex : private BlockingResourceBase { ::sqlite3_mutex_enter(mMutex); @@ -93,7 +94,7 @@ diff -r 8753b16d88a2 storage/SQLiteMutex.h Acquire(); // Call is protected by us holding the mutex. #endif } -@@ -74,7 +74,7 @@ +@@ -74,7 +74,7 @@ class SQLiteMutex : private BlockingResourceBase { */ void unlock() { MOZ_ASSERT(mMutex, "No mutex associated with this wrapper!"); @@ -102,10 +103,11 @@ diff -r 8753b16d88a2 storage/SQLiteMutex.h // While SQLite Mutexes may be recursive, in our own code we do not want to // treat them as such. Release(); // Call is protected by us holding the mutex. -diff -r 8753b16d88a2 storage/moz.build ---- a/storage/moz.build Sat Mar 05 00:24:48 2022 +0000 -+++ b/storage/moz.build Sun Mar 06 15:04:56 2022 +0200 -@@ -99,6 +99,12 @@ +diff --git a/storage/moz.build b/storage/moz.build +index 3d8b15e9c7f3f67bc61ffc72db5f28fe2f44ba06..7cbecf3314b61179db355f80c5cc3d9de75eb4ab 100644 +--- a/storage/moz.build ++++ b/storage/moz.build +@@ -100,6 +100,12 @@ if CONFIG["MOZ_THUNDERBIRD"] or CONFIG["MOZ_SUITE"]: # will need to change it here as well. DEFINES["SQLITE_MAX_LIKE_PATTERN_LENGTH"] = 50000 @@ -118,10 +120,11 @@ diff -r 8753b16d88a2 storage/moz.build LOCAL_INCLUDES += [ "/dom/base", "/third_party/sqlite3/src", -diff -r 8753b16d88a2 storage/mozStorageConnection.cpp ---- a/storage/mozStorageConnection.cpp Sat Mar 05 00:24:48 2022 +0000 -+++ b/storage/mozStorageConnection.cpp Sun Mar 06 15:04:56 2022 +0200 -@@ -877,6 +877,10 @@ +diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp +index 0f0d76839114d22eef341190b982ad4f386909ae..bce31015580acd68ba90ea1d5efef1bb18a40d6b 100644 +--- a/storage/mozStorageConnection.cpp ++++ b/storage/mozStorageConnection.cpp +@@ -869,6 +869,10 @@ nsresult Connection::initializeInternal() { return convertResultCode(srv); } @@ -132,9 +135,10 @@ diff -r 8753b16d88a2 storage/mozStorageConnection.cpp // Register our built-in SQL functions. srv = registerFunctions(mDBConn); if (srv != SQLITE_OK) { -diff -r 8753b16d88a2 storage/mozStorageService.cpp ---- a/storage/mozStorageService.cpp Sat Mar 05 00:24:48 2022 +0000 -+++ b/storage/mozStorageService.cpp Sun Mar 06 15:04:56 2022 +0200 +diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp +index 73cf85ff197d877d42a60f4c7606ac4ca43d3ab5..e1cc43d9c060517c8b385c15ba6dab8ffb61bd9c 100644 +--- a/storage/mozStorageService.cpp ++++ b/storage/mozStorageService.cpp @@ -35,6 +35,20 @@ using mozilla::intl::Collator; @@ -156,7 +160,7 @@ diff -r 8753b16d88a2 storage/mozStorageService.cpp namespace mozilla { namespace storage { -@@ -167,6 +181,31 @@ +@@ -167,6 +181,31 @@ already_AddRefed<Service> Service::getSingleton() { return do_AddRef(gService); } @@ -188,10 +192,11 @@ diff -r 8753b16d88a2 storage/mozStorageService.cpp // The first reference to the storage service must be obtained on the // main thread. NS_ENSURE_TRUE(NS_IsMainThread(), nullptr); -diff -r 8753b16d88a2 third_party/sqlite3/src/moz.build ---- a/third_party/sqlite3/src/moz.build Sat Mar 05 00:24:48 2022 +0000 -+++ b/third_party/sqlite3/src/moz.build Sun Mar 06 15:04:56 2022 +0200 -@@ -79,6 +79,7 @@ +diff --git a/third_party/sqlite3/src/moz.build b/third_party/sqlite3/src/moz.build +index 0742b37700999fac57077eebaae21f1c94ea3990..6c03d19006088448e91b57af42d18e2236ecc208 100644 +--- a/third_party/sqlite3/src/moz.build ++++ b/third_party/sqlite3/src/moz.build +@@ -79,6 +79,7 @@ DEFINES['SQLITE_OMIT_BUILTIN_TEST'] = True # Try to use a MEMORY temp store when possible. That allows for better # performance and doesn't suffer from a full separate tmp partition. # Exclude 32bit platforms due to address space fragmentation issues. @@ -199,7 +204,7 @@ diff -r 8753b16d88a2 third_party/sqlite3/src/moz.build if CONFIG['OS_TARGET'] == 'Android': # On Android there's no tmp partition, so always use a MEMORY temp store. DEFINES['SQLITE_TEMP_STORE'] = 3 -@@ -88,6 +89,7 @@ +@@ -88,6 +89,7 @@ elif CONFIG['HAVE_64BIT_BUILD']: # Change the default temp files prefix, to easily distinguish files we created # vs files created by other Sqlite instances in the system. @@ -207,10 +212,11 @@ diff -r 8753b16d88a2 third_party/sqlite3/src/moz.build DEFINES['SQLITE_TEMP_FILE_PREFIX'] = '"mz_etilqs_"' # Enabling sqlite math functions -diff -r 8753b16d88a2 third_party/sqlite3/src/sqlite.symbols ---- a/third_party/sqlite3/src/sqlite.symbols Sat Mar 05 00:24:48 2022 +0000 -+++ b/third_party/sqlite3/src/sqlite.symbols Sun Mar 06 15:04:56 2022 +0200 -@@ -38,6 +38,7 @@ +diff --git a/third_party/sqlite3/src/sqlite.symbols b/third_party/sqlite3/src/sqlite.symbols +index 4ee20bc0d53556e9713f49f9b70ee30b45a138f8..903d6b29f62528b6ecd762ef69fb5f206cc87fde 100644 +--- a/third_party/sqlite3/src/sqlite.symbols ++++ b/third_party/sqlite3/src/sqlite.symbols +@@ -39,6 +39,7 @@ sqlite3_column_text16 sqlite3_column_type sqlite3_column_value sqlite3_commit_hook @@ -218,3 +224,28 @@ diff -r 8753b16d88a2 third_party/sqlite3/src/sqlite.symbols sqlite3_complete sqlite3_complete16 sqlite3_config +diff --git a/toolkit/moz.configure b/toolkit/moz.configure +index e2e0bc4063d460fd4a21bde7278bc26845a048ed..be091370a786c902a736a2950c01a0c50bc30748 100644 +--- a/toolkit/moz.configure ++++ b/toolkit/moz.configure +@@ -378,6 +378,20 @@ sndio = pkg_check_modules("MOZ_SNDIO", "sndio", when="--enable-sndio") + + set_config("MOZ_SNDIO", depends_if(sndio)(lambda _: True)) + ++# SQLite ++# ============================================================== ++option('--with-system-sqlite', help="Use system sqlite (located with pkgconfig") ++ ++@depends('--with-system-sqlite') ++def check_for_sqlite(value): ++ return bool(value) ++ ++system_sqlite = pkg_check_modules('SQLITE', 'sqlite3', ++ when=check_for_sqlite) ++ ++set_config('MOZ_SYSTEM_SQLITE', depends_if(system_sqlite)(lambda _: True)) ++set_define('MOZ_SYSTEM_SQLITE', depends_if(system_sqlite)(lambda _: True)) ++ + # Javascript engine + # ============================================================== + include("../js/moz.configure") diff --git a/unity-menubar.patch b/0027-Bug-1419151-Add-Unity-menubar-support.patch index d58efccc5e8b..eb1ddf06858b 100644 --- a/unity-menubar.patch +++ b/0027-Bug-1419151-Add-Unity-menubar-support.patch @@ -1,3 +1,72 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Chris Coulson <chrisccoulson@ubuntu.com> +Date: Wed, 26 Apr 2017 00:48:46 +0300 +Subject: [PATCH] Bug 1419151 - Add Unity menubar support + +--- + browser/base/content/browser-menubar.inc | 7 +- + browser/base/content/browser.js | 7 + + .../components/places/content/places.xhtml | 1 + + dom/xul/XULPopupElement.cpp | 9 + + dom/xul/moz.build | 5 + + layout/build/moz.build | 4 + + modules/libpref/init/all.js | 3 + + toolkit/content/xul.css | 7 + + widget/gtk/NativeMenuSupport.cpp | 11 +- + widget/gtk/NativeMenuSupport.h | 31 + + widget/gtk/components.conf | 8 + + widget/gtk/moz.build | 10 + + widget/gtk/nsDbusmenu.cpp | 61 ++ + widget/gtk/nsDbusmenu.h | 101 +++ + widget/gtk/nsMenu.cpp | 795 ++++++++++++++++++ + widget/gtk/nsMenu.h | 123 +++ + widget/gtk/nsMenuBar.cpp | 548 ++++++++++++ + widget/gtk/nsMenuBar.h | 111 +++ + widget/gtk/nsMenuContainer.cpp | 170 ++++ + widget/gtk/nsMenuContainer.h | 70 ++ + widget/gtk/nsMenuItem.cpp | 766 +++++++++++++++++ + widget/gtk/nsMenuItem.h | 80 ++ + widget/gtk/nsMenuObject.cpp | 664 +++++++++++++++ + widget/gtk/nsMenuObject.h | 169 ++++ + widget/gtk/nsMenuSeparator.cpp | 82 ++ + widget/gtk/nsMenuSeparator.h | 37 + + widget/gtk/nsNativeMenuDocListener.cpp | 347 ++++++++ + widget/gtk/nsNativeMenuDocListener.h | 152 ++++ + widget/gtk/nsNativeMenuService.cpp | 478 +++++++++++ + widget/gtk/nsNativeMenuService.h | 85 ++ + widget/gtk/nsWindow.cpp | 4 + + widget/gtk/nsWindow.h | 6 + + widget/moz.build | 5 + + widget/nsINativeMenuService.h | 39 + + widget/nsWidgetsCID.h | 8 + + xpcom/ds/NativeMenuAtoms.py | 9 + + xpcom/ds/StaticAtoms.py | 3 +- + xpfe/appshell/AppWindow.cpp | 2 +- + 38 files changed, 5014 insertions(+), 4 deletions(-) + create mode 100644 widget/gtk/NativeMenuSupport.h + create mode 100644 widget/gtk/nsDbusmenu.cpp + create mode 100644 widget/gtk/nsDbusmenu.h + create mode 100644 widget/gtk/nsMenu.cpp + create mode 100644 widget/gtk/nsMenu.h + create mode 100644 widget/gtk/nsMenuBar.cpp + create mode 100644 widget/gtk/nsMenuBar.h + create mode 100644 widget/gtk/nsMenuContainer.cpp + create mode 100644 widget/gtk/nsMenuContainer.h + create mode 100644 widget/gtk/nsMenuItem.cpp + create mode 100644 widget/gtk/nsMenuItem.h + create mode 100644 widget/gtk/nsMenuObject.cpp + create mode 100644 widget/gtk/nsMenuObject.h + create mode 100644 widget/gtk/nsMenuSeparator.cpp + create mode 100644 widget/gtk/nsMenuSeparator.h + create mode 100644 widget/gtk/nsNativeMenuDocListener.cpp + create mode 100644 widget/gtk/nsNativeMenuDocListener.h + create mode 100644 widget/gtk/nsNativeMenuService.cpp + create mode 100644 widget/gtk/nsNativeMenuService.h + create mode 100644 widget/nsINativeMenuService.h + create mode 100644 xpcom/ds/NativeMenuAtoms.py + +diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc +index 443c9fa5a5420098226a1a6144a44781c4bf92f8..60b8a311912d83bcf23e5e34698c4951023cfc48 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -7,7 +7,12 @@ @@ -14,9 +83,11 @@ this.setAttribute('openedwithkey', event.target.parentNode.openedWithKey);" #endif +diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js +index 5b846c657b2864c6951d343a62f8ae70d823d1b4..76a8f72df1daa231136e2187269785c2290985b4 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js -@@ -6466,11 +6466,18 @@ function onViewToolbarsPopupShowing(aEve +@@ -6534,11 +6534,18 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) { MozXULElement.insertFTLIfNeeded("browser/toolbarContextMenu.ftl"); let firstMenuItem = aInsertPoint || popup.firstElementChild; let toolbarNodes = gNavToolbox.querySelectorAll("toolbar"); @@ -35,9 +106,11 @@ if (toolbar.id == "PersonalToolbar") { let menu = BookmarkingUI.buildBookmarksToolbarSubmenu(toolbar); popup.insertBefore(menu, firstMenuItem); +diff --git a/browser/components/places/content/places.xhtml b/browser/components/places/content/places.xhtml +index 4ab16218d469dfe679a04a6b1f1d12935bf7bc44..3d010c5ca233e6a1fe4d6077bd28537465de0c19 100644 --- a/browser/components/places/content/places.xhtml +++ b/browser/components/places/content/places.xhtml -@@ -165,6 +165,7 @@ +@@ -169,6 +169,7 @@ #else <menubar id="placesMenu"> <menu class="menu-iconic" data-l10n-id="places-organize-button" @@ -45,9 +118,11 @@ #endif id="organizeButton"> <menupopup id="organizeButtonPopup"> +diff --git a/dom/xul/XULPopupElement.cpp b/dom/xul/XULPopupElement.cpp +index c329526a3f418092eed614fe5dab5b61713ea142..85fab2f1f056238d6fc75ececcc1f02c47ce693a 100644 --- a/dom/xul/XULPopupElement.cpp +++ b/dom/xul/XULPopupElement.cpp -@@ -208,6 +208,10 @@ void XULPopupElement::GetState(nsString& +@@ -241,6 +241,10 @@ void XULPopupElement::GetState(nsString& aState) { // set this here in case there's no frame for the popup aState.AssignLiteral("closed"); @@ -58,7 +133,7 @@ if (nsXULPopupManager* pm = nsXULPopupManager::GetInstance()) { switch (pm->GetPopupState(this)) { case ePopupShown: -@@ -230,6 +234,11 @@ void XULPopupElement::GetState(nsString& +@@ -263,6 +267,11 @@ void XULPopupElement::GetState(nsString& aState) { break; } } @@ -70,9 +145,11 @@ } nsINode* XULPopupElement::GetTriggerNode() const { +diff --git a/dom/xul/moz.build b/dom/xul/moz.build +index 6057c71aa56d9cc7ceac3e0a6fbe29ef4761e953..a24f53f657a8737b569c0dbb49b348b5325db8af 100644 --- a/dom/xul/moz.build +++ b/dom/xul/moz.build -@@ -82,4 +82,9 @@ LOCAL_INCLUDES += [ +@@ -91,4 +91,9 @@ LOCAL_INCLUDES += [ include("/ipc/chromium/chromium-config.mozbuild") @@ -82,9 +159,11 @@ + ] + FINAL_LIBRARY = "xul" +diff --git a/layout/build/moz.build b/layout/build/moz.build +index c7869a01a373d2708e7b467f6c287b44712679bd..2cbdb021b3b7ea742e7505ef3ae046cdc33e6144 100644 --- a/layout/build/moz.build +++ b/layout/build/moz.build -@@ -70,6 +70,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "an +@@ -70,6 +70,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": "/dom/system", "/dom/system/android", ] @@ -95,9 +174,11 @@ XPCOM_MANIFESTS += [ "components.conf", +diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js +index 35dc85223333f510b7dd7b96739738b0f8a1629a..c339b67928703b479a2c3b985ee8b0e3975ff499 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js -@@ -311,6 +311,9 @@ pref("dom.mouseevent.click.hack.use_lega +@@ -183,6 +183,9 @@ pref("dom.text-recognition.enabled", true); // Fastback caching - if this pref is negative, then we calculate the number // of content viewers to cache based on the amount of available memory. pref("browser.sessionhistory.max_total_viewers", -1); @@ -107,9 +188,11 @@ pref("browser.display.force_inline_alttext", false); // true = force ALT text for missing images to be layed out inline // 0 = no external leading, +diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css +index 8fc0ec1d5c3db655b7f43461e37d791744c5f777..54c3f7d0dd23b0d09585b0bf30116b8090d0b466 100644 --- a/toolkit/content/xul.css +++ b/toolkit/content/xul.css -@@ -229,6 +229,13 @@ toolbox { +@@ -329,6 +329,13 @@ toolbox { } } @@ -123,9 +206,96 @@ toolbarspring { -moz-box-flex: 1000; } +diff --git a/widget/gtk/NativeMenuSupport.cpp b/widget/gtk/NativeMenuSupport.cpp +index 4360867fff3f849fa6bdec31f05ddbfe60777180..c3a69f31b1d310340a2546da541dda544a8056d3 100644 +--- a/widget/gtk/NativeMenuSupport.cpp ++++ b/widget/gtk/NativeMenuSupport.cpp +@@ -7,6 +7,8 @@ + + #include "MainThreadUtils.h" + #include "NativeMenuGtk.h" ++#include "nsINativeMenuService.h" ++#include "nsServiceManagerUtils.h" + + namespace mozilla::widget { + +@@ -14,7 +16,14 @@ void NativeMenuSupport::CreateNativeMenuBar(nsIWidget* aParent, + dom::Element* aMenuBarElement) { + MOZ_RELEASE_ASSERT(NS_IsMainThread(), + "Attempting to create native menu bar on wrong thread!"); +- // TODO ++ ++ nsCOMPtr<nsINativeMenuService> nms = ++ do_GetService("@mozilla.org/widget/nativemenuservice;1"); ++ if (!nms) { ++ return; ++ } ++ ++ nms->CreateNativeMenuBar(aParent, aMenuBarElement); + } + + already_AddRefed<NativeMenu> NativeMenuSupport::CreateNativeContextMenu( +diff --git a/widget/gtk/NativeMenuSupport.h b/widget/gtk/NativeMenuSupport.h +new file mode 100644 +index 0000000000000000000000000000000000000000..0843d45185e51f6f59ded657cb57ac0d6a456e5e +--- /dev/null ++++ b/widget/gtk/NativeMenuSupport.h +@@ -0,0 +1,31 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef mozilla_widget_NativeMenuSupport_h ++#define mozilla_widget_NativeMenuSupport_h ++ ++class nsIWidget; ++ ++namespace mozilla { ++ ++namespace dom { ++class Element; ++} ++ ++namespace widget { ++ ++class NativeMenuSupport final { ++public: ++ // Given a top-level window widget and a menu bar DOM node, sets up native ++ // menus. Once created, native menus are controlled via the DOM, including ++ // destruction. ++ static void CreateNativeMenuBar(nsIWidget* aParent, ++ dom::Element* aMenuBarElement); ++}; ++ ++} // namespace widget ++} // namespace mozilla ++ ++#endif // mozilla_widget_NativeMenuSupport_h +diff --git a/widget/gtk/components.conf b/widget/gtk/components.conf +index a2759a3c45cc020f54799ce61151dd45c03210fd..17c040e3ef6c2ddf2d876b3b5954ca8d70a26839 100644 +--- a/widget/gtk/components.conf ++++ b/widget/gtk/components.conf +@@ -115,6 +115,14 @@ Classes = [ + 'headers': ['/widget/gtk/nsUserIdleServiceGTK.h'], + 'constructor': 'nsUserIdleServiceGTK::GetInstance', + }, ++ { ++ 'cid': '{0b3fe5aa-bc72-4303-85ae-76365df1251d}', ++ 'contract_ids': ['@mozilla.org/widget/nativemenuservice;1'], ++ 'singleton': True, ++ 'type': 'nsNativeMenuService', ++ 'constructor': 'nsNativeMenuService::GetInstanceForServiceManager', ++ 'headers': ['/widget/gtk/nsNativeMenuService.h'], ++ }, + ] + + if defined('NS_PRINTING'): +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index ab248309f25071ceeaec108797dcc62f905c84d8..d60d1995b27850009faccbb98351bf6fe9f7b802 100644 --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -77,6 +77,15 @@ UNIFIED_SOURCES += [ +@@ -78,6 +78,15 @@ UNIFIED_SOURCES += [ SOURCES += [ "MediaKeysEventSourceFactory.cpp", @@ -141,7 +311,7 @@ "nsNativeThemeGTK.cpp", # conflicts with X11 headers "nsWindow.cpp", # conflicts with X11 headers "WaylandVsyncSource.cpp", # conflicts with X11 headers -@@ -152,6 +161,7 @@ LOCAL_INCLUDES += [ +@@ -149,6 +158,7 @@ LOCAL_INCLUDES += [ "/layout/base", "/layout/forms", "/layout/generic", @@ -149,6 +319,9 @@ "/layout/xul", "/other-licenses/atk-1.0", "/third_party/cups/include", +diff --git a/widget/gtk/nsDbusmenu.cpp b/widget/gtk/nsDbusmenu.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..f3a1c4400bf225263069fab67674078f666c3e3a --- /dev/null +++ b/widget/gtk/nsDbusmenu.cpp @@ -0,0 +1,61 @@ @@ -213,6 +386,9 @@ + + return NS_OK; +} +diff --git a/widget/gtk/nsDbusmenu.h b/widget/gtk/nsDbusmenu.h +new file mode 100644 +index 0000000000000000000000000000000000000000..8d46a0d27bdbd403588cc75b19256e0149d8edf5 --- /dev/null +++ b/widget/gtk/nsDbusmenu.h @@ -0,0 +1,101 @@ @@ -317,6 +493,9 @@ +#define dbusmenu_menuitem_property_set_shortcut nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_shortcut + +#endif /* __nsDbusmenu_h__ */ +diff --git a/widget/gtk/nsMenu.cpp b/widget/gtk/nsMenu.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..255eb390e577d59da2d05baf274e460b2c484ced --- /dev/null +++ b/widget/gtk/nsMenu.cpp @@ -0,0 +1,795 @@ @@ -1115,6 +1294,9 @@ + true); +} + +diff --git a/widget/gtk/nsMenu.h b/widget/gtk/nsMenu.h +new file mode 100644 +index 0000000000000000000000000000000000000000..40244d0122901dc77aa4c709e5a66efa5a358e4a --- /dev/null +++ b/widget/gtk/nsMenu.h @@ -0,0 +1,123 @@ @@ -1241,6 +1423,9 @@ +}; + +#endif /* __nsMenu_h__ */ +diff --git a/widget/gtk/nsMenuBar.cpp b/widget/gtk/nsMenuBar.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..0dcae67943292aeb5d70dfbe652fb95191040484 --- /dev/null +++ b/widget/gtk/nsMenuBar.cpp @@ -0,0 +1,548 @@ @@ -1792,6 +1977,9 @@ + DocListener()->Stop(); + DisconnectDocumentEventListeners(); +} +diff --git a/widget/gtk/nsMenuBar.h b/widget/gtk/nsMenuBar.h +new file mode 100644 +index 0000000000000000000000000000000000000000..7a04316330c1926ea3aabed72b5ae379814be2fc --- /dev/null +++ b/widget/gtk/nsMenuBar.h @@ -0,0 +1,111 @@ @@ -1906,6 +2094,9 @@ +}; + +#endif /* __nsMenuBar_h__ */ +diff --git a/widget/gtk/nsMenuContainer.cpp b/widget/gtk/nsMenuContainer.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..f419201f6338bc0e91539693a1c61812de0afa08 --- /dev/null +++ b/widget/gtk/nsMenuContainer.cpp @@ -0,0 +1,170 @@ @@ -2079,6 +2270,9 @@ + + return aContent; +} +diff --git a/widget/gtk/nsMenuContainer.h b/widget/gtk/nsMenuContainer.h +new file mode 100644 +index 0000000000000000000000000000000000000000..b7e8fa8db46fb1bfdb94ee0b04a69630f962e1c2 --- /dev/null +++ b/widget/gtk/nsMenuContainer.h @@ -0,0 +1,70 @@ @@ -2152,6 +2346,9 @@ +}; + +#endif /* __nsMenuContainer_h__ */ +diff --git a/widget/gtk/nsMenuItem.cpp b/widget/gtk/nsMenuItem.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..3a9915e609f599df501c1a6f3baa34e4cd651832 --- /dev/null +++ b/widget/gtk/nsMenuItem.cpp @@ -0,0 +1,766 @@ @@ -2921,6 +3118,9 @@ +{ + return eType_MenuItem; +} +diff --git a/widget/gtk/nsMenuItem.h b/widget/gtk/nsMenuItem.h +new file mode 100644 +index 0000000000000000000000000000000000000000..c621b4e223f1709b2b3e9c1c27affe2ce68ffbd5 --- /dev/null +++ b/widget/gtk/nsMenuItem.h @@ -0,0 +1,80 @@ @@ -3004,6 +3204,9 @@ +}; + +#endif /* __nsMenuItem_h__ */ +diff --git a/widget/gtk/nsMenuObject.cpp b/widget/gtk/nsMenuObject.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..60ff3cbe86a76c5bc01af925d6a197e9ffe23517 --- /dev/null +++ b/widget/gtk/nsMenuObject.cpp @@ -0,0 +1,664 @@ @@ -3254,7 +3457,7 @@ + nullptr, 0, loadGroup, this, nullptr, nullptr, + nsIRequest::LOAD_NORMAL, nullptr, + nsIContentPolicy::TYPE_IMAGE, EmptyString(), -+ false, false, getter_AddRefs(mImageRequest)); ++ false, false, 0, getter_AddRefs(mImageRequest)); + } +} + @@ -3671,6 +3874,9 @@ + weak = weak->mPrev; + } +} +diff --git a/widget/gtk/nsMenuObject.h b/widget/gtk/nsMenuObject.h +new file mode 100644 +index 0000000000000000000000000000000000000000..92b1ffd8f2fae9ff368ce70b6069ad8bc918c2c6 --- /dev/null +++ b/widget/gtk/nsMenuObject.h @@ -0,0 +1,169 @@ @@ -3843,6 +4049,9 @@ +}; + +#endif /* __nsMenuObject_h__ */ +diff --git a/widget/gtk/nsMenuSeparator.cpp b/widget/gtk/nsMenuSeparator.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..3ab135bd8a2009d9d8b943df1d1bec8e2ff47776 --- /dev/null +++ b/widget/gtk/nsMenuSeparator.cpp @@ -0,0 +1,82 @@ @@ -3928,6 +4137,9 @@ +{ + return eType_MenuItem; +} +diff --git a/widget/gtk/nsMenuSeparator.h b/widget/gtk/nsMenuSeparator.h +new file mode 100644 +index 0000000000000000000000000000000000000000..dd3f5b974dd3f0955010c2edd3cafe05d24f837a --- /dev/null +++ b/widget/gtk/nsMenuSeparator.h @@ -0,0 +1,37 @@ @@ -3968,6 +4180,9 @@ +}; + +#endif /* __nsMenuSeparator_h__ */ +diff --git a/widget/gtk/nsNativeMenuDocListener.cpp b/widget/gtk/nsNativeMenuDocListener.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..05d7e09ccc3c80676d92b6104c064b8a0cabb008 --- /dev/null +++ b/widget/gtk/nsNativeMenuDocListener.cpp @@ -0,0 +1,347 @@ @@ -4318,6 +4533,9 @@ + CancelFlush(this); + mPendingMutations.Clear(); +} +diff --git a/widget/gtk/nsNativeMenuDocListener.h b/widget/gtk/nsNativeMenuDocListener.h +new file mode 100644 +index 0000000000000000000000000000000000000000..5ee99cba70fd4444b31387103bd0c3e022f598fa --- /dev/null +++ b/widget/gtk/nsNativeMenuDocListener.h @@ -0,0 +1,152 @@ @@ -4473,6 +4691,9 @@ +}; + +#endif /* __nsNativeMenuDocListener_h__ */ +diff --git a/widget/gtk/nsNativeMenuService.cpp b/widget/gtk/nsNativeMenuService.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..5cf36a4470361a4c440fe5795a33f175847339e0 --- /dev/null +++ b/widget/gtk/nsNativeMenuService.cpp @@ -0,0 +1,478 @@ @@ -4954,6 +5175,9 @@ + g_object_unref(cancellable); + } +} +diff --git a/widget/gtk/nsNativeMenuService.h b/widget/gtk/nsNativeMenuService.h +new file mode 100644 +index 0000000000000000000000000000000000000000..2e0d429eddfdfc84620834eced6b973317a36067 --- /dev/null +++ b/widget/gtk/nsNativeMenuService.h @@ -0,0 +1,85 @@ @@ -5042,10 +5266,12 @@ +}; + +#endif /* __nsNativeMenuService_h__ */ +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index b77fadc1faffb5d75a1c7e53efbacfb13050b533..316f2055828cf49108f519f7bb020ec704707a38 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp -@@ -7060,6 +7060,10 @@ void nsWindow::HideWindowChrome(bool aSh - SetWindowDecoration(aShouldHide ? eBorderStyle_none : mBorderStyle); +@@ -7418,6 +7418,10 @@ void nsWindow::HideWindowChrome(bool aShouldHide) { + SetWindowDecoration(aShouldHide ? BorderStyle::None : mBorderStyle); } +void nsWindow::SetMenuBar(UniquePtr<nsMenuBar> aMenuBar) { @@ -5054,10 +5280,12 @@ + bool nsWindow::CheckForRollup(gdouble aMouseX, gdouble aMouseY, bool aIsWheel, bool aAlwaysRollup) { - nsIRollupListener* rollupListener = GetActiveRollupListener(); + LOG("nsWindow::CheckForRollup() aAlwaysRollup %d", aAlwaysRollup); +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +index 1ae9b3f12616b2bf1d6f6fdd1a198f9f06ef3796..03e4c18810672ce620ac1f22a508a132f9fe9840 100644 --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h -@@ -26,6 +26,8 @@ +@@ -27,6 +27,8 @@ #include "nsRefPtrHashtable.h" #include "IMContextWrapper.h" @@ -5066,7 +5294,7 @@ #ifdef ACCESSIBILITY # include "mozilla/a11y/LocalAccessible.h" #endif -@@ -172,6 +174,8 @@ class nsWindow final : public nsBaseWidg +@@ -205,6 +207,8 @@ class nsWindow final : public nsBaseWidget { nsresult MakeFullScreen(bool aFullScreen) override; void HideWindowChrome(bool aShouldHide) override; @@ -5075,7 +5303,7 @@ /** * GetLastUserInputTime returns a timestamp for the most recent user input * event. This is intended for pointer grab requests (including drags). -@@ -824,6 +828,8 @@ class nsWindow final : public nsBaseWidg +@@ -924,6 +928,8 @@ class nsWindow final : public nsBaseWidget { static bool sTransparentMainWindow; @@ -5084,129 +5312,11 @@ #ifdef ACCESSIBILITY RefPtr<mozilla::a11y::LocalAccessible> mRootAccessible; ---- /dev/null -+++ b/xpcom/ds/NativeMenuAtoms.py -@@ -0,0 +1,9 @@ -+from Atom import Atom -+ -+NATIVE_MENU_ATOMS = [ -+ Atom("menuitem_with_favicon", "menuitem-with-favicon"), -+ Atom("_moz_menubarkeeplocal", "_moz-menubarkeeplocal"), -+ Atom("_moz_nativemenupopupstate", "_moz-nativemenupopupstate"), -+ Atom("openedwithkey", "openedwithkey"), -+ Atom("shellshowingmenubar", "shellshowingmenubar"), -+] ---- a/xpcom/ds/StaticAtoms.py -+++ b/xpcom/ds/StaticAtoms.py -@@ -7,6 +7,7 @@ - from Atom import Atom, InheritingAnonBoxAtom, NonInheritingAnonBoxAtom - from Atom import PseudoElementAtom - from HTMLAtoms import HTML_PARSER_ATOMS -+from NativeMenuAtoms import NATIVE_MENU_ATOMS - import sys - - # Static atom definitions, used to generate nsGkAtomList.h. -@@ -2529,7 +2530,7 @@ STATIC_ATOMS = [ - InheritingAnonBoxAtom("AnonBox_mozSVGForeignContent", ":-moz-svg-foreign-content"), - InheritingAnonBoxAtom("AnonBox_mozSVGText", ":-moz-svg-text"), - # END ATOMS --] + HTML_PARSER_ATOMS -+] + HTML_PARSER_ATOMS + NATIVE_MENU_ATOMS - # fmt: on - - ---- a/widget/gtk/components.conf -+++ b/widget/gtk/components.conf -@@ -76,6 +76,14 @@ Classes = [ - 'headers': ['/widget/gtk/nsUserIdleServiceGTK.h'], - 'constructor': 'nsUserIdleServiceGTK::GetInstance', - }, -+ { -+ 'cid': '{0b3fe5aa-bc72-4303-85ae-76365df1251d}', -+ 'contract_ids': ['@mozilla.org/widget/nativemenuservice;1'], -+ 'singleton': True, -+ 'type': 'nsNativeMenuService', -+ 'constructor': 'nsNativeMenuService::GetInstanceForServiceManager', -+ 'headers': ['/widget/gtk/nsNativeMenuService.h'], -+ }, - ] - - if defined('NS_PRINTING'): ---- a/xpfe/appshell/AppWindow.cpp -+++ b/xpfe/appshell/AppWindow.cpp -@@ -80,7 +80,7 @@ - - #include "mozilla/dom/DocumentL10n.h" - --#ifdef XP_MACOSX -+#if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) - # include "mozilla/widget/NativeMenuSupport.h" - # define USE_NATIVE_MENUS - #endif ---- a/widget/gtk/NativeMenuSupport.cpp -+++ b/widget/gtk/NativeMenuSupport.cpp -@@ -7,6 +7,8 @@ - - #include "MainThreadUtils.h" - #include "NativeMenuGtk.h" -+#include "nsINativeMenuService.h" -+#include "nsServiceManagerUtils.h" - - namespace mozilla::widget { - -@@ -14,7 +16,14 @@ void NativeMenuSupport::CreateNativeMenu - dom::Element* aMenuBarElement) { - MOZ_RELEASE_ASSERT(NS_IsMainThread(), - "Attempting to create native menu bar on wrong thread!"); -- // TODO -+ -+ nsCOMPtr<nsINativeMenuService> nms = -+ do_GetService("@mozilla.org/widget/nativemenuservice;1"); -+ if (!nms) { -+ return; -+ } -+ -+ nms->CreateNativeMenuBar(aParent, aMenuBarElement); - } - - already_AddRefed<NativeMenu> NativeMenuSupport::CreateNativeContextMenu( ---- /dev/null -+++ b/widget/gtk/NativeMenuSupport.h -@@ -0,0 +1,31 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef mozilla_widget_NativeMenuSupport_h -+#define mozilla_widget_NativeMenuSupport_h -+ -+class nsIWidget; -+ -+namespace mozilla { -+ -+namespace dom { -+class Element; -+} -+ -+namespace widget { -+ -+class NativeMenuSupport final { -+public: -+ // Given a top-level window widget and a menu bar DOM node, sets up native -+ // menus. Once created, native menus are controlled via the DOM, including -+ // destruction. -+ static void CreateNativeMenuBar(nsIWidget* aParent, -+ dom::Element* aMenuBarElement); -+}; -+ -+} // namespace widget -+} // namespace mozilla -+ -+#endif // mozilla_widget_NativeMenuSupport_h +diff --git a/widget/moz.build b/widget/moz.build +index f83f84297c4a8754aec0b0de0b5489984e628ed7..5f13aef4bffbb8b4c5422d5ee0b5315fc6d40fc5 100644 --- a/widget/moz.build +++ b/widget/moz.build -@@ -157,6 +157,11 @@ EXPORTS += [ +@@ -163,6 +163,11 @@ EXPORTS += [ "PuppetWidget.h", ] @@ -5218,6 +5328,9 @@ EXPORTS.mozilla += [ "BasicEvents.h", "ColorScheme.h", +diff --git a/widget/nsINativeMenuService.h b/widget/nsINativeMenuService.h +new file mode 100644 +index 0000000000000000000000000000000000000000..e92d7a74a3bc508ee702a1699b9e484a6031c52a --- /dev/null +++ b/widget/nsINativeMenuService.h @@ -0,0 +1,39 @@ @@ -5260,6 +5373,8 @@ +NS_DEFINE_STATIC_IID_ACCESSOR(nsINativeMenuService, NS_INATIVEMENUSERVICE_IID) + +#endif // nsINativeMenuService_h_ +diff --git a/widget/nsWidgetsCID.h b/widget/nsWidgetsCID.h +index 8e0f67661414cbd7e8fe69c2ebdcffcdda4bdd44..911711e88a0e533989af05fcd383c6e1c81db2f6 100644 --- a/widget/nsWidgetsCID.h +++ b/widget/nsWidgetsCID.h @@ -66,6 +66,14 @@ @@ -5277,3 +5392,52 @@ // {F6CD4F21-53AF-11d2-8DC4-00609703C14E} #define NS_POPUPMENU_CID \ { \ +diff --git a/xpcom/ds/NativeMenuAtoms.py b/xpcom/ds/NativeMenuAtoms.py +new file mode 100644 +index 0000000000000000000000000000000000000000..488c8f49c0217890d2c5a12f57fdc194e08e49a7 +--- /dev/null ++++ b/xpcom/ds/NativeMenuAtoms.py +@@ -0,0 +1,9 @@ ++from Atom import Atom ++ ++NATIVE_MENU_ATOMS = [ ++ Atom("menuitem_with_favicon", "menuitem-with-favicon"), ++ Atom("_moz_menubarkeeplocal", "_moz-menubarkeeplocal"), ++ Atom("_moz_nativemenupopupstate", "_moz-nativemenupopupstate"), ++ Atom("openedwithkey", "openedwithkey"), ++ Atom("shellshowingmenubar", "shellshowingmenubar"), ++] +diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py +index f377159185a9b622071e811ec41a7ec30dbd0760..bba8cc8db6e1ed9e8afe0e60c9a6f782f3714894 100644 +--- a/xpcom/ds/StaticAtoms.py ++++ b/xpcom/ds/StaticAtoms.py +@@ -13,6 +13,7 @@ from Atom import ( + PseudoElementAtom, + ) + from HTMLAtoms import HTML_PARSER_ATOMS ++from NativeMenuAtoms import NATIVE_MENU_ATOMS + + # Static atom definitions, used to generate nsGkAtomList.h. + # +@@ -2563,7 +2564,7 @@ STATIC_ATOMS = [ + InheritingAnonBoxAtom("AnonBox_mozSVGForeignContent", ":-moz-svg-foreign-content"), + InheritingAnonBoxAtom("AnonBox_mozSVGText", ":-moz-svg-text"), + # END ATOMS +-] + HTML_PARSER_ATOMS ++] + HTML_PARSER_ATOMS + NATIVE_MENU_ATOMS + # fmt: on + + +diff --git a/xpfe/appshell/AppWindow.cpp b/xpfe/appshell/AppWindow.cpp +index 71f790f347e06a2915822455b60a4d09c3bf5d68..3ef80f1727eced1fe1deb3f6a1bdc6ff48ac1c7b 100644 +--- a/xpfe/appshell/AppWindow.cpp ++++ b/xpfe/appshell/AppWindow.cpp +@@ -78,7 +78,7 @@ + + #include "mozilla/dom/DocumentL10n.h" + +-#ifdef XP_MACOSX ++#if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) + # include "mozilla/widget/NativeMenuSupport.h" + # define USE_NATIVE_MENUS + #endif diff --git a/0028-Do-not-use-gconf-for-proxy-settings-if-not-running-w.patch b/0028-Do-not-use-gconf-for-proxy-settings-if-not-running-w.patch new file mode 100644 index 000000000000..c1a6d30860a8 --- /dev/null +++ b/0028-Do-not-use-gconf-for-proxy-settings-if-not-running-w.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wolfgang Rosenauer <wolfgang@rosenauer.org> +Date: Tue, 21 May 2019 14:48:35 +0200 +Subject: [PATCH] Do not use gconf for proxy settings if not running within + Gnome + +--- + .../system/unixproxy/nsUnixSystemProxySettings.cpp | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +index 982faf7d7968430cdf44928f2408847df55170d2..185dc1e22a903cec95b212d1713dddf764b9b198 100644 +--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp ++++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +@@ -52,10 +52,14 @@ nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { + } + + void nsUnixSystemProxySettings::Init() { +- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); +- if (mGSettings) { +- mGSettings->GetCollectionForSchema("org.gnome.system.proxy"_ns, +- getter_AddRefs(mProxySettings)); ++ const char* sessionType = PR_GetEnv("DESKTOP_SESSION"); ++ if (sessionType && !strcmp(sessionType, "gnome")) { ++ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); ++ if (mGSettings) { ++ mGSettings->GetCollectionForSchema( ++ "org.gnome.system.proxy"_ns, ++ getter_AddRefs(mProxySettings)); ++ } + } + } + diff --git a/0028-Make-elfhack-use-toolchain.patch b/0028-Make-elfhack-use-toolchain.patch deleted file mode 100644 index 9929e3482206..000000000000 --- a/0028-Make-elfhack-use-toolchain.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b0d4e17b82a626c6102ce7ee9f2d5f80d97a212c Mon Sep 17 00:00:00 2001 -From: Thomas Deutschmann <whissi@gentoo.org> -Date: Mon, 28 Sep 2020 20:52:24 +0200 -Subject: [PATCH 28/34] Make elfhack use toolchain - -Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> ---- - build/unix/elfhack/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/unix/elfhack/Makefile.in b/build/unix/elfhack/Makefile.in -index 08cc3d6852..c2b575d87a 100644 ---- a/build/unix/elfhack/Makefile.in -+++ b/build/unix/elfhack/Makefile.in -@@ -20,7 +20,7 @@ test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX): %$(DLL_SUFFIX): %.$(OBJ_SUFFIX) - # Fail if the backup file doesn't exist - [ -f '$@.bak' ] - # Fail if the new library doesn't contain less relocations -- [ $$($(TOOLCHAIN_PREFIX)objdump -R $@.bak | wc -l) -gt $$(objdump -R $@ | wc -l) ] -+ [ $$($(TOOLCHAIN_PREFIX)objdump -R $@.bak | wc -l) -gt $$($(TOOLCHAIN_PREFIX)objdump -R $@ | wc -l) ] - - test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX): DSO_SONAME=$@ - test-array$(DLL_SUFFIX): DT_TYPE=INIT_ARRAY --- -2.33.1 - diff --git a/0029-Add-KDE-integration-to-Firefox-toolkit-parts.patch b/0029-Add-KDE-integration-to-Firefox-toolkit-parts.patch new file mode 100644 index 000000000000..fe925ccda47d --- /dev/null +++ b/0029-Add-KDE-integration-to-Firefox-toolkit-parts.patch @@ -0,0 +1,1531 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wolfgang Rosenauer <wolfgang@rosenauer.org> +Date: Fri, 31 May 2019 12:28:11 +0300 +Subject: [PATCH] Add KDE integration to Firefox (toolkit parts) + +Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 +Bug: https://bugzilla.suse.com/show_bug.cgi?id=170055 + +Co-authored-by: Wolfgang Rosenauer <wolfgang@rosenauer.org> +Co-authored-by: Lubos Lunak <lunak@suse.com> +--- + modules/libpref/Preferences.cpp | 14 +- + modules/libpref/moz.build | 4 + + python/mozbuild/mozpack/chrome/flags.py | 1 + + python/mozbuild/mozpack/chrome/manifest.py | 1 + + toolkit/components/downloads/moz.build | 4 + + toolkit/mozapps/downloads/HelperAppDlg.jsm | 70 ++-- + .../unixproxy/nsUnixSystemProxySettings.cpp | 33 ++ + toolkit/xre/moz.build | 2 + + toolkit/xre/nsKDEUtils.cpp | 321 ++++++++++++++++++ + toolkit/xre/nsKDEUtils.h | 48 +++ + uriloader/exthandler/HandlerServiceParent.cpp | 4 +- + uriloader/exthandler/moz.build | 3 + + .../exthandler/unix/nsCommonRegistry.cpp | 53 +++ + uriloader/exthandler/unix/nsCommonRegistry.h | 28 ++ + uriloader/exthandler/unix/nsKDERegistry.cpp | 89 +++++ + uriloader/exthandler/unix/nsKDERegistry.h | 34 ++ + uriloader/exthandler/unix/nsMIMEInfoUnix.cpp | 30 +- + .../exthandler/unix/nsOSHelperAppService.cpp | 10 +- + widget/gtk/moz.build | 1 + + widget/gtk/nsFilePicker.cpp | 258 +++++++++++++- + widget/gtk/nsFilePicker.h | 6 + + xpcom/components/ManifestParser.cpp | 11 +- + xpcom/components/moz.build | 1 + + xpcom/io/nsLocalFileUnix.cpp | 21 +- + 24 files changed, 1010 insertions(+), 37 deletions(-) + create mode 100644 toolkit/xre/nsKDEUtils.cpp + create mode 100644 toolkit/xre/nsKDEUtils.h + create mode 100644 uriloader/exthandler/unix/nsCommonRegistry.cpp + create mode 100644 uriloader/exthandler/unix/nsCommonRegistry.h + create mode 100644 uriloader/exthandler/unix/nsKDERegistry.cpp + create mode 100644 uriloader/exthandler/unix/nsKDERegistry.h + +diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp +index 0331e151c6db01631a9420d6315e76c319010864..0a3611409ccea7045582297ccf51e8828c51487c 100644 +--- a/modules/libpref/Preferences.cpp ++++ b/modules/libpref/Preferences.cpp +@@ -95,6 +95,7 @@ + #ifdef MOZ_BACKGROUNDTASKS + # include "mozilla/BackgroundTasks.h" + #endif ++#include "nsKDEUtils.h" + + #ifdef DEBUG + # include <map> +@@ -4915,6 +4916,17 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { + #endif + }; + ++ if(nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper? ++ for(int i = 0; ++ i < MOZ_ARRAY_LENGTH(specialFiles); ++ ++i ) { ++ if( *specialFiles[ i ] == '\0' ) { ++ specialFiles[ i ] = "kde.js"; ++ break; ++ } ++ } ++ } ++ + rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, + ArrayLength(specialFiles)); + if (NS_FAILED(rv)) { +@@ -5006,7 +5018,7 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { + } + + // Do we care if a file provided by this process fails to load? +- pref_LoadPrefsInDir(path, nullptr, 0); ++ pref_LoadPrefsInDir(path, specialFiles, ArrayLength(specialFiles)); + } + } + +diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build +index b6d750fcf0763c161a591673e069a5b62a2ebd5f..5580825a907b06f739f771ea7130e688eba9fdfc 100644 +--- a/modules/libpref/moz.build ++++ b/modules/libpref/moz.build +@@ -127,6 +127,10 @@ UNIFIED_SOURCES += [ + "SharedPrefMap.cpp", + ] + ++LOCAL_INCLUDES += [ ++ '/toolkit/xre' ++] ++ + gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs) + + GeneratedFile( +diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py +index 08e975dbe1d1ae21848607ca80e0e74a791752cd..4e661c243bbfd209b405469ece8c6664a34f774a 100644 +--- a/python/mozbuild/mozpack/chrome/flags.py ++++ b/python/mozbuild/mozpack/chrome/flags.py +@@ -233,6 +233,7 @@ class Flags(OrderedDict): + "tablet": Flag, + "process": StringFlag, + "backgroundtask": StringFlag, ++ "desktop": StringFlag, + } + RE = re.compile(r"([!<>=]+)") + +diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py +index badbd2fd9cebe7a9888b112fb2f580a6b2963573..e869ac4fe02bfd91f11d59a8b16f0e6aca8075f1 100644 +--- a/python/mozbuild/mozpack/chrome/manifest.py ++++ b/python/mozbuild/mozpack/chrome/manifest.py +@@ -42,6 +42,7 @@ class ManifestEntry(object): + "process", + "contentaccessible", + "backgroundtask", ++ "desktop", + ] + + def __init__(self, base, *flags): +diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build +index 3818e8c0db1ed3cfc068d89b18b1fe2f1bf750a9..b70986db811191952919531cfb79e04b801491a2 100644 +--- a/toolkit/components/downloads/moz.build ++++ b/toolkit/components/downloads/moz.build +@@ -51,5 +51,9 @@ if CONFIG["MOZ_PLACES"]: + + FINAL_LIBRARY = "xul" + ++LOCAL_INCLUDES += [ ++ '/toolkit/xre' ++] ++ + with Files("**"): + BUG_COMPONENT = ("Toolkit", "Downloads API") +diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm +index 5ec97a8771f56765f53b92157ab006ab13e7bfdc..677d80a656e21aaf54a66a852bf9a87689c9731d 100644 +--- a/toolkit/mozapps/downloads/HelperAppDlg.jsm ++++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm +@@ -1243,26 +1243,56 @@ nsUnknownContentTypeDialog.prototype = { + this.chosenApp = params.handlerApp; + } + } else if ("@mozilla.org/applicationchooser;1" in Cc) { +- var nsIApplicationChooser = Ci.nsIApplicationChooser; +- var appChooser = Cc["@mozilla.org/applicationchooser;1"].createInstance( +- nsIApplicationChooser +- ); +- appChooser.init( +- this.mDialog, +- this.dialogElement("strings").getString("chooseAppFilePickerTitle") +- ); +- var contentTypeDialogObj = this; +- let appChooserCallback = function appChooserCallback_done(aResult) { +- if (aResult) { +- contentTypeDialogObj.chosenApp = aResult.QueryInterface( +- Ci.nsILocalHandlerApp +- ); +- } +- contentTypeDialogObj.finishChooseApp(); +- }; +- appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback); +- // The finishChooseApp is called from appChooserCallback +- return; ++ // handle the KDE case which is implemented in the filepicker ++ // therefore falling back to Gtk2 like behaviour if KDE is running ++ // FIXME this should be better handled in the nsIApplicationChooser ++ // interface ++ var env = Components.classes["@mozilla.org/process/environment;1"] ++ .getService(Components.interfaces.nsIEnvironment); ++ if (env.get('KDE_FULL_SESSION') == "true") ++ { ++ var nsIFilePicker = Ci.nsIFilePicker; ++ var fp = Cc["@mozilla.org/filepicker;1"] ++ .createInstance(nsIFilePicker); ++ fp.init(this.mDialog, ++ this.dialogElement("strings").getString("chooseAppFilePickerTitle"), ++ nsIFilePicker.modeOpen); ++ ++ fp.appendFilters(nsIFilePicker.filterApps); ++ ++ fp.open(aResult => { ++ if (aResult == nsIFilePicker.returnOK && fp.file) { ++ // Remember the file they chose to run. ++ var localHandlerApp = ++ Cc["@mozilla.org/uriloader/local-handler-app;1"]. ++ createInstance(Ci.nsILocalHandlerApp); ++ localHandlerApp.executable = fp.file; ++ this.chosenApp = localHandlerApp; ++ } ++ this.finishChooseApp(); ++ }); ++ } else { ++ var nsIApplicationChooser = Ci.nsIApplicationChooser; ++ var appChooser = Cc["@mozilla.org/applicationchooser;1"].createInstance( ++ nsIApplicationChooser ++ ); ++ appChooser.init( ++ this.mDialog, ++ this.dialogElement("strings").getString("chooseAppFilePickerTitle") ++ ); ++ var contentTypeDialogObj = this; ++ let appChooserCallback = function appChooserCallback_done(aResult) { ++ if (aResult) { ++ contentTypeDialogObj.chosenApp = aResult.QueryInterface( ++ Ci.nsILocalHandlerApp ++ ); ++ } ++ contentTypeDialogObj.finishChooseApp(); ++ }; ++ appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback); ++ // The finishChooseApp is called from appChooserCallback ++ return; ++ } + } else { + var nsIFilePicker = Ci.nsIFilePicker; + var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); +diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +index 185dc1e22a903cec95b212d1713dddf764b9b198..c843e0d3d100aef4e2e1d2ffcd19258306229658 100644 +--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp ++++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +@@ -16,6 +16,8 @@ + #include "nsISupportsPrimitives.h" + #include "nsIGSettingsService.h" + #include "nsReadableUtils.h" ++#include "nsPrintfCString.h" ++#include "nsKDEUtils.h" + + using namespace mozilla; + +@@ -39,6 +41,8 @@ class nsUnixSystemProxySettings final : public nsISystemProxySettings { + nsACString& aResult); + nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, + nsACString& aResult); ++ nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, ++ PRInt32 aPort, nsACString& aResult); + }; + + NS_IMPL_ISUPPORTS(nsUnixSystemProxySettings, nsISystemProxySettings) +@@ -397,6 +401,9 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, + const nsACString& aHost, + const int32_t aPort, + nsACString& aResult) { ++ if (nsKDEUtils::kdeSupport()) ++ return GetProxyFromKDE(aScheme, aHost, aPort, aResult); ++ + if (mProxySettings) { + nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult); + if (NS_SUCCEEDED(rv)) return rv; +@@ -405,6 +412,32 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, + return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult); + } + ++nsresult ++nsUnixSystemProxySettings::GetProxyFromKDE(const nsACString& aScheme, ++ const nsACString& aHost, ++ PRInt32 aPort, ++ nsACString& aResult) ++{ ++ nsAutoCString url; ++ url = aScheme; ++ url += "://"; ++ url += aHost; ++ if( aPort >= 0 ) ++ { ++ url += ":"; ++ url += nsPrintfCString("%d", aPort); ++ } ++ nsTArray<nsCString> command; ++ command.AppendElement( "GETPROXY"_ns ); ++ command.AppendElement( url ); ++ nsTArray<nsCString> result; ++ if( !nsKDEUtils::command( command, &result ) || result.Length() != 1 ) ++ return NS_ERROR_FAILURE; ++ aResult = result[0]; ++ return NS_OK; ++} ++ ++ + NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) { + auto result = MakeRefPtr<nsUnixSystemProxySettings>(); + result->Init(); +diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build +index 3ab8a14d13190edc962bfbadd5d1f928dac651dd..159b2c07e851466176c10b67e4b9ae69f34e9340 100644 +--- a/toolkit/xre/moz.build ++++ b/toolkit/xre/moz.build +@@ -96,7 +96,9 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": + "UIKitDirProvider.mm", + ] + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": ++ EXPORTS += ['nsKDEUtils.h'] + UNIFIED_SOURCES += [ ++ "nsKDEUtils.cpp", + "nsNativeAppSupportUnix.cpp", + ] + CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] +diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..7a6edf07703a494c779ef8c639358eacfecb92b6 +--- /dev/null ++++ b/toolkit/xre/nsKDEUtils.cpp +@@ -0,0 +1,321 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "nsKDEUtils.h" ++#include "nsIWidget.h" ++#include "nsISupportsPrimitives.h" ++#include "nsIMutableArray.h" ++#include "nsComponentManagerUtils.h" ++#include "nsArrayUtils.h" ++ ++#include <gtk/gtk.h> ++ ++#include <limits.h> ++#include <stdio.h> ++#include <sys/wait.h> ++#include <sys/resource.h> ++#include <unistd.h> ++#include <X11/Xlib.h> ++// copied from X11/X.h as a hack since for an unknown ++// reason it's not picked up from X11/X.h ++#ifndef None ++#define None 0L /* universal null resource or null atom */ ++#endif ++ ++//#define DEBUG_KDE ++#ifdef DEBUG_KDE ++#define KMOZILLAHELPER "kmozillahelper" ++#else ++// not need for lib64, it's a binary ++#define KMOZILLAHELPER "/usr/lib/mozilla/kmozillahelper" ++#endif ++ ++#define KMOZILLAHELPER_VERSION 6 ++#define MAKE_STR2( n ) #n ++#define MAKE_STR( n ) MAKE_STR2( n ) ++ ++static bool getKdeSession() ++{ ++ if (PR_GetEnv("KDE_FULL_SESSION")) ++ { ++ return true; ++ } ++ return false; ++} ++ ++static bool getKdeSupport() ++ { ++ nsTArray<nsCString> command; ++ command.AppendElement( "CHECK"_ns ); ++ command.AppendElement( "KMOZILLAHELPER_VERSION"_ns ); ++ bool kde = nsKDEUtils::command( command ); ++#ifdef DEBUG_KDE ++ fprintf( stderr, "KDE RUNNING %d\n", kde ); ++#endif ++ return kde; ++ } ++ ++nsKDEUtils::nsKDEUtils() ++ : commandFile( NULL ) ++ , replyFile( NULL ) ++ { ++ } ++ ++nsKDEUtils::~nsKDEUtils() ++ { ++// closeHelper(); not actually useful, exiting will close the fd too ++ } ++ ++nsKDEUtils* nsKDEUtils::self() ++ { ++ static nsKDEUtils s; ++ return &s; ++ } ++ ++static bool helperRunning = false; ++static bool helperFailed = false; ++ ++bool nsKDEUtils::kdeSession() ++ { ++ static bool session = getKdeSession(); ++ return session; ++ } ++ ++bool nsKDEUtils::kdeSupport() ++ { ++ static bool support = kdeSession() && getKdeSupport(); ++ return support && helperRunning; ++ } ++ ++struct nsKDECommandData ++ { ++ FILE* file; ++ nsTArray<nsCString>* output; ++ GMainLoop* loop; ++ bool success; ++ }; ++ ++static gboolean kdeReadFunc( GIOChannel*, GIOCondition, gpointer data ) ++ { ++ nsKDECommandData* p = static_cast< nsKDECommandData* >( data ); ++ char buf[ 8192 ]; // TODO big enough ++ bool command_done = false; ++ bool command_failed = false; ++ while( !command_done && !command_failed && fgets( buf, 8192, p->file ) != NULL ) ++ { // TODO what if the kernel splits a line into two chunks? ++//#ifdef DEBUG_KDE ++// fprintf( stderr, "READ: %s %d\n", buf, feof( p->file )); ++//#endif ++ if( char* eol = strchr( buf, '\n' )) ++ *eol = '\0'; ++ command_done = ( strcmp( buf, "\\1" ) == 0 ); ++ command_failed = ( strcmp( buf, "\\0" ) == 0 ); ++ nsAutoCString line( buf ); ++ line.ReplaceSubstring( "\\n", "\n" ); ++ line.ReplaceSubstring( "\\" "\\", "\\" ); // \\ -> \ , i.e. unescape ++ if( p->output && !( command_done || command_failed )) ++ p->output->AppendElement( nsCString( buf )); // TODO utf8? ++ } ++ bool quit = false; ++ if( feof( p->file ) || command_failed ) ++ { ++ quit = true; ++ p->success = false; ++ } ++ if( command_done ) ++ { // reading one reply finished ++ quit = true; ++ p->success = true; ++ } ++ if( quit ) ++ { ++ if( p->loop ) ++ g_main_loop_quit( p->loop ); ++ return FALSE; ++ } ++ return TRUE; ++ } ++ ++bool nsKDEUtils::command( const nsTArray<nsCString>& command, nsTArray<nsCString>* output ) ++ { ++ return self()->internalCommand( command, NULL, false, output ); ++ } ++ ++bool nsKDEUtils::command( nsIArray* command, nsIArray** output) ++ { ++ nsTArray<nsCString> in; ++ PRUint32 length; ++ command->GetLength( &length ); ++ for ( PRUint32 i = 0; i < length; i++ ) ++ { ++ nsCOMPtr<nsISupportsCString> str = do_QueryElementAt( command, i ); ++ if( str ) ++ { ++ nsAutoCString s; ++ str->GetData( s ); ++ in.AppendElement( s ); ++ } ++ } ++ ++ nsTArray<nsCString> out; ++ bool ret = self()->internalCommand( in, NULL, false, &out ); ++ ++ if ( !output ) return ret; ++ ++ nsCOMPtr<nsIMutableArray> result = do_CreateInstance( NS_ARRAY_CONTRACTID ); ++ if ( !result ) return false; ++ ++ for ( PRUint32 i = 0; i < out.Length(); i++ ) ++ { ++ nsCOMPtr<nsISupportsCString> rstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); ++ if ( !rstr ) return false; ++ ++ rstr->SetData( out[i] ); ++ result->AppendElement( rstr ); ++ } ++ ++ NS_ADDREF( *output = result); ++ return ret; ++ } ++ ++ ++bool nsKDEUtils::commandBlockUi( const nsTArray<nsCString>& command, GtkWindow* parent, nsTArray<nsCString>* output ) ++ { ++ return self()->internalCommand( command, parent, true, output ); ++ } ++ ++bool nsKDEUtils::internalCommand( const nsTArray<nsCString>& command, GtkWindow* parent, bool blockUi, ++ nsTArray<nsCString>* output ) ++ { ++ if( !startHelper()) ++ return false; ++ feedCommand( command ); ++ // do not store the data in 'this' but in extra structure, just in case there ++ // is reentrancy (can there be? the event loop is re-entered) ++ nsKDECommandData data; ++ data.file = replyFile; ++ data.output = output; ++ data.success = false; ++ if( blockUi ) ++ { ++ data.loop = g_main_loop_new( NULL, FALSE ); ++ GtkWidget* window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); ++ if( parent && gtk_window_get_group(parent) ) ++ gtk_window_group_add_window( gtk_window_get_group(parent), GTK_WINDOW( window )); ++ gtk_widget_realize( window ); ++ gtk_widget_set_sensitive( window, TRUE ); ++ gtk_grab_add( window ); ++ GIOChannel* channel = g_io_channel_unix_new( fileno( data.file )); ++ g_io_add_watch( channel, static_cast< GIOCondition >( G_IO_IN | G_IO_ERR | G_IO_HUP ), kdeReadFunc, &data ); ++ g_io_channel_unref( channel ); ++ g_main_loop_run( data.loop ); ++ g_main_loop_unref( data.loop ); ++ gtk_grab_remove( window ); ++ gtk_widget_destroy( window ); ++ } ++ else ++ { ++ data.loop = NULL; ++ while( kdeReadFunc( NULL, static_cast< GIOCondition >( 0 ), &data )) ++ ; ++ } ++ return data.success; ++ } ++ ++bool nsKDEUtils::startHelper() ++ { ++ if( helperRunning ) ++ return true; ++ if( helperFailed ) ++ return false; ++ helperFailed = true; ++ int fdcommand[ 2 ]; ++ int fdreply[ 2 ]; ++ if( pipe( fdcommand ) < 0 ) ++ return false; ++ if( pipe( fdreply ) < 0 ) ++ { ++ close( fdcommand[ 0 ] ); ++ close( fdcommand[ 1 ] ); ++ return false; ++ } ++ char* args[ 2 ] = { const_cast< char* >( KMOZILLAHELPER ), NULL }; ++ switch( fork()) ++ { ++ case -1: ++ { ++ close( fdcommand[ 0 ] ); ++ close( fdcommand[ 1 ] ); ++ close( fdreply[ 0 ] ); ++ close( fdreply[ 1 ] ); ++ return false; ++ } ++ case 0: // child ++ { ++ if( dup2( fdcommand[ 0 ], STDIN_FILENO ) < 0 ) ++ _exit( 1 ); ++ if( dup2( fdreply[ 1 ], STDOUT_FILENO ) < 0 ) ++ _exit( 1 ); ++ int maxfd = 1024; // close all other fds ++ struct rlimit rl; ++ if( getrlimit( RLIMIT_NOFILE, &rl ) == 0 ) ++ maxfd = rl.rlim_max; ++ for( int i = 3; ++ i < maxfd; ++ ++i ) ++ close( i ); ++#ifdef DEBUG_KDE ++ execvp( KMOZILLAHELPER, args ); ++#else ++ execv( KMOZILLAHELPER, args ); ++#endif ++ _exit( 1 ); // failed ++ } ++ default: // parent ++ { ++ commandFile = fdopen( fdcommand[ 1 ], "w" ); ++ replyFile = fdopen( fdreply[ 0 ], "r" ); ++ close( fdcommand[ 0 ] ); ++ close( fdreply[ 1 ] ); ++ if( commandFile == NULL || replyFile == NULL ) ++ { ++ closeHelper(); ++ return false; ++ } ++ // ok, helper ready, getKdeRunning() will check if it works ++ } ++ } ++ helperFailed = false; ++ helperRunning = true; ++ return true; ++ } ++ ++void nsKDEUtils::closeHelper() ++ { ++ if( commandFile != NULL ) ++ fclose( commandFile ); // this will also make the helper quit ++ if( replyFile != NULL ) ++ fclose( replyFile ); ++ helperRunning = false; ++ } ++ ++void nsKDEUtils::feedCommand( const nsTArray<nsCString>& command ) ++ { ++ for( int i = 0; ++ i < command.Length(); ++ ++i ) ++ { ++ nsCString line = command[ i ]; ++ line.ReplaceSubstring( "\\", "\\" "\\" ); // \ -> \\ , i.e. escape ++ line.ReplaceSubstring( "\n", "\\n" ); ++#ifdef DEBUG_KDE ++ fprintf( stderr, "COMM: %s\n", line.get()); ++#endif ++ fputs( line.get(), commandFile ); ++ fputs( "\n", commandFile ); ++ } ++ fputs( "\\E\n", commandFile ); // done as \E, so it cannot happen in normal data ++ fflush( commandFile ); ++ } +diff --git a/toolkit/xre/nsKDEUtils.h b/toolkit/xre/nsKDEUtils.h +new file mode 100644 +index 0000000000000000000000000000000000000000..c9c1284e294aca6b435f67ff8222a7398cdd761c +--- /dev/null ++++ b/toolkit/xre/nsKDEUtils.h +@@ -0,0 +1,48 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nsKDEUtils_h__ ++#define nsKDEUtils_h__ ++ ++#include "nsString.h" ++#include "nsTArray.h" ++#include <stdio.h> ++ ++typedef struct _GtkWindow GtkWindow; ++ ++class nsIArray; ++ ++class NS_EXPORT nsKDEUtils ++ { ++ public: ++ /* Returns true if running inside a KDE session (regardless of whether there is KDE ++ support available for Firefox). This should be used e.g. when determining ++ dialog button order but not for code that requires the KDE support. */ ++ static bool kdeSession(); ++ /* Returns true if running inside a KDE session and KDE support is available ++ for Firefox. This should be used everywhere where the external helper is needed. */ ++ static bool kdeSupport(); ++ /* Executes the given helper command, returns true if helper returned success. */ ++ static bool command( const nsTArray<nsCString>& command, nsTArray<nsCString>* output = NULL ); ++ static bool command( nsIArray* command, nsIArray** output = NULL ); ++ /* Like command(), but additionally blocks the parent widget like if there was ++ a modal dialog shown and enters the event loop (i.e. there are still paint updates, ++ this is for commands that take long). */ ++ static bool commandBlockUi( const nsTArray<nsCString>& command, GtkWindow* parent, nsTArray<nsCString>* output = NULL ); ++ ++ private: ++ nsKDEUtils(); ++ ~nsKDEUtils(); ++ static nsKDEUtils* self(); ++ bool startHelper(); ++ void closeHelper(); ++ void feedCommand( const nsTArray<nsCString>& command ); ++ bool internalCommand( const nsTArray<nsCString>& command, GtkWindow* parent, bool isParent, ++ nsTArray<nsCString>* output ); ++ FILE* commandFile; ++ FILE* replyFile; ++ }; ++ ++#endif // nsKDEUtils +diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandler/HandlerServiceParent.cpp +index 6eefb48f13161b2756a1aad4417be096d2f944cf..08dfb1e0c7c7b63acbd51d6ef1d7ba1345884287 100644 +--- a/uriloader/exthandler/HandlerServiceParent.cpp ++++ b/uriloader/exthandler/HandlerServiceParent.cpp +@@ -12,7 +12,7 @@ + #include "ContentHandlerService.h" + #include "nsStringEnumerator.h" + #ifdef MOZ_WIDGET_GTK +-# include "unix/nsGNOMERegistry.h" ++# include "unix/nsCommonRegistry.h" + #endif + + using mozilla::dom::ContentHandlerService; +@@ -305,7 +305,7 @@ mozilla::ipc::IPCResult HandlerServiceParent::RecvExistsForProtocolOS( + #ifdef MOZ_WIDGET_GTK + // Check the GNOME registry for a protocol handler + *aHandlerExists = +- nsGNOMERegistry::HandlerExists(PromiseFlatCString(aProtocolScheme).get()); ++ nsCommonRegistry::HandlerExists(PromiseFlatCString(aProtocolScheme).get()); + #else + *aHandlerExists = false; + #endif +diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build +index 0575fd95a5b5cf79e171ab56297b768a0958d4ef..ae0aca14fe30f4e3a4b963bbda48eb7de55e1043 100644 +--- a/uriloader/exthandler/moz.build ++++ b/uriloader/exthandler/moz.build +@@ -86,7 +86,9 @@ else: + + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + UNIFIED_SOURCES += [ ++ "unix/nsCommonRegistry.cpp", + "unix/nsGNOMERegistry.cpp", ++ "unix/nsKDERegistry.cpp", + "unix/nsMIMEInfoUnix.cpp", + ] + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": +@@ -134,6 +136,7 @@ LOCAL_INCLUDES += [ + "/dom/ipc", + "/netwerk/base", + "/netwerk/protocol/http", ++ "/toolkit/xre", + ] + + if CONFIG["MOZ_ENABLE_DBUS"]: +diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..630ab6147db31a6a48b4e119d860cb895af7ef39 +--- /dev/null ++++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp +@@ -0,0 +1,53 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "nsCommonRegistry.h" ++ ++#include "nsGNOMERegistry.h" ++#include "nsKDERegistry.h" ++#include "nsString.h" ++#include "nsKDEUtils.h" ++ ++/* static */ bool ++nsCommonRegistry::HandlerExists(const char *aProtocolScheme) ++{ ++ if( nsKDEUtils::kdeSupport()) ++ return nsKDERegistry::HandlerExists( aProtocolScheme ); ++ return nsGNOMERegistry::HandlerExists( aProtocolScheme ); ++} ++ ++/* static */ nsresult ++nsCommonRegistry::LoadURL(nsIURI *aURL) ++{ ++ if( nsKDEUtils::kdeSupport()) ++ return nsKDERegistry::LoadURL( aURL ); ++ return nsGNOMERegistry::LoadURL( aURL ); ++} ++ ++/* static */ void ++nsCommonRegistry::GetAppDescForScheme(const nsACString& aScheme, ++ nsAString& aDesc) ++{ ++ if( nsKDEUtils::kdeSupport()) ++ return nsKDERegistry::GetAppDescForScheme( aScheme, aDesc ); ++ return nsGNOMERegistry::GetAppDescForScheme( aScheme, aDesc ); ++} ++ ++ ++/* static */ already_AddRefed<nsMIMEInfoBase> ++nsCommonRegistry::GetFromExtension(const nsACString& aFileExt) ++{ ++ if( nsKDEUtils::kdeSupport()) ++ return nsKDERegistry::GetFromExtension( aFileExt ); ++ return nsGNOMERegistry::GetFromExtension( aFileExt ); ++} ++ ++/* static */ already_AddRefed<nsMIMEInfoBase> ++nsCommonRegistry::GetFromType(const nsACString& aMIMEType) ++{ ++ if( nsKDEUtils::kdeSupport()) ++ return nsKDERegistry::GetFromType( aMIMEType ); ++ return nsGNOMERegistry::GetFromType( aMIMEType ); ++} +diff --git a/uriloader/exthandler/unix/nsCommonRegistry.h b/uriloader/exthandler/unix/nsCommonRegistry.h +new file mode 100644 +index 0000000000000000000000000000000000000000..85b3d9cee25ebf9dbb4fb7b6029209834f554468 +--- /dev/null ++++ b/uriloader/exthandler/unix/nsCommonRegistry.h +@@ -0,0 +1,28 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nsCommonRegistry_h__ ++#define nsCommonRegistry_h__ ++ ++#include "nsIURI.h" ++#include "nsCOMPtr.h" ++ ++class nsMIMEInfoBase; ++ ++class nsCommonRegistry ++{ ++ public: ++ static bool HandlerExists(const char *aProtocolScheme); ++ ++ static nsresult LoadURL(nsIURI *aURL); ++ ++ static void GetAppDescForScheme(const nsACString& aScheme, ++ nsAString& aDesc); ++ ++ static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const nsACString& aFileExt); ++ ++ static already_AddRefed<nsMIMEInfoBase> GetFromType(const nsACString& aMIMEType); ++}; ++ ++#endif +diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..f78e64c7e9a3263e4a57e667ccbc6cffb7be76c1 +--- /dev/null ++++ b/uriloader/exthandler/unix/nsKDERegistry.cpp +@@ -0,0 +1,89 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "mozilla/StaticPrefs_browser.h" ++#include "nsKDERegistry.h" ++#include "prlink.h" ++#include "prmem.h" ++#include "nsString.h" ++#include "nsMIMEInfoUnix.h" ++#include "nsKDEUtils.h" ++ ++/* static */ bool ++nsKDERegistry::HandlerExists(const char *aProtocolScheme) ++{ ++ nsTArray<nsCString> command; ++ command.AppendElement( "HANDLEREXISTS"_ns ); ++ command.AppendElement( nsAutoCString( aProtocolScheme )); ++ return nsKDEUtils::command( command ); ++} ++ ++/* static */ nsresult ++nsKDERegistry::LoadURL(nsIURI *aURL) ++{ ++ nsTArray<nsCString> command; ++ command.AppendElement( "OPEN"_ns ); ++ nsCString url; ++ aURL->GetSpec( url ); ++ command.AppendElement( url ); ++ bool rv = nsKDEUtils::command( command ); ++ if (!rv) ++ return NS_ERROR_FAILURE; ++ ++ return NS_OK; ++} ++ ++/* static */ void ++nsKDERegistry::GetAppDescForScheme(const nsACString& aScheme, ++ nsAString& aDesc) ++{ ++ nsTArray<nsCString> command; ++ command.AppendElement( "GETAPPDESCFORSCHEME"_ns ); ++ command.AppendElement( aScheme ); ++ nsTArray<nsCString> output; ++ if( nsKDEUtils::command( command, &output ) && output.Length() == 1 ) ++ CopyUTF8toUTF16( output[ 0 ], aDesc ); ++} ++ ++ ++/* static */ already_AddRefed<nsMIMEInfoBase> ++nsKDERegistry::GetFromExtension(const nsACString& aFileExt) ++{ ++ NS_ASSERTION(aFileExt[0] != '.', "aFileExt shouldn't start with a dot"); ++ nsTArray<nsCString> command; ++ command.AppendElement( "GETFROMEXTENSION"_ns ); ++ command.AppendElement( aFileExt ); ++ return GetFromHelper( command ); ++} ++ ++/* static */ already_AddRefed<nsMIMEInfoBase> ++nsKDERegistry::GetFromType(const nsACString& aMIMEType) ++{ ++ nsTArray<nsCString> command; ++ command.AppendElement( "GETFROMTYPE"_ns ); ++ command.AppendElement( aMIMEType ); ++ return GetFromHelper( command ); ++} ++ ++/* static */ already_AddRefed<nsMIMEInfoBase> ++nsKDERegistry::GetFromHelper(const nsTArray<nsCString>& command) ++{ ++ nsTArray<nsCString> output; ++ if( nsKDEUtils::command( command, &output ) && output.Length() == 3 ) ++ { ++ nsCString mimetype = output[ 0 ]; ++ RefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix( mimetype ); ++ NS_ENSURE_TRUE(mimeInfo, nullptr); ++ nsCString description = output[ 1 ]; ++ mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description)); ++ nsCString handlerAppName = output[ 2 ]; ++ mozilla::StaticPrefs::browser_download_improvements_to_download_panel() ++ ? mimeInfo->SetPreferredAction(nsIMIMEInfo::saveToDisk) ++ : mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault); ++ mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName)); ++ return mimeInfo.forget(); ++ } ++ return nullptr; ++} +diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h +new file mode 100644 +index 0000000000000000000000000000000000000000..5b07eebc6d622d6dad2ddbdaf76f971972af79ce +--- /dev/null ++++ b/uriloader/exthandler/unix/nsKDERegistry.h +@@ -0,0 +1,34 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nsKDERegistry_h__ ++#define nsKDERegistry_h__ ++ ++#include "nsIURI.h" ++#include "nsCOMPtr.h" ++#include "nsTArray.h" ++ ++class nsMIMEInfoBase; ++//class nsAutoCString; ++//class nsCString; ++ ++class nsKDERegistry ++{ ++ public: ++ static bool HandlerExists(const char *aProtocolScheme); ++ ++ static nsresult LoadURL(nsIURI *aURL); ++ ++ static void GetAppDescForScheme(const nsACString& aScheme, ++ nsAString& aDesc); ++ ++ static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const nsACString& aFileExt); ++ ++ static already_AddRefed<nsMIMEInfoBase> GetFromType(const nsACString& aMIMEType); ++ private: ++ static already_AddRefed<nsMIMEInfoBase> GetFromHelper(const nsTArray<nsCString>& command); ++ ++}; ++ ++#endif //nsKDERegistry_h__ +diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +index 7cbefcce3e94202739f55fed93d7efcaeda946fd..84083348c8f1799f0df917ec9d01f4cd4ee45956 100644 +--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp ++++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +@@ -5,16 +5,19 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + #include "nsMIMEInfoUnix.h" +-#include "nsGNOMERegistry.h" ++#include "nsCommonRegistry.h" + #include "nsIGIOService.h" + #include "nsNetCID.h" + #include "nsIIOService.h" + #ifdef MOZ_ENABLE_DBUS + # include "nsDBusHandlerApp.h" + #endif ++#if defined(XP_UNIX) && !defined(XP_MACOSX) ++#include "nsKDEUtils.h" ++#endif + + nsresult nsMIMEInfoUnix::LoadUriInternal(nsIURI* aURI) { +- return nsGNOMERegistry::LoadURL(aURI); ++ return nsCommonRegistry::LoadURL(aURI); + } + + NS_IMETHODIMP +@@ -27,15 +30,15 @@ nsMIMEInfoUnix::GetHasDefaultHandler(bool* _retval) { + *_retval = false; + + if (mClass == eProtocolInfo) { +- *_retval = nsGNOMERegistry::HandlerExists(mSchemeOrType.get()); ++ *_retval = nsCommonRegistry::HandlerExists(mSchemeOrType.get()); + } else { + RefPtr<nsMIMEInfoBase> mimeInfo = +- nsGNOMERegistry::GetFromType(mSchemeOrType); ++ nsCommonRegistry::GetFromType(mSchemeOrType); + if (!mimeInfo) { + nsAutoCString ext; + nsresult rv = GetPrimaryExtension(ext); + if (NS_SUCCEEDED(rv)) { +- mimeInfo = nsGNOMERegistry::GetFromExtension(ext); ++ mimeInfo = nsCommonRegistry::GetFromExtension(ext); + } + } + if (mimeInfo) *_retval = true; +@@ -55,6 +58,23 @@ nsresult nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile) { + nsAutoCString nativePath; + aFile->GetNativePath(nativePath); + ++ if( nsKDEUtils::kdeSupport()) { ++ bool supports; ++ if( NS_SUCCEEDED( GetHasDefaultHandler( &supports )) && supports ) { ++ nsTArray<nsCString> command; ++ command.AppendElement( "OPEN"_ns ); ++ command.AppendElement( nativePath ); ++ command.AppendElement( "MIMETYPE"_ns ); ++ command.AppendElement( mSchemeOrType ); ++ if( nsKDEUtils::command( command )) ++ return NS_OK; ++ } ++ if (!mDefaultApplication) ++ return NS_ERROR_FILE_NOT_FOUND; ++ ++ return LaunchWithIProcess(mDefaultApplication, nativePath); ++ } ++ + nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); + if (!giovfs) { + return NS_ERROR_FAILURE; +diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp +index 8b5820b9fd7175661fe070ddd7c8243f4f94610b..256f94703a924e66230a9929f6cbf81b3c6bffae 100644 +--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp ++++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp +@@ -10,7 +10,7 @@ + #include "nsOSHelperAppService.h" + #include "nsMIMEInfoUnix.h" + #ifdef MOZ_WIDGET_GTK +-# include "nsGNOMERegistry.h" ++# include "nsCommonRegistry.h" + # ifdef MOZ_BUILD_APP_IS_BROWSER + # include "nsIToolkitShellService.h" + # include "nsIGNOMEShellService.h" +@@ -1107,7 +1107,7 @@ nsresult nsOSHelperAppService::OSProtocolHandlerExists( + if (!XRE_IsContentProcess()) { + #ifdef MOZ_WIDGET_GTK + // Check the GNOME registry for a protocol handler +- *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); ++ *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme); + #else + *aHandlerExists = false; + #endif +@@ -1127,7 +1127,7 @@ nsresult nsOSHelperAppService::OSProtocolHandlerExists( + NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription( + const nsACString& aScheme, nsAString& _retval) { + #ifdef MOZ_WIDGET_GTK +- nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval); ++ nsCommonRegistry::GetAppDescForScheme(aScheme, _retval); + return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK; + #else + return NS_ERROR_NOT_AVAILABLE; +@@ -1232,7 +1232,7 @@ already_AddRefed<nsMIMEInfoBase> nsOSHelperAppService::GetFromExtension( + #ifdef MOZ_WIDGET_GTK + LOG("Looking in GNOME registry\n"); + RefPtr<nsMIMEInfoBase> gnomeInfo = +- nsGNOMERegistry::GetFromExtension(aFileExt); ++ nsCommonRegistry::GetFromExtension(aFileExt); + if (gnomeInfo) { + LOG("Got MIMEInfo from GNOME registry\n"); + return gnomeInfo.forget(); +@@ -1347,7 +1347,7 @@ already_AddRefed<nsMIMEInfoBase> nsOSHelperAppService::GetFromType( + + #ifdef MOZ_WIDGET_GTK + if (handler.IsEmpty()) { +- RefPtr<nsMIMEInfoBase> gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType); ++ RefPtr<nsMIMEInfoBase> gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType); + if (gnomeInfo) { + LOG("Got MIMEInfo from GNOME registry without extensions; setting them " + "to %s\n", +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index d60d1995b27850009faccbb98351bf6fe9f7b802..693a5a251400bdd66865d294f87a663c90cd4554 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -162,6 +162,7 @@ LOCAL_INCLUDES += [ + "/layout/xul", + "/other-licenses/atk-1.0", + "/third_party/cups/include", ++ "/toolkit/xre", + "/widget", + "/widget/headless", + ] +diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp +index 8e910464c60f7a0eb3ce7940306ef102f5506ec4..a7e93492103eb810d51477c830762f844f7abfc5 100644 +--- a/widget/gtk/nsFilePicker.cpp ++++ b/widget/gtk/nsFilePicker.cpp +@@ -5,6 +5,7 @@ + + #include <dlfcn.h> + #include <gtk/gtk.h> ++#include <gdk/gdkx.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> +@@ -28,6 +29,8 @@ + #include "WidgetUtilsGtk.h" + + #include "nsFilePicker.h" ++#include "nsKDEUtils.h" ++#include "nsURLHelper.h" + + #undef LOG + #ifdef MOZ_LOGGING +@@ -242,7 +245,9 @@ NS_IMETHODIMP + nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) { + if (aFilter.EqualsLiteral("..apps")) { + // No platform specific thing we can do here, really.... +- return NS_OK; ++ // Unless it's KDE. ++ if( mMode != modeOpen || !nsKDEUtils::kdeSupport()) ++ return NS_OK; + } + + nsAutoCString filter, name; +@@ -352,6 +357,29 @@ nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { + // Can't show two dialogs concurrently with the same filepicker + if (mRunning) return NS_ERROR_NOT_AVAILABLE; + ++ // KDE file picker is not handled via callback ++ if( nsKDEUtils::kdeSupport()) { ++ mCallback = aCallback; ++ mRunning = true; ++ NS_ADDREF_THIS(); ++ g_idle_add([](gpointer data) -> gboolean { ++ nsFilePicker* queuedPicker = (nsFilePicker*) data; ++ int16_t result; ++ queuedPicker->kdeFileDialog(&result); ++ if (queuedPicker->mCallback) { ++ queuedPicker->mCallback->Done(result); ++ queuedPicker->mCallback = nullptr; ++ } else { ++ queuedPicker->mResult = result; ++ } ++ queuedPicker->mRunning = false; ++ NS_RELEASE(queuedPicker); ++ return G_SOURCE_REMOVE; ++ }, this); ++ ++ return NS_OK; ++ } ++ + NS_ConvertUTF16toUTF8 title(mTitle); + + GtkWindow* parent_widget = +@@ -629,6 +657,234 @@ void nsFilePicker::Done(void* file_chooser, gint response) { + NS_RELEASE_THIS(); + } + ++nsCString nsFilePicker::kdeMakeFilter( int index ) ++ { ++ nsCString buf = mFilters[ index ]; ++ for( PRUint32 i = 0; ++ i < buf.Length(); ++ ++i ) ++ if( buf[ i ] == ';' ) // KDE separates just using spaces ++ buf.SetCharAt( ' ', i ); ++ if (!mFilterNames[index].IsEmpty()) ++ { ++ buf += "|"; ++ buf += mFilterNames[index].get(); ++ } ++ return buf; ++ } ++ ++static PRInt32 windowToXid( nsIWidget* widget ) ++ { ++ GtkWindow *parent_widget = GTK_WINDOW(widget->GetNativeData(NS_NATIVE_SHELLWIDGET)); ++ GdkWindow* gdk_window = gtk_widget_get_window( gtk_widget_get_toplevel( GTK_WIDGET( parent_widget ))); ++ return GDK_WINDOW_XID( gdk_window ); ++ } ++ ++NS_IMETHODIMP nsFilePicker::kdeFileDialog(PRInt16 *aReturn) ++ { ++ NS_ENSURE_ARG_POINTER(aReturn); ++ ++ if( mMode == modeOpen && mFilters.Length() == 1 && mFilters[ 0 ].EqualsLiteral( "..apps" )) ++ return kdeAppsDialog( aReturn ); ++ ++ nsCString title; ++ title.Adopt(ToNewUTF8String(mTitle)); ++ ++ const char* arg = NULL; ++ if( mAllowURLs ) ++ { ++ switch( mMode ) ++ { ++ case nsIFilePicker::modeOpen: ++ case nsIFilePicker::modeOpenMultiple: ++ arg = "GETOPENURL"; ++ break; ++ case nsIFilePicker::modeSave: ++ arg = "GETSAVEURL"; ++ break; ++ case nsIFilePicker::modeGetFolder: ++ arg = "GETDIRECTORYURL"; ++ break; ++ } ++ } ++ else ++ { ++ switch( mMode ) ++ { ++ case nsIFilePicker::modeOpen: ++ case nsIFilePicker::modeOpenMultiple: ++ arg = "GETOPENFILENAME"; ++ break; ++ case nsIFilePicker::modeSave: ++ arg = "GETSAVEFILENAME"; ++ break; ++ case nsIFilePicker::modeGetFolder: ++ arg = "GETDIRECTORYFILENAME"; ++ break; ++ } ++ } ++ ++ nsAutoCString directory; ++ if (mDisplayDirectory) { ++ mDisplayDirectory->GetNativePath(directory); ++ } else if (mPrevDisplayDirectory) { ++ mPrevDisplayDirectory->GetNativePath(directory); ++ } ++ ++ nsAutoCString startdir; ++ if (!directory.IsEmpty()) { ++ startdir = directory; ++ } ++ if (mMode == nsIFilePicker::modeSave) { ++ if( !startdir.IsEmpty()) ++ { ++ startdir += "/"; ++ startdir += ToNewUTF8String(mDefault); ++ } ++ else ++ startdir = ToNewUTF8String(mDefault); ++ } ++ ++ nsAutoCString filters; ++ PRInt32 count = mFilters.Length(); ++ if( count == 0 ) //just in case ++ filters = "*"; ++ else ++ { ++ filters = kdeMakeFilter( 0 ); ++ for (PRInt32 i = 1; i < count; ++i) ++ { ++ filters += "\n"; ++ filters += kdeMakeFilter( i ); ++ } ++ } ++ ++ nsTArray<nsCString> command; ++ command.AppendElement( nsAutoCString( arg )); ++ command.AppendElement( startdir ); ++ if( mMode != nsIFilePicker::modeGetFolder ) ++ { ++ command.AppendElement( filters ); ++ nsAutoCString selected; ++ selected.AppendInt( mSelectedType ); ++ command.AppendElement( selected ); ++ } ++ command.AppendElement( title ); ++ if( mMode == nsIFilePicker::modeOpenMultiple ) ++ command.AppendElement( "MULTIPLE"_ns ); ++ if( PRInt32 xid = windowToXid( mParentWidget )) ++ { ++ command.AppendElement( "PARENT"_ns ); ++ nsAutoCString parent; ++ parent.AppendInt( xid ); ++ command.AppendElement( parent ); ++ } ++ ++ nsTArray<nsCString> output; ++ if( nsKDEUtils::commandBlockUi( command, GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)), &output )) ++ { ++ *aReturn = nsIFilePicker::returnOK; ++ mFiles.Clear(); ++ if( mMode != nsIFilePicker::modeGetFolder ) ++ { ++ mSelectedType = atoi( output[ 0 ].get()); ++ output.RemoveElementAt( 0 ); ++ } ++ if (mMode == nsIFilePicker::modeOpenMultiple) ++ { ++ mFileURL.Truncate(); ++ PRUint32 count = output.Length(); ++ for( PRUint32 i = 0; ++ i < count; ++ ++i ) ++ { ++ nsCOMPtr<nsIFile> localfile; ++ nsresult rv = NS_NewNativeLocalFile( output[ i ], ++ PR_FALSE, ++ getter_AddRefs(localfile)); ++ if (NS_SUCCEEDED(rv)) ++ mFiles.AppendObject(localfile); ++ } ++ } ++ else ++ { ++ if( output.Length() == 0 ) ++ mFileURL = nsCString(); ++ else if( mAllowURLs ) ++ mFileURL = output[ 0 ]; ++ else // GetFile() actually requires it to be url even for local files :-/ ++ { ++ nsCOMPtr<nsIFile> localfile; ++ nsresult rv = NS_NewNativeLocalFile( output[ 0 ], ++ PR_FALSE, ++ getter_AddRefs(localfile)); ++ if (NS_SUCCEEDED(rv)) ++ rv = net_GetURLSpecFromActualFile(localfile, mFileURL); ++ } ++ } ++ // Remember last used directory. ++ nsCOMPtr<nsIFile> file; ++ GetFile(getter_AddRefs(file)); ++ if (file) { ++ nsCOMPtr<nsIFile> dir; ++ file->GetParent(getter_AddRefs(dir)); ++ nsCOMPtr<nsIFile> localDir(do_QueryInterface(dir)); ++ if (localDir) { ++ localDir.swap(mPrevDisplayDirectory); ++ } ++ } ++ if (mMode == nsIFilePicker::modeSave) ++ { ++ nsCOMPtr<nsIFile> file; ++ GetFile(getter_AddRefs(file)); ++ if (file) ++ { ++ bool exists = false; ++ file->Exists(&exists); ++ if (exists) // TODO do overwrite check in the helper app ++ *aReturn = nsIFilePicker::returnReplace; ++ } ++ } ++ } ++ else ++ { ++ *aReturn = nsIFilePicker::returnCancel; ++ } ++ return NS_OK; ++ } ++ ++ ++NS_IMETHODIMP nsFilePicker::kdeAppsDialog(PRInt16 *aReturn) ++ { ++ NS_ENSURE_ARG_POINTER(aReturn); ++ ++ nsCString title; ++ title.Adopt(ToNewUTF8String(mTitle)); ++ ++ nsTArray<nsCString> command; ++ command.AppendElement( "APPSDIALOG"_ns ); ++ command.AppendElement( title ); ++ if( PRInt32 xid = windowToXid( mParentWidget )) ++ { ++ command.AppendElement( "PARENT"_ns ); ++ nsAutoCString parent; ++ parent.AppendInt( xid ); ++ command.AppendElement( parent ); ++ } ++ ++ nsTArray<nsCString> output; ++ if( nsKDEUtils::commandBlockUi( command, GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)), &output )) ++ { ++ *aReturn = nsIFilePicker::returnOK; ++ mFileURL = output.Length() > 0 ? output[ 0 ] : nsCString(); ++ } ++ else ++ { ++ *aReturn = nsIFilePicker::returnCancel; ++ } ++ return NS_OK; ++ } ++ + // All below functions available as of GTK 3.20+ + void* nsFilePicker::GtkFileChooserNew(const gchar* title, GtkWindow* parent, + GtkFileChooserAction action, +diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h +index cdfbe64bd35cae10ffc20e07ceff8c830a8b8f91..ec21c7346278e655f2e33044c0291b474b2ddf30 100644 +--- a/widget/gtk/nsFilePicker.h ++++ b/widget/gtk/nsFilePicker.h +@@ -74,6 +74,12 @@ class nsFilePicker : public nsBaseFilePicker { + private: + static nsIFile* mPrevDisplayDirectory; + ++ bool kdeRunning(); ++ bool getKdeRunning(); ++ NS_IMETHODIMP kdeFileDialog(PRInt16 *aReturn); ++ NS_IMETHODIMP kdeAppsDialog(PRInt16 *aReturn); ++ nsCString kdeMakeFilter( int index ); ++ + void* GtkFileChooserNew(const gchar* title, GtkWindow* parent, + GtkFileChooserAction action, + const gchar* accept_label); +diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp +index 88ee06d78db60a84343fd3d23c16e163aead37c3..6ac182a1df36f090e2189a52107a7f94822baf6f 100644 +--- a/xpcom/components/ManifestParser.cpp ++++ b/xpcom/components/ManifestParser.cpp +@@ -43,6 +43,7 @@ + #include "nsIScriptError.h" + #include "nsIXULAppInfo.h" + #include "nsIXULRuntime.h" ++#include "nsKDEUtils.h" + + using namespace mozilla; + +@@ -394,6 +395,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, + constexpr auto kOs = u"os"_ns; + constexpr auto kOsVersion = u"osversion"_ns; + constexpr auto kABI = u"abi"_ns; ++ constexpr auto kDesktop = u"desktop"_ns; + constexpr auto kProcess = u"process"_ns; + #if defined(MOZ_WIDGET_ANDROID) + constexpr auto kTablet = u"tablet"_ns; +@@ -453,6 +455,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, + } + + nsAutoString osVersion; ++ nsAutoString desktop; + #if defined(XP_WIN) + # pragma warning(push) + # pragma warning(disable : 4996) // VC12+ deprecates GetVersionEx +@@ -461,14 +464,17 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, + nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion, + info.dwMinorVersion); + } ++ desktop = u"win"_ns; + # pragma warning(pop) + #elif defined(MOZ_WIDGET_COCOA) + SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor(); + SInt32 minorVersion = nsCocoaFeatures::macOSVersionMinor(); + nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", majorVersion, minorVersion); ++ desktop = u"macosx"_ns); + #elif defined(MOZ_WIDGET_GTK) + nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", gtk_major_version, + gtk_minor_version); ++ desktop = nsKDEUtils::kdeSession() ? u"kde"_ns : u"gnome"_ns; + #elif defined(MOZ_WIDGET_ANDROID) + bool isTablet = false; + if (jni::IsAvailable()) { +@@ -476,6 +482,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, + osVersion.Assign(release->ToString()); + isTablet = java::GeckoAppShell::IsTablet(); + } ++ desktop = u"android"_ns; + #endif + + if (XRE_IsContentProcess()) { +@@ -576,6 +583,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, + : eUnspecified; + #endif + int flags = 0; ++ TriState stDesktop = eUnspecified; + + while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && + ok) { +@@ -585,6 +593,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, + if (CheckStringFlag(kApplication, wtoken, appID, stApp) || + CheckOsFlag(kOs, wtoken, osTarget, stOs) || + CheckStringFlag(kABI, wtoken, abi, stABI) || ++ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || + CheckStringFlag(kProcess, wtoken, process, stProcess) || + CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || + CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || +@@ -643,7 +652,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, + } + + if (!ok || stApp == eBad || stAppVersion == eBad || +- stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad || ++ stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad || stDesktop == eBad || + #ifdef MOZ_WIDGET_ANDROID + stTablet == eBad || + #endif +diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build +index 95ee64e985ac34dd6a3191f1948afa6d05adcb73..9af8f80497b7390b7ca434b6ee3b86b2baf47489 100644 +--- a/xpcom/components/moz.build ++++ b/xpcom/components/moz.build +@@ -71,6 +71,7 @@ LOCAL_INCLUDES += [ + "/js/xpconnect/loader", + "/layout/build", + "/modules/libjar", ++ "/toolkit/xre", + ] + + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": +diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp +index 08c77360de6fdbf3dc579ea49243dbdc18f37ebc..846342d77d65edf7446e0520f3be5ab0da7ebd60 100644 +--- a/xpcom/io/nsLocalFileUnix.cpp ++++ b/xpcom/io/nsLocalFileUnix.cpp +@@ -51,6 +51,7 @@ + + #ifdef MOZ_WIDGET_GTK + # include "nsIGIOService.h" ++# include "nsKDEUtils.h" + #endif + + #ifdef MOZ_WIDGET_COCOA +@@ -2172,10 +2173,19 @@ nsLocalFile::Reveal() { + } + + #ifdef MOZ_WIDGET_GTK ++ nsAutoCString url; + nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); +- if (!giovfs) { +- return NS_ERROR_FAILURE; ++ url = mPath; ++ if(nsKDEUtils::kdeSupport()) { ++ nsTArray<nsCString> command; ++ command.AppendElement( "REVEAL"_ns ); ++ command.AppendElement( mPath ); ++ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + } ++ ++ if (!giovfs) ++ return NS_ERROR_FAILURE; ++ + return giovfs->RevealFile(this); + #elif defined(MOZ_WIDGET_COCOA) + CFURLRef url; +@@ -2197,6 +2207,13 @@ nsLocalFile::Launch() { + } + + #ifdef MOZ_WIDGET_GTK ++ if( nsKDEUtils::kdeSupport()) { ++ nsTArray<nsCString> command; ++ command.AppendElement( "OPEN"_ns ); ++ command.AppendElement( mPath ); ++ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; ++ } ++ + nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); + if (!giovfs) { + return NS_ERROR_FAILURE; diff --git a/0030-Add-KDE-integration-to-Firefox.patch b/0030-Add-KDE-integration-to-Firefox.patch new file mode 100644 index 000000000000..2948e7b519a4 --- /dev/null +++ b/0030-Add-KDE-integration-to-Firefox.patch @@ -0,0 +1,279 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Sirringhaus <msirringhaus@suse.de> +Date: Fri, 31 May 2019 13:55:51 +0300 +Subject: [PATCH] Add KDE integration to Firefox + +Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 +Bug: https://bugzilla.suse.com/show_bug.cgi?id=170055 + +How to apply this patch: + +1. Import and apply it +2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul +3. Find editBookmarkPanelDoneButton +4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style) +5. hg qrefresh +--- + browser/components/preferences/main.js | 18 +++ + browser/components/shell/moz.build | 2 + + .../components/shell/nsKDEShellService.cpp | 109 ++++++++++++++++++ + browser/components/shell/nsKDEShellService.h | 32 +++++ + .../components/shell/nsUnixShellService.cpp | 22 ++++ + browser/components/shell/nsUnixShellService.h | 15 +++ + 6 files changed, 198 insertions(+) + create mode 100644 browser/components/shell/nsKDEShellService.cpp + create mode 100644 browser/components/shell/nsKDEShellService.h + create mode 100644 browser/components/shell/nsUnixShellService.cpp + create mode 100644 browser/components/shell/nsUnixShellService.h + +diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js +index 66b7b066636aabb3004925733990d2a37bc1dc01..6414380cac14d5e297fcdc559c0a6f6c872ad638 100644 +--- a/browser/components/preferences/main.js ++++ b/browser/components/preferences/main.js +@@ -301,6 +301,13 @@ var gMainPane = { + }, backoffTimes[this._backoffIndex]); + } + ++ var env = Components.classes["@mozilla.org/process/environment;1"] ++ .getService(Components.interfaces.nsIEnvironment); ++ var kde_session = 0; ++ if (env.get('KDE_FULL_SESSION') == "true") { ++ kde_session = 1; ++ } ++ + this.initBrowserContainers(); + this.buildContentProcessCountMenuList(); + +@@ -1303,6 +1310,17 @@ var gMainPane = { + } + try { + shellSvc.setDefaultBrowser(true, false); ++ if (kde_session == 1) { ++ var shellObj = Components.classes["@mozilla.org/file/local;1"] ++ .createInstance(Components.interfaces.nsILocalFile); ++ shellObj.initWithPath("/usr/bin/kwriteconfig"); ++ var process = Components.classes["@mozilla.org/process/util;1"] ++ .createInstance(Components.interfaces.nsIProcess); ++ process.init(shellObj); ++ var args = ["--file", "kdeglobals", "--group", "General", "--key", ++ "BrowserApplication", "firefox"]; ++ process.run(false, args, args.length); ++ } + } catch (ex) { + console.error(ex); + return; +diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build +index eedbb0d938fe9f8ee64a1fb780fb1e9e4d40b069..9b364941b85080192f6af8f1530ec034d83bb6f2 100644 +--- a/browser/components/shell/moz.build ++++ b/browser/components/shell/moz.build +@@ -36,6 +36,8 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + + SOURCES += [ + "nsGNOMEShellService.cpp", ++ "nsKDEShellService.cpp", ++ "nsUnixShellService.cpp", + ] + if CONFIG["MOZ_ENABLE_DBUS"]: + SOURCES += [ +diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..152a3aca87ea73477bc75c4e93c01e5a52dda102 +--- /dev/null ++++ b/browser/components/shell/nsKDEShellService.cpp +@@ -0,0 +1,109 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "mozilla/ArrayUtils.h" ++ ++#include "nsCOMPtr.h" ++#include "nsKDEShellService.h" ++#include "nsShellService.h" ++#include "nsKDEUtils.h" ++#include "nsIPrefService.h" ++#include "nsIProcess.h" ++#include "nsIFile.h" ++#include "nsServiceManagerUtils.h" ++#include "nsComponentManagerUtils.h" ++#include "nsIMutableArray.h" ++#include "nsISupportsPrimitives.h" ++#include "nsArrayUtils.h" ++ ++using namespace mozilla; ++ ++nsresult ++nsKDEShellService::Init() ++{ ++ if( !nsKDEUtils::kdeSupport()) ++ return NS_ERROR_NOT_AVAILABLE; ++ return NS_OK; ++} ++ ++NS_IMPL_ISUPPORTS(nsKDEShellService, nsIGNOMEShellService, nsIShellService) ++ ++NS_IMETHODIMP ++nsKDEShellService::IsDefaultBrowser(bool aForAllTypes, ++ bool* aIsDefaultBrowser) ++{ ++ *aIsDefaultBrowser = false; ++ ++ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); ++ if (!command) ++ return NS_ERROR_FAILURE; ++ ++ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); ++ if (!str) ++ return NS_ERROR_FAILURE; ++ ++ str->SetData("ISDEFAULTBROWSER"_ns); ++ command->AppendElement( str ); ++ ++ if( nsKDEUtils::command( command )) ++ *aIsDefaultBrowser = true; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes, ++ bool aForAllUsers) ++{ ++ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); ++ if (!command) ++ return NS_ERROR_FAILURE; ++ ++ nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); ++ nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); ++ if (!cmdstr || !paramstr) ++ return NS_ERROR_FAILURE; ++ ++ cmdstr->SetData("SETDEFAULTBROWSER"_ns); ++ command->AppendElement( cmdstr ); ++ ++ paramstr->SetData( aClaimAllTypes ? "ALLTYPES"_ns : "NORMAL"_ns ); ++ command->AppendElement( paramstr ); ++ ++ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::GetCanSetDesktopBackground(bool* aResult) ++{ ++ *aResult = true; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::SetDesktopBackground(dom::Element* aElement, ++ int32_t aPosition, ++ const nsACString& aImageName) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::IsDefaultForScheme(nsTSubstring<char> const& aScheme, bool* aIsDefaultBrowser) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ +diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h +new file mode 100644 +index 0000000000000000000000000000000000000000..8b0bb19164352453cfa453dd87c19263160b9ad8 +--- /dev/null ++++ b/browser/components/shell/nsKDEShellService.h +@@ -0,0 +1,32 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nskdeshellservice_h____ ++#define nskdeshellservice_h____ ++ ++#include "nsIGNOMEShellService.h" ++#include "nsToolkitShellService.h" ++#include "nsString.h" ++#include "mozilla/Attributes.h" ++ ++class nsKDEShellService final : public nsIGNOMEShellService, ++ public nsToolkitShellService ++{ ++public: ++ nsKDEShellService() : mCheckedThisSession(false) { } ++ ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSISHELLSERVICE ++ NS_DECL_NSIGNOMESHELLSERVICE ++ ++ nsresult Init(); ++ ++private: ++ ~nsKDEShellService() {} ++ ++ bool mCheckedThisSession; ++}; ++ ++#endif // nskdeshellservice_h____ +diff --git a/browser/components/shell/nsUnixShellService.cpp b/browser/components/shell/nsUnixShellService.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..abf266ebdc52e136f495911da3454e69c770c6db +--- /dev/null ++++ b/browser/components/shell/nsUnixShellService.cpp +@@ -0,0 +1,22 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++ ++#include "nsUnixShellService.h" ++#include "nsGNOMEShellService.h" ++#include "nsKDEShellService.h" ++#include "nsKDEUtils.h" ++#include "mozilla/ModuleUtils.h" ++ ++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) ++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init) ++ ++NS_IMETHODIMP ++nsUnixShellServiceConstructor(REFNSIID aIID, void **aResult) ++{ ++ if( nsKDEUtils::kdeSupport()) ++ return nsKDEShellServiceConstructor( aIID, aResult ); ++ return nsGNOMEShellServiceConstructor( aIID, aResult ); ++} +diff --git a/browser/components/shell/nsUnixShellService.h b/browser/components/shell/nsUnixShellService.h +new file mode 100644 +index 0000000000000000000000000000000000000000..26b5dbac47dd9a8ec1fcb6c93575cca750692735 +--- /dev/null ++++ b/browser/components/shell/nsUnixShellService.h +@@ -0,0 +1,15 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++ ++#ifndef nsunixshellservice_h____ ++#define nsunixshellservice_h____ ++ ++#include "nsIGNOMEShellService.h" ++ ++NS_IMETHODIMP ++nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult); ++ ++#endif // nsunixshellservice_h____ diff --git a/0031-Imported-patch-firefox-branded-icons.patch.patch b/0031-Imported-patch-firefox-branded-icons.patch.patch new file mode 100644 index 000000000000..24900511f37c --- /dev/null +++ b/0031-Imported-patch-firefox-branded-icons.patch.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Sirringhaus <msirringhaus@suse.de> +Date: Tue, 21 May 2019 17:27:05 +0200 +Subject: [PATCH] Imported patch firefox-branded-icons.patch + +--- + browser/branding/branding-common.mozbuild | 3 +++ + browser/installer/package-manifest.in | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/browser/branding/branding-common.mozbuild b/browser/branding/branding-common.mozbuild +index 4e737310b37bc0bdbe4367e51c0f245eefbdbb50..0faf21fb931a0ed72495197d2152fd74bde6455e 100644 +--- a/browser/branding/branding-common.mozbuild ++++ b/browser/branding/branding-common.mozbuild +@@ -30,6 +30,9 @@ def FirefoxBranding(): + FINAL_TARGET_FILES.chrome.icons.default += [ + 'default128.png', + 'default16.png', ++ 'default22.png', ++ 'default24.png', ++ 'default256.png', + 'default32.png', + 'default48.png', + 'default64.png', +diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in +index 42e26fafdf7e90a5fbda3d798d1e1d807a5b4a69..efa69113d9365b83ff55b549018b749e2f76d0c2 100644 +--- a/browser/installer/package-manifest.in ++++ b/browser/installer/package-manifest.in +@@ -228,10 +228,13 @@ + @RESPATH@/chrome/toolkit.manifest + #ifdef MOZ_GTK + @RESPATH@/browser/chrome/icons/default/default16.png ++@RESPATH@/browser/chrome/icons/default/default22.png ++@RESPATH@/browser/chrome/icons/default/default24.png + @RESPATH@/browser/chrome/icons/default/default32.png + @RESPATH@/browser/chrome/icons/default/default48.png + @RESPATH@/browser/chrome/icons/default/default64.png + @RESPATH@/browser/chrome/icons/default/default128.png ++@RESPATH@/browser/chrome/icons/default/default256.png + #endif + @RESPATH@/browser/features/* + diff --git a/0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch b/0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch new file mode 100644 index 000000000000..5d2227f4d0da --- /dev/null +++ b/0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch @@ -0,0 +1,160 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= <canaltinova@gmail.com> +Date: Mon, 13 Feb 2023 13:52:46 +0000 +Subject: [PATCH] Bug 1807652 - Rename some methods to not conflict with + aliases r=mstange + +We have some aliases with the names of LockedRWFromAnyThread and +LockedRWOnThread. We also had some methods with the same name. clang and gcc +that were before version 12 weren't complaining about that. But apparently +starting from gcc 13, it became an error. This patch renames the methods so we +don't conflict with these aliases anymore. + +Differential Revision: https://phabricator.services.mozilla.com/D169507 +--- + tools/profiler/core/platform.cpp | 14 +++++++------- + tools/profiler/public/ProfilerThreadRegistration.h | 4 ++-- + tools/profiler/public/ProfilerThreadRegistry.h | 4 ++-- + tools/profiler/tests/gtest/GeckoProfiler.cpp | 6 +++--- + 4 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/tools/profiler/core/platform.cpp b/tools/profiler/core/platform.cpp +index 3a6e5df144d45f3fc530e373cbc6e58332aecf0a..1f116ad26095f6a34b533bec8d8872c1d2770556 100644 +--- a/tools/profiler/core/platform.cpp ++++ b/tools/profiler/core/platform.cpp +@@ -1178,7 +1178,7 @@ class ActivePS { + continue; + } + ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData = +- offThreadRef.LockedRWFromAnyThread(); ++ offThreadRef.GetLockedRWFromAnyThread(); + MOZ_RELEASE_ASSERT(array.append(ProfiledThreadListElement{ + profiledThreadData->Info().RegisterTime(), + lockedThreadData->GetJSContext(), profiledThreadData})); +@@ -4210,7 +4210,7 @@ void SamplerThread::Run() { + + if (threadStackSampling) { + ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock +- lockedThreadData = offThreadRef.LockedRWFromAnyThread(); ++ lockedThreadData = offThreadRef.GetLockedRWFromAnyThread(); + // Suspend the thread and collect its stack data in the local + // buffer. + mSampler.SuspendAndSampleAndResumeThread( +@@ -4924,7 +4924,7 @@ static ProfilingStack* locked_register_thread( + aLock, aOffThreadRef.UnlockedConstReaderCRef().Info()); + if (threadProfilingFeatures != ThreadProfilingFeatures::NotProfiled) { + ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock +- lockedRWFromAnyThread = aOffThreadRef.LockedRWFromAnyThread(); ++ lockedRWFromAnyThread = aOffThreadRef.GetLockedRWFromAnyThread(); + + ProfiledThreadData* profiledThreadData = ActivePS::AddLiveProfiledThread( + aLock, MakeUnique<ProfiledThreadData>( +@@ -5790,7 +5790,7 @@ static void locked_profiler_start(PSLockRef aLock, PowerOfTwo32 aCapacity, + ActivePS::ProfilingFeaturesForThread(aLock, info); + if (threadProfilingFeatures != ThreadProfilingFeatures::NotProfiled) { + ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData = +- offThreadRef.LockedRWFromAnyThread(); ++ offThreadRef.GetLockedRWFromAnyThread(); + ProfiledThreadData* profiledThreadData = ActivePS::AddLiveProfiledThread( + aLock, MakeUnique<ProfiledThreadData>(info)); + lockedThreadData->SetProfilingFeaturesAndData(threadProfilingFeatures, +@@ -6014,7 +6014,7 @@ void profiler_ensure_started(PowerOfTwo32 aCapacity, double aInterval, + } + + ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData = +- offThreadRef.LockedRWFromAnyThread(); ++ offThreadRef.GetLockedRWFromAnyThread(); + + lockedThreadData->ClearProfilingFeaturesAndData(aLock); + +@@ -6357,7 +6357,7 @@ static void locked_unregister_thread( + // thread that is in the process of disappearing. + + ThreadRegistration::OnThreadRef::RWOnThreadWithLock lockedThreadData = +- aOnThreadRef.LockedRWOnThread(); ++ aOnThreadRef.GetLockedRWOnThread(); + + ProfiledThreadData* profiledThreadData = + lockedThreadData->GetProfiledThreadData(lock); +@@ -6878,7 +6878,7 @@ void profiler_clear_js_context() { + // The profiler mutex must be locked before the ThreadRegistration's. + PSAutoLock lock; + ThreadRegistration::OnThreadRef::RWOnThreadWithLock lockedThreadData = +- aOnThreadRef.LockedRWOnThread(); ++ aOnThreadRef.GetLockedRWOnThread(); + + if (ProfiledThreadData* profiledThreadData = + lockedThreadData->GetProfiledThreadData(lock); +diff --git a/tools/profiler/public/ProfilerThreadRegistration.h b/tools/profiler/public/ProfilerThreadRegistration.h +index fafe06e446d6392ce93b5804e753a1434d7151ec..3fb931987dc840e6690a1258cdbf5edc734f94a0 100644 +--- a/tools/profiler/public/ProfilerThreadRegistration.h ++++ b/tools/profiler/public/ProfilerThreadRegistration.h +@@ -214,14 +214,14 @@ class ThreadRegistration { + DataLock mDataLock; + }; + +- [[nodiscard]] RWOnThreadWithLock LockedRWOnThread() { ++ [[nodiscard]] RWOnThreadWithLock GetLockedRWOnThread() { + return RWOnThreadWithLock{mThreadRegistration->mData, + mThreadRegistration->mDataMutex}; + } + + template <typename F> + auto WithLockedRWOnThread(F&& aF) { +- RWOnThreadWithLock lockedData = LockedRWOnThread(); ++ RWOnThreadWithLock lockedData = GetLockedRWOnThread(); + return std::forward<F>(aF)(lockedData.DataRef()); + } + +diff --git a/tools/profiler/public/ProfilerThreadRegistry.h b/tools/profiler/public/ProfilerThreadRegistry.h +index 76e0c0a78a7cc95b6977055b8f36729dd327a623..4d0fd3ef68049133f3fdf8a7e84e3eec1448ba3e 100644 +--- a/tools/profiler/public/ProfilerThreadRegistry.h ++++ b/tools/profiler/public/ProfilerThreadRegistry.h +@@ -177,14 +177,14 @@ class ThreadRegistry { + ThreadRegistration::DataLock mDataLock; + }; + +- [[nodiscard]] RWFromAnyThreadWithLock LockedRWFromAnyThread() { ++ [[nodiscard]] RWFromAnyThreadWithLock GetLockedRWFromAnyThread() { + return RWFromAnyThreadWithLock{mThreadRegistration->mData, + mThreadRegistration->mDataMutex}; + } + + template <typename F> + auto WithLockedRWFromAnyThread(F&& aF) { +- RWFromAnyThreadWithLock lockedData = LockedRWFromAnyThread(); ++ RWFromAnyThreadWithLock lockedData = GetLockedRWFromAnyThread(); + return std::forward<F>(aF)(lockedData.DataRef()); + } + +diff --git a/tools/profiler/tests/gtest/GeckoProfiler.cpp b/tools/profiler/tests/gtest/GeckoProfiler.cpp +index 223aed970d95d0c90de3a91d2c5444ee010d701f..20623ea50ea5314b7e054c5cb78235f7bd96b0f1 100644 +--- a/tools/profiler/tests/gtest/GeckoProfiler.cpp ++++ b/tools/profiler/tests/gtest/GeckoProfiler.cpp +@@ -622,7 +622,7 @@ TEST(GeckoProfiler, ThreadRegistration_DataAccess) + EXPECT_FALSE(TR::IsDataMutexLockedOnCurrentThread()); + { + TR::OnThreadRef::RWOnThreadWithLock rwOnThreadWithLock = +- aOnThreadRef.LockedRWOnThread(); ++ aOnThreadRef.GetLockedRWOnThread(); + EXPECT_TRUE(TR::IsDataMutexLockedOnCurrentThread()); + TestConstLockedRWOnThread(rwOnThreadWithLock.DataCRef(), + beforeRegistration, afterRegistration, +@@ -1021,7 +1021,7 @@ TEST(GeckoProfiler, ThreadRegistry_DataAccess) + EXPECT_FALSE(TR::IsDataMutexLockedOnCurrentThread()); + { + TRy::OffThreadRef::RWFromAnyThreadWithLock rwFromAnyThreadWithLock = +- aOffThreadRef.LockedRWFromAnyThread(); ++ aOffThreadRef.GetLockedRWFromAnyThread(); + if (profiler_current_thread_id() == testThreadId) { + EXPECT_TRUE(TR::IsDataMutexLockedOnCurrentThread()); + } +@@ -1158,7 +1158,7 @@ TEST(GeckoProfiler, ThreadRegistration_RegistrationEdgeCases) + PR_Sleep(PR_MillisecondsToInterval(1)); + } + TRy::OffThreadRef::RWFromAnyThreadWithLock rwFromAnyThreadWithLock = +- aOffThreadRef.LockedRWFromAnyThread(); ++ aOffThreadRef.GetLockedRWFromAnyThread(); + ++otherThreadReads; + if (otherThreadReads % 1000 == 0) { + PR_Sleep(PR_MillisecondsToInterval(1)); diff --git a/0033-Allow-Eme-for-arm-and-Aarch64.patch b/0033-Allow-Eme-for-arm-and-Aarch64.patch new file mode 100644 index 000000000000..1b8561198ab2 --- /dev/null +++ b/0033-Allow-Eme-for-arm-and-Aarch64.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com> +Date: Sat, 11 Feb 2023 14:57:59 +0200 +Subject: [PATCH] Allow Eme for arm and Aarch64 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com> +--- + toolkit/moz.configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/toolkit/moz.configure b/toolkit/moz.configure +index be091370a786c902a736a2950c01a0c50bc30748..1c61f8fbb8807221449d95c9edaa4b3d5dd907e4 100644 +--- a/toolkit/moz.configure ++++ b/toolkit/moz.configure +@@ -875,7 +875,7 @@ def eme_choices(target): + if ( + target.kernel in ("WINNT", "Linux") + and target.os != "Android" +- and target.cpu in ("x86", "x86_64") ++ and target.cpu in ("x86", "x86_64", "arm", "aarch64") + ): + return ("widevine",) + if target.kernel == "WINNT" and target.cpu == "aarch64": diff --git a/0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch b/0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch deleted file mode 100644 index f3eb981dfc86..000000000000 --- a/0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 6dce72ee07bd835e613fece4f04fed3817ddd993 Mon Sep 17 00:00:00 2001 -From: Thomas Deutschmann <whissi@gentoo.org> -Date: Thu, 23 Sep 2021 16:31:41 +0200 -Subject: [PATCH 33/34] bmo#1725828: Preload dependencies for the Widevine CDM - when sandboxing it on Linux - -Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> ---- - dom/media/gmp/GMPChild.cpp | 8 +++++++- - dom/media/gmp/GMPParent.cpp | 14 ++++++++++++++ - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp -index 07d62f3ef0..c793ab5992 100644 ---- a/dom/media/gmp/GMPChild.cpp -+++ b/dom/media/gmp/GMPChild.cpp -@@ -232,8 +232,14 @@ mozilla::ipc::IPCResult GMPChild::RecvPreloadLibs(const nsCString& aLibs) { - } - #elif defined(XP_LINUX) - constexpr static const char* whitelist[] = { -+ // NSS libraries used by clearkey. - "libfreeblpriv3.so", - "libsoftokn3.so", -+ // glibc libraries merged into libc.so.6; see bug 1725828 and -+ // the corresponding code in GMPParent.cpp. -+ "libdl.so.2", -+ "libpthread.so.0", -+ "librt.so.1", - }; - - nsTArray<nsCString> libs; -@@ -256,7 +262,7 @@ mozilla::ipc::IPCResult GMPChild::RecvPreloadLibs(const nsCString& aLibs) { - } - // End bug 1698718 logging. - -- MOZ_CRASH("Couldn't load lib needed by NSS"); -+ MOZ_CRASH("Couldn't load lib needed by media plugin"); - } - } - } -diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp -index f7e745d2c0..8c9d5306d4 100644 ---- a/dom/media/gmp/GMPParent.cpp -+++ b/dom/media/gmp/GMPParent.cpp -@@ -876,6 +876,20 @@ RefPtr<GenericPromise> GMPParent::ParseChromiumManifest( - return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__); - } - -+#ifdef XP_LINUX -+ // These glibc libraries were merged into libc.so.6 as of glibc -+ // 2.34; they now exist only as stub libraries for compatibility and -+ // newly linked code won't depend on them, so we need to ensure -+ // they're loaded for plugins that may have been linked against a -+ // different version of glibc. (See also bug 1725828.) -+ if (!mDisplayName.EqualsASCII("clearkey")) { -+ if (!mLibs.IsEmpty()) { -+ mLibs.AppendLiteral(", "); -+ } -+ mLibs.AppendLiteral("libdl.so.2, libpthread.so.0, librt.so.1"); -+ } -+#endif -+ - nsCString codecsString = NS_ConvertUTF16toUTF8(m.mX_cdm_codecs); - nsTArray<nsCString> codecs; - SplitAt(",", codecsString, codecs); --- -2.33.1 - diff --git a/0034-bmo-1730397-Update-packed_simd-to-a-version-that-sup.patch b/0034-bmo-1730397-Update-packed_simd-to-a-version-that-sup.patch deleted file mode 100644 index e3aab0029216..000000000000 --- a/0034-bmo-1730397-Update-packed_simd-to-a-version-that-sup.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 6781ae3ee2e3020ffd57a12b1a73ea9dc57697a7 Mon Sep 17 00:00:00 2001 -From: Thomas Deutschmann <whissi@gentoo.org> -Date: Fri, 22 Oct 2021 17:04:11 +0200 -Subject: [PATCH 34/34] bmo#1730397: Update packed_simd to a version that - supports rustc >= 1.56 - -Bug: https://bugs.gentoo.org/819486 -Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> ---- - .cargo/config.in | 2 +- - Cargo.lock | 3 ++- - Cargo.toml | 2 +- - .../rust/packed_simd/.cargo-checksum.json | 2 +- - third_party/rust/packed_simd/Cargo.toml | 3 +++ - third_party/rust/packed_simd/build.rs | 26 +++++++++++++++++++ - third_party/rust/packed_simd/src/lib.rs | 3 ++- - 7 files changed, 36 insertions(+), 5 deletions(-) - -diff --git a/.cargo/config.in b/.cargo/config.in -index 07857770c7..33a98506c7 100644 ---- a/.cargo/config.in -+++ b/.cargo/config.in -@@ -74,7 +74,7 @@ rev = "746743227485a83123784df0c53227ab466612ed" - [source."https://github.com/hsivonen/packed_simd"] - git = "https://github.com/hsivonen/packed_simd" - replace-with = "vendored-sources" --rev = "6a16f954950401b92b4e220fbf2dfaf6f00e1fb2" -+rev = "8b4bd7d8229660a749dbe419a57ea01df9de5453" - - [source."https://github.com/hsivonen/chardetng_c"] - git = "https://github.com/hsivonen/chardetng_c" -diff --git a/Cargo.lock b/Cargo.lock -index ad2322d711..1d5d6d475c 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -3529,9 +3529,10 @@ dependencies = [ - [[package]] - name = "packed_simd" - version = "0.3.4" --source = "git+https://github.com/hsivonen/packed_simd?rev=6a16f954950401b92b4e220fbf2dfaf6f00e1fb2#6a16f954950401b92b4e220fbf2dfaf6f00e1fb2" -+source = "git+https://github.com/hsivonen/packed_simd?rev=8b4bd7d8229660a749dbe419a57ea01df9de5453#8b4bd7d8229660a749dbe419a57ea01df9de5453" - dependencies = [ - "cfg-if 0.1.10", -+ "rustc_version", - ] - - [[package]] -diff --git a/Cargo.toml b/Cargo.toml -index a333f214ae..2ee8516676 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -81,7 +81,7 @@ opt-level = 2 - chardetng = { git = "https://github.com/hsivonen/chardetng", rev="302c995f91f44cf26e77dc4758ad56c3ff0153ad" } - chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" } - libudev-sys = { path = "dom/webauthn/libudev-sys" } --packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="6a16f954950401b92b4e220fbf2dfaf6f00e1fb2" } -+packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="8b4bd7d8229660a749dbe419a57ea01df9de5453" } - minidump_writer_linux = { git = "https://github.com/msirringhaus/minidump_writer_linux.git", rev = "029ac0d54b237f27dc7d8d4e51bc0fb076e5e852" } - # The following overrides point to dummy projects, as a temporary measure until this is resolved: - # https://github.com/rust-lang/cargo/issues/6179 -diff --git a/third_party/rust/packed_simd/.cargo-checksum.json b/third_party/rust/packed_simd/.cargo-checksum.json -index a5ad93450e..51a1cee537 100644 ---- a/third_party/rust/packed_simd/.cargo-checksum.json -+++ b/third_party/rust/packed_simd/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{".appveyor.yml":"f1ed01850e0d725f9498f52a1a63ddf40702ad6e0bf5b2d7c4c04d76e96794a3",".travis.yml":"d56de6531d3c4880e3aada85ac8e6d7388e5d781871e181cb8ade2a746d5d5f5","Cargo.toml":"e94ccb82002e8b55680c2c5fec554a9e864c5f354e113278d0aa927df279330d","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"49d01e49a33393af64fa6c813b6a724f68a4d1abfbedcb96413651ed105aa820","bors.toml":"dee881dc69b9b7834e4eba5d95c3ed5a416d4628815a167d6a22d4cb4fb064b8","build.rs":"c3312e786c7fcb8f16c0785fe235ebbcf43fbeab6d7d683752f62043ca92d887","ci/all.sh":"2ae6b2445b4db83833e40b37efd0016c6b9879ee988b9b3ef94db5439a3e1606","ci/android-install-ndk.sh":"0f1746108cc30bf9b9ba45bcde7b19fc1a8bdf5b0258035b4eb8dc69b75efac4","ci/android-install-sdk.sh":"3490432022c5c8f5a115c084f7a9aca1626f96c0c87ffb62019228c4346b47e4","ci/android-sysimage.sh":"ebf4e5daa1f0fe1b2092b79f0f3f161c4c4275cb744e52352c4d81ab451e4c5a","ci/benchmark.sh":"b61d19ef6b90deba8fb79dee74c8b062d94844676293da346da87bb78a9a49a4","ci/deploy_and_run_on_ios_simulator.rs":"ec8ecf82d92072676aa47f0d1a3d021b60a7ae3531153ef12d2ff4541fc294dc","ci/docker/aarch64-linux-android/Dockerfile":"ace2e7d33c87bc0f6d3962a4a3408c04557646f7f51ab99cfbf574906796b016","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"da88c0d50f16dc08448c7fdf1fa5ed2cbe576acf9e7dd85b5b818621b2a8c702","ci/docker/arm-linux-androideabi/Dockerfile":"370e55d3330a413a3ccf677b3afb3e0ef9018a5fab263faa97ae8ac017fc2286","ci/docker/arm-unknown-linux-gnueabi/Dockerfile":"bb5f8ae890707c128652290ffc544447643bf12037ddd73c6ad6989f848cb380","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"1afaefcbc05b740859acd4e067bc92439be6bcbe8f2e9678474fb434bcd398d9","ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile":"8282ea707a94109beed47a57574755e2d58401735904a03f85fb64c578c53b4f","ci/docker/i586-unknown-linux-gnu/Dockerfile":"49792922269f371bd29da4727e9085101b27be67a6b97755d0196c63317f7abb","ci/docker/i686-unknown-linux-gnu/Dockerfile":"49792922269f371bd29da4727e9085101b27be67a6b97755d0196c63317f7abb","ci/docker/mips-unknown-linux-gnu/Dockerfile":"b2ebc25797612c4f8395fe9d407725156044955bfbcf442036b7f55b43a5f9da","ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile":"b0c1692ac65bc56dd30494b1993d8e929c48cc9c4b92029b7c7592af6d4f9220","ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile":"4e9249c179300138141d0b2b7401b11897f64aed69f541f078c1db4594df2827","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"3164c52b0dcbb01afa78292b15b5c43503ccf0491cf6eb801ec2bf22ae274e52","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"786f799d0b56eb54d7b6c4b00e1aed4ce81776e14e44767e083c89d014b72004","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"e8bc363837cd9c2d8b22402acb8c1c329efc11ba5d12170603d2fe2eae9da059","ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile":"47998d45b781d797b9e6085ebe898d90de0c952b54537a8db4e8d7503eb032d9","ci/docker/s390x-unknown-linux-gnu/Dockerfile":"93fb44df3d7fd31ead158570667c97b5076a05c3d968af4a84bc13819a8f2db8","ci/docker/sparc64-unknown-linux-gnu/Dockerfile":"da1c39a3ff1fe22e41395fa7c8934e90b4c1788e551b9aec6e38bfd94effc437","ci/docker/thumbv7neon-linux-androideabi/Dockerfile":"c2decd5591bd7a09378901bef629cd944acf052eb55e4f35b79eb9cb4d62246a","ci/docker/thumbv7neon-unknown-linux-gnueabihf/Dockerfile":"51955a8bf3c4d440f47382af6f5426ebff94ab01a04da36175babda9a057740f","ci/docker/wasm32-unknown-unknown/Dockerfile":"3e5f294bc1e004aa599086c2af49d6f3e7459fa250f5fbdd60cf67d53db78758","ci/docker/x86_64-linux-android/Dockerfile":"685040273cf350d5509e580ac451555efa19790c8723ca2af066adadc6880ad2","ci/docker/x86_64-unknown-linux-gnu-emulated/Dockerfile":"44b6203d9290bfdc53d81219f0937e1110847a23dd982ec8c4de388354f01536","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"7f4e3ca5fa288ea70edb4d1f75309708cd30b192e2e4444e61c4d5b3b58f89cf","ci/dox.sh":"434e9611c52e389312d2b03564adf09429f10cc76fe66a8644adb104903b87b7","ci/linux-s390x.sh":"d6b732d7795b4ba131326aff893bca6228a7d2eb0e9402f135705413dbbe0dce","ci/linux-sparc64.sh":"c92966838b1ab7ad3b7a344833ee726aba6b647cf5952e56f0ad1ba420b13325","ci/lld-shim.rs":"3d7f71ec23a49e2b67f694a0168786f9a954dda15f5a138815d966643fd3fcc3","ci/max_line_width.sh":"0a1518bba4c9ecaa55694cb2e9930d0e19c265baabf73143f17f9cf285aaa5bb","ci/run-docker.sh":"92e036390ad9b0d16f109579df1b5ced2e72e9afea40c7d011400ebd3a2a90de","ci/run.sh":"41dd6a60efaaeae9661a01370cce98b631f78392859a0cf68c946c0a16edf5f7","ci/run_examples.sh":"d1a23c6c35374a0678ba5114b9b8fefd8be0a79e774872a8bf0898d1baca18d0","ci/runtest-android.rs":"145a8e9799a5223975061fe7e586ade5669ee4877a7d7a4cf6b4ab48e8e36c7c","ci/setup_benchmarks.sh":"fae3960023f6f3d1388cd2ad22fdbab4b075f1f29dd4292d7994a20783beb6cf","ci/test-runner-linux":"c8aa6025cff5306f4f31d0c61dc5f9d4dd5a1d189ab613ef8d4c367c694d9ccd","contributing.md":"2cc8c9c560ae17867e69b06d09b758dbf7bc39eb774ada50a743724b10acc0a2","perf-guide/.gitignore":"fe82c7da551079d832cf74200b0b359b4df9828cb4a0416fa7384f07a2ae6a13","perf-guide/book.toml":"115a98284126c6b180178b44713314cc494f08a71662ee2ce15cf67f17a51064","perf-guide/src/SUMMARY.md":"3e03bffc991fdc2050f3d51842d72d9d21ea6abab56a3baf3b2d5973a78b89e1","perf-guide/src/ascii.css":"29afb08833b2fe2250f0412e1fa1161a2432a0820a14953c87124407417c741a","perf-guide/src/bound_checks.md":"5e4991ff58a183ef0cd9fdc1feb4cd12d083b44bdf87393bbb0927808ef3ce7d","perf-guide/src/float-math/approx.md":"8c09032fa2d795a0c5db1775826c850d28eb2627846d0965c60ee72de63735ad","perf-guide/src/float-math/fma.md":"311076ba4b741d604a82e74b83a8d7e8c318fcbd7f64c4392d1cf5af95c60243","perf-guide/src/float-math/fp.md":"04153e775ab6e4f0d7837bcc515230d327b04edfa34c84ce9c9e10ebaeef2be8","perf-guide/src/float-math/svml.md":"0798873b8eedaeda5fed62dc91645b57c20775a02d3cd74d8bd06958f1516506","perf-guide/src/introduction.md":"9f5a19e9e6751f25d2daad39891a0cc600974527ec4c8305843f9618910671bd","perf-guide/src/prof/linux.md":"447731eb5de7d69166728fdbc5ecb0c0c9db678ea493b45a592d67dd002184c0","perf-guide/src/prof/mca.md":"f56d54f3d20e7aa4d32052186e8237b03d65971eb5d112802b442570ff11d344","perf-guide/src/prof/profiling.md":"8a650c0fd6ede0964789bb6577557eeef1d8226a896788602ce61528e260e43c","perf-guide/src/target-feature/attribute.md":"615f88dca0a707b6c416fa605435dd6e1fb5361cc639429cbf68cd87624bd78b","perf-guide/src/target-feature/features.md":"17077760ff24c006b606dd21889c53d87228f4311f3ba3a574f9afdeacd86165","perf-guide/src/target-feature/inlining.md":"7ed1d7068d8173a00d84c16cfe5871cd68b9f04f8d0cca2d01ebc84957ebf2f6","perf-guide/src/target-feature/practice.md":"c4b371842e0086df178488fec97f20def8f0c62ee588bcd25fd948b9b1fa227e","perf-guide/src/target-feature/runtime.md":"835425f5ee597fb3e51d36e725a81ebee29f4561231d19563cd4da81dbb1cfcb","perf-guide/src/target-feature/rustflags.md":"ab49712e9293a65d74d540ba4784fcb57ff1119ec05a575d895c071f1a620f64","perf-guide/src/vert-hor-ops.md":"c6211c0ee91e60552ec592d89d9d957eedc21dee3cbd89e1ad6765ea06a27471","rustfmt.toml":"de6101d0670bad65fb3b337d56957d2a024e017e5ab146ec784d77312daaf8ff","src/api.rs":"f6e92f056565e6fd93f98829a408aee9e790251e0cbd8a8bc30c8662b4d6fabb","src/api/bit_manip.rs":"c47a4d0f7451f7e35d07715e4f39a472e07457fd456fdb726864a4f6887252a3","src/api/bitmask.rs":"6d2beefd62ee5d9c8eb060bee6abc641616bf828c99f82abf97b21bf004e894b","src/api/cast.rs":"03b94a3d316ac7b7be7068810044911e965e889a0ace7bae762749ca74a92747","src/api/cast/macros.rs":"b0a14d0c83ad2ebb7a275180f6d9e3f2bc312ba57a7d3d6c39fad4e0f20f9408","src/api/cast/v128.rs":"2107ea6a426a0fe37a0aa6a03a579ff0bdeb5a1599ea76e2d81734a82f41276d","src/api/cast/v16.rs":"d785cf93b8e61200c9ae1c32b9f5e9d9518e87c261c56bcaf92f2e47b0009eb4","src/api/cast/v256.rs":"b81fcfd367a5de532d922dedf18579e53666facef7957c0e1bc827825e500ae6","src/api/cast/v32.rs":"2aac9ec0a67a97328ba908b13a1ff98da3dcd7781910d592d31f9207cbd9a7d2","src/api/cast/v512.rs":"33b33de818f8d4eccc982bc2f3951a8b3d03e9762ec02789b3df82e3f5ed3fc3","src/api/cast/v64.rs":"ec878917d52a8c952633251b3a938a2cbe0a63fee6d12c15840d9f1343d1f394","src/api/cmp.rs":"357c3a2a09c6d4611c32dd7fa95be2fae933d513e229026ec9b44451a77b884e","src/api/cmp/eq.rs":"60f70f355bae4cb5b17db53204cacc3890f70670611c17df638d4c04f7cc8075","src/api/cmp/ord.rs":"589f7234761c294fa5df8f525bc4acd5a47cdb602207d524a0d4e19804cd9695","src/api/cmp/partial_eq.rs":"3ed23d2a930b0f9750c3a5309da766b03dc4f9c4d375b42ad3c50fe732693d15","src/api/cmp/partial_ord.rs":"e16b11805c94048acd058c93994b5bc74bb187f8d7e3b86a87df60e1601467f9","src/api/cmp/vertical.rs":"de3d62f38eba817299aa16f1e1939954c9a447e316509397465c2830852ba053","src/api/default.rs":"67bf21c134127d12a7028c8b88a57f0ceee8ccbd74976da8ca74eb9f16a174d5","src/api/fmt.rs":"67fb804bb86b6cd77cf8cd492b5733ce437071b66fe3297278b8a6552c325dda","src/api/fmt/binary.rs":"35cb5c266197d6224d598fb3d286e5fe48ef0c01ed356c2ff6fe9ba946f96a92","src/api/fmt/debug.rs":"aa18eea443bf353fea3db8b1a025132bbcaf91e747ecfa43b8d9fce9af395a0c","src/api/fmt/lower_hex.rs":"69d5be366631af309f214e8031c8c20267fcc27a695eac6f45c6bc1df72a67e6","src/api/fmt/octal.rs":"9eb11ba3d990213f3c7f1ec25edba7ce997cb1320e16d308c83498ba6b9bfbd9","src/api/fmt/upper_hex.rs":"a4637d085b7bb20e759ce58e08435b510a563ba3dd468af2b03560fdc5511562","src/api/from.rs":"2e599d8329cb05eaf06224cc441355c4b7b51254fc19256619333be8c149d444","src/api/from/from_array.rs":"dd3fc64fb17d6184bb60343f8da26a05edf0e5f3c14caf55d49fa15e21d948dc","src/api/from/from_vector.rs":"9764371aa9e6005aace74dea14f59e5611a095b7cf42707940924749282c52f0","src/api/hash.rs":"5076ece87969592c876486f5b1ea8affbeaec379d1a14a30859e0aa5592019de","src/api/into_bits.rs":"82297f0697d67b5a015e904e7e6e7b2a7066ba825bc54b94b4ff3e22d7a1eefb","src/api/into_bits/arch_specific.rs":"4acab22af90112072a2608fafc66fccf18cbf2e641b72af28404d30833cfe5c6","src/api/into_bits/macros.rs":"d762406de25aedff88d460dec7a80dc8e825a2a419d53218ce007efa6a1d3e04","src/api/into_bits/v128.rs":"3c502b9ce85bfcc727d6f053d49030b0ba9f46bd8e9fa5aa109382a2033f9f87","src/api/into_bits/v16.rs":"f4f4f61ba88aa51b158ec56ca3dce234349aea0daf2b3029a14ab5125d1e41e5","src/api/into_bits/v256.rs":"c24c3676707a0feb868dabe00766d74deab176794f905f79056337198c7cf790","src/api/into_bits/v32.rs":"905ba683d342fa32f4202b80bb46530807bd0a5b588f6c2e8c9f475223c47775","src/api/into_bits/v512.rs":"7cd89005215a9326eed8a742125dcbf981cba1aca72a313478eabf3df71b1160","src/api/into_bits/v64.rs":"d6238022ccff7b92e55b3f6017fc269acb6f36330a6d7e8fb389853a0f1b6478","src/api/math.rs":"8b2a2fc651917a850539f993aa0b9e5bf4da67b11685285b8de8cdca311719ec","src/api/math/float.rs":"61d2794d68262a1090ae473bd30793b5f65cf732f32a6694a3af2ce5d9225616","src/api/math/float/abs.rs":"5b6b2701e2e11135b7ce58a05052ea8120e10e4702c95d046b9d21b827b26bf8","src/api/math/float/consts.rs":"78acba000d3fa527111300b6327c1932de9c4c1e02d4174e1a5615c01463d38c","src/api/math/float/cos.rs":"4c2dd7173728ef189314f1576c9486e03be21b7da98843b2f9011282a7979e31","src/api/math/float/exp.rs":"7c6d5f1e304f498a01cfa23b92380c815d7da0ad94eae3483783bc377d287eef","src/api/math/float/ln.rs":"54c7583f3df793b39ff57534fade27b41bb992439e5dc178252f5ca3190a3e54","src/api/math/float/mul_add.rs":"62cac77660d20159276d4c9ef066eb90c81cbddb808e8e157182c607625ad2eb","src/api/math/float/mul_adde.rs":"bae056ee9f3a70df39ec3c3b2f6437c65303888a7b843ef1a5bcf1f5aca0e602","src/api/math/float/powf.rs":"9ddb938984b36d39d82a82f862f80df8f7fb013f1d222d45698d41d88472f568","src/api/math/float/recpre.rs":"589225794ff1dbf31158dff660e6d4509ecc8befbb57c633900dea5ac0b840d6","src/api/math/float/rsqrte.rs":"a32abdcc318d7ccc8448231f54d75b884b7cbeb03a7d595713ab6243036f4dbf","src/api/math/float/sin.rs":"cbd3622b7df74f19691743001c8cf747a201f8977ad90542fee915f37dcd1e49","src/api/math/float/sqrt.rs":"0c66d5d63fb08e4d99c6b82a8828e41173aff1ac9fa1a2764a11fac217ccf2ac","src/api/math/float/sqrte.rs":"731e1c9f321b662accdd27dacb3aac2e8043b7aecb2f2161dde733bd9f025362","src/api/minimal.rs":"1f22bcc528555444e76de569ec0ae2029b9ae9d04805efeafa93369c8098036b","src/api/minimal/iuf.rs":"819cff26d3e196f807645bcc1d79eb27d9f175edb89910f2274d52a1e913cd11","src/api/minimal/mask.rs":"0cae10ae1fc65f5070e686c0c79bfba27b86b33d6c399367bd4848fb367dcec4","src/api/minimal/ptr.rs":"f65ebf21866a863485344432d9a7a9b7418f7fad5fdf841a4e2fa56ec0766ad0","src/api/ops.rs":"3e273b277a0f3019d42c3c59ca94a5afd4885d5ae6d2182e5089bbeec9de42ee","src/api/ops/scalar_arithmetic.rs":"d2d5ad897a59dd0787544f927e0e7ca4072c3e58b0f4a2324083312b0d5a21d7","src/api/ops/scalar_bitwise.rs":"482204e459ca6be79568e1c9f70adbe2d2151412ddf122fb2161be8ebb51c40c","src/api/ops/scalar_mask_bitwise.rs":"c250f52042e37b22d57256c80d4604104cfd2fbe2a2e127c676267270ca5d350","src/api/ops/scalar_shifts.rs":"987f8fdebeedc16e3d77c1b732e7826ef70633c541d16dfa290845d5c6289150","src/api/ops/vector_arithmetic.rs":"ddca15d09ddeef502c2ed66117a62300ca65d87e959e8b622d767bdf1c307910","src/api/ops/vector_bitwise.rs":"b3968f7005b649edcc22a54e2379b14d5ee19045f2e784029805781ae043b5ee","src/api/ops/vector_float_min_max.rs":"76bf8cb607e2c442923c1da1061a6b80d742d607408033c2a3761161114cf2a0","src/api/ops/vector_int_min_max.rs":"a378789c6ff9b32a51fbd0a97ffd36ed102cd1fe6a067d2b02017c1df342def6","src/api/ops/vector_mask_bitwise.rs":"5052d18517d765415d40327e6e8e55a312daaca0a5e2aec959bfa54b1675f9c8","src/api/ops/vector_neg.rs":"5c62f6b0221983cdbd23cd0a3af3672e6ba1255f0dfe8b19aae6fbd6503e231b","src/api/ops/vector_rotates.rs":"03cbe8a400fd7c688e4ee771a990a6754f2031b1a59b19ae81158b21471167e5","src/api/ops/vector_shifts.rs":"9bf69d0087268f61009e39aea52e03a90f378910206b6a28e8393178b6a5d0e0","src/api/ptr.rs":"8a793251bed6130dcfb2f1519ceaa18b751bbb15875928d0fb6deb5a5e07523a","src/api/ptr/gather_scatter.rs":"138b02b0fa1fdd785b95fc7048488be7e3ef277e0bc6ac5affb26af6a11d41a6","src/api/reductions.rs":"ae5baca81352ecd44526d6c30c0a1feeda475ec73ddd3c3ec6b14e944e5448ee","src/api/reductions/bitwise.rs":"8bf910ae226188bd15fc7e125f058cd2566b6186fcd0cd8fd020f352c39ce139","src/api/reductions/float_arithmetic.rs":"3997125f87c7bac07fffda3a1d814e0e6c77ca83099546a9e2fb8dc92231129f","src/api/reductions/integer_arithmetic.rs":"47471da1c5f859489680bb5d34ced3d3aa20081c16053a3af121a4496fcb57bf","src/api/reductions/mask.rs":"db83327a950e33a317f37fd33ca4e20c347fb415975ec024f3e23da8509425af","src/api/reductions/min_max.rs":"d40ccad10220ae5982785015bef92e4b0749583c2b060cad0aa4f92d99491c3b","src/api/select.rs":"a98e2ccf9fc6bdeed32d337c8675bc96c2fbe2cc34fbf149ad6047fb8e749774","src/api/shuffle.rs":"6d1e5970b9fc8555a667c2924151070dd21584e81da8a9668d6bfe16f4a0db82","src/api/shuffle1_dyn.rs":"bfea5a91905b31444e9ef7ca6eddb7a9606b7e22d3f71bb842eb2795a0346620","src/api/slice.rs":"ee87484e8af329547b9a5d4f2a69e8bed6ea10bbd96270d706083843d4eea2ac","src/api/slice/from_slice.rs":"53691dc9958dec4180004a42d140552b405e8cd875caa282e89af378dd63c8bc","src/api/slice/write_to_slice.rs":"3dd2e511af43dc6fa911dd0b12f6f00323e0acd1202a01365db400557d52a89b","src/api/swap_bytes.rs":"4a6792a2e49a77475e1b237592b4b2804dbddb79c474331acd0dd71b36934259","src/codegen.rs":"a29d38fa0a85eaf787fb49989e625bf64effd5f39c126fbb2a24be206d2a3917","src/codegen/bit_manip.rs":"17ecebcff1f080e712fea5eb51602a73f4201ed56a198220342c8eb55bb92692","src/codegen/llvm.rs":"5bc6751293f9f184cf23d5df448c7d58b58b799e41c7a91f8ca41a5ba56e64ec","src/codegen/math.rs":"35f96e37a78fcf0cdb02146b7f27a45108fe06a37fc2a54d8851ce131a326178","src/codegen/math/float.rs":"dd86c0449e576c83b719700962ac017c332987fac08d91f2b7a2b1b883598170","src/codegen/math/float/abs.rs":"f56e2b4b8055ea861c1f5cbc6b6e1d8e7e5af163b62c13574ddee4e09513bfbc","src/codegen/math/float/cos.rs":"ef3b511a24d23045b310315e80348a9b7fedb576fc2de52d74290616a0abeb2a","src/codegen/math/float/cos_pi.rs":"4e7631a5d73dac21531e09ef1802d1180f8997509c2c8fa9f67f322194263a97","src/codegen/math/float/exp.rs":"61b691598c41b5622f24e4320c1bdd08701e612a516438bdddcc728fc3405c8c","src/codegen/math/float/ln.rs":"46b718b1ba8c9d99e1ad40f53d20dfde08a3063ca7bd2a9fdd6698e060da687e","src/codegen/math/float/macros.rs":"dd42135fff13f9aca4fd3a1a4e14c7e6c31aadc6d817d63b0d2fb9e62e062744","src/codegen/math/float/mul_add.rs":"a37bf764345d4b1714f97e83897b7cf0855fc2811704bcbc0012db91825339e1","src/codegen/math/float/mul_adde.rs":"c75702bfcb361de45964a93caf959a695ef2376bd069227600b8c6872665c755","src/codegen/math/float/powf.rs":"642346e982bc4c39203de0864d2149c4179cd7b21cf67a2951687932b4675872","src/codegen/math/float/sin.rs":"9d68164c90cdca6a85155040cdac42e27342ebe0b925273ef1593df721af4258","src/codegen/math/float/sin_cos_pi.rs":"9be02ad48585a1e8d99129382fbffbaed47852f15459256a708850b6b7a75405","src/codegen/math/float/sin_pi.rs":"9890347905b4d4a3c7341c3eb06406e46e60582bcf6960688bd727e5dadc6c57","src/codegen/math/float/sqrt.rs":"e3c60dcfb0c6d2fc62adabcc931b2d4040b83cab294dea36443fb4b89eb79e34","src/codegen/math/float/sqrte.rs":"f0f4ef9eb475ae41bcc7ec6a95ad744ba6b36925faa8b2c2814004396d196b63","src/codegen/pointer_sized_int.rs":"a70697169c28218b56fd2e8d5353f2e00671d1150d0c8cef77d613bdfacd84cb","src/codegen/reductions.rs":"645e2514746d01387ddd07f0aa4ffd8430cc9ab428d4fb13773ea319fa25dd95","src/codegen/reductions/mask.rs":"8f1afe6aabf096a3278e1fc3a30f736e04aa8b9ce96373cee22162d18cfe2702","src/codegen/reductions/mask/aarch64.rs":"cba6e17603d39795dcfe8339b6b7d8714c3e162a1f0a635979f037aa24fe4206","src/codegen/reductions/mask/arm.rs":"9447904818aa2c7c25d0963eead452a639a11ca7dbd6d21eedbfcaade07a0f33","src/codegen/reductions/mask/fallback.rs":"7a0ef9f7fd03ae318b495b95e121350cd61caffc5cc6ee17fabf130d5d933453","src/codegen/reductions/mask/fallback_impl.rs":"76547f396e55ef403327c77c314cf8db8c7a5c9b9819bfb925abeacf130249e5","src/codegen/reductions/mask/x86.rs":"4c0457b6276f9809223590092a4c77e73812330326cdabd28df06820de10a310","src/codegen/reductions/mask/x86/avx.rs":"b4913d87844c522903641cbbf10db4551addb1ce5e9e78278e21612fa65c733b","src/codegen/reductions/mask/x86/avx2.rs":"677aed3f056285285daa3adff8bc65e739630b4424defa6d9665e160f027507e","src/codegen/reductions/mask/x86/sse.rs":"5a827c6f8e1074e324f6e4c778942badb6c09d747a7142de01cadec1240b3428","src/codegen/reductions/mask/x86/sse2.rs":"bc38e6c31cb4b3d62147eba6cac264e519e2a48e0f7ce9010cfa9ef0cf0ec9fd","src/codegen/shuffle.rs":"99a0b52c2470097b028af134221099baba383446a01c7dc3ae560209880bcdb7","src/codegen/shuffle1_dyn.rs":"abbc95305dad815ab2ded3e8357791bcff080414668b55a4d397558a1d202d01","src/codegen/swap_bytes.rs":"1d6cdc716eadddc92b4fd506b2445a821caa8dc00860447de09d7ebd69c2087f","src/codegen/v128.rs":"94226b31ec403d18d9d2fe06713f147c9c79e9b5f9105089088266313f843185","src/codegen/v16.rs":"ddec4ffb66b6f7aaffb9a1780c5ddba82557abd74f45073d335047e04cf74924","src/codegen/v256.rs":"6b63917f0444118d6b1595bff2045e59b97c4d24012bd575f69f1f0efc5a0241","src/codegen/v32.rs":"3477b3c5540aed86e61e2f5807dd31db947413cec9181c587d93ed6ec74f0eba","src/codegen/v512.rs":"5854f99d3aabc4cd42b28a20d9ce447756dc2ba024a409a69b6a8ae1f1842fc5","src/codegen/v64.rs":"e9e89caebfe63d10c0cbca61e4dfdba3b7e02ee0989170f80beed23237ddd950","src/codegen/vPtr.rs":"711c753a08d53a2879c4fb87a0762c46ce4e34c22f0ca88d2e4c557a0f679969","src/codegen/vSize.rs":"eeee9858749aa82142b27bc120d1989bb74a6b82e1e4efbbeaccc9634dc9acfc","src/lib.rs":"f2e2d0867734a62e1f468e5d3e15fbd01a15f8aafd5d65a8a3cb7ab95ffd61c4","src/masks.rs":"be05e923ac58fe6eb61311561b5583cd306574f206dc09fe8e3c7de3dd0c1433","src/sealed.rs":"ae7fdeaf5d84cd7710ed730ca72ca7eaba93df6cb0acb183e5c0a7327acf197f","src/testing.rs":"1d3a7862ef625e235a5734ad7204e68d350f902c0695182b1f08a0552432416e","src/testing/macros.rs":"6378856d7a40ba5ec5c7c0dad6327d79f0c77266921c24296d10aed6c68e9b98","src/testing/utils.rs":"5ec6a47b836f364ec6dede19750a19eaac704162327d03041eb0f007d5f8d75c","src/v128.rs":"16cf9a8e7156b899ee9b9cd3f2dba9d13ec63289bea8c3ee9ae2e43ad9510288","src/v16.rs":"cb6465cf1e00bf530183af1819b9fe3d7eec978f8765d5e85d9b58a39a4b4045","src/v256.rs":"fe235017da18c7f3c361831c60e3173ad304d8ea1e95d64ebebc79da2d708511","src/v32.rs":"145d347855bac59b2de6508f9e594654e6c330423af9edc0e2ac8f4d1abdf45e","src/v512.rs":"f372f277f3e62eb5c945bb1c460333fdb17b6974fcc876633788ff53bded9599","src/v64.rs":"0b8079881b71575e3414be0b7f8f7eaba65281ba6732f2b2f61f73e95b6f48f7","src/vPtr.rs":"8b3e433d487180bb4304ff71245ecad90f0010f43e139a72027b672abe58facc","src/vSize.rs":"eda5aa020706cbf94d15bada41a0c2a35fc8f3f37cb7c2cd6f34d201399a495e","tests/endianness.rs":"7db22078f31fe1421fc2d21f2e6b9df5eb0bdc99c10f6985d3a74c0df8f205dc"},"package":null} -\ No newline at end of file -+{"files":{".appveyor.yml":"f1ed01850e0d725f9498f52a1a63ddf40702ad6e0bf5b2d7c4c04d76e96794a3",".travis.yml":"d56de6531d3c4880e3aada85ac8e6d7388e5d781871e181cb8ade2a746d5d5f5","Cargo.toml":"b6f063e65c1f8d71c51204444d4e93cd514cb310dedfd1e85b731c1acc63ab4a","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"49d01e49a33393af64fa6c813b6a724f68a4d1abfbedcb96413651ed105aa820","bors.toml":"dee881dc69b9b7834e4eba5d95c3ed5a416d4628815a167d6a22d4cb4fb064b8","build.rs":"9d7f69238f5dfefa3c49744159c2f484feb4c32c9aefe79696ebe97a89b2957f","ci/all.sh":"2ae6b2445b4db83833e40b37efd0016c6b9879ee988b9b3ef94db5439a3e1606","ci/android-install-ndk.sh":"0f1746108cc30bf9b9ba45bcde7b19fc1a8bdf5b0258035b4eb8dc69b75efac4","ci/android-install-sdk.sh":"3490432022c5c8f5a115c084f7a9aca1626f96c0c87ffb62019228c4346b47e4","ci/android-sysimage.sh":"ebf4e5daa1f0fe1b2092b79f0f3f161c4c4275cb744e52352c4d81ab451e4c5a","ci/benchmark.sh":"b61d19ef6b90deba8fb79dee74c8b062d94844676293da346da87bb78a9a49a4","ci/deploy_and_run_on_ios_simulator.rs":"ec8ecf82d92072676aa47f0d1a3d021b60a7ae3531153ef12d2ff4541fc294dc","ci/docker/aarch64-linux-android/Dockerfile":"ace2e7d33c87bc0f6d3962a4a3408c04557646f7f51ab99cfbf574906796b016","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"da88c0d50f16dc08448c7fdf1fa5ed2cbe576acf9e7dd85b5b818621b2a8c702","ci/docker/arm-linux-androideabi/Dockerfile":"370e55d3330a413a3ccf677b3afb3e0ef9018a5fab263faa97ae8ac017fc2286","ci/docker/arm-unknown-linux-gnueabi/Dockerfile":"bb5f8ae890707c128652290ffc544447643bf12037ddd73c6ad6989f848cb380","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"1afaefcbc05b740859acd4e067bc92439be6bcbe8f2e9678474fb434bcd398d9","ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile":"8282ea707a94109beed47a57574755e2d58401735904a03f85fb64c578c53b4f","ci/docker/i586-unknown-linux-gnu/Dockerfile":"49792922269f371bd29da4727e9085101b27be67a6b97755d0196c63317f7abb","ci/docker/i686-unknown-linux-gnu/Dockerfile":"49792922269f371bd29da4727e9085101b27be67a6b97755d0196c63317f7abb","ci/docker/mips-unknown-linux-gnu/Dockerfile":"b2ebc25797612c4f8395fe9d407725156044955bfbcf442036b7f55b43a5f9da","ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile":"b0c1692ac65bc56dd30494b1993d8e929c48cc9c4b92029b7c7592af6d4f9220","ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile":"4e9249c179300138141d0b2b7401b11897f64aed69f541f078c1db4594df2827","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"3164c52b0dcbb01afa78292b15b5c43503ccf0491cf6eb801ec2bf22ae274e52","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"786f799d0b56eb54d7b6c4b00e1aed4ce81776e14e44767e083c89d014b72004","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"e8bc363837cd9c2d8b22402acb8c1c329efc11ba5d12170603d2fe2eae9da059","ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile":"47998d45b781d797b9e6085ebe898d90de0c952b54537a8db4e8d7503eb032d9","ci/docker/s390x-unknown-linux-gnu/Dockerfile":"93fb44df3d7fd31ead158570667c97b5076a05c3d968af4a84bc13819a8f2db8","ci/docker/sparc64-unknown-linux-gnu/Dockerfile":"da1c39a3ff1fe22e41395fa7c8934e90b4c1788e551b9aec6e38bfd94effc437","ci/docker/thumbv7neon-linux-androideabi/Dockerfile":"c2decd5591bd7a09378901bef629cd944acf052eb55e4f35b79eb9cb4d62246a","ci/docker/thumbv7neon-unknown-linux-gnueabihf/Dockerfile":"51955a8bf3c4d440f47382af6f5426ebff94ab01a04da36175babda9a057740f","ci/docker/wasm32-unknown-unknown/Dockerfile":"3e5f294bc1e004aa599086c2af49d6f3e7459fa250f5fbdd60cf67d53db78758","ci/docker/x86_64-linux-android/Dockerfile":"685040273cf350d5509e580ac451555efa19790c8723ca2af066adadc6880ad2","ci/docker/x86_64-unknown-linux-gnu-emulated/Dockerfile":"44b6203d9290bfdc53d81219f0937e1110847a23dd982ec8c4de388354f01536","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"7f4e3ca5fa288ea70edb4d1f75309708cd30b192e2e4444e61c4d5b3b58f89cf","ci/dox.sh":"434e9611c52e389312d2b03564adf09429f10cc76fe66a8644adb104903b87b7","ci/linux-s390x.sh":"d6b732d7795b4ba131326aff893bca6228a7d2eb0e9402f135705413dbbe0dce","ci/linux-sparc64.sh":"c92966838b1ab7ad3b7a344833ee726aba6b647cf5952e56f0ad1ba420b13325","ci/lld-shim.rs":"3d7f71ec23a49e2b67f694a0168786f9a954dda15f5a138815d966643fd3fcc3","ci/max_line_width.sh":"0a1518bba4c9ecaa55694cb2e9930d0e19c265baabf73143f17f9cf285aaa5bb","ci/run-docker.sh":"92e036390ad9b0d16f109579df1b5ced2e72e9afea40c7d011400ebd3a2a90de","ci/run.sh":"41dd6a60efaaeae9661a01370cce98b631f78392859a0cf68c946c0a16edf5f7","ci/run_examples.sh":"d1a23c6c35374a0678ba5114b9b8fefd8be0a79e774872a8bf0898d1baca18d0","ci/runtest-android.rs":"145a8e9799a5223975061fe7e586ade5669ee4877a7d7a4cf6b4ab48e8e36c7c","ci/setup_benchmarks.sh":"fae3960023f6f3d1388cd2ad22fdbab4b075f1f29dd4292d7994a20783beb6cf","ci/test-runner-linux":"c8aa6025cff5306f4f31d0c61dc5f9d4dd5a1d189ab613ef8d4c367c694d9ccd","contributing.md":"2cc8c9c560ae17867e69b06d09b758dbf7bc39eb774ada50a743724b10acc0a2","perf-guide/.gitignore":"fe82c7da551079d832cf74200b0b359b4df9828cb4a0416fa7384f07a2ae6a13","perf-guide/book.toml":"115a98284126c6b180178b44713314cc494f08a71662ee2ce15cf67f17a51064","perf-guide/src/SUMMARY.md":"3e03bffc991fdc2050f3d51842d72d9d21ea6abab56a3baf3b2d5973a78b89e1","perf-guide/src/ascii.css":"29afb08833b2fe2250f0412e1fa1161a2432a0820a14953c87124407417c741a","perf-guide/src/bound_checks.md":"5e4991ff58a183ef0cd9fdc1feb4cd12d083b44bdf87393bbb0927808ef3ce7d","perf-guide/src/float-math/approx.md":"8c09032fa2d795a0c5db1775826c850d28eb2627846d0965c60ee72de63735ad","perf-guide/src/float-math/fma.md":"311076ba4b741d604a82e74b83a8d7e8c318fcbd7f64c4392d1cf5af95c60243","perf-guide/src/float-math/fp.md":"04153e775ab6e4f0d7837bcc515230d327b04edfa34c84ce9c9e10ebaeef2be8","perf-guide/src/float-math/svml.md":"0798873b8eedaeda5fed62dc91645b57c20775a02d3cd74d8bd06958f1516506","perf-guide/src/introduction.md":"9f5a19e9e6751f25d2daad39891a0cc600974527ec4c8305843f9618910671bd","perf-guide/src/prof/linux.md":"447731eb5de7d69166728fdbc5ecb0c0c9db678ea493b45a592d67dd002184c0","perf-guide/src/prof/mca.md":"f56d54f3d20e7aa4d32052186e8237b03d65971eb5d112802b442570ff11d344","perf-guide/src/prof/profiling.md":"8a650c0fd6ede0964789bb6577557eeef1d8226a896788602ce61528e260e43c","perf-guide/src/target-feature/attribute.md":"615f88dca0a707b6c416fa605435dd6e1fb5361cc639429cbf68cd87624bd78b","perf-guide/src/target-feature/features.md":"17077760ff24c006b606dd21889c53d87228f4311f3ba3a574f9afdeacd86165","perf-guide/src/target-feature/inlining.md":"7ed1d7068d8173a00d84c16cfe5871cd68b9f04f8d0cca2d01ebc84957ebf2f6","perf-guide/src/target-feature/practice.md":"c4b371842e0086df178488fec97f20def8f0c62ee588bcd25fd948b9b1fa227e","perf-guide/src/target-feature/runtime.md":"835425f5ee597fb3e51d36e725a81ebee29f4561231d19563cd4da81dbb1cfcb","perf-guide/src/target-feature/rustflags.md":"ab49712e9293a65d74d540ba4784fcb57ff1119ec05a575d895c071f1a620f64","perf-guide/src/vert-hor-ops.md":"c6211c0ee91e60552ec592d89d9d957eedc21dee3cbd89e1ad6765ea06a27471","rustfmt.toml":"de6101d0670bad65fb3b337d56957d2a024e017e5ab146ec784d77312daaf8ff","src/api.rs":"f6e92f056565e6fd93f98829a408aee9e790251e0cbd8a8bc30c8662b4d6fabb","src/api/bit_manip.rs":"c47a4d0f7451f7e35d07715e4f39a472e07457fd456fdb726864a4f6887252a3","src/api/bitmask.rs":"6d2beefd62ee5d9c8eb060bee6abc641616bf828c99f82abf97b21bf004e894b","src/api/cast.rs":"03b94a3d316ac7b7be7068810044911e965e889a0ace7bae762749ca74a92747","src/api/cast/macros.rs":"b0a14d0c83ad2ebb7a275180f6d9e3f2bc312ba57a7d3d6c39fad4e0f20f9408","src/api/cast/v128.rs":"2107ea6a426a0fe37a0aa6a03a579ff0bdeb5a1599ea76e2d81734a82f41276d","src/api/cast/v16.rs":"d785cf93b8e61200c9ae1c32b9f5e9d9518e87c261c56bcaf92f2e47b0009eb4","src/api/cast/v256.rs":"b81fcfd367a5de532d922dedf18579e53666facef7957c0e1bc827825e500ae6","src/api/cast/v32.rs":"2aac9ec0a67a97328ba908b13a1ff98da3dcd7781910d592d31f9207cbd9a7d2","src/api/cast/v512.rs":"33b33de818f8d4eccc982bc2f3951a8b3d03e9762ec02789b3df82e3f5ed3fc3","src/api/cast/v64.rs":"ec878917d52a8c952633251b3a938a2cbe0a63fee6d12c15840d9f1343d1f394","src/api/cmp.rs":"357c3a2a09c6d4611c32dd7fa95be2fae933d513e229026ec9b44451a77b884e","src/api/cmp/eq.rs":"60f70f355bae4cb5b17db53204cacc3890f70670611c17df638d4c04f7cc8075","src/api/cmp/ord.rs":"589f7234761c294fa5df8f525bc4acd5a47cdb602207d524a0d4e19804cd9695","src/api/cmp/partial_eq.rs":"3ed23d2a930b0f9750c3a5309da766b03dc4f9c4d375b42ad3c50fe732693d15","src/api/cmp/partial_ord.rs":"e16b11805c94048acd058c93994b5bc74bb187f8d7e3b86a87df60e1601467f9","src/api/cmp/vertical.rs":"de3d62f38eba817299aa16f1e1939954c9a447e316509397465c2830852ba053","src/api/default.rs":"67bf21c134127d12a7028c8b88a57f0ceee8ccbd74976da8ca74eb9f16a174d5","src/api/fmt.rs":"67fb804bb86b6cd77cf8cd492b5733ce437071b66fe3297278b8a6552c325dda","src/api/fmt/binary.rs":"35cb5c266197d6224d598fb3d286e5fe48ef0c01ed356c2ff6fe9ba946f96a92","src/api/fmt/debug.rs":"aa18eea443bf353fea3db8b1a025132bbcaf91e747ecfa43b8d9fce9af395a0c","src/api/fmt/lower_hex.rs":"69d5be366631af309f214e8031c8c20267fcc27a695eac6f45c6bc1df72a67e6","src/api/fmt/octal.rs":"9eb11ba3d990213f3c7f1ec25edba7ce997cb1320e16d308c83498ba6b9bfbd9","src/api/fmt/upper_hex.rs":"a4637d085b7bb20e759ce58e08435b510a563ba3dd468af2b03560fdc5511562","src/api/from.rs":"2e599d8329cb05eaf06224cc441355c4b7b51254fc19256619333be8c149d444","src/api/from/from_array.rs":"dd3fc64fb17d6184bb60343f8da26a05edf0e5f3c14caf55d49fa15e21d948dc","src/api/from/from_vector.rs":"9764371aa9e6005aace74dea14f59e5611a095b7cf42707940924749282c52f0","src/api/hash.rs":"5076ece87969592c876486f5b1ea8affbeaec379d1a14a30859e0aa5592019de","src/api/into_bits.rs":"82297f0697d67b5a015e904e7e6e7b2a7066ba825bc54b94b4ff3e22d7a1eefb","src/api/into_bits/arch_specific.rs":"4acab22af90112072a2608fafc66fccf18cbf2e641b72af28404d30833cfe5c6","src/api/into_bits/macros.rs":"d762406de25aedff88d460dec7a80dc8e825a2a419d53218ce007efa6a1d3e04","src/api/into_bits/v128.rs":"3c502b9ce85bfcc727d6f053d49030b0ba9f46bd8e9fa5aa109382a2033f9f87","src/api/into_bits/v16.rs":"f4f4f61ba88aa51b158ec56ca3dce234349aea0daf2b3029a14ab5125d1e41e5","src/api/into_bits/v256.rs":"c24c3676707a0feb868dabe00766d74deab176794f905f79056337198c7cf790","src/api/into_bits/v32.rs":"905ba683d342fa32f4202b80bb46530807bd0a5b588f6c2e8c9f475223c47775","src/api/into_bits/v512.rs":"7cd89005215a9326eed8a742125dcbf981cba1aca72a313478eabf3df71b1160","src/api/into_bits/v64.rs":"d6238022ccff7b92e55b3f6017fc269acb6f36330a6d7e8fb389853a0f1b6478","src/api/math.rs":"8b2a2fc651917a850539f993aa0b9e5bf4da67b11685285b8de8cdca311719ec","src/api/math/float.rs":"61d2794d68262a1090ae473bd30793b5f65cf732f32a6694a3af2ce5d9225616","src/api/math/float/abs.rs":"5b6b2701e2e11135b7ce58a05052ea8120e10e4702c95d046b9d21b827b26bf8","src/api/math/float/consts.rs":"78acba000d3fa527111300b6327c1932de9c4c1e02d4174e1a5615c01463d38c","src/api/math/float/cos.rs":"4c2dd7173728ef189314f1576c9486e03be21b7da98843b2f9011282a7979e31","src/api/math/float/exp.rs":"7c6d5f1e304f498a01cfa23b92380c815d7da0ad94eae3483783bc377d287eef","src/api/math/float/ln.rs":"54c7583f3df793b39ff57534fade27b41bb992439e5dc178252f5ca3190a3e54","src/api/math/float/mul_add.rs":"62cac77660d20159276d4c9ef066eb90c81cbddb808e8e157182c607625ad2eb","src/api/math/float/mul_adde.rs":"bae056ee9f3a70df39ec3c3b2f6437c65303888a7b843ef1a5bcf1f5aca0e602","src/api/math/float/powf.rs":"9ddb938984b36d39d82a82f862f80df8f7fb013f1d222d45698d41d88472f568","src/api/math/float/recpre.rs":"589225794ff1dbf31158dff660e6d4509ecc8befbb57c633900dea5ac0b840d6","src/api/math/float/rsqrte.rs":"a32abdcc318d7ccc8448231f54d75b884b7cbeb03a7d595713ab6243036f4dbf","src/api/math/float/sin.rs":"cbd3622b7df74f19691743001c8cf747a201f8977ad90542fee915f37dcd1e49","src/api/math/float/sqrt.rs":"0c66d5d63fb08e4d99c6b82a8828e41173aff1ac9fa1a2764a11fac217ccf2ac","src/api/math/float/sqrte.rs":"731e1c9f321b662accdd27dacb3aac2e8043b7aecb2f2161dde733bd9f025362","src/api/minimal.rs":"1f22bcc528555444e76de569ec0ae2029b9ae9d04805efeafa93369c8098036b","src/api/minimal/iuf.rs":"819cff26d3e196f807645bcc1d79eb27d9f175edb89910f2274d52a1e913cd11","src/api/minimal/mask.rs":"0cae10ae1fc65f5070e686c0c79bfba27b86b33d6c399367bd4848fb367dcec4","src/api/minimal/ptr.rs":"f65ebf21866a863485344432d9a7a9b7418f7fad5fdf841a4e2fa56ec0766ad0","src/api/ops.rs":"3e273b277a0f3019d42c3c59ca94a5afd4885d5ae6d2182e5089bbeec9de42ee","src/api/ops/scalar_arithmetic.rs":"d2d5ad897a59dd0787544f927e0e7ca4072c3e58b0f4a2324083312b0d5a21d7","src/api/ops/scalar_bitwise.rs":"482204e459ca6be79568e1c9f70adbe2d2151412ddf122fb2161be8ebb51c40c","src/api/ops/scalar_mask_bitwise.rs":"c250f52042e37b22d57256c80d4604104cfd2fbe2a2e127c676267270ca5d350","src/api/ops/scalar_shifts.rs":"987f8fdebeedc16e3d77c1b732e7826ef70633c541d16dfa290845d5c6289150","src/api/ops/vector_arithmetic.rs":"ddca15d09ddeef502c2ed66117a62300ca65d87e959e8b622d767bdf1c307910","src/api/ops/vector_bitwise.rs":"b3968f7005b649edcc22a54e2379b14d5ee19045f2e784029805781ae043b5ee","src/api/ops/vector_float_min_max.rs":"76bf8cb607e2c442923c1da1061a6b80d742d607408033c2a3761161114cf2a0","src/api/ops/vector_int_min_max.rs":"a378789c6ff9b32a51fbd0a97ffd36ed102cd1fe6a067d2b02017c1df342def6","src/api/ops/vector_mask_bitwise.rs":"5052d18517d765415d40327e6e8e55a312daaca0a5e2aec959bfa54b1675f9c8","src/api/ops/vector_neg.rs":"5c62f6b0221983cdbd23cd0a3af3672e6ba1255f0dfe8b19aae6fbd6503e231b","src/api/ops/vector_rotates.rs":"03cbe8a400fd7c688e4ee771a990a6754f2031b1a59b19ae81158b21471167e5","src/api/ops/vector_shifts.rs":"9bf69d0087268f61009e39aea52e03a90f378910206b6a28e8393178b6a5d0e0","src/api/ptr.rs":"8a793251bed6130dcfb2f1519ceaa18b751bbb15875928d0fb6deb5a5e07523a","src/api/ptr/gather_scatter.rs":"138b02b0fa1fdd785b95fc7048488be7e3ef277e0bc6ac5affb26af6a11d41a6","src/api/reductions.rs":"ae5baca81352ecd44526d6c30c0a1feeda475ec73ddd3c3ec6b14e944e5448ee","src/api/reductions/bitwise.rs":"8bf910ae226188bd15fc7e125f058cd2566b6186fcd0cd8fd020f352c39ce139","src/api/reductions/float_arithmetic.rs":"3997125f87c7bac07fffda3a1d814e0e6c77ca83099546a9e2fb8dc92231129f","src/api/reductions/integer_arithmetic.rs":"47471da1c5f859489680bb5d34ced3d3aa20081c16053a3af121a4496fcb57bf","src/api/reductions/mask.rs":"db83327a950e33a317f37fd33ca4e20c347fb415975ec024f3e23da8509425af","src/api/reductions/min_max.rs":"d40ccad10220ae5982785015bef92e4b0749583c2b060cad0aa4f92d99491c3b","src/api/select.rs":"a98e2ccf9fc6bdeed32d337c8675bc96c2fbe2cc34fbf149ad6047fb8e749774","src/api/shuffle.rs":"6d1e5970b9fc8555a667c2924151070dd21584e81da8a9668d6bfe16f4a0db82","src/api/shuffle1_dyn.rs":"bfea5a91905b31444e9ef7ca6eddb7a9606b7e22d3f71bb842eb2795a0346620","src/api/slice.rs":"ee87484e8af329547b9a5d4f2a69e8bed6ea10bbd96270d706083843d4eea2ac","src/api/slice/from_slice.rs":"53691dc9958dec4180004a42d140552b405e8cd875caa282e89af378dd63c8bc","src/api/slice/write_to_slice.rs":"3dd2e511af43dc6fa911dd0b12f6f00323e0acd1202a01365db400557d52a89b","src/api/swap_bytes.rs":"4a6792a2e49a77475e1b237592b4b2804dbddb79c474331acd0dd71b36934259","src/codegen.rs":"a29d38fa0a85eaf787fb49989e625bf64effd5f39c126fbb2a24be206d2a3917","src/codegen/bit_manip.rs":"17ecebcff1f080e712fea5eb51602a73f4201ed56a198220342c8eb55bb92692","src/codegen/llvm.rs":"5bc6751293f9f184cf23d5df448c7d58b58b799e41c7a91f8ca41a5ba56e64ec","src/codegen/math.rs":"35f96e37a78fcf0cdb02146b7f27a45108fe06a37fc2a54d8851ce131a326178","src/codegen/math/float.rs":"dd86c0449e576c83b719700962ac017c332987fac08d91f2b7a2b1b883598170","src/codegen/math/float/abs.rs":"f56e2b4b8055ea861c1f5cbc6b6e1d8e7e5af163b62c13574ddee4e09513bfbc","src/codegen/math/float/cos.rs":"ef3b511a24d23045b310315e80348a9b7fedb576fc2de52d74290616a0abeb2a","src/codegen/math/float/cos_pi.rs":"4e7631a5d73dac21531e09ef1802d1180f8997509c2c8fa9f67f322194263a97","src/codegen/math/float/exp.rs":"61b691598c41b5622f24e4320c1bdd08701e612a516438bdddcc728fc3405c8c","src/codegen/math/float/ln.rs":"46b718b1ba8c9d99e1ad40f53d20dfde08a3063ca7bd2a9fdd6698e060da687e","src/codegen/math/float/macros.rs":"dd42135fff13f9aca4fd3a1a4e14c7e6c31aadc6d817d63b0d2fb9e62e062744","src/codegen/math/float/mul_add.rs":"a37bf764345d4b1714f97e83897b7cf0855fc2811704bcbc0012db91825339e1","src/codegen/math/float/mul_adde.rs":"c75702bfcb361de45964a93caf959a695ef2376bd069227600b8c6872665c755","src/codegen/math/float/powf.rs":"642346e982bc4c39203de0864d2149c4179cd7b21cf67a2951687932b4675872","src/codegen/math/float/sin.rs":"9d68164c90cdca6a85155040cdac42e27342ebe0b925273ef1593df721af4258","src/codegen/math/float/sin_cos_pi.rs":"9be02ad48585a1e8d99129382fbffbaed47852f15459256a708850b6b7a75405","src/codegen/math/float/sin_pi.rs":"9890347905b4d4a3c7341c3eb06406e46e60582bcf6960688bd727e5dadc6c57","src/codegen/math/float/sqrt.rs":"e3c60dcfb0c6d2fc62adabcc931b2d4040b83cab294dea36443fb4b89eb79e34","src/codegen/math/float/sqrte.rs":"f0f4ef9eb475ae41bcc7ec6a95ad744ba6b36925faa8b2c2814004396d196b63","src/codegen/pointer_sized_int.rs":"a70697169c28218b56fd2e8d5353f2e00671d1150d0c8cef77d613bdfacd84cb","src/codegen/reductions.rs":"645e2514746d01387ddd07f0aa4ffd8430cc9ab428d4fb13773ea319fa25dd95","src/codegen/reductions/mask.rs":"8f1afe6aabf096a3278e1fc3a30f736e04aa8b9ce96373cee22162d18cfe2702","src/codegen/reductions/mask/aarch64.rs":"cba6e17603d39795dcfe8339b6b7d8714c3e162a1f0a635979f037aa24fe4206","src/codegen/reductions/mask/arm.rs":"9447904818aa2c7c25d0963eead452a639a11ca7dbd6d21eedbfcaade07a0f33","src/codegen/reductions/mask/fallback.rs":"7a0ef9f7fd03ae318b495b95e121350cd61caffc5cc6ee17fabf130d5d933453","src/codegen/reductions/mask/fallback_impl.rs":"76547f396e55ef403327c77c314cf8db8c7a5c9b9819bfb925abeacf130249e5","src/codegen/reductions/mask/x86.rs":"4c0457b6276f9809223590092a4c77e73812330326cdabd28df06820de10a310","src/codegen/reductions/mask/x86/avx.rs":"b4913d87844c522903641cbbf10db4551addb1ce5e9e78278e21612fa65c733b","src/codegen/reductions/mask/x86/avx2.rs":"677aed3f056285285daa3adff8bc65e739630b4424defa6d9665e160f027507e","src/codegen/reductions/mask/x86/sse.rs":"5a827c6f8e1074e324f6e4c778942badb6c09d747a7142de01cadec1240b3428","src/codegen/reductions/mask/x86/sse2.rs":"bc38e6c31cb4b3d62147eba6cac264e519e2a48e0f7ce9010cfa9ef0cf0ec9fd","src/codegen/shuffle.rs":"99a0b52c2470097b028af134221099baba383446a01c7dc3ae560209880bcdb7","src/codegen/shuffle1_dyn.rs":"abbc95305dad815ab2ded3e8357791bcff080414668b55a4d397558a1d202d01","src/codegen/swap_bytes.rs":"1d6cdc716eadddc92b4fd506b2445a821caa8dc00860447de09d7ebd69c2087f","src/codegen/v128.rs":"94226b31ec403d18d9d2fe06713f147c9c79e9b5f9105089088266313f843185","src/codegen/v16.rs":"ddec4ffb66b6f7aaffb9a1780c5ddba82557abd74f45073d335047e04cf74924","src/codegen/v256.rs":"6b63917f0444118d6b1595bff2045e59b97c4d24012bd575f69f1f0efc5a0241","src/codegen/v32.rs":"3477b3c5540aed86e61e2f5807dd31db947413cec9181c587d93ed6ec74f0eba","src/codegen/v512.rs":"5854f99d3aabc4cd42b28a20d9ce447756dc2ba024a409a69b6a8ae1f1842fc5","src/codegen/v64.rs":"e9e89caebfe63d10c0cbca61e4dfdba3b7e02ee0989170f80beed23237ddd950","src/codegen/vPtr.rs":"711c753a08d53a2879c4fb87a0762c46ce4e34c22f0ca88d2e4c557a0f679969","src/codegen/vSize.rs":"eeee9858749aa82142b27bc120d1989bb74a6b82e1e4efbbeaccc9634dc9acfc","src/lib.rs":"41c2a5c5fb42225ce9c6a267653870fdb8af30f933b3b8534d57a15fb96ebb39","src/masks.rs":"be05e923ac58fe6eb61311561b5583cd306574f206dc09fe8e3c7de3dd0c1433","src/sealed.rs":"ae7fdeaf5d84cd7710ed730ca72ca7eaba93df6cb0acb183e5c0a7327acf197f","src/testing.rs":"1d3a7862ef625e235a5734ad7204e68d350f902c0695182b1f08a0552432416e","src/testing/macros.rs":"6378856d7a40ba5ec5c7c0dad6327d79f0c77266921c24296d10aed6c68e9b98","src/testing/utils.rs":"5ec6a47b836f364ec6dede19750a19eaac704162327d03041eb0f007d5f8d75c","src/v128.rs":"16cf9a8e7156b899ee9b9cd3f2dba9d13ec63289bea8c3ee9ae2e43ad9510288","src/v16.rs":"cb6465cf1e00bf530183af1819b9fe3d7eec978f8765d5e85d9b58a39a4b4045","src/v256.rs":"fe235017da18c7f3c361831c60e3173ad304d8ea1e95d64ebebc79da2d708511","src/v32.rs":"145d347855bac59b2de6508f9e594654e6c330423af9edc0e2ac8f4d1abdf45e","src/v512.rs":"f372f277f3e62eb5c945bb1c460333fdb17b6974fcc876633788ff53bded9599","src/v64.rs":"0b8079881b71575e3414be0b7f8f7eaba65281ba6732f2b2f61f73e95b6f48f7","src/vPtr.rs":"8b3e433d487180bb4304ff71245ecad90f0010f43e139a72027b672abe58facc","src/vSize.rs":"eda5aa020706cbf94d15bada41a0c2a35fc8f3f37cb7c2cd6f34d201399a495e","tests/endianness.rs":"7db22078f31fe1421fc2d21f2e6b9df5eb0bdc99c10f6985d3a74c0df8f205dc"},"package":null} -\ No newline at end of file -diff --git a/third_party/rust/packed_simd/Cargo.toml b/third_party/rust/packed_simd/Cargo.toml -index 70bbf26ed2..1e52297b7e 100644 ---- a/third_party/rust/packed_simd/Cargo.toml -+++ b/third_party/rust/packed_simd/Cargo.toml -@@ -29,6 +29,9 @@ default = [] - into_bits = [] - libcore_neon = [] - -+[build-dependencies] -+rustc_version = "0.2" -+ - [dev-dependencies] - paste = "^0.1.3" - arrayvec = { version = "^0.5", default-features = false } -diff --git a/third_party/rust/packed_simd/build.rs b/third_party/rust/packed_simd/build.rs -index 5958b9b785..571139204e 100644 ---- a/third_party/rust/packed_simd/build.rs -+++ b/third_party/rust/packed_simd/build.rs -@@ -1,3 +1,5 @@ -+use rustc_version::{version_meta, Channel, Version}; -+ - fn main() { - println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1"); - let target = std::env::var("TARGET") -@@ -5,4 +7,28 @@ fn main() { - if target.contains("neon") { - println!("cargo:rustc-cfg=libcore_neon"); - } -+ let ver_meta = version_meta().unwrap(); -+ let old_const_generics = -+ if ver_meta.semver < Version::parse("1.56.0-alpha").unwrap() { -+ true -+ } else if ver_meta.semver >= Version::parse("1.57.0-alpha").unwrap() { -+ false -+ } else { -+ match ver_meta.channel { -+ Channel::Stable | Channel::Beta => false, -+ Channel::Nightly | Channel::Dev -+ if ver_meta -+ .commit_date -+ .as_deref() -+ .map(|d| d < "2021-08-31") -+ .unwrap_or(false) => -+ { -+ true -+ } -+ _ => false, -+ } -+ }; -+ if old_const_generics { -+ println!("cargo:rustc-cfg=const_generics"); -+ } - } -diff --git a/third_party/rust/packed_simd/src/lib.rs b/third_party/rust/packed_simd/src/lib.rs -index cccdb856b4..e3a747025f 100644 ---- a/third_party/rust/packed_simd/src/lib.rs -+++ b/third_party/rust/packed_simd/src/lib.rs -@@ -199,8 +199,9 @@ - //! Numeric casts are not very "precise": sometimes lossy, sometimes value - //! preserving, etc. - -+#![cfg_attr(const_generics, feature(const_generics))] -+#![cfg_attr(not(const_generics), feature(adt_const_params))] - #![feature( -- const_generics, - repr_simd, - rustc_attrs, - platform_intrinsics, --- -2.33.1 - diff --git a/2009_rust-1.33-support.patch.xz b/2009_rust-1.33-support.patch.xz Binary files differdeleted file mode 100644 index 8836f2802ff1..000000000000 --- a/2009_rust-1.33-support.patch.xz +++ /dev/null diff --git a/2010_rust-1.33-support.patch.xz b/2010_rust-1.33-support.patch.xz Binary files differdeleted file mode 100644 index 6e7a185d136c..000000000000 --- a/2010_rust-1.33-support.patch.xz +++ /dev/null diff --git a/2011_rust-1.33-support.patch.xz b/2011_rust-1.33-support.patch.xz Binary files differdeleted file mode 100644 index 3b194a8c65a5..000000000000 --- a/2011_rust-1.33-support.patch.xz +++ /dev/null diff --git a/2014_spectre_variant2_bug1542958.patch b/2014_spectre_variant2_bug1542958.patch deleted file mode 100644 index 1f77056c5592..000000000000 --- a/2014_spectre_variant2_bug1542958.patch +++ /dev/null @@ -1,82 +0,0 @@ -# HG changeset patch -# Parent d30cb471a35b400d3db84e24b0d653b82fedd458 -Bug 1542958 - avoid malloc/delete[] mismatches in elfhack; r=glandium - -We were allocating ElfSection's data with `new[]` and modifying it with -`realloc` in some places, which causes allocator mismatches. -Consistently manage the data with `malloc`, `realloc`, and `free` instead. - -Differential Revision: https://phabricator.services.mozilla.com/D27327 - -diff --git a/build/unix/elfhack/elf.cpp b/build/unix/elfhack/elf.cpp ---- a/build/unix/elfhack/elf.cpp -+++ b/build/unix/elfhack/elf.cpp -@@ -492,17 +492,20 @@ ElfSection::ElfSection(Elf_Shdr &s, std: - : parent->getSection(shdr.sh_link)), - next(nullptr), - previous(nullptr), - index(-1) { - if ((file == nullptr) || (shdr.sh_type == SHT_NULL) || - (shdr.sh_type == SHT_NOBITS)) - data = nullptr; - else { -- data = new char[shdr.sh_size]; -+ data = static_cast<char *>(malloc(shdr.sh_size)); -+ if (!data) { -+ throw std::runtime_error("Could not malloc ElfSection data"); -+ } - int pos = file->tellg(); - file->seekg(shdr.sh_offset); - file->read(data, shdr.sh_size); - file->seekg(pos); - } - if (shdr.sh_name == 0) - name = nullptr; - else { -diff --git a/build/unix/elfhack/elfhack.cpp b/build/unix/elfhack/elfhack.cpp ---- a/build/unix/elfhack/elfhack.cpp -+++ b/build/unix/elfhack/elfhack.cpp -@@ -174,17 +174,20 @@ class ElfRelHackCode_Section : public El - addr = (addr | ((*c)->getAddrAlign() - 1)) + 1; - (*c)->getShdr().sh_addr = addr; - // We need to align this section depending on the greater - // alignment required by code sections. - if (shdr.sh_addralign < (*c)->getAddrAlign()) - shdr.sh_addralign = (*c)->getAddrAlign(); - } - shdr.sh_size = code.back()->getAddr() + code.back()->getSize(); -- data = new char[shdr.sh_size]; -+ data = static_cast<char *>(malloc(shdr.sh_size)); -+ if (!data) { -+ throw std::runtime_error("Could not malloc ElfSection data"); -+ } - char *buf = data; - for (c = code.begin(); c != code.end(); ++c) { - memcpy(buf, (*c)->getData(), (*c)->getSize()); - buf += (*c)->getSize(); - } - name = elfhack_text; - } - -diff --git a/build/unix/elfhack/elfxx.h b/build/unix/elfhack/elfxx.h ---- a/build/unix/elfhack/elfxx.h -+++ b/build/unix/elfhack/elfxx.h -@@ -320,17 +320,17 @@ class ElfSection { - public: - typedef union { - ElfSection *section; - int index; - } SectionInfo; - - ElfSection(Elf_Shdr &s, std::ifstream *file, Elf *parent); - -- virtual ~ElfSection() { delete[] data; } -+ virtual ~ElfSection() { free(data); } - - const char *getName() { return name; } - unsigned int getType() { return shdr.sh_type; } - unsigned int getFlags() { return shdr.sh_flags; } - unsigned int getAddr(); - unsigned int getSize() { return shdr.sh_size; } - unsigned int getAddrAlign() { return shdr.sh_addralign; } - unsigned int getEntSize() { return shdr.sh_entsize; } diff --git a/2015_spectre_variant2_bug1542958.patch b/2015_spectre_variant2_bug1542958.patch deleted file mode 100644 index 5a3a97c42578..000000000000 --- a/2015_spectre_variant2_bug1542958.patch +++ /dev/null @@ -1,32 +0,0 @@ -# HG changeset patch -# Parent f5febee8d7dc9cf6ba776d6a8550f87eb343f998 -Bug 1542958 - fix code section adjustments in elfhack; r=glandium - -We were never adjusting `last` in this loop, so we were computing the -wrong addresses for all sections beyond the first. Which in turn meant -that we would compute the wrong size for the section data we needed to -allocate. - -Differential Revision: https://phabricator.services.mozilla.com/D28195 - -diff --git a/build/unix/elfhack/elfhack.cpp b/build/unix/elfhack/elfhack.cpp ---- a/build/unix/elfhack/elfhack.cpp -+++ b/build/unix/elfhack/elfhack.cpp -@@ -172,16 +172,17 @@ class ElfRelHackCode_Section : public El - unsigned int addr = last->getShdr().sh_addr + last->getSize(); - if (addr & ((*c)->getAddrAlign() - 1)) - addr = (addr | ((*c)->getAddrAlign() - 1)) + 1; - (*c)->getShdr().sh_addr = addr; - // We need to align this section depending on the greater - // alignment required by code sections. - if (shdr.sh_addralign < (*c)->getAddrAlign()) - shdr.sh_addralign = (*c)->getAddrAlign(); -+ last = *c; - } - shdr.sh_size = code.back()->getAddr() + code.back()->getSize(); - data = static_cast<char *>(malloc(shdr.sh_size)); - if (!data) { - throw std::runtime_error("Could not malloc ElfSection data"); - } - char *buf = data; - for (c = code.begin(); c != code.end(); ++c) { @@ -71,52 +71,39 @@ source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE" mozconfig firefox.desktop vendor.js - kde.js - # Firefox patchset - firefox-branded-icons-$_patchrev.patch::$_patchurl/firefox/firefox-branded-icons.patch - firefox-kde-$_patchrev.patch::$_patchurl/firefox/firefox-kde.patch - # Gecko/toolkit patchset - mozilla-kde-$_patchrev.patch::$_patchurl/mozilla-kde.patch - mozilla-nongnome-proxies-$_patchrev.patch::$_patchurl/mozilla-nongnome-proxies.patch - # globalmenu patch: - # to support globalmenu a patch from ubuntu is applied - # source: - # http://bazaar.launchpad.net/~mozillateam/firefox/firefox-trunk.head - # /view/head:/debian/patches/unity-menubar.patch - unity-menubar.patch - # end - add_missing_pgo_rule.patch - pgo_fix_missing_kdejs.patch - # use system harfbuzz - 0004-bmo-847568-Support-system-harfbuzz.patch - # use system graphite2 - 0005-bmo-847568-Support-system-graphite2.patch - # use sytem av1 - 0006-bmo-1559213-Support-system-av1.patch - # reenable system sqlite - 5022efe33088.patch - # Force disable elfhack to fix build errors - build-disable-elfhack.patch - # patches from gentoo: - # https://dev.gentoo.org/~whissi/mozilla/patchsets/firefox-89-patches-01.tar.xz - 0020-Make-PGO-use-toolchain.patch - # Fix MOZILLA#1516803 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1516803 - 0022-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch - # PGO/LTO GCC patches - 0024-Fix-building-with-PGO-when-using-GCC.patch - 0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch - # end - # Fix CSD when globalmenu is active #8 - fix_csd_window_buttons.patch - # Workaround #14 - fix-wayland-build.patch - # WebRTC - screen cast sync for Wayland - # MOZILLLA#1672944 - https://src.fedoraproject.org/rpms/firefox/raw/f0029706cee042f03f836e10d51bb2245e9fa392/f/libwebrtc-screen-cast-sync.patch - # Unbreak build with python-zstandard 0.18.0 #23 - bump-pypip-zstandard-0.18.diff - # end + 0001-Bug-1005535-Get-skia-GPU-building-on-big-endian.patch + 0002-Allow-to-override-build-date-with-SOURCE_DATE_EPOCH.patch + 0003-Bug-1504834-Rough-progress-patch.patch + 0004-Bug-1504834-XULText-AA-fix-BE.patch + 0005-Fix-top-level-asm-issue.patch + 0006-mozilla-bmo998749.patch.patch + 0007-mozilla-s390x-skia-gradient.patch.patch + 0008-mozilla-libavcodec58_91.patch.patch + 0009-mozilla-silence-no-return-type.patch-to-fix-build-er.patch + 0010-Bug-531915-mozilla-bmo531915.patch.patch + 0011-imported-patch-one_swizzle_to_rule_them_all.patch.patch + 0012-imported-patch-svg-rendering.patch.patch + 0013-Bug-1792159-Add-missing-includes-to-AtomicOperations.patch + 0014-mozilla-s390-context.patch.patch + 0015-bsc-991344-Rpi3-Firefox-crashes-after-a-few-seconds-.patch + 0016-mozilla-fix-aarch64-libopus.patch.patch + 0017-Bug-634334-call-to-the-ntlm_auth-helper-fails.patch + 0018-Make-PGO-use-toolchain.patch + 0019-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch + 0020-Fix-building-with-PGO-when-using-GCC.patch + 0021-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch + 0022-Bug-1516081-Disable-watchdog-during-FDO-train.patch + 0023-Bug-559213-Support-system-av1.patch + 0024-Bug-847568-Support-system-harfbuzz.patch + 0025-Bug-847568-Support-system-graphite2.patch + 0026-Bug-1611386-Reenable-support-for-enable-system-sqlit.patch + 0027-Bug-1419151-Add-Unity-menubar-support.patch + 0028-Do-not-use-gconf-for-proxy-settings-if-not-running-w.patch + 0029-Add-KDE-integration-to-Firefox-toolkit-parts.patch + 0030-Add-KDE-integration-to-Firefox.patch + 0031-Imported-patch-firefox-branded-icons.patch.patch + 0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch + 0033-Allow-Eme-for-arm-and-Aarch64.patch ) # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) @@ -147,62 +134,11 @@ prepare() { echo -n "$_mozilla_api_key" >mozilla-api-key echo "ac_add_options --with-mozilla-api-keyfile=\"$PWD/mozilla-api-key\"" >>.mozconfig - - msg "Patching for KDE" - patch -Np1 -i "$srcdir/mozilla-nongnome-proxies-$_patchrev.patch" - patch -Np1 -i "$srcdir/mozilla-kde-$_patchrev.patch" - patch -Np1 -i "$srcdir/firefox-kde-$_patchrev.patch" - patch -Np1 -i "$srcdir/firefox-branded-icons-$_patchrev.patch" - - # Add globalmenu support - patch -Np1 -i "$srcdir/unity-menubar.patch" - - # use system harfbuzz - patch -Np1 -i "$srcdir"/0004-bmo-847568-Support-system-harfbuzz.patch - # use system graphite2 - patch -Np1 -i "$srcdir"/0005-bmo-847568-Support-system-graphite2.patch - # use sytem av1 - patch -Np1 -i "$srcdir"/0006-bmo-1559213-Support-system-av1.patch - - # reenable system sqlite - patch -p1 -i "$srcdir"/5022efe33088.patch - - # Force disable elfhack to fix build errors - patch -Np1 -i "$srcdir"/build-disable-elfhack.patch - - # Fix CSD when globalmenu is active #8 - patch -Np1 -i "$srcdir"/fix_csd_window_buttons.patch - - # Workaround #14 - patch -Np1 -i "$srcdir"/fix-wayland-build.patch - - # WebRTC - screen cast sync for Wayland - patch -Np1 -i "$srcdir"/libwebrtc-screen-cast-sync.patch - - # Unbreak build with python-zstandard 0.18.0 #23 - patch -Np1 -i "$srcdir"/bump-pypip-zstandard-0.18.diff - - - if [ $_pgo ] ; then - # Fix MOZILLA#1516803 - # sandbox needs to be built with --param lto-partitions=1 when - # GCC LTO is enabled - patch -Np1 -i "$srcdir"/0022-bmo-1516803-force-one-LTO-partition-for-sandbox-when.patch - - # PGO/LTO GCC patches - patch -Np1 -i "$srcdir"/0020-Make-PGO-use-toolchain.patch - patch -Np1 -i "$srcdir"/0024-Fix-building-with-PGO-when-using-GCC.patch - patch -Np1 -i "$srcdir"/0027-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch - - # add missing rule for pgo builds - patch -Np1 -i "$srcdir"/add_missing_pgo_rule.patch - - # add missing file Makefile for pgo builds - patch -Np1 -i "$srcdir"/pgo_fix_missing_kdejs.patch - - echo "ac_add_options --enable-lto" >> .mozconfig - fi + for patch in "$srcdir/*.patch" ; do + echo "Applying $patch" + patch -p1 -i "$patch" + done } build() { @@ -316,24 +252,36 @@ md5sums=('SKIP' '9530b0395a095c0b47ee42d0996ec163' 'a26a061efb4def6572d5b319d657f1d6' '4c23d9c0a691d70919beb1dafbbecbd3' - '05bb69d25fb3572c618e3adf1ee7b670' - '800d337d558de8201c8828252c1cd199' - '2e2e0721f1c29b2ae786d8c6e34fa65f' - '4819b01c44ce3f6bdc3fbc096d717ca0' - '0a5733b7a457a2786c2dd27626a1bf88' - 'ee09a0bdeadfedc76c0379f170ab2dc1' - 'fe24f5ea463013bb7f1c12d12dce41b2' - '3c383d371d7f6ede5983a40310518715' - 'dc47b8b0582ca8e97d68e5636b72853c' - '9e518b30cf2ff9afd0423c79d12ae7b2' - '0ba70a7a61493cb053f93d6560b8be32' - '548de130fc0f470bff0b6d994a0a91cd' - 'c7b492df4fbf42ffe8aea4c0afb89921' - '316d71d9cec400890db2ee8c362e672f' - 'c6c0e47c9b517e5146a8925f442b811b' - '943b9fe2ba474f7809a41622744f97f9' - '31f950a94966287bfa6ccf03030781cc' - 'f49ac3b9f5146e33ce587e6b23eb1a86' - '2cf74781f6b742d6b7e6f7251f49311a' - '015dbab57c0d9c65d7a94a29dd8bf8a4' - 'c36ef413ef998444d7d1dd543fd8f58b') + 'e48cd51c49f5b8b1595f9cd8f55ce819' + '6945bb71f87e01743a6736fbdb845cfd' + '954e7d1ff4452e3c8895a186ff815383' + 'f6e793369b22bd607403d9b9f0565a3c' + '8df09195607f90a097f21d35dc4d9c30' + 'a1b878f2e22f096ad907630aa873698f' + '3256d35703c9a2857503921eb10c3dd7' + 'efe01b463d50e30de15c03f391e0b366' + 'ab2a8a5aa3aa2b52f7102466aab7eb7e' + '63a6be4970c5a999adad40f9e021c366' + '1c1ce911bbbe548f130e6fca5e136bdd' + '831c2ccaf07c68cf4f9008692475c1d9' + 'cc679a9a9abbb9e8a33800b4cb5f4deb' + '8c0af75143b8f8d4b86e0f438bd8ccc8' + 'e13a08af8fa75cfebd2ca5d509784046' + '379b26ef4582c6d15ab61c7944540c7f' + '7ee193a7b8230b68036f6db5d188f7fc' + '9266d9fa0c39e30ae2e9c93b3d7822e7' + '101080a6f3639db7c36dcf1218a83d1a' + '39a5aa662bd007d0562beaeae4edc175' + 'a067121f85949a76e709d53871f09834' + '12f66e9f224381e73aa7e7fb6c535c13' + 'ad886aed59f72e6f1ad470ab4e96ebd8' + 'b69acf75b1649f965ac1637e34356038' + 'd1dfbcdc4951a5d279071323160fe856' + '3db73a1168751e27a66d7564a9492312' + 'b30750c85f239ba19b6b0ba308e86990' + '401a4da2cadcaf12546cb495d63407e4' + '42ce462dcbdaaed8ffb45b1b5d10a49d' + 'f792d0ce1e4f3f260862ec70295f2f81' + 'bc7676460d246f57e8f4e5db1850eaf8' + '1bc91fa92a1a7ce337ec9b398290f5e8' + '15a701ef094073919c43701ef4b8b85f') diff --git a/add_missing_pgo_rule.patch b/add_missing_pgo_rule.patch deleted file mode 100644 index bc30c2a2673b..000000000000 --- a/add_missing_pgo_rule.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/Makefile.in 2015-01-23 06:59:53.000000000 +0100 -+++ b/Makefile.in 2015-02-11 10:34:04.789389729 +0100 -@@ -323,3 +323,6 @@ - endif - - # There used to be build interdependencies here. They are now in config/recurse.mk -+ -+pgo-profile-run: -+ $(PYTHON) $(topsrcdir)/build/pgo/profileserver.py $(EXTRA_TEST_ARGS) diff --git a/build-disable-elfhack.patch b/build-disable-elfhack.patch deleted file mode 100644 index 02df76c13fd8..000000000000 --- a/build-disable-elfhack.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-65.0/toolkit/moz.configure.disable-elfhack firefox-65.0/toolkit/moz.configure ---- firefox-65.0/toolkit/moz.configure.disable-elfhack 2019-01-28 14:16:48.530345132 +0100 -+++ firefox-65.0/toolkit/moz.configure 2019-01-28 14:18:03.231029682 +0100 -@@ -1322,7 +1322,7 @@ - help="{Enable|Disable} elf hacks", - ) - -- set_config("USE_ELF_HACK", depends_if("--enable-elf-hack")(lambda _: True)) -+ set_config("USE_ELF_HACK", depends_if("--enable-elf-hack")(lambda _: False)) - - - @depends(check_build_environment) diff --git a/bump-pypip-zstandard-0.18.diff b/bump-pypip-zstandard-0.18.diff deleted file mode 100644 index 7bf4668cc77f..000000000000 --- a/bump-pypip-zstandard-0.18.diff +++ /dev/null @@ -1,10 +0,0 @@ -diff --git i/python/sites/mach.txt w/python/sites/mach.txt -index 01f4f8c23da3b..85cfaf2b273ac 100644 ---- i/python/sites/mach.txt -+++ w/python/sites/mach.txt -@@ -134,4 +134,4 @@ pypi-optional:glean-sdk==50.1.0:telemetry will not be collected - # We aren't (yet) able to pin packages in automation, so we have to - # support down to the oldest locally-installed version (5.4.2). - pypi-optional:psutil>=5.4.2,<=5.8.0:telemetry will be missing some data --pypi-optional:zstandard>=0.11.1,<=0.17.0:zstd archives will not be possible to extract -+pypi-optional:zstandard>=0.11.1,<=0.19.0:zstd archives will not be possible to extract diff --git a/cairo-shared.patch b/cairo-shared.patch deleted file mode 100644 index 8d60af87a45b..000000000000 --- a/cairo-shared.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/gfx/thebes/gfxPlatform.cpp 2013-05-22 17:28:19.000000000 -0700 -+++ b/gfx/thebes/gfxPlatform.cpp 2013-05-23 21:20:16.000000000 -0700 -@@ -535,6 +535,7 @@ void SourceBufferDestroy(void *srcSurfUD - delete static_cast<SourceSurfaceUserData*>(srcSurfUD); - } - -+#if MOZ_TREE_CAIRO - void SourceSnapshotDetached(cairo_surface_t *nullSurf) - { - gfxImageSurface* origSurf = -@@ -542,6 +543,13 @@ void SourceSnapshotDetached(cairo_surfac - - origSurf->SetData(&kSourceSurface, NULL, NULL); - } -+#else -+void SourceSnapshotDetached(void *nullSurf) -+{ -+ gfxImageSurface* origSurf = static_cast<gfxImageSurface*>(nullSurf); -+ origSurf->SetData(&kSourceSurface, NULL, NULL); -+} -+#endif - - RefPtr<SourceSurface> - gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface) -@@ -654,6 +662,7 @@ gfxPlatform::GetSourceSurfaceForSurface( - - } - -+#if MOZ_TREE_CAIRO - cairo_surface_t *nullSurf = - cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA); - cairo_surface_set_user_data(nullSurf, -@@ -662,6 +671,9 @@ gfxPlatform::GetSourceSurfaceForSurface( - NULL); - cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached); - cairo_surface_destroy(nullSurf); -+#else -+ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic", (const unsigned char*) "data", 4, SourceSnapshotDetached, imgSurface.get()); -+#endif - } - - SourceSurfaceUserData *srcSurfUD = new SourceSurfaceUserData; diff --git a/fix-wayland-build.patch b/fix-wayland-build.patch deleted file mode 100644 index 703b1a8c1faf..000000000000 --- a/fix-wayland-build.patch +++ /dev/null @@ -1,19 +0,0 @@ -Description: Fix FTBFS on bionic. Compiler errors: - In file included from Unified_cpp_widget_gtk1.cpp:2: - /<<BUILDDIR>>/firefox-92.0~b2+build1/widget/gtk/WaylandBuffer.cpp:261:39: error: unknown type name 'GLContext'; did you mean 'EGLContext'? - const LayoutDeviceIntSize& aSize, GLContext* aGL) { - ^~~~~~~~~ - -Author: Rico Tzschichholz <ricotz@ubuntu.com> - ---- a/widget/gtk/WaylandBuffer.cpp -+++ b/widget/gtk/WaylandBuffer.cpp -@@ -258,7 +258,7 @@ - - /* static */ - RefPtr<WaylandBufferDMABUF> WaylandBufferDMABUF::Create( -- const LayoutDeviceIntSize& aSize, GLContext* aGL) { -+ const LayoutDeviceIntSize& aSize, gl::GLContext* aGL) { - RefPtr<WaylandBufferDMABUF> buffer = new WaylandBufferDMABUF(aSize); - - const auto flags = diff --git a/fix_csd_window_buttons.patch b/fix_csd_window_buttons.patch deleted file mode 100644 index 1fe384e083a4..000000000000 --- a/fix_csd_window_buttons.patch +++ /dev/null @@ -1,12 +0,0 @@ -Fix window buttons in case CSD when globalmenu is active - - ---- a/browser/base/content/browser.css -+++ b/browser/base/content/browser.css -@@ -334,5 +334,5 @@ toolbar[customizing] #whats-new-menu-button { - %ifdef MENUBAR_CAN_AUTOHIDE - #toolbar-menubar[autohide=true]:not([inactive]) + #TabsToolbar > .titlebar-buttonbox-container { -- visibility: hidden; -+ visibility: visible; - } - %endif diff --git a/fix_ftbfs_cbindgen_gt_0.23.patch b/fix_ftbfs_cbindgen_gt_0.23.patch deleted file mode 100644 index 1dc3197b1055..000000000000 --- a/fix_ftbfs_cbindgen_gt_0.23.patch +++ /dev/null @@ -1,17 +0,0 @@ -Workaround for "error: redefinition of 'ROOT_CLIP_CHAIN'" with cbindgen > 0.23. - -https://hg.mozilla.org/mozilla-central/diff/51947744ce12247f378a1db2379ffaad3fcd18c3/gfx/webrender_bindings/webrender_ffi.h -https://bugzilla.mozilla.org/show_bug.cgi?id=1773259 -https://github.com/eqrion/cbindgen/issues/767#issuecomment-1153125949 - ---- a/gfx/webrender_bindings/webrender_ffi.h -+++ b/gfx/webrender_bindings/webrender_ffi.h -@@ -73,8 +73,6 @@ struct WrPipelineInfo; - struct WrPipelineIdAndEpoch; - using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>; - --const uint64_t ROOT_CLIP_CHAIN = ~0; -- - } // namespace wr - } // namespace mozilla - diff --git a/kde.js b/kde.js deleted file mode 100644 index b0d3e5d20437..000000000000 --- a/kde.js +++ /dev/null @@ -1,2 +0,0 @@ -pref("browser.preferences.instantApply", false); -pref("browser.backspace_action", 0); diff --git a/mozilla-bmo1744896.patch b/mozilla-bmo1744896.patch deleted file mode 100644 index a70c989e88e2..000000000000 --- a/mozilla-bmo1744896.patch +++ /dev/null @@ -1,62 +0,0 @@ - -# HG changeset patch -# User Robert Mader <robert.mader@posteo.de> -# Date 1640087004 0 -# Node ID 620f6d66f586a8f0efad2f58f7cb5db67f6b318b -# Parent 71184b9b6cb5f44580492b8f508b9363251111d3 -Bug 1744896 - Create WaylandVsyncSource on window creation, r=stransky, a=dsmith - -Previously we created the `WaylandVsyncSource` when calling -`WaylandStartVsync()` for the first time. Over a couple of refactorings, -this moved from `Create()` to happen much later in the process, -eventually racing with the content process which triggeres `VsyncParent` -to call `GetVsyncSource()`. -If the race went badly, `GetVsyncSource()` would return a `nullptr` and -the tab(s) in question would stick to the global software vsync source. - -To avoid that, create the `WaylandVsyncSource` in `Create()` again. - -Differential Revision: https://phabricator.services.mozilla.com/D134253 - -diff -up a/widget/gtk/nsWindow.cpp.1744896 b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp.1744896 2021-12-23 11:54:31.522539340 +0100 -+++ b/widget/gtk/nsWindow.cpp 2021-12-23 11:55:56.070270174 +0100 -@@ -5765,6 +5765,17 @@ nsresult nsWindow::Create(nsIWidget* aPa - } - } - #endif -+#ifdef MOZ_WAYLAND -+ // Initialize the window specific VsyncSource early in order to avoid races -+ // with BrowserParent::UpdateVsyncParentVsyncSource(). -+ // Only use for toplevel windows for now, see bug 1619246. -+ if (GdkIsWaylandDisplay() && -+ StaticPrefs::widget_wayland_vsync_enabled_AtStartup() && -+ mWindowType == eWindowType_toplevel) { -+ mWaylandVsyncSource = new WaylandVsyncSource(); -+ MOZ_RELEASE_ASSERT(mWaylandVsyncSource); -+ } -+#endif - - // We create input contexts for all containers, except for - // toplevel popup windows -@@ -6077,19 +6088,12 @@ void nsWindow::ResumeCompositorFromCompo - - void nsWindow::WaylandStartVsync() { - #ifdef MOZ_WAYLAND -- // only use for toplevel windows for now - see bug 1619246 -- if (!GdkIsWaylandDisplay() || -- !StaticPrefs::widget_wayland_vsync_enabled_AtStartup() || -- mWindowType != eWindowType_toplevel) { -+ if (!mWaylandVsyncSource) { - return; - } - - LOG("nsWindow::WaylandStartVsync() [%p]\n", (void*)this); - -- if (!mWaylandVsyncSource) { -- mWaylandVsyncSource = new WaylandVsyncSource(); -- } -- - WaylandVsyncSource::WaylandDisplay& display = - static_cast<WaylandVsyncSource::WaylandDisplay&>( - mWaylandVsyncSource->GetGlobalDisplay()); diff --git a/mozilla-bmo1745560.patch b/mozilla-bmo1745560.patch deleted file mode 100644 index 335d291b1ed6..000000000000 --- a/mozilla-bmo1745560.patch +++ /dev/null @@ -1,32 +0,0 @@ - -# HG changeset patch -# User Kevin Daudt <kdaudt@alpinelinux.org> -# Date 1639316328 0 -# Node ID 9868f275bf475e64eda8b0bf4514d96184da25bd -# Parent e61182cbd74b10db2bc1d46ed70de695fc931295 -Bug 1745560 - Add missing stub for wl_proxy_marshal_flags, r=stransky, a=dsmith - -Firefox fails to build against wayland 1.20 because this symbol is missing - -Differential Revision: https://phabricator.services.mozilla.com/D133583 - -diff --git a/widget/gtk/mozwayland/mozwayland.c b/widget/gtk/mozwayland/mozwayland.c ---- a/widget/gtk/mozwayland/mozwayland.c -+++ b/widget/gtk/mozwayland/mozwayland.c -@@ -195,8 +195,15 @@ MOZ_EXPORT void wl_list_insert(struct wl - MOZ_EXPORT void wl_list_remove(struct wl_list* elm) {} - - MOZ_EXPORT int wl_list_length(const struct wl_list* list) { return -1; } - - MOZ_EXPORT int wl_list_empty(const struct wl_list* list) { return -1; } - - MOZ_EXPORT void wl_list_insert_list(struct wl_list* list, - struct wl_list* other) {} -+ -+MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags( -+ struct wl_proxy* proxy, uint32_t opcode, -+ const struct wl_interface* interface, uint32_t version, uint32_t flags, -+ ...) { -+ return NULL; -+} - diff --git a/pgo_fix_missing_kdejs.patch b/pgo_fix_missing_kdejs.patch deleted file mode 100644 index e8b99dfb713b..000000000000 --- a/pgo_fix_missing_kdejs.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- b/browser/app/Makefile.in 2016-02-14 15:57:50.000000000 +0100 -+++ a/browser/app/Makefile.in 2016-02-14 16:08:29.823744590 +0100 -@@ -56,8 +56,9 @@ - # steps. See bug 1431342. - libs:: $(srcdir)/profile/channel-prefs.js - $(NSINSTALL) -D $(DIST)/bin/defaults/pref -+ cp $(topsrcdir)/../kde.js $(DIST)/bin/defaults/pref/kde.js - $(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js) - - ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) - - diff --git a/shared-libs.patch b/shared-libs.patch deleted file mode 100644 index 1f22b2b0dcf9..000000000000 --- a/shared-libs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur mozilla-release.orig/browser/installer/Makefile.in mozilla-release/browser/installer/Makefile.in ---- mozilla-release.orig/browser/installer/Makefile.in 2012-07-17 16:19:29.480356991 +0000 -+++ mozilla-release/browser/installer/Makefile.in 2012-07-17 17:32:41.250937293 +0000 -@@ -50,7 +50,7 @@ - MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in - # Some files have been already bundled with xulrunner - ifndef SYSTEM_LIBXUL --MOZ_PKG_FATAL_WARNINGS = 1 -+MOZ_PKG_FATAL_WARNINGS = 0 - endif - - MOZ_NONLOCALIZED_PKG_LIST = \ |