From 501ba1b92b705da1a318f2922052f8b3b78767c5 Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Mon, 27 Jun 2022 11:34:31 -0500 Subject: [PATCH] firefox: 102.0 --- extra/firefox/README | 7 +- extra/firefox/checksums | 4 +- extra/firefox/patches/fix-wayland-only.patch | 113 +++++- extra/firefox/version | 2 +- testing/firefox/README | 123 ------ testing/firefox/build | 101 ----- testing/firefox/checksums | 10 - testing/firefox/depends | 31 -- testing/firefox/patches/cbindgen-fix.patch | 16 - testing/firefox/patches/fix-clang-as.patch | 48 --- .../firefox/patches/fix-linux-header.patch | 12 - .../firefox/patches/fix-wayland-only.patch | 360 ------------------ testing/firefox/patches/no-dbus.patch | 58 --- testing/firefox/patches/no-fribidi.patch | 12 - testing/firefox/post-install | 12 - testing/firefox/sources | 10 - testing/firefox/version | 1 - 17 files changed, 112 insertions(+), 808 deletions(-) delete mode 100644 testing/firefox/README delete mode 100755 testing/firefox/build delete mode 100644 testing/firefox/checksums delete mode 100644 testing/firefox/depends delete mode 100644 testing/firefox/patches/cbindgen-fix.patch delete mode 100644 testing/firefox/patches/fix-clang-as.patch delete mode 100644 testing/firefox/patches/fix-linux-header.patch delete mode 100644 testing/firefox/patches/fix-wayland-only.patch delete mode 100644 testing/firefox/patches/no-dbus.patch delete mode 100644 testing/firefox/patches/no-fribidi.patch delete mode 100755 testing/firefox/post-install delete mode 100644 testing/firefox/sources delete mode 100644 testing/firefox/version diff --git a/extra/firefox/README b/extra/firefox/README index a971327c..70214c4d 100644 --- a/extra/firefox/README +++ b/extra/firefox/README @@ -68,17 +68,14 @@ should start with no further configuration. --[005] Enable VAAPI Acceleration ---------------------------------------------- -Make sure that the following are set in your about:config page. +As of Firefox 102, only the following modification to about:config should be +required, with no need to disable any sandbox features. +------------------------------------------------------------------------------+ | | | about:config | | | -| gfx.webrender.all=true | -| media.av1.enabled=false | -| media.ffmpeg.dmabuf-textures.disabled=false | | media.ffmpeg.vaapi.enabled=true | -| media.ffvpx.enabled=false | | | +------------------------------------------------------------------------------+ diff --git a/extra/firefox/checksums b/extra/firefox/checksums index c9c9870d..5e273128 100644 --- a/extra/firefox/checksums +++ b/extra/firefox/checksums @@ -1,10 +1,10 @@ -b4c76e8bdf81f473f3e56b2f69dbe5119bba5cab38e36ab0f3f38cf0cdc4a9c2 +01797f04bd8d65f4c7f628d7ce832bf52a0874433886e4d0d78ef33c1ca66abf 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37 d3ea2503dff0a602bb058153533ebccd8232e8aac1dc82437a55d724b8d22bc2 ba6e380bc3d2cbd1b3a505ab97687498335c334d8a4be7f465ad30ee366806c7 86ce49e650dd117f0f2928a7f810a58df526b1087c274d35eeb9c5bbf09eac5b -38a6124659daf6b2d2121f9aa44c2cf02c9dec3d0b24054defdc3101b302c88c +5701481a104e23ae928161c84b7bc0040a8d9176681db6e94e26c3975af49634 509ce8c2e956481850cf3fbbeb2adcfd72a29f0699ccf2d00c24d1f81167a1dc 4a232e3aa3973894a58c126b9e901c924d4e1ca3e00c4fc82d08de4b880183a9 diff --git a/extra/firefox/patches/fix-wayland-only.patch b/extra/firefox/patches/fix-wayland-only.patch index 48a8d6c9..750493f0 100644 --- a/extra/firefox/patches/fix-wayland-only.patch +++ b/extra/firefox/patches/fix-wayland-only.patch @@ -1,3 +1,104 @@ +diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp +index 2bf6de6..d2fce1f 100644 +--- a/gfx/gl/GLContextProviderEGL.cpp ++++ b/gfx/gl/GLContextProviderEGL.cpp +@@ -79,6 +79,7 @@ + # if defined(MOZ_WAYLAND) + # include + # include ++# include "mozilla/WidgetUtilsGtk.h" + # include "mozilla/widget/nsWaylandDisplay.h" + # endif + #endif +diff --git a/gfx/gl/GLContextProviderLinux.cpp b/gfx/gl/GLContextProviderLinux.cpp +index f8f6f3d..7205449 100644 +--- a/gfx/gl/GLContextProviderLinux.cpp ++++ b/gfx/gl/GLContextProviderLinux.cpp +@@ -13,7 +13,9 @@ namespace mozilla::gl { + using namespace mozilla::gfx; + using namespace mozilla::widget; + ++#ifdef MOZ_X11 + static class GLContextProviderGLX sGLContextProviderGLX; ++#endif + static class GLContextProviderEGL sGLContextProviderEGL; + + already_AddRefed GLContextProviderLinux::CreateForCompositorWidget( +@@ -22,9 +24,11 @@ already_AddRefed GLContextProviderLinux::CreateForCompositorWidget( + if (gfxVars::UseEGL()) { + return sGLContextProviderEGL.CreateForCompositorWidget( + aCompositorWidget, aHardwareWebRender, aForceAccelerated); ++#ifdef MOZ_X11 + } else { + return sGLContextProviderGLX.CreateForCompositorWidget( + aCompositorWidget, aHardwareWebRender, aForceAccelerated); ++#endif + } + } + +@@ -33,8 +37,10 @@ already_AddRefed GLContextProviderLinux::CreateHeadless( + const GLContextCreateDesc& desc, nsACString* const out_failureId) { + if (gfxVars::UseEGL()) { + return sGLContextProviderEGL.CreateHeadless(desc, out_failureId); ++#ifdef MOZ_X11 + } else { + return sGLContextProviderGLX.CreateHeadless(desc, out_failureId); ++#endif + } + } + +@@ -42,8 +48,10 @@ already_AddRefed GLContextProviderLinux::CreateHeadless( + GLContext* GLContextProviderLinux::GetGlobalContext() { + if (gfxVars::UseEGL()) { + return sGLContextProviderEGL.GetGlobalContext(); ++#ifdef MOZ_X11 + } else { + return sGLContextProviderGLX.GetGlobalContext(); ++#endif + } + } + +@@ -51,8 +59,10 @@ GLContext* GLContextProviderLinux::GetGlobalContext() { + void GLContextProviderLinux::Shutdown() { + if (gfxVars::UseEGL()) { + sGLContextProviderEGL.Shutdown(); ++#ifdef MOZ_X11 + } else { + sGLContextProviderGLX.Shutdown(); ++#endif + } + } + +diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build +index bc492a8..fc0a005 100644 +--- a/gfx/gl/moz.build ++++ b/gfx/gl/moz.build +@@ -108,10 +108,11 @@ elif gl_provider == "Linux": + # GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES + # as it includes X11 headers which cause conflicts. + SOURCES += [ +- "GLContextProviderGLX.cpp", + "GLContextProviderLinux.cpp", + ] + EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"] ++ if CONFIG["MOZ_X11"]: ++ SOURCES += ["GLContextProviderGLX.cpp"] + + if CONFIG["MOZ_WAYLAND"]: + SOURCES += ["SharedSurfaceDMABUF.cpp"] +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index dd8dab6..34494ad 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -998,7 +998,7 @@ gfxPlatformGtk::CreateGlobalHardwareVsyncSource() { + RefPtr softwareVsync = new XrandrSoftwareVsyncSource(); + return softwareVsync.forget(); + #else +- return CreateSoftwareVsyncSource(); ++ return GetSoftwareVsyncSource(); + #endif + } + diff --git a/widget/gtk/CompositorWidgetParent.cpp b/widget/gtk/CompositorWidgetParent.cpp index 4382ccf..9986146 100644 --- a/widget/gtk/CompositorWidgetParent.cpp @@ -34,7 +135,7 @@ index 07a1226..0a1d888 100644 #include "mozilla/widget/InProcessCompositorWidget.h" #include "mozilla/widget/PlatformWidgetTypes.h" diff --git a/widget/gtk/IMContextWrapper.cpp b/widget/gtk/IMContextWrapper.cpp -index cc84d40..e2180f5 100644 +index ccbe511..d9e7fe5 100644 --- a/widget/gtk/IMContextWrapper.cpp +++ b/widget/gtk/IMContextWrapper.cpp @@ -7,6 +7,7 @@ @@ -70,7 +171,7 @@ index 4158118..bffd6f5 100644 -} // namespace mozilla +} // namespace mozilla::widget diff --git a/widget/gtk/MPRISServiceHandler.cpp b/widget/gtk/MPRISServiceHandler.cpp -index ad85082..e21e46f 100644 +index a8b4a43..9f95718 100644 --- a/widget/gtk/MPRISServiceHandler.cpp +++ b/widget/gtk/MPRISServiceHandler.cpp @@ -12,6 +12,7 @@ @@ -222,10 +323,10 @@ index 6fcc3e9..8462b6d 100644 class nsWindow; diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp -index e14c4f4..cd82d54 100644 +index e6b54dc..cafd701 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp -@@ -267,6 +267,9 @@ static SystemTimeConverter& TimeConverter() { +@@ -268,6 +268,9 @@ static SystemTimeConverter& TimeConverter() { bool nsWindow::sTransparentMainWindow = false; @@ -235,7 +336,7 @@ index e14c4f4..cd82d54 100644 namespace mozilla { #ifdef MOZ_X11 -@@ -426,6 +429,10 @@ nsWindow::nsWindow() +@@ -429,6 +432,10 @@ nsWindow::nsWindow() } #endif } @@ -246,7 +347,7 @@ index e14c4f4..cd82d54 100644 } nsWindow::~nsWindow() { -@@ -5302,10 +5309,6 @@ void nsWindow::ConfigureGdkWindow() { +@@ -5321,10 +5328,6 @@ void nsWindow::ConfigureGdkWindow() { // tearing because Gecko does not align its framebuffer updates with // vblank. SetCompositorHint(GTK_WIDGET_COMPOSIDED_ENABLED); diff --git a/extra/firefox/version b/extra/firefox/version index 741c33e6..4c4e557b 100644 --- a/extra/firefox/version +++ b/extra/firefox/version @@ -1 +1 @@ -101.0.1 1 +102.0 1 diff --git a/testing/firefox/README b/testing/firefox/README deleted file mode 100644 index 70214c4d..00000000 --- a/testing/firefox/README +++ /dev/null @@ -1,123 +0,0 @@ -firefox -________________________________________________________________________________ - -Mozilla Firefox or simply Firefox, is a free and open-source web browser -developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. -Firefox uses the Gecko rendering engine to display web pages. [0] - -Upstream: https://www.mozilla.org/firefox - - -[000] Index -________________________________________________________________________________ - -* Installation ........................................................... [001] - * Runtime Dependencies ................................................. [002] - * Privacy Package ...................................................... [003] -* Setup .................................................................. [004] - * Enable VAAPI Acceleration ............................................ [005] -* Usage .................................................................. [006] -* References ............................................................. [007] - - -[001] Installation -________________________________________________________________________________ - -+------------------------------------------------------------------------------+ -| | -| $ kiss b firefox | -| | -+------------------------------------------------------------------------------+ - - ---[002] Runtime Dependencies --------------------------------------------------- - - Firefox needs a few additional things to be fully functional. One is an icon - theme and the other is a font. If you have already installed the fonts and - icon theme of your choosing, this step can be skipped. - - +----------------------------------------------------------------------------+ - | | - | $ kiss b [hicolor-icon-theme|adwaita-icon-theme] | - | $ kiss b ttf-croscore | - | | - +----------------------------------------------------------------------------+ - - ---[003] Privacy Package -------------------------------------------------------- - - Provided is also an optional privacy package which makes Firefox perform zero - unsolicited network requests. More information can be found in the - documentation (@/firefox-privacy) Expect some website breakage when using this - privacy package YMMV. - - +----------------------------------------------------------------------------+ - | | - | $ kiss b firefox-privacy | - | | - +----------------------------------------------------------------------------+ - - -[004] Setup -________________________________________________________________________________ - -As of Firefox 91. There is no need to set special environment variables to -enable Wayland support (in a Wayland only environment like ours). The browser -should start with no further configuration. - - ---[005] Enable VAAPI Acceleration ---------------------------------------------- - -As of Firefox 102, only the following modification to about:config should be -required, with no need to disable any sandbox features. - -+------------------------------------------------------------------------------+ -| | -| about:config | -| | -| media.ffmpeg.vaapi.enabled=true | -| | -+------------------------------------------------------------------------------+ - -If using AMDGPU, the following kernel option must be enabled. [1] - -+------------------------------------------------------------------------------+ -| | -| .config | -| | -| CONFIG_CHECKPOINT_RESTORE=y | -| | -+------------------------------------------------------------------------------+ - -You may also need to set the following environment variable. - -+------------------------------------------------------------------------------+ -| | -| .profile | -| | -| export MOZ_WAYLAND_DRM_DEVICE=/dev/dri/renderD128 | -| | -+------------------------------------------------------------------------------+ - -To verify that VAAPI is working, launch Firefox with the following argument and -attempt to watch a video. Pay attention for errors in the output. - -+------------------------------------------------------------------------------+ -| | -| $ firefox --MOZ_LOG=PlatformDecoderModule:4 | -| | -+------------------------------------------------------------------------------+ - - -[006] Usage -________________________________________________________________________________ - -Refer to the browser's help output and online documentation for further -information. - - -[007] References -________________________________________________________________________________ - -[0] https://en.wikipedia.org/wiki/Firefox - diff --git a/testing/firefox/build b/testing/firefox/build deleted file mode 100755 index b55b3bff..00000000 --- a/testing/firefox/build +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/sh -e - -for p in *.patch; do - patch -p1 < "$p" -done - -# Build yasm for Firefox's sole use. Firefox is the only package which needs it -# and upstream is kinda dead. -( - cd yasm - - ./configure \ - --prefix=/ - - make - make DESTDIR="$PWD/../junk" install -) - -# Build zip/unzip for Firefox's sole use. -for f in zip unzip; do ( - cd "$f" - - make \ - CC="$CC $CFLAGS $CXXFLAGS" \ - -f unix/Makefile generic - - make \ - prefix="$PWD/../junk" \ - -f unix/Makefile install -) done - -export PATH="$PWD/junk/bin:$PATH" - -# If using libc++, CXXSTDLIB needs to be set manually. -case $("$CC" -print-file-name=libc++.so) in */*) - export CXXSTDLIB=c++ -esac - -# Instruct the compiler to trim absolute paths in resulting binaries and instead -# change them to relative paths ($PWD/... ./...). -export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix=$PWD=." - -export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox,--enable-new-dtags" -export RUSTFLAGS="$RUSTFLAGS -Cdebuginfo=0" -export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system -export MOZ_DEBUG_FLAGS=-g0 -export MOZBUILD_STATE_PATH="$PWD/state" -export MOZ_NOSPAM=1 - -cat > .mozconfig << EOF -ac_add_options --prefix=/usr -ac_add_options --libdir=/usr/lib -ac_add_options --enable-default-toolkit=cairo-gtk3-wayland-only -ac_add_options --enable-strip -ac_add_options --enable-release -ac_add_options --enable-rust-simd -ac_add_options --enable-audio-backends=alsa -ac_add_options --enable-install-strip -ac_add_options --enable-official-branding -ac_add_options --enable-application=browser -ac_add_options --enable-optimize -ac_add_options --with-system-libvpx -ac_add_options --with-system-ffi -ac_add_options --with-system-png -ac_add_options --with-system-jpeg -ac_add_options --with-system-zlib -ac_add_options --with-system-pixman -ac_add_options --without-system-nss -ac_add_options --without-system-nspr -ac_add_options --without-wasm-sandboxed-libraries -ac_add_options --disable-eme -ac_add_options --disable-dbus -ac_add_options --disable-tests -ac_add_options --disable-vtune -ac_add_options --disable-updater -ac_add_options --disable-jemalloc -ac_add_options --disable-elf-hack -ac_add_options --disable-callgrind -ac_add_options --disable-profiling -ac_add_options --disable-necko-wifi -ac_add_options --disable-crashreporter -ac_add_options --disable-accessibility -ac_add_options --disable-debug -ac_add_options --disable-debug-symbols -ac_add_options --disable-parental-controls -ac_add_options --disable-system-extension-dirs -EOF - -./mach build -./mach install - -# Remove a lot of uneeded "stuff". -rm -rf \ - "$1/usr/include" \ - "$1/usr/lib/firefox-devel" \ - "$1/usr/share/idl" \ - "$1/usr/lib/firefox/browser/features/fxmonitor@mozilla.org.xpi" \ - "$1/usr/lib/firefox/browser/features/screenshots@mozilla.org.xpi" \ - "$1/usr/lib/firefox/browser/features/webcompat-reporter@mozilla.org.xpi" \ - "$1/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi" \ - "$1/usr/lib/firefox/browser/features/doh-rollout@mozilla.org.xpi" diff --git a/testing/firefox/checksums b/testing/firefox/checksums deleted file mode 100644 index 7d285056..00000000 --- a/testing/firefox/checksums +++ /dev/null @@ -1,10 +0,0 @@ -488243ef583a8dc2bfc8f56c5ae7a77520caa052b08e435f07c0b71c236dd724 -3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f -f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 -036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37 -d3ea2503dff0a602bb058153533ebccd8232e8aac1dc82437a55d724b8d22bc2 -ba6e380bc3d2cbd1b3a505ab97687498335c334d8a4be7f465ad30ee366806c7 -86ce49e650dd117f0f2928a7f810a58df526b1087c274d35eeb9c5bbf09eac5b -5701481a104e23ae928161c84b7bc0040a8d9176681db6e94e26c3975af49634 -509ce8c2e956481850cf3fbbeb2adcfd72a29f0699ccf2d00c24d1f81167a1dc -4a232e3aa3973894a58c126b9e901c924d4e1ca3e00c4fc82d08de4b880183a9 diff --git a/testing/firefox/depends b/testing/firefox/depends deleted file mode 100644 index c7d777fc..00000000 --- a/testing/firefox/depends +++ /dev/null @@ -1,31 +0,0 @@ -alsa-lib -bzip2 -cairo -cbindgen make -clang make -expat -ffmpeg -fontconfig -freetype-harfbuzz -gdk-pixbuf -glib -gtk+3 -libdrm -libffi -libjpeg-turbo -libpng -libvpx -llvm make -m4 make -mesa -nasm make -nodejs make -pango -perl make -pixman -pkgconf make -python make -rust make -wayland -wayland-protocols make -zlib diff --git a/testing/firefox/patches/cbindgen-fix.patch b/testing/firefox/patches/cbindgen-fix.patch deleted file mode 100644 index a996d355..00000000 --- a/testing/firefox/patches/cbindgen-fix.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: Remove an extra constant definition that is now being generated by newer versions of cbindgen (0.24), and causing build failures because it is defined in several places. -Author: Olivier Tilloy -Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1773259 -Forwarded: not-needed - ---- 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; - --const uint64_t ROOT_CLIP_CHAIN = ~0; -- - } // namespace wr - } // namespace mozilla - diff --git a/testing/firefox/patches/fix-clang-as.patch b/testing/firefox/patches/fix-clang-as.patch deleted file mode 100644 index 125487d2..00000000 --- a/testing/firefox/patches/fix-clang-as.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile ---- a/security/nss/lib/freebl/Makefile -+++ b/security/nss/lib/freebl/Makefile -@@ -753,7 +753,6 @@ $(OBJDIR)/$(PROG_PREFIX)intel-gcm-wrap$(OBJ_SUFFIX): CFLAGS += -mssse3 - # .set Htbl, %rdi - # So we can't use Clang's integrated assembler with intel-gcm.s. - ifdef CC_IS_CLANG --$(OBJDIR)/$(PROG_PREFIX)intel-gcm$(OBJ_SUFFIX): CFLAGS += -no-integrated-as - endif - endif - -diff --git a/security/nss/lib/freebl/freebl.gyp b/security/nss/lib/freebl/freebl.gyp ---- a/security/nss/lib/freebl/freebl.gyp -+++ b/security/nss/lib/freebl/freebl.gyp -@@ -19,13 +19,10 @@ - 'conditions': [ - [ 'cc_is_clang==1 and force_integrated_as!=1', { - 'cflags': [ -- '-no-integrated-as', - ], - 'cflags_mozilla': [ -- '-no-integrated-as', - ], - 'asflags_mozilla': [ -- '-no-integrated-as', - ], - }], - ], -diff --git a/security/nss/lib/freebl/freebl_base.gypi b/security/nss/lib/freebl/freebl_base.gypi ---- a/security/nss/lib/freebl/freebl_base.gypi -+++ b/security/nss/lib/freebl/freebl_base.gypi -@@ -74,13 +74,10 @@ - 'conditions': [ - [ 'cc_is_clang==1 and fuzz!=1 and coverage!=1 and force_integrated_as!=1', { - 'cflags': [ -- '-no-integrated-as', - ], - 'cflags_mozilla': [ -- '-no-integrated-as', - ], - 'asflags_mozilla': [ -- '-no-integrated-as', - ], - }], - ], --- -2.35.1 - diff --git a/testing/firefox/patches/fix-linux-header.patch b/testing/firefox/patches/fix-linux-header.patch deleted file mode 100644 index 9f7fc51a..00000000 --- a/testing/firefox/patches/fix-linux-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c -index 73e85c6ccc..9eca548638 100644 ---- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c -+++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c -@@ -31,6 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - #if defined(LINUX) -+#include - #include "addrs-netlink.h" - #include - #include diff --git a/testing/firefox/patches/fix-wayland-only.patch b/testing/firefox/patches/fix-wayland-only.patch deleted file mode 100644 index 750493f0..00000000 --- a/testing/firefox/patches/fix-wayland-only.patch +++ /dev/null @@ -1,360 +0,0 @@ -diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp -index 2bf6de6..d2fce1f 100644 ---- a/gfx/gl/GLContextProviderEGL.cpp -+++ b/gfx/gl/GLContextProviderEGL.cpp -@@ -79,6 +79,7 @@ - # if defined(MOZ_WAYLAND) - # include - # include -+# include "mozilla/WidgetUtilsGtk.h" - # include "mozilla/widget/nsWaylandDisplay.h" - # endif - #endif -diff --git a/gfx/gl/GLContextProviderLinux.cpp b/gfx/gl/GLContextProviderLinux.cpp -index f8f6f3d..7205449 100644 ---- a/gfx/gl/GLContextProviderLinux.cpp -+++ b/gfx/gl/GLContextProviderLinux.cpp -@@ -13,7 +13,9 @@ namespace mozilla::gl { - using namespace mozilla::gfx; - using namespace mozilla::widget; - -+#ifdef MOZ_X11 - static class GLContextProviderGLX sGLContextProviderGLX; -+#endif - static class GLContextProviderEGL sGLContextProviderEGL; - - already_AddRefed GLContextProviderLinux::CreateForCompositorWidget( -@@ -22,9 +24,11 @@ already_AddRefed GLContextProviderLinux::CreateForCompositorWidget( - if (gfxVars::UseEGL()) { - return sGLContextProviderEGL.CreateForCompositorWidget( - aCompositorWidget, aHardwareWebRender, aForceAccelerated); -+#ifdef MOZ_X11 - } else { - return sGLContextProviderGLX.CreateForCompositorWidget( - aCompositorWidget, aHardwareWebRender, aForceAccelerated); -+#endif - } - } - -@@ -33,8 +37,10 @@ already_AddRefed GLContextProviderLinux::CreateHeadless( - const GLContextCreateDesc& desc, nsACString* const out_failureId) { - if (gfxVars::UseEGL()) { - return sGLContextProviderEGL.CreateHeadless(desc, out_failureId); -+#ifdef MOZ_X11 - } else { - return sGLContextProviderGLX.CreateHeadless(desc, out_failureId); -+#endif - } - } - -@@ -42,8 +48,10 @@ already_AddRefed GLContextProviderLinux::CreateHeadless( - GLContext* GLContextProviderLinux::GetGlobalContext() { - if (gfxVars::UseEGL()) { - return sGLContextProviderEGL.GetGlobalContext(); -+#ifdef MOZ_X11 - } else { - return sGLContextProviderGLX.GetGlobalContext(); -+#endif - } - } - -@@ -51,8 +59,10 @@ GLContext* GLContextProviderLinux::GetGlobalContext() { - void GLContextProviderLinux::Shutdown() { - if (gfxVars::UseEGL()) { - sGLContextProviderEGL.Shutdown(); -+#ifdef MOZ_X11 - } else { - sGLContextProviderGLX.Shutdown(); -+#endif - } - } - -diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build -index bc492a8..fc0a005 100644 ---- a/gfx/gl/moz.build -+++ b/gfx/gl/moz.build -@@ -108,10 +108,11 @@ elif gl_provider == "Linux": - # GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES - # as it includes X11 headers which cause conflicts. - SOURCES += [ -- "GLContextProviderGLX.cpp", - "GLContextProviderLinux.cpp", - ] - EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"] -+ if CONFIG["MOZ_X11"]: -+ SOURCES += ["GLContextProviderGLX.cpp"] - - if CONFIG["MOZ_WAYLAND"]: - SOURCES += ["SharedSurfaceDMABUF.cpp"] -diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp -index dd8dab6..34494ad 100644 ---- a/gfx/thebes/gfxPlatformGtk.cpp -+++ b/gfx/thebes/gfxPlatformGtk.cpp -@@ -998,7 +998,7 @@ gfxPlatformGtk::CreateGlobalHardwareVsyncSource() { - RefPtr softwareVsync = new XrandrSoftwareVsyncSource(); - return softwareVsync.forget(); - #else -- return CreateSoftwareVsyncSource(); -+ return GetSoftwareVsyncSource(); - #endif - } - -diff --git a/widget/gtk/CompositorWidgetParent.cpp b/widget/gtk/CompositorWidgetParent.cpp -index 4382ccf..9986146 100644 ---- a/widget/gtk/CompositorWidgetParent.cpp -+++ b/widget/gtk/CompositorWidgetParent.cpp -@@ -6,9 +6,9 @@ - #include "CompositorWidgetParent.h" - #include "mozilla/Unused.h" - #include "mozilla/widget/PlatformWidgetTypes.h" -+#include "nsWindow.h" - --namespace mozilla { --namespace widget { -+namespace mozilla::widget { - - CompositorWidgetParent::CompositorWidgetParent( - const CompositorWidgetInitData& aInitData, -@@ -51,5 +51,4 @@ mozilla::ipc::IPCResult CompositorWidgetParent::RecvEnableRendering( - return IPC_OK(); - } - --} // namespace widget --} // namespace mozilla -+} // namespace mozilla::widget -diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp -index 07a1226..0a1d888 100644 ---- a/widget/gtk/GtkCompositorWidget.cpp -+++ b/widget/gtk/GtkCompositorWidget.cpp -@@ -5,6 +5,7 @@ - - #include "GtkCompositorWidget.h" - -+#include "mozilla/gfx/gfxVars.h" - #include "mozilla/layers/CompositorThread.h" - #include "mozilla/widget/InProcessCompositorWidget.h" - #include "mozilla/widget/PlatformWidgetTypes.h" -diff --git a/widget/gtk/IMContextWrapper.cpp b/widget/gtk/IMContextWrapper.cpp -index ccbe511..d9e7fe5 100644 ---- a/widget/gtk/IMContextWrapper.cpp -+++ b/widget/gtk/IMContextWrapper.cpp -@@ -7,6 +7,7 @@ - #include "mozilla/Logging.h" - #include "nsString.h" - #include "prtime.h" -+#include "prenv.h" - - #include "IMContextWrapper.h" - #include "nsGtkKeyUtils.h" -diff --git a/widget/gtk/InProcessGtkCompositorWidget.cpp b/widget/gtk/InProcessGtkCompositorWidget.cpp -index 4158118..bffd6f5 100644 ---- a/widget/gtk/InProcessGtkCompositorWidget.cpp -+++ b/widget/gtk/InProcessGtkCompositorWidget.cpp -@@ -8,10 +8,10 @@ - #include "mozilla/widget/PlatformWidgetTypes.h" - - #include "InProcessGtkCompositorWidget.h" -+#include "VsyncDispatcher.h" - #include "nsWindow.h" - --namespace mozilla { --namespace widget { -+namespace mozilla::widget { - - /* static */ - RefPtr CompositorWidget::CreateLocal( -@@ -41,5 +41,4 @@ void InProcessGtkCompositorWidget::ObserveVsync(VsyncObserver* aObserver) { - } - } - --} // namespace widget --} // namespace mozilla -+} // namespace mozilla::widget -diff --git a/widget/gtk/MPRISServiceHandler.cpp b/widget/gtk/MPRISServiceHandler.cpp -index a8b4a43..9f95718 100644 ---- a/widget/gtk/MPRISServiceHandler.cpp -+++ b/widget/gtk/MPRISServiceHandler.cpp -@@ -12,6 +12,7 @@ - - #include "MPRISInterfaceDescription.h" - #include "mozilla/dom/MediaControlUtils.h" -+#include "mozilla/GRefPtr.h" - #include "mozilla/GUniquePtr.h" - #include "mozilla/UniquePtrExtensions.h" - #include "mozilla/Maybe.h" -diff --git a/widget/gtk/WindowSurfaceX11.cpp b/widget/gtk/WindowSurfaceX11.cpp -index a32cc12..36b238a 100644 ---- a/widget/gtk/WindowSurfaceX11.cpp -+++ b/widget/gtk/WindowSurfaceX11.cpp -@@ -6,10 +6,8 @@ - - #include "WindowSurfaceX11.h" - #include "gfxPlatform.h" --#include "X11UndefineNone.h" - --namespace mozilla { --namespace widget { -+namespace mozilla::widget { - - WindowSurfaceX11::WindowSurfaceX11(Display* aDisplay, Window aWindow, - Visual* aVisual, unsigned int aDepth) -@@ -46,5 +44,4 @@ gfx::SurfaceFormat WindowSurfaceX11::GetVisualFormat(const Visual* aVisual, - return gfx::SurfaceFormat::UNKNOWN; - } - --} // namespace widget --} // namespace mozilla -+} // namespace mozilla::widget -diff --git a/widget/gtk/WindowSurfaceX11.h b/widget/gtk/WindowSurfaceX11.h -index d297ec6..dda17bf 100644 ---- a/widget/gtk/WindowSurfaceX11.h -+++ b/widget/gtk/WindowSurfaceX11.h -@@ -13,9 +13,9 @@ - # include "mozilla/gfx/Types.h" - - # include -+# include "X11UndefineNone.h" - --namespace mozilla { --namespace widget { -+namespace mozilla::widget { - - class WindowSurfaceX11 : public WindowSurface { - public: -@@ -33,8 +33,7 @@ class WindowSurfaceX11 : public WindowSurface { - const gfx::SurfaceFormat mFormat; - }; - --} // namespace widget --} // namespace mozilla -+} // namespace mozilla::widget - - #endif // MOZ_X11 - #endif // _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_X11_H -diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build -index 5218c7d..2e578b9 100644 ---- a/widget/gtk/moz.build -+++ b/widget/gtk/moz.build -@@ -187,6 +187,5 @@ if CONFIG["MOZ_ENABLE_DBUS"]: - "AsyncDBus.cpp", - ] - CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] --CXXFLAGS += ["-Werror=switch"] - --REQUIRES_UNIFIED_BUILD = True -+CXXFLAGS += ["-Werror=switch"] -diff --git a/widget/gtk/mozgtk/moz.build b/widget/gtk/mozgtk/moz.build -index f860f82..d5e78d0 100644 ---- a/widget/gtk/mozgtk/moz.build -+++ b/widget/gtk/mozgtk/moz.build -@@ -11,6 +11,7 @@ SOURCES += [ - ] - - CFLAGS += CONFIG["MOZ_X11_CFLAGS"] -+CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] - - # If LDFLAGS contains -Wl,--as-needed or if it's the default for the toolchain, - # we need to add -Wl,--no-as-needed before the gtk libraries, otherwise the -diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c -index d7dbbc6..d95746f 100644 ---- a/widget/gtk/mozgtk/mozgtk.c -+++ b/widget/gtk/mozgtk/mozgtk.c -@@ -6,6 +6,13 @@ - - #include "mozilla/Types.h" - -+#include -+ -+// Dummy call to gtk3 library to prevent the linker from removing -+// the gtk3 dependency with --as-needed. -+// see toolkit/library/moz.build for details. -+MOZ_EXPORT void mozgtk_linker_holder() { gdk_display_get_default(); } -+ - #ifdef MOZ_X11 - # include - // Bug 1271100 -diff --git a/widget/gtk/nsApplicationChooser.cpp b/widget/gtk/nsApplicationChooser.cpp -index 2ebb62f..6752c52 100644 ---- a/widget/gtk/nsApplicationChooser.cpp -+++ b/widget/gtk/nsApplicationChooser.cpp -@@ -11,6 +11,7 @@ - #include "WidgetUtils.h" - #include "nsIMIMEInfo.h" - #include "nsIWidget.h" -+#include "nsIFile.h" - #include "nsCExternalHandlerService.h" - #include "nsComponentManagerUtils.h" - #include "nsGtkUtils.h" -diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp -index 555e8ce..48a827f 100644 ---- a/widget/gtk/nsClipboard.cpp -+++ b/widget/gtk/nsClipboard.cpp -@@ -31,15 +31,19 @@ - #include "nsIObserverService.h" - #include "mozilla/Services.h" - #include "mozilla/RefPtr.h" -+#include "mozilla/GRefPtr.h" - #include "mozilla/SchedulerGroup.h" - #include "mozilla/StaticPrefs_widget.h" - #include "mozilla/TimeStamp.h" -+#include "GRefPtr.h" - #include "WidgetUtilsGtk.h" - - #include "imgIContainer.h" - - #include --#include -+#if defined(MOZ_X11) -+# include -+#endif - - #include "mozilla/Encoding.h" - -diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h -index 6fcc3e9..8462b6d 100644 ---- a/widget/gtk/nsGtkKeyUtils.h -+++ b/widget/gtk/nsGtkKeyUtils.h -@@ -20,6 +20,7 @@ - # include - # include - #endif -+#include "X11UndefineNone.h" - - class nsWindow; - -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp -index e6b54dc..cafd701 100644 ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -268,6 +268,9 @@ static SystemTimeConverter& TimeConverter() { - - bool nsWindow::sTransparentMainWindow = false; - -+// forward declare from mozgtk -+extern "C" MOZ_EXPORT void mozgtk_linker_holder(); -+ - namespace mozilla { - - #ifdef MOZ_X11 -@@ -429,6 +432,10 @@ nsWindow::nsWindow() - } - #endif - } -+ // Dummy call to mozgtk to prevent the linker from removing -+ // the dependency with --as-needed. -+ // see toolkit/library/moz.build for details. -+ mozgtk_linker_holder(); - } - - nsWindow::~nsWindow() { -@@ -5321,10 +5328,6 @@ void nsWindow::ConfigureGdkWindow() { - // tearing because Gecko does not align its framebuffer updates with - // vblank. - SetCompositorHint(GTK_WIDGET_COMPOSIDED_ENABLED); -- -- // Dummy call to a function in mozgtk to prevent the linker from removing -- // the dependency with --as-needed. -- XShmQueryExtension(DefaultXDisplay()); - } - #endif - #ifdef MOZ_WAYLAND diff --git a/testing/firefox/patches/no-dbus.patch b/testing/firefox/patches/no-dbus.patch deleted file mode 100644 index 47a3cd20..00000000 --- a/testing/firefox/patches/no-dbus.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/toolkit/components/remote/moz.build b/toolkit/components/remote/moz.build -index d3bab6cf..656b32c7 100644 ---- a/toolkit/components/remote/moz.build -+++ b/toolkit/components/remote/moz.build -@@ -26,7 +26,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - "nsUnixRemoteServer.h", - "RemoteUtils.h", - ] -- else: -+ elif CONFIG["MOZ_X11"]: - SOURCES += [ - "nsGTKRemoteServer.cpp", - "nsXRemoteClient.cpp", -diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp -index 3bcf72a..e1b5323 100644 ---- a/toolkit/components/remote/nsRemoteService.cpp -+++ b/toolkit/components/remote/nsRemoteService.cpp -@@ -7,12 +7,14 @@ - - - #ifdef MOZ_WIDGET_GTK --# ifdef MOZ_ENABLE_DBUS -+# if defined(MOZ_ENABLE_DBUS) - # include "nsDBusRemoteServer.h" - # include "nsDBusRemoteClient.h" --# else -+# elif defined(MOZ_X11) - # include "nsGTKRemoteServer.h" - # include "nsXRemoteClient.h" -+# else -+# include "nsRemoteClient.h" - # endif - #elif defined(XP_WIN) - # include "nsWinRemoteServer.h" -@@ -95,8 +97,10 @@ RemoteResult nsRemoteService::StartClient(const char* aDesktopStartupID) { - #ifdef MOZ_WIDGET_GTK - # if defined(MOZ_ENABLE_DBUS) - client = MakeUnique(); --# else -+# elif defined(MOZ_X11) - client = MakeUnique(); -+# else -+ return REMOTE_NOT_FOUND; - # endif - #elif defined(XP_WIN) - client = MakeUnique(); -@@ -139,8 +143,10 @@ void nsRemoteService::StartupServer() { - #ifdef MOZ_WIDGET_GTK - # if defined(MOZ_ENABLE_DBUS) - mRemoteServer = MakeUnique(); --# else -+# elif defined(MOZ_X11) - mRemoteServer = MakeUnique(); -+# else -+ return; - # endif - #elif defined(XP_WIN) - mRemoteServer = MakeUnique(); diff --git a/testing/firefox/patches/no-fribidi.patch b/testing/firefox/patches/no-fribidi.patch deleted file mode 100644 index 89b4468a..00000000 --- a/testing/firefox/patches/no-fribidi.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild -index a1b58eb59b..d35da57db3 100644 ---- a/config/system-headers.mozbuild -+++ b/config/system-headers.mozbuild -@@ -267,7 +267,6 @@ system_headers = [ - 'freetype/t1tables.h', - 'freetype/ttnameid.h', - 'freetype/tttables.h', -- 'fribidi/fribidi.h', - 'FSp_fopen.h', - 'fstream', - 'fstream.h', diff --git a/testing/firefox/post-install b/testing/firefox/post-install deleted file mode 100755 index 2f40c517..00000000 --- a/testing/firefox/post-install +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -cat <