diff --git a/CVE-2023-44488-libvpx.patch b/CVE-2023-44488-libvpx.patch deleted file mode 100644 index 79e523565bb95525d890e4fed0c72def2cd4da06..0000000000000000000000000000000000000000 --- a/CVE-2023-44488-libvpx.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 263682c9a29395055f3b3afe2d97be1828a6223f Mon Sep 17 00:00:00 2001 -From: Jerome Jiang -Date: Thu, 30 Jun 2022 13:48:56 -0400 -Subject: [PATCH] Fix bug with smaller width bigger size - -Fixed previous patch that clusterfuzz failed on. - -Bug: webm:1642 -Change-Id: If0e08e72abd2e042efe4dcfac21e4cc51afdfdb9 ---- - test/resize_test.cc | 11 +++-------- - vp9/common/vp9_alloccommon.c | 13 ++++++------- - vp9/encoder/vp9_encoder.c | 27 +++++++++++++++++++++++++-- - 3 files changed, 34 insertions(+), 17 deletions(-) - -diff --git a/test/resize_test.cc b/test/resize_test.cc -index fd1c2a92de6..20ad2229b46 100644 ---- a/test/resize_test.cc -+++ b/test/resize_test.cc -@@ -102,11 +102,8 @@ void ScaleForFrameNumber(unsigned int frame, unsigned int initial_w, - if (frame < 30) { - return; - } -- if (frame < 100) { -- *w = initial_w * 7 / 10; -- *h = initial_h * 16 / 10; -- return; -- } -+ *w = initial_w * 7 / 10; -+ *h = initial_h * 16 / 10; - return; - } - if (frame < 10) { -@@ -559,9 +556,7 @@ TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) { - } - } - --// TODO(https://crbug.com/webm/1642): This causes a segfault in --// init_encode_frame_mb_context(). --TEST_P(ResizeRealtimeTest, DISABLED_TestExternalResizeSmallerWidthBiggerSize) { -+TEST_P(ResizeRealtimeTest, TestExternalResizeSmallerWidthBiggerSize) { - ResizingVideoSource video; - video.flag_codec_ = true; - video.smaller_width_larger_size_ = true; -diff --git a/vp9/common/vp9_alloccommon.c b/vp9/common/vp9_alloccommon.c -index e53883f621d..9e73e40ea09 100644 ---- a/vp9/common/vp9_alloccommon.c -+++ b/vp9/common/vp9_alloccommon.c -@@ -135,13 +135,6 @@ int vp9_alloc_context_buffers(VP9_COMMON *cm, int width, int height) { - cm->free_mi(cm); - if (cm->alloc_mi(cm, new_mi_size)) goto fail; - } -- -- if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) { -- // Create the segmentation map structure and set to 0. -- free_seg_map(cm); -- if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail; -- } -- - if (cm->above_context_alloc_cols < cm->mi_cols) { - vpx_free(cm->above_context); - cm->above_context = (ENTROPY_CONTEXT *)vpx_calloc( -@@ -156,6 +149,12 @@ int vp9_alloc_context_buffers(VP9_COMMON *cm, int width, int height) { - cm->above_context_alloc_cols = cm->mi_cols; - } - -+ if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) { -+ // Create the segmentation map structure and set to 0. -+ free_seg_map(cm); -+ if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail; -+ } -+ - if (vp9_alloc_loop_filter(cm)) goto fail; - - return 0; -diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c -index 69a4e3c314f..e3ba294c32f 100644 ---- a/vp9/encoder/vp9_encoder.c -+++ b/vp9/encoder/vp9_encoder.c -@@ -2047,6 +2047,17 @@ static void alloc_copy_partition_data(VP9_COMP *cpi) { - } - } - -+static void free_copy_partition_data(VP9_COMP *cpi) { -+ vpx_free(cpi->prev_partition); -+ cpi->prev_partition = NULL; -+ vpx_free(cpi->prev_segment_id); -+ cpi->prev_segment_id = NULL; -+ vpx_free(cpi->prev_variance_low); -+ cpi->prev_variance_low = NULL; -+ vpx_free(cpi->copied_frame_cnt); -+ cpi->copied_frame_cnt = NULL; -+} -+ - void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) { - VP9_COMMON *const cm = &cpi->common; - RATE_CONTROL *const rc = &cpi->rc; -@@ -2126,6 +2137,8 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) { - new_mi_size = cm->mi_stride * calc_mi_size(cm->mi_rows); - if (cm->mi_alloc_size < new_mi_size) { - vp9_free_context_buffers(cm); -+ vp9_free_pc_tree(&cpi->td); -+ vpx_free(cpi->mbmi_ext_base); - alloc_compressor_data(cpi); - realloc_segmentation_maps(cpi); - cpi->initial_width = cpi->initial_height = 0; -@@ -2144,8 +2157,18 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) { - update_frame_size(cpi); - - if (last_w != cpi->oxcf.width || last_h != cpi->oxcf.height) { -- memset(cpi->consec_zero_mv, 0, -- cm->mi_rows * cm->mi_cols * sizeof(*cpi->consec_zero_mv)); -+ vpx_free(cpi->consec_zero_mv); -+ CHECK_MEM_ERROR( -+ &cm->error, cpi->consec_zero_mv, -+ vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(*cpi->consec_zero_mv))); -+ -+ vpx_free(cpi->skin_map); -+ CHECK_MEM_ERROR( -+ &cm->error, cpi->skin_map, -+ vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(cpi->skin_map[0]))); -+ -+ free_copy_partition_data(cpi); -+ alloc_copy_partition_data(cpi); - if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) - vp9_cyclic_refresh_reset_resize(cpi); - rc->rc_1_frame = 0; diff --git a/CVE-2023-7104.patch b/CVE-2023-7104.patch deleted file mode 100644 index d26e0b728231e48fb046671a22f6c516e920b117..0000000000000000000000000000000000000000 --- a/CVE-2023-7104.patch +++ /dev/null @@ -1,38 +0,0 @@ -Origin: https://sqlite.org/src/info/0e4e7a05c4204b47 - -Index: third_party/sqlite3/src/sqlite3.c -================================================================== ---- a/third_party/sqlite3/src/sqlite3.c -+++ b/third_party/sqlite3/src/sqlite3.c -@@ -3234,19 +3234,23 @@ - pIn->iNext += nByte; - } - } - } - if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){ -- sqlite3_int64 v = sessionGetI64(aVal); -- if( eType==SQLITE_INTEGER ){ -- sqlite3VdbeMemSetInt64(apOut[i], v); -+ if( (pIn->nData-pIn->iNext)<8 ){ -+ rc = SQLITE_CORRUPT_BKPT; - }else{ -- double d; -- memcpy(&d, &v, 8); -- sqlite3VdbeMemSetDouble(apOut[i], d); -+ sqlite3_int64 v = sessionGetI64(aVal); -+ if( eType==SQLITE_INTEGER ){ -+ sqlite3VdbeMemSetInt64(apOut[i], v); -+ }else{ -+ double d; -+ memcpy(&d, &v, 8); -+ sqlite3VdbeMemSetDouble(apOut[i], d); -+ } -+ pIn->iNext += 8; - } -- pIn->iNext += 8; - } - } - } - - return rc; - diff --git a/D188068.diff b/D188068.diff deleted file mode 100644 index cccc8079d69da9e1286ed86f6097fd98b3350d54..0000000000000000000000000000000000000000 --- a/D188068.diff +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/js/src/jit/riscv64/CodeGenerator-riscv64.cpp b/js/src/jit/riscv64/CodeGenerator-riscv64.cpp ---- a/js/src/jit/riscv64/CodeGenerator-riscv64.cpp -+++ b/js/src/jit/riscv64/CodeGenerator-riscv64.cpp -@@ -1103,22 +1103,29 @@ - masm.xor64(ToRegister64(lhs), ToRegister64(lhs)); - return; - case 1: - // nop - return; -+ case 2: -+ masm.add(output.reg, ToRegister64(lhs).reg, ToRegister64(lhs).reg); -+ return; - default: - if (constant > 0) { -- if (mozilla::IsPowerOfTwo(static_cast(constant + 1))) { -- masm.move64(ToRegister64(lhs), output); -- masm.lshift64(Imm32(FloorLog2(constant + 1)), output); -- masm.sub64(ToRegister64(lhs), output); -+ if (mozilla::IsPowerOfTwo(static_cast(constant + 1))) { -+ ScratchRegisterScope scratch(masm); -+ masm.movePtr(ToRegister64(lhs).reg, scratch); -+ masm.slli(output.reg, ToRegister64(lhs).reg, -+ FloorLog2(constant + 1)); -+ masm.sub64(scratch, output); - return; - } else if (mozilla::IsPowerOfTwo( -- static_cast(constant - 1))) { -- masm.move64(ToRegister64(lhs), output); -- masm.lshift64(Imm32(FloorLog2(constant - 1u)), output); -- masm.add64(ToRegister64(lhs), output); -+ static_cast(constant - 1))) { -+ int32_t shift = mozilla::FloorLog2(constant - 1); -+ ScratchRegisterScope scratch(masm); -+ masm.movePtr(ToRegister64(lhs).reg, scratch); -+ masm.slli(output.reg, ToRegister64(lhs).reg, shift); -+ masm.add64(scratch, output); - return; - } - // Use shift if constant is power of 2. - int32_t shift = mozilla::FloorLog2(constant); - if (int64_t(1) << shift == constant) { - diff --git a/cbindgen-vendor.tar.xz b/cbindgen-vendor.tar.xz index 0315d8fd84339ec5926e9ae89dc075edada30e1f..72da8a1da05d57a7e5c27c56b897d5637a5d590a 100644 Binary files a/cbindgen-vendor.tar.xz and b/cbindgen-vendor.tar.xz differ diff --git a/disable-glean-sdk,psutil,zstandard.patch b/disable-glean-sdk,psutil,zstandard.patch deleted file mode 100644 index 39580dadf6e3eb044d98e0f956fe8d23f2bc52ac..0000000000000000000000000000000000000000 --- a/disable-glean-sdk,psutil,zstandard.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- firefox-115.4.0/python/sites/mach.txt 2023-10-17 10:48:58.000000000 +0800 -+++ firefox-115.4.0/python/sites/mach.txt 2023-11-15 11:10:22.840955542 +0800 -@@ -135,11 +135,3 @@ - pth:xpcom/ds/tools - pth:xpcom/geckoprocesstypes_generator - pth:xpcom/idl-parser --# glean-sdk may not be installable if a wheel isn't available --# and it has to be built from source. --pypi-optional:glean-sdk==52.7.0:telemetry will not be collected --# Mach gracefully handles the case where `psutil` is unavailable. --# 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.9.4:telemetry will be missing some data --pypi-optional:zstandard>=0.11.1,<=0.22.0:zstd archives will not be possible to extract diff --git a/fedora-shebang-build.patch b/fedora-shebang-build.patch deleted file mode 100644 index 9ade86c309334fabd6fe4771209f54e1f0493d06..0000000000000000000000000000000000000000 --- a/fedora-shebang-build.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up firefox-73.0/build/unix/run-mozilla.sh.old firefox-73.0/build/unix/run-mozilla.sh ---- firefox-73.0/build/unix/run-mozilla.sh.old 2020-02-12 09:58:00.150895904 +0100 -+++ firefox-73.0/build/unix/run-mozilla.sh 2020-02-12 09:58:06.505860696 +0100 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/usr/bin/sh - # - # 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 diff --git a/firefox-115.15.0esr.source.tar.xz.asc b/firefox-115.15.0esr.source.tar.xz.asc deleted file mode 100644 index 93cf1110e4afb40db7ac6291ce89b22944215211..0000000000000000000000000000000000000000 --- a/firefox-115.15.0esr.source.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEErdcHlHlwDcrf3VM34207E/PZMnQFAmbMkacACgkQ4207E/PZ -MnQIMRAApCTh0QtB534WKg8rOh4EXq1JPVq0geZeYod/7ogTcf0ePybfrO2dGeIv -vbzfm4NZsIkcznLvYj/0LpkiA3WRXNwO0Rlxrh2CcnwjAFpLMhSs7iIXFy+sPv3u -Pn3v0rZiHwvunA8dyLtQjOYgRTeJ+FCorD6lowhM722uMjUEp2vYocgztDeDY8tS -ZHdud1FLBybC3eT0DB/KfCCcNmIETk1NVm3MoyKz7+2AcMMEXKbP/mIWHKPh82wn -w0m+hjdfEYzWIQZqQwuypil4dfQ59hxZfU+/L5MFrLV5iBDS8gexjZKzUYQjHi2E -ismmfZdscqFsTzDhXdKhi5d5aFIJ65T+7ZVXK00lBzCBnWGMXTdBNEweXAeqseaX -yDyLKouaO5HnptTH88zrSEoKpAYpAVwgKxNUM+HjolqagHPBnRZENfZZ+272m7YI -NmwFBBE/gonJbOaNbkmdpPPlCrLuyXozMo5alRRAsOLDn9eHsVosg/PpYzXcs1z3 -BB60WU+/DNtQ36Oe/enMO5KhY/mHneoxk7VRIyaixyQoJuLv8/NYRB2YT92EWDut -Nhd6pdsMVD313F5d59NwdUOmGpW7SfmDcgJnHgLdFHddAhTk+4291eGxgSJP/g5m -9z5aUbuNlPlyAXVNUiPFkiSoOvFXtMRDDrDHomyCl7MVSEHDHxc= -=9hCE ------END PGP SIGNATURE----- diff --git a/firefox-115.15.0esr.source.tar.xz b/firefox-128.2.0esr.source.tar.xz similarity index 100% rename from firefox-115.15.0esr.source.tar.xz rename to firefox-128.2.0esr.source.tar.xz diff --git a/firefox-128.2.0esr.source.tar.xz.asc b/firefox-128.2.0esr.source.tar.xz.asc new file mode 100644 index 0000000000000000000000000000000000000000..a4df27d414039fa1c17c928d62a9eef72e28601a --- /dev/null +++ b/firefox-128.2.0esr.source.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEErdcHlHlwDcrf3VM34207E/PZMnQFAmbMkaMACgkQ4207E/PZ +MnQqfw/+KvA2FOvKz8Va6YWc3hUQv4rim+voZov2uvQWvDMhcCcOJOBVGXAh7RhO +A8UEp5askLaE4K5K3Y4A/SEu0mr7hC2HYO6LqNJqyGymk9ldJm4zILPolLLoAJhz +wK/Q3Rr4crNLLV0JbvmKI7UzYzz589VJndBVr+craSAG6LlIpfVXidXYy62X5z8k +RNNqUkuS/l0Urso7RtajKiG1xECDF1xQ4NRYpguRT3AsrMf9Nex0ul3tuvPSlvg7 +vboGe+B2+t95EjgG8KmJ5mX/LlXIJY+SWiA47nW1L9anbTYOaCwnS93xp3gqcz55 +KtDDSl86fDXofwdZzYpjtT3om4kWAiVEyCQn3eTrvznQBqgMMhaQeM5LIiqqkiqe +Lm+8yyLbMu9ULT1ugIDhpAnREX34ePXG8qCOJNHLP71Vz+O+M5A5dppIo4KDSh9G +k/pT99uIXSpCPGwUKUwDmBoMX0VMVltwIHuzdbHE3vdhghQ7mR1DkrNeGmADrsp3 +wK0qjjP/UAu14MQhlIV7M2gQN9tdnVJYajkfgfqYrPXK/if3ORK5F4HFxAz8jjp6 +fowSHpX3XANBUqbNIhkOl80QV4TS2r9/6Wgoa7X1U2v5vkQVxXfNGkS4vCEIdOKx +mVZq0kIKcfJANYCrQMaC10whu0XDq3hdaAlrT5OyLVdgkwcY+D4= +=/MY3 +-----END PGP SIGNATURE----- diff --git a/firefox-enable-addons.patch b/firefox-enable-addons.patch index 15d0707cf01087cdee72c53a637c950f11c1d45b..75e14034050bf0d54ce84660d91e6727d5c850a3 100644 --- a/firefox-enable-addons.patch +++ b/firefox-enable-addons.patch @@ -1,10 +1,10 @@ -diff -up firefox-55.0/browser/app/profile/firefox.js.addons firefox-55.0/browser/app/profile/firefox.js ---- firefox-55.0/browser/app/profile/firefox.js.addons 2017-08-02 10:58:30.566363833 +0200 -+++ firefox-55.0/browser/app/profile/firefox.js 2017-08-02 10:59:15.377216959 +0200 -@@ -65,7 +65,8 @@ pref("extensions.systemAddon.update.url" +diff -up firefox-125.0/browser/app/profile/firefox.js.addons firefox-125.0/browser/app/profile/firefox.js +--- firefox-125.0/browser/app/profile/firefox.js.addons 2024-04-09 10:34:30.728405003 +0200 ++++ firefox-125.0/browser/app/profile/firefox.js 2024-04-09 10:36:01.444584632 +0200 +@@ -58,7 +58,8 @@ pref("extensions.systemAddon.update.enab // Disable add-ons that are not installed by the user in all scopes by default. - // See the SCOPE constants in AddonManager.jsm for values to use here. + // See the SCOPE constants in AddonManager.sys.mjs for values to use here. -pref("extensions.autoDisableScopes", 15); +pref("extensions.autoDisableScopes", 0); +pref("extensions.showMismatchUI", false); diff --git a/firefox-langpacks-115.15.0esr.tar.xz b/firefox-langpacks-128.2.0esr.tar.xz similarity index 78% rename from firefox-langpacks-115.15.0esr.tar.xz rename to firefox-langpacks-128.2.0esr.tar.xz index ec39b748d0dab90ba64a4425731382be888b4eae..30ce12564120d5a361270a7e9e0f89fa1e580d1a 100644 Binary files a/firefox-langpacks-115.15.0esr.tar.xz and b/firefox-langpacks-128.2.0esr.tar.xz differ diff --git a/firefox-tests-xpcshell-freeze.patch b/firefox-tests-xpcshell-freeze.patch deleted file mode 100644 index 111541797028ec20465fa0d2876dca70ee5db6cf..0000000000000000000000000000000000000000 --- a/firefox-tests-xpcshell-freeze.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-88.0/testing/xpcshell/runxpcshelltests.py.old firefox-88.0/testing/xpcshell/runxpcshelltests.py ---- firefox-88.0/testing/xpcshell/runxpcshelltests.py.old 2021-04-30 10:45:14.466616224 +0200 -+++ firefox-88.0/testing/xpcshell/runxpcshelltests.py 2021-04-30 10:45:21.339525085 +0200 -@@ -1382,8 +1382,8 @@ class XPCShellTests(object): - self.log.info("Process %s" % label) - self.log.info(msg) - -- dumpOutput(proc.stdout, "stdout") -- dumpOutput(proc.stderr, "stderr") -+ #dumpOutput(proc.stdout, "stdout") -+ #dumpOutput(proc.stderr, "stderr") - self.nodeProc = {} - - def startHttp3Server(self): diff --git a/firefox.sh.in b/firefox.sh.in index 9437266f75ef09460712a47b2c175341466c5c98..f8ad0fb45924c15e9fce8e206632d96124313e64 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -64,25 +64,8 @@ MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox" MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" -MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh" GETENFORCE_FILE="/usr/sbin/getenforce" -## -## Enable Wayland backend? -## -%DISABLE_WAYLAND_PLACEHOLDER% - -if ! [ $MOZ_DISABLE_WAYLAND ] && [ "$WAYLAND_DISPLAY" ]; then - if [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then - export MOZ_ENABLE_WAYLAND=1 - fi -## Enable Wayland on KDE/Sway -## - if [ "$XDG_SESSION_TYPE" == "wayland" ]; then - export MOZ_ENABLE_WAYLAND=1 - fi -fi - ## ## Use D-Bus remote exclusively when there's Wayland display. ## diff --git a/firefox.spec b/firefox.spec index 9bc3bec5aea79bd6c6297141c8fc80f57e8697df..12540daa651df32a2af46c95a5de5183f4965537 100644 --- a/firefox.spec +++ b/firefox.spec @@ -15,9 +15,10 @@ %global build_tests 1 %endif -%global system_nss 1 +# TODO: Revert this after SM2 & SM3 issue is fixed +%global system_nss 0 %global llvm_version 7.0 -%global rust_version 1.66 +%global rust_version 1.77 %global wayland_backend_default 0 %global system_av1 0 @@ -27,8 +28,7 @@ %if %{?system_nss} %global nspr_version 4.35 %global nspr_version_max 4.36 -%global nss_version 3.90 -%global nss_version_max 3.95 +%global nss_version 3.101 %endif %global mozappdir %{_libdir}/firefox @@ -44,7 +44,7 @@ Summary: Mozilla Firefox Web browser Name: firefox -Version: 115.15.0 +Version: 128.2.0 Release: 1 URL: https://www.mozilla.org/firefox/ License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.0-or-later @@ -77,54 +77,35 @@ Source36: testing.sh Source37: mochitest-python.tar.gz # Build patches -Patch01: disable-glean-sdk,psutil,zstandard.patch -Patch02: firefox-gcc-build.patch - +Patch01: firefox-gcc-build.patch # -- Upstreamed patches -- -Patch51: mozilla-bmo1170092.patch -Patch52: CVE-2023-7104.patch # -- Submitted upstream, not merged -- -Patch101: mozilla-bmo1636168-fscreen.patch -Patch102: mozilla-bmo1670333.patch -# Big endian fix -Patch103: mozilla-bmo1504834-part1.patch -Patch104: mozilla-bmo1504834-part3.patch -# Big endian fix -Patch105: mozilla-bmo849632.patch -# Big endian fix -Patch106: mozilla-bmo998749.patch -# Big endian fix -Patch107: mozilla-bmo1716707-swizzle.patch -Patch108: mozilla-bmo1716707-svg.patch - -# ---- Fedora specific patches ---- + + +# Enable user addons Patch151: firefox-enable-addons.patch Patch152: rhbz-1173156.patch -Patch153: fedora-shebang-build.patch -Patch154: firefox-nss-addon-hack.patch -# ARM run-time patch -Patch155: rhbz-1354671.patch +Patch153: firefox-nss-addon-hack.patch +# Specific ARM run-time patch below +Patch154: rhbz-1354671.patch # ---- Test patches ---- # Generate without context by # GENDIFF_DIFF_ARGS=-U0 gendiff firefox-xxxx .firefox-tests-xpcshell # GENDIFF_DIFF_ARGS=-U0 gendiff firefox-xxxx .firefox-tests-reftest -Patch201: firefox-tests-xpcshell-freeze.patch # ---- Security patches ---- -Patch301: CVE-2023-44488-libvpx.patch # system AV1 patches (from Gentoo) Patch800: bmo-1559213-Support-system-av1.patch Patch801: bmo-1559213-fix-system-av1-libs.patch +# Arch specific patches # ---- RISCV64 patches ---- -# Fix register conflict in MulI64.r=jseward -# https://phabricator.services.mozilla.com/D188068 -Patch1001: D188068.diff +# ---- LOONGARCH patches ---- Patch1002: add-loongarch64-support-for-nix.patch Patch1003: add-loongarch64-support-for-cty.patch Patch1004: add-loongarch64-support-for-authenticator.patch @@ -137,9 +118,7 @@ Patch1007: backport-Bug-1782159-to-support-loongarch64.patch BuildRequires: pkgconfig(nspr) >= %{nspr_version} BuildRequires: pkgconfig(nspr) < %{nspr_version_max} BuildRequires: pkgconfig(nss) >= %{nss_version} -BuildRequires: pkgconfig(nss) < %{nss_version_max} BuildRequires: nss-static >= %{nss_version} -BuildRequires: nss-static < %{nss_version_max} %endif BuildRequires: bzip2-devel @@ -401,40 +380,24 @@ rm -vf ./*/testing/web-platform/tests/conformance-checkers/html-rdfa/0231-isvali rm -vf ./*/layout/inspector/tests/chrome/test_fontVariationsAPI.css # Build patches -%patch -P1 -p1 -%patch -P2 -p1 -b .firefox-gcc-build +%patch -P1 -p1 -b .firefox-gcc-build # -- Upstreamed patches -- -%patch -P51 -p1 -b .mozilla-bmo1170092 -%patch -P52 -p1 # -- Submitted upstream, not merged -- -%patch -P101 -p1 -b .mozilla-bmo1636168-fscreen -%patch -P102 -p1 -b .mozilla-bmo1670333 -%patch -P103 -p1 -b .mozilla-bmo1504834-part1 -%patch -P104 -p1 -b .mozilla-bmo1504834-part3 -%patch -P105 -p1 -b .mozilla-bmo849632 -%patch -P106 -p1 -b .mozilla-bmo998749 -%patch -P107 -p1 -b .mozilla-bmo1716707-swizzle -%patch -P108 -p1 -b .mozilla-bmo1716707-svg - -# ---- Fedora specific patches ---- + +# ---- Specific patches ---- %patch -P151 -p1 -b .addons %patch -P152 -p1 -b .rhbz-1173156 -%patch -P153 -p1 -b .fedora-shebang -%patch -P154 -p1 -b .addons-nss-hack +%patch -P153 -p1 -b .addons-nss-hack # ARM run-time patch %ifarch aarch64 -%patch -P155 -p1 -b .rhbz-1354671 +%patch -P154 -p1 -b .rhbz-1354671 %endif # ---- Test patches ---- -%patch -P201 -p1 -b .firefox-tests-xpcshell-freeze # ---- Security patches ---- -cd media/libvpx/libvpx -%patch -P301 -p1 -b .CVE-2023-44488-libvpx -cd - # system AV1 patches %if %{system_av1} @@ -443,15 +406,16 @@ cd - %endif # RISCV64 patches -%patch -P1001 -p1 -b .D188068 #LoongArch64 patches +%ifarch loongarch64 %patch -P1002 -p1 %patch -P1003 -p1 %patch -P1004 -p1 %patch -P1005 -p1 %patch -P1006 -p1 %patch -P1007 -p1 +%endif %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -606,6 +570,7 @@ chmod a+x %{_buildrootdir}/bin find ./ -path ./third_party/rust -prune -o -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-fexceptions//') MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-Werror=format-security//') MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fpermissive" MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" @@ -856,9 +821,6 @@ ln -s %{_datadir}/myspell %{buildroot}%{mozappdir}/dictionaries %{__cp} failures-* %{buildroot}/%{version}-%{release}/ || true %endif -# Copy over run-mozilla.sh -%{__cp} build/unix/run-mozilla.sh %{buildroot}%{mozappdir} - # Add distribution.ini %{__mkdir_p} %{buildroot}%{mozappdir}/distribution %{__cp} %{SOURCE26} %{buildroot}%{mozappdir}/distribution @@ -938,7 +900,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %dir %{langpackdir} %endif %{mozappdir}/browser/omni.ja -%{mozappdir}/run-mozilla.sh %{mozappdir}/application.ini %{mozappdir}/pingsender %exclude %{mozappdir}/removed-files @@ -959,17 +920,22 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{mozappdir}/dictionaries %{mozappdir}/omni.ja %{mozappdir}/platform.ini -%{mozappdir}/plugin-container %{mozappdir}/gmp-clearkey %{mozappdir}/fonts/TwemojiMozilla.ttf %{mozappdir}/glxtest %{mozappdir}/vaapitest +%ifarch aarch64 riscv64 +%{mozappdir}/v4l2test +%endif %if !%{?system_nss} %exclude %{mozappdir}/libnssckbi.so %endif %changelog +* Thu Sep 05 2024 misaka00251 - 128.2.0-1 +- Upgrade to 128.2.0 + * Wed Sep 04 2024 wangkai <13474090681@163.com> - 115.15.0-1 - Update to 115.15.0 - Fix CVE-2024-8381 CVE-2024-8382 CVE-2024-8383 CVE-2024-8384 @@ -1083,7 +1049,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - Fix CVE-2020-15664 CVE-2020-15665 CVE-2020-15666 CVE-2020-15667 CVE-2020-15668 CVE-2020-15676 CVE-2020-15677 CVE-2020-15678 -* Sat Nov 28 2020 Jeffery.Gao - 79.0-3 +* Thu Nov 28 2020 Jeffery.Gao - 79.0-3 - Fix firefox downgrade error * Mon Oct 26 2020 lingsheng - 79.0-2 diff --git a/mozilla-bmo1170092.patch b/mozilla-bmo1170092.patch deleted file mode 100644 index 36d2b00f4ec5758ea8a01b10ff2f104132eda238..0000000000000000000000000000000000000000 --- a/mozilla-bmo1170092.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -up firefox-115.0.2/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-115.0.2/extensions/pref/autoconfig/src/nsReadConfig.cpp ---- firefox-115.0.2/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2023-07-10 21:08:53.000000000 +0200 -+++ firefox-115.0.2/extensions/pref/autoconfig/src/nsReadConfig.cpp 2023-07-17 10:33:23.443355156 +0200 -@@ -263,8 +263,20 @@ nsresult nsReadConfig::openAndEvaluateJS - if (NS_FAILED(rv)) return rv; - - rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); -- if (NS_FAILED(rv)) return rv; -+ if (NS_FAILED(rv)) { -+ // Look for cfg file in /etc//pref -+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, -+ getter_AddRefs(jsFile)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = jsFile->AppendNative(nsLiteralCString("pref")); -+ NS_ENSURE_SUCCESS(rv, rv); -+ rv = jsFile->AppendNative(nsDependentCString(aFileName)); -+ NS_ENSURE_SUCCESS(rv, rv); - -+ rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } - } else { - nsAutoCString location("resource://gre/defaults/autoconfig/"); - location += aFileName; -diff -up firefox-115.0.2/modules/libpref/Preferences.cpp.1170092 firefox-115.0.2/modules/libpref/Preferences.cpp ---- firefox-115.0.2/modules/libpref/Preferences.cpp.1170092 2023-07-10 21:09:00.000000000 +0200 -+++ firefox-115.0.2/modules/libpref/Preferences.cpp 2023-07-17 10:33:23.444355156 +0200 -@@ -4825,6 +4825,9 @@ nsresult Preferences::InitInitialObjects - // - // Thus, in the omni.jar case, we always load app-specific default - // preferences from omni.jar, whether or not `$app == $gre`. -+ // -+ // At very end load configuration from system config location: -+ // - /etc/firefox/pref/*.js - - nsresult rv = NS_ERROR_FAILURE; - UniquePtr find; -diff -up firefox-115.0.2/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-115.0.2/toolkit/xre/nsXREDirProvider.cpp ---- firefox-115.0.2/toolkit/xre/nsXREDirProvider.cpp.1170092 2023-07-10 22:57:20.000000000 +0200 -+++ firefox-115.0.2/toolkit/xre/nsXREDirProvider.cpp 2023-07-17 10:56:25.309692121 +0200 -@@ -72,6 +72,7 @@ - #endif - #ifdef XP_UNIX - # include -+# include "nsIXULAppInfo.h" - #endif - #ifdef XP_IOS - # include "UIKitDirProvider.h" -@@ -478,6 +479,17 @@ nsXREDirProvider::GetFile(const char* aP - rv = file->AppendNative(nsLiteralCString(PREF_OVERRIDE_DIRNAME)); - NS_ENSURE_SUCCESS(rv, rv); - rv = EnsureDirectoryExists(file); -+ } else if (!strcmp(aProperty, NS_APP_PREFS_SYSTEM_CONFIG_DIR)) { -+ nsCString sysConfigDir = nsLiteralCString("/etc/"); -+ nsCOMPtr appInfo = do_GetService("@mozilla.org/xre/app-info;1"); -+ if (!appInfo) -+ return NS_ERROR_NOT_AVAILABLE; -+ nsCString appName; -+ appInfo->GetName(appName); -+ ToLowerCase(appName); -+ sysConfigDir.Append(appName); -+ NS_NewNativeLocalFile(sysConfigDir, false, getter_AddRefs(file)); -+ rv = EnsureDirectoryExists(file); - } else { - // We don't know anything about this property. Fail without warning, because - // otherwise we'll get too much warning spam due to -@@ -694,6 +706,16 @@ nsXREDirProvider::GetFiles(const char* a - } - #endif - -+ // Add /etc//pref/ directory if it exists -+ nsCOMPtr systemPrefDir; -+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, -+ getter_AddRefs(systemPrefDir)); -+ if (NS_SUCCEEDED(rv)) { -+ rv = systemPrefDir->AppendNative(nsLiteralCString("pref")); -+ if (NS_SUCCEEDED(rv)) -+ directories.AppendObject(systemPrefDir); -+ } -+ - rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile)); - } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) { - // NS_APP_CHROME_DIR_LIST is only used to get default (native) icons -diff -up firefox-115.0.2/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-115.0.2/xpcom/io/nsAppDirectoryServiceDefs.h ---- firefox-115.0.2/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2023-07-10 21:09:13.000000000 +0200 -+++ firefox-115.0.2/xpcom/io/nsAppDirectoryServiceDefs.h 2023-07-17 10:33:23.444355156 +0200 -@@ -58,6 +58,7 @@ - #define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL" - #define NS_APP_PREFS_OVERRIDE_DIR \ - "PrefDOverride" // Directory for per-profile defaults -+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration - - #define NS_APP_USER_PROFILE_50_DIR "ProfD" - #define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD" diff --git a/mozilla-bmo1504834-part1.patch b/mozilla-bmo1504834-part1.patch deleted file mode 100644 index 5246c5a03faf9c1f91c61b7908f3814ba594f197..0000000000000000000000000000000000000000 --- a/mozilla-bmo1504834-part1.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -up firefox-115.2.0/gfx/2d/DrawTargetSkia.cpp.mozilla-bmo1504834-part1 firefox-115.2.0/gfx/2d/DrawTargetSkia.cpp ---- firefox-115.2.0/gfx/2d/DrawTargetSkia.cpp.mozilla-bmo1504834-part1 2023-09-20 22:15:11.850172571 +0200 -+++ firefox-115.2.0/gfx/2d/DrawTargetSkia.cpp 2023-09-20 22:16:10.446147737 +0200 -@@ -156,8 +156,8 @@ static IntRect CalculateSurfaceBounds(co - } - - static const int kARGBAlphaOffset = -- SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0; -- -+ 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) { - if (aFormat != SurfaceFormat::B8G8R8X8 || aSize.IsEmpty()) { -diff -up firefox-115.2.0/gfx/2d/Types.h.mozilla-bmo1504834-part1 firefox-115.2.0/gfx/2d/Types.h ---- firefox-115.2.0/gfx/2d/Types.h.mozilla-bmo1504834-part1 2023-08-21 15:43:23.000000000 +0200 -+++ firefox-115.2.0/gfx/2d/Types.h 2023-09-20 22:15:11.850172571 +0200 -@@ -89,18 +89,11 @@ enum class SurfaceFormat : int8_t { - // This represents the unknown format. - UNKNOWN, // TODO: Replace uses with Maybe. - --// 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() -+ // The following values are endian-independent synonyms. The _UINT32 suffix -+ // indicates that the name reflects the layout when viewed as a uint32_t -+ // value. - 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 -up firefox-115.2.0/gfx/skia/skia/modules/skcms/skcms.cc.mozilla-bmo1504834-part1 firefox-115.2.0/gfx/skia/skia/modules/skcms/skcms.cc ---- firefox-115.2.0/gfx/skia/skia/modules/skcms/skcms.cc.mozilla-bmo1504834-part1 2023-08-21 15:43:23.000000000 +0200 -+++ firefox-115.2.0/gfx/skia/skia/modules/skcms/skcms.cc 2023-09-20 22:15:11.851172570 +0200 -@@ -30,6 +30,8 @@ - #include - #include - #endif -+#else -+ #define SKCMS_PORTABLE - #endif - - static bool runtime_cpu_detection = true; -@@ -324,20 +326,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 -- return __builtin_bswap16(be); -+ #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 -- return __builtin_bswap32(be); -+ #if defined(_MSC_VER) -+ return _byteswap_ulong(be); -+ #else -+ return __builtin_bswap32(be); -+ #endif - #endif - } - diff --git a/mozilla-bmo1504834-part3.patch b/mozilla-bmo1504834-part3.patch deleted file mode 100644 index 9c2ece0d8983f026a2951817da278b24996ce29a..0000000000000000000000000000000000000000 --- a/mozilla-bmo1504834-part3.patch +++ /dev/null @@ -1,17 +0,0 @@ -# HG changeset patch -# Parent 09cd4ac2cc607e85aa572425b824fbab386af607 -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). - -diff --git a/gfx/skia/skia/src/opts/SkBlitMask_opts.h b/gfx/skia/skia/src/opts/SkBlitMask_opts.h ---- a/gfx/skia/skia/src/opts/SkBlitMask_opts.h -+++ b/gfx/skia/skia/src/opts/SkBlitMask_opts.h -@@ -210,6 +210,8 @@ 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) -+ // TODO: Check this for endian-issues! -+ // Do we need to switch 255 to the front for all of those tuples? - return (aa & Sk4px(skvx::byte16{0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255})) - + d.approxMulDiv255(aa.inv()); - }; diff --git a/mozilla-bmo1636168-fscreen.patch b/mozilla-bmo1636168-fscreen.patch deleted file mode 100644 index e8bb3103395d93b08e517830b11f73d9de2c7d1f..0000000000000000000000000000000000000000 --- a/mozilla-bmo1636168-fscreen.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -up firefox-114.0/widget/gtk/nsWindow.cpp.D110204-fscreen.diff firefox-114.0/widget/gtk/nsWindow.cpp ---- firefox-114.0/widget/gtk/nsWindow.cpp.D110204-fscreen.diff 2023-05-17 10:43:02.000000000 +0200 -+++ firefox-114.0/widget/gtk/nsWindow.cpp 2023-05-17 13:53:54.000443278 +0200 -@@ -100,6 +100,7 @@ - #include "ScreenHelperGTK.h" - #include "SystemTimeConverter.h" - #include "WidgetUtilsGtk.h" -+#include "nsIBrowserHandler.h" - - #ifdef ACCESSIBILITY - # include "mozilla/a11y/LocalAccessible.h" -@@ -173,7 +174,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR - GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SCROLL_MASK | -- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK; -+ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK | -+ GDK_FOCUS_CHANGE_MASK; - - /* utility functions */ - static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX, -@@ -433,7 +435,8 @@ nsWindow::nsWindow() - mResizedAfterMoveToRect(false), - mConfiguredClearColor(false), - mGotNonBlankPaint(false), -- mNeedsToRetryCapturingMouse(false) { -+ mNeedsToRetryCapturingMouse(false), -+ mPendingFullscreen(false) { - mWindowType = WindowType::Child; - mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize); - -@@ -5263,6 +5266,19 @@ void nsWindow::OnWindowStateEvent(GtkWid - ClearTransparencyBitmap(); - } - } -+ -+ // Hack to ensure window switched to fullscreen - avoid to fail when starting -+ // in kiosk mode -+ if (mPendingFullscreen && -+ !(aEvent->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)) { -+ LOG( -+ " Window should be fullscreen, but it's not, retrying set to " -+ "fullscreen.\n"); -+ MakeFullScreen(true); -+ } else { -+ LOG(" Window successfully switched to fullscreen, happy now\n"); -+ mPendingFullscreen = false; -+ } - } - - void nsWindow::OnDPIChanged() { -@@ -7409,6 +7425,19 @@ nsresult nsWindow::MakeFullScreen(bool a - } - } - -+ // if in kiosk, ensure the fullscreen is called -+ nsCOMPtr browserHandler = -+ do_GetService("@mozilla.org/browser/clh;1"); -+ if (browserHandler) { -+ bool isKiosk; -+ browserHandler->GetKiosk(&isKiosk); -+ if (isKiosk) { -+ LOG(" is kiosk, ensure the window switch to fullscreen\n"); -+ mPendingFullscreen = true; -+ } -+ } else { -+ LOG(" Cannot find the browserHandler service.\n"); -+ } - gtk_window_fullscreen(GTK_WINDOW(mShell)); - } else { - gtk_window_unfullscreen(GTK_WINDOW(mShell)); -diff -up firefox-114.0/widget/gtk/nsWindow.h.D110204-fscreen.diff firefox-114.0/widget/gtk/nsWindow.h ---- firefox-114.0/widget/gtk/nsWindow.h.D110204-fscreen.diff 2023-05-17 08:46:16.000000000 +0200 -+++ firefox-114.0/widget/gtk/nsWindow.h 2023-05-17 13:51:29.502159247 +0200 -@@ -752,6 +752,7 @@ class nsWindow final : public nsBaseWidg - * move-to-rect callback we set mMovedAfterMoveToRect/mResizedAfterMoveToRect. - */ - bool mWaitingForMoveToRectCallback : 1; -+ bool mPendingFullscreen : 1; - bool mMovedAfterMoveToRect : 1; - bool mResizedAfterMoveToRect : 1; - diff --git a/mozilla-bmo1670333.patch b/mozilla-bmo1670333.patch deleted file mode 100644 index 7126d433733bea0c5876251879c94c9a119539f3..0000000000000000000000000000000000000000 --- a/mozilla-bmo1670333.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -up firefox-115.0/dom/media/mp4/MP4Demuxer.cpp.1670333 firefox-115.0/dom/media/mp4/MP4Demuxer.cpp ---- firefox-115.0/dom/media/mp4/MP4Demuxer.cpp.1670333 2023-06-06 23:14:43.000000000 +0200 -+++ firefox-115.0/dom/media/mp4/MP4Demuxer.cpp 2023-06-08 08:15:48.214109403 +0200 -@@ -32,6 +32,8 @@ mozilla::LogModule* GetDemuxerLog() { re - DDMOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, "::%s: " arg, \ - __func__, ##__VA_ARGS__) - -+extern bool gUseKeyframeFromContainer; -+ - namespace mozilla { - - using TimeUnit = media::TimeUnit; -@@ -404,6 +406,12 @@ already_AddRefed MP4TrackD - [[fallthrough]]; - case H264::FrameType::OTHER: { - bool keyframe = type == H264::FrameType::I_FRAME; -+ if (gUseKeyframeFromContainer) { -+ if (sample->mKeyframe && sample->mKeyframe != keyframe) { -+ sample->mKeyframe = keyframe; -+ } -+ break; -+ } - if (sample->mKeyframe != keyframe) { - NS_WARNING(nsPrintfCString("Frame incorrectly marked as %skeyframe " - "@ pts:%" PRId64 " dur:%" PRId64 -diff -up firefox-115.0/dom/media/platforms/PDMFactory.cpp.1670333 firefox-115.0/dom/media/platforms/PDMFactory.cpp ---- firefox-115.0/dom/media/platforms/PDMFactory.cpp.1670333 2023-06-06 23:14:44.000000000 +0200 -+++ firefox-115.0/dom/media/platforms/PDMFactory.cpp 2023-06-08 08:09:33.145289602 +0200 -@@ -67,6 +67,8 @@ - - #include - -+bool gUseKeyframeFromContainer = false; -+ - using DecodeSupport = mozilla::media::DecodeSupport; - using DecodeSupportSet = mozilla::media::DecodeSupportSet; - using MediaCodec = mozilla::media::MediaCodec; -@@ -562,7 +564,7 @@ void PDMFactory::CreateRddPDMs() { - #ifdef MOZ_FFMPEG - if (StaticPrefs::media_ffmpeg_enabled() && - StaticPrefs::media_rdd_ffmpeg_enabled() && -- !CreateAndStartupPDM()) { -+ !(mFFmpegUsed = CreateAndStartupPDM())) { - mFailureFlags += GetFailureFlagBasedOnFFmpegStatus( - FFmpegRuntimeLinker::LinkStatusCode()); - } -@@ -738,9 +740,10 @@ void PDMFactory::CreateDefaultPDMs() { - - CreateAndStartupPDM(); - -- if (StaticPrefs::media_gmp_decoder_enabled() && -+ if (StaticPrefs::media_gmp_decoder_enabled() && !mFFmpegUsed && - !StartupPDM(GMPDecoderModule::Create(), - StaticPrefs::media_gmp_decoder_preferred())) { -+ gUseKeyframeFromContainer = true; - mFailureFlags += DecoderDoctorDiagnostics::Flags::GMPPDMFailedToStartup; - } - } -diff -up firefox-115.0/dom/media/platforms/PDMFactory.h.1670333 firefox-115.0/dom/media/platforms/PDMFactory.h ---- firefox-115.0/dom/media/platforms/PDMFactory.h.1670333 2023-06-06 23:14:42.000000000 +0200 -+++ firefox-115.0/dom/media/platforms/PDMFactory.h 2023-06-08 08:09:33.145289602 +0200 -@@ -103,6 +103,7 @@ class PDMFactory final { - RefPtr mNullPDM; - - DecoderDoctorDiagnostics::FlagsSet mFailureFlags; -+ bool mFFmpegUsed = false; - - friend class RemoteVideoDecoderParent; - static void EnsureInit(); diff --git a/mozilla-bmo1716707-svg.patch b/mozilla-bmo1716707-svg.patch deleted file mode 100644 index 9c0559caa0d814d9a4966c05ebfe105a1036fe89..0000000000000000000000000000000000000000 --- a/mozilla-bmo1716707-svg.patch +++ /dev/null @@ -1,29 +0,0 @@ -# HG changeset patch -# User M. Sirringhaus -# Date 1645518286 -3600 -# Tue Feb 22 09:24:46 2022 +0100 -# Node ID 81832d035e101471dcf52dd91de287268add7a91 -# Parent 66f7ce16eb4965108687280e5443edd610631efb -imported patch svg-rendering.patch - -diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp ---- a/image/imgFrame.cpp -+++ b/image/imgFrame.cpp -@@ -372,6 +372,17 @@ nsresult imgFrame::InitWithDrawable(gfxD - 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/mozilla-bmo1716707-swizzle.patch b/mozilla-bmo1716707-swizzle.patch deleted file mode 100644 index bb375602ee6bbee92af32401a963ebd354488daa..0000000000000000000000000000000000000000 --- a/mozilla-bmo1716707-swizzle.patch +++ /dev/null @@ -1,34 +0,0 @@ -# HG changeset patch -# User M. Sirringhaus -# Date 1645518286 -3600 -# Tue Feb 22 09:24:46 2022 +0100 -# Node ID 494640792b4677f6462e95b90a54a4e22aeb738b -# Parent 81832d035e101471dcf52dd91de287268add7a91 -imported patch one_swizzle_to_rule_them_all.patch - -Index: firefox-102.0/gfx/webrender_bindings/RenderCompositorSWGL.cpp -=================================================================== ---- firefox-102.0.orig/gfx/webrender_bindings/RenderCompositorSWGL.cpp -+++ firefox-102.0/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 +237,13 @@ void RenderCompositorSWGL::CommitMappedB - } - 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/mozilla-bmo849632.patch b/mozilla-bmo849632.patch deleted file mode 100644 index 913d6bcdd9a061dde2e70f3cb775844b8370fc16..0000000000000000000000000000000000000000 --- a/mozilla-bmo849632.patch +++ /dev/null @@ -1,26 +0,0 @@ -# HG changeset patch -# Parent 3de59fe1b8708c01e134ce698c4232b8a854f617 -Problem: webGL sites are displayed in the wrong color (usually blue-ish) -Solution: Problem is with skia once again. Output of webgl seems endian-correct, but skia only - knows how to deal with little endian. - So we swizzle the output of webgl after reading it from readpixels() -Note: This does not fix all webGL sites, but is a step in the right direction - -Index: firefox-115.0/gfx/gl/GLContext.h -=================================================================== ---- firefox-115.0.orig/gfx/gl/GLContext.h -+++ firefox-115.0/gfx/gl/GLContext.h -@@ -1560,6 +1560,13 @@ class GLContext : public GenericAtomicRe - BEFORE_GL_CALL; - mSymbols.fReadPixels(x, y, width, height, format, type, pixels); - OnSyncCall(); -+#if MOZ_BIG_ENDIAN() -+ uint8_t* itr = (uint8_t*)pixels; -+ for (GLsizei i = 0; i < width * height; i++) { -+ NativeEndian::swapToLittleEndianInPlace((uint32_t*)itr, 1); -+ itr += 4; -+ } -+#endif - AFTER_GL_CALL; - mHeavyGLCallsSinceLastFlush = true; - } diff --git a/mozilla-bmo998749.patch b/mozilla-bmo998749.patch deleted file mode 100644 index 50e22b56946ea07de821e7827a61bd4701c54f14..0000000000000000000000000000000000000000 --- a/mozilla-bmo998749.patch +++ /dev/null @@ -1,29 +0,0 @@ -# HG changeset patch -# User msirringhaus@suse.de -# Date 1583738770 -3600 -# Mon Mar 09 08:26:10 2020 +0100 -# Node ID 34676feac1a542e409e22acf5b98735f8313b1ce -# Parent 506857dace0a08d1c9685e3ac264646590b3e27f -[mq]: mozilla-bmo998749.patch - -diff -r 506857dace0a -r 34676feac1a5 gfx/2d/FilterProcessing.h ---- a/gfx/2d/FilterProcessing.h Fri Feb 28 12:31:51 2020 +0100 -+++ b/gfx/2d/FilterProcessing.h Mon Mar 09 08:26:10 2020 +0100 -@@ -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: