# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by scripts/Create-CopyPatch. # # T2 SDE: package/*/firefox/no-gtk2.patch # Copyright (C) 2020 - 2021 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- Removes the GTK2 build requirement. A little sloppy in places, will be cleaned up over the next couple of weeks. Based on a patch posted to Bugzilla here: https://bugzilla.mozilla.org/show_bug.cgi?id=1663588 --- firefox-84.0/widget/gtk/mozgtk/gtk3/moz.build.vanilla 2020-12-15 14:55:32.528811898 +0100 +++ firefox-84.0/widget/gtk/mozgtk/gtk3/moz.build 2020-12-15 14:56:45.968811028 +0100 @@ -8,8 +8,6 @@ "../mozgtk.c", ] -DEFINES["GTK2_SYMBOLS"] = True - SharedLibrary("mozgtk") SONAME = "mozgtk" --- firefox-84.0/widget/gtk/mozgtk/stub/moz.build.vanilla 2020-12-15 14:55:32.528811898 +0100 +++ firefox-84.0/widget/gtk/mozgtk/stub/moz.build 2020-12-15 14:56:45.968811028 +0100 @@ -8,7 +8,7 @@ "../mozgtk.c", ] -for var in ("COMMON_SYMBOLS", "GTK2_SYMBOLS", "GTK3_SYMBOLS"): +for var in ("COMMON_SYMBOLS", "GTK3_SYMBOLS"): DEFINES[var] = True SharedLibrary("mozgtk_stub") --- firefox-84.0/widget/gtk/mozgtk/gtk2/moz.build.vanilla 2020-12-15 14:33:11.620827783 +0100 +++ firefox-84.0/widget/gtk/mozgtk/gtk2/moz.build 2020-12-15 14:56:45.968811028 +0100 @@ -1,40 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -SOURCES += [ - "../mozgtk.c", -] - -DEFINES["GTK3_SYMBOLS"] = True - -SharedLibrary("mozgtk2") - -SHARED_LIBRARY_NAME = "mozgtk" - -FINAL_TARGET = "dist/bin/gtk2" - -# 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 -# linker will drop those dependencies because no symbols are used from them. -# But those dependencies need to be kept for things to work properly. -# Ideally, we'd only add -Wl,--no-as-needed if necessary, but it's just simpler -# to add it unconditionally. This library is also simple enough that forcing -# -Wl,--as-needed after the gtk libraries is not going to make a significant -# difference. -if CONFIG["GCC_USE_GNU_LD"]: - no_as_needed = ["-Wl,--no-as-needed"] - as_needed = ["-Wl,--as-needed"] -else: - no_as_needed = [] - as_needed = [] - -OS_LIBS += [f for f in CONFIG["MOZ_GTK2_LIBS"] if f.startswith("-L")] -OS_LIBS += no_as_needed -OS_LIBS += [ - "gtk-x11-2.0", - "gdk-x11-2.0", -] -OS_LIBS += as_needed --- firefox-84.0/widget/gtk/mozgtk/moz.build.vanilla 2020-12-15 14:55:32.528811898 +0100 +++ firefox-84.0/widget/gtk/mozgtk/moz.build 2020-12-15 14:56:45.968811028 +0100 @@ -4,4 +4,4 @@ # 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 += ["stub", "gtk2", "gtk3"] +DIRS += ["stub", "gtk3"] --- firefox-84.0/widget/gtk/mozgtk/mozgtk.c.vanilla 2020-12-12 00:43:02.000000000 +0100 +++ firefox-84.0/widget/gtk/mozgtk/mozgtk.c 2020-12-15 14:55:32.528811898 +0100 @@ -647,21 +647,6 @@ STUB(gtk_color_chooser_set_use_alpha) #endif -#ifdef GTK2_SYMBOLS -STUB(gdk_drawable_get_screen) -STUB(gdk_rgb_get_colormap) -STUB(gdk_rgb_get_visual) -STUB(gdk_window_lookup) -STUB(gdk_window_set_back_pixmap) -STUB(gdk_x11_colormap_foreign_new) -STUB(gdk_x11_colormap_get_xcolormap) -STUB(gdk_x11_drawable_get_xdisplay) -STUB(gdk_x11_drawable_get_xid) -STUB(gdk_x11_window_get_drawable_impl) -STUB(gdkx_visual_get) -STUB(gtk_object_get_type) -#endif - #ifndef GTK3_SYMBOLS // Only define the following workaround when using GTK3, which we detect // by checking if GTK3 stubs are not provided. --- firefox-84.0/widget/gtk/nsWindow.h.vanilla 2020-12-12 01:35:34.000000000 +0100 +++ firefox-84.0/widget/gtk/nsWindow.h 2020-12-15 14:55:32.528811898 +0100 @@ -8,14 +8,14 @@ #ifndef __nsWindow_h__ #define __nsWindow_h__ -#include +//#include #include #ifdef MOZ_X11 # include # include "X11UndefineNone.h" #endif /* MOZ_X11 */ #ifdef MOZ_WAYLAND -# include +//# include # include "base/thread.h" # include "WaylandVsyncSource.h" #endif --- firefox-84.0/gfx/gl/GLContextProviderGLX.cpp.vanilla 2020-12-12 01:35:34.000000000 +0100 +++ firefox-84.0/gfx/gl/GLContextProviderGLX.cpp 2020-12-15 14:55:31.272811913 +0100 @@ -3,11 +3,11 @@ * 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/. */ -#ifdef MOZ_WIDGET_GTK +#if 0 # include # include # define GET_NATIVE_WINDOW(aWidget) \ - GDK_WINDOW_XID((GdkWindow*)aWidget->GetNativeData(NS_NATIVE_WINDOW)) + GDK_WINDOW_XID((GdkWindow*)aWidget->GetNativeData(NS_NATIVE_WINDOW)) #endif #include @@ -42,7 +42,7 @@ #include "gfxCrashReporterUtils.h" -#ifdef MOZ_WIDGET_GTK +#if MOZ_WIDGET_GTK # include "gfxPlatformGtk.h" #endif --- firefox-84.0/gfx/gl/GLContextProviderWayland.cpp.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/gfx/gl/GLContextProviderWayland.cpp 2020-12-15 14:55:31.272811913 +0100 @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef MOZ_WIDGET_GTK +#if 0 # include # include #endif @@ -21,41 +21,24 @@ already_AddRefed GLContextProviderWayland::CreateForCompositorWidget( CompositorWidget* aCompositorWidget, bool aWebRender, bool aForceAccelerated) { - if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { - return sGLContextProviderX11.CreateForCompositorWidget( - aCompositorWidget, aWebRender, aForceAccelerated); - } else { return sGLContextProviderEGL.CreateForCompositorWidget( aCompositorWidget, aWebRender, aForceAccelerated); - } } /*static*/ already_AddRefed GLContextProviderWayland::CreateHeadless( const GLContextCreateDesc& desc, nsACString* const out_failureId) { - if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { - return sGLContextProviderX11.CreateHeadless(desc, out_failureId); - } else { return sGLContextProviderEGL.CreateHeadless(desc, out_failureId); - } } /*static*/ GLContext* GLContextProviderWayland::GetGlobalContext() { - if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { - return sGLContextProviderX11.GetGlobalContext(); - } else { return sGLContextProviderEGL.GetGlobalContext(); - } } /*static*/ void GLContextProviderWayland::Shutdown() { - if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { - sGLContextProviderX11.Shutdown(); - } else { sGLContextProviderEGL.Shutdown(); - } } } // namespace mozilla::gl --- firefox-84.0/gfx/2d/DrawTargetSkia.cpp.vanilla 2020-12-15 14:33:11.600827783 +0100 +++ firefox-84.0/gfx/2d/DrawTargetSkia.cpp 2020-12-12 00:41:49.000000000 +0100 @@ -68,28 +68,15 @@ mColors.resize(mCount); mPositions.resize(mCount); if (aStops[0].offset != 0) { -// reddit.com yellow graddient -#if MOZ_BIG_ENDIAN() - mColors[0] = mozilla::detail::Swapper::swap(ColorToSkColor(aStops[0].color, 1.0)); -#else mColors[0] = ColorToSkColor(aStops[0].color, 1.0); -#endif mPositions[0] = 0; } for (uint32_t i = 0; i < aNumStops; i++) { -#if MOZ_BIG_ENDIAN() - mColors[i + shift] = mozilla::detail::Swapper::swap(ColorToSkColor(aStops[i].color, 1.0)); -#else mColors[i + shift] = ColorToSkColor(aStops[i].color, 1.0); -#endif mPositions[i + shift] = SkFloatToScalar(aStops[i].offset); } if (aStops[aNumStops - 1].offset != 1) { -#if MOZ_BIG_ENDIAN() - mColors[mCount - 1] = mozilla::detail::Swapper::swap(ColorToSkColor(aStops[aNumStops - 1].color, 1.0)); -#else mColors[mCount - 1] = ColorToSkColor(aStops[aNumStops - 1].color, 1.0); -#endif mPositions[mCount - 1] = SK_Scalar1; } } @@ -164,7 +151,7 @@ for (int row = 0; row < height; ++row) { for (int column = 0; column < width; column += 4) { if (aData[column + kARGBAlphaOffset] != 0xFF) { - gfxWarning() << "RGBX pixel at (" << column << "," << row + gfxCriticalError() << "RGBX pixel at (" << column << "," << row << ") in " << width << "x" << height << " surface is not opaque: " << int(aData[column]) << "," << int(aData[column + 1]) << "," @@ -214,7 +201,7 @@ if (aData[offset + kARGBAlphaOffset] != 0xFF) { int row = offset / aStride; int column = (offset % aStride) / pixelSize; - gfxWarning() << "RGBX corner pixel at (" << column << "," << row + gfxCriticalError() << "RGBX corner pixel at (" << column << "," << row << ") in " << aSize.width << "x" << aSize.height << " surface, bounded by " << "(" << bounds.X() << "," << bounds.Y() << "," --- firefox-84.0/gfx/thebes/gfxGdkNativeRenderer.cpp.vanilla 2020-12-12 00:41:50.000000000 +0100 +++ firefox-84.0/gfx/thebes/gfxGdkNativeRenderer.cpp 2020-12-15 14:55:31.272811913 +0100 @@ -7,7 +7,7 @@ #include "gfxContext.h" #include "gfxPlatformGtk.h" -#ifdef MOZ_X11 +#if 0 # include # include "cairo-xlib.h" # include "gfxXlibSurface.h" --- firefox-84.0/gfx/thebes/gfxGdkNativeRenderer.h.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/gfx/thebes/gfxGdkNativeRenderer.h 2020-12-15 14:55:31.272811913 +0100 @@ -6,9 +6,9 @@ #ifndef GFXGDKNATIVERENDER_H_ #define GFXGDKNATIVERENDER_H_ -#include +//#include #include "nsSize.h" -#ifdef MOZ_X11 +#if MOZ_X11 # include "gfxXlibNativeRenderer.h" #endif --- firefox-84.0/dom/plugins/test/testplugin/nptest.cpp.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/dom/plugins/test/testplugin/nptest.cpp 2020-12-15 14:55:31.272811913 +0100 @@ -2692,7 +2692,7 @@ return true; } -#if defined(MOZ_WIDGET_GTK) +#if 0 bool getClipboardText(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result) { NPP npp = static_cast(npobj)->npp; --- firefox-84.0/dom/plugins/test/testplugin/testplugin.mozbuild.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/dom/plugins/test/testplugin/testplugin.mozbuild 2020-12-15 14:55:31.272811913 +0100 @@ -18,11 +18,6 @@ UNIFIED_SOURCES += [ 'nptest_macosx.mm' ] -elif toolkit == 'gtk': - UNIFIED_SOURCES += [ - 'nptest_gtk2.cpp', - ] -elif toolkit == 'windows': UNIFIED_SOURCES += [ 'nptest_windows.cpp', ] @@ -46,14 +41,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' and CONFIG['TARGET_CPU'] == 'x86_64': OS_LIBS += ['-framework Carbon'] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': - CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] - CFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] - OS_LIBS += CONFIG['MOZ_GTK2_LIBS'] - OS_LIBS += CONFIG['XLDFLAGS'] - OS_LIBS += CONFIG['XLIBS'] - OS_LIBS += CONFIG['XEXT_LIBS'] - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': FINAL_TARGET = 'dist/plugins/%s.plugin/Contents/MacOS' % cocoa_name OBJDIR_FILES.dist.plugins['%s.plugin' % cocoa_name].Contents += ['%s/Info.plist' % relative_path] --- firefox-84.0/dom/plugins/test/moz.build.vanilla 2020-12-15 14:55:31.272811913 +0100 +++ firefox-84.0/dom/plugins/test/moz.build 2020-12-15 14:56:45.972811028 +0100 @@ -8,7 +8,7 @@ XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell.ini"] -if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("gtk", "cocoa", "windows"): +if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "windows"): MOCHITEST_MANIFESTS += ["mochitest/mochitest.ini"] MOCHITEST_CHROME_MANIFESTS += ["mochitest/chrome.ini"] BROWSER_CHROME_MANIFESTS += ["mochitest/browser.ini"] --- firefox-84.0/dom/plugins/base/nsPluginNativeWindow.cpp.vanilla 2020-12-15 14:55:31.268811913 +0100 +++ firefox-84.0/dom/plugins/base/nsPluginNativeWindow.cpp 2020-12-15 14:56:45.972811028 +0100 @@ -17,7 +17,7 @@ nsPluginNativeWindowImpl(); virtual ~nsPluginNativeWindowImpl(); -#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) +#if 0 NPSetWindowCallbackStruct mWsInfo; #endif }; @@ -32,14 +32,14 @@ memset(&clipRect, 0, sizeof(clipRect)); type = NPWindowTypeWindow; -#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) +#if 0 ws_info = &mWsInfo; mWsInfo.type = 0; mWsInfo.display = nullptr; mWsInfo.visual = nullptr; mWsInfo.colormap = 0; mWsInfo.depth = 0; -#elif defined(XP_UNIX) && !defined(XP_MACOSX) +#elif 0 ws_info = nullptr; #endif } --- firefox-84.0/dom/plugins/base/npapi.h.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/dom/plugins/base/npapi.h 2020-12-15 14:55:31.268811913 +0100 @@ -41,9 +41,9 @@ # endif #endif -#if defined(XP_UNIX) +#if defined(MOZ_X11) # include -# if defined(MOZ_X11) +# if 0 # include # include # include "X11UndefineNone.h" @@ -211,7 +211,7 @@ /* Exact meaning must be spec'd in event model. */ # define kNPEventStartIME 2 -# if defined(XP_UNIX) +# if 0 /* * Unix specific structures and definitions */ @@ -229,7 +229,7 @@ typedef struct { int32_t type; -# if defined(MOZ_X11) +# if 0 Display* display; Visual* visual; Colormap colormap; @@ -291,7 +291,7 @@ , NPDrawingModelSyncWin = 5 # endif -# if defined(MOZ_X11) +# if 0 , NPDrawingModelSyncX = 6 # endif @@ -330,7 +330,7 @@ * gcc 3.x generated vtables on UNIX and OSX are incompatible with * previous compilers. */ -# if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) +# if 0 # define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK # else # define _NP_ABI_MIXIN_FOR_GCC3 0 @@ -530,7 +530,7 @@ uint32_t width; /* Maximum window size */ uint32_t height; NPRect clipRect; /* Clipping rectangle in port coordinates */ -# if (defined(XP_UNIX) || defined(XP_SYMBIAN)) && !defined(XP_MACOSX) +# if (defined(XP_SYMBIAN)) && !defined(XP_MACOSX) void* ws_info; /* Platform-dependent additional data */ # endif /* XP_UNIX */ NPWindowType type; /* Is this a window or a drawable? */ @@ -583,7 +583,7 @@ uintptr_t wParam; intptr_t lParam; } NPEvent; -# elif defined(XP_UNIX) && defined(MOZ_X11) +# elif 0 typedef XEvent NPEvent; # else typedef void* NPEvent; @@ -597,7 +597,7 @@ typedef CGPathRef NPCGRegion; # elif defined(XP_WIN) typedef HRGN NPRegion; -# elif defined(XP_UNIX) && defined(MOZ_X11) +# elif 0 typedef Region NPRegion; # elif defined(XP_SYMBIAN) typedef QRegion* NPRegion; @@ -828,7 +828,7 @@ /* NPP_* functions are provided by the plugin and called by the navigator. */ -# if defined(XP_UNIX) +# if 0 const char* NPP_GetMIMEDescription(void); # endif --- firefox-84.0/dom/plugins/base/nsNPAPIPlugin.cpp.vanilla 2020-12-12 01:35:33.000000000 +0100 +++ firefox-84.0/dom/plugins/base/nsNPAPIPlugin.cpp 2020-12-15 14:55:31.268811913 +0100 @@ -56,7 +56,7 @@ #endif // needed for nppdf plugin -#if (MOZ_WIDGET_GTK) +#if 0 # include # include #endif @@ -75,7 +75,7 @@ using mozilla::plugins::PluginModuleChromeParent; using mozilla::plugins::PluginModuleContentParent; -#ifdef MOZ_X11 +#if 0 # include "mozilla/X11Util.h" #endif @@ -1224,9 +1224,9 @@ // Cast NPNVariable enum to int to avoid warnings about including switch // cases for android_npapi.h's non-standard ANPInterface values. switch (static_cast(variable)) { -#if defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 case NPNVxDisplay: { -# if defined(MOZ_X11) +# if 0 if (npp) { nsNPAPIPluginInstance* inst = (nsNPAPIPluginInstance*)npp->ndata; bool windowless = false; @@ -1260,7 +1260,7 @@ return NPERR_GENERIC_ERROR; #endif -#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) +#if defined(XP_WIN) case NPNVnetscapeWindow: { if (!npp || !npp->ndata) return NPERR_INVALID_INSTANCE_ERROR; @@ -1302,7 +1302,7 @@ } case NPNVToolkit: { -#ifdef MOZ_WIDGET_GTK +#if 0 *((NPNToolkitType*)result) = NPNVGtk2; #endif @@ -1312,7 +1312,7 @@ } case NPNVSupportsXEmbedBool: { -#ifdef MOZ_WIDGET_GTK +#if 0 *(NPBool*)result = true; #else *(NPBool*)result = false; @@ -1333,8 +1333,7 @@ } case NPNVSupportsWindowless: { -#if defined(XP_WIN) || defined(XP_MACOSX) || \ - (defined(MOZ_X11) && defined(MOZ_WIDGET_GTK)) +#if defined(XP_WIN) || defined(XP_MACOSX) *(NPBool*)result = true; #else *(NPBool*)result = false; --- firefox-84.0/dom/plugins/base/nsNPAPIPluginInstance.cpp.vanilla 2020-12-12 01:35:33.000000000 +0100 +++ firefox-84.0/dom/plugins/base/nsNPAPIPluginInstance.cpp 2020-12-15 14:55:31.268811913 +0100 @@ -316,7 +316,7 @@ // NPAPI plugins don't want a SetWindow(nullptr). if (!window || RUNNING != mRunning) return NS_OK; -#if MOZ_WIDGET_GTK +#if 0 // bug 108347, flash plugin on linux doesn't like window->width <= 0 return NS_OK; #endif --- firefox-84.0/dom/plugins/base/nsNPAPIPluginInstance.h.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/dom/plugins/base/nsNPAPIPluginInstance.h 2020-12-15 14:55:31.268811913 +0100 @@ -38,7 +38,7 @@ #if defined(OS_WIN) const NPDrawingModel kDefaultDrawingModel = NPDrawingModelSyncWin; -#elif defined(MOZ_X11) +#elif 0 const NPDrawingModel kDefaultDrawingModel = NPDrawingModelSyncX; #elif defined(XP_MACOSX) # ifndef NP_NO_QUICKDRAW --- firefox-84.0/dom/plugins/base/nsPluginHost.cpp.vanilla 2020-12-12 01:35:33.000000000 +0100 +++ firefox-84.0/dom/plugins/base/nsPluginHost.cpp 2020-12-15 14:56:45.972811028 +0100 @@ -85,7 +85,7 @@ # include "windows.h" # include "winbase.h" #endif -#if (MOZ_WIDGET_GTK) +#if 0 # include # include #endif @@ -278,7 +278,7 @@ } bool waylandBackend = false; -#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) +#if 0 GdkDisplay* display = gdk_display_get_default(); if (display) { waylandBackend = !GDK_IS_X11_DISPLAY(display); --- firefox-87.0/dom/plugins/base/nsPluginInstanceOwner.cpp.orig 2021-03-18 14:48:35.000000000 +0100 +++ firefox-87.0/dom/plugins/base/nsPluginInstanceOwner.cpp 2021-03-23 18:05:27.943416678 +0100 @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef MOZ_X11 +#if 0 # include # include "gfxXlibSurface.h" /* X headers suck */ @@ -71,7 +71,7 @@ # include "mozilla/widget/WinMessages.h" #endif // #ifdef XP_WIN -#ifdef MOZ_WIDGET_GTK +#if 0 # include # include #endif @@ -1266,7 +1266,7 @@ void nsPluginInstanceOwner::Paint(const RECT& aDirty, HDC aDC) { return; } #endif -#if defined(MOZ_X11) +#if 0 void nsPluginInstanceOwner::Paint(gfxContext* aContext, const gfxRect& aFrameRect, const gfxRect& aDirtyRect) { @@ -1340,7 +1340,7 @@ NPSetWindowCallbackStruct* ws_info = static_cast(mWindow->ws_info); -# ifdef MOZ_X11 +# if 0 if (ws_info->visual != visual || ws_info->colormap != colormap) { ws_info->visual = visual; ws_info->colormap = colormap; @@ -1491,7 +1491,7 @@ // passing HDC till paint event when it is really // needed. Change spec? mPluginWindow->window = nullptr; -#ifdef MOZ_X11 +#if 0 // Fill in the display field. NPSetWindowCallbackStruct* ws_info = static_cast(mPluginWindow->ws_info); --- firefox-84.0/dom/plugins/base/nsPluginInstanceOwner.h.vanilla 2020-12-12 01:35:33.000000000 +0100 +++ firefox-84.0/dom/plugins/base/nsPluginInstanceOwner.h 2020-12-15 14:55:31.268811913 +0100 @@ -31,7 +31,7 @@ class nsPluginFrame; class nsDisplayListBuilder; -#if defined(MOZ_X11) +#if 0 class gfxContext; #endif @@ -48,7 +48,7 @@ using mozilla::widget::PuppetWidget; -#ifdef MOZ_X11 +#if 0 # include "gfxXlibNativeRenderer.h" #endif @@ -112,7 +112,7 @@ void Paint(const gfxRect& aDirtyRect, CGContextRef cgContext); void RenderCoreAnimation(CGContextRef aCGContext, int aWidth, int aHeight); void DoCocoaEventDrawRect(const gfxRect& aDrawRect, CGContextRef cgContext); -#elif defined(MOZ_X11) +#elif 0 void Paint(gfxContext* aContext, const gfxRect& aFrameRect, const gfxRect& aDirtyRect); #endif @@ -193,7 +193,7 @@ return ""; } -#ifdef MOZ_X11 +#if 0 void GetPluginDescription(nsACString& aDescription) { aDescription.Truncate(); if (mInstance && mPluginHost) { @@ -214,7 +214,7 @@ return mPluginWindow->type == NPWindowTypeDrawable && (MatchPluginName("Shockwave Flash") || MatchPluginName("Test Plug-in")); -#elif defined(MOZ_X11) || defined(XP_MACOSX) +#elif defined(XP_MACOSX) return true; #else return false; @@ -325,7 +325,7 @@ uint32_t mLastEventloopNestingLevel; bool mContentFocused; bool mWidgetVisible; // used on Mac to store our widget's visible state -#ifdef MOZ_X11 +#if 0 // Used with windowless plugins only, initialized in CreateWidget(). bool mFlash10Quirks; #endif @@ -371,7 +371,7 @@ int mLastMouseDownButtonType; -#ifdef MOZ_X11 +#if 0 class Renderer : public gfxXlibNativeRenderer { public: Renderer(NPWindow* aWindow, nsPluginInstanceOwner* aInstanceOwner, --- firefox-84.0/dom/plugins/ipc/moz.build.vanilla 2020-12-15 14:55:31.272811913 +0100 +++ firefox-84.0/dom/plugins/ipc/moz.build 2020-12-15 14:56:45.972811028 +0100 @@ -139,9 +139,6 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] != "gtk": CXXFLAGS += CONFIG["TK_CFLAGS"] -else: - # Force build against gtk+2 for struct offsets and such. - CXXFLAGS += CONFIG["MOZ_GTK2_CFLAGS"] CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"] --- firefox-84.0/dom/plugins/ipc/NPEventUnix.h.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/NPEventUnix.h 2020-12-15 14:55:31.268811913 +0100 @@ -9,7 +9,7 @@ #include "npapi.h" -#ifdef MOZ_X11 +#if 0 # include "mozilla/X11Util.h" #endif @@ -59,7 +59,7 @@ return false; } -#ifdef MOZ_X11 +#if 0 SetXDisplay(aResult->event); #endif return true; @@ -70,7 +70,7 @@ aLog->append(L"(XEvent)"); } -#ifdef MOZ_X11 +#if 0 private: static void SetXDisplay(XEvent& ev) { Display* display = mozilla::DefaultXDisplay(); --- firefox-85.0/dom/plugins/ipc/PluginInstanceChild.cpp.vanilla 2021-01-25 21:13:58.453207539 +0100 +++ firefox-85.0/dom/plugins/ipc/PluginInstanceChild.cpp 2021-01-25 21:14:22.270209238 +0100 @@ -16,7 +16,7 @@ #include "nsNPAPIPluginInstance.h" #include "mozilla/gfx/2D.h" #include "mozilla/gfx/Logging.h" -#ifdef MOZ_X11 +#if 0 # include "gfxXlibSurface.h" #endif #ifdef XP_WIN @@ -44,7 +44,7 @@ using namespace mozilla::gfx; using namespace mozilla::widget; -#ifdef MOZ_WIDGET_GTK +#if 0 # include # include @@ -188,10 +188,10 @@ mWindow.type = NPWindowTypeWindow; mData.ndata = (void*)this; mData.pdata = nullptr; -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 mWindow.ws_info = &mWsInfo; memset(&mWsInfo, 0, sizeof(mWsInfo)); -# ifdef MOZ_WIDGET_GTK +# if 1 mWsInfo.display = nullptr; # else mWsInfo.display = DefaultXDisplay(); @@ -356,7 +356,7 @@ AutoStackHelper guard(this); switch (aVar) { -#if defined(MOZ_X11) +#if 0 case NPNVToolkit: *((NPNToolkitType*)aValue) = NPNVGtk2; return NPERR_NO_ERROR; @@ -428,7 +428,7 @@ *static_cast(aValue) = mPluginWindowHWND; return NPERR_NO_ERROR; } -#elif defined(MOZ_X11) +#elif 0 NPError result; CallNPN_GetValue_NPNVnetscapeWindow(static_cast(aValue), &result); return result; @@ -842,7 +842,7 @@ AssertPluginThread(); AutoStackHelper guard(this); -#if defined(MOZ_X11) && defined(DEBUG) +#if 0 if (GraphicsExpose == event.event.type) PLUGIN_LOG_DEBUG( (" received drawable 0x%lx\n", event.event.xgraphicsexpose.drawable)); @@ -899,7 +899,7 @@ } #endif -#ifdef MOZ_X11 +#if 0 if (GraphicsExpose == event.event.type) { // Make sure the X server completes the drawing before the parent // draws on top and destroys the Drawable. @@ -1154,7 +1154,7 @@ AssertPluginThread(); AutoStackHelper guard(this); -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 NS_ASSERTION(mWsInfo.display, "We should have a valid display!"); // The minimum info is sent over IPC to allow this @@ -1250,14 +1250,14 @@ #elif defined(MOZ_WIDGET_UIKIT) || defined(MOZ_WAYLAND) // Don't care #else -# error Implement me for your OS +//# error Implement me for your OS #endif return IPC_OK(); } bool PluginInstanceChild::Initialize() { -#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) +#if 0 if (mWsInfo.display) { // Already initialized return true; @@ -2870,7 +2870,7 @@ ? SurfaceFormat::A8R8G8B8_UINT32 : SurfaceFormat::X8R8G8B8_UINT32; -#ifdef MOZ_X11 +#if 0 Display* dpy = mWsInfo.display; Screen* screen = DefaultScreenOfDisplay(dpy); if (format == SurfaceFormat::X8R8G8B8_UINT32 && @@ -2926,7 +2926,7 @@ return false; } -#ifdef MOZ_X11 +#if 0 bool supportNonDefaultVisual = false; Screen* screen = DefaultScreenOfDisplay(mWsInfo.display); Visual* defaultVisual = DefaultVisualOfScreen(screen); @@ -3078,12 +3078,12 @@ } void PluginInstanceChild::UpdateWindowAttributes(bool aForceSetWindow) { -#if defined(MOZ_X11) || defined(XP_WIN) +#if 0 RefPtr curSurface = mHelperSurface ? mHelperSurface : mCurrentSurface; #endif // Only used within MOZ_X11 or XP_WIN blocks. Unused variable otherwise bool needWindowUpdate = aForceSetWindow; -#ifdef MOZ_X11 +#if 0 Visual* visual = nullptr; Colormap colormap = 0; if (curSurface && curSurface->GetType() == gfxSurfaceType::Xlib) { @@ -3182,7 +3182,7 @@ // We should not send an async surface if we're using direct rendering. MOZ_ASSERT(!IsUsingDirectDrawing()); -#ifdef MOZ_X11 +#if 0 { NS_ASSERTION(aSurface->GetType() == gfxSurfaceType::Xlib, "Non supported platform surface type"); @@ -3230,7 +3230,7 @@ // Render using temporary X surface, with copy to image surface nsIntRect plPaintRect(aRect); RefPtr renderSurface = aSurface; -#ifdef MOZ_X11 +#if 0 if (mIsTransparent && (GetQuirks() & QUIRK_FLASH_EXPOSE_COORD_TRANSLATION)) { // Work around a bug in Flash up to 10.1 d51 at least, where expose event // top left coordinates within the plugin-rect and not at the drawable @@ -3573,7 +3573,7 @@ NPRect r = {(uint16_t)rect.y, (uint16_t)rect.x, (uint16_t)rect.YMost(), (uint16_t)rect.XMost()}; SurfaceDescriptor currSurf; -#ifdef MOZ_X11 +#if 0 if (mCurrentSurface->GetType() == gfxSurfaceType::Xlib) { gfxXlibSurface* xsurf = static_cast(mCurrentSurface.get()); currSurf = SurfaceDescriptorX11(xsurf); @@ -3621,7 +3621,7 @@ // We can read safely from XSurface,SharedDIBSurface and Unsafe // SharedMemory, because PluginHost is not able to modify that surface -#if defined(MOZ_X11) +#if 0 if (mBackSurface->GetType() != gfxSurfaceType::Xlib && !gfxSharedImageSurface::IsSharedImage(mBackSurface)) return false; @@ -3629,7 +3629,7 @@ if (!SharedDIBSurface::IsSharedDIBSurface(mBackSurface)) return false; #endif -#if defined(MOZ_X11) || defined(XP_WIN) +#if 0 if (mCurrentSurface->GetContentType() != mBackSurface->GetContentType()) return false; @@ -3747,7 +3747,7 @@ if (!mBackground) { // XXX refactor me switch (aBackground.type()) { -#ifdef MOZ_X11 +#if 0 case SurfaceDescriptor::TSurfaceDescriptorX11: { mBackground = aBackground.get_SurfaceDescriptorX11().OpenForeign(); break; --- firefox-84.0/dom/plugins/ipc/PluginInstanceChild.h.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/PluginInstanceChild.h 2020-12-15 14:55:31.268811913 +0100 @@ -363,7 +363,7 @@ PluginScriptableObjectChild* mCachedWindowActor; PluginScriptableObjectChild* mCachedElementActor; -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 NPSetWindowCallbackStruct mWsInfo; #elif defined(OS_WIN) HWND mPluginWindowHWND; --- firefox-84.0/dom/plugins/ipc/PluginInstanceParent.cpp.vanilla 2020-12-12 01:35:33.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/PluginInstanceParent.cpp 2020-12-15 14:55:31.268811913 +0100 @@ -26,7 +26,7 @@ #include "nsNPAPIPluginInstance.h" #include "nsPluginInstanceOwner.h" #include "nsFocusManager.h" -#ifdef MOZ_X11 +#if 0 # include "gfxXlibSurface.h" #endif #include "gfxUtils.h" @@ -61,7 +61,7 @@ # include "GPUVideoImage.h" # include "mozilla/layers/SynchronousTask.h" extern const wchar_t* kFlashFullscreenClass; -#elif defined(MOZ_WIDGET_GTK) +#elif 0 # include "mozilla/dom/ContentChild.h" # include #elif defined(XP_MACOSX) @@ -182,7 +182,7 @@ if (mImageContainer) { mImageContainer->ClearAllImages(); } -#ifdef MOZ_X11 +#if 0 FinishX(DefaultXDisplay()); #endif } @@ -227,7 +227,7 @@ #ifdef XP_WIN HWND id; #elif defined(MOZ_X11) - XID id; + int id; #elif defined(XP_DARWIN) intptr_t id; #elif defined(ANDROID) || defined(MOZ_WAYLAND) @@ -405,7 +405,7 @@ case NPDrawingModelAsyncWindowsDXGISurface: allowed = SupportsPluginDirectDXGISurfaceDrawing(); break; -#elif defined(MOZ_X11) +#elif 0 case NPDrawingModelSyncX: allowed = true; break; @@ -968,7 +968,7 @@ return IPC_OK(); } #endif -#ifdef MOZ_X11 +#if 0 else if (newSurface.type() == SurfaceDescriptor::TSurfaceDescriptorX11) { surface = newSurface.get_SurfaceDescriptorX11().OpenForeign(); } @@ -985,7 +985,7 @@ // This is the "old front buffer" we're about to hand back to // the plugin. We might still have drawing operations // referencing it. -#ifdef MOZ_X11 +#if 0 if (mFrontSurface->GetType() == gfxSurfaceType::Xlib) { // Finish with the surface and XSync here to ensure the server has // finished operations on the surface before the plugin starts @@ -1224,7 +1224,7 @@ ("[InstanceParent][%p] EndUpdateBackground for ", this, aRect.x, aRect.y, aRect.width, aRect.height)); -#ifdef MOZ_X11 +#if 0 // Have to XSync here to avoid the plugin trying to draw with this // surface racing with its creation in the X server. We also want // to avoid the plugin drawing onto stale pixels, then handing us @@ -1270,7 +1270,7 @@ // XXX refactor me -#if defined(MOZ_X11) +#if 0 Screen* screen = DefaultScreenOfDisplay(DefaultXDisplay()); Visual* visual = DefaultVisualOfScreen(screen); mBackground = gfxXlibSurface::Create( @@ -1310,7 +1310,7 @@ // XXX refactor me -#ifdef MOZ_X11 +#if 0 gfxXlibSurface* xsurf = static_cast(mBackground.get()); return SurfaceDescriptorX11(xsurf); #endif @@ -1427,7 +1427,7 @@ } #endif -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 const NPSetWindowCallbackStruct* ws_info = static_cast(aWindow->ws_info); window.visualID = ws_info->visual ? ws_info->visual->visualid : 0; @@ -1621,7 +1621,7 @@ } #endif -#if defined(MOZ_X11) +#if 0 switch (npevent->type) { case GraphicsExpose: PLUGIN_LOG_DEBUG((" schlepping drawable 0x%lx across the pipe\n", @@ -1641,7 +1641,7 @@ // Release any active pointer grab so that the plugin X client can // grab the pointer if it wishes. Display* dpy = DefaultXDisplay(); -# ifdef MOZ_WIDGET_GTK +# if 0 // GDK attempts to (asynchronously) track whether there is an active // grab so ungrab through GDK. // --- firefox-84.0/dom/plugins/ipc/PluginMessageUtils.cpp.vanilla 2020-12-12 00:41:43.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/PluginMessageUtils.cpp 2020-12-15 14:55:31.268811913 +0100 @@ -49,7 +49,7 @@ width(0), height(0), type(NPWindowTypeDrawable) -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 , visualID(0), colormap(0) @@ -81,7 +81,7 @@ } } -#if defined(OS_LINUX) || defined(OS_SOLARIS) +#if defined(OS_SOLARIS) static string ReplaceAll(const string& haystack, const string& needle, const string& with) { string munged = haystack; @@ -97,7 +97,7 @@ #endif string MungePluginDsoPath(const string& path) { -#if defined(OS_LINUX) || defined(OS_SOLARIS) +#if defined(OS_SOLARIS) // https://bugzilla.mozilla.org/show_bug.cgi?id=519601 return ReplaceAll(path, "netscape", "netsc@pe"); #else @@ -106,7 +106,7 @@ } string UnmungePluginDsoPath(const string& munged) { -#if defined(OS_LINUX) || defined(OS_SOLARIS) +#if defined(OS_SOLARIS) return ReplaceAll(munged, "netsc@pe", "netscape"); #else return munged; --- firefox-84.0/dom/plugins/ipc/PluginMessageUtils.h.vanilla 2020-12-12 01:35:34.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/PluginMessageUtils.h 2020-12-15 14:56:45.972811028 +0100 @@ -87,7 +87,7 @@ uint32_t height; NPRect clipRect; NPWindowType type; -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 VisualID visualID; Colormap colormap; #endif /* XP_UNIX */ @@ -115,7 +115,7 @@ typedef HWND NativeWindowHandle; #elif defined(MOZ_X11) typedef XID NativeWindowHandle; -#elif defined(XP_DARWIN) || defined(ANDROID) || defined(MOZ_WAYLAND) +#elif defined(XP_DARWIN) || defined(ANDROID) || defined(MOZ_WAYLAND) || defined(MOZ_X11) typedef intptr_t NativeWindowHandle; // never actually used, will always be 0 #else # error Need NativeWindowHandle for this platform @@ -323,7 +323,7 @@ WriteParam(aMsg, aParam.height); WriteParam(aMsg, aParam.clipRect); WriteParam(aMsg, aParam.type); -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 aMsg->WriteULong(aParam.visualID); aMsg->WriteULong(aParam.colormap); #endif @@ -345,7 +345,7 @@ ReadParam(aMsg, aIter, &clipRect) && ReadParam(aMsg, aIter, &type))) return false; -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 unsigned long visualID; unsigned long colormap; if (!(aMsg->ReadULong(aIter, &visualID) && @@ -365,7 +365,7 @@ aResult->height = height; aResult->clipRect = clipRect; aResult->type = type; -#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 aResult->visualID = visualID; aResult->colormap = colormap; #endif --- firefox-84.0/dom/plugins/ipc/PluginModuleChild.cpp.vanilla 2020-12-12 01:35:33.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/PluginModuleChild.cpp 2020-12-15 14:55:31.272811913 +0100 @@ -12,7 +12,7 @@ #include "mozilla/ipc/MessageChannel.h" -#ifdef MOZ_WIDGET_GTK +#if 0 # include # include #endif @@ -25,7 +25,7 @@ #include "nsPluginsDir.h" #include "nsXULAppAPI.h" -#ifdef MOZ_X11 +#if 0 # include "nsX11ErrorHandler.h" # include "mozilla/X11Util.h" #endif @@ -100,7 +100,7 @@ #if defined(OS_WIN) || defined(OS_MACOSX) , mGetEntryPointsFunc(0) -#elif defined(MOZ_WIDGET_GTK) +#elif 0 , mNestedLoopTimerId(0) #endif @@ -254,7 +254,7 @@ // XXX quirks isn't initialized yet mAsyncRenderSupport = info.fSupportsAsyncRender; #endif -#if defined(MOZ_X11) +#if 0 constexpr auto flash10Head = "Shockwave Flash 10."_ns; if (StringBeginsWith(nsDependentCString(info.fDescription), flash10Head)) { AddQuirk(QUIRK_FLASH_EXPOSE_COORD_TRANSLATION); @@ -267,7 +267,7 @@ mozilla::plugins::PluginUtilsOSX::SetProcessName(nameBuffer); #endif pluginFile.FreePluginInfo(info); -#if defined(MOZ_X11) || defined(XP_MACOSX) +#if 0 if (!mLibrary) #endif { @@ -330,7 +330,7 @@ return true; } -#if defined(MOZ_WIDGET_GTK) +#if 0 typedef void (*GObjectDisposeFn)(GObject*); typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*); @@ -550,7 +550,7 @@ } bool PluginModuleChild::InitGraphics() { -#if defined(MOZ_WIDGET_GTK) +#if 0 // Work around plugins that don't interact well with GDK // client-side windows. PR_SetEnv("GDK_NATIVE_WINDOWS=1"); @@ -588,7 +588,7 @@ #else // may not be necessary on all platforms #endif -#ifdef MOZ_X11 +#if 0 // Do this after initializing GDK, or GDK will install its own handler. InstallX11ErrorHandler(); #endif @@ -596,7 +596,7 @@ } void PluginModuleChild::DeinitGraphics() { -#if defined(MOZ_X11) && defined(NS_FREE_PERMANENT_DATA) +#if 0 // We free some data off of XDisplay close hooks, ensure they're // run. Closing the display is pretty scary, so we only do it to // silence leak checkers. @@ -994,7 +994,7 @@ switch (aVariable) { // Copied from nsNPAPIPlugin.cpp case NPNVToolkit: -#if defined(MOZ_WIDGET_GTK) +#if 0 *static_cast(aValue) = NPNVGtk2; return NPERR_NO_ERROR; #endif @@ -1020,7 +1020,7 @@ case NPNVSupportsWindowless: *(NPBool*)aValue = true; return NPERR_NO_ERROR; -#if defined(MOZ_WIDGET_GTK) +#if 0 case NPNVxDisplay: { if (!aNPP) { return NPERR_INVALID_INSTANCE_ERROR; @@ -1548,8 +1548,8 @@ SetEventHooks(); #endif -#ifdef MOZ_X11 -# ifdef MOZ_WIDGET_GTK +#if 0 +# if 0 if (!GDK_IS_X11_DISPLAY(gdk_display_get_default())) { // We don't support NPAPI plugins on Wayland. return NPERR_GENERIC_ERROR; --- firefox-84.0/dom/plugins/ipc/PluginModuleChild.h.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/PluginModuleChild.h 2020-12-15 14:55:31.272811913 +0100 @@ -210,7 +210,7 @@ bool InitGraphics(); void DeinitGraphics(); -#if defined(MOZ_WIDGET_GTK) +#if 0 static gboolean DetectNestedEventLoop(gpointer data); static gboolean ProcessBrowserEvents(gpointer data); @@ -242,7 +242,7 @@ PluginSettings mCachedSettings; -#if defined(MOZ_WIDGET_GTK) +#if 0 // If a plugin spins a nested glib event loop in response to a // synchronous IPC message from the browser, the loop might break // only after the browser responds to a request sent by the --- firefox-84.0/dom/plugins/ipc/PluginModuleParent.cpp.vanilla 2020-12-12 01:35:33.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/PluginModuleParent.cpp 2020-12-15 14:55:31.272811913 +0100 @@ -54,7 +54,7 @@ # include "PluginUtilsWin.h" #endif -#ifdef MOZ_WIDGET_GTK +#if 0 # include #elif XP_MACOSX # include "PluginInterposeOSX.h" @@ -1595,7 +1595,7 @@ mozilla::ipc::IPCResult PluginModuleParent::RecvBackUpXResources( const FileDescriptor& aXSocketFd) { -#ifndef MOZ_X11 +#if 1 MOZ_CRASH("This message only makes sense on X11 platforms"); #else MOZ_ASSERT(0 > mPluginXSocketFdDup.get(), "Already backed up X resources??"); @@ -1781,7 +1781,7 @@ module->CachedSettingChanged(); } -#if defined(XP_UNIX) && !defined(XP_MACOSX) +#if 0 nsresult PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error) { @@ -1836,6 +1836,22 @@ return NS_OK; } +#endif + +#if defined(XP_UNIX) && !defined(XP_MACOSX) +nsresult PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, + NPPluginFuncs* pFuncs, + NPError* error) { +*error = NPERR_GENERIC_ERROR; +return NS_ERROR_FAILURE; +} + +nsresult PluginModuleChromeParent::NP_Initialize(NPNetscapeFuncs* bFuncs, + NPPluginFuncs* pFuncs, + NPError* error) { + *error = NPERR_GENERIC_ERROR; + return NS_ERROR_FAILURE; +} #else @@ -2039,7 +2055,7 @@ } }; -#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) +#if defined(XP_WIN) static void ForceWindowless(nsTArray& names, nsTArray& values) { nsCaseInsensitiveUTF8StringArrayComparator comparator; @@ -2122,7 +2138,7 @@ # endif ForceWindowless(names, values); } -#elif defined(MOZ_WIDGET_GTK) +#elif 0 // We no longer support windowed mode on Linux. ForceWindowless(names, values); #endif @@ -2236,7 +2252,7 @@ return IPC_OK(); } -#elif !defined(MOZ_WIDGET_GTK) +#elif 1 mozilla::ipc::IPCResult PluginModuleParent::AnswerProcessSomeEvents() { MOZ_CRASH("unreached"); } --- firefox-84.0/dom/plugins/ipc/PluginModuleParent.h.vanilla 2020-12-12 00:41:49.000000000 +0100 +++ firefox-84.0/dom/plugins/ipc/PluginModuleParent.h 2020-12-15 14:55:31.272811913 +0100 @@ -288,7 +288,7 @@ int32_t mSandboxLevel; bool mIsFlashPlugin; -#ifdef MOZ_X11 +#if 0 // Dup of plugin's X socket, used to scope its resources to this // object instead of the plugin process's lifetime ScopedClose mPluginXSocketFdDup; --- firefox-84.0/dom/moz.build.vanilla 2020-12-15 14:55:31.268811913 +0100 +++ firefox-84.0/dom/moz.build 2020-12-15 14:56:45.972811028 +0100 @@ -119,7 +119,7 @@ "imptests", ] -if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("gtk", "cocoa", "windows"): +if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "windows"): TEST_DIRS += ["plugins/test"] SPHINX_TREES["/dom"] = "docs" --- firefox-84.0/browser/installer/package-manifest.in.vanilla 2020-12-12 00:41:42.000000000 +0100 +++ firefox-84.0/browser/installer/package-manifest.in 2020-12-15 14:55:31.268811913 +0100 @@ -107,7 +107,6 @@ #endif #ifdef MOZ_GTK @BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@ -@BINPATH@/gtk2/@DLL_PREFIX@mozgtk@DLL_SUFFIX@ #ifdef MOZ_WAYLAND @BINPATH@/@DLL_PREFIX@mozwayland@DLL_SUFFIX@ #endif --- firefox-84.0/old-configure.vanilla 2020-12-12 01:35:41.000000000 +0100 +++ firefox-84.0/old-configure 2020-12-15 14:55:31.280811913 +0100 @@ -7921,6 +7921,9 @@ EOF fi + +if false; then + if test "$MOZ_ENABLE_GTK"; then cat >> confdefs.pytmp <