From a81b073a0331f5308eec0a8e912244db3da5e116 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 1 Jul 2021 12:39:23 +0000 Subject: [PATCH] various: move - remove firefox-esr for now - move pixman to extra - move libxkbcommon to extra --- extra/firefox-esr/build | 142 --- extra/firefox-esr/checksums | 7 - extra/firefox-esr/depends | 50 - extra/firefox-esr/patches/no-dbus.patch | 359 ------ extra/firefox-esr/patches/no-gtk2.patch | 1508 ----------------------- extra/firefox-esr/sources | 10 - extra/firefox-esr/version | 1 - {xorg => extra}/libxkbcommon/build | 0 {xorg => extra}/libxkbcommon/checksums | 0 {xorg => extra}/libxkbcommon/depends | 0 {xorg => extra}/libxkbcommon/sources | 0 {xorg => extra}/libxkbcommon/version | 0 {xorg => extra}/pixman/build | 0 {xorg => extra}/pixman/checksums | 0 {xorg => extra}/pixman/sources | 0 {xorg => extra}/pixman/version | 0 16 files changed, 2077 deletions(-) delete mode 100755 extra/firefox-esr/build delete mode 100644 extra/firefox-esr/checksums delete mode 100644 extra/firefox-esr/depends delete mode 100644 extra/firefox-esr/patches/no-dbus.patch delete mode 100644 extra/firefox-esr/patches/no-gtk2.patch delete mode 100644 extra/firefox-esr/sources delete mode 100644 extra/firefox-esr/version rename {xorg => extra}/libxkbcommon/build (100%) rename {xorg => extra}/libxkbcommon/checksums (100%) rename {xorg => extra}/libxkbcommon/depends (100%) rename {xorg => extra}/libxkbcommon/sources (100%) rename {xorg => extra}/libxkbcommon/version (100%) rename {xorg => extra}/pixman/build (100%) rename {xorg => extra}/pixman/checksums (100%) rename {xorg => extra}/pixman/sources (100%) rename {xorg => extra}/pixman/version (100%) diff --git a/extra/firefox-esr/build b/extra/firefox-esr/build deleted file mode 100755 index 8063ab50..00000000 --- a/extra/firefox-esr/build +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh -e - -for patch in *.patch; do - patch -p1 < "$patch" -done - -# Update some crates which cause build failure with the latest -# Rust version (1.47.0). Fixes not backported to this ESR. -# This avoids patching 100 or so files which is just unreasonable. -# See: https://github.com/rust-lang/rust/issues/76482 -# https://github.com/rust-lang/rust/issues/76480 -# https://phabricator.services.mozilla.com/D89473 -# https://hg.mozilla.org/mozilla-central/rev/281a323cde5f -# https://hg.mozilla.org/mozilla-central/rev/da77d5528a08 -# https://bugzilla.mozilla.org/show_bug.cgi?id=1663715 -# https://bugzilla.mozilla.org/show_bug.cgi?id=1670579 -( - cd third_party/rust - - for crate in *.crate; do - crate_name=${crate%-*} - crate_ver=${crate##*-} - crate_ver=${crate_ver%%.crate} - - # Remove the pre-existing crate's files. - rm -rf "$crate_name" - - # Add the updated crate's files. - tar xf "$crate" - - # Rename - to - mv -f "${crate%%.crate}" "$crate_name" - - # Generate checksums. - sha256=$(sha256sum "$crate") - sha256=${sha256%% *} - - # Create .cargo-checksum.json to appease tooling. - printf '{"package":"%s","files":{}}\n' "$sha256" \ - > "$crate_name/.cargo-checksum.json" - - # Update root Cargo.lock to reflect changes. - sed -i "/name = \"$crate_name\"/ { - N - s/version = \".*\"/version = \"$crate_ver\"/ - N - N - s/checksum = \".*\"/checksum = \"$sha256\"/ - }" ../../Cargo.lock - done -) - -# Build autoconf 2.13 for Firefox's sole use. -# See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642 -( - cd autoconf2.13 - - ./configure \ - --prefix="$PWD/../junk" \ - --program-suffix=-2.13 - - make - make install -) - -# Build yasm for Firefox's sole use. -# Firefox is the only package which needs it -# and upstream is kinda dead. -( - cd yasm - - ./configure \ - --prefix="$PWD/../junk" - - make - make install -) -export PATH="$PWD/junk/bin:$PATH" - -mkdir -p build -cd build - -# Bypass 'ccache' as it's totally useless when building -# Firefox and only slows things down. -export CC="${CC:-/usr/bin/cc}" -export CXX="${CXX:-/usr/bin/c++}" - -export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox" -export RUSTFLAGS="$RUSTFLAGS -Cdebuginfo=0" -export MOZ_DEBUG_FLAGS=-g0 -export MOZ_NOSPAM=1 - -../configure \ - --prefix=/usr \ - --libdir=/usr/lib \ - --enable-official-branding \ - --enable-optimize="$CFLAGS -w" \ - --enable-install-strip \ - --enable-strip \ - --enable-rust-simd \ - --enable-application=browser \ - --enable-release \ - --enable-alsa \ - --without-system-nspr \ - --without-system-nss \ - --with-system-jpeg \ - --with-system-zlib \ - --with-system-png \ - --without-system-libvpx \ - --with-system-pixman \ - --with-system-ffi \ - --disable-profiling \ - --disable-accessibility \ - --disable-tests \ - --disable-system-extension-dirs \ - --disable-parental-controls \ - --disable-debug-symbols \ - --disable-callgrind \ - --disable-vtune \ - --disable-elf-hack \ - --disable-gold \ - --disable-jemalloc \ - --disable-pulseaudio \ - --disable-crashreporter \ - --disable-updater \ - --disable-dbus \ - --disable-eme \ - --disable-necko-wifi - -make -make DESTDIR="$1" install - -# Remove a lot of uneeded "stuff". -rm -rf "$1/usr/include" -rm -rf "$1/usr/lib/firefox-devel" -rm -rf "$1/usr/share/idl" -rm -rf "$1/usr/lib/firefox/gtk2" # Drop GTK+2 runtime dependency. -rm -f "$1/usr/lib/firefox/browser/features/fxmonitor@mozilla.org.xpi" -rm -f "$1/usr/lib/firefox/browser/features/screenshots@mozilla.org.xpi" -rm -f "$1/usr/lib/firefox/browser/features/webcompat-reporter@mozilla.org.xpi" -rm -f "$1/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi" -rm -f "$1/usr/lib/firefox/browser/features/doh-rollout@mozilla.org.xpi" diff --git a/extra/firefox-esr/checksums b/extra/firefox-esr/checksums deleted file mode 100644 index cbc6c1c9..00000000 --- a/extra/firefox-esr/checksums +++ /dev/null @@ -1,7 +0,0 @@ -51f54ff608aa09de07b304307581ae89112781597322b8999b3099cfabf48290 -f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e -3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f -9b4c5c6bd57198abc4c846a1000603007f17e85577d861fd67ee11762a7c1c1b -5506dc04d46b55e0ce91ae663c9ed13b89e20bfcb53c84989dccf9ff551e8de3 -963f7d3cc59b59b9325165add223142bbf1df27655d07789f109896d353d8350 -175c513d55719db99da20232b06cda8bab6b83ec2d04e3283edf0213c37c1a29 diff --git a/extra/firefox-esr/depends b/extra/firefox-esr/depends deleted file mode 100644 index 4423aa2c..00000000 --- a/extra/firefox-esr/depends +++ /dev/null @@ -1,50 +0,0 @@ -alsa-lib -atk -bzip2 -cairo -cbindgen make -clang make -expat -ffmpeg -fontconfig -freetype-harfbuzz -fribidi -gdk-pixbuf -glib -gtk+3 -libICE -libSM -libX11 -libXau -libXcomposite -libXcursor -libXdamage -libXext -libXfixes -libXi -libXinerama -libXrandr -libXrender -libXt -libXxf86vm -libdrm -libepoxy -libffi -libjpeg-turbo -libpng -libvpx -libxcb -libxshmfence -llvm make -m4 make -mesa -nasm make -nodejs make -pango -perl make -pixman -pkgconf make -python make -rust make -zip make -zlib diff --git a/extra/firefox-esr/patches/no-dbus.patch b/extra/firefox-esr/patches/no-dbus.patch deleted file mode 100644 index c69840fa..00000000 --- a/extra/firefox-esr/patches/no-dbus.patch +++ /dev/null @@ -1,359 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock -index b1fca7cbca..888dd6d3fd 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -111,25 +111,11 @@ dependencies = [ - "bitflags", - ] - --[[package]] --name = "audio_thread_priority" --version = "0.22.1" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f8fba1500e466a39dd3faa5aed20a50dfe0aa1b905264a453bbe9f49508994cc" --dependencies = [ -- "cfg-if", -- "dbus", -- "libc", -- "log", -- "mach", -- "winapi 0.3.7", --] - - [[package]] - name = "audioipc" - version = "0.2.5" - dependencies = [ -- "audio_thread_priority", - "bincode", - "bytes 0.4.9", - "cc", -@@ -156,7 +142,6 @@ dependencies = [ - name = "audioipc-client" - version = "0.4.0" - dependencies = [ -- "audio_thread_priority", - "audioipc", - "cubeb-backend", - "futures 0.1.29", -@@ -169,7 +154,6 @@ dependencies = [ - name = "audioipc-server" - version = "0.2.3" - dependencies = [ -- "audio_thread_priority", - "audioipc", - "cubeb-core", - "error-chain", -@@ -1890,7 +1874,6 @@ dependencies = [ - name = "gkrust-shared" - version = "0.1.0" - dependencies = [ -- "audio_thread_priority", - "audioipc-client", - "audioipc-server", - "authenticator", -diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp -index 2fe91affcd..ae835b2c34 100644 ---- a/dom/ipc/ContentChild.cpp -+++ b/dom/ipc/ContentChild.cpp -@@ -111,9 +111,7 @@ - #include "GMPServiceChild.h" - #include "nsIStringBundle.h" - #include "Geolocation.h" --#include "audio_thread_priority.h" - #include "nsIConsoleService.h" --#include "audio_thread_priority.h" - #include "nsIURIMutator.h" - #include "nsIInputStreamChannel.h" - #include "nsFocusManager.h" -@@ -1624,9 +1622,7 @@ mozilla::ipc::IPCResult ContentChild::RecvSetProcessSandbox( - } else { - // Pre-start audio before sandboxing; see bug 1443612. - if (StaticPrefs::media_cubeb_sandbox()) { -- if (atp_set_real_time_limit(0, 48000)) { - NS_WARNING("could not set real-time limit at process startup"); -- } - InstallSoftRealTimeLimitHandler(); - } else { - Unused << CubebUtils::GetCubebContext(); -diff --git a/dom/media/GraphRunner.cpp b/dom/media/GraphRunner.cpp -index 6ea8f2e9ca..51dba21d71 100644 ---- a/dom/media/GraphRunner.cpp -+++ b/dom/media/GraphRunner.cpp -@@ -13,7 +13,6 @@ - #include "nsISupportsPriority.h" - #include "prthread.h" - #include "Tracing.h" --#include "audio_thread_priority.h" - - namespace mozilla { - -@@ -95,8 +94,6 @@ auto GraphRunner::OneIteration(GraphTime aStateEnd, GraphTime aIterationEnd, - } - - NS_IMETHODIMP GraphRunner::Run() { -- atp_handle* handle = -- atp_promote_current_thread_to_real_time(0, mGraph->GraphRate()); - - nsCOMPtr threadInternal = do_QueryInterface(mThread); - threadInternal->SetObserver(mGraph); -@@ -119,9 +116,6 @@ NS_IMETHODIMP GraphRunner::Run() { - mMonitor.Notify(); - } - -- if (handle) { -- atp_demote_current_thread_from_real_time(handle); -- } - - return NS_OK; - } -diff --git a/dom/media/UnderrunHandlerLinux.cpp b/dom/media/UnderrunHandlerLinux.cpp -index af5c84538e..9fecb5ebd2 100644 ---- a/dom/media/UnderrunHandlerLinux.cpp -+++ b/dom/media/UnderrunHandlerLinux.cpp -@@ -9,7 +9,6 @@ - - #include - #include --#include "audio_thread_priority.h" - - namespace mozilla { - -@@ -57,21 +56,8 @@ void InstallSoftRealTimeLimitHandler() { - } - - void DemoteThreadFromRealTime() { -- atp_thread_info* info = atp_get_current_thread_info(); -- if (!info) { - NS_WARNING("Could not get current thread info when demoting thread."); - return; -- } -- int rv = atp_demote_thread_from_real_time(info); -- if (rv) { -- NS_WARNING("Could not demote thread from real-time."); -- return; -- } -- rv = atp_free_thread_info(info); -- if (rv) { -- NS_WARNING("Could not free atp_thread_info struct"); -- } -- gRealtimeLimitReached = false; - } - - } // namespace mozilla -diff --git a/dom/media/moz.build b/dom/media/moz.build -index c8dc9fe2d1..ae43f16fa3 100644 ---- a/dom/media/moz.build -+++ b/dom/media/moz.build -@@ -100,7 +100,6 @@ XPIDL_SOURCES += [ - XPIDL_MODULE = 'dom_media' - - EXPORTS += [ -- '../../third_party/rust/audio_thread_priority/audio_thread_priority.h', - 'ADTSDecoder.h', - 'ADTSDemuxer.h', - 'AsyncLogger.h', -diff --git a/media/audioipc/audioipc/Cargo.toml b/media/audioipc/audioipc/Cargo.toml -index dfffa97f24..d9d2cf7d95 100644 ---- a/media/audioipc/audioipc/Cargo.toml -+++ b/media/audioipc/audioipc/Cargo.toml -@@ -19,7 +19,6 @@ serde = "1" - serde_derive = "1" - tokio = "0.1" - tokio-io = "0.1" --audio_thread_priority = "0.22" - - [target.'cfg(unix)'.dependencies] - iovec = "0.1" -diff --git a/media/audioipc/audioipc/src/messages.rs b/media/audioipc/audioipc/src/messages.rs -index 9cda962e0e..37e6119b74 100644 ---- a/media/audioipc/audioipc/src/messages.rs -+++ b/media/audioipc/audioipc/src/messages.rs -@@ -5,8 +5,6 @@ - - use crate::PlatformHandle; - use crate::PlatformHandleType; --#[cfg(target_os = "linux")] --use audio_thread_priority::RtPriorityThreadInfo; - use cubeb::{self, ffi}; - use std::ffi::{CStr, CString}; - use std::os::raw::{c_char, c_int, c_uint}; -@@ -211,8 +209,6 @@ pub enum ServerMessage { - StreamGetCurrentDevice(usize), - StreamRegisterDeviceChangeCallback(usize, bool), - -- #[cfg(target_os = "linux")] -- PromoteThreadToRealTime([u8; std::mem::size_of::()]), - } - - // Server -> Client messages. -@@ -243,8 +239,6 @@ pub enum ClientMessage { - StreamCurrentDevice(Device), - StreamRegisterDeviceChangeCallback, - -- #[cfg(target_os = "linux")] -- ThreadPromoted, - - Error(c_int), - } -diff --git a/media/audioipc/client/Cargo.toml b/media/audioipc/client/Cargo.toml -index 4a55c0162e..2fbccc05df 100644 ---- a/media/audioipc/client/Cargo.toml -+++ b/media/audioipc/client/Cargo.toml -@@ -9,7 +9,6 @@ description = "Cubeb Backend for talking to remote cubeb server." - edition = "2018" - - [dependencies] --audio_thread_priority = "0.22" - audioipc = { path="../audioipc" } - cubeb-backend = "0.7" - futures = { version="0.1.18", default-features=false, features=["use_std"] } -diff --git a/media/audioipc/client/src/context.rs b/media/audioipc/client/src/context.rs -index 6b13900c54..87323508b8 100644 ---- a/media/audioipc/client/src/context.rs -+++ b/media/audioipc/client/src/context.rs -@@ -6,10 +6,6 @@ - use crate::stream; - use crate::{assert_not_in_callback, run_in_callback}; - use crate::{ClientStream, AUDIOIPC_INIT_PARAMS}; --#[cfg(target_os = "linux")] --use audio_thread_priority::get_current_thread_info; --#[cfg(not(target_os = "linux"))] --use audio_thread_priority::promote_current_thread_to_real_time; - use audioipc::codec::LengthDelimitedCodec; - use audioipc::frame::{framed, Framed}; - use audioipc::platformhandle_passing::{framed_with_platformhandles, FramedWithPlatformHandles}; -@@ -72,31 +68,6 @@ impl ClientContext { - } - } - --#[cfg(target_os = "linux")] --fn promote_thread(rpc: &rpc::ClientProxy) { -- match get_current_thread_info() { -- Ok(info) => { -- let bytes = info.serialize(); -- // Don't wait for the response, this is on the callback thread, which must not block. -- rpc.call(ServerMessage::PromoteThreadToRealTime(bytes)); -- } -- Err(_) => { -- warn!("Could not remotely promote thread to RT."); -- } -- } --} -- --#[cfg(not(target_os = "linux"))] --fn promote_thread(_rpc: &rpc::ClientProxy) { -- match promote_current_thread_to_real_time(0, 48000) { -- Ok(_) => { -- info!("Audio thread promoted to real-time."); -- } -- Err(_) => { -- warn!("Could not promote thread to real-time."); -- } -- } --} - - fn register_thread(callback: Option) { - if let Some(func) = callback { -@@ -116,7 +87,6 @@ fn promote_and_register_thread( - rpc: &rpc::ClientProxy, - callback: Option, - ) { -- promote_thread(rpc); - register_thread(callback); - } - -diff --git a/media/audioipc/server/Cargo.toml b/media/audioipc/server/Cargo.toml -index 99afe54939..99a3440d33 100644 ---- a/media/audioipc/server/Cargo.toml -+++ b/media/audioipc/server/Cargo.toml -@@ -9,7 +9,6 @@ description = "Remote cubeb server" - edition = "2018" - - [dependencies] --audio_thread_priority = "0.22" - audioipc = { path = "../audioipc" } - cubeb-core = "0.7.0" - futures = "0.1.29" -diff --git a/media/audioipc/server/src/lib.rs b/media/audioipc/server/src/lib.rs -index 4d49c8fc08..3c44ee3def 100644 ---- a/media/audioipc/server/src/lib.rs -+++ b/media/audioipc/server/src/lib.rs -@@ -9,7 +9,6 @@ extern crate error_chain; - #[macro_use] - extern crate log; - --use audio_thread_priority::promote_current_thread_to_real_time; - use audioipc::core; - use audioipc::platformhandle_passing::framed_with_platformhandles; - use audioipc::rpc; -@@ -64,12 +63,6 @@ fn run() -> Result { - let callback_thread = core::spawn_thread( - "AudioIPC Callback RPC", - || { -- match promote_current_thread_to_real_time(0, 48000) { -- Ok(_) => {} -- Err(_) => { -- debug!("Failed to promote audio callback thread to real-time."); -- } -- } - trace!("Starting up cubeb audio callback event loop thread..."); - Ok(()) - }, -diff --git a/media/audioipc/server/src/server.rs b/media/audioipc/server/src/server.rs -index f07432f71f..b90e9d9be7 100644 ---- a/media/audioipc/server/src/server.rs -+++ b/media/audioipc/server/src/server.rs -@@ -3,8 +3,6 @@ - // This program is made available under an ISC-style license. See the - // accompanying file LICENSE for details - --#[cfg(target_os = "linux")] --use audio_thread_priority::{promote_thread_to_real_time, RtPriorityThreadInfo}; - use audioipc; - use audioipc::codec::LengthDelimitedCodec; - use audioipc::frame::{framed, Framed}; -@@ -636,19 +634,6 @@ impl CubebServer { - ) - .unwrap_or_else(error), - -- #[cfg(target_os = "linux")] -- ServerMessage::PromoteThreadToRealTime(thread_info) => { -- let info = RtPriorityThreadInfo::deserialize(thread_info); -- match promote_thread_to_real_time(info, 0, 48000) { -- Ok(_) => { -- info!("Promotion of content process thread to real-time OK"); -- } -- Err(_) => { -- warn!("Promotion of content process thread to real-time error"); -- } -- } -- ClientMessage::ThreadPromoted -- } - }; - - trace!("process_msg: req={:?}, resp={:?}", msg, resp); -diff --git a/toolkit/library/rust/shared/Cargo.toml b/toolkit/library/rust/shared/Cargo.toml -index 5fdb0eb2c0..d9bc0346cb 100644 ---- a/toolkit/library/rust/shared/Cargo.toml -+++ b/toolkit/library/rust/shared/Cargo.toml -@@ -41,7 +41,6 @@ storage = { path = "../../../../storage/rust" } - bookmark_sync = { path = "../../../components/places/bookmark_sync", optional = true } - shift_or_euc_c = "0.1.0" - chardetng_c = "0.1.1" --audio_thread_priority = "0.22.1" - mdns_service = { path="../../../../media/mtransport/mdns_service", optional = true } - neqo_glue = { path = "../../../../netwerk/socket/neqo_glue" } - rlbox_lucet_sandbox = { version = "0.1.0", optional = true } -diff --git a/toolkit/library/rust/shared/lib.rs b/toolkit/library/rust/shared/lib.rs -index 3285383a11..d228bc9bad 100644 ---- a/toolkit/library/rust/shared/lib.rs -+++ b/toolkit/library/rust/shared/lib.rs -@@ -51,7 +51,6 @@ extern crate xpcom; - #[cfg(feature = "new_xulstore")] - extern crate xulstore; - --extern crate audio_thread_priority; - - #[cfg(not(target_os = "android"))] - extern crate webext_storage_bridge; diff --git a/extra/firefox-esr/patches/no-gtk2.patch b/extra/firefox-esr/patches/no-gtk2.patch deleted file mode 100644 index db35caea..00000000 --- a/extra/firefox-esr/patches/no-gtk2.patch +++ /dev/null @@ -1,1508 +0,0 @@ -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 - ---- -diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in -index 75c79a7168..ee9cd18fe8 100644 ---- a/browser/installer/package-manifest.in -+++ b/browser/installer/package-manifest.in -@@ -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 -diff --git a/dom/moz.build b/dom/moz.build -index d34d8a7f75..4e5648089b 100644 ---- a/dom/moz.build -+++ b/dom/moz.build -@@ -119,7 +119,7 @@ TEST_DIRS += [ - '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' -diff --git a/dom/plugins/base/npapi.h b/dom/plugins/base/npapi.h -index d6b189baef..adc98f975c 100644 ---- a/dom/plugins/base/npapi.h -+++ b/dom/plugins/base/npapi.h -@@ -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 @@ typedef struct _NPAsyncSurface { - /* 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 { - - typedef struct { - int32_t type; --# if defined(MOZ_X11) -+# if 0 - Display* display; - Visual* visual; - Colormap colormap; -@@ -291,7 +291,7 @@ typedef enum { - , - NPDrawingModelSyncWin = 5 - # endif --# if defined(MOZ_X11) -+# if 0 - , - NPDrawingModelSyncX = 6 - # endif -@@ -330,7 +330,7 @@ typedef enum { - * 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 @@ typedef struct _NPWindow { - 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 @@ typedef struct _NPEvent { - 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 RgnHandle NPQDRegion; - 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 @@ extern "C" { - - /* NPP_* functions are provided by the plugin and called by the navigator. */ - --# if defined(XP_UNIX) -+# if 0 - const char* NPP_GetMIMEDescription(void); - # endif - -diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp -index 829db86079..9870c6a487 100644 ---- a/dom/plugins/base/nsNPAPIPlugin.cpp -+++ b/dom/plugins/base/nsNPAPIPlugin.cpp -@@ -55,7 +55,7 @@ - #endif - - // needed for nppdf plugin --#if (MOZ_WIDGET_GTK) -+#if 0 - # include - # include - #endif -@@ -74,7 +74,7 @@ using mozilla::PluginLibrary; - using mozilla::plugins::PluginModuleChromeParent; - using mozilla::plugins::PluginModuleContentParent; - --#ifdef MOZ_X11 -+#if 0 - # include "mozilla/X11Util.h" - #endif - -@@ -1224,9 +1224,9 @@ NPError _getvalue(NPP npp, NPNVariable variable, void* result) { - // 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 @@ NPError _getvalue(NPP npp, NPNVariable variable, void* result) { - 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 @@ NPError _getvalue(NPP npp, NPNVariable variable, void* result) { - } - - case NPNVToolkit: { --#ifdef MOZ_WIDGET_GTK -+#if 0 - *((NPNToolkitType*)result) = NPNVGtk2; - #endif - -@@ -1312,7 +1312,7 @@ NPError _getvalue(NPP npp, NPNVariable variable, void* result) { - } - - case NPNVSupportsXEmbedBool: { --#ifdef MOZ_WIDGET_GTK -+#if 0 - *(NPBool*)result = true; - #else - *(NPBool*)result = false; -@@ -1333,8 +1333,7 @@ NPError _getvalue(NPP npp, NPNVariable variable, void* result) { - } - - 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; -diff --git a/dom/plugins/base/nsNPAPIPluginInstance.cpp b/dom/plugins/base/nsNPAPIPluginInstance.cpp -index c011cd038d..1d5224a45d 100644 ---- a/dom/plugins/base/nsNPAPIPluginInstance.cpp -+++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp -@@ -316,7 +316,7 @@ nsresult nsNPAPIPluginInstance::SetWindow(NPWindow* window) { - // 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 -diff --git a/dom/plugins/base/nsNPAPIPluginInstance.h b/dom/plugins/base/nsNPAPIPluginInstance.h -index 1ca2569ae8..2977f96902 100644 ---- a/dom/plugins/base/nsNPAPIPluginInstance.h -+++ b/dom/plugins/base/nsNPAPIPluginInstance.h -@@ -38,7 +38,7 @@ class Element; - - #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 -diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp -index 8edea3aa14..66dd9a1973 100644 ---- a/dom/plugins/base/nsPluginHost.cpp -+++ b/dom/plugins/base/nsPluginHost.cpp -@@ -85,7 +85,7 @@ - # include "windows.h" - # include "winbase.h" - #endif --#if (MOZ_WIDGET_GTK) -+#if 0 - # include - # include - #endif -@@ -278,7 +278,7 @@ nsPluginHost::nsPluginHost() - } - - bool waylandBackend = false; --#if MOZ_WIDGET_GTK -+#if 0 - GdkDisplay* display = gdk_display_get_default(); - if (display) { - waylandBackend = !GDK_IS_X11_DISPLAY(display); -diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp -index 23053888d4..0e6376e758 100644 ---- a/dom/plugins/base/nsPluginInstanceOwner.cpp -+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp -@@ -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 */ -@@ -75,7 +75,7 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID); - # include "ComplexTextInputPanel.h" - #endif - --#ifdef MOZ_WIDGET_GTK -+#if 0 - # include - # include - #endif -@@ -621,7 +621,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void* value) { - } - - return NS_OK; --#elif defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) -+#elif 0 - // X11 window managers want the toplevel window for WM_TRANSIENT_FOR. - nsIWidget* win = mPluginFrame->GetNearestWidget(); - if (!win) return NS_ERROR_FAILURE; -@@ -1743,7 +1743,7 @@ nsresult nsPluginInstanceOwner::HandleEvent(Event* aEvent) { - return NS_OK; - } - --#ifdef MOZ_X11 -+#if 0 - static unsigned int XInputEventState(const WidgetInputEvent& anEvent) { - unsigned int state = 0; - if (anEvent.IsShift()) state |= ShiftMask; -@@ -2224,7 +2224,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent( - } - #endif - --#ifdef MOZ_X11 -+#if 0 - // this code supports windowless plugins - nsIWidget* widget = anEvent.mWidget; - XEvent pluginEvent = XEvent(); -@@ -2255,7 +2255,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent( - if (widget) { - rootPoint = anEvent.mRefPoint + widget->WidgetToScreenOffset(); - } --# ifdef MOZ_WIDGET_GTK -+# if 0 - Window root = GDK_ROOT_WINDOW(); - # else - Window root = X11None; // Could XQueryTree, but this is not important. -@@ -2333,7 +2333,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent( - case eKeyboardEventClass: - if (anEvent.mPluginEvent) { - XKeyEvent& event = pluginEvent.xkey; --# ifdef MOZ_WIDGET_GTK -+# if 0 - event.root = GDK_ROOT_WINDOW(); - event.time = anEvent.mTime; - const GdkEventKey* gdkEvent = -@@ -2517,7 +2517,7 @@ void nsPluginInstanceOwner::Paint(const RECT& aDirty, HDC aDC) { - } - #endif - --#if defined(MOZ_X11) -+#if 0 - void nsPluginInstanceOwner::Paint(gfxContext* aContext, - const gfxRect& aFrameRect, - const gfxRect& aDirtyRect) { -@@ -2651,7 +2651,7 @@ nsresult nsPluginInstanceOwner::Renderer::DrawWithXlib( - - 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; -@@ -2863,7 +2863,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void) { - // 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); -diff --git a/dom/plugins/base/nsPluginInstanceOwner.h b/dom/plugins/base/nsPluginInstanceOwner.h -index fbb87b6113..e5e4b86159 100644 ---- a/dom/plugins/base/nsPluginInstanceOwner.h -+++ b/dom/plugins/base/nsPluginInstanceOwner.h -@@ -31,7 +31,7 @@ class nsPluginDOMContextMenuListener; - class nsPluginFrame; - class nsDisplayListBuilder; - --#if defined(MOZ_X11) -+#if 0 - class gfxContext; - #endif - -@@ -48,7 +48,7 @@ class PuppetWidget; - - using mozilla::widget::PuppetWidget; - --#ifdef MOZ_X11 -+#if 0 - # include "gfxXlibNativeRenderer.h" - #endif - -@@ -112,7 +112,7 @@ class nsPluginInstanceOwner final : public nsIPluginInstanceOwner, - 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 @@ class nsPluginInstanceOwner final : public nsIPluginInstanceOwner, - return ""; - } - --#ifdef MOZ_X11 -+#if 0 - void GetPluginDescription(nsACString& aDescription) { - aDescription.Truncate(); - if (mInstance && mPluginHost) { -@@ -214,7 +214,7 @@ class nsPluginInstanceOwner final : public nsIPluginInstanceOwner, - 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 @@ class nsPluginInstanceOwner final : public nsIPluginInstanceOwner, - 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 @@ class nsPluginInstanceOwner final : public nsIPluginInstanceOwner, - - int mLastMouseDownButtonType; - --#ifdef MOZ_X11 -+#if 0 - class Renderer : public gfxXlibNativeRenderer { - public: - Renderer(NPWindow* aWindow, nsPluginInstanceOwner* aInstanceOwner, -diff --git a/dom/plugins/base/nsPluginNativeWindow.cpp b/dom/plugins/base/nsPluginNativeWindow.cpp -index 6aea8d28fc..f4f2ac36b7 100644 ---- a/dom/plugins/base/nsPluginNativeWindow.cpp -+++ b/dom/plugins/base/nsPluginNativeWindow.cpp -@@ -17,7 +17,7 @@ class nsPluginNativeWindowImpl : public nsPluginNativeWindow { - nsPluginNativeWindowImpl(); - virtual ~nsPluginNativeWindowImpl(); - --#ifdef MOZ_WIDGET_GTK -+#if 0 - NPSetWindowCallbackStruct mWsInfo; - #endif - }; -@@ -32,14 +32,14 @@ nsPluginNativeWindowImpl::nsPluginNativeWindowImpl() : nsPluginNativeWindow() { - memset(&clipRect, 0, sizeof(clipRect)); - type = NPWindowTypeWindow; - --#ifdef MOZ_WIDGET_GTK -+#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 - } -diff --git a/dom/plugins/ipc/NPEventUnix.h b/dom/plugins/ipc/NPEventUnix.h -index 55494b4d8c..822d3b88e3 100644 ---- a/dom/plugins/ipc/NPEventUnix.h -+++ b/dom/plugins/ipc/NPEventUnix.h -@@ -9,7 +9,7 @@ - - #include "npapi.h" - --#ifdef MOZ_X11 -+#if 0 - # include "mozilla/X11Util.h" - #endif - -@@ -59,7 +59,7 @@ struct ParamTraits // synonym for XEvent - return false; - } - --#ifdef MOZ_X11 -+#if 0 - SetXDisplay(aResult->event); - #endif - return true; -@@ -70,7 +70,7 @@ struct ParamTraits // synonym for XEvent - aLog->append(L"(XEvent)"); - } - --#ifdef MOZ_X11 -+#if 0 - private: - static void SetXDisplay(XEvent& ev) { - Display* display = mozilla::DefaultXDisplay(); -diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp -index 9d6c04dced..b163c4c548 100644 ---- a/dom/plugins/ipc/PluginInstanceChild.cpp -+++ b/dom/plugins/ipc/PluginInstanceChild.cpp -@@ -15,7 +15,7 @@ - #include "gfx2DGlue.h" - #include "nsNPAPIPluginInstance.h" - #include "mozilla/gfx/2D.h" --#ifdef MOZ_X11 -+#if 0 - # include "gfxXlibSurface.h" - #endif - #ifdef XP_WIN -@@ -44,7 +44,7 @@ using namespace mozilla::layers; - using namespace mozilla::gfx; - using namespace mozilla::widget; - --#ifdef MOZ_WIDGET_GTK -+#if 0 - - # include - # include -@@ -188,10 +188,10 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface, - 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 @@ NPError PluginInstanceChild::NPN_GetValue(NPNVariable aVar, void* aValue) { - AutoStackHelper guard(this); - - switch (aVar) { --#if defined(MOZ_X11) -+#if 0 - case NPNVToolkit: - *((NPNToolkitType*)aValue) = NPNVGtk2; - return NPERR_NO_ERROR; -@@ -428,7 +428,7 @@ NPError PluginInstanceChild::NPN_GetValue(NPNVariable aVar, void* aValue) { - *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 @@ mozilla::ipc::IPCResult PluginInstanceChild::AnswerNPP_HandleEvent( - 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 @@ mozilla::ipc::IPCResult PluginInstanceChild::AnswerNPP_HandleEvent( - } - #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 @@ mozilla::ipc::IPCResult PluginInstanceChild::AnswerNPP_SetWindow( - 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 @@ mozilla::ipc::IPCResult PluginInstanceChild::AnswerNPP_SetWindow( - #elif defined(MOZ_WIDGET_UIKIT) - // Don't care - #else --# error Implement me for your OS -+//# error Implement me for your OS - #endif - - return IPC_OK(); - } - - bool PluginInstanceChild::Initialize() { --#ifdef MOZ_WIDGET_GTK -+#if 0 - if (mWsInfo.display) { - // Already initialized - return true; -@@ -2870,7 +2870,7 @@ bool PluginInstanceChild::CreateOptSurface(void) { - ? 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 @@ bool PluginInstanceChild::MaybeCreatePlatformHelperSurface(void) { - return false; - } - --#ifdef MOZ_X11 -+#if 0 - bool supportNonDefaultVisual = false; - Screen* screen = DefaultScreenOfDisplay(mWsInfo.display); - Visual* defaultVisual = DefaultVisualOfScreen(screen); -@@ -3078,12 +3078,12 @@ bool PluginInstanceChild::EnsureCurrentBuffer(void) { - } - - 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 @@ void PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect, - // 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 @@ void PluginInstanceChild::PaintRectToSurface(const nsIntRect& aRect, - // 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 @@ bool PluginInstanceChild::ShowPluginFrame() { - 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 @@ bool PluginInstanceChild::ReadbackDifferenceRect(const nsIntRect& rect) { - - // 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 @@ bool PluginInstanceChild::ReadbackDifferenceRect(const nsIntRect& rect) { - 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 @@ mozilla::ipc::IPCResult PluginInstanceChild::RecvUpdateBackground( - if (!mBackground) { - // XXX refactor me - switch (aBackground.type()) { --#ifdef MOZ_X11 -+#if 0 - case SurfaceDescriptor::TSurfaceDescriptorX11: { - mBackground = aBackground.get_SurfaceDescriptorX11().OpenForeign(); - break; -diff --git a/dom/plugins/ipc/PluginInstanceChild.h b/dom/plugins/ipc/PluginInstanceChild.h -index 479c060f91..a00c1229aa 100644 ---- a/dom/plugins/ipc/PluginInstanceChild.h -+++ b/dom/plugins/ipc/PluginInstanceChild.h -@@ -363,7 +363,7 @@ class PluginInstanceChild : public PPluginInstanceChild { - PluginScriptableObjectChild* mCachedWindowActor; - PluginScriptableObjectChild* mCachedElementActor; - --#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) -+#if 0 - NPSetWindowCallbackStruct mWsInfo; - #elif defined(OS_WIN) - HWND mPluginWindowHWND; -diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp -index 802bba769a..a11b7497e3 100644 ---- a/dom/plugins/ipc/PluginInstanceParent.cpp -+++ b/dom/plugins/ipc/PluginInstanceParent.cpp -@@ -25,7 +25,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 @@ void PluginInstanceParent::ActorDestroy(ActorDestroyReason why) { - if (mImageContainer) { - mImageContainer->ClearAllImages(); - } --#ifdef MOZ_X11 -+#if 0 - FinishX(DefaultXDisplay()); - #endif - } -@@ -227,7 +227,7 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVnetscapeWindow( - #ifdef XP_WIN - HWND id; - #elif defined(MOZ_X11) -- XID id; -+ int id; - #elif defined(XP_DARWIN) - intptr_t id; - #elif defined(ANDROID) -@@ -405,7 +405,7 @@ PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginDrawingModel( - case NPDrawingModelAsyncWindowsDXGISurface: - allowed = SupportsPluginDirectDXGISurfaceDrawing(); - break; --#elif defined(MOZ_X11) -+#elif 0 - case NPDrawingModelSyncX: - allowed = true; - break; -@@ -968,7 +968,7 @@ mozilla::ipc::IPCResult PluginInstanceParent::RecvShow( - return IPC_OK(); - } - #endif --#ifdef MOZ_X11 -+#if 0 - else if (newSurface.type() == SurfaceDescriptor::TSurfaceDescriptorX11) { - surface = newSurface.get_SurfaceDescriptorX11().OpenForeign(); - } -@@ -985,7 +985,7 @@ mozilla::ipc::IPCResult PluginInstanceParent::RecvShow( - // 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 @@ nsresult PluginInstanceParent::EndUpdateBackground(const nsIntRect& aRect) { - ("[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 @@ bool PluginInstanceParent::CreateBackground(const nsIntSize& aSize) { - - // XXX refactor me - --#if defined(MOZ_X11) -+#if 0 - Screen* screen = DefaultScreenOfDisplay(DefaultXDisplay()); - Visual* visual = DefaultVisualOfScreen(screen); - mBackground = gfxXlibSurface::Create( -@@ -1310,7 +1310,7 @@ PluginInstanceParent::BackgroundDescriptor() { - - // XXX refactor me - --#ifdef MOZ_X11 -+#if 0 - gfxXlibSurface* xsurf = static_cast(mBackground.get()); - return SurfaceDescriptorX11(xsurf); - #endif -@@ -1427,7 +1427,7 @@ NPError PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow) { - } - #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 @@ int16_t PluginInstanceParent::NPP_HandleEvent(void* event) { - } - #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 @@ int16_t PluginInstanceParent::NPP_HandleEvent(void* event) { - // 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. - // -diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp -index e77d3721f5..0ddcc98330 100644 ---- a/dom/plugins/ipc/PluginMessageUtils.cpp -+++ b/dom/plugins/ipc/PluginMessageUtils.cpp -@@ -50,7 +50,7 @@ NPRemoteWindow::NPRemoteWindow() - width(0), - height(0), - type(NPWindowTypeDrawable) --#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) -+#if 0 - , - visualID(0), - colormap(0) -@@ -82,7 +82,7 @@ ipc::RacyInterruptPolicy MediateRace(const MessageChannel::MessageInfo& parent, - } - } - --#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; -@@ -98,7 +98,7 @@ static string ReplaceAll(const string& haystack, const string& needle, - #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 -@@ -107,7 +107,7 @@ string MungePluginDsoPath(const string& path) { - } - - 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; -diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h -index 87747b115b..0d33a9a5af 100644 ---- a/dom/plugins/ipc/PluginMessageUtils.h -+++ b/dom/plugins/ipc/PluginMessageUtils.h -@@ -87,7 +87,7 @@ struct NPRemoteWindow { - 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 */ -@@ -113,9 +113,9 @@ struct NPAudioDeviceStateChangedIPC { - - #ifdef XP_WIN - typedef HWND NativeWindowHandle; --#elif defined(MOZ_X11) -+#elif 0 - typedef XID NativeWindowHandle; --#elif defined(XP_DARWIN) || defined(ANDROID) -+#elif defined(XP_DARWIN) || defined(ANDROID) || 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 @@ struct ParamTraits { - 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 @@ struct ParamTraits { - 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 @@ struct ParamTraits { - 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 -diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp -index 5811141417..750c526f70 100644 ---- a/dom/plugins/ipc/PluginModuleChild.cpp -+++ b/dom/plugins/ipc/PluginModuleChild.cpp -@@ -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 @@ PluginModuleChild::PluginModuleChild(bool aIsChrome) - #if defined(OS_WIN) || defined(OS_MACOSX) - , - mGetEntryPointsFunc(0) --#elif defined(MOZ_WIDGET_GTK) -+#elif 0 - , - mNestedLoopTimerId(0) - #endif -@@ -254,7 +254,7 @@ bool PluginModuleChild::InitForChrome(const std::string& aPluginFilename, - // XXX quirks isn't initialized yet - mAsyncRenderSupport = info.fSupportsAsyncRender; - #endif --#if defined(MOZ_X11) -+#if 0 - NS_NAMED_LITERAL_CSTRING(flash10Head, "Shockwave Flash 10."); - if (StringBeginsWith(nsDependentCString(info.fDescription), flash10Head)) { - AddQuirk(QUIRK_FLASH_EXPOSE_COORD_TRANSLATION); -@@ -267,7 +267,7 @@ bool PluginModuleChild::InitForChrome(const std::string& aPluginFilename, - 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 @@ bool PluginModuleChild::InitForChrome(const std::string& aPluginFilename, - return true; - } - --#if defined(MOZ_WIDGET_GTK) -+#if 0 - - typedef void (*GObjectDisposeFn)(GObject*); - typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*); -@@ -550,7 +550,7 @@ bool PluginModuleChild::ShouldContinueFromReplyTimeout() { - } - - 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 @@ bool PluginModuleChild::InitGraphics() { - #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 @@ bool PluginModuleChild::InitGraphics() { - } - - 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. -@@ -1000,7 +1000,7 @@ NPError _getvalue(NPP aNPP, NPNVariable aVariable, void* aValue) { - switch (aVariable) { - // Copied from nsNPAPIPlugin.cpp - case NPNVToolkit: --#if defined(MOZ_WIDGET_GTK) -+#if 0 - *static_cast(aValue) = NPNVGtk2; - return NPERR_NO_ERROR; - #endif -@@ -1026,7 +1026,7 @@ NPError _getvalue(NPP aNPP, NPNVariable aVariable, void* aValue) { - 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; -@@ -1556,8 +1556,8 @@ NPError PluginModuleChild::DoNP_Initialize(const PluginSettings& aSettings) { - 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; -diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp -index c495097caf..085545376f 100644 ---- a/dom/plugins/ipc/PluginModuleParent.cpp -+++ b/dom/plugins/ipc/PluginModuleParent.cpp -@@ -50,7 +50,7 @@ - # include "PluginUtilsWin.h" - #endif - --#ifdef MOZ_WIDGET_GTK -+#if 0 - # include - #elif XP_MACOSX - # include "PluginInterposeOSX.h" -@@ -1591,7 +1591,7 @@ mozilla::ipc::IPCResult PluginModuleChromeParent:: - - 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??"); -@@ -1777,7 +1777,7 @@ void PluginModuleChromeParent::CachedSettingChanged(const char* aPref, - module->CachedSettingChanged(); - } - --#if defined(XP_UNIX) && !defined(XP_MACOSX) -+#if 0 - nsresult PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, - NPPluginFuncs* pFuncs, - NPError* error) { -@@ -1832,6 +1832,22 @@ nsresult PluginModuleChromeParent::NP_Initialize(NPNetscapeFuncs* bFuncs, - - 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 - -@@ -2035,7 +2051,7 @@ class nsCaseInsensitiveUTF8StringArrayComparator { - } - }; - --#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) -+#if defined(XP_WIN) - static void ForceWindowless(nsTArray& names, - nsTArray& values) { - nsCaseInsensitiveUTF8StringArrayComparator comparator; -@@ -2118,7 +2134,7 @@ nsresult PluginModuleParent::NPP_NewInternal( - # endif - ForceWindowless(names, values); - } --#elif defined(MOZ_WIDGET_GTK) -+#elif 0 - // We no longer support windowed mode on Linux. - ForceWindowless(names, values); - #endif -@@ -2232,7 +2248,7 @@ mozilla::ipc::IPCResult PluginModuleParent::AnswerProcessSomeEvents() { - return IPC_OK(); - } - --#elif !defined(MOZ_WIDGET_GTK) -+#elif 1 - mozilla::ipc::IPCResult PluginModuleParent::AnswerProcessSomeEvents() { - MOZ_CRASH("unreached"); - } -diff --git a/dom/plugins/ipc/PluginModuleParent.h b/dom/plugins/ipc/PluginModuleParent.h -index 9fd74904a2..b77279b7f5 100644 ---- a/dom/plugins/ipc/PluginModuleParent.h -+++ b/dom/plugins/ipc/PluginModuleParent.h -@@ -288,7 +288,7 @@ class PluginModuleParent : public PPluginModuleParent, - 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; -diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build -index 49f1e27670..e97c75d72a 100644 ---- a/dom/plugins/ipc/moz.build -+++ b/dom/plugins/ipc/moz.build -@@ -142,9 +142,6 @@ DEFINES['FORCE_PR_LOG'] = True - - 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'] - -diff --git a/dom/plugins/test/moz.build b/dom/plugins/test/moz.build -index 032db35387..dde5c1c31b 100644 ---- a/dom/plugins/test/moz.build -+++ b/dom/plugins/test/moz.build -@@ -8,7 +8,7 @@ DIRS += ['testplugin'] - - 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'] -diff --git a/dom/plugins/test/testplugin/nptest.cpp b/dom/plugins/test/testplugin/nptest.cpp -index 2a9d20cdca..02b39a27cf 100644 ---- a/dom/plugins/test/testplugin/nptest.cpp -+++ b/dom/plugins/test/testplugin/nptest.cpp -@@ -2692,7 +2692,7 @@ bool stallPlugin(NPObject* npobj, const NPVariant* args, uint32_t argCount, - 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; -diff --git a/dom/plugins/test/testplugin/testplugin.mozbuild b/dom/plugins/test/testplugin/testplugin.mozbuild -index 2c466409ea..ad87356e15 100644 ---- a/dom/plugins/test/testplugin/testplugin.mozbuild -+++ b/dom/plugins/test/testplugin/testplugin.mozbuild -@@ -18,11 +18,6 @@ if toolkit == 'cocoa': - 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'] == 'windows': - 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] -diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp -index 3df2834ee1..3b6d0e42a0 100644 ---- a/gfx/gl/GLContextProviderGLX.cpp -+++ b/gfx/gl/GLContextProviderGLX.cpp -@@ -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 - -diff --git a/gfx/gl/GLContextProviderWayland.cpp b/gfx/gl/GLContextProviderWayland.cpp -index c4c10bb4ff..70a4fde591 100644 ---- a/gfx/gl/GLContextProviderWayland.cpp -+++ b/gfx/gl/GLContextProviderWayland.cpp -@@ -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 -@@ -20,64 +20,38 @@ static class GLContextProviderEGL sGLContextProviderEGL; - - already_AddRefed GLContextProviderWayland::CreateWrappingExisting( - void* aContext, void* aSurface) { -- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { -- return sGLContextProviderGLX.CreateWrappingExisting(aContext, aSurface); -- } else { - return sGLContextProviderEGL.CreateWrappingExisting(aContext, aSurface); -- } - } - - already_AddRefed GLContextProviderWayland::CreateForCompositorWidget( - CompositorWidget* aCompositorWidget, bool aWebRender, - bool aForceAccelerated) { -- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { -- return sGLContextProviderGLX.CreateForCompositorWidget( -- aCompositorWidget, aWebRender, aForceAccelerated); -- } else { - return sGLContextProviderEGL.CreateForCompositorWidget( - aCompositorWidget, aWebRender, aForceAccelerated); -- } - } - - /*static*/ - already_AddRefed GLContextProviderWayland::CreateHeadless( - CreateContextFlags flags, nsACString* const out_failureId) { -- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { -- return sGLContextProviderGLX.CreateHeadless(flags, out_failureId); -- } else { - return sGLContextProviderEGL.CreateHeadless(flags, out_failureId); -- } - } - - /*static*/ - already_AddRefed GLContextProviderWayland::CreateOffscreen( - const IntSize& size, const SurfaceCaps& minCaps, CreateContextFlags flags, - nsACString* const out_failureId) { -- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { -- return sGLContextProviderGLX.CreateOffscreen(size, minCaps, flags, -- out_failureId); -- } else { - return sGLContextProviderEGL.CreateOffscreen(size, minCaps, flags, - out_failureId); -- } - } - - /*static*/ - GLContext* GLContextProviderWayland::GetGlobalContext() { -- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { -- return sGLContextProviderGLX.GetGlobalContext(); -- } else { - return sGLContextProviderEGL.GetGlobalContext(); -- } - } - - /*static*/ - void GLContextProviderWayland::Shutdown() { -- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { -- sGLContextProviderGLX.Shutdown(); -- } else { - sGLContextProviderEGL.Shutdown(); -- } - } - - } // namespace mozilla::gl -diff --git a/gfx/thebes/gfxGdkNativeRenderer.cpp b/gfx/thebes/gfxGdkNativeRenderer.cpp -index 49f3afdb59..95760b16e4 100644 ---- a/gfx/thebes/gfxGdkNativeRenderer.cpp -+++ b/gfx/thebes/gfxGdkNativeRenderer.cpp -@@ -7,7 +7,7 @@ - #include "gfxContext.h" - #include "gfxPlatformGtk.h" - --#ifdef MOZ_X11 -+#if 0 - # include - # include "cairo-xlib.h" - # include "gfxXlibSurface.h" -diff --git a/gfx/thebes/gfxGdkNativeRenderer.h b/gfx/thebes/gfxGdkNativeRenderer.h -index e11a3ba5d1..1cfaf8c79e 100644 ---- a/gfx/thebes/gfxGdkNativeRenderer.h -+++ b/gfx/thebes/gfxGdkNativeRenderer.h -@@ -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 - -diff --git a/media/webrtc/trunk/peerconnection_client.target.mk b/media/webrtc/trunk/peerconnection_client.target.mk -index 3c4320a180..3195e5d025 100644 ---- a/media/webrtc/trunk/peerconnection_client.target.mk -+++ b/media/webrtc/trunk/peerconnection_client.target.mk -@@ -59,8 +59,6 @@ CFLAGS_Debug := \ - -pipe \ - -fPIC \ - -pthread \ -- -I/usr/include/gtk-2.0 \ -- -I/usr/lib64/gtk-2.0/include \ - -I/usr/include/atk-1.0 \ - -I/usr/include/cairo \ - -I/usr/include/gdk-pixbuf-2.0 \ -@@ -149,8 +147,6 @@ CFLAGS_Release := \ - -pipe \ - -fPIC \ - -pthread \ -- -I/usr/include/gtk-2.0 \ -- -I/usr/lib64/gtk-2.0/include \ - -I/usr/include/atk-1.0 \ - -I/usr/include/cairo \ - -I/usr/include/gdk-pixbuf-2.0 \ -@@ -241,8 +237,6 @@ LDFLAGS_Release := \ - - LIBS := \ - \ -- -lgtk-x11-2.0 \ -- -lgdk-x11-2.0 \ - -latk-1.0 \ - -lgio-2.0 \ - -lpangoft2-1.0 \ -diff --git a/old-configure b/old-configure -index d37324e996..70a5985645 100644 ---- a/old-configure -+++ b/old-configure -@@ -762,7 +762,6 @@ GLIB_VERSION=2.22 - # The macro won't be used when compiling with earlier versions anyway. - GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 - CAIRO_VERSION=1.10 --GTK2_VERSION=2.18.0 - GTK3_VERSION=3.4.0 - GDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 - W32API_VERSION=3.14 -@@ -7911,79 +7910,6 @@ EOF - - GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 - fi -- if test "$MOZ_ENABLE_GTK"; then -- if test "$MOZ_X11"; then -- GDK_PACKAGES=gdk-x11-2.0 -- fi -- cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 $GDK_PACKAGES""... $ac_c" 1>&6 --echo "configure:7945: checking for gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 $GDK_PACKAGES" >&5 -- -- if $PKG_CONFIG --exists "gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 $GDK_PACKAGES" ; then -- echo "$ac_t""yes" 1>&6 -- succeeded=yes -- -- echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6 --echo "configure:7952: checking MOZ_GTK2_CFLAGS" >&5 -- MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 $GDK_PACKAGES"` -- echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6 -- -- echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6 --echo "configure:7957: checking MOZ_GTK2_LIBS" >&5 -- ## Remove evil flags like -Wl,--export-dynamic -- MOZ_GTK2_LIBS="`$PKG_CONFIG --libs \"gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 $GDK_PACKAGES\" |sed s/-Wl,--export-dynamic//g`" -- echo "$ac_t""$MOZ_GTK2_LIBS" 1>&6 -- else -- MOZ_GTK2_CFLAGS="" -- MOZ_GTK2_LIBS="" -- ## If we have a custom action on failure, don't print errors, but -- ## do set a variable so people can do so. -- MOZ_GTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 $GDK_PACKAGES"` -- echo $MOZ_GTK2_PKG_ERRORS -- fi -- -- -- -- else -- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." -- echo "*** See http://www.freedesktop.org/software/pkgconfig" -- fi -- fi -- -- if test $succeeded = yes; then -- : -- else -- if test "$COMPILE_ENVIRONMENT"; then -- { echo "configure: error: Library requirements (gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 $GDK_PACKAGES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 $GDK_PACKAGES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; } -- fi -- fi -- -- MOZ_GTK2_CFLAGS="-I${_topsrcdir}/widget/gtk/compat $MOZ_GTK2_CFLAGS" -- fi - fi # COMPILE_ENVIRONMENT - - -@@ -10818,8 +10744,6 @@ sed 's/$/,/' >> $CONFIG_STATUS < -+//#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 -diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h -index 84df35e5d8..4f5562ada3 100644 ---- a/dom/plugins/ipc/PluginModuleChild.h -+++ b/dom/plugins/ipc/PluginModuleChild.h -@@ -206,7 +206,7 @@ class PluginModuleChild : public PPluginModuleChild { - bool InitGraphics(); - void DeinitGraphics(); - --#if defined(MOZ_WIDGET_GTK) -+#if 0 - static gboolean DetectNestedEventLoop(gpointer data); - static gboolean ProcessBrowserEvents(gpointer data); - -@@ -238,7 +238,7 @@ class PluginModuleChild : public PPluginModuleChild { - - 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 diff --git a/extra/firefox-esr/sources b/extra/firefox-esr/sources deleted file mode 100644 index 5ef5eeb2..00000000 --- a/extra/firefox-esr/sources +++ /dev/null @@ -1,10 +0,0 @@ -https://ftp.mozilla.org/pub/firefox/releases/78.5.0esr/source/firefox-78.5.0esr.source.tar.xz -https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz autoconf2.13/ -https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz yasm/ -patches/no-dbus.patch -patches/no-gtk2.patch - -# Temporary crate updates to fix issues with Rust 1.47.0. -# See the build file for more information. -https://static.crates.io/crates/syn/syn-1.0.40.crate third_party/rust -https://static.crates.io/crates/proc-macro2/proc-macro2-1.0.20.crate third_party/rust diff --git a/extra/firefox-esr/version b/extra/firefox-esr/version deleted file mode 100644 index cc62a33e..00000000 --- a/extra/firefox-esr/version +++ /dev/null @@ -1 +0,0 @@ -78.5.0esr 1 diff --git a/xorg/libxkbcommon/build b/extra/libxkbcommon/build similarity index 100% rename from xorg/libxkbcommon/build rename to extra/libxkbcommon/build diff --git a/xorg/libxkbcommon/checksums b/extra/libxkbcommon/checksums similarity index 100% rename from xorg/libxkbcommon/checksums rename to extra/libxkbcommon/checksums diff --git a/xorg/libxkbcommon/depends b/extra/libxkbcommon/depends similarity index 100% rename from xorg/libxkbcommon/depends rename to extra/libxkbcommon/depends diff --git a/xorg/libxkbcommon/sources b/extra/libxkbcommon/sources similarity index 100% rename from xorg/libxkbcommon/sources rename to extra/libxkbcommon/sources diff --git a/xorg/libxkbcommon/version b/extra/libxkbcommon/version similarity index 100% rename from xorg/libxkbcommon/version rename to extra/libxkbcommon/version diff --git a/xorg/pixman/build b/extra/pixman/build similarity index 100% rename from xorg/pixman/build rename to extra/pixman/build diff --git a/xorg/pixman/checksums b/extra/pixman/checksums similarity index 100% rename from xorg/pixman/checksums rename to extra/pixman/checksums diff --git a/xorg/pixman/sources b/extra/pixman/sources similarity index 100% rename from xorg/pixman/sources rename to extra/pixman/sources diff --git a/xorg/pixman/version b/extra/pixman/version similarity index 100% rename from xorg/pixman/version rename to extra/pixman/version