diff --git a/README.md b/README.md new file mode 100644 index 0000000..e041d9a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Portage configuration + +Portage configs for experimental wayland only system diff --git a/env/compiler-gcc6 b/env/compiler-gcc6 new file mode 100644 index 0000000..56536ef --- /dev/null +++ b/env/compiler-gcc6 @@ -0,0 +1,2 @@ +CC=/usr/bin/gcc-6.3.0 +CXX=/usr/bin/g++-6.3.0 diff --git a/env/compiler-nox11 b/env/compiler-nox11 new file mode 100644 index 0000000..cf33add --- /dev/null +++ b/env/compiler-nox11 @@ -0,0 +1,2 @@ +CFLAGS="-O2 -pipe -march=native -DMESA_EGL_NO_X11_HEADERS" +CXXFLAGS="-O2 -pipe -march=native -DMESA_EGL_NO_X11_HEADERS" diff --git a/make.conf b/make.conf new file mode 100644 index 0000000..11d79c5 --- /dev/null +++ b/make.conf @@ -0,0 +1,28 @@ +CFLAGS="-O2 -pipe -march=native" +CXXFLAGS="${CFLAGS}" +CHOST="x86_64-pc-linux-gnu" + +PORTDIR="/usr/portage" +DISTDIR="${PORTDIR}/distfiles" +PKGDIR="${PORTDIR}/packages" + +USE="-gdbm -http2 -opengl -qt4 -sslv3 -vala -xcb -xwayland -X alsa apng berkdb \ + cairo clang conntrack cups curl dbus drm egl fontconfig fpm gif gles \ + gles1 gles2 gstreamer idn introspection jpeg lzma lzo mp3 \ + netlink nettle ogg opencl postgres python png qt5 spell sqlite \ + theora tiff truetype udisks usb vaapi wayland x264 x265 xkb \ + xvid pcre16 pcre32 eglfs libinput qml evdev widgets" +CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" +GRUB_PLATFORMS="efi-64" +GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo" +MAKEOPTS="-j4" + +PYTHON_TARGETS="python3_6" +PYTHON_SINGLE_TARGET="python3_6" +PHP_TARGETS="php7-1" +RUBY_TARGETS="ruby24" +QEMU_USER_TARGETS="x86_64" +VIDEO_CARDS="intel i965" + +L10N="de en fr mn" +LINGUAS="de en fr mn" diff --git a/make.profile b/make.profile new file mode 120000 index 0000000..c51ce8b --- /dev/null +++ b/make.profile @@ -0,0 +1 @@ +../../usr/portage/profiles/default/linux/amd64/13.0/systemd \ No newline at end of file diff --git a/package.accept_keywords b/package.accept_keywords new file mode 100644 index 0000000..964b6a8 --- /dev/null +++ b/package.accept_keywords @@ -0,0 +1,222 @@ +=sys-devel/gcc-6.4.0 ~amd64 +=sys-devel/gcc-7.2.0 ** +sys-kernel/gentoo-sources ~amd64 +sys-kernel/linux-headers ~amd64 +www-plugins/chrome-binary-plugins ~amd64 +=dev-lang/python-3.6.1-r1 ~amd64 + +#=sys-firmware/iwl8000-ucode-16.242414.0 ~amd64 +=dev-libs/wlc-0.0.10 ~amd64 +=dev-libs/sway-0.14.0 ~amd64 + +# php 7 +=dev-lang/php-7.1.9 ~amd64 +=virtual/httpd-php-7.1 ~amd64 + +# ruby 2.4 +=dev-lang/ruby-2.4.2 ~amd64 +=dev-ruby/kpeg-1.1.0 ~amd64 +=dev-ruby/xmlrpc-0.3.0 ~amd64 +=dev-ruby/power_assert-1.0.1-r1 ~amd64 +=dev-ruby/test-unit-3.2.4 ~amd64 +=dev-ruby/did_you_mean-1.1.2 ~amd64 +=dev-ruby/rdoc-5.1.0 ~amd64 +=dev-ruby/minitest-5.10.3 ~amd64 +=dev-ruby/rake-12.0.0 ~amd64 +=dev-ruby/json-2.1.0 ~amd64 +=dev-ruby/net-telnet-0.1.1-r1 ~amd64 +=dev-ruby/racc-1.4.14 ~amd64 +=dev-ruby/rubygems-2.6.12 ~amd64 + +#llvm/clang 5 +=sys-devel/llvm-common-5.0.0 ~amd64 +=sys-libs/compiler-rt-5.0.0 ~amd64 +=sys-devel/clang-5.0.0 ~amd64 +=sys-devel/llvm-5.0.0 ~amd64 +=sys-devel/clang-runtime-5.0.0 ~amd64 +=sys-libs/libomp-5.0.0 ~amd64 +=sys-libs/compiler-rt-sanitizers-5.0.0 ~amd64 + +#python 3.6 +=dev-python/html2text-2016.9.19 ~amd64 +=dev-python/pyxattr-0.6.0 ~amd64 + +#metasploit (bump to ruby24) +=net-analyzer/metasploit-4.14.16 ~amd64 +=app-eselect/eselect-metasploit-0.16 ~amd64 +=app-eselect/eselect-rails-0.23 ~amd64 +=dev-ruby/actionpack-4.2.9 ~amd64 +=dev-ruby/actionview-4.2.9 ~amd64 +=dev-ruby/activemodel-4.2.9 ~amd64 +=dev-ruby/activerecord-4.2.9 ~amd64 +=dev-ruby/activesupport-4.2.9 ~amd64 +=dev-ruby/addressable-2.5.1 ~amd64 +=dev-ruby/arel-6.0.4 ~amd64 +=dev-ruby/arel-8.0.0 ~amd64 +=dev-ruby/arel-helpers-2.4.0 ~amd64 +=dev-ruby/bcrypt-ruby-3.1.11-r1 ~amd64 +=dev-ruby/bindata-2.4.0 ~amd64 +=dev-ruby/bit-struct-0.16 ~amd64 +=dev-ruby/builder-3.2.3 ~amd64 +=dev-ruby/bundler-1.14.6 ~amd64 +=dev-ruby/faraday-0.12.2 ~amd64 +=dev-ruby/filesize-0.1.1 ~amd64 +=dev-ruby/hoe-3.16.0 ~amd64 +=dev-ruby/i18n-0.7.0-r2 ~amd64 +=dev-ruby/jsobfu-0.4.2 ~amd64 +=dev-ruby/kissfft-0.0.2 ~amd64 +=dev-ruby/loofah-2.0.3 ~amd64 +=dev-ruby/metasm-1.0.2-r4 ~amd64 +=dev-ruby/metasploit-concern-2.0.3 ~amd64 +=dev-ruby/metasploit-credential-2.0.8 ~amd64 +=dev-ruby/metasploit-model-2.0.3 ~amd64 +=dev-ruby/metasploit-payloads-1.2.24 ~amd64 +=dev-ruby/metasploit_data_models-2.0.14 ~amd64 +=dev-ruby/metasploit_payloads-mettle-0.1.9 ~amd64 +=dev-ruby/meterpreter_bins-0.0.22 ~amd64 +=dev-ruby/msgpack-1.1.0 ~amd64 +=dev-ruby/multipart-post-2.0.0-r1 ~amd64 +=dev-ruby/mustache-1.0.5 ~amd64 +=dev-ruby/net-ssh-4.1.0 ~amd64 +=dev-ruby/network_interface-0.0.1-r1 ~amd64 +=dev-ruby/nokogiri-1.8.0 ~amd64 +=dev-ruby/octokit-4.7.0 ~amd64 +=dev-ruby/openssl-ccm-1.2.1 ~amd64 +=dev-ruby/packetfu-1.1.13 ~amd64 +=dev-ruby/patch_finder-1.0.2 ~amd64 +=dev-ruby/pcaprub-0.12.4 ~amd64 +=dev-ruby/pg-0.21.0 ~amd64 +=dev-ruby/pg_array_parser-0.0.9-r2 ~amd64 +=dev-ruby/postgres_ext-3.0.0 ~amd64 +=dev-ruby/public_suffix-2.0.5 ~amd64 +=dev-ruby/rack-1.6.7 ~amd64 +=dev-ruby/rails-deprecated_sanitizer-1.0.3-r2 ~amd64 +=dev-ruby/rails-dom-testing-1.0.8-r1 ~amd64 +=dev-ruby/rails-html-sanitizer-1.0.3-r1 ~amd64 +=dev-ruby/railties-4.2.9 ~amd64 +=dev-ruby/rb-readline-0.5.5 ~amd64 +=dev-ruby/rdiscount-2.2.0.1 ~amd64 +=dev-ruby/recog-2.1.6 ~amd64 +=dev-ruby/redcarpet-3.4.0 ~amd64 +=dev-ruby/rex-arch-0.1.4 ~amd64 +=dev-ruby/rex-bin_tools-0.1.2 ~amd64 +=dev-ruby/rex-core-0.1.12 ~amd64 +=dev-ruby/rex-encoder-0.1.4 ~amd64 +=dev-ruby/rex-exploitation-0.1.12 ~amd64 +=dev-ruby/rex-java-0.1.2 ~amd64 +=dev-ruby/rex-mime-0.1.4 ~amd64 +=dev-ruby/rex-nop-0.1.0 ~amd64 +=dev-ruby/rex-ole-0.1.2 ~amd64 +=dev-ruby/rex-powershell-0.1.65 ~amd64 +=dev-ruby/rex-random_identifier-0.1.0-r1 ~amd64 +=dev-ruby/rex-registry-0.1.0-r1 ~amd64 +=dev-ruby/rex-rop_builder-0.1.2 ~amd64 +=dev-ruby/rex-socket-0.1.5 ~amd64 +=dev-ruby/rex-sslscan-0.1.3 ~amd64 +=dev-ruby/rex-struct2-0.1.1 ~amd64 +=dev-ruby/rex-text-0.2.12 ~amd64 +=dev-ruby/rex-zip-0.1.1 ~amd64 +=dev-ruby/rjb-1.5.5 ~amd64 +=dev-ruby/rkelly-remix-0.0.7 ~amd64 +=dev-ruby/robots-0.10.1-r2 ~amd64 +=dev-ruby/ruby_smb-0.0.12 ~amd64 +=dev-ruby/rubyntlm-0.6.2 ~amd64 +=dev-ruby/sawyer-0.8.1 ~amd64 +=dev-ruby/sqlite3-1.3.13 ~amd64 +=dev-ruby/sshkey-1.9.0 ~amd64 +=dev-ruby/thor-0.19.4 ~amd64 +=dev-ruby/thread_safe-0.3.6 ~amd64 +=dev-ruby/tzinfo-1.2.3 ~amd64 +=dev-ruby/windows_error-0.1.2 ~amd64 +=virtual/ruby-ssl-9 ~amd64 + +=dev-qt/qtconcurrent-5.9.2 ~amd64 +=dev-qt/qtwayland-5.9.2 ~amd64 +=dev-qt/qtwidgets-5.9.2 ~amd64 +=dev-qt/qtwebkit-5.9.2 ~amd64 +=dev-qt/qtgui-5.9.2 ~amd64 +=dev-qt/qtscript-5.9.2 ~amd64 +=dev-qt/qtprintsupport-5.9.2 ~amd64 +=dev-qt/qtopengl-5.9.2 ~amd64 +=dev-qt/qtdbus-5.9.2 ~amd64 +=dev-qt/qtxml-5.9.2 ~amd64 +=dev-qt/qttest-5.9.2 ~amd64 +=dev-qt/qtxmlpatterns-5.9.2 ~amd64 +=dev-qt/linguist-tools-5.9.2 ~amd64 +=dev-qt/qtwebchannel-5.9.2 ~amd64 +=dev-qt/qtsvg-5.9.2 ~amd64 +=dev-qt/qtdeclarative-5.9.2 ~amd64 +=dev-qt/qtnetwork-5.9.2 ~amd64 +#=dev-qt/qtwebengine-5.9.2 ~amd64 +=dev-qt/qtmultimedia-5.9.2 ~amd64 +=dev-qt/qtcore-5.9.2 ~amd64 +=dev-qt/qtsql-5.9.2 ~amd64 +=dev-qt/qtpositioning-5.9.2 ~amd64 +=dev-qt/qtwebkit-5.212.0_alpha2 ~amd64 +=dev-python/PyQt5-5.8.2 ~amd64 + +#=dev-libs/ocl-icd-2.2.8 ~amd64 +#=dev-libs/beignet-1.3.1 ~amd64 +=app-crypt/hashcat-3.5.0 ~amd64 +=app-office/libreoffice-5.4.0.3 ~amd64 +=app-office/libreoffice-l10n-5.4.0.3 ~amd64 +=app-text/aspell-0.60.7_rc1 ~amd64 +=app-text/libstaroffice-0.0.4 ~amd64 +=dev-lang/rust-1.19.0 ~amd64 +=dev-libs/libclc-0.2.0_pre20170118 ~amd64 +=dev-libs/libixion-0.12.2 ~amd64 +=dev-libs/liborcus-0.12.1 ~amd64 +=dev-libs/libuv-1.11.0 ~amd64 +=dev-libs/nspr-4.14 ~amd64 +=dev-libs/xmlsec-1.2.24-r1 ~amd64 +=dev-python/pygments-2.2.0 ~amd64 +=dev-python/pypeg2-2.15.2 ~amd64 +=dev-util/cargo-0.20.0 ~amd64 +=dev-util/colm-0.13.0.4 ~amd64 +=dev-util/cppunit-1.14.0 ~amd64 +=dev-util/intel-ocl-sdk-4.4.0.117-r1 ~amd64 +=dev-util/ragel-7.0.0.9 ~amd64 +=dev-util/systemtap-3.1 ~amd64 +=media-fonts/sil-doulos-5.000 ~amd64 +=media-fonts/sil-gentium-5.000 ~amd64 +=media-gfx/gimp-2.9.4-r3 ~amd64 +=media-libs/glew-2.0.0 ~amd64 +=media-libs/libmypaint-1.3.0 ~amd64 +=media-libs/libzmf-0.0.1 ~amd64 +=net-analyzer/greenbone-security-assistant-6.0.9 ~amd64 +=net-analyzer/openvas-8.0.5-r1 ~amd64 +=net-analyzer/openvas-cli-1.4.3 ~amd64 +=net-analyzer/openvas-libraries-8.0.5 ~amd64 +=net-analyzer/openvas-manager-6.0.6-r2 ~amd64 +=net-analyzer/openvas-scanner-5.0.4-r1 ~amd64 +=net-analyzer/openvas-tools-0_pre20512 ~amd64 +=net-analyzer/wireshark-2.4.1-r3 ~amd64 +=net-firewall/nftables-0.6-r4 ~amd64 +=net-libs/nodejs-7.10.0 ~amd64 +=net-misc/youtube-dl-2017.10.01 ~amd64 +=net-news/rssguard-3.3.5 ~amd64 +=sys-auth/libfprint-0.6.0-r2 ~amd64 +=sys-block/thin-provisioning-tools-0.6.3 ~amd64 +=sys-libs/efivar-31 ~amd64 +=virtual/rubygems-12 ~amd64 +=www-client/otter-0.9.11 ~amd64 +=www-client/qutebrowser-0.11.0 ~amd64 +=www-plugins/pdfjs-1.9.426 ~amd64 +=x11-libs/libva-1.8.1 ~amd64 +=x11-libs/libva-intel-driver-1.8.1 ~amd64 +=x11-libs/vte-0.48.3 ~amd64 +=x11-misc/py3status-3.6 ~amd64 +=dev-libs/nspr-4.16 ~amd64 +=dev-libs/nss-3.32.1 ~amd64 +=dev-libs/wayland-protocols-1.10 ~amd64 +=x11-libs/libdrm-2.4.83 ~amd64 +=media-libs/harfbuzz-1.5.1 ~amd64 +=app-portage/gentoolkit-0.4.0 ~amd64 +=sys-devel/gdb-8.0 ~amd64 +=dev-util/gdbus-codegen-2.52.3 ~amd64 +=dev-libs/glib-2.52.3 ~amd64 +=dev-libs/gobject-introspection-1.52.1 ~amd64 +=dev-libs/gobject-introspection-common-1.52.1 ~amd64 +=sys-apps/kmod-24 ~amd64 +=dev-libs/capstone-3.0.5_rc2-r1 ~amd64 +=dev-util/radare2-1.6.0 ~amd64 diff --git a/package.env b/package.env new file mode 100644 index 0000000..f0ac068 --- /dev/null +++ b/package.env @@ -0,0 +1,8 @@ +dev-qt/qtgui compiler-nox11 +dev-qt/qtwayland compiler-nox11 +dev-qt/qtmultimedia compiler-nox11 +dev-qt/qtwebkit compiler-nox11 +=dev-libs/beignet-1.2.1-r1 compiler-nox11 +media-libs/virglrenderer compiler-nox11 + +#www-client/chromium compiler-gcc6 diff --git a/package.license b/package.license new file mode 100644 index 0000000..11726dd --- /dev/null +++ b/package.license @@ -0,0 +1,4 @@ +dev-util/intel-ocl-sdk Intel-SDP +# required by tfm-fingerprint (argument) +>=sys-auth/tfm-fingerprint-1.0 UPEK-SDK-EULA +www-plugins/chrome-binary-plugins google-chrome diff --git a/package.mask b/package.mask new file mode 100644 index 0000000..7492d75 --- /dev/null +++ b/package.mask @@ -0,0 +1,2 @@ +x11-libs/libX11 +x11-libs/gtk+:2 diff --git a/package.unmask b/package.unmask new file mode 100644 index 0000000..2878a91 --- /dev/null +++ b/package.unmask @@ -0,0 +1,25 @@ +=dev-qt/qtconcurrent-5.9.1 +=dev-qt/qtwayland-5.9.1 +=dev-qt/qtwidgets-5.9.1 +#=dev-qt/qtwebkit-5.9.1 +=dev-qt/qtgui-5.9.1 +=dev-qt/qtscript-5.9.1 +=dev-qt/qtprintsupport-5.9.1 +=dev-qt/qtopengl-5.9.1 +=dev-qt/qtdbus-5.9.1 +=dev-qt/qtxml-5.9.1 +=dev-qt/qttest-5.9.1 +=dev-qt/qtxmlpatterns-5.9.1 +=dev-qt/linguist-tools-5.9.1 +=dev-qt/qtwebchannel-5.9.1 +=dev-qt/qtsvg-5.9.1 +=dev-qt/qtdeclarative-5.9.1 +=dev-qt/qtnetwork-5.9.1 +#=dev-qt/qtwebengine-5.9.1 +=dev-qt/qtmultimedia-5.9.1 +=dev-qt/qtcore-5.9.1 +=dev-qt/qtsql-5.9.1 +=dev-qt/qtpositioning-5.9.1 + +=media-video/mpv-0.22.0 egl vaapi -xscreensaver -xv -opengl archive +>=media-video/mpv-0.25.0 egl vaapi -xscreensaver -xv opengl archive +dev-libs/sway swaylock swaygrab +x11-terms/gnome-terminal -gnome-shell -nautilus +dev-lang/php pdo gd sockets intl exif zip +mail-client/roundcube enigma +sys-kernel/linux-firmware savedconfig +dev-java/icedtea-bin -gtk -webstart headless-awt +dev-java/icedtea -gtk -webstart headless-awt +dev-db/sqlite secure-delete +media-libs/harfbuzz icu +media-libs/libcanberra -gtk +app-crypt/gcr gtk +media-video/ffmpeg openssl +app-office/libreoffice -gtk -postgres gtk3 +www-client/firefox system-cairo system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite gtk3 force-gtk3 +media-libs/libvpx postproc +dev-libs/libxml2 icu +media-libs/libvpx svc +sys-libs/zlib minizip +app-emulation/libvirt opengl gtk spice virgl +dev-libs/beignet ocl-icd +app-crypt/pinentry gnome-keyring +www-client/otter -spell webkit +dev-qt/qtcore icu +dev-qt/qtwebkit printsupport +>=dev-qt/qtwebkit-5.200.0 opengl +dev-python/PyQt5 network declarative gui webkit printsupport opengl sql svg webchannel webengine xmlpatterns +gnome-base/gvfs gtk archive fuse mtp -udisks -systemd +dev-libs/weston wayland-compositor +dev-vcs/git libsecret +dev-util/intel-ocl-sdk -system-qt +app-text/xmlto text +sys-apps/dbus user-session +media-libs/libmypaint gegl +dev-libs/xmlsec nss +media-libs/gst-plugins-bad gles2 gtk +media-plugins/gst-plugins-vaapi -egl +media-plugins/gst-plugins-meta alsa ffmpeg flac mp3 ogg opus theora vaapi vpx x264 +app-text/texlive-core xetex +app-text/texlive context extra luatex metapost xetex +net-libs/libmicrohttpd messages +net-misc/spice-gtk gtk3 usbredir +app-emulation/virt-manager gtk +app-emulation/virt-viewer -vnc +app-emulation/qemu usbredir spice gtk virgl virtfs +www-plugins/chrome-binary-plugins widevine +www-client/chromium widevine + +# no webengine +net-news/rssguard -webengine +dev-python/PyQt5 -webengine +www-client/otter -webengine + +#required python 2.7 +app-emulation/qemu python_targets_python2_7 +app-text/asciidoc python_targets_python2_7 python_single_target_python2_7 # 2.7 only += $GTK_REQ gtk+-x11-3.0 >= $GTK_REQ) ++ PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQ) + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + fi +diff --git a/ui/gcr-prompter-tool.c b/ui/gcr-prompter-tool.c +index 0a22238..d32b76a 100644 +--- a/ui/gcr-prompter-tool.c ++++ b/ui/gcr-prompter-tool.c +@@ -27,7 +27,7 @@ + + #include + #include +-#include ++//#include + #include + + #include +diff --git a/configure b/configure +index 0ed3262..87ed57c 100755 +--- a/configure ++++ b/configure +@@ -15851,12 +15851,12 @@ if test -n "$GTK_CFLAGS"; then + pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK_REQ gtk+-x11-3.0 >= \$GTK_REQ\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK_REQ gtk+-x11-3.0 >= $GTK_REQ") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK_REQ\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK_REQ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK_REQ gtk+-x11-3.0 >= $GTK_REQ" 2>/dev/null` ++ pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK_REQ" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -15868,12 +15868,12 @@ if test -n "$GTK_LIBS"; then + pkg_cv_GTK_LIBS="$GTK_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK_REQ gtk+-x11-3.0 >= \$GTK_REQ\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK_REQ gtk+-x11-3.0 >= $GTK_REQ") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK_REQ\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK_REQ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= $GTK_REQ gtk+-x11-3.0 >= $GTK_REQ" 2>/dev/null` ++ pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= $GTK_REQ" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -15894,14 +15894,14 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= $GTK_REQ gtk+-x11-3.0 >= $GTK_REQ" 2>&1` ++ GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= $GTK_REQ" 2>&1` + else +- GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= $GTK_REQ gtk+-x11-3.0 >= $GTK_REQ" 2>&1` ++ GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= $GTK_REQ" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK_PKG_ERRORS" >&5 + +- as_fn_error $? "Package requirements (gtk+-3.0 >= $GTK_REQ gtk+-x11-3.0 >= $GTK_REQ) were not met: ++ as_fn_error $? "Package requirements (gtk+-3.0 >= $GTK_REQ) were not met: + + $GTK_PKG_ERRORS + +diff --git a/ui/gcr-prompt-dialog.c b/ui/gcr-prompt-dialog.c +index 48088d7..4bb3349 100644 +--- a/ui/gcr-prompt-dialog.c ++++ b/ui/gcr-prompt-dialog.c +@@ -27,7 +27,7 @@ + #include "gcr-secure-entry-buffer.h" + + #include +-#include ++//#include + #include + + /** +@@ -126,38 +126,7 @@ G_DEFINE_TYPE_WITH_CODE (GcrPromptDialog, gcr_prompt_dialog, GTK_TYPE_DIALOG, + static void + update_transient_for (GcrPromptDialog *self) + { +- GdkDisplay *display; +- GdkWindow *transient_for; +- GdkWindow *window; +- gint64 handle; +- gchar *end; +- +- if (self->pv->caller_window == NULL || g_str_equal (self->pv->caller_window, "")) { +- gtk_window_set_modal (GTK_WINDOW (self), FALSE); +- return; +- } +- +- window = gtk_widget_get_window (GTK_WIDGET (self)); +- if (window == NULL) +- return; +- +- handle = g_ascii_strtoll (self->pv->caller_window, &end, 10); +- if (!end || *end != '\0') { +- g_warning ("couldn't parse caller-window property: %s", self->pv->caller_window); +- return; +- } +- +- display = gtk_widget_get_display (GTK_WIDGET (self)); +- transient_for = gdk_x11_window_foreign_new_for_display (display, (Window)handle); +- if (transient_for == NULL) { +- g_warning ("caller-window property doesn't represent a window on current display: %s", +- self->pv->caller_window); +- } else { +- gdk_window_set_transient_for (window, transient_for); +- g_object_unref (transient_for); +- } +- +- gtk_window_set_modal (GTK_WINDOW (self), TRUE); ++ gtk_window_set_modal (GTK_WINDOW (self), FALSE); + } + + static void +--- a/ui/frob-system-prompt.c.orig 2016-07-29 15:03:49.756546759 +0200 ++++ b/ui/frob-system-prompt.c 2016-07-29 15:02:32.472543072 +0200 +@@ -26,7 +26,7 @@ + #include "egg/egg-testing.h" + + #include +-#include ++//#include + + #include + #include +@@ -54,10 +54,6 @@ + gcr_prompt_set_message (GCR_PROMPT (prompt), "This is the message"); + gcr_prompt_set_description (GCR_PROMPT (prompt), "This is the description"); + +- caller_id = g_strdup_printf ("%lu", (gulong)GDK_WINDOW_XID (gtk_widget_get_window (parent))); +- gcr_prompt_set_caller_window (GCR_PROMPT (prompt), caller_id); +- g_free (caller_id); +- + password = gcr_prompt_password_run (GCR_PROMPT (prompt), NULL, &error); + if (error != NULL) { + g_warning ("couldn't prompt for password: %s", error->message); +--- a/ui/frob-prompt.c.orig 2016-07-29 15:03:59.440547221 +0200 ++++ b/ui/frob-prompt.c 2016-07-29 15:01:12.736539268 +0200 +@@ -25,7 +25,7 @@ + #include "gcr/gcr-base.h" + + #include +-#include ++//#include + + #include + +@@ -77,12 +77,6 @@ + if (error != NULL) + errx (1, "couldn't create prompt: %s", error->message); + +- if (parent) { +- caller_id = g_strdup_printf ("%lu", (gulong)GDK_WINDOW_XID (gtk_widget_get_window (parent))); +- gcr_prompt_set_caller_window (GCR_PROMPT (prompt), caller_id); +- g_free (caller_id); +- } +- + loop = g_main_loop_new (NULL, FALSE); + groups = g_key_file_get_groups (file, NULL); + for (i = 0; cont && groups[i] != NULL; i++) { diff --git a/patches/app-emulation/virt-manager-1.4.0/python-2to3.patch b/patches/app-emulation/virt-manager-1.4.0/python-2to3.patch new file mode 100644 index 0000000..2a7eb4a --- /dev/null +++ b/patches/app-emulation/virt-manager-1.4.0/python-2to3.patch @@ -0,0 +1,3538 @@ +diff --git a/setup.py b/setup.py +index 89916b5..1a28068 100755 +--- a/setup.py ++++ b/setup.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/python3.6 + # Copyright (C) 2013, 2014 Red Hat, Inc. + + import glob +@@ -78,11 +78,11 @@ class my_build_i18n(distutils.command.build.build): + potpath = "po/POTFILES.in" + + try: +- print "Writing %s" % potpath +- file(potpath, "w").write(potfiles) ++ print("Writing %s" % potpath) ++ open(potpath, "w").write(potfiles) + self._run() + finally: +- print "Removing %s" % potpath ++ print("Removing %s" % potpath) + os.unlink(potpath) + + def _run(self): +@@ -168,8 +168,8 @@ class my_build(distutils.command.build.build): + wrapper += "exec \"%s\" \"$@\"" % (sharepath) + + newpath = os.path.abspath(os.path.join("build", app)) +- print "Generating %s" % newpath +- file(newpath, "w").write(wrapper) ++ print("Generating %s" % newpath) ++ open(newpath, "w").write(wrapper) + + + def _make_man_pages(self): +@@ -179,7 +179,7 @@ class my_build(distutils.command.build.build): + newpath = os.path.join(os.path.dirname(path), + appname + ".1") + +- print "Generating %s" % newpath ++ print("Generating %s" % newpath) + ret = os.system('pod2man ' + '--center "Virtual Machine Manager" ' + '--release %s --name %s ' +@@ -235,17 +235,17 @@ class my_install(distutils.command.install.install): + def finalize_options(self): + if self.prefix is None: + if CLIConfig.prefix != sysprefix: +- print "Using configured prefix=%s instead of sysprefix=%s" % ( +- CLIConfig.prefix, sysprefix) ++ print("Using configured prefix=%s instead of sysprefix=%s" % ( ++ CLIConfig.prefix, sysprefix)) + self.prefix = CLIConfig.prefix + else: +- print "Using sysprefix=%s" % sysprefix ++ print("Using sysprefix=%s" % sysprefix) + self.prefix = sysprefix + + elif self.prefix != CLIConfig.prefix: +- print("Install prefix=%s doesn't match configure prefix=%s\n" ++ print(("Install prefix=%s doesn't match configure prefix=%s\n" + "Pass matching --prefix to 'setup.py configure'" % +- (self.prefix, CLIConfig.prefix)) ++ (self.prefix, CLIConfig.prefix))) + sys.exit(1) + + distutils.command.install.install.finalize_options(self) +@@ -366,8 +366,8 @@ class configure(distutils.core.Command): + if self.default_hvs is not None: + template += "default_hvs = %s\n" % self.default_hvs + +- file(CLIConfig.cfgpath, "w").write(template) +- print "Generated %s" % CLIConfig.cfgpath ++ open(CLIConfig.cfgpath, "w").write(template) ++ print("Generated %s" % CLIConfig.cfgpath) + + + class TestBaseCommand(distutils.core.Command): +@@ -442,7 +442,7 @@ class TestBaseCommand(distutils.core.Command): + try: + unittest.installHandler() + except: +- print "installHandler hack failed" ++ print("installHandler hack failed") + + tests = unittest.TestLoader().loadTestsFromNames(self._testfiles) + if self.only: +@@ -454,13 +454,13 @@ class TestBaseCommand(distutils.core.Command): + newtests.append(testcase) + + if not newtests: +- print "--only didn't find any tests" ++ print("--only didn't find any tests") + sys.exit(1) + tests = unittest.TestSuite(newtests) +- print "Running only:" ++ print("Running only:") + for test in newtests: +- print "%s" % test +- print ++ print("%s" % test) ++ print() + + t = unittest.TextTestRunner(verbosity=1) + +@@ -582,14 +582,14 @@ class CheckPylint(distutils.core.Command): + output_format = sys.stdout.isatty() and "colorized" or "text" + exclude = ["virtinst/progress.py"] + +- print "running pep8" ++ print("running pep8") + cmd = "pep8 " + cmd += "--config tests/pep8.cfg " + cmd += "--exclude %s " % ",".join(exclude) + cmd += " ".join(files) + os.system(cmd) + +- print "running pylint" ++ print("running pylint") + cmd = "pylint " + cmd += "--rcfile tests/pylint.cfg " + cmd += "--output-format=%s " % output_format +diff --git a/tests/test_inject.py b/tests/test_inject.py +index 370584f..af5bf6f 100755 +--- a/tests/test_inject.py ++++ b/tests/test_inject.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/python3.6 + # Copyright (C) 2013, 2014 Red Hat, Inc. + + import atexit +diff --git a/virt-clone b/virt-clone +index 00d0e30..27b0d5b 100755 +--- a/virt-clone ++++ b/virt-clone +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/python3.6 + # + # Copyright(c) FUJITSU Limited 2007. + # +@@ -52,7 +52,7 @@ def get_original_guest(guest_name, origfile, design): + try: + design.original_xml = origxml + return +- except (ValueError, RuntimeError), e: ++ except (ValueError, RuntimeError) as e: + fail(e) + + if not guest_name: +@@ -209,9 +209,9 @@ def main(conn=None): + if __name__ == "__main__": + try: + sys.exit(main()) +- except SystemExit, sys_e: ++ except SystemExit as sys_e: + sys.exit(sys_e.code) + except KeyboardInterrupt: + print_stderr(_("Installation aborted at user request")) +- except Exception, main_e: ++ except Exception as main_e: + fail(main_e) +diff --git a/virt-convert b/virt-convert +index dd964f5..b205f86 100755 +--- a/virt-convert ++++ b/virt-convert +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/python3.6 + # + # Copyright 2008, 2013, 2014 Red Hat, Inc. + # Joey Boggs +@@ -133,9 +133,9 @@ def main(conn=None): + if __name__ == "__main__": + try: + sys.exit(main()) +- except SystemExit, sys_e: ++ except SystemExit as sys_e: + sys.exit(sys_e.code) + except KeyboardInterrupt: + print_stderr(_("Aborted at user request")) +- except Exception, main_e: ++ except Exception as main_e: + fail(main_e) +diff --git a/virt-install b/virt-install +index 817f4b3..5cf8a82 100755 +--- a/virt-install ++++ b/virt-install +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/python3.6 + # + # Copyright 2005-2014 Red Hat, Inc. + # +@@ -367,7 +367,7 @@ def get_guest(conn, options): + arch=arch, + typ=req_hv_type, + machine=options.machine) +- except Exception, e: ++ except Exception as e: + fail(e) + + if (not req_virt_type and +@@ -400,7 +400,7 @@ def set_install_media(guest, location, cdpath, distro_variant): + guest.os_variant = guest.installer.detect_distro(guest) + elif distro_variant != "none": + guest.os_variant = distro_variant +- except ValueError, e: ++ except ValueError as e: + fail(_("Error validating install location: %s") % str(e)) + + +@@ -626,7 +626,7 @@ def build_guest_instance(conn, options): + guest.os.nvram is None): + try: + guest.set_uefi_default() +- except Exception, e: ++ except Exception as e: + logging.debug("Error setting UEFI default for aarch64", + exc_info=True) + logging.warn("Couldn't configure UEFI: %s", e) +@@ -712,7 +712,7 @@ def start_install(guest, options): + logging.debug("", exc_info=True) + print_stderr(_("Domain install interrupted.")) + raise +- except Exception, e: ++ except Exception as e: + fail(e, do_exit=False) + if guest.domain is None: + guest.cleanup_created_disks(meter) +@@ -735,7 +735,7 @@ def check_domain(guest, conscb, transient, + fail(_("Domain has crashed.")) + + return not guest.domain.isActive() +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + if transient and e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN: + logging.debug("transient VM shutdown and disappeared.") + return True +@@ -994,10 +994,10 @@ def main(conn=None): + if __name__ == "__main__": + try: + sys.exit(main()) +- except SystemExit, sys_e: ++ except SystemExit as sys_e: + sys.exit(sys_e.code) + except KeyboardInterrupt: + logging.debug("", exc_info=True) + print_stderr(_("Installation aborted at user request")) +- except Exception, main_e: ++ except Exception as main_e: + fail(main_e) +diff --git a/virt-manager b/virt-manager +index 53b7356..c1d0350 100755 +--- a/virt-manager ++++ b/virt-manager +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/python3.6 + # + # Copyright (C) 2006, 2014 Red Hat, Inc. + # Copyright (C) 2006 Daniel P. Berrange +@@ -44,7 +44,7 @@ warnings.simplefilter("ignore") + try: + gi.check_version("3.14.0") + except (ValueError, AttributeError): +- print "pygobject3 3.14.0 or later is required." ++ print("pygobject3 3.14.0 or later is required.") + sys.exit(1) + + +@@ -76,7 +76,7 @@ def _import_gtk(leftovers): + leftovers = sys.argv[1:] + + if Gtk.check_version(3, 14, 0): +- print "gtk3 3.14.0 or later is required." ++ print("gtk3 3.14.0 or later is required.") + sys.exit(1) + + # This will error if Gtk wasn't correctly initialized +@@ -84,7 +84,7 @@ def _import_gtk(leftovers): + + globals()["Gtk"] = Gtk + import virtManager.config +- except Exception, e: ++ except Exception as e: + # Don't just let the exception raise here. abrt reports bugs + # when users mess up su/sudo and DISPLAY isn't set. Printing + # it avoids the issue +@@ -93,7 +93,7 @@ def _import_gtk(leftovers): + if display: + msg += ": Could not open display: %s" % display + logging.debug("".join(traceback.format_exc())) +- print msg ++ print(msg) + sys.exit(1) + finally: + sys.argv = origargv +@@ -278,7 +278,7 @@ if __name__ == "__main__": + logging.debug("Received KeyboardInterrupt. Exiting application.") + except SystemExit: + raise +- except Exception, run_e: ++ except Exception as run_e: + if "Gtk" not in globals(): + raise + _show_startup_error(str(run_e), "".join(traceback.format_exc())) +diff --git a/virt-xml b/virt-xml +index 39ca18e..2ab37b3 100755 +--- a/virt-xml ++++ b/virt-xml +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/python3.6 + # + # Copyright 2013-2014 Red Hat, Inc. + # Cole Robinson +@@ -94,7 +94,7 @@ def get_domain_and_guest(conn, domstr): + domain = conn.lookupByUUIDString(domstr) + else: + domain = conn.lookupByName(domstr) +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + fail(_("Could not find domain '%s': %s") % (domstr, e)) + + state = domain.info()[0] +@@ -294,7 +294,7 @@ def update_changes(domain, devs, action, confirm): + domain.detachDeviceFlags(xml, libvirt.VIR_DOMAIN_AFFECT_LIVE) + elif action == "update": + domain.updateDeviceFlags(xml, libvirt.VIR_DOMAIN_AFFECT_LIVE) +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + fail(_("Error attempting device %s: %s") % (action, e)) + + print_stdout(_("Device %s successful.") % action) +@@ -474,10 +474,10 @@ def main(conn=None): + if __name__ == "__main__": + try: + sys.exit(main()) +- except SystemExit, sys_e: ++ except SystemExit as sys_e: + sys.exit(sys_e.code) + except KeyboardInterrupt: + logging.debug("", exc_info=True) + print_stderr(_("Aborted at user request")) +- except Exception, main_e: ++ except Exception as main_e: + fail(main_e) +diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py +index aab9095..46bbe35 100644 +--- a/virtManager/addhardware.py ++++ b/virtManager/addhardware.py +@@ -59,7 +59,7 @@ PAGE_USBREDIR, + PAGE_TPM, + PAGE_RNG, + PAGE_PANIC, +-) = range(0, 17) ++) = list(range(0, 17)) + + + class vmmAddHardware(vmmGObjectUI): +@@ -766,7 +766,7 @@ class vmmAddHardware(vmmGObjectUI): + else: + # Guest XML editing + define_func(**define_args) +- except Exception, e: ++ except Exception as e: + err.show_err((_("Error changing VM configuration: %s") % + str(e))) + return False +@@ -784,7 +784,7 @@ class vmmAddHardware(vmmGObjectUI): + elif hotplug_args: + did_hotplug = True + vm.hotplug(**hotplug_args) +- except Exception, e: ++ except Exception as e: + did_hotplug = True + logging.debug("Hotplug failed: %s", str(e)) + hotplug_err = ((str(e), "".join(traceback.format_exc()))) +@@ -1146,7 +1146,7 @@ class vmmAddHardware(vmmGObjectUI): + self._dev = VirtualTPMDevice(self.conn.get_backend()) + self._dev.type = devtype + +- for param_name, widget_name in tpm_widget_mappings.items(): ++ for param_name, widget_name in list(tpm_widget_mappings.items()): + make_visible = self._dev.supports_property(param_name) + uiutil.set_grid_row_visible(self.widget(widget_name + "-label"), + make_visible) +@@ -1200,7 +1200,7 @@ class vmmAddHardware(vmmGObjectUI): + self._dev = char_class(self.conn.get_backend()) + self._dev.type = devtype + +- for param_name, widget_name in char_widget_mappings.items(): ++ for param_name, widget_name in list(char_widget_mappings.items()): + make_visible = self._dev.supports_property(param_name) + uiutil.set_grid_row_visible(self.widget(widget_name + "-label"), + make_visible) +@@ -1298,7 +1298,7 @@ class vmmAddHardware(vmmGObjectUI): + if controller is not None: + self.vm.attach_device(controller) + self.vm.attach_device(self._dev) +- except Exception, e: ++ except Exception as e: + logging.debug("Device could not be hotplugged: %s", str(e)) + attach_err = (str(e), "".join(traceback.format_exc())) + +@@ -1322,7 +1322,7 @@ class vmmAddHardware(vmmGObjectUI): + if controller is not None: + self.vm.add_device(controller) + self.vm.add_device(self._dev) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error adding device: %s") % str(e)) + return True + +@@ -1333,7 +1333,7 @@ class vmmAddHardware(vmmGObjectUI): + if not error: + try: + failure = self._add_device() +- except Exception, e: ++ except Exception as e: + failure = True + error = _("Unable to add device: %s") % str(e) + details = "".join(traceback.format_exc()) +@@ -1353,7 +1353,7 @@ class vmmAddHardware(vmmGObjectUI): + try: + if self._validate() is False: + return +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Uncaught error validating hardware " + "input: %s") % str(e)) + return +@@ -1477,7 +1477,7 @@ class vmmAddHardware(vmmGObjectUI): + try: + disk = self.addstorage.validate_storage(self.vm.get_name(), + collidelist=collidelist, device=device) +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Storage parameter error."), e) + + if disk is False: +@@ -1500,7 +1500,7 @@ class vmmAddHardware(vmmGObjectUI): + disk, controller_model, disks) + + disk.generate_target(used, prefer_ctrl) +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Storage parameter error."), e) + + if self.addstorage.validate_disk_object(disk) is False: +@@ -1552,7 +1552,7 @@ class vmmAddHardware(vmmGObjectUI): + self._dev.tlsPort = tlsport + if keymap: + self._dev.keymap = keymap +- except ValueError, e: ++ except ValueError as e: + self.err.val_err(_("Graphics device parameter error"), e) + + def _validate_page_sound(self): +@@ -1561,7 +1561,7 @@ class vmmAddHardware(vmmGObjectUI): + try: + self._dev = virtinst.VirtualAudio(self.conn.get_backend()) + self._dev.model = smodel +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Sound device parameter error"), e) + + def _validate_page_hostdev(self): +@@ -1587,7 +1587,7 @@ class vmmAddHardware(vmmGObjectUI): + return False + dev.set_from_nodedev(nodedev) + self._dev = dev +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Host device parameter error"), e) + + def _validate_page_char(self): +@@ -1646,13 +1646,13 @@ class vmmAddHardware(vmmGObjectUI): + try: + self._dev = devclass + +- for param_name, val in value_mappings.items(): ++ for param_name, val in list(value_mappings.items()): + if self._dev.supports_property(param_name) and val is not None: + setattr(self._dev, param_name, val) + + # Dump XML for sanity checking + self._dev.get_xml_config() +- except Exception, e: ++ except Exception as e: + return self.err.val_err( + _("%s device parameter error") % + char_class.virtual_device_type.capitalize(), e) +@@ -1664,7 +1664,7 @@ class vmmAddHardware(vmmGObjectUI): + try: + self._dev = VirtualVideoDevice(conn) + self._dev.model = model +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Video device parameter error"), e) + + def _validate_page_watchdog(self): +@@ -1676,7 +1676,7 @@ class vmmAddHardware(vmmGObjectUI): + self._dev = VirtualWatchdog(conn) + self._dev.model = model + self._dev.action = action +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Watchdog parameter error"), e) + + def _validate_page_filesystem(self): +@@ -1691,7 +1691,7 @@ class vmmAddHardware(vmmGObjectUI): + try: + self._dev = VirtualSmartCardDevice(conn) + self._dev.mode = mode +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Smartcard device parameter error"), e) + + def _validate_page_usbredir(self): +@@ -1710,7 +1710,7 @@ class vmmAddHardware(vmmGObjectUI): + self._dev.host = host + if service: + self._dev.service = service +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("USB redirected device parameter error"), + str(e)) + +@@ -1727,10 +1727,10 @@ class vmmAddHardware(vmmGObjectUI): + try: + self._dev = VirtualTPMDevice(conn) + self._dev.type = typ +- for param_name, val in value_mappings.items(): ++ for param_name, val in list(value_mappings.items()): + if self._dev.supports_property(param_name): + setattr(self._dev, param_name, val) +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("TPM device parameter error"), e) + + def _validate_page_panic(self): +@@ -1746,9 +1746,9 @@ class vmmAddHardware(vmmGObjectUI): + self._dev = VirtualPanicDevice(conn) + if not iobase: + iobase = self._dev.IOBASE_DEFAULT +- for param_name, val in value_mappings.items(): ++ for param_name, val in list(value_mappings.items()): + setattr(self._dev, param_name, val) +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Panic device parameter error"), e) + + def _validate_page_controller(self): +@@ -1838,10 +1838,10 @@ class vmmAddHardware(vmmGObjectUI): + try: + self._dev = virtinst.VirtualRNGDevice(self.conn.get_backend()) + self._dev.type = rtype +- for param_name, val in value_mappings.items(): ++ for param_name, val in list(value_mappings.items()): + if self._dev.supports_property(param_name): + setattr(self._dev, param_name, val) +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("RNG device parameter error"), e) + + +diff --git a/virtManager/addstorage.py b/virtManager/addstorage.py +index 8c58344..1d79c4f 100644 +--- a/virtManager/addstorage.py ++++ b/virtManager/addstorage.py +@@ -117,7 +117,7 @@ class vmmAddStorage(vmmGObjectUI): + try: + default_pool.start() + logging.info("Started pool '%s'", default_pool.get_name()) +- except Exception, e: ++ except Exception as e: + return self.err.show_err(_("Could not start storage_pool " + "'%s': %s") % + (default_pool.get_name(), str(e))) +@@ -163,7 +163,7 @@ class vmmAddStorage(vmmGObjectUI): + errmsg = _("Errors were encountered changing permissions for the " + "following directories:") + details = "" +- for path, error in errors.items(): ++ for path, error in list(errors.items()): + if path not in broken_paths: + continue + details += "%s : %s\n" % (path, error) +@@ -175,7 +175,7 @@ class vmmAddStorage(vmmGObjectUI): + _("Don't ask about these directories again.")) + + if chkres: +- src.config.add_perms_fix_ignore(errors.keys()) ++ src.config.add_perms_fix_ignore(list(errors.keys())) + + def reset_state(self): + self._update_host_space() +diff --git a/virtManager/asyncjob.py b/virtManager/asyncjob.py +index 0fd3bee..672dd04 100644 +--- a/virtManager/asyncjob.py ++++ b/virtManager/asyncjob.py +@@ -86,7 +86,7 @@ class vmmMeter(virtinst.progress.BaseMeter): + def cb_wrapper(callback, asyncjob, *args, **kwargs): + try: + callback(asyncjob, *args, **kwargs) +- except Exception, e: ++ except Exception as e: + # If job is cancelled, don't report error to user. + if (isinstance(e, libvirt.libvirtError) and + asyncjob.can_cancel() and +diff --git a/virtManager/choosecd.py b/virtManager/choosecd.py +index d952492..32542c3 100644 +--- a/virtManager/choosecd.py ++++ b/virtManager/choosecd.py +@@ -116,7 +116,7 @@ class vmmChooseCD(vmmGObjectUI): + + try: + self.disk.path = path +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Invalid Media Path"), e) + + names = self.disk.is_conflict_disk() +diff --git a/virtManager/clone.py b/virtManager/clone.py +index 28daf02..12fd2c6 100644 +--- a/virtManager/clone.py ++++ b/virtManager/clone.py +@@ -327,7 +327,7 @@ class vmmCloneVM(vmmGObjectUI): + + build_net_row(label, mac, newmac) + +- no_net = bool(len(self.net_list.keys()) == 0) ++ no_net = bool(len(list(self.net_list.keys())) == 0) + self.widget("clone-network-box").set_visible(not no_net) + self.widget("clone-no-net").set_visible(no_net) + +@@ -396,7 +396,7 @@ class vmmCloneVM(vmmGObjectUI): + try: + cd.skip_target = skip_targets + cd.setup_original() +- except Exception, e: ++ except Exception as e: + logging.exception("Disk target '%s' caused clone error", + force_target) + storage_add(str(e)) +@@ -416,7 +416,7 @@ class vmmCloneVM(vmmGObjectUI): + + cd.clone_paths = clone_path + size = cd.original_disks[0].get_size() +- except Exception, e: ++ except Exception as e: + logging.exception("Error setting generated path '%s'", + clone_path) + storage_add(str(e)) +@@ -445,7 +445,7 @@ class vmmCloneVM(vmmGObjectUI): + if cd.clone_name == newname: + return + +- for row in self.storage_list.values(): ++ for row in list(self.storage_list.values()): + origpath = row[STORAGE_INFO_ORIG_PATH] + if row[STORAGE_INFO_MANUAL_PATH]: + continue +@@ -454,7 +454,7 @@ class vmmCloneVM(vmmGObjectUI): + try: + newpath = self.generate_clone_path_name(origpath, newname) + row[STORAGE_INFO_NEW_PATH] = newpath +- except Exception, e: ++ except Exception as e: + logging.debug("Generating new path from clone name failed: " + + str(e)) + +@@ -580,7 +580,7 @@ class vmmCloneVM(vmmGObjectUI): + # If any storage cannot be cloned or shared, don't allow cloning + clone = True + tooltip = "" +- for row in self.storage_list.values(): ++ for row in list(self.storage_list.values()): + can_clone = row[STORAGE_INFO_CAN_CLONE] + can_share = row[STORAGE_INFO_CAN_SHARE] + if not (can_clone or can_share): +@@ -676,7 +676,7 @@ class vmmCloneVM(vmmGObjectUI): + if msg: + raise RuntimeError(msg) + row[NETWORK_INFO_NEW_MAC] = new +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error changing MAC address: %s") % str(e)) + return + +@@ -716,7 +716,7 @@ class vmmCloneVM(vmmGObjectUI): + self.populate_storage_lists() + row[STORAGE_INFO_NEW_PATH] = new_path + row[STORAGE_INFO_MANUAL_PATH] = True +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error changing storage path: %s") % str(e)) + return + +@@ -801,7 +801,7 @@ class vmmCloneVM(vmmGObjectUI): + try: + if not self.validate(): + return +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Uncaught error validating input: %s") % str(e)) + return + +diff --git a/virtManager/connect.py b/virtManager/connect.py +index 30add14..fdb6bf4 100644 +--- a/virtManager/connect.py ++++ b/virtManager/connect.py +@@ -34,11 +34,11 @@ from .baseclass import vmmGObjectUI + HV_XEN, + HV_LXC, + HV_QEMU_SESSION, +-HV_BHYVE) = range(5) ++HV_BHYVE) = list(range(5)) + + (CONN_SSH, + CONN_TCP, +-CONN_TLS) = range(3) ++CONN_TLS) = list(range(3)) + + + def current_user(): +@@ -98,7 +98,7 @@ class vmmConnect(vmmGObjectUI): + # Call any API, so we detect if avahi is even available or not + self.avahiserver.GetAPIVersion() + logging.debug("Connected to avahi") +- except Exception, e: ++ except Exception as e: + self.dbus = None + self.avahiserver = None + logging.debug("Couldn't contact avahi: %s", str(e)) +@@ -230,7 +230,7 @@ class vmmConnect(vmmGObjectUI): + + sig = resint.connect("g-signal", cb) + self.browser_sigs.append((resint, sig)) +- except Exception, e: ++ except Exception as e: + logging.exception(e) + + def remove_service(self, interface, protocol, name, typ, domain, flags): +@@ -246,7 +246,7 @@ class vmmConnect(vmmGObjectUI): + for row in model: + if row[0] == name: + model.remove(row.iter) +- except Exception, e: ++ except Exception as e: + logging.exception(e) + + def add_conn_to_list(self, interface, protocol, name, typ, domain, +@@ -269,7 +269,7 @@ class vmmConnect(vmmGObjectUI): + + host = self.sanitize_hostname(str(host)) + model.append([str(address), str(host), str(name)]) +- except Exception, e: ++ except Exception as e: + logging.exception(e) + + def start_browse(self): +@@ -444,7 +444,7 @@ class vmmConnect(vmmGObjectUI): + if host.startswith("linux-"): + tmphost = host[6:] + try: +- long(tmphost) ++ int(tmphost) + host = "" + except ValueError: + pass +diff --git a/virtManager/connectauth.py b/virtManager/connectauth.py +index 014a986..3d8fd3c 100644 +--- a/virtManager/connectauth.py ++++ b/virtManager/connectauth.py +@@ -161,7 +161,7 @@ def acquire_tgt(): + "/org/gnome/KrbAuthDialog", + "org.freedesktop.KrbAuthDialog", None) + ret = ka.acquireTgt("(s)", "") +- except Exception, e: ++ except Exception as e: + logging.info("Cannot acquire tgt" + str(e)) + ret = False + return ret +diff --git a/virtManager/connection.py b/virtManager/connection.py +index 6cb9cc0..820322e 100644 +--- a/virtManager/connection.py ++++ b/virtManager/connection.py +@@ -188,7 +188,7 @@ class vmmConnection(vmmGObject): + + (_STATE_DISCONNECTED, + _STATE_CONNECTING, +- _STATE_ACTIVE) = range(1, 4) ++ _STATE_ACTIVE) = list(range(1, 4)) + + def __init__(self, uri): + vmmGObject.__init__(self) +@@ -277,7 +277,7 @@ class vmmConnection(vmmGObject): + for vol in pool.get_volumes(): + try: + ret.append(vol.get_xmlobj(refresh_if_nec=False)) +- except Exception, e: ++ except Exception as e: + logging.debug("Fetching volume XML failed: %s", e) + return ret + self._backend.cb_fetch_all_vols = fetch_all_vols +@@ -362,7 +362,7 @@ class vmmConnection(vmmGObject): + uri = self.get_uri().replace("/", "_") + ret = os.path.join(util.get_cache_dir(), uri) + if not os.path.exists(ret): +- os.makedirs(ret, 0755) ++ os.makedirs(ret, 0o755) + return ret + + def get_default_storage_format(self): +@@ -449,7 +449,7 @@ class vmmConnection(vmmGObject): + # Try to create the default storage pool + try: + virtinst.StoragePool.build_default_pool(self.get_backend()) +- except Exception, e: ++ except Exception as e: + logging.debug("Building default pool failed: %s", str(e)) + + return self._storage_capable +@@ -551,7 +551,7 @@ class vmmConnection(vmmGObject): + try: + if vol.get_target_path() == path: + return vol +- except Exception, e: ++ except Exception as e: + # Errors can happen if the volume disappeared, bug 1092739 + logging.debug("Error looking up volume from path=%s: %s", + path, e) +@@ -626,7 +626,7 @@ class vmmConnection(vmmGObject): + for dev in self.list_nodedevs(): + try: + xmlobj = dev.get_xmlobj() +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + # Libvirt nodedev XML fetching can be busted + # https://bugzilla.redhat.com/show_bug.cgi?id=1225771 + if e.get_error_code() != libvirt.VIR_ERR_NO_NODE_DEVICE: +@@ -701,12 +701,12 @@ class vmmConnection(vmmGObject): + try: + # Redefine new domain + newobj = define_cb(newxml) +- except Exception, renameerr: ++ except Exception as renameerr: + try: + logging.debug("Error defining new name %s XML", + obj.class_name(), exc_info=True) + newobj = define_cb(origxml) +- except Exception, fixerr: ++ except Exception as fixerr: + logging.debug("Failed to redefine original %s!", + obj.class_name(), exc_info=True) + raise RuntimeError( +@@ -788,7 +788,7 @@ class vmmConnection(vmmGObject): + self._domain_lifecycle_event, None)) + self.using_domain_events = True + logging.debug("Using domain events") +- except Exception, e: ++ except Exception as e: + self.using_domain_events = False + logging.debug("Error registering domain events: %s", e) + +@@ -799,7 +799,7 @@ class vmmConnection(vmmGObject): + self._domain_cb_ids.append( + self.get_backend().domainEventRegisterAny( + None, eventid, self._domain_xml_misc_event, None)) +- except Exception, e: ++ except Exception as e: + logging.debug("Error registering domain %s event: %s", + typestr, e) + +@@ -825,7 +825,7 @@ class vmmConnection(vmmGObject): + None, eventid, self._network_lifecycle_event, None)) + self.using_network_events = True + logging.debug("Using network events") +- except Exception, e: ++ except Exception as e: + self.using_network_events = False + logging.debug("Error registering network events: %s", e) + +@@ -903,7 +903,7 @@ class vmmConnection(vmmGObject): + try: + self._backend.open(self._do_creds_password) + return True, None +- except Exception, exc: ++ except Exception as exc: + tb = "".join(traceback.format_exc()) + if isinstance(exc, libvirt.libvirtError): + # pylint: disable=no-member +@@ -948,7 +948,7 @@ class vmmConnection(vmmGObject): + + try: + self._backend.setKeepAlive(20, 1) +- except Exception, e: ++ except Exception as e: + if (type(e) is not AttributeError and + not util.is_error_nosupport(e)): + raise +@@ -980,7 +980,7 @@ class vmmConnection(vmmGObject): + + self.idle_add(self._change_state, is_active and + self._STATE_ACTIVE or self._STATE_DISCONNECTED) +- except Exception, e: ++ except Exception as e: + is_active = False + self._schedule_close() + connectError = (str(e), "".join(traceback.format_exc()), False) +@@ -1069,35 +1069,35 @@ class vmmConnection(vmmGObject): + def _update_nets(self, dopoll): + keymap = dict((o.get_connkey(), o) for o in self.list_nets()) + if not dopoll or not self.is_network_capable(): +- return [], [], keymap.values() ++ return [], [], list(keymap.values()) + return pollhelpers.fetch_nets(self._backend, keymap, + (lambda obj, key: vmmNetwork(self, obj, key))) + + def _update_pools(self, dopoll): + keymap = dict((o.get_connkey(), o) for o in self.list_pools()) + if not dopoll or not self.is_storage_capable(): +- return [], [], keymap.values() ++ return [], [], list(keymap.values()) + return pollhelpers.fetch_pools(self._backend, keymap, + (lambda obj, key: vmmStoragePool(self, obj, key))) + + def _update_interfaces(self, dopoll): + keymap = dict((o.get_connkey(), o) for o in self.list_interfaces()) + if not dopoll or not self.is_interface_capable(): +- return [], [], keymap.values() ++ return [], [], list(keymap.values()) + return pollhelpers.fetch_interfaces(self._backend, keymap, + (lambda obj, key: vmmInterface(self, obj, key))) + + def _update_nodedevs(self, dopoll): + keymap = dict((o.get_connkey(), o) for o in self.list_nodedevs()) + if not dopoll or not self.is_nodedev_capable(): +- return [], [], keymap.values() ++ return [], [], list(keymap.values()) + return pollhelpers.fetch_nodedevs(self._backend, keymap, + (lambda obj, key: vmmNodeDevice(self, obj, key))) + + def _update_vms(self, dopoll): + keymap = dict((o.get_connkey(), o) for o in self.list_vms()) + if not dopoll: +- return [], [], keymap.values() ++ return [], [], list(keymap.values()) + return pollhelpers.fetch_vms(self._backend, keymap, + (lambda obj, key: vmmDomain(self, obj, key))) + +@@ -1202,7 +1202,7 @@ class vmmConnection(vmmGObject): + continue + + obj.tick(stats_update=stats_update) +- except Exception, e: ++ except Exception as e: + logging.exception("Tick for %s failed", obj) + if (isinstance(e, libvirt.libvirtError) and + (getattr(e, "get_error_code")() == +@@ -1291,7 +1291,7 @@ class vmmConnection(vmmGObject): + self._tick(*args, **kwargs) + except KeyboardInterrupt: + raise +- except Exception, e: ++ except Exception as e: + pass + + if e is None: +diff --git a/virtManager/console.py b/virtManager/console.py +index 1d33115..c99c4e0 100644 +--- a/virtManager/console.py ++++ b/virtManager/console.py +@@ -35,7 +35,7 @@ from .viewers import SpiceViewer, VNCViewer, have_spice_gtk + (_CONSOLE_PAGE_UNAVAILABLE, + _CONSOLE_PAGE_AUTHENTICATE, + _CONSOLE_PAGE_SERIAL, +- _CONSOLE_PAGE_VIEWER) = range(4) ++ _CONSOLE_PAGE_VIEWER) = list(range(4)) + + + class _TimedRevealer(vmmGObject): +@@ -689,7 +689,7 @@ class vmmConsolePages(vmmGObjectUI): + gdev = gdevs and gdevs[0] or None + if gdev: + ginfo = ConnectionInfo(self.vm.conn, gdev) +- except Exception, e: ++ except Exception as e: + # We can fail here if VM is destroyed: xen is a bit racy + # and can't handle domain lookups that soon after + logging.exception("Getting graphics console failed: %s", str(e)) +@@ -732,7 +732,7 @@ class vmmConsolePages(vmmGObjectUI): + self._refresh_enable_accel() + + self._viewer.console_open() +- except Exception, e: ++ except Exception as e: + logging.exception("Error connection to graphical console") + self._activate_unavailable_page( + _("Error connecting to graphical console") + ":\n%s" % e) +diff --git a/virtManager/create.py b/virtManager/create.py +index 737c1fa..27874f7 100644 +--- a/virtManager/create.py ++++ b/virtManager/create.py +@@ -49,20 +49,20 @@ DEFAULT_MEM = 1024 + PAGE_INSTALL, + PAGE_MEM, + PAGE_STORAGE, +- PAGE_FINISH) = range(5) ++ PAGE_FINISH) = list(range(5)) + + (INSTALL_PAGE_ISO, + INSTALL_PAGE_URL, + INSTALL_PAGE_PXE, + INSTALL_PAGE_IMPORT, + INSTALL_PAGE_CONTAINER_APP, +- INSTALL_PAGE_CONTAINER_OS) = range(6) ++ INSTALL_PAGE_CONTAINER_OS) = list(range(6)) + + # Column numbers for os type/version list models + (OS_COL_ID, + OS_COL_LABEL, + OS_COL_IS_SEP, +- OS_COL_IS_SHOW_ALL) = range(4) ++ OS_COL_IS_SHOW_ALL) = list(range(4)) + + + ##################### +@@ -452,7 +452,7 @@ class vmmCreate(vmmGObjectUI): + guest.set_uefi_default() + installable_arch = True + logging.debug("UEFI found for aarch64, setting it as default.") +- except Exception, e: ++ except Exception as e: + installable_arch = False + logging.debug("Error checking for aarch64 UEFI default", + exc_info=True) +@@ -668,7 +668,7 @@ class vmmCreate(vmmGObjectUI): + + try: + self._populate_conn_state() +- except Exception, e: ++ except Exception as e: + logging.exception("Error setting create wizard conn state.") + return self._show_startup_error(str(e)) + +@@ -864,7 +864,7 @@ class vmmCreate(vmmGObjectUI): + model.clear() + + default = -1 +- for c in self.engine.conns.values(): ++ for c in list(self.engine.conns.values()): + connobj = c["conn"] + if not connobj.is_active(): + continue +@@ -1615,7 +1615,7 @@ class vmmCreate(vmmGObjectUI): + elif pagenum == PAGE_FINISH: + try: + self._populate_summary() +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error populating summary page: %s") % + str(e)) + return +@@ -1649,7 +1649,7 @@ class vmmCreate(vmmGObjectUI): + # Generate UUID (makes customize dialog happy) + try: + guest.uuid = util.randomUUID(guest.conn) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error setting UUID: %s") % str(e)) + return None + +@@ -1657,7 +1657,7 @@ class vmmCreate(vmmGObjectUI): + try: + if variant: + guest.os_variant = variant +- except ValueError, e: ++ except ValueError as e: + self.err.val_err(_("Error setting OS information."), str(e)) + return None + +@@ -1679,7 +1679,7 @@ class vmmCreate(vmmGObjectUI): + for_cpu=True) + + guest.add_default_devices() +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error setting up default devices:") + str(e)) + return None + +@@ -1697,7 +1697,7 @@ class vmmCreate(vmmGObjectUI): + return self._validate_storage_page() + elif pagenum == PAGE_FINISH: + return self._validate_final_page() +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Uncaught error validating install " + "parameters: %s") % str(e)) + return +@@ -1810,7 +1810,7 @@ class vmmCreate(vmmGObjectUI): + if not self._guest: + return False + self._guest.installer = installer +- except Exception, e: ++ except Exception as e: + return self.err.val_err( + _("Error setting installer parameters."), e) + +@@ -1832,7 +1832,7 @@ class vmmCreate(vmmGObjectUI): + fsdev.target = "/" + fsdev.source = fs + self._guest.add_device(fsdev) +- except Exception, e: ++ except Exception as e: + return self.err.val_err( + _("Error setting install media location."), e) + +@@ -1865,7 +1865,7 @@ class vmmCreate(vmmGObjectUI): + name = self._generate_default_name(distro, variant) + self.widget("create-vm-name").set_text(name) + self._guest.name = name +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Error setting default name."), e) + + # Kind of wonky, run storage validation now, which will assign +@@ -1920,14 +1920,14 @@ class vmmCreate(vmmGObjectUI): + # VCPUS + try: + self._guest.vcpus = int(cpus) +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Error setting CPUs."), e) + + # Memory + try: + self._guest.memory = int(mem) * 1024 + self._guest.maxmemory = int(mem) * 1024 +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Error setting guest memory."), e) + + return True +@@ -1968,7 +1968,7 @@ class vmmCreate(vmmGObjectUI): + if storage_enabled: + disk = self._addstorage.validate_storage(self._guest.name, + path=path) +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Storage parameter error."), e) + + if disk is False: +@@ -1999,7 +1999,7 @@ class vmmCreate(vmmGObjectUI): + if name != self._guest.name: + try: + self._guest.name = name +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Invalid guest name"), str(e)) + if self._is_default_storage(): + logging.debug("User changed VM name and using default " +@@ -2197,7 +2197,7 @@ class vmmCreate(vmmGObjectUI): + logging.debug("User requested 'customize', launching dialog") + try: + self._show_customize_dialog(guest) +- except Exception, e: ++ except Exception as e: + self._undo_finish_cursor(self.topwin) + self.err.show_err(_("Error starting installation: ") + str(e)) + return +@@ -2350,7 +2350,7 @@ class vmmCreate(vmmGObjectUI): + try: + logging.debug("Install should be completed, starting VM.") + vm.startup() +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error continue install: %s") % str(e)) + + return True +diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py +index 82e69cb..ac85998 100644 +--- a/virtManager/createinterface.py ++++ b/virtManager/createinterface.py +@@ -387,7 +387,7 @@ class vmmCreateInterface(vmmGObjectUI): + Interface.INTERFACE_TYPE_VLAN : "vlan", + } + +- for key, value in type_dict.items(): ++ for key, value in list(type_dict.items()): + do_show = (key == itype) + self.widget("%s-label" % value).set_visible(do_show) + self.widget("%s-box" % value).set_visible(do_show) +@@ -544,24 +544,24 @@ class vmmCreateInterface(vmmGObjectUI): + active, None, iface.get_mac()] + row_dict[name] = row + +- for name, row in nodedevs.items(): ++ for name, row in list(nodedevs.items()): + try: + key = Interface(self.conn.get_backend()) + key.type = Interface.INTERFACE_TYPE_ETHERNET + key.name = name +- except Exception, e: ++ except Exception as e: + logging.debug("Error creating stub interface '%s': %s", + name, e) + continue + row[INTERFACE_ROW_KEY] = key + row_dict[name] = row + +- for row in row_dict.values(): ++ for row in list(row_dict.values()): + name = row[INTERFACE_ROW_NAME] + row[INTERFACE_ROW_IN_USE_BY] = self.iface_in_use_by(self.conn, + name) + +- for row in row_dict.values(): ++ for row in list(row_dict.values()): + model.append(row) + + def get_default_name(self): +@@ -907,7 +907,7 @@ class vmmCreateInterface(vmmGObjectUI): + elif pagenum == PAGE_DETAILS: + return self.validate_details_page() + +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Uncaught error validating install " + "parameters: %s") % str(e)) + return +@@ -1011,7 +1011,7 @@ class vmmCreateInterface(vmmGObjectUI): + iobj.validate() + + self.interface = iobj +- except Exception, e: ++ except Exception as e: + return self.err.val_err( + _("Error setting interface parameters."), e) + +@@ -1078,7 +1078,7 @@ class vmmCreateInterface(vmmGObjectUI): + def validate_ip_info(self): + try: + self.build_ip_info() +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error validating IP configuration: %s") % + str(e)) + return False +diff --git a/virtManager/createnet.py b/virtManager/createnet.py +index 9fdbc45..fadff53 100644 +--- a/virtManager/createnet.py ++++ b/virtManager/createnet.py +@@ -34,7 +34,7 @@ from .baseclass import vmmGObjectUI + (PAGE_NAME, + PAGE_IPV4, + PAGE_IPV6, +-PAGE_MISC) = range(4) ++PAGE_MISC) = list(range(4)) + + PAGE_MAX = PAGE_MISC + +@@ -257,7 +257,7 @@ class vmmCreateNetwork(vmmGObjectUI): + try: + net = self._build_xmlstub() + net.name = self.widget("net-name").get_text() +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Invalid network name"), str(e)) + + return True +@@ -751,7 +751,7 @@ class vmmCreateNetwork(vmmGObjectUI): + + try: + net = self._build_xmlobj() +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error generating network xml: %s") % str(e)) + return + +diff --git a/virtManager/createpool.py b/virtManager/createpool.py +index b17c083..b87fd87 100644 +--- a/virtManager/createpool.py ++++ b/virtManager/createpool.py +@@ -398,7 +398,7 @@ class vmmCreatePool(vmmGObjectUI): + self.finish() + else: + notebook.next_page() +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Uncaught error validating input: %s") % str(e)) + return + +@@ -499,7 +499,7 @@ class vmmCreatePool(vmmGObjectUI): + else: + self._pool = self._make_stub_pool() + self._pool.name = self.get_config_name() +- except ValueError, e: ++ except ValueError as e: + return self.err.val_err(_("Pool Parameter Error"), e) + + return True +@@ -529,7 +529,7 @@ class vmmCreatePool(vmmGObjectUI): + self._pool.source_name = source_name + + self._pool.validate() +- except ValueError, e: ++ except ValueError as e: + return self.err.val_err(_("Pool Parameter Error"), e) + + buildval = self.widget("pool-build").get_active() +diff --git a/virtManager/createvol.py b/virtManager/createvol.py +index 68560a4..836e085 100644 +--- a/virtManager/createvol.py ++++ b/virtManager/createvol.py +@@ -291,7 +291,7 @@ class vmmCreateVolume(vmmGObjectUI): + try: + if not self.validate(): + return +- except Exception, e: ++ except Exception as e: + self.show_err(_("Uncaught error validating input: %s") % str(e)) + return + +@@ -342,7 +342,7 @@ class vmmCreateVolume(vmmGObjectUI): + if fmt: + self.vol.format = fmt + self.vol.validate() +- except ValueError, e: ++ except ValueError as e: + return self.val_err(_("Volume Parameter Error"), e) + return True + +diff --git a/virtManager/delete.py b/virtManager/delete.py +index 8113e14..107cbac 100644 +--- a/virtManager/delete.py ++++ b/virtManager/delete.py +@@ -180,7 +180,7 @@ class vmmDeleteDialog(vmmGObjectUI): + logging.debug("Deleting path: %s", path) + meter.start(text=_("Deleting path '%s'") % path) + self._async_delete_path(conn, path, meter) +- except Exception, e: ++ except Exception as e: + storage_errors.append((str(e), + "".join(traceback.format_exc()))) + meter.end(0) +@@ -188,7 +188,7 @@ class vmmDeleteDialog(vmmGObjectUI): + logging.debug("Removing VM '%s'", self.vm.get_name()) + self.vm.delete() + +- except Exception, e: ++ except Exception as e: + error = (_("Error deleting virtual machine '%s': %s") % + (self.vm.get_name(), str(e))) + details = "".join(traceback.format_exc()) +@@ -392,7 +392,7 @@ def do_we_default(conn, vm_name, vol, path, ro, shared, is_media): + namestr = append_str(namestr, name, delim="\n- ") + info = append_str(info, _("Storage is in use by the following " + "virtual machines:\n- %s " % namestr)) +- except Exception, e: ++ except Exception as e: + logging.exception("Failed checking disk conflict: %s", str(e)) + + return (not info, info) +diff --git a/virtManager/details.py b/virtManager/details.py +index b2f451d..487541a 100644 +--- a/virtManager/details.py ++++ b/virtManager/details.py +@@ -104,7 +104,7 @@ EDIT_FS, + + EDIT_HOSTDEV_ROMBAR, + +-) = range(1, 45) ++) = list(range(1, 45)) + + + # Columns in hw list model +@@ -112,7 +112,7 @@ EDIT_HOSTDEV_ROMBAR, + HW_LIST_COL_ICON_NAME, + HW_LIST_COL_ICON_SIZE, + HW_LIST_COL_TYPE, +- HW_LIST_COL_DEVICE) = range(5) ++ HW_LIST_COL_DEVICE) = list(range(5)) + + # Types for the hw list model: numbers specify what order they will be listed + (HW_LIST_TYPE_GENERAL, +@@ -136,7 +136,7 @@ EDIT_HOSTDEV_ROMBAR, + HW_LIST_TYPE_REDIRDEV, + HW_LIST_TYPE_TPM, + HW_LIST_TYPE_RNG, +- HW_LIST_TYPE_PANIC) = range(22) ++ HW_LIST_TYPE_PANIC) = list(range(22)) + + remove_pages = [HW_LIST_TYPE_NIC, HW_LIST_TYPE_INPUT, + HW_LIST_TYPE_GRAPHICS, HW_LIST_TYPE_SOUND, HW_LIST_TYPE_CHAR, +@@ -151,12 +151,12 @@ remove_pages = [HW_LIST_TYPE_NIC, HW_LIST_TYPE_INPUT, + BOOT_LABEL, + BOOT_ICON, + BOOT_ACTIVE, +- BOOT_CAN_SELECT) = range(5) ++ BOOT_CAN_SELECT) = list(range(5)) + + # Main tab pages + (DETAILS_PAGE_DETAILS, + DETAILS_PAGE_CONSOLE, +- DETAILS_PAGE_SNAPSHOTS) = range(3) ++ DETAILS_PAGE_SNAPSHOTS) = list(range(3)) + + _remove_tooltip = _("Remove this device from the virtual machine") + +@@ -707,7 +707,7 @@ class vmmDetails(vmmGObjectUI): + rmHW.connect("activate", self.remove_xml_dev) + + self._addhwmenuitems = {"add" : addHW, "remove" : rmHW} +- for i in self._addhwmenuitems.values(): ++ for i in list(self._addhwmenuitems.values()): + self.addhwmenu.add(i) + + self.widget("hw-panel").set_show_tabs(False) +@@ -1187,7 +1187,7 @@ class vmmDetails(vmmGObjectUI): + self.refresh_panic_page() + else: + pagetype = -1 +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error refreshing hardware page: %s") % str(e)) + # Don't return, we want the rest of the bits to run regardless + +@@ -1376,7 +1376,7 @@ class vmmDetails(vmmGObjectUI): + self.addhw = vmmAddHardware(self.vm, self.is_customize_dialog) + + self.addhw.show(self.topwin) +- except Exception, e: ++ except Exception as e: + self.err.show_err((_("Error launching hardware dialog: %s") % + str(e))) + +@@ -1457,7 +1457,7 @@ class vmmDetails(vmmGObjectUI): + ignore = src + try: + return self._take_screenshot() +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error taking screenshot: %s") % str(e)) + + def control_vm_usb_redirection(self, src): +@@ -1484,7 +1484,7 @@ class vmmDetails(vmmGObjectUI): + 'tEXt::Generator Version': self.config.get_appversion(), + } + +- ret = image.save_to_bufferv('png', metadata.keys(), metadata.values()) ++ ret = image.save_to_bufferv('png', list(metadata.keys()), list(metadata.values())) + # On Fedora 19, ret is (bool, str) + # Someday the bindings might be fixed to just return the str, try + # and future proof it a bit +@@ -1780,7 +1780,7 @@ class vmmDetails(vmmGObjectUI): + def _eject_media(self, disk): + try: + self._change_storage_media(disk, None) +- except Exception, e: ++ except Exception as e: + self.err.show_err((_("Error disconnecting media: %s") % e)) + + def _insert_media(self, disk): +@@ -1801,7 +1801,7 @@ class vmmDetails(vmmGObjectUI): + dialog.disk = disk + + dialog.show(self.topwin) +- except Exception, e: ++ except Exception as e: + self.err.show_err((_("Error launching media dialog: %s") % e)) + return + +@@ -1867,7 +1867,7 @@ class vmmDetails(vmmGObjectUI): + ret = self.config_hostdev_apply(key) + else: + ret = False +- except Exception, e: ++ except Exception as e: + return self.err.show_err(_("Error apply changes: %s") % e) + + if ret is not False: +@@ -1999,7 +1999,7 @@ class vmmDetails(vmmGObjectUI): + auto = self.widget("boot-autostart") + try: + self.vm.set_autostart(auto.get_active()) +- except Exception, e: ++ except Exception as e: + self.err.show_err( + (_("Error changing autostart value: %s") % str(e))) + return False +@@ -2227,7 +2227,7 @@ class vmmDetails(vmmGObjectUI): + # Define the change + try: + self.vm.remove_device(devobj) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error Removing Device: %s") % str(e)) + return + +@@ -2236,7 +2236,7 @@ class vmmDetails(vmmGObjectUI): + try: + if self.vm.is_active(): + self.vm.detach_device(devobj) +- except Exception, e: ++ except Exception as e: + logging.debug("Device could not be hotUNplugged: %s", str(e)) + detach_err = (str(e), "".join(traceback.format_exc())) + +@@ -2266,7 +2266,7 @@ class vmmDetails(vmmGObjectUI): + try: + if self.is_visible(): + self.vm.ensure_latest_xml() +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + if util.exception_is_libvirt_error(e, "VIR_ERR_NO_DOMAIN"): + self.close() + return +@@ -2775,7 +2775,7 @@ class vmmDetails(vmmGObjectUI): + set_visible("rng-bind-host", is_egd and (udp or bind)) + set_visible("rng-bind-service", is_egd and (udp or bind)) + +- for k, prop in values.items(): ++ for k, prop in list(values.items()): + val = "-" + if dev.supports_property(prop): + val = getattr(dev, prop) or "-" +@@ -3135,7 +3135,7 @@ class vmmDetails(vmmGObjectUI): + for dev in self.vm.get_panic_devices(): + update_hwlist(HW_LIST_TYPE_PANIC, dev) + +- devs = range(len(hw_list_model)) ++ devs = list(range(len(hw_list_model))) + devs.reverse() + for i in devs: + _iter = hw_list_model.iter_nth_child(None, i) +diff --git a/virtManager/domain.py b/virtManager/domain.py +index 3185cf8..c26c49c 100644 +--- a/virtManager/domain.py ++++ b/virtManager/domain.py +@@ -1447,7 +1447,7 @@ class vmmDomain(vmmLibvirtObject): + if self._has_managed_save is None: + try: + self._has_managed_save = self._backend.hasManagedSaveImage(0) +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + if not util.exception_is_libvirt_error(e, "VIR_ERR_NO_DOMAIN"): + raise + return False +@@ -1723,7 +1723,7 @@ class vmmDomain(vmmLibvirtObject): + def get_cache_dir(self): + ret = os.path.join(self.conn.get_cache_dir(), self.get_uuid()) + if not os.path.exists(ret): +- os.makedirs(ret, 0755) ++ os.makedirs(ret, 0o755) + return ret + + +@@ -1753,7 +1753,7 @@ class vmmDomain(vmmLibvirtObject): + if io: + rx += io[0] + tx += io[4] +- except libvirt.libvirtError, err: ++ except libvirt.libvirtError as err: + if util.is_error_nosupport(err): + logging.debug("Net stats not supported: %s", err) + self._stats_net_supported = False +@@ -1803,7 +1803,7 @@ class vmmDomain(vmmLibvirtObject): + if io: + rd += io[1] + wr += io[3] +- except libvirt.libvirtError, err: ++ except libvirt.libvirtError as err: + if util.is_error_nosupport(err): + logging.debug("Disk stats not supported: %s", err) + self._stats_disk_supported = False +@@ -1835,7 +1835,7 @@ class vmmDomain(vmmLibvirtObject): + secs = 5 + self._backend.setMemoryStatsPeriod(secs, + libvirt.VIR_DOMAIN_AFFECT_LIVE) +- except Exception, e: ++ except Exception as e: + logging.debug("Error setting memstats period: %s", e) + + def _sample_mem_stats(self): +@@ -1858,7 +1858,7 @@ class vmmDomain(vmmLibvirtObject): + + if "unused" in stats: + curmem = max(0, totalmem - stats.get("unused", totalmem)) +- except libvirt.libvirtError, err: ++ except libvirt.libvirtError as err: + logging.error("Error reading mem stats: %s", err) + + pcentCurrMem = (curmem / float(totalmem)) * 100 +diff --git a/virtManager/engine.py b/virtManager/engine.py +index 7e06460..3b5fad5 100644 +--- a/virtManager/engine.py ++++ b/virtManager/engine.py +@@ -20,7 +20,7 @@ + + import logging + import re +-import Queue ++import queue + import threading + import traceback + +@@ -60,7 +60,7 @@ DETAILS_CONFIG = 2 + DETAILS_CONSOLE = 3 + + (PRIO_HIGH, +- PRIO_LOW) = range(1, 3) ++ PRIO_LOW) = list(range(1, 3)) + + + class vmmEngine(vmmGObject): +@@ -104,7 +104,7 @@ class vmmEngine(vmmGObject): + target=self._handle_tick_queue, + args=()) + self._tick_thread.daemon = True +- self._tick_queue = Queue.PriorityQueue(100) ++ self._tick_queue = queue.PriorityQueue(100) + + self.inspection = None + self._create_inspection_thread() +@@ -153,7 +153,7 @@ class vmmEngine(vmmGObject): + self._application.add_action(action) + + def _default_startup(self, skip_autostart): +- uris = self.conns.keys() ++ uris = list(self.conns.keys()) + if not uris: + logging.debug("No stored URIs found.") + else: +@@ -268,7 +268,7 @@ class vmmEngine(vmmGObject): + """ + We serialize conn autostart, so polkit/ssh-askpass doesn't spam + """ +- queue = Queue.Queue() ++ queue = queue.Queue() + auto_conns = [uri for uri in self.conns + if self.conns[uri]["conn"].get_autoconnect()] + +@@ -325,7 +325,7 @@ class vmmEngine(vmmGObject): + + hvuri = conn.get_uri() + +- for connkey in self.conns[hvuri]["windowDetails"].keys(): ++ for connkey in list(self.conns[hvuri]["windowDetails"].keys()): + self.conns[hvuri]["windowDetails"][connkey].cleanup() + del(self.conns[hvuri]["windowDetails"][connkey]) + +@@ -364,7 +364,7 @@ class vmmEngine(vmmGObject): + self._add_obj_to_tick_queue(conn, True, **kwargs) + + def tick(self): +- for uri in self.conns.keys(): ++ for uri in list(self.conns.keys()): + conn = self.conns[uri]["conn"] + self._add_obj_to_tick_queue(conn, False, + stats_update=True, pollvm=True) +@@ -383,7 +383,7 @@ class vmmEngine(vmmGObject): + ignore1, ignore2, conn, kwargs = self._tick_queue.get() + try: + conn.tick_from_engine(**kwargs) +- except Exception, e: ++ except Exception as e: + tb = "".join(traceback.format_exc()) + error_msg = (_("Error polling connection '%s': %s") + % (conn.get_uri(), e)) +@@ -510,10 +510,10 @@ class vmmEngine(vmmGObject): + focus, and use that + """ + windowlist = [self.windowManager] +- for conndict in self.conns.values(): +- windowlist.extend(conndict["windowDetails"].values()) ++ for conndict in list(self.conns.values()): ++ windowlist.extend(list(conndict["windowDetails"].values())) + windowlist.extend( +- [conndict["windowHost"] for conndict in self.conns.values()]) ++ [conndict["windowHost"] for conndict in list(self.conns.values())]) + + use_win = None + for window in windowlist: +@@ -589,7 +589,7 @@ class vmmEngine(vmmGObject): + self.conns[uri]["windowClone"].cleanup() + + details = self.conns[uri]["windowDetails"] +- for win in details.values(): ++ for win in list(details.values()): + win.cleanup() + + self.conns[uri]["conn"].cleanup() +@@ -609,7 +609,7 @@ class vmmEngine(vmmGObject): + handle_id = vmmGObject.connect(self, name, callback, *args) + + if name == "conn-added": +- for uri in self.conns.keys(): ++ for uri in list(self.conns.keys()): + self.emit("conn-added", + self.conns[uri]["conn"]) + +@@ -718,7 +718,7 @@ class vmmEngine(vmmGObject): + if self.windowAbout is None: + self.windowAbout = vmmAbout() + self.windowAbout.show() +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error launching 'About' dialog: %s") % str(e)) + + def _get_preferences(self): +@@ -732,7 +732,7 @@ class vmmEngine(vmmGObject): + def _do_show_preferences(self, src): + try: + self._get_preferences().show(src.topwin) +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error launching preferences: %s") % str(e)) + + def _get_host_dialog(self, uri): +@@ -753,7 +753,7 @@ class vmmEngine(vmmGObject): + def _do_show_host(self, src, uri): + try: + self._get_host_dialog(uri).show() +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error launching host dialog: %s") % str(e)) + + +@@ -766,7 +766,7 @@ class vmmEngine(vmmGObject): + return self.connect_to_uri(uri, autoconnect, probe=True) + + def cancelled(src): +- if len(self.conns.keys()) == 0: ++ if len(list(self.conns.keys())) == 0: + self.exit_app(src) + + obj = vmmConnect() +@@ -779,7 +779,7 @@ class vmmEngine(vmmGObject): + def _do_show_connect(self, src, reset_state=True): + try: + self._get_connect_dialog().show(src.topwin, reset_state) +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error launching connect dialog: %s") % str(e)) + + def _do_edit_connect(self, src, connection): +@@ -830,7 +830,7 @@ class vmmEngine(vmmGObject): + details.activate_default_page() + + details.show() +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error launching details: %s") % str(e)) + + def _do_show_vm(self, src, uri, connkey): +@@ -882,7 +882,7 @@ class vmmEngine(vmmGObject): + try: + manager = self.get_manager() + manager.show() +- except Exception, e: ++ except Exception as e: + if not src: + raise + src.err.show_err(_("Error launching manager: %s") % str(e)) +@@ -901,7 +901,7 @@ class vmmEngine(vmmGObject): + def _do_show_create(self, src, uri): + try: + self._get_create_dialog().show(src.topwin, uri) +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error launching manager: %s") % str(e)) + + def _do_show_migrate(self, src, uri, connkey): +@@ -913,7 +913,7 @@ class vmmEngine(vmmGObject): + self.windowMigrate = vmmMigrateDialog(self) + + self.windowMigrate.show(src.topwin, vm) +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error launching migrate dialog: %s") % str(e)) + + def _do_show_clone(self, src, uri, connkey): +@@ -929,7 +929,7 @@ class vmmEngine(vmmGObject): + clone_window.set_orig_vm(orig_vm) + + clone_window.show(src.topwin) +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error setting clone parameters: %s") % str(e)) + + ########################################## +@@ -1101,7 +1101,7 @@ class vmmEngine(vmmGObject): + + try: + vm.abort_job() +- except Exception, e: ++ except Exception as e: + logging.exception("Error cancelling save job") + asyncjob.show_warning(_("Error cancelling save job: %s") % str(e)) + return +@@ -1174,7 +1174,7 @@ class vmmEngine(vmmGObject): + try: + vm.remove_saved_image() + self._do_run_domain(src, uri, connkey) +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error removing domain state: %s") + % str(e)) + +@@ -1242,5 +1242,5 @@ class vmmEngine(vmmGObject): + if not self.delete_dialog: + self.delete_dialog = vmmDeleteDialog() + self.delete_dialog.show(vm, src.topwin) +- except Exception, e: ++ except Exception as e: + src.err.show_err(_("Error launching delete dialog: %s") % str(e)) +diff --git a/virtManager/fsdetails.py b/virtManager/fsdetails.py +index 2cd49ad..1a93661 100644 +--- a/virtManager/fsdetails.py ++++ b/virtManager/fsdetails.py +@@ -321,7 +321,7 @@ class vmmFSDetails(vmmGObjectUI): + self._dev.format = fsformat + if wrpolicy: + self._dev.wrpolicy = wrpolicy +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Filesystem parameter error"), e) + + def _browse_file(self, textent, isdir=False): +diff --git a/virtManager/graphwidgets.py b/virtManager/graphwidgets.py +index ac3eab5..cac6975 100644 +--- a/virtManager/graphwidgets.py ++++ b/virtManager/graphwidgets.py +@@ -25,8 +25,8 @@ from gi.repository import Gtk + + def rect_print(name, rect): + # For debugging +- print("%s: height=%d, width=%d, x=%d, y=%d" % +- (name, rect.height, rect.width, rect.x, rect.y)) ++ print(("%s: height=%d, width=%d, x=%d, y=%d" % ++ (name, rect.height, rect.width, rect.x, rect.y))) + + + def _line_helper(cairo_ct, x, y, w, h, points, for_fill=False): +diff --git a/virtManager/host.py b/virtManager/host.py +index 9649963..4dfb6e2 100644 +--- a/virtManager/host.py ++++ b/virtManager/host.py +@@ -33,6 +33,7 @@ from .createnet import vmmCreateNetwork + from .createinterface import vmmCreateInterface + from .graphwidgets import Sparkline + from .storagelist import vmmStorageList ++from functools import reduce + + INTERFACE_PAGE_INFO = 0 + INTERFACE_PAGE_ERROR = 1 +@@ -41,11 +42,11 @@ EDIT_NET_IDS = ( + EDIT_NET_NAME, + EDIT_NET_AUTOSTART, + EDIT_NET_QOS, +-) = range(3) ++) = list(range(3)) + + EDIT_INTERFACE_IDS = ( + EDIT_INTERFACE_STARTMODE, +-) = range(200, 201) ++) = list(range(200, 201)) + + + class vmmHost(vmmGObjectUI): +@@ -407,7 +408,7 @@ class vmmHost(vmmGObjectUI): + if self.addnet is None: + self.addnet = vmmCreateNetwork(self.conn) + self.addnet.show(self.topwin) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error launching network wizard: %s") % str(e)) + + def net_apply(self): +@@ -450,7 +451,7 @@ class vmmHost(vmmGObjectUI): + dialog_type=Gtk.MessageType.INFO) + + +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error changing network settings: %s") % str(e)) + return + finally: +@@ -522,7 +523,7 @@ class vmmHost(vmmGObjectUI): + try: + net = self.conn.get_net(connkey) + self.populate_net_state(net) +- except Exception, e: ++ except Exception as e: + logging.exception(e) + self.set_net_error_page(_("Error selecting network: %s") % e) + finally: +@@ -759,7 +760,7 @@ class vmmHost(vmmGObjectUI): + if self.addinterface is None: + self.addinterface = vmmCreateInterface(self.conn) + self.addinterface.show(self.topwin) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error launching interface wizard: %s") % + str(e)) + +@@ -786,7 +787,7 @@ class vmmHost(vmmGObjectUI): + interface.get_name()) + try: + interface.set_startmode(newmode) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error setting interface startmode: %s") % + str(e)) + return +@@ -812,7 +813,7 @@ class vmmHost(vmmGObjectUI): + + try: + self.populate_interface_state(connkey) +- except Exception, e: ++ except Exception as e: + logging.exception(e) + self.set_interface_error_page(_("Error selecting interface: %s") % + e) +@@ -864,7 +865,7 @@ class vmmHost(vmmGObjectUI): + used_by = None + try: + used_by = vmmCreateInterface.iface_in_use_by(self.conn, name) +- except Exception, e: ++ except Exception as e: + logging.debug("Error looking up iface usage: %s", e) + self.widget("interface-inuseby").set_text(used_by or "-") + +diff --git a/virtManager/inspection.py b/virtManager/inspection.py +index e8b102d..9576fcd 100644 +--- a/virtManager/inspection.py ++++ b/virtManager/inspection.py +@@ -17,7 +17,7 @@ + # MA 02110-1301 USA. + # + +-from Queue import Queue, Empty ++from queue import Queue, Empty + from threading import Thread + import logging + import re +@@ -116,7 +116,7 @@ class vmmInspection(vmmGObject): + + # Any VMs we've not seen yet? If so, process them. + def _process_vms(self): +- for conn in self._conns.itervalues(): ++ for conn in self._conns.values(): + for vm in conn.list_vms(): + if not conn.is_active(): + break +diff --git a/virtManager/keyring.py b/virtManager/keyring.py +index d3a300a..8d24f9d 100644 +--- a/virtManager/keyring.py ++++ b/virtManager/keyring.py +@@ -110,10 +110,10 @@ class vmmKeyring(object): + label = iface.get_cached_property("Label").unpack().strip("'") + dbusattrs = iface.get_cached_property("Attributes").unpack() + +- secret = u"".join([unichr(c) for c in secretbytes]) ++ secret = "".join([chr(c) for c in secretbytes]) + + attrs = {} +- for key, val in dbusattrs.items(): ++ for key, val in list(dbusattrs.items()): + if key not in ["hvuri", "uuid"]: + continue + attrs["%s" % key] = "%s" % val +diff --git a/virtManager/libvirtobject.py b/virtManager/libvirtobject.py +index 3304401..31299b8 100644 +--- a/virtManager/libvirtobject.py ++++ b/virtManager/libvirtobject.py +@@ -271,7 +271,7 @@ class vmmLibvirtObject(vmmGObject): + # status = None forces a signal to be emitted + self.__status = None + self._refresh_status() +- except Exception, e: ++ except Exception as e: + # If we hit an exception here, it's often that the object + # disappeared, so request the poll loop to be updated + logging.debug("Error refreshing %s from events: %s", self, e) +diff --git a/virtManager/manager.py b/virtManager/manager.py +index d70f4c4..e5e65e6 100644 +--- a/virtManager/manager.py ++++ b/virtManager/manager.py +@@ -48,7 +48,7 @@ ROW_IS_CONN_CONNECTED, + ROW_IS_VM, + ROW_IS_VM_RUNNING, + ROW_COLOR, +-ROW_INSPECTION_OS_ICON) = range(11) ++ROW_INSPECTION_OS_ICON) = list(range(11)) + + # Columns in the tree view + (COL_NAME, +@@ -56,7 +56,7 @@ COL_GUEST_CPU, + COL_HOST_CPU, + COL_MEM, + COL_DISK, +-COL_NETWORK) = range(6) ++COL_NETWORK) = list(range(6)) + + + def _style_get_prop(widget, propname): +@@ -744,7 +744,7 @@ class vmmManager(vmmGObjectUI): + + desc = vm.get_description() + row[ROW_HINT] = util.xml_escape(desc) +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + if util.exception_is_libvirt_error(e, "VIR_ERR_NO_DOMAIN"): + return + raise +diff --git a/virtManager/mediacombo.py b/virtManager/mediacombo.py +index 9446dfb..d31e345 100644 +--- a/virtManager/mediacombo.py ++++ b/virtManager/mediacombo.py +@@ -33,7 +33,7 @@ class vmmMediaCombo(vmmGObjectUI): + (OPTICAL_DEV_PATH, + OPTICAL_LABEL, + OPTICAL_HAS_MEDIA, +- OPTICAL_DEV_KEY) = range(OPTICAL_FIELDS) ++ OPTICAL_DEV_KEY) = list(range(OPTICAL_FIELDS)) + + def __init__(self, conn, builder, topwin, media_type): + vmmGObjectUI.__init__(self, None, None, builder=builder, topwin=topwin) +diff --git a/virtManager/migrate.py b/virtManager/migrate.py +index ca430dd..6e1bf2b 100644 +--- a/virtManager/migrate.py ++++ b/virtManager/migrate.py +@@ -36,7 +36,7 @@ from .domain import vmmDomain + NUM_COLS = 3 + (COL_LABEL, + COL_URI, +- COL_CAN_MIGRATE) = range(NUM_COLS) ++ COL_CAN_MIGRATE) = list(range(NUM_COLS)) + + + class vmmMigrateDialog(vmmGObjectUI): +@@ -310,7 +310,7 @@ class vmmMigrateDialog(vmmGObjectUI): + model.clear() + + rows = [] +- for conn in self._conns.values(): ++ for conn in list(self._conns.values()): + rows.append(self._build_dest_row(conn)) + + if not any([row[COL_CAN_MIGRATE] for row in rows]): +@@ -378,7 +378,7 @@ class vmmMigrateDialog(vmmGObjectUI): + uri = self.widget("migrate-tunnel-uri").get_text() + else: + uri = self._build_regular_migrate_uri() +- except Exception, e: ++ except Exception as e: + details = "".join(traceback.format_exc()) + self.err.show_err((_("Uncaught error validating input: %s") % + str(e)), +@@ -413,7 +413,7 @@ class vmmMigrateDialog(vmmGObjectUI): + + try: + vm.abort_job() +- except Exception, e: ++ except Exception as e: + logging.exception("Error cancelling migrate job") + asyncjob.show_warning(_("Error cancelling migrate job: %s") % e) + return +diff --git a/virtManager/netlist.py b/virtManager/netlist.py +index bdadbf3..afea757 100644 +--- a/virtManager/netlist.py ++++ b/virtManager/netlist.py +@@ -194,7 +194,7 @@ class vmmNetworkList(vmmGObjectUI): + for slave in slave_names: + netdevs.pop(slave, None) + +- for name, is_bridge, slave_names in netdevs.values(): ++ for name, is_bridge, slave_names in list(netdevs.values()): + if ((name in vnet_taps) or + (name in [v + "-nic" for v in vnet_bridges]) or + (name in skip_ifaces)): +@@ -360,7 +360,7 @@ class vmmNetworkList(vmmGObjectUI): + try: + netobj.start() + logging.info("Started network '%s'", devname) +- except Exception, e: ++ except Exception as e: + return self.err.show_err(_("Could not start virtual network " + "'%s': %s") % (devname, str(e))) + +@@ -385,7 +385,7 @@ class vmmNetworkList(vmmGObjectUI): + net.virtualport.typeid = vport_typeid or None + net.virtualport.typeidversion = vport_idver or None + net.virtualport.instanceid = vport_instid or None +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Error with network parameters."), e) + + # Make sure there is no mac address collision +diff --git a/virtManager/network.py b/virtManager/network.py +index cb26049..f6a49ee 100644 +--- a/virtManager/network.py ++++ b/virtManager/network.py +@@ -103,7 +103,7 @@ class vmmNetwork(vmmLibvirtObject): + def set_qos(self, **kwargs): + xmlobj = self._make_xmlobj_to_define() + q = xmlobj.bandwidth +- for key, val in kwargs.items(): ++ for key, val in list(kwargs.items()): + setattr(q, key, val) + + self._redefine_xmlobj(xmlobj) +diff --git a/virtManager/packageutils.py b/virtManager/packageutils.py +index 31246e6..ddb15f6 100644 +--- a/virtManager/packageutils.py ++++ b/virtManager/packageutils.py +@@ -61,7 +61,7 @@ def check_packagekit(parent, errbox, packages): + packagekit_install(parent, packages) + else: + logging.debug("Nothing to install") +- except Exception, e: ++ except Exception as e: + # PackageKit frontend should report an error for us, so just log + # the actual error + logging.debug("Error talking to PackageKit: %s", str(e), exc_info=True) +diff --git a/virtManager/preferences.py b/virtManager/preferences.py +index 2818b68..fd71907 100644 +--- a/virtManager/preferences.py ++++ b/virtManager/preferences.py +@@ -121,7 +121,7 @@ class vmmPreferences(vmmGObjectUI): + } + model.append([-1, _("System default (%s)") % + vals[self.config.default_console_resizeguest]]) +- for key, val in vals.items(): ++ for key, val in list(vals.items()): + model.append([key, val]) + combo.set_model(model) + uiutil.init_combo_text_column(combo, 1) +diff --git a/virtManager/serialcon.py b/virtManager/serialcon.py +index 1711f03..87ac810 100644 +--- a/virtManager/serialcon.py ++++ b/virtManager/serialcon.py +@@ -411,7 +411,7 @@ class vmmSerialConsole(vmmGObject): + self.console.open(self.lookup_dev(), self.terminal) + self.box.set_current_page(0) + return True +- except Exception, e: ++ except Exception as e: + logging.exception("Error opening serial console") + self.show_error(_("Error connecting to text console: %s") % e) + try: +diff --git a/virtManager/snapshots.py b/virtManager/snapshots.py +index 825ee59..299d5e7 100644 +--- a/virtManager/snapshots.py ++++ b/virtManager/snapshots.py +@@ -22,7 +22,7 @@ import datetime + import glob + import logging + import os +-import StringIO ++import io + + from gi.repository import Gdk + from gi.repository import GdkPixbuf +@@ -44,7 +44,7 @@ mimemap = { + + + def _mime_to_ext(val, reverse=False): +- for m, e in mimemap.items(): ++ for m, e in list(mimemap.items()): + if val == m and not reverse: + return e + if val == e and reverse: +@@ -221,7 +221,7 @@ class vmmSnapshotPage(vmmGObjectUI): + + try: + snapshots = self.vm.list_snapshots() +- except Exception, e: ++ except Exception as e: + logging.exception(e) + self._set_error_page(_("Error refreshing snapshot list: %s") % + str(e)) +@@ -392,7 +392,7 @@ class vmmSnapshotPage(vmmGObjectUI): + flags = 0 + mime = self.vm.get_backend().screenshot(stream, screen, flags) + +- ret = StringIO.StringIO() ++ ret = io.StringIO() + def _write_cb(_stream, data, userdata): + ignore = stream + ignore = userdata +@@ -481,7 +481,7 @@ class vmmSnapshotPage(vmmGObjectUI): + newsnap.validate() + newsnap.get_xml_config() + return newsnap +- except Exception, e: ++ except Exception as e: + return self.err.val_err(_("Error validating snapshot: %s") % e) + + def _get_screenshot_data_for_save(self): +@@ -507,7 +507,7 @@ class vmmSnapshotPage(vmmGObjectUI): + basesn = os.path.join(cachedir, "snap-screenshot-%s" % name) + + # Remove any pre-existing screenshots so we don't show stale data +- for ext in mimemap.values(): ++ for ext in list(mimemap.values()): + p = basesn + "." + ext + if os.path.exists(basesn + "." + ext): + os.unlink(p) +@@ -667,6 +667,6 @@ class vmmSnapshotPage(vmmGObjectUI): + + try: + self._set_snapshot_state(snap[0]) +- except Exception, e: ++ except Exception as e: + logging.exception(e) + self._set_error_page(_("Error selecting snapshot: %s") % str(e)) +diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py +index 62eae42..bcced6a 100644 +--- a/virtManager/sshtunnels.py ++++ b/virtManager/sshtunnels.py +@@ -19,13 +19,14 @@ + + import logging + import os +-import Queue ++import queue + import socket + import signal + import threading + import ipaddr + + from .baseclass import vmmGObject ++from functools import reduce + + + class ConnectionInfo(object): +@@ -121,7 +122,7 @@ class _TunnelScheduler(object): + """ + def __init__(self): + self._thread = None +- self._queue = Queue.Queue() ++ self._queue = queue.Queue() + self._lock = threading.Lock() + + def _handle_queue(self): +diff --git a/virtManager/storagelist.py b/virtManager/storagelist.py +index c16cf5c..2e2398c 100644 +--- a/virtManager/storagelist.py ++++ b/virtManager/storagelist.py +@@ -36,7 +36,7 @@ from .createvol import vmmCreateVolume + EDIT_POOL_IDS = ( + EDIT_POOL_NAME, + EDIT_POOL_AUTOSTART, +-) = range(2) ++) = list(range(2)) + + VOL_NUM_COLUMNS = 7 + (VOL_COLUMN_KEY, +@@ -45,13 +45,13 @@ VOL_NUM_COLUMNS = 7 + VOL_COLUMN_SIZESTR, + VOL_COLUMN_FORMAT, + VOL_COLUMN_INUSEBY, +- VOL_COLUMN_SENSITIVE) = range(VOL_NUM_COLUMNS) ++ VOL_COLUMN_SENSITIVE) = list(range(VOL_NUM_COLUMNS)) + + POOL_NUM_COLUMNS = 4 + (POOL_COLUMN_CONNKEY, + POOL_COLUMN_LABEL, + POOL_COLUMN_ISACTIVE, +- POOL_COLUMN_PERCENT) = range(POOL_NUM_COLUMNS) ++ POOL_COLUMN_PERCENT) = list(range(POOL_NUM_COLUMNS)) + + ICON_RUNNING = "state_running" + ICON_SHUTOFF = "state_shutoff" +@@ -517,7 +517,7 @@ class vmmStorageList(vmmGObjectUI): + + try: + self._populate_pool_state(connkey) +- except Exception, e: ++ except Exception as e: + logging.exception(e) + self._set_storage_error_page(_("Error selecting pool: %s") % e) + self._disable_pool_apply() +@@ -627,7 +627,7 @@ class vmmStorageList(vmmGObjectUI): + self._addpool = vmmCreatePool(self.conn) + self._addpool.connect("pool-created", self._pool_created) + self._addpool.show(self.topwin) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error launching pool wizard: %s") % str(e)) + + def _pool_delete(self, src): +@@ -671,7 +671,7 @@ class vmmStorageList(vmmGObjectUI): + if EDIT_POOL_NAME in self._active_edits: + pool.define_name(self.widget("pool-name-entry").get_text()) + self.idle_add(self._populate_pools) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error changing pool settings: %s") % str(e)) + return + +@@ -710,7 +710,7 @@ class vmmStorageList(vmmGObjectUI): + self._addvol.set_modal(self.topwin.get_modal()) + self._addvol.set_name_hint(self._name_hint) + self._addvol.show(self.topwin) +- except Exception, e: ++ except Exception as e: + self.err.show_err(_("Error launching volume wizard: %s") % str(e)) + + def _vol_delete(self, src_ignore): +diff --git a/virtManager/storagepool.py b/virtManager/storagepool.py +index b099fbe..18ce0e1 100644 +--- a/virtManager/storagepool.py ++++ b/virtManager/storagepool.py +@@ -47,7 +47,7 @@ class vmmStorageVolume(vmmLibvirtObject): + def _XMLDesc(self, flags): + try: + return self._backend.XMLDesc(flags) +- except Exception, e: ++ except Exception as e: + logging.debug("XMLDesc for vol=%s failed: %s", + self._backend.key(), e) + raise +diff --git a/virtManager/systray.py b/virtManager/systray.py +index 07bb6bc..e558bcf 100644 +--- a/virtManager/systray.py ++++ b/virtManager/systray.py +@@ -199,13 +199,13 @@ class vmmSystray(vmmGObject): + + def repopulate_menu_list(self): + # Build sorted connection list +- connsort = self.conn_menuitems.keys() ++ connsort = list(self.conn_menuitems.keys()) + connsort.sort() + connsort.reverse() + + # Empty conn list + for child in self.systray_menu.get_children(): +- if child in self.conn_menuitems.values(): ++ if child in list(self.conn_menuitems.values()): + self.systray_menu.remove(child) + + # Build sorted conn list +@@ -265,7 +265,7 @@ class vmmSystray(vmmGObject): + for vm in conn.list_vms(): + vm_mappings[vm.get_name()] = vm.get_connkey() + +- vm_names = vm_mappings.keys() ++ vm_names = list(vm_mappings.keys()) + vm_names.sort() + + if len(vm_names) == 0: +diff --git a/virtManager/viewers.py b/virtManager/viewers.py +index 403c316..6635e7f 100644 +--- a/virtManager/viewers.py ++++ b/virtManager/viewers.py +@@ -419,7 +419,7 @@ class VNCViewer(Viewer): + + seq = GtkVnc.GrabSequence.new(keys) + self._display.set_grab_keys(seq) +- except Exception, e: ++ except Exception as e: + logging.debug("Error when getting the grab keys combination: %s", + str(e)) + +@@ -473,7 +473,7 @@ class VNCViewer(Viewer): + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + sock.connect(self._ginfo.gsocket) + self._sockfd = sock +- except Exception, e: ++ except Exception as e: + raise RuntimeError(_("Error opening socket path '%s': %s") % + (self._ginfo.gsocket, e)) + +@@ -677,7 +677,7 @@ class SpiceViewer(Viewer): + + seq = SpiceClientGtk.GrabSequence.new(keys) + self._display.set_grab_keys(seq) +- except Exception, e: ++ except Exception as e: + logging.debug("Error when getting the grab keys combination: %s", + str(e)) + +diff --git a/virtcli/cliconfig.py b/virtcli/cliconfig.py +index ef66ba4..c87bb8b 100644 +--- a/virtcli/cliconfig.py ++++ b/virtcli/cliconfig.py +@@ -21,11 +21,11 @@ + Configuration variables that can be set at build time + """ + +-import ConfigParser ++import configparser + import os + + +-_cfg = ConfigParser.ConfigParser() ++_cfg = configparser.ConfigParser() + _filepath = os.path.abspath(__file__) + _srcdir = os.path.abspath(os.path.join(os.path.dirname(_filepath), "..")) + _cfgpath = os.path.join(os.path.dirname(_filepath), "cli.cfg") +@@ -46,7 +46,7 @@ def _get_param(name, default): + return default + try: + return _cfg.get("config", name) +- except (ConfigParser.NoOptionError, ConfigParser.NoSectionError): ++ except (configparser.NoOptionError, configparser.NoSectionError): + return default + + +diff --git a/virtconv/formats.py b/virtconv/formats.py +index c253bd1..1f0f838 100644 +--- a/virtconv/formats.py ++++ b/virtconv/formats.py +@@ -202,7 +202,7 @@ class VirtConverter(object): + if print_cb == -1 or print_cb is None: + def cb(msg): + if print_cb == -1: +- print msg ++ print(msg) + self.print_cb = cb + else: + self.print_cb = print_cb +diff --git a/virtconv/ovf.py b/virtconv/ovf.py +index fa657d4..de29a85 100644 +--- a/virtconv/ovf.py ++++ b/virtconv/ovf.py +@@ -90,7 +90,7 @@ def node_list(node): + child = node.children + while child: + child_list.append(child) +- child = child.next ++ child = child.__next__ + return child_list + + +@@ -269,7 +269,7 @@ def _import_file(doc, ctx, conn, input_file): + + if not bool_val(env_node.prop("required")): + continue +- raise StandardError(_("OVF section '%s' is listed as " ++ raise Exception(_("OVF section '%s' is listed as " + "required, but parser doesn't know " + "how to handle it.") % + env_node.name) +@@ -370,7 +370,7 @@ class ovf_parser(parser_class): + + try: + return _xml_parse_wrapper(xml, parse_cb) +- except Exception, e: ++ except Exception as e: + logging.debug("Error parsing OVF XML: %s", str(e)) + + return False +diff --git a/virtconv/vmx.py b/virtconv/vmx.py +index aa99e35..1da7cc5 100644 +--- a/virtconv/vmx.py ++++ b/virtconv/vmx.py +@@ -83,7 +83,7 @@ class _VMXFile(object): + try: + lineobj = _VMXLine(line) + self.lines.append(lineobj) +- except Exception, e: ++ except Exception as e: + raise Exception(_("Syntax error at line %d: %s\n%s") % + (len(self.lines) + 1, line.strip(), e)) + +@@ -270,7 +270,7 @@ class vmx_parser(parser_class): + + def _find_keys(prefixes): + ret = [] +- for key, value in config.items(): ++ for key, value in list(config.items()): + for p in util.listify(prefixes): + if key.startswith(p): + ret.append((key, value)) +diff --git a/virtinst/cli.py b/virtinst/cli.py +index 432640b..878b1f1 100644 +--- a/virtinst/cli.py ++++ b/virtinst/cli.py +@@ -192,8 +192,8 @@ def setupLogging(appname, debug_stdout, do_quiet, cli_app=True): + raise RuntimeError("No write access to directory %s" % vi_dir) + + try: +- os.makedirs(vi_dir, 0751) +- except IOError, e: ++ os.makedirs(vi_dir, 0o751) ++ except IOError as e: + raise RuntimeError("Could not create directory %s: %s" % + (vi_dir, e)) + +@@ -201,7 +201,7 @@ def setupLogging(appname, debug_stdout, do_quiet, cli_app=True): + os.path.exists(logfile) and + not os.access(logfile, os.W_OK)): + raise RuntimeError("No write access to logfile %s" % logfile) +- except Exception, e: ++ except Exception as e: + logging.warning("Error setting up logfile: %s", e) + logfile = None + +@@ -284,7 +284,7 @@ def _do_creds_authname(creds): + + res = cred[retindex] + if credtype == libvirt.VIR_CRED_AUTHNAME: +- res = raw_input(prompt) ++ res = input(prompt) + elif credtype == libvirt.VIR_CRED_PASSPHRASE: + import getpass + res = getpass.getpass(prompt) +@@ -314,12 +314,12 @@ def fail(msg, do_exit=True): + + def print_stdout(msg, do_force=False): + if do_force or not get_global_state().quiet: +- print msg ++ print(msg) + + + def print_stderr(msg): + logging.debug(msg) +- print >> sys.stderr, msg ++ print(msg, file=sys.stderr) + + + def _fail_exit(): +@@ -465,7 +465,7 @@ def connect_console(guest, consolecb, wait): + # If we connected the console, wait for it to finish + try: + os.waitpid(child, 0) +- except OSError, e: ++ except OSError as e: + logging.debug("waitpid: %s: %s", e.errno, e.message) + + +@@ -830,7 +830,7 @@ class _VirtCLIArgument(object): + + VirtAddArg.attrname = attrname + VirtAddArg.cliname = cliname +- for key, val in kwargs.items(): ++ for key, val in list(kwargs.items()): + # getattr for validation + getattr(VirtAddArg, key) + setattr(VirtAddArg, key, val) +@@ -1068,10 +1068,10 @@ class VirtCLIParser(object): + """ + Print out all _param names, triggered via ex. --disk help + """ +- print "--%s options:" % cls.cli_arg_name ++ print("--%s options:" % cls.cli_arg_name) + for arg in sorted(cls._virtargs, key=lambda p: p.cliname): +- print " %s" % arg.cliname +- print ++ print(" %s" % arg.cliname) ++ print() + + + def __init__(self, guest, optstr): +@@ -1112,7 +1112,7 @@ class VirtCLIParser(object): + """ + ret = [] + for param in self._virtargs: +- for key in optdict.keys(): ++ for key in list(optdict.keys()): + if param.match_name(key): + ret.append(param(key, optdict.pop(key))) + return ret +@@ -1124,7 +1124,7 @@ class VirtCLIParser(object): + passed an invalid argument such as --disk idontexist=foo + """ + if optdict: +- fail(_("Unknown options %s") % optdict.keys()) ++ fail(_("Unknown options %s") % list(optdict.keys())) + + def _parse(self, inst): + """ +@@ -1174,7 +1174,7 @@ class VirtCLIParser(object): + self.guest.add_child(obj) + + ret += util.listify(objs) +- except Exception, e: ++ except Exception as e: + logging.debug("Exception parsing inst=%s optstr=%s", + inst, self.optstr, exc_info=True) + fail(_("Error: --%(cli_arg_name)s %(options)s: %(err)s") % +@@ -1205,7 +1205,7 @@ class VirtCLIParser(object): + if valid: + ret.append(inst) + self._check_leftover_opts(optdict) +- except Exception, e: ++ except Exception as e: + logging.debug("Exception parsing inst=%s optstr=%s", + inst, self.optstr, exc_info=True) + fail(_("Error: --%(cli_arg_name)s %(options)s: %(err)s") % +@@ -1430,7 +1430,7 @@ class ParserCPU(VirtCLIParser): + + def _parse(self, inst): + # Convert +feature, -feature into expected format +- for key, value in self.optdict.items(): ++ for key, value in list(self.optdict.items()): + policy = None + if value or len(key) == 1: + continue +@@ -1547,7 +1547,7 @@ class ParserBoot(VirtCLIParser): + def _parse(self, inst): + # Build boot order + boot_order = [] +- for cliname in self.optdict.keys(): ++ for cliname in list(self.optdict.keys()): + if cliname not in inst.os.BOOT_DEVICES: + continue + +@@ -1794,7 +1794,7 @@ class ParserDisk(VirtCLIParser): + return None + try: + return float(val) +- except Exception, e: ++ except Exception as e: + fail(_("Improper value for 'size': %s") % str(e)) + + def convert_perms(val): +diff --git a/virtinst/cloner.py b/virtinst/cloner.py +index 5255acf..6de7f51 100644 +--- a/virtinst/cloner.py ++++ b/virtinst/cloner.py +@@ -103,7 +103,7 @@ class Cloner(object): + Guest.validate_name(self.conn, name, + check_collision=not self.replace, + validate=False) +- except ValueError, e: ++ except ValueError as e: + raise ValueError(_("Invalid name for new guest: %s") % e) + + self._clone_name = name +@@ -113,7 +113,7 @@ class Cloner(object): + def set_clone_uuid(self, uuid): + try: + util.validate_uuid(uuid) +- except ValueError, e: ++ except ValueError as e: + raise ValueError(_("Invalid uuid for new guest: %s") % e) + + if util.vm_uuid_collision(self.conn, uuid): +@@ -145,7 +145,7 @@ class Cloner(object): + disk.set_vol_install(vol_install) + disk.validate() + disklist.append(disk) +- except Exception, e: ++ except Exception as e: + logging.debug("Error setting clone path.", exc_info=True) + raise ValueError(_("Could not use path '%s' for cloning: %s") % + (path, str(e))) +@@ -452,7 +452,7 @@ class Cloner(object): + if self.preserve: + for dst_dev in self.clone_disks: + dst_dev.setup(meter=meter) +- except Exception, e: ++ except Exception as e: + logging.debug("Duplicate failed: %s", str(e)) + if dom: + dom.undefine() +@@ -546,7 +546,7 @@ class Cloner(object): + if newd.wants_storage_creation(): + raise ValueError(_("Disk path '%s' does not exist.") % + newd.path) +- except Exception, e: ++ except Exception as e: + logging.debug("Exception creating clone disk objects", + exc_info=True) + raise ValueError(_("Could not determine original disk " +diff --git a/virtinst/connection.py b/virtinst/connection.py +index a09f4df..acfd9a4 100644 +--- a/virtinst/connection.py ++++ b/virtinst/connection.py +@@ -237,7 +237,7 @@ class VirtualConnection(object): + try: + xml = vol.XMLDesc(0) + ret.append(StorageVolume(weakref.ref(self), parsexml=xml)) +- except Exception, e: ++ except Exception as e: + logging.debug("Fetching volume XML failed: %s", e) + + if self.cache_object_fetch: +@@ -411,7 +411,8 @@ class VirtualConnection(object): + # Private helpers # + ################### + +- def _auth_cb(self, creds, (passwordcb, passwordcreds)): ++ def _auth_cb(self, creds, xxx_todo_changeme): ++ (passwordcb, passwordcreds) = xxx_todo_changeme + for cred in creds: + if cred[0] not in passwordcreds: + raise RuntimeError("Unknown cred type '%s', expected only " +diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py +index 2736c9a..b9592db 100644 +--- a/virtinst/devicedisk.py ++++ b/virtinst/devicedisk.py +@@ -212,7 +212,7 @@ class VirtualDisk(VirtualDevice): + try: + # Get UID for string name + uid = pwd.getpwnam(username)[2] +- except Exception, e: ++ except Exception as e: + logging.debug("Error looking up username: %s", str(e)) + return [] + +@@ -316,7 +316,7 @@ class VirtualDisk(VirtualDevice): + + logging.debug("setfacl failed, trying old fashioned way") + fix_perms(dirname, useacl) +- except Exception, e: ++ except Exception as e: + errdict[dirname] = str(e) + + return errdict +@@ -995,11 +995,11 @@ class VirtualDisk(VirtualDevice): + def get_target(): + first_found = None + +- ran = range(maxnode) ++ ran = list(range(maxnode)) + if pref_ctrl is not None: + # We assume narrow SCSI bus and libvirt assigning 7 + # (1-7, 8-14, etc.) devices per controller +- ran = range(pref_ctrl * 7, (pref_ctrl + 1) * 7) ++ ran = list(range(pref_ctrl * 7, (pref_ctrl + 1) * 7)) + + for i in ran: + gen_t = prefix + self.num_to_target(i + 1) +diff --git a/virtinst/devicegraphics.py b/virtinst/devicegraphics.py +index 07b554e..11f2891 100644 +--- a/virtinst/devicegraphics.py ++++ b/virtinst/devicegraphics.py +@@ -83,7 +83,7 @@ class VirtualGraphics(VirtualDevice): + """ + from . import hostkeymap + +- orig_list = hostkeymap.keytable.values() ++ orig_list = list(hostkeymap.keytable.values()) + sort_list = [] + + orig_list.sort() +diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py +index 8cf21ad..790e454 100644 +--- a/virtinst/diskbackend.py ++++ b/virtinst/diskbackend.py +@@ -55,7 +55,7 @@ def _lookup_vol_by_path(conn, path): + vol = conn.storageVolLookupByPath(path) + vol.info() + return vol, None +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + if (hasattr(libvirt, "VIR_ERR_NO_STORAGE_VOL") and + e.get_error_code() != libvirt.VIR_ERR_NO_STORAGE_VOL): + raise +@@ -98,7 +98,7 @@ def check_if_path_managed(conn, path): + vol = _lookup_vol_by_basename(pool, path) + except: + pass +- except Exception, e: ++ except Exception as e: + vol = None + pool = None + verr = str(e) +@@ -328,7 +328,7 @@ class CloneStorageCreator(_StorageCreator): + msg = None + vfs = os.statvfs(os.path.dirname(self._path)) + avail = vfs[statvfs.F_FRSIZE] * vfs[statvfs.F_BAVAIL] +- need = long(self._size * 1024L * 1024L * 1024L) ++ need = int(self._size * 1024 * 1024 * 1024) + if need > avail: + if self._sparse: + msg = _("The filesystem will not have enough free space" +@@ -348,8 +348,8 @@ class CloneStorageCreator(_StorageCreator): + text = (_("Cloning %(srcfile)s") % + {'srcfile' : os.path.basename(self._input_path)}) + +- size_bytes = long(self.get_size() * 1024L * 1024L * 1024L) +- progresscb.start(filename=self._output_path, size=long(size_bytes), ++ size_bytes = int(self.get_size() * 1024 * 1024 * 1024) ++ progresscb.start(filename=self._output_path, size=int(size_bytes), + text=text) + + # Plain file clone +@@ -373,7 +373,7 @@ class CloneStorageCreator(_StorageCreator): + sparse = True + fd = None + try: +- fd = os.open(self._output_path, os.O_WRONLY | os.O_CREAT, 0640) ++ fd = os.open(self._output_path, os.O_WRONLY | os.O_CREAT, 0o640) + os.ftruncate(fd, size_bytes) + finally: + if fd: +@@ -393,7 +393,7 @@ class CloneStorageCreator(_StorageCreator): + try: + src_fd = os.open(self._input_path, os.O_RDONLY) + dst_fd = os.open(self._output_path, +- os.O_WRONLY | os.O_CREAT, 0640) ++ os.O_WRONLY | os.O_CREAT, 0o640) + + i = 0 + while 1: +@@ -413,7 +413,7 @@ class CloneStorageCreator(_StorageCreator): + i += s + if i < size_bytes: + meter.update(i) +- except OSError, e: ++ except OSError as e: + raise RuntimeError(_("Error cloning diskimage %s to %s: %s") % + (self._input_path, self._output_path, str(e))) + finally: +diff --git a/virtinst/distroinstaller.py b/virtinst/distroinstaller.py +index 0eee9f3..abb2a00 100644 +--- a/virtinst/distroinstaller.py ++++ b/virtinst/distroinstaller.py +@@ -66,7 +66,7 @@ def _sanitize_url(url): + MEDIA_LOCATION_URL, + MEDIA_CDROM_PATH, + MEDIA_CDROM_URL, +- MEDIA_CDROM_IMPLIED) = range(1, 7) ++ MEDIA_CDROM_IMPLIED) = list(range(1, 7)) + + + class DistroInstaller(Installer): +@@ -187,7 +187,7 @@ class DistroInstaller(Installer): + dev.validate() + + val = dev.path +- except Exception, e: ++ except Exception as e: + logging.debug("Error validating install location", exc_info=True) + raise ValueError(_("Validating install media '%s' failed: %s") % + (str(val), e)) +@@ -209,7 +209,7 @@ class DistroInstaller(Installer): + try: + try: + fetcher.prepareLocation() +- except ValueError, e: ++ except ValueError as e: + logging.debug("Error preparing install location", + exc_info=True) + raise ValueError(_("Invalid install location: ") + str(e)) +diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py +index 874fa1e..2733c46 100644 +--- a/virtinst/domcapabilities.py ++++ b/virtinst/domcapabilities.py +@@ -139,7 +139,7 @@ class DomainCapabilities(XMLBuilder): + return _("BIOS") + return _("None") + +- for arch, patterns in self._uefi_arch_patterns.items(): ++ for arch, patterns in list(self._uefi_arch_patterns.items()): + for pattern in patterns: + if re.match(pattern, path): + return (_("UEFI %(arch)s: %(path)s") % +@@ -151,7 +151,7 @@ class DomainCapabilities(XMLBuilder): + """ + Return True if we know how to setup UEFI for the passed arch + """ +- return self.arch in self._uefi_arch_patterns.keys() ++ return self.arch in list(self._uefi_arch_patterns.keys()) + + def supports_uefi_xml(self): + """ +diff --git a/virtinst/guest.py b/virtinst/guest.py +index 6a42536..fc87091 100644 +--- a/virtinst/guest.py ++++ b/virtinst/guest.py +@@ -82,7 +82,7 @@ class Guest(XMLBuilder): + + logging.info("Undefining guest '%s'", name) + vm.undefine() +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + raise RuntimeError(_("Could not remove old vm '%s': %s") % + (str(e))) + +@@ -402,7 +402,7 @@ class Guest(XMLBuilder): + try: + logging.debug("XML fetched from libvirt object:\n%s", + self.domain.XMLDesc(0)) +- except Exception, e: ++ except Exception as e: + logging.debug("Error fetching XML from libvirt object: %s", e) + + +@@ -415,7 +415,7 @@ class Guest(XMLBuilder): + + try: + self.domain.setAutostart(True) +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + if util.is_error_nosupport(e): + logging.warn("Could not set autostart flag: libvirt " + "connection does not support autostart.") +@@ -491,7 +491,7 @@ class Guest(XMLBuilder): + os.unlink(disk.path) + + meter.end(0) +- except Exception, e: ++ except Exception as e: + logging.debug("Failed to remove disk '%s'", + name, exc_info=True) + logging.error("Failed to remove disk '%s': %s", name, e) +@@ -929,7 +929,7 @@ class Guest(XMLBuilder): + (str(d), str(addresses[addrstr][addr.function]))) + addresses[addrstr][addr.function] = d + +- for devs in addresses.values(): ++ for devs in list(addresses.values()): + if len(devs) > 1 and 0 in devs: + devs[0].address.multifunction = True + +diff --git a/virtinst/hostkeymap.py b/virtinst/hostkeymap.py +index 904333e..9092de6 100644 +--- a/virtinst/hostkeymap.py ++++ b/virtinst/hostkeymap.py +@@ -117,7 +117,7 @@ def _default_keymap(): + logging.debug("Found keymap=%s in %s", kt, path) + break + logging.debug("Didn't find keymap in '%s'", path) +- except Exception, e: ++ except Exception as e: + logging.debug("Error parsing '%s': %s", path, str(e)) + + if kt is None: +@@ -199,7 +199,7 @@ def sanitize_keymap(kt): + return len(b) - len(a) + + clean_kt = kt.replace("-", "").replace("_", "") +- sorted_keys = sorted(keytable.keys(), len_cmp) ++ sorted_keys = sorted(list(keytable.keys()), len_cmp) + + for key in sorted_keys: + origkey = key +diff --git a/virtinst/initrdinject.py b/virtinst/initrdinject.py +index eb5f419..03f3045 100644 +--- a/virtinst/initrdinject.py ++++ b/virtinst/initrdinject.py +@@ -90,7 +90,7 @@ def perform_initrd_injections(initrd, injections, scratchdir): + return + + tempdir = tempfile.mkdtemp(dir=scratchdir) +- os.chmod(tempdir, 0775) ++ os.chmod(tempdir, 0o775) + + for filename in injections: + logging.debug("Copying %s to the initrd.", filename) +diff --git a/virtinst/interface.py b/virtinst/interface.py +index 8b57ab8..7621751 100644 +--- a/virtinst/interface.py ++++ b/virtinst/interface.py +@@ -254,21 +254,21 @@ class Interface(XMLBuilder): + + try: + iface = self.conn.interfaceDefineXML(xml, 0) +- except Exception, e: ++ except Exception as e: + raise RuntimeError(_("Could not define interface: %s") % str(e)) + + errmsg = None + if create and not errmsg: + try: + iface.create(0) +- except Exception, e: ++ except Exception as e: + errmsg = _("Could not create interface: %s") % str(e) + + if errmsg: + # Try and clean up the leftover pool + try: + iface.undefine() +- except Exception, e: ++ except Exception as e: + logging.debug("Error cleaning up interface after failure: " + + "%s" % str(e)) + raise RuntimeError(errmsg) +diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py +index 6147d70..fa34f14 100644 +--- a/virtinst/nodedev.py ++++ b/virtinst/nodedev.py +@@ -75,7 +75,7 @@ class NodeDevice(XMLBuilder): + + try: + return _AddressStringToNodedev(conn, idstring) +- except Exception, e: ++ except Exception as e: + logging.debug("Error looking up nodedev from idstring=%s", + idstring, exc_info=True) + raise RuntimeError(_("Did not find node device matching '%s': %s" % +diff --git a/virtinst/osdict.py b/virtinst/osdict.py +index e8c1487..4e34558 100644 +--- a/virtinst/osdict.py ++++ b/virtinst/osdict.py +@@ -76,7 +76,7 @@ def _sort(tosort, sortpref=None, limit_point_releases=False): + retlist = [] + sortpref = sortpref or [] + +- for key, osinfo in tosort.items(): ++ for key, osinfo in list(tosort.items()): + # Libosinfo has some duplicate version numbers here, so append .1 + # if there's a collision + sortby = osinfo.sortby +@@ -95,12 +95,12 @@ def _sort(tosort, sortpref=None, limit_point_releases=False): + # debian5, debian4, fedora14, fedora13 + # rather than + # debian4, debian5, fedora13, fedora14 +- for distro_list in distro_mappings.values(): ++ for distro_list in list(distro_mappings.values()): + distro_list.sort() + distro_list.reverse() + + # Move the sortpref values to the front of the list +- sorted_distro_list = distro_mappings.keys() ++ sorted_distro_list = list(distro_mappings.keys()) + sorted_distro_list.sort() + sortpref.reverse() + for prefer in sortpref: +@@ -255,7 +255,7 @@ class _OSDB(object): + """ + sortmap = {} + +- for name, osobj in self._all_variants.items(): ++ for name, osobj in list(self._all_variants.items()): + if typename and typename != osobj.get_typename(): + continue + if only_supported and not osobj.get_supported(): +diff --git a/virtinst/pollhelpers.py b/virtinst/pollhelpers.py +index 2090b8c..21f8772 100644 +--- a/virtinst/pollhelpers.py ++++ b/virtinst/pollhelpers.py +@@ -35,7 +35,7 @@ def _new_poll_helper(origmap, typename, listfunc, buildfunc): + + try: + objs = listfunc() +- except Exception, e: ++ except Exception as e: + logging.debug("Unable to list all %ss: %s", typename, e) + + for obj in objs: +@@ -50,7 +50,7 @@ def _new_poll_helper(origmap, typename, listfunc, buildfunc): + current[connkey] = origmap[connkey] + del(origmap[connkey]) + +- return (origmap.values(), new.values(), current.values()) ++ return (list(origmap.values()), list(new.values()), list(current.values())) + + + def _old_poll_helper(origmap, typename, +@@ -75,11 +75,11 @@ def _old_poll_helper(origmap, typename, + + try: + newActiveNames = active_list() +- except Exception, e: ++ except Exception as e: + logging.debug("Unable to list active %ss: %s", typename, e) + try: + newInactiveNames = inactive_list() +- except Exception, e: ++ except Exception as e: + logging.debug("Unable to list inactive %ss: %s", typename, e) + + def check_obj(name): +@@ -89,7 +89,7 @@ def _old_poll_helper(origmap, typename, + if connkey not in origmap: + try: + obj = lookup_func(name) +- except Exception, e: ++ except Exception as e: + logging.debug("Could not fetch %s '%s': %s", + typename, connkey, e) + return +@@ -108,7 +108,7 @@ def _old_poll_helper(origmap, typename, + except: + logging.exception("Couldn't fetch %s '%s'", typename, name) + +- return (origmap.values(), new.values(), current.values()) ++ return (list(origmap.values()), list(new.values()), list(current.values())) + + + def fetch_nets(backend, origmap, build_func): +@@ -209,7 +209,7 @@ def _old_fetch_vms(backend, origmap, build_func): + new = {} + + # Build list of previous vms with proper id/name mappings +- for vm in origmap.values(): ++ for vm in list(origmap.values()): + if vm.is_active(): + oldActiveIDs[vm.get_id()] = vm + else: +@@ -217,12 +217,12 @@ def _old_fetch_vms(backend, origmap, build_func): + + try: + newActiveIDs = backend.listDomainsID() +- except Exception, e: ++ except Exception as e: + logging.debug("Unable to list active domains: %s", e) + + try: + newInactiveNames = backend.listDefinedDomains() +- except Exception, e: ++ except Exception as e: + logging.exception("Unable to list inactive domains: %s", e) + + def add_vm(vm): +@@ -272,7 +272,7 @@ def _old_fetch_vms(backend, origmap, build_func): + except: + logging.exception("Couldn't fetch domain '%s'", name) + +- return (origmap.values(), new.values(), current.values()) ++ return (list(origmap.values()), list(new.values()), list(current.values())) + + + def fetch_vms(backend, origmap, build_func): +diff --git a/virtinst/progress.py b/virtinst/progress.py +index 2f57d45..55f93c2 100644 +--- a/virtinst/progress.py ++++ b/virtinst/progress.py +@@ -27,7 +27,7 @@ + import sys + import time + import math +-import thread ++import _thread + import fcntl + import struct + import termios +@@ -482,7 +482,7 @@ def format_number(number, SI=0, space=' '): + depth = depth + 1 + number = number / step + +- if type(number) == type(1) or type(number) == type(1L): ++ if type(number) == type(1) or type(number) == type(1): + # it's an int or a long, which means it didn't get divided, + # which means it's already short enough + format = '%i%s%s' +diff --git a/virtinst/storage.py b/virtinst/storage.py +index 2a42eca..6804a3d 100644 +--- a/virtinst/storage.py ++++ b/virtinst/storage.py +@@ -128,7 +128,7 @@ class StoragePool(_StorageObject): + """ + Return list of appropriate pool types + """ +- return StoragePool._descs.keys() ++ return list(StoragePool._descs.keys()) + + @staticmethod + def get_pool_type_desc(pool_type): +@@ -158,7 +158,7 @@ class StoragePool(_StorageObject): + + try: + xml = conn.findStoragePoolSources(pool_type, source_xml, 0) +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + if util.is_error_nosupport(e): + return [] + raise +@@ -225,7 +225,7 @@ class StoragePool(_StorageObject): + defpool.install(build=True, create=True, autostart=True) + conn.clear_cache(pools=True) + return defpool +- except Exception, e: ++ except Exception as e: + raise RuntimeError( + _("Couldn't create default storage pool '%s': %s") % + (path, str(e))) +@@ -512,33 +512,33 @@ class StoragePool(_StorageObject): + + try: + pool = self.conn.storagePoolDefineXML(xml, 0) +- except Exception, e: ++ except Exception as e: + raise RuntimeError(_("Could not define storage pool: %s") % str(e)) + + errmsg = None + if build: + try: + pool.build(libvirt.VIR_STORAGE_POOL_BUILD_NEW) +- except Exception, e: ++ except Exception as e: + errmsg = _("Could not build storage pool: %s") % str(e) + + if create and not errmsg: + try: + pool.create(0) +- except Exception, e: ++ except Exception as e: + errmsg = _("Could not start storage pool: %s") % str(e) + + if autostart and not errmsg: + try: + pool.setAutostart(True) +- except Exception, e: ++ except Exception as e: + errmsg = _("Could not set pool autostart flag: %s") % str(e) + + if errmsg: + # Try and clean up the leftover pool + try: + pool.undefine() +- except Exception, e: ++ except Exception as e: + logging.debug("Error cleaning up pool after failure: " + + "%s" % str(e)) + raise RuntimeError(errmsg) +@@ -848,7 +848,7 @@ class StorageVolume(_StorageObject): + logging.debug("Storage volume '%s' install complete.", + self.name) + return vol +- except Exception, e: ++ except Exception as e: + logging.debug("Error creating storage volume", exc_info=True) + raise RuntimeError("Couldn't create storage volume " + "'%s': '%s'" % (self.name, str(e))) +diff --git a/virtinst/support.py b/virtinst/support.py +index 9516d83..4619f51 100644 +--- a/virtinst/support.py ++++ b/virtinst/support.py +@@ -56,13 +56,13 @@ def _get_flag(flag_name): + def _try_command(func, run_args, check_all_error=False): + try: + func(*run_args) +- except libvirt.libvirtError, e: ++ except libvirt.libvirtError as e: + if util.is_error_nosupport(e): + return False + + if check_all_error: + return False +- except Exception, e: ++ except Exception as e: + # Other python exceptions likely mean the bindings are horked + return False + return True +@@ -167,7 +167,7 @@ class _SupportCheck(object): + self.hv_version = hv_version or {} + self.hv_libvirt_version = hv_libvirt_version or {} + +- versions = ([self.version] + self.hv_libvirt_version.values()) ++ versions = ([self.version] + list(self.hv_libvirt_version.values())) + for vstr in versions: + v = _version_str_to_int(vstr) + if vstr is not None and v != 0 and v < 7009: +diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py +index 692a297..7b0a8f5 100644 +--- a/virtinst/urlfetcher.py ++++ b/virtinst/urlfetcher.py +@@ -19,17 +19,17 @@ + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + # MA 02110-1301 USA. + +-import ConfigParser ++import configparser + import ftplib + import logging + import os + import re + import stat +-import StringIO ++import io + import subprocess + import tempfile +-import urllib2 +-import urlparse ++import urllib.request, urllib.error, urllib.parse ++import urllib.parse + + import requests + +@@ -83,7 +83,7 @@ class _URLFetcher(object): + + try: + urlobj, size = self._grabber(url) +- except Exception, e: ++ except Exception as e: + raise ValueError(_("Couldn't acquire file %s: %s") % + (url, str(e))) + +@@ -169,7 +169,7 @@ class _URLFetcher(object): + """ + Grab the passed filename from self.location and return it as a string + """ +- fileobj = StringIO.StringIO() ++ fileobj = io.StringIO() + self._grabURL(filename, fileobj) + return fileobj.getvalue() + +@@ -182,7 +182,7 @@ class _HTTPURLFetcher(_URLFetcher): + try: + response = requests.head(url, allow_redirects=True) + response.raise_for_status() +- except Exception, e: ++ except Exception as e: + logging.debug("HTTP hasFile request failed: %s", str(e)) + return False + return True +@@ -220,11 +220,11 @@ class _FTPURLFetcher(_URLFetcher): + return + + try: +- parsed = urlparse.urlparse(self.location) ++ parsed = urllib.parse.urlparse(self.location) + self._ftp = ftplib.FTP() + self._ftp.connect(parsed.hostname, parsed.port) + self._ftp.login() +- except Exception, e: ++ except Exception as e: + raise ValueError(_("Opening URL %s failed: %s.") % + (self.location, str(e))) + +@@ -232,9 +232,9 @@ class _FTPURLFetcher(_URLFetcher): + """ + Use urllib2 and ftplib to grab the file + """ +- request = urllib2.Request(url) +- urlobj = urllib2.urlopen(request) +- size = self._ftp.size(urlparse.urlparse(url)[2]) ++ request = urllib.request.Request(url) ++ urlobj = urllib.request.urlopen(request) ++ size = self._ftp.size(urllib.parse.urlparse(url)[2]) + return urlobj, size + + +@@ -250,7 +250,7 @@ class _FTPURLFetcher(_URLFetcher): + self._ftp = None + + def _hasFile(self, url): +- path = urlparse.urlparse(url)[2] ++ path = urllib.parse.urlparse(url)[2] + + try: + try: +@@ -259,7 +259,7 @@ class _FTPURLFetcher(_URLFetcher): + except ftplib.all_errors: + # If it's a dir + self._ftp.cwd(path) +- except ftplib.all_errors, e: ++ except ftplib.all_errors as e: + logging.debug("FTP hasFile: couldn't access %s: %s", + url, str(e)) + return False +@@ -367,14 +367,14 @@ def _grabTreeinfo(fetcher): + return None + + try: +- treeinfo = ConfigParser.SafeConfigParser() ++ treeinfo = configparser.SafeConfigParser() + treeinfo.read(tmptreeinfo) + finally: + os.unlink(tmptreeinfo) + + try: + treeinfo.get("general", "family") +- except ConfigParser.NoSectionError: ++ except configparser.NoSectionError: + logging.debug("Did not find 'family' section in treeinfo") + return None + +@@ -570,7 +570,7 @@ class Distro(object): + try: + kernelpath = self._getTreeinfoMedia("kernel") + initrdpath = self._getTreeinfoMedia("initrd") +- except ConfigParser.NoSectionError: ++ except configparser.NoSectionError: + pass + + if not kernelpath or not initrdpath: +@@ -704,15 +704,15 @@ class GenericDistro(Distro): + self._valid_kernel_path = ( + self._getTreeinfoMedia("kernel"), + self._getTreeinfoMedia("initrd")) +- except (ConfigParser.NoSectionError, +- ConfigParser.NoOptionError), e: ++ except (configparser.NoSectionError, ++ configparser.NoOptionError) as e: + logging.debug(e) + + if self.treeinfo.has_section(isoSection): + try: + self._valid_iso_path = self.treeinfo.get(isoSection, + "boot.iso") +- except ConfigParser.NoOptionError, e: ++ except configparser.NoOptionError as e: + logging.debug(e) + + if self.type == "xen": +@@ -1265,7 +1265,7 @@ class ALTLinuxDistro(Distro): + # Build list of all *Distro classes + def _build_distro_list(): + allstores = [] +- for obj in globals().values(): ++ for obj in list(globals().values()): + if type(obj) is type and issubclass(obj, Distro) and obj.name: + allstores.append(obj) + +diff --git a/virtinst/util.py b/virtinst/util.py +index 64300db..3aa835b 100644 +--- a/virtinst/util.py ++++ b/virtinst/util.py +@@ -200,7 +200,7 @@ def generate_name(base, collision_cb, suffix="", lib_collision=True, + else: + return collision_cb(tryname) + +- numrange = range(start_num, start_num + 100000) ++ numrange = list(range(start_num, start_num + 100000)) + if not force_num: + numrange = [None] + numrange + +@@ -260,7 +260,7 @@ def default_route(): + d = file(route_file) + + defn = 0 +- for line in d.xreadlines(): ++ for line in d: + info = line.split() + if (len(info) != 11): # 11 = typical num of fields in the file + logging.warn(_("Invalid line length while parsing %s."), +@@ -368,7 +368,7 @@ def make_scratchdir(conn, hvtype): + not os.access(scratch, os.W_OK)): + scratch = os.path.join(get_cache_dir(), "boot") + if not os.path.exists(scratch): +- os.makedirs(scratch, 0751) ++ os.makedirs(scratch, 0o751) + + return scratch + +diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py +index d5475e7..d7d66f9 100644 +--- a/virtinst/xmlbuilder.py ++++ b/virtinst/xmlbuilder.py +@@ -273,7 +273,7 @@ class XMLChildProperty(property): + + def _findpropname(self, xmlbuilder): + if self._propname is None: +- for key, val in xmlbuilder._all_child_props().items(): ++ for key, val in list(xmlbuilder._all_child_props().items()): + if val is self: + self._propname = key + break +@@ -420,7 +420,7 @@ class XMLProperty(property): + as in the XMLBuilder class. This is just for debug purposes. + """ + if self._propname is None: +- for key, val in xmlbuilder._all_xml_props().items(): ++ for key, val in list(xmlbuilder._all_xml_props().items()): + if val is self: + self._propname = key + break +@@ -768,7 +768,7 @@ class XMLBuilder(object): + def _initial_child_parse(self): + # Walk the XML tree and hand of parsing to any registered + # child classes +- for xmlprop in self._all_child_props().values(): ++ for xmlprop in list(self._all_child_props().values()): + if xmlprop.is_single: + child_class = xmlprop.child_classes[0] + prop_path = xmlprop.get_prop_xpath(self, child_class) +@@ -812,7 +812,7 @@ class XMLBuilder(object): + + # XMLChildProperty stores a list in propstore, which dict shallow + # copy won't fix for us. +- for name, value in ret._propstore.items(): ++ for name, value in list(ret._propstore.items()): + if type(value) is not list: + continue + ret._propstore[name] = [obj.copy() for obj in ret._propstore[name]] +@@ -853,8 +853,8 @@ class XMLBuilder(object): + if leave_stub: + _top_node = _get_xpath_node(self._xmlstate.xml_ctx, + self.get_root_xpath()) +- props = self._all_xml_props().values() +- props += self._all_child_props().values() ++ props = list(self._all_xml_props().values()) ++ props += list(self._all_child_props().values()) + for prop in props: + prop.clear(self) + finally: +@@ -917,7 +917,7 @@ class XMLBuilder(object): + if not hasattr(self.__class__, cachename): + ret = {} + for c in reversed(type.mro(self.__class__)[:-1]): +- for key, val in c.__dict__.items(): ++ for key, val in list(c.__dict__.items()): + if isinstance(val, checkclass): + ret[key] = val + setattr(self.__class__, cachename, ret) +@@ -952,7 +952,7 @@ class XMLBuilder(object): + + def _find_child_prop(self, child_class, return_single=False): + xmlprops = self._all_child_props() +- for xmlprop in xmlprops.values(): ++ for xmlprop in list(xmlprops.values()): + if xmlprop.is_single and not return_single: + continue + if child_class in xmlprop.child_classes: +@@ -1009,7 +1009,7 @@ class XMLBuilder(object): + Return a list of all XML child objects with the passed class + """ + ret = [] +- for prop in self._all_child_props().values(): ++ for prop in list(self._all_child_props().values()): + ret += [obj for obj in util.listify(prop._get(self)) + if obj.__class__ == klass] + return ret +@@ -1032,7 +1032,7 @@ class XMLBuilder(object): + xpaths point at their particular element + """ + typecount = {} +- for propname, xmlprop in self._all_child_props().items(): ++ for propname, xmlprop in list(self._all_child_props().items()): + for obj in util.listify(getattr(self, propname)): + idxstr = "" + if not xmlprop.is_single: +@@ -1090,7 +1090,7 @@ class XMLBuilder(object): + xmlprops = self._all_xml_props() + childprops = self._all_child_props() + +- for prop in xmlprops.values(): ++ for prop in list(xmlprops.values()): + prop._set_default(self) + + # Set up preferred XML ordering +@@ -1105,7 +1105,7 @@ class XMLBuilder(object): + elif key in childprops: + do_order.insert(0, key) + +- for key in childprops.keys(): ++ for key in list(childprops.keys()): + if key not in do_order: + do_order.append(key) + diff --git a/patches/app-emulation/virt-manager-1.4.0/python3-fixes.patch b/patches/app-emulation/virt-manager-1.4.0/python3-fixes.patch new file mode 100644 index 0000000..5a24f5d --- /dev/null +++ b/patches/app-emulation/virt-manager-1.4.0/python3-fixes.patch @@ -0,0 +1,169 @@ +diff --git a/virtManager/connection.py b/virtManager/connection.py +index 820322e..d2b2a0b 100644 +--- a/virtManager/connection.py ++++ b/virtManager/connection.py +@@ -910,28 +910,28 @@ class vmmConnection(vmmGObject): + libvirt_error_code = exc.get_error_code() + libvirt_error_message = exc.get_error_message() + +- if (libvirt_error_code == +- getattr(libvirt, "VIR_ERR_AUTH_CANCELLED", None)): +- logging.debug("User cancelled auth, not raising any error.") +- return False, None +- +- if (libvirt_error_code == libvirt.VIR_ERR_AUTH_FAILED and +- "not authorized" in libvirt_error_message.lower()): +- logging.debug("Looks like we might have failed policykit " +- "auth. Checking to see if we have a valid " +- "console session") +- if (not self.is_remote() and +- not connectauth.do_we_have_session()): +- warnconsole = True +- +- if (libvirt_error_code == libvirt.VIR_ERR_AUTH_FAILED and +- "GSSAPI Error" in libvirt_error_message and +- "No credentials cache found" in libvirt_error_message): +- if retry_for_tgt and connectauth.acquire_tgt(): +- self._do_open(retry_for_tgt=False) +- +- connectError = (str(exc), tb, warnconsole) +- return False, connectError ++ if (libvirt_error_code == ++ getattr(libvirt, "VIR_ERR_AUTH_CANCELLED", None)): ++ logging.debug("User cancelled auth, not raising any error.") ++ return False, None ++ ++ if (libvirt_error_code == libvirt.VIR_ERR_AUTH_FAILED and ++ "not authorized" in libvirt_error_message.lower()): ++ logging.debug("Looks like we might have failed policykit " ++ "auth. Checking to see if we have a valid " ++ "console session") ++ if (not self.is_remote() and ++ not connectauth.do_we_have_session()): ++ warnconsole = True ++ ++ if (libvirt_error_code == libvirt.VIR_ERR_AUTH_FAILED and ++ "GSSAPI Error" in libvirt_error_message and ++ "No credentials cache found" in libvirt_error_message): ++ if retry_for_tgt and connectauth.acquire_tgt(): ++ self._do_open(retry_for_tgt=False) ++ ++ connectError = (str(exc), tb, warnconsole) ++ return False, connectError + + def _populate_initial_state(self): + logging.debug("libvirt version=%s", +diff --git a/virtManager/engine.py b/virtManager/engine.py +index 3b5fad5..d8f9cf9 100644 +--- a/virtManager/engine.py ++++ b/virtManager/engine.py +@@ -268,15 +268,15 @@ class vmmEngine(vmmGObject): + """ + We serialize conn autostart, so polkit/ssh-askpass doesn't spam + """ +- queue = queue.Queue() ++ _queue = queue.Queue() + auto_conns = [uri for uri in self.conns + if self.conns[uri]["conn"].get_autoconnect()] + + def add_next_to_queue(): + if not auto_conns: +- queue.put(None) ++ _queue.put(None) + else: +- queue.put(auto_conns.pop(0)) ++ _queue.put(auto_conns.pop(0)) + + def state_change_cb(conn): + if conn.is_active(): +@@ -288,7 +288,7 @@ class vmmEngine(vmmGObject): + + def handle_queue(): + while True: +- uri = queue.get() ++ uri = _queue.get() + if uri is None: + return + if uri not in self.conns: +diff --git a/virtManager/graphwidgets.py b/virtManager/graphwidgets.py +index cac6975..ce225c9 100644 +--- a/virtManager/graphwidgets.py ++++ b/virtManager/graphwidgets.py +@@ -316,7 +316,7 @@ class Sparkline(Gtk.DrawingArea): + w = window.get_width() + h = window.get_height() + +- points_per_set = (len(self.data_array) / self.num_sets) ++ points_per_set = int(len(self.data_array) / self.num_sets) + pixels_per_point = (float(w) / + (float((points_per_set - 1) or 1))) + +diff --git a/virtManager/viewers.py b/virtManager/viewers.py +index 6635e7f..1824112 100644 +--- a/virtManager/viewers.py ++++ b/virtManager/viewers.py +@@ -26,8 +26,11 @@ from gi.repository import GObject + from gi.repository import Gdk + + import gi +-gi.require_version('GtkVnc', '2.0') +-from gi.repository import GtkVnc ++try: ++ gi.require_version('GtkVnc', '2.0') ++ from gi.repository import GtkVnc ++except (ValueError, ImportError): ++ pass + try: + gi.require_version('SpiceClientGtk', '3.0') + from gi.repository import SpiceClientGtk +diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py +index b9592db..269aba6 100644 +--- a/virtinst/devicedisk.py ++++ b/virtinst/devicedisk.py +@@ -430,7 +430,7 @@ class VirtualDisk(VirtualDevice): + """ + digits = [] + for factor in range(0, 3): +- amt = (num % (26 ** (factor + 1))) / (26 ** factor) ++ amt = int((num % (26 ** (factor + 1))) / (26 ** factor)) + if amt == 0 and num >= (26 ** (factor + 1)): + amt = 26 + num -= amt +diff --git a/virtinst/storage.py b/virtinst/storage.py +index 6804a3d..70b5f62 100644 +--- a/virtinst/storage.py ++++ b/virtinst/storage.py +@@ -894,6 +894,8 @@ class StorageVolume(_StorageObject): + capacity = self.capacity + if allocation is None: + allocation = self.allocation ++ if allocation is None: ++ allocation = 0 + + if not self.pool: + return (False, "") +diff --git a/virtinst/support.py b/virtinst/support.py +index 4619f51..ee54389 100644 +--- a/virtinst/support.py ++++ b/virtinst/support.py +@@ -119,7 +119,7 @@ def _check_function(function, flag, run_args, data): + + def _version_str_to_int(verstr): + if verstr is None: +- return None ++ return 0 + if verstr == 0: + return 0 + +diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py +index d7d66f9..063b085 100644 +--- a/virtinst/xmlbuilder.py ++++ b/virtinst/xmlbuilder.py +@@ -754,7 +754,6 @@ class XMLBuilder(object): + self.conn = conn + + if self._XML_SANITIZE: +- parsexml = parsexml.decode('ascii', 'ignore').encode('ascii') + parsexml = "".join([c for c in parsexml if c in string.printable]) + + self._propstore = {} diff --git a/patches/app-emulation/virt-manager-1.4.0/python3-replace-file-with-open.patch b/patches/app-emulation/virt-manager-1.4.0/python3-replace-file-with-open.patch new file mode 100644 index 0000000..1a91e7e --- /dev/null +++ b/patches/app-emulation/virt-manager-1.4.0/python3-replace-file-with-open.patch @@ -0,0 +1,372 @@ +diff --git a/tests/capabilities.py b/tests/capabilities.py +index 0c1a2b8..0f57137 100644 +--- a/tests/capabilities.py ++++ b/tests/capabilities.py +@@ -31,7 +31,7 @@ conn = utils.open_testdriver() + class TestCapabilities(unittest.TestCase): + def _buildCaps(self, filename): + path = os.path.join("tests/capabilities-xml", filename) +- return Capabilities(conn, file(path).read()) ++ return Capabilities(conn, open(path).read()) + + def testCapsCPUFeaturesOldSyntax(self): + filename = "test-old-vmx.xml" +@@ -132,7 +132,7 @@ class TestCapabilities(unittest.TestCase): + ############################## + + def testDomainCapabilities(self): +- xml = file("tests/capabilities-xml/test-domcaps.xml").read() ++ xml = open("tests/capabilities-xml/test-domcaps.xml").read() + caps = DomainCapabilities(utils.open_testdriver(), xml) + + self.assertEqual(caps.os.loader.supported, True) +diff --git a/tests/clitest.py b/tests/clitest.py +index b63a92a..edc1ed8 100644 +--- a/tests/clitest.py ++++ b/tests/clitest.py +@@ -149,7 +149,7 @@ class Command(object): + sys.stderr = out + sys.argv = self.argv + if self.input_file: +- sys.stdin = file(self.input_file) ++ sys.stdin = open(self.input_file) + + exc = "" + try: +@@ -248,7 +248,7 @@ class Command(object): + # Generate test files that don't exist yet + filename = self.compare_file + if utils.REGENERATE_OUTPUT or not os.path.exists(filename): +- file(filename, "w").write(output) ++ open(filename, "w").write(output) + + if "--print-diff" in self.argv and output.count("\n") > 3: + # 1) Strip header +diff --git a/tests/uitests/utils.py b/tests/uitests/utils.py +index 3656268..9ab9969 100644 +--- a/tests/uitests/utils.py ++++ b/tests/uitests/utils.py +@@ -67,7 +67,7 @@ class DogtailApp(object): + os.path.join(os.getcwd(), "virt-manager"), + "--test-first-run", "--no-fork", "--connect", self.uri] + + (extra_opts or []), +- stdout=file(os.devnull), stderr=file(os.devnull)) ++ stdout=open(os.devnull), stderr=file(os.devnull)) + time.sleep(1) + + self._root = dogtail.tree.root.application("virt-manager") +diff --git a/tests/utils.py b/tests/utils.py +index 013b305..f8a3194 100644 +--- a/tests/utils.py ++++ b/tests/utils.py +@@ -184,7 +184,7 @@ def diff_compare(actual_out, filename=None, expect_out=None): + """Compare passed string output to contents of filename""" + if not expect_out: + if not os.path.exists(filename) or REGENERATE_OUTPUT: +- file(filename, "w").write(actual_out) ++ open(filename, "w").write(actual_out) + expect_out = read_file(filename) + + diff = "".join(difflib.unified_diff(expect_out.splitlines(1), +diff --git a/tests/xmlparse.py b/tests/xmlparse.py +index f380d06..87ba6e7 100644 +--- a/tests/xmlparse.py ++++ b/tests/xmlparse.py +@@ -35,7 +35,7 @@ def sanitize_file_xml(xml): + + class XMLParseTest(unittest.TestCase): + def _roundtrip_compare(self, filename): +- expectXML = sanitize_file_xml(file(filename).read()) ++ expectXML = sanitize_file_xml(open(filename).read()) + guest = virtinst.Guest(conn, parsexml=expectXML) + actualXML = guest.get_xml_config() + utils.diff_compare(actualXML, expect_out=expectXML) +@@ -88,7 +88,7 @@ class XMLParseTest(unittest.TestCase): + infile = "tests/xmlparse-xml/%s-in.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename + guest = virtinst.Guest(kvm and kvmconn or conn, +- parsexml=file(infile).read()) ++ parsexml=open(infile).read()) + return guest, outfile + + def testAlterGuest(self): +@@ -684,7 +684,7 @@ class XMLParseTest(unittest.TestCase): + infile = "tests/xmlparse-xml/change-hostdevs-in.xml" + outfile = "tests/xmlparse-xml/change-hostdevs-out.xml" + guest = virtinst.Guest(conn, +- parsexml=file(infile).read()) ++ parsexml=open(infile).read()) + + dev1 = guest.get_devices("hostdev")[0] + dev2 = guest.get_devices("hostdev")[1] +@@ -799,7 +799,7 @@ class XMLParseTest(unittest.TestCase): + infile = "tests/xmlparse-xml/change-sounds-in.xml" + outfile = "tests/xmlparse-xml/change-sounds-out.xml" + guest = virtinst.Guest(conn, +- parsexml=file(infile).read()) ++ parsexml=open(infile).read()) + + dev1 = guest.get_devices("sound")[0] + dev2 = guest.get_devices("sound")[1] +@@ -1008,7 +1008,7 @@ class XMLParseTest(unittest.TestCase): + basename = "change-snapshot" + infile = "tests/xmlparse-xml/%s-in.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename +- snap = virtinst.DomainSnapshot(conn, parsexml=file(infile).read()) ++ snap = virtinst.DomainSnapshot(conn, parsexml=open(infile).read()) + + check = self._make_checker(snap) + check("name", "offline-root-child1", "name-foo") +@@ -1033,7 +1033,7 @@ class XMLParseTest(unittest.TestCase): + basename = "test-bridge-ip" + infile = "tests/interface-xml/%s.xml" % basename + outfile = "tests/xmlparse-xml/interface-%s-out.xml" % basename +- iface = virtinst.Interface(conn, parsexml=file(infile).read()) ++ iface = virtinst.Interface(conn, parsexml=open(infile).read()) + + self.assertEquals(len(iface.protocols), 2) + self.assertEquals(len(iface.interfaces), 3) +@@ -1073,7 +1073,7 @@ class XMLParseTest(unittest.TestCase): + basename = "test-bond-arp" + infile = "tests/interface-xml/%s.xml" % basename + outfile = "tests/xmlparse-xml/interface-%s-out.xml" % basename +- iface = virtinst.Interface(conn, parsexml=file(infile).read()) ++ iface = virtinst.Interface(conn, parsexml=open(infile).read()) + + check = self._make_checker(iface) + check("start_mode", "onboot", "hotplug") +@@ -1092,7 +1092,7 @@ class XMLParseTest(unittest.TestCase): + basename = "test-bond-mii" + infile = "tests/interface-xml/%s.xml" % basename + outfile = "tests/xmlparse-xml/interface-%s-out.xml" % basename +- iface = virtinst.Interface(conn, parsexml=file(infile).read()) ++ iface = virtinst.Interface(conn, parsexml=open(infile).read()) + + check = self._make_checker(iface) + check("mii_frequency", 123, 111) +@@ -1107,7 +1107,7 @@ class XMLParseTest(unittest.TestCase): + basename = "test-vlan" + infile = "tests/interface-xml/%s.xml" % basename + outfile = "tests/xmlparse-xml/interface-%s-out.xml" % basename +- iface = virtinst.Interface(conn, parsexml=file(infile).read()) ++ iface = virtinst.Interface(conn, parsexml=open(infile).read()) + + check = self._make_checker(iface) + check("tag", 123, 456) +@@ -1125,7 +1125,7 @@ class XMLParseTest(unittest.TestCase): + basename = "pool-fs" + infile = "tests/xmlparse-xml/%s.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename +- pool = virtinst.StoragePool(conn, parsexml=file(infile).read()) ++ pool = virtinst.StoragePool(conn, parsexml=open(infile).read()) + + check = self._make_checker(pool) + check("type", "fs", "dir") +@@ -1148,7 +1148,7 @@ class XMLParseTest(unittest.TestCase): + basename = "pool-iscsi" + infile = "tests/storage-xml/%s.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename +- pool = virtinst.StoragePool(conn, parsexml=file(infile).read()) ++ pool = virtinst.StoragePool(conn, parsexml=open(infile).read()) + + check = self._make_checker(pool) + check("iqn", "foo.bar.baz.iqn", "my.iqn") +@@ -1166,7 +1166,7 @@ class XMLParseTest(unittest.TestCase): + basename = "pool-gluster" + infile = "tests/storage-xml/%s.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename +- pool = virtinst.StoragePool(conn, parsexml=file(infile).read()) ++ pool = virtinst.StoragePool(conn, parsexml=open(infile).read()) + + check = self._make_checker(pool) + check("source_path", "/some/source/path", "/foo") +@@ -1180,7 +1180,7 @@ class XMLParseTest(unittest.TestCase): + basename = "pool-rbd" + infile = "tests/xmlparse-xml/%s.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename +- pool = virtinst.StoragePool(conn, parsexml=file(infile).read()) ++ pool = virtinst.StoragePool(conn, parsexml=open(infile).read()) + + check = self._make_checker(pool.hosts[0]) + check("name", "ceph-mon-1.example.com") +@@ -1200,7 +1200,7 @@ class XMLParseTest(unittest.TestCase): + basename = "pool-dir-vol" + infile = "tests/xmlparse-xml/%s-in.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename +- vol = virtinst.StorageVolume(conn, parsexml=file(infile).read()) ++ vol = virtinst.StorageVolume(conn, parsexml=open(infile).read()) + + check = self._make_checker(vol) + check("type", None, "file") +@@ -1229,7 +1229,7 @@ class XMLParseTest(unittest.TestCase): + basename = "network-multi" + infile = "tests/xmlparse-xml/%s-in.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename +- net = virtinst.Network(conn, parsexml=file(infile).read()) ++ net = virtinst.Network(conn, parsexml=open(infile).read()) + + check = self._make_checker(net) + check("name", "ipv6_multirange", "new-foo") +@@ -1302,7 +1302,7 @@ class XMLParseTest(unittest.TestCase): + basename = "clear-cpu-unknown-vals" + infile = "tests/xmlparse-xml/%s-in.xml" % basename + outfile = "tests/xmlparse-xml/%s-out.xml" % basename +- guest = virtinst.Guest(kvmconn, parsexml=file(infile).read()) ++ guest = virtinst.Guest(kvmconn, parsexml=open(infile).read()) + + guest.cpu.copy_host_cpu() + guest.cpu.clear() +diff --git a/virtManager/baseclass.py b/virtManager/baseclass.py +index 3d40ae2..4895473 100644 +--- a/virtManager/baseclass.py ++++ b/virtManager/baseclass.py +@@ -198,7 +198,7 @@ class vmmGObjectUI(vmmGObject): + + self.builder = Gtk.Builder() + self.builder.set_translation_domain("virt-manager") +- self.builder.add_from_string(file(uifile).read()) ++ self.builder.add_from_string(open(uifile).read()) + + if not topwin: + self.topwin = self.widget(windowname) +diff --git a/virtManager/details.py b/virtManager/details.py +index 487541a..922b0da 100644 +--- a/virtManager/details.py ++++ b/virtManager/details.py +@@ -1511,7 +1511,7 @@ class vmmDetails(vmmGObjectUI): + filename = path + if not filename.endswith(".png"): + filename += ".png" +- file(filename, "wb").write(ret) ++ open(filename, "wb").write(ret) + + + ############################ +diff --git a/virtManager/snapshots.py b/virtManager/snapshots.py +index 299d5e7..90ddcdd 100644 +--- a/virtManager/snapshots.py ++++ b/virtManager/snapshots.py +@@ -302,7 +302,7 @@ class vmmSnapshotPage(vmmGObjectUI): + mime = _mime_to_ext(os.path.splitext(filename)[1][1:], reverse=True) + if not mime: + return +- return self._make_screenshot_pixbuf(mime, file(filename, "rb").read()) ++ return self._make_screenshot_pixbuf(mime, open(filename, "rb").read()) + + def _set_snapshot_state(self, snap=None): + self.widget("snapshot-notebook").set_current_page(0) +@@ -517,7 +517,7 @@ class vmmSnapshotPage(vmmGObjectUI): + + filename = basesn + "." + _mime_to_ext(mime) + logging.debug("Writing screenshot to %s", filename) +- file(filename, "wb").write(sndata) ++ open(filename, "wb").write(sndata) + except: + logging.exception("Error saving screenshot") + +diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py +index a056c3f..cd25bbc 100644 +--- a/virtinst/capabilities.py ++++ b/virtinst/capabilities.py +@@ -58,7 +58,7 @@ class _CPUMapFileValues(XMLBuilder): + + def __init__(self, conn): + if os.path.exists(self._cpu_filename): +- xml = file(self._cpu_filename).read() ++ xml = open(self._cpu_filename).read() + else: + xml = None + logging.debug("CPU map file not found: %s", self._cpu_filename) +diff --git a/virtinst/initrdinject.py b/virtinst/initrdinject.py +index 03f3045..9ae9df6 100644 +--- a/virtinst/initrdinject.py ++++ b/virtinst/initrdinject.py +@@ -38,7 +38,7 @@ def _rhel4_initrd_inject(initrd, injections): + logging.debug("Is RHEL4 initrd") + + # Uncompress the initrd +- newinitrd = file(initrd + ".new", "wb") ++ newinitrd = open(initrd + ".new", "wb") + gzip_proc = subprocess.Popen(["gzip", "-d", "-f", "-c", initrd], + stdout=newinitrd, + stderr=subprocess.PIPE) +@@ -67,8 +67,8 @@ def _rhel4_initrd_inject(initrd, injections): + + # Recompress the initrd + gzip_proc = subprocess.Popen(["gzip"], +- stdin=file(newinitrd.name, "rb"), +- stdout=file(initrd, "wb"), ++ stdin=open(newinitrd.name, "rb"), ++ stdout=open(initrd, "wb"), + stderr=subprocess.PIPE) + gzip_proc.wait() + gziperr = gzip_proc.stderr.read() +diff --git a/virtinst/kernelupload.py b/virtinst/kernelupload.py +index 31f2722..8d5cdb7 100644 +--- a/virtinst/kernelupload.py ++++ b/virtinst/kernelupload.py +@@ -95,7 +95,7 @@ def _upload_file(conn, meter, destpool, src): + vol.upload(stream, offset, length, flags) + + # Open source file +- fileobj = file(src, "r") ++ fileobj = open(src, "r") + + # Start transfer + total = 0 +diff --git a/virtinst/uri.py b/virtinst/uri.py +index 3674726..48198fa 100644 +--- a/virtinst/uri.py ++++ b/virtinst/uri.py +@@ -196,14 +196,14 @@ class MagicURI(object): + """ + # Fake capabilities + if self.capsfile: +- capsxml = file(self.capsfile).read() ++ capsxml = open(self.capsfile).read() + conn.getCapabilities = lambda: capsxml + + # Fake domcapabilities. This is insufficient since output should + # vary per type/arch/emulator combo, but it can be expanded later + # if needed + if self.domcapsfile: +- domcapsxml = file(self.domcapsfile).read() ++ domcapsxml = open(self.domcapsfile).read() + def fake_domcaps(emulator, arch, machine, virttype, flags=0): + ignore = emulator + ignore = flags +diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py +index 7b0a8f5..9494b8f 100644 +--- a/virtinst/urlfetcher.py ++++ b/virtinst/urlfetcher.py +@@ -155,7 +155,7 @@ class _URLFetcher(object): + # pylint: disable=redefined-variable-type + if "VIRTINST_TEST_SUITE" in os.environ: + fn = os.path.join("/tmp", prefix) +- fileobj = file(fn, "w") ++ fileobj = open(fn, "w") + else: + fileobj = tempfile.NamedTemporaryFile( + dir=self.scratchdir, prefix=prefix, delete=False) +@@ -275,7 +275,7 @@ class _LocalURLFetcher(_URLFetcher): + return os.path.exists(url) + + def _grabber(self, url): +- urlobj = file(url, "r") ++ urlobj = open(url, "r") + size = os.path.getsize(url) + return urlobj, size + +diff --git a/virtinst/util.py b/virtinst/util.py +index 3aa835b..4122db6 100644 +--- a/virtinst/util.py ++++ b/virtinst/util.py +@@ -257,7 +257,7 @@ def generate_uuid(conn): + + def default_route(): + route_file = "/proc/net/route" +- d = file(route_file) ++ d = open(route_file) + + defn = 0 + for line in d: diff --git a/patches/app-emulation/virt-manager-1.4.0/python3-statvfs.patch b/patches/app-emulation/virt-manager-1.4.0/python3-statvfs.patch new file mode 100644 index 0000000..c0751bb --- /dev/null +++ b/patches/app-emulation/virt-manager-1.4.0/python3-statvfs.patch @@ -0,0 +1,42 @@ +diff --git a/virtManager/addstorage.py b/virtManager/addstorage.py +index 1d79c4f..b9b91fb 100644 +--- a/virtManager/addstorage.py ++++ b/virtManager/addstorage.py +@@ -19,7 +19,6 @@ + + import logging + import os +-import statvfs + + from gi.repository import GObject + from gi.repository import Gtk +@@ -81,7 +80,7 @@ class vmmAddStorage(vmmGObjectUI): + + elif not self.conn.is_remote() and os.path.exists(path): + vfs = os.statvfs(os.path.dirname(path)) +- avail = vfs[statvfs.F_FRSIZE] * vfs[statvfs.F_BAVAIL] ++ avail = vfs.f_frsize * vfs.f_bavail + + return float(avail / 1024.0 / 1024.0 / 1024.0) + +diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py +index 790e454..4b9eb39 100644 +--- a/virtinst/diskbackend.py ++++ b/virtinst/diskbackend.py +@@ -21,7 +21,6 @@ + import logging + import os + import re +-import statvfs + + import libvirt + +@@ -327,7 +326,7 @@ class CloneStorageCreator(_StorageCreator): + ret = False + msg = None + vfs = os.statvfs(os.path.dirname(self._path)) +- avail = vfs[statvfs.F_FRSIZE] * vfs[statvfs.F_BAVAIL] ++ avail = vfs.f_frsize * vfs.f_bavail + need = int(self._size * 1024 * 1024 * 1024) + if need > avail: + if self._sparse: diff --git a/patches/dev-lang/spidermonkey-1.8.5/gcc6-no-implicit-type-convert.patch b/patches/dev-lang/spidermonkey-1.8.5/gcc6-no-implicit-type-convert.patch new file mode 100644 index 0000000..81b533f --- /dev/null +++ b/patches/dev-lang/spidermonkey-1.8.5/gcc6-no-implicit-type-convert.patch @@ -0,0 +1,153 @@ +diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp +index 7ba4ea6..a31567c 100644 +--- a/js/src/jsapi.cpp ++++ b/js/src/jsapi.cpp +@@ -3985,7 +3985,7 @@ JS_Enumerate(JSContext *cx, JSObject *obj) + AutoIdVector props(cx); + JSIdArray *ida; + if (!GetPropertyNames(cx, obj, JSITER_OWNONLY, &props) || !VectorToIdArray(cx, props, &ida)) +- return false; ++ return NULL; + for (size_t n = 0; n < size_t(ida->length); ++n) + JS_ASSERT(js_CheckForStringIndex(ida->vector[n]) == ida->vector[n]); + return ida; +diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp +index d9dd529..3dec9b7 100644 +--- a/js/src/jsfun.cpp ++++ b/js/src/jsfun.cpp +@@ -2051,7 +2051,7 @@ fun_toStringHelper(JSContext *cx, JSObject *obj, uintN indent) + + JSString *str = JS_DecompileFunction(cx, fun, indent); + if (!str) +- return false; ++ return NULL; + + if (!indent) + cx->compartment->toSourceCache.put(fun, str); +@@ -2657,7 +2657,7 @@ LookupInterpretedFunctionPrototype(JSContext *cx, JSObject *funobj) + const Shape *shape = funobj->nativeLookup(id); + if (!shape) { + if (!ResolveInterpretedFunctionPrototype(cx, funobj)) +- return false; ++ return NULL; + shape = funobj->nativeLookup(id); + } + JS_ASSERT(!shape->configurable()); +diff --git a/js/src/jsiter.cpp b/js/src/jsiter.cpp +index 876dc83..5fe3c52 100644 +--- a/js/src/jsiter.cpp ++++ b/js/src/jsiter.cpp +@@ -425,7 +425,7 @@ NewIteratorObject(JSContext *cx, uintN flags) + */ + JSObject *obj = js_NewGCObject(cx, FINALIZE_OBJECT0); + if (!obj) +- return false; ++ return NULL; + obj->init(cx, &js_IteratorClass, NULL, NULL, NULL, false); + obj->setMap(cx->compartment->emptyEnumeratorShape); + return obj; +diff --git a/js/src/jsparse.cpp b/js/src/jsparse.cpp +index c735970..b9cc2aa 100644 +--- a/js/src/jsparse.cpp ++++ b/js/src/jsparse.cpp +@@ -3352,7 +3352,7 @@ Parser::functionDef(JSAtom *funAtom, FunctionType type, uintN lambda) + if (!outertc->inFunction() && bodyLevel && funAtom && !lambda && outertc->compiling()) { + JS_ASSERT(pn->pn_cookie.isFree()); + if (!DefineGlobal(pn, outertc->asCodeGenerator(), funAtom)) +- return false; ++ return NULL; + } + + pn->pn_blockid = outertc->blockid(); +diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp +index 96cefb9..266ffaf 100644 +--- a/js/src/jsstr.cpp ++++ b/js/src/jsstr.cpp +@@ -1734,7 +1734,7 @@ class RegExpGuard + if (flat) { + patstr = flattenPattern(cx, fm.patstr); + if (!patstr) +- return false; ++ return NULL; + } else { + patstr = fm.patstr; + } +@@ -3408,7 +3408,7 @@ js_InitStringClass(JSContext *cx, JSObject *obj) + UndefinedValue(), NULL, NULL, + JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_SHARED, 0, 0, + NULL)) { +- return JS_FALSE; ++ return NULL; + } + + return proto; +diff --git a/js/src/jstypedarray.cpp b/js/src/jstypedarray.cpp +index 8975fb1..64e5e3f 100644 +--- a/js/src/jstypedarray.cpp ++++ b/js/src/jstypedarray.cpp +@@ -1334,7 +1334,7 @@ class TypedArrayTemplate + if (size != 0 && count >= INT32_MAX / size) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, + JSMSG_NEED_DIET, "size and count"); +- return false; ++ return NULL; + } + + int32 bytelen = size * count; +@@ -1668,7 +1668,7 @@ TypedArrayConstruct(JSContext *cx, jsint atype, uintN argc, Value *argv) + + default: + JS_NOT_REACHED("shouldn't have gotten here"); +- return false; ++ return NULL; + } + } + +diff --git a/js/src/jsxml.cpp b/js/src/jsxml.cpp +index 7fa3bc1..71bcc54 100644 +--- a/js/src/jsxml.cpp ++++ b/js/src/jsxml.cpp +@@ -282,7 +282,7 @@ NewXMLNamespace(JSContext *cx, JSLinearString *prefix, JSLinearString *uri, JSBo + + obj = NewBuiltinClassInstanceXML(cx, &js_NamespaceClass); + if (!obj) +- return JS_FALSE; ++ return NULL; + JS_ASSERT(JSVAL_IS_VOID(obj->getNamePrefixVal())); + JS_ASSERT(JSVAL_IS_VOID(obj->getNameURIVal())); + JS_ASSERT(JSVAL_IS_VOID(obj->getNamespaceDeclared())); +@@ -431,7 +431,7 @@ ConvertQNameToString(JSContext *cx, JSObject *obj) + size_t length = str->length(); + jschar *chars = (jschar *) cx->malloc((length + 2) * sizeof(jschar)); + if (!chars) +- return JS_FALSE; ++ return NULL; + *chars = '@'; + const jschar *strChars = str->getChars(cx); + if (!strChars) { +diff --git a/js/src/methodjit/InvokeHelpers.cpp b/js/src/methodjit/InvokeHelpers.cpp +index 59ac8c6..d017c2a 100644 +--- a/js/src/methodjit/InvokeHelpers.cpp ++++ b/js/src/methodjit/InvokeHelpers.cpp +@@ -728,7 +728,7 @@ AtSafePoint(JSContext *cx) + { + JSStackFrame *fp = cx->fp(); + if (fp->hasImacropc()) +- return false; ++ return NULL; + + JSScript *script = fp->script(); + return script->maybeNativeCodeForPC(fp->isConstructing(), cx->regs->pc); +diff --git a/js/src/nanojit/NativeX64.cpp b/js/src/nanojit/NativeX64.cpp +index 39fd4e0..eba4110 100644 +--- a/js/src/nanojit/NativeX64.cpp ++++ b/js/src/nanojit/NativeX64.cpp +@@ -1899,7 +1899,7 @@ namespace nanojit + } + } + +- static const AVMPLUS_ALIGN16(int64_t) negateMask[] = {0x8000000000000000LL,0}; ++ static const AVMPLUS_ALIGN16(uint64_t) negateMask[] = {0x8000000000000000LL,0}; + + void Assembler::asm_fneg(LIns *ins) { + Register rr, ra; diff --git a/patches/dev-libs/libxml2-2.9.4/python3.6-no-PyVerify_fd.patch b/patches/dev-libs/libxml2-2.9.4/python3.6-no-PyVerify_fd.patch new file mode 100644 index 0000000..caea3f2 --- /dev/null +++ b/patches/dev-libs/libxml2-2.9.4/python3.6-no-PyVerify_fd.patch @@ -0,0 +1,13 @@ +diff --git a/python/types.c b/python/types.c +index f237677..124af56 100644 +--- a/python/types.c ++++ b/python/types.c +@@ -31,8 +31,6 @@ libxml_PyFileGet(PyObject *f) { + const char *mode; + + fd = PyObject_AsFileDescriptor(f); +- if (!_PyVerify_fd(fd)) +- return(NULL); + /* + * Get the flags on the fd to understand how it was opened + */ diff --git a/patches/dev-qt/qtwebengine-5.6.2/mgg-build-ozone-eglfs.patch b/patches/dev-qt/qtwebengine-5.6.2/mgg-build-ozone-eglfs.patch new file mode 100644 index 0000000..780d407 --- /dev/null +++ b/patches/dev-qt/qtwebengine-5.6.2/mgg-build-ozone-eglfs.patch @@ -0,0 +1,17 @@ +diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine +index ee09de9..4e209ef 100755 +--- a/tools/buildscripts/gyp_qtwebengine ++++ b/tools/buildscripts/gyp_qtwebengine +@@ -173,6 +173,12 @@ if __name__ == '__main__': + + print 'Updating projects from gyp files...' + #sys.stdout.flush() ++ args.extend(['-D', 'ozone_platform=eglfs']) ++ args.extend(['-D', 'ozone_platform_eglfs=1']) ++ args.extend(['-D', 'use_ozone=1']) ++ args.extend(['-D', 'use_ozone_evdev=1']) ++ #args.extend(['-D', 'use_evdev_gestures=1']) # needs libevdev-cros ++ args.extend(['-D', 'use_x11=0']) + + # Off we go... + sys.exit(gyp.main(args)) diff --git a/patches/dev-qt/qtwebengine-5.6.2/mgg-disable-libpci-usage.patch b/patches/dev-qt/qtwebengine-5.6.2/mgg-disable-libpci-usage.patch new file mode 100644 index 0000000..4a4f5d1 --- /dev/null +++ b/patches/dev-qt/qtwebengine-5.6.2/mgg-disable-libpci-usage.patch @@ -0,0 +1,40 @@ +diff --git a/src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc b/src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc +index 413e949..92d9330 100644 +--- a/src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc ++++ b/src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc +@@ -23,7 +23,7 @@ + #include "ui/gl/gl_surface.h" + #include "ui/gl/gl_switches.h" + +-#if defined(USE_LIBPCI) ++#if defined(USE_LIBPCI_NO) + #include "library_loaders/libpci.h" + #endif + +@@ -31,7 +31,7 @@ namespace gpu { + + namespace { + +-#if defined(USE_LIBPCI) ++#if defined(USE_LIBPCI_NO) + // This checks if a system supports PCI bus. + // We check the existence of /sys/bus/pci or /sys/bug/pci_express. + bool IsPciSupported() { +@@ -40,7 +40,7 @@ bool IsPciSupported() { + return (base::PathExists(pci_path) || + base::PathExists(pcie_path)); + } +-#endif // defined(USE_LIBPCI) ++#endif // defined(USE_LIBPCI_NO) + + // Scan /etc/ati/amdpcsdb.default for "ReleaseVersion". + // Return empty string on failing. +@@ -77,7 +77,7 @@ const uint32 kVendorIDAMD = 0x1002; + CollectInfoResult CollectPCIVideoCardInfo(GPUInfo* gpu_info) { + DCHECK(gpu_info); + +-#if !defined(USE_LIBPCI) ++#if !defined(USE_LIBPCI_NO) + return kCollectInfoNonFatalFailure; + #else + diff --git a/patches/dev-qt/qtwebengine-5.6.2/mgg-gcc6-missing-include.patch b/patches/dev-qt/qtwebengine-5.6.2/mgg-gcc6-missing-include.patch new file mode 100644 index 0000000..ac22d2b --- /dev/null +++ b/patches/dev-qt/qtwebengine-5.6.2/mgg-gcc6-missing-include.patch @@ -0,0 +1,12 @@ +diff --git a/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h b/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h +index 673a454..c3187f6 100644 +--- a/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h ++++ b/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #include "base/memory/scoped_ptr.h" + #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" diff --git a/patches/dev-qt/qtwebengine-5.7.1/gcc7-1.patch b/patches/dev-qt/qtwebengine-5.7.1/gcc7-1.patch new file mode 100644 index 0000000..d4eec83 --- /dev/null +++ b/patches/dev-qt/qtwebengine-5.7.1/gcc7-1.patch @@ -0,0 +1,37 @@ +From 64fdd317d4127142ad9e967197a2df6ac81ef55f Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Wed, 29 Mar 2017 17:42:18 +0200 +Subject: [PATCH] Fix build with GCC 7.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +Fixes some ambiguities and outright wrong code GCC 7 doesn't accept but +earlier compilers did. + +Task-number:QTBUG-59776 +Change-Id: I012f121842ac6cde49db0d571efc62aabe2115e3 +Reviewed-by: Michael Brüning +--- + .../mojo/public/cpp/bindings/interface_ptr_info.h | 2 +- + .../third_party/WebKit/Source/wtf/LinkedHashSet.h | 2 ++ + chromium/v8/src/objects-body-descriptors.h | 2 +- + chromium/v8/src/objects-inl.h | 19 +++++++++++++++++++ + chromium/v8/src/objects.h | 16 ++-------------- + 5 files changed, 25 insertions(+), 16 deletions(-) + +diff --git a/src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h b/src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h +index 5bd29d5..c94a5ac 100644 +--- a/src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h ++++ b/src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h +@@ -34,7 +34,7 @@ class InterfacePtrInfo { + + InterfacePtrInfo& operator=(InterfacePtrInfo&& other) { + if (this != &other) { +- handle_ = other.handle_.Pass(); ++ handle_ = std::move(other.handle_); + version_ = other.version_; + other.version_ = 0u; + } +-- +2.7.4 diff --git a/patches/dev-qt/qtwebengine-5.7.1/gcc7-2.patch b/patches/dev-qt/qtwebengine-5.7.1/gcc7-2.patch new file mode 100644 index 0000000..6d2b839 --- /dev/null +++ b/patches/dev-qt/qtwebengine-5.7.1/gcc7-2.patch @@ -0,0 +1,107 @@ +From 493441248c82d9f39d0947e3bbf4571736e1cf85 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Wed, 29 Mar 2017 15:53:00 +0200 +Subject: [PATCH 1/1] Fix build with GCC 7.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +Fixes a few problems with using undeclared functions and ambigious +code. + +Task-number: QTBUG-59776 +Change-Id: I59813919b4867d5dd3499a45baed004a1a1c1a3c +Reviewed-by: Michael Brüning +--- + chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h | 2 ++ + .../third_party/pdfium/fpdfsdk/javascript/global.cpp | 8 ++++---- + chromium/v8/src/objects-body-descriptors.h | 2 +- + chromium/v8/src/objects-inl.h | 18 ++++++++++++++++++ + chromium/v8/src/objects.h | 16 ++-------------- + 5 files changed, 27 insertions(+), 19 deletions(-) + +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h +index e85c72f..6f94cd6 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h +@@ -542,6 +542,8 @@ inline LinkedHashSet& LinkedHashSet::operator=(LinkedHas + return *this; + } + ++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); ++ + template + inline void LinkedHashSet::swap(LinkedHashSet& other) + { +diff --git a/src/3rdparty/chromium/v8/src/objects-body-descriptors.h b/src/3rdparty/chromium/v8/src/objects-body-descriptors.h +index 91cb888..a1c3634 100644 +--- a/src/3rdparty/chromium/v8/src/objects-body-descriptors.h ++++ b/src/3rdparty/chromium/v8/src/objects-body-descriptors.h +@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { + + template + static inline void IterateBody(HeapObject* obj, int object_size) { +- IterateBody(obj); ++ IterateBody(obj); + } + }; + +diff --git a/src/3rdparty/chromium/v8/src/objects-inl.h b/src/3rdparty/chromium/v8/src/objects-inl.h +index 58441d3..4c486ea 100644 +--- a/src/3rdparty/chromium/v8/src/objects-inl.h ++++ b/src/3rdparty/chromium/v8/src/objects-inl.h +@@ -7588,6 +7588,24 @@ bool GlobalDictionaryShape::IsDeleted(Dictionary* dict, int entry) { + } + + ++template ++inline uint32_t HashTable::Hash(Key key) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHash(key, GetHeap()->HashSeed()); ++ } else { ++ return Shape::Hash(key); ++ } ++} ++ ++template ++inline uint32_t HashTable::HashForObject(Key key, Object* object) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); ++ } else { ++ return Shape::HashForObject(key, object); ++ } ++} ++ + bool ObjectHashTableShape::IsMatch(Handle key, Object* other) { + return key->SameValue(other); + } +diff --git a/src/3rdparty/chromium/v8/src/objects.h b/src/3rdparty/chromium/v8/src/objects.h +index 7d774be..42da5fa 100644 +--- a/src/3rdparty/chromium/v8/src/objects.h ++++ b/src/3rdparty/chromium/v8/src/objects.h +@@ -3194,21 +3194,9 @@ class HashTable : public HashTableBase { + typedef Shape ShapeT; + + // Wrapper methods +- inline uint32_t Hash(Key key) { +- if (Shape::UsesSeed) { +- return Shape::SeededHash(key, GetHeap()->HashSeed()); +- } else { +- return Shape::Hash(key); +- } +- } ++ inline uint32_t Hash(Key key); + +- inline uint32_t HashForObject(Key key, Object* object) { +- if (Shape::UsesSeed) { +- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); +- } else { +- return Shape::HashForObject(key, object); +- } +- } ++ inline uint32_t HashForObject(Key key, Object* object); + + // Returns a new HashTable object. + MUST_USE_RESULT static Handle New( +-- +2.7.4 diff --git a/patches/dev-qt/qtwebengine-5.7.1/mgg-build-ozone-eglfs.patch b/patches/dev-qt/qtwebengine-5.7.1/mgg-build-ozone-eglfs.patch new file mode 100644 index 0000000..12045fd --- /dev/null +++ b/patches/dev-qt/qtwebengine-5.7.1/mgg-build-ozone-eglfs.patch @@ -0,0 +1,20 @@ +diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine +index ee09de9..4e209ef 100755 +--- a/tools/buildscripts/gyp_qtwebengine ++++ b/tools/buildscripts/gyp_qtwebengine +@@ -173,6 +173,15 @@ if __name__ == '__main__': + + print 'Updating projects from gyp files...' + #sys.stdout.flush() ++ args.extend(['-D', 'ozone_platform=wayland']) ++ args.extend(['-D', 'enable_package_mash_services=1']) ++ args.extend(['-D', 'ozone_platform_wayland=1']) ++ args.extend(['-D', 'ozone_platform_dri=1']) ++ args.extend(['-D', 'ozone_platform_egltest=0']) ++ args.extend(['-D', 'use_aura=1']) ++ args.extend(['-D', 'use_ozone=1']) ++ args.extend(['-D', 'use_ozone_evdev=1']) ++ args.extend(['-D', 'use_x11=0']) + + # Off we go... + sys.exit(gyp.main(args)) diff --git a/patches/dev-qt/qtwebengine-5.7.1/mgg-disable-libpci-usage.patch b/patches/dev-qt/qtwebengine-5.7.1/mgg-disable-libpci-usage.patch new file mode 100644 index 0000000..4a4f5d1 --- /dev/null +++ b/patches/dev-qt/qtwebengine-5.7.1/mgg-disable-libpci-usage.patch @@ -0,0 +1,40 @@ +diff --git a/src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc b/src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc +index 413e949..92d9330 100644 +--- a/src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc ++++ b/src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc +@@ -23,7 +23,7 @@ + #include "ui/gl/gl_surface.h" + #include "ui/gl/gl_switches.h" + +-#if defined(USE_LIBPCI) ++#if defined(USE_LIBPCI_NO) + #include "library_loaders/libpci.h" + #endif + +@@ -31,7 +31,7 @@ namespace gpu { + + namespace { + +-#if defined(USE_LIBPCI) ++#if defined(USE_LIBPCI_NO) + // This checks if a system supports PCI bus. + // We check the existence of /sys/bus/pci or /sys/bug/pci_express. + bool IsPciSupported() { +@@ -40,7 +40,7 @@ bool IsPciSupported() { + return (base::PathExists(pci_path) || + base::PathExists(pcie_path)); + } +-#endif // defined(USE_LIBPCI) ++#endif // defined(USE_LIBPCI_NO) + + // Scan /etc/ati/amdpcsdb.default for "ReleaseVersion". + // Return empty string on failing. +@@ -77,7 +77,7 @@ const uint32 kVendorIDAMD = 0x1002; + CollectInfoResult CollectPCIVideoCardInfo(GPUInfo* gpu_info) { + DCHECK(gpu_info); + +-#if !defined(USE_LIBPCI) ++#if !defined(USE_LIBPCI_NO) + return kCollectInfoNonFatalFailure; + #else + diff --git a/patches/dev-qt/qtwebengine-5.7.1/mgg-gcc6-missing-include.patch b/patches/dev-qt/qtwebengine-5.7.1/mgg-gcc6-missing-include.patch new file mode 100644 index 0000000..ac22d2b --- /dev/null +++ b/patches/dev-qt/qtwebengine-5.7.1/mgg-gcc6-missing-include.patch @@ -0,0 +1,12 @@ +diff --git a/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h b/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h +index 673a454..c3187f6 100644 +--- a/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h ++++ b/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #include "base/memory/scoped_ptr.h" + #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" diff --git a/patches/dev-util/cargo-0.12.0/musl-flock.patch b/patches/dev-util/cargo-0.12.0/musl-flock.patch new file mode 100644 index 0000000..6d849f9 --- /dev/null +++ b/patches/dev-util/cargo-0.12.0/musl-flock.patch @@ -0,0 +1,33 @@ +From f68c8104d7564457de85d6eac85d97de692ccf3e Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka +Date: Sun, 7 Aug 2016 02:22:00 +0200 +Subject: [PATCH] Disable is_on_nfs_mount() check on musl libc (fixes #2937) + +musl libc doesn't provide constant NFS_SUPER_MAGICK that is used in +the is_on_nfs_mount function. +--- + src/cargo/util/flock.rs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/cargo/util/flock.rs b/src/cargo/util/flock.rs +index cccdd4a..3e4530b 100644 +--- a/src/cargo/util/flock.rs ++++ b/src/cargo/util/flock.rs +@@ -291,7 +291,7 @@ fn acquire(config: &Config, + human(format!("failed to lock file: {}", path.display())) + }); + +- #[cfg(target_os = "linux")] ++ #[cfg(all(target_os = "linux", not(target_env = "musl")))] + fn is_on_nfs_mount(path: &Path) -> bool { + use std::ffi::CString; + use std::mem; +@@ -310,7 +310,7 @@ fn acquire(config: &Config, + } + } + +- #[cfg(not(target_os = "linux"))] ++ #[cfg(any(not(target_os = "linux"), target_env = "musl"))] + fn is_on_nfs_mount(_path: &Path) -> bool { + false + } diff --git a/patches/dev-util/google-perftools-2.5/mgg-musl-compat.patch b/patches/dev-util/google-perftools-2.5/mgg-musl-compat.patch new file mode 100644 index 0000000..8bff91a --- /dev/null +++ b/patches/dev-util/google-perftools-2.5/mgg-musl-compat.patch @@ -0,0 +1,25 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..1fa3005 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -147,6 +147,7 @@ + extern "C" { + #endif + ++#define __off64_t off64_t + #include + #include + #include +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..9e9bf1d 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -178,7 +178,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + return result; + } + +-# if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) ++# if defined(__GLIBC__) && (!defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH)) + + extern "C" void* mmap(void *start, size_t length, int prot, int flags, + int fd, off_t offset) __THROW { diff --git a/patches/dev-util/ragel-6.9/mgg-gcc6-narrowing-cast.patch b/patches/dev-util/ragel-6.9/mgg-gcc6-narrowing-cast.patch new file mode 100644 index 0000000..0e40df9 --- /dev/null +++ b/patches/dev-util/ragel-6.9/mgg-gcc6-narrowing-cast.patch @@ -0,0 +1,31 @@ +diff --git a/ragel/common.cpp b/ragel/common.cpp +index 3047e70..c387386 100644 +--- a/ragel/common.cpp ++++ b/ragel/common.cpp +@@ -34,7 +34,7 @@ HostType hostTypesC[] = + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, sizeof(int) }, + { "unsigned", "int", "uint", false, true, false, 0, UINT_MAX, sizeof(unsigned int) }, + { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, sizeof(long) }, +- { "unsigned", "long", "ulong", false, true, false, 0, ULONG_MAX, sizeof(unsigned long) } ++ { "unsigned", "long", "ulong", false, true, false, 0, (long long)ULONG_MAX, sizeof(unsigned long) } + }; + + #define S8BIT_MIN -128 +@@ -87,7 +87,7 @@ HostType hostTypesGo[] = + { "int32", 0, "int32", true, true, false, S32BIT_MIN, S32BIT_MAX, 4 }, + { "uint32", 0, "uint32", false, true, false, U32BIT_MIN, U32BIT_MAX, 4 }, + { "int64", 0, "int64", true, true, false, S64BIT_MIN, S64BIT_MAX, 8 }, +- { "uint64", 0, "uint64", false, true, false, U64BIT_MIN, U64BIT_MAX, 8 }, ++ { "uint64", 0, "uint64", false, true, false, U64BIT_MIN, (long long)U64BIT_MAX, 8 }, + { "rune", 0, "int32", true, true, true, S32BIT_MIN, S32BIT_MAX, 4 } + }; + +@@ -116,7 +116,7 @@ HostType hostTypesCSharp[] = + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 4 }, + { "uint", 0, "uint", false, true, false, 0, UINT_MAX, 4 }, + { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 8 }, +- { "ulong", 0, "ulong", false, true, false, 0, ULONG_MAX, 8 } ++ { "ulong", 0, "ulong", false, true, false, 0, (long long)ULONG_MAX, 8 } + }; + + HostType hostTypesOCaml[] = diff --git a/patches/media-libs/glu-9999/dont-link-with-lGL.patch b/patches/media-libs/glu-9999/dont-link-with-lGL.patch new file mode 100644 index 0000000..4f8e83f --- /dev/null +++ b/patches/media-libs/glu-9999/dont-link-with-lGL.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 998eb8f..27b254e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,7 +11,7 @@ aux_source_directory(source SRC) + aux_source_directory(source/libtess TESS_SRC) + file(GLOB_RECURSE NURBS_SRC source/libnurbs/*.cc) + add_library(GLU SHARED ${SRC} ${TESS_SRC} ${NURBS_SRC}) +-target_link_libraries(GLU GL m) ++target_link_libraries(GLU m) + + if(CMAKE_SHARED_LIBRARY_SUFFIX MATCHES ".so") + set_target_properties(GLU PROPERTIES SUFFIX ".so.1") diff --git a/patches/media-libs/glu-9999/pkgconfig.patch b/patches/media-libs/glu-9999/pkgconfig.patch new file mode 100644 index 0000000..fb2976e --- /dev/null +++ b/patches/media-libs/glu-9999/pkgconfig.patch @@ -0,0 +1,16 @@ +diff --git a/glu.pc b/glu.pc +new file mode 100644 +index 0000000..36b117b +--- /dev/null ++++ glu.pc +@@ -0,0 +1,10 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=/usr/lib64 ++includedir=${prefix}/include ++ ++Name: glu ++Description: Mesa OpenGL Utility library ++Version: 9.0.0 ++Libs: -L${libdir} -lGLU ++Libs.private: -lm diff --git a/patches/media-libs/libcanberra-0.30/mgg-remove-configure-x-deps.patch b/patches/media-libs/libcanberra-0.30/mgg-remove-configure-x-deps.patch new file mode 100644 index 0000000..39ccfd1 --- /dev/null +++ b/patches/media-libs/libcanberra-0.30/mgg-remove-configure-x-deps.patch @@ -0,0 +1,92 @@ +diff --git a/configure b/configure +index 944bd2a..6ffcbb5 100755 +--- a/configure ++++ b/configure +@@ -19392,12 +19392,12 @@ if test -n "$GTK_CFLAGS"; then + pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 x11 \""; } >&5 +- ($PKG_CONFIG --exists --print-errors " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 x11 ") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 \""; } >&5 ++ ($PKG_CONFIG --exists --print-errors " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 x11 " 2>/dev/null` ++ pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 " 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -19409,12 +19409,12 @@ if test -n "$GTK_LIBS"; then + pkg_cv_GTK_LIBS="$GTK_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 x11 \""; } >&5 +- ($PKG_CONFIG --exists --print-errors " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 x11 ") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 \""; } >&5 ++ ($PKG_CONFIG --exists --print-errors " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 x11 " 2>/dev/null` ++ pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 " 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -19435,9 +19435,9 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 x11 " 2>&1` ++ GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 " 2>&1` + else +- GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 x11 " 2>&1` ++ GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " gtk+-2.0 >= 2.20.0 gthread-2.0 glib-2.0 >= 2.32 gdk-2.0 " 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK_PKG_ERRORS" >&5 +@@ -19513,12 +19513,12 @@ if test -n "$GTK3_CFLAGS"; then + pkg_cv_GTK3_CFLAGS="$GTK3_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 x11 \""; } >&5 +- ($PKG_CONFIG --exists --print-errors " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 x11 ") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 \""; } >&5 ++ ($PKG_CONFIG --exists --print-errors " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_GTK3_CFLAGS=`$PKG_CONFIG --cflags " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 x11 " 2>/dev/null` ++ pkg_cv_GTK3_CFLAGS=`$PKG_CONFIG --cflags " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 " 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -19530,12 +19530,12 @@ if test -n "$GTK3_LIBS"; then + pkg_cv_GTK3_LIBS="$GTK3_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 x11 \""; } >&5 +- ($PKG_CONFIG --exists --print-errors " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 x11 ") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 \""; } >&5 ++ ($PKG_CONFIG --exists --print-errors " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_GTK3_LIBS=`$PKG_CONFIG --libs " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 x11 " 2>/dev/null` ++ pkg_cv_GTK3_LIBS=`$PKG_CONFIG --libs " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 " 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -19556,9 +19556,9 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- GTK3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 x11 " 2>&1` ++ GTK3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 " 2>&1` + else +- GTK3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 x11 " 2>&1` ++ GTK3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " gtk+-3.0 gthread-2.0 glib-2.0 >= 2.32 gdk-3.0 " 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK3_PKG_ERRORS" >&5 diff --git a/patches/media-libs/libcanberra-0.30/mgg-remove-lx11-pkgconfig-pc.patch b/patches/media-libs/libcanberra-0.30/mgg-remove-lx11-pkgconfig-pc.patch new file mode 100644 index 0000000..94b2670 --- /dev/null +++ b/patches/media-libs/libcanberra-0.30/mgg-remove-lx11-pkgconfig-pc.patch @@ -0,0 +1,12 @@ +diff --git a/libcanberra-gtk3.pc.in b/libcanberra-gtk3.pc.in +index fe89d3a..8ffc10c 100644 +--- a/libcanberra-gtk3.pc.in ++++ b/libcanberra-gtk3.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: libcanberra-gtk3 + Description: Gtk3 Event Sound API + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lcanberra-gtk3 -lX11 @PTHREAD_LIBS@ ++Libs: -L${libdir} -lcanberra-gtk3 @PTHREAD_LIBS@ + Cflags: -D_REENTRANT -I${includedir} + Requires: libcanberra gdk-3.0 gtk+-3.0 diff --git a/patches/media-libs/libcanberra-0.30/mgg-remove-x-deps.patch b/patches/media-libs/libcanberra-0.30/mgg-remove-x-deps.patch new file mode 100644 index 0000000..9c46e66 --- /dev/null +++ b/patches/media-libs/libcanberra-0.30/mgg-remove-x-deps.patch @@ -0,0 +1,194 @@ +diff --git a/src/canberra-gtk-module.c b/src/canberra-gtk-module.c +index c1532ab..d9b0e56 100644 +--- a/src/canberra-gtk-module.c ++++ b/src/canberra-gtk-module.c +@@ -25,8 +25,6 @@ + #endif + + #include +-#include +-#include + + #include "canberra-gtk.h" + +@@ -300,115 +298,15 @@ static SoundEventData* filter_sound_event(SoundEventData *d) { + } + + static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) { +- Atom type_return; +- gint format_return; +- gulong nitems_return; +- gulong bytes_after_return; +- guchar *data = NULL; +- gint ret = -1; +- +-#ifdef GDK_IS_X11_DISPLAY +- if (!GDK_IS_X11_DISPLAY(d)) +- return 0; +-#endif +- +- if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), +- gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"), +- 0, G_MAXLONG, False, XA_CARDINAL, &type_return, +- &format_return, &nitems_return, &bytes_after_return, +- &data) != Success) +- return -1; +- +- if (type_return == XA_CARDINAL && format_return == 32 && data) { +- guint32 desktop = *(guint32*) data; +- +- if (desktop != 0xFFFFFFFF) +- ret = (gint) desktop; +- } +- +- if (type_return != None && data != NULL) +- XFree(data); +- +- return ret; ++ return 0; + } + + static gint display_get_desktop(GdkDisplay *d) { +- Atom type_return; +- gint format_return; +- gulong nitems_return; +- gulong bytes_after_return; +- guchar *data = NULL; +- gint ret = -1; +- +-#ifdef GDK_IS_X11_DISPLAY +- if (!GDK_IS_X11_DISPLAY(d)) +- return 0; +-#endif +- +- if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)), +- gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"), +- 0, G_MAXLONG, False, XA_CARDINAL, &type_return, +- &format_return, &nitems_return, &bytes_after_return, +- &data) != Success) +- return -1; +- +- if (type_return == XA_CARDINAL && format_return == 32 && data) { +- +- guint32 desktop = *(guint32*) data; +- +- if (desktop != 0xFFFFFFFF) +- ret = (gint) desktop; +- } +- +- if (type_return != None && data != NULL) +- XFree(data); +- +- return ret; ++ return 0; + } + + static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) { +- Atom type_return; +- gint format_return; +- gulong nitems_return; +- gulong bytes_after_return; +- guchar *data = NULL; +- gboolean ret = FALSE; +- Atom xembed; +- +-#ifdef GDK_IS_X11_DISPLAY +- if (!GDK_IS_X11_DISPLAY(d)) +- return FALSE; +-#endif +- +- /* Gnome Panel applets are XEMBED windows. We need to make sure we +- * ignore them */ +- +- xembed = gdk_x11_get_xatom_by_name_for_display(d, "_XEMBED_INFO"); +- +- /* be robust against not existing XIDs (LP: #834403) */ +- gdk_error_trap_push(); +- if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), +- xembed, +- 0, 2, False, xembed, &type_return, +- &format_return, &nitems_return, &bytes_after_return, +- &data) != Success) { +- return FALSE; +- } +- +-#if GTK_CHECK_VERSION(3,0,0) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_flush(); +- gdk_error_trap_pop(); +-#endif +- +- if (type_return == xembed && format_return == 32 && data) +- ret = TRUE; +- +- if (type_return != None && data != NULL) +- XFree(data); +- +- return ret; ++ return FALSE; + } + + static void dispatch_sound_event(SoundEventData *d) { +diff --git a/src/canberra-gtk.c b/src/canberra-gtk.c +index 08cb668..63e67c8 100644 +--- a/src/canberra-gtk.c ++++ b/src/canberra-gtk.c +@@ -26,8 +26,6 @@ + + #include + #include +-#include +-#include + + #include "canberra.h" + #include "canberra-gtk.h" +@@ -178,36 +176,7 @@ static GtkWindow* get_toplevel(GtkWidget *w) { + } + + static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) { +- Atom type_return; +- gint format_return; +- gulong nitems_return; +- gulong bytes_after_return; +- guchar *data = NULL; +- gint ret = -1; +- +-#ifdef GDK_IS_X11_DISPLAY +- if (!GDK_IS_X11_DISPLAY(d)) +- return 0; +-#endif +- +- if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), +- gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"), +- 0, G_MAXLONG, False, XA_CARDINAL, &type_return, +- &format_return, &nitems_return, &bytes_after_return, +- &data) != Success) +- return -1; +- +- if (type_return == XA_CARDINAL && format_return == 32 && data) { +- guint32 desktop = *(guint32*) data; +- +- if (desktop != 0xFFFFFFFF) +- ret = (gint) desktop; +- } +- +- if (type_return != None && data != NULL) +- XFree(data); +- +- return ret; ++ return 0; + } + + /** +@@ -263,9 +232,7 @@ int ca_gtk_proplist_set_for_widget(ca_proplist *p, GtkWidget *widget) { + GdkDisplay *display = NULL; + gint x = -1, y = -1, width = -1, height = -1, screen_width = -1, screen_height = -1; + +- if ((dw = gtk_widget_get_window(GTK_WIDGET(w)))) +- if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_XID, "%lu", (unsigned long) GDK_WINDOW_XID(dw))) < 0) +- return ret; ++ dw = gtk_widget_get_window(GTK_WIDGET(w)); + + if ((display = gtk_widget_get_display(GTK_WIDGET(w)))) { + if ((t = gdk_display_get_name(display))) diff --git a/patches/media-libs/libepoxy-1.4.1/gles-only.patch b/patches/media-libs/libepoxy-1.4.1/gles-only.patch new file mode 100644 index 0000000..9bdbcec --- /dev/null +++ b/patches/media-libs/libepoxy-1.4.1/gles-only.patch @@ -0,0 +1,13 @@ +diff --git a/src/dispatch_common.c b/src/dispatch_common.c +index b521b1b..0e98f26 100644 +--- a/src/dispatch_common.c ++++ b/src/dispatch_common.c +@@ -178,7 +178,7 @@ + #elif defined(ANDROID) + #define GLX_LIB "libGLESv2.so" + #else +-#define GLX_LIB "libGL.so.1" ++#define GLX_LIB "libGLESv2.so" + #endif + + #ifdef ANDROID diff --git a/patches/net-libs/webkit-gtk-2.14.2/fix-eglplatform-no-x11-headers-missing.patch b/patches/net-libs/webkit-gtk-2.14.2/fix-eglplatform-no-x11-headers-missing.patch new file mode 100644 index 0000000..c8b4930 --- /dev/null +++ b/patches/net-libs/webkit-gtk-2.14.2/fix-eglplatform-no-x11-headers-missing.patch @@ -0,0 +1,12 @@ +diff --git a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp b/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp +index cf1f52a..ae49556 100644 +--- a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp ++++ b/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp +@@ -27,6 +27,7 @@ + #include "WaylandCompositor.h" + + #if PLATFORM(WAYLAND) && USE(EGL) ++#define MESA_EGL_NO_X11_HEADERS + + #include "WebKit2WaylandServerProtocol.h" + #include diff --git a/patches/net-libs/webkit-gtk-2.14.2/fix-eglplatform-no-x11-headers.patch b/patches/net-libs/webkit-gtk-2.14.2/fix-eglplatform-no-x11-headers.patch new file mode 100644 index 0000000..e3516c6 --- /dev/null +++ b/patches/net-libs/webkit-gtk-2.14.2/fix-eglplatform-no-x11-headers.patch @@ -0,0 +1,28 @@ +diff --git a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h +index 6d550da..ff8ec9c 100644 +--- a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h ++++ b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h +@@ -107,6 +107,14 @@ typedef intptr_t EGLNativePixmapType; + + #elif defined(__unix__) + ++#if defined(MESA_EGL_NO_X11_HEADERS) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ ++#else ++ + /* X11 (tentative) */ + #include + #include +@@ -115,6 +123,8 @@ typedef Display *EGLNativeDisplayType; + typedef Pixmap EGLNativePixmapType; + typedef Window EGLNativeWindowType; + ++#endif /* MESA_EGL_NO_X11_HEADERS */ ++ + #elif defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) + + #if defined(__OBJC__) diff --git a/patches/net-libs/webkit-gtk-2.14.5/fix-eglplatform-no-x11-headers-missing.patch b/patches/net-libs/webkit-gtk-2.14.5/fix-eglplatform-no-x11-headers-missing.patch new file mode 100644 index 0000000..c8b4930 --- /dev/null +++ b/patches/net-libs/webkit-gtk-2.14.5/fix-eglplatform-no-x11-headers-missing.patch @@ -0,0 +1,12 @@ +diff --git a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp b/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp +index cf1f52a..ae49556 100644 +--- a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp ++++ b/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp +@@ -27,6 +27,7 @@ + #include "WaylandCompositor.h" + + #if PLATFORM(WAYLAND) && USE(EGL) ++#define MESA_EGL_NO_X11_HEADERS + + #include "WebKit2WaylandServerProtocol.h" + #include diff --git a/patches/net-libs/webkit-gtk-2.14.5/fix-eglplatform-no-x11-headers.patch b/patches/net-libs/webkit-gtk-2.14.5/fix-eglplatform-no-x11-headers.patch new file mode 100644 index 0000000..e3516c6 --- /dev/null +++ b/patches/net-libs/webkit-gtk-2.14.5/fix-eglplatform-no-x11-headers.patch @@ -0,0 +1,28 @@ +diff --git a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h +index 6d550da..ff8ec9c 100644 +--- a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h ++++ b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h +@@ -107,6 +107,14 @@ typedef intptr_t EGLNativePixmapType; + + #elif defined(__unix__) + ++#if defined(MESA_EGL_NO_X11_HEADERS) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ ++#else ++ + /* X11 (tentative) */ + #include + #include +@@ -115,6 +123,8 @@ typedef Display *EGLNativeDisplayType; + typedef Pixmap EGLNativePixmapType; + typedef Window EGLNativeWindowType; + ++#endif /* MESA_EGL_NO_X11_HEADERS */ ++ + #elif defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) + + #if defined(__OBJC__) diff --git a/patches/net-libs/webkit-gtk-2.16.1/fix-eglplatform-no-x11-headers-missing.patch b/patches/net-libs/webkit-gtk-2.16.1/fix-eglplatform-no-x11-headers-missing.patch new file mode 100644 index 0000000..c8b4930 --- /dev/null +++ b/patches/net-libs/webkit-gtk-2.16.1/fix-eglplatform-no-x11-headers-missing.patch @@ -0,0 +1,12 @@ +diff --git a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp b/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp +index cf1f52a..ae49556 100644 +--- a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp ++++ b/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp +@@ -27,6 +27,7 @@ + #include "WaylandCompositor.h" + + #if PLATFORM(WAYLAND) && USE(EGL) ++#define MESA_EGL_NO_X11_HEADERS + + #include "WebKit2WaylandServerProtocol.h" + #include diff --git a/patches/net-libs/webkit-gtk-2.16.1/fix-eglplatform-no-x11-headers.patch b/patches/net-libs/webkit-gtk-2.16.1/fix-eglplatform-no-x11-headers.patch new file mode 100644 index 0000000..e3516c6 --- /dev/null +++ b/patches/net-libs/webkit-gtk-2.16.1/fix-eglplatform-no-x11-headers.patch @@ -0,0 +1,28 @@ +diff --git a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h +index 6d550da..ff8ec9c 100644 +--- a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h ++++ b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h +@@ -107,6 +107,14 @@ typedef intptr_t EGLNativePixmapType; + + #elif defined(__unix__) + ++#if defined(MESA_EGL_NO_X11_HEADERS) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ ++#else ++ + /* X11 (tentative) */ + #include + #include +@@ -115,6 +123,8 @@ typedef Display *EGLNativeDisplayType; + typedef Pixmap EGLNativePixmapType; + typedef Window EGLNativeWindowType; + ++#endif /* MESA_EGL_NO_X11_HEADERS */ ++ + #elif defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) + + #if defined(__OBJC__) diff --git a/patches/sys-apps/gnome-disk-utility-3.22.1/remove-x11-deps.patch b/patches/sys-apps/gnome-disk-utility-3.22.1/remove-x11-deps.patch new file mode 100644 index 0000000..fb93b33 --- /dev/null +++ b/patches/sys-apps/gnome-disk-utility-3.22.1/remove-x11-deps.patch @@ -0,0 +1,72 @@ +diff --git a/src/disks/gducreatefilesystemwidget.c b/src/disks/gducreatefilesystemwidget.c +index 107268a..b20c8a4 100644 +--- a/src/disks/gducreatefilesystemwidget.c ++++ b/src/disks/gducreatefilesystemwidget.c +@@ -12,7 +12,6 @@ + + #include + #include +-#include + #include + + #include "gduapplication.h" +diff --git a/src/disks/gduestimator.c b/src/disks/gduestimator.c +index aa1bae1..6bc0b21 100644 +--- a/src/disks/gduestimator.c ++++ b/src/disks/gduestimator.c +@@ -12,7 +12,6 @@ + + #include + #include +-#include + #include + + #include "gduestimator.h" +diff --git a/src/disks/gduformatvolumedialog.c b/src/disks/gduformatvolumedialog.c +index 2e0ca79..3404af4 100644 +--- a/src/disks/gduformatvolumedialog.c ++++ b/src/disks/gduformatvolumedialog.c +@@ -10,7 +10,6 @@ + #include "config.h" + + #include +-#include + + #include "gduapplication.h" + #include "gduwindow.h" +@@ -187,11 +186,6 @@ gdu_format_volume_dialog_show_internal (UDisksClient *client, + } + else if (parent_xid != -1) + { +- GdkWindow *foreign_window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), parent_xid); +- if (!gtk_widget_get_realized (data->dialog)) +- gtk_widget_realize (data->dialog); +- if (foreign_window != NULL) +- gdk_window_set_transient_for (gtk_widget_get_window (data->dialog), foreign_window); + } + + gtk_dialog_set_default_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK); +diff --git a/src/disks/gdupasswordstrengthwidget.c b/src/disks/gdupasswordstrengthwidget.c +index 6f4138c..0dcc8f9 100644 +--- a/src/disks/gdupasswordstrengthwidget.c ++++ b/src/disks/gdupasswordstrengthwidget.c +@@ -12,7 +12,6 @@ + + #include + #include +-#include + #include + + #include +diff --git a/src/disks/gduvolumegrid.c b/src/disks/gduvolumegrid.c +index 1f2d2ca..7354dad 100644 +--- a/src/disks/gduvolumegrid.c ++++ b/src/disks/gduvolumegrid.c +@@ -12,7 +12,6 @@ + + #include + #include +-#include + #include + + #include "gduvolumegrid.h" diff --git a/patches/sys-apps/net-tools/conflicting-include.patch b/patches/sys-apps/net-tools/conflicting-include.patch new file mode 100644 index 0000000..fb0c1d1 --- /dev/null +++ b/patches/sys-apps/net-tools/conflicting-include.patch @@ -0,0 +1,13 @@ +diff --git a/iptunnel.c b/iptunnel.c +index 3fe1b84..b664677 100644 +--- a/iptunnel.c ++++ b/iptunnel.c +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++//#include + #include + #include + #include diff --git a/patches/sys-libs/efivar-0.21/gcc6-remove-werror.patch b/patches/sys-libs/efivar-0.21/gcc6-remove-werror.patch new file mode 100644 index 0000000..70b6b59 --- /dev/null +++ b/patches/sys-libs/efivar-0.21/gcc6-remove-werror.patch @@ -0,0 +1,13 @@ +diff --git a/Make.defaults b/Make.defaults +index cc2baa9..8303c33 100644 +--- a/Make.defaults ++++ b/Make.defaults +@@ -12,7 +12,7 @@ ARCH = $(shell uname -m) + clang_cflags = + gcc_cflags = -Wmaybe-uninitialized + cflags := $(CFLAGS) \ +- -Werror -Wall -Wsign-compare -Wstrict-aliasing \ ++ -Wall -Wsign-compare -Wstrict-aliasing \ + -std=gnu11 -fshort-wchar -fPIC \ + -fvisibility=hidden \ + -D_GNU_SOURCE -I${TOPDIR}/src/include/efivar/ \ diff --git a/patches/www-client/chromium-56.0.2924.76/mgg-not-chromeos.patch b/patches/www-client/chromium-56.0.2924.76/mgg-not-chromeos.patch new file mode 100644 index 0000000..3f37f59 --- /dev/null +++ b/patches/www-client/chromium-56.0.2924.76/mgg-not-chromeos.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/browser/ui/views/frame/browser_frame.cc b/chrome/browser/ui/views/frame/browser_frame.cc +index c14713e..cac92fa 100644 +--- a/chrome/browser/ui/views/frame/browser_frame.cc ++++ b/chrome/browser/ui/views/frame/browser_frame.cc +@@ -42,7 +42,7 @@ + #endif + + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) +-#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" ++//#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" + #endif + + //////////////////////////////////////////////////////////////////////////////// diff --git a/patches/www-client/chromium-56/issue2485673002_40001.diff b/patches/www-client/chromium-56/issue2485673002_40001.diff new file mode 100644 index 0000000..1ceed8c --- /dev/null +++ b/patches/www-client/chromium-56/issue2485673002_40001.diff @@ -0,0 +1,42 @@ +Index: chrome/chrome_paks.gni +diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni +index 8b1ec9ba64e221751d889a8dfe078c29e76d4851..61afb481af55d09fe8289dd02ca25927ddcbfc2c 100644 +--- a/chrome/chrome_paks.gni ++++ b/chrome/chrome_paks.gni +@@ -51,7 +51,10 @@ template("chrome_repack_percent") { + deps += invoker.deps + } + +- if (use_ash) { ++ # Chrome --mash in non-chromeos builds need to access some ash resources ++ # in order to avoid some missing icons in Ash's window manager session. ++ # TODO(tonikitoo): Remove this when a chrome/mus is available. ++ if (use_ash || enable_package_mash_services) { + sources += + [ "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak" ] + deps += [ "//ash/resources" ] +Index: chrome/chrome_repack_locales.gni +diff --git a/chrome/chrome_repack_locales.gni b/chrome/chrome_repack_locales.gni +index 62706f125de6a70f1250d70cd9c2aece63b9aed6..91681b0d1d8407f3d16787f7a8ac79fcf6eac446 100644 +--- a/chrome/chrome_repack_locales.gni ++++ b/chrome/chrome_repack_locales.gni +@@ -5,6 +5,7 @@ + import("//build/config/chrome_build.gni") + import("//build/config/features.gni") + import("//build/config/ui.gni") ++import("//chrome/common/features.gni") + import("//tools/grit/repack.gni") + + # Wraps repack_locales(), setting the source_patterns and deps required for +@@ -40,7 +41,10 @@ template("chrome_repack_locales") { + deps += invoker.deps + } + +- if (use_ash) { ++ # Chrome --mash in non-chromeos builds need to access some ash resources ++ # in order to avoid some missing localized strings in Ash's window manager session. ++ # TODO(tonikitoo): Remove this when a chrome/mus is available. ++ if (use_ash || enable_package_mash_services) { + source_patterns += [ "${root_gen_dir}/ash/common/strings/ash_strings_" ] + deps += [ "//ash/common/strings" ] + } diff --git a/patches/www-client/chromium-56/mgg-not-chromeos.patch b/patches/www-client/chromium-56/mgg-not-chromeos.patch new file mode 100644 index 0000000..5eee26e --- /dev/null +++ b/patches/www-client/chromium-56/mgg-not-chromeos.patch @@ -0,0 +1,11 @@ +--- /var/tmp/portage/www-client/chromium-56.0.2924.76/work/chromium-56.0.2924.76/chrome/browser/ui/views/frame/browser_frame.cc.orig 2017-01-28 20:26:10.127079320 +0100 ++++ /var/tmp/portage/www-client/chromium-56.0.2924.76/work/chromium-56.0.2924.76/chrome/browser/ui/views/frame/browser_frame.cc 2017-01-28 20:16:05.684377126 +0100 +@@ -42,7 +42,7 @@ + #endif + + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) +-#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" ++//#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" + #endif + + //////////////////////////////////////////////////////////////////////////////// diff --git a/patches/www-client/chromium-57.0.2987.21/mgg-not-chromeos.patch b/patches/www-client/chromium-57.0.2987.21/mgg-not-chromeos.patch new file mode 100644 index 0000000..5e96a7e --- /dev/null +++ b/patches/www-client/chromium-57.0.2987.21/mgg-not-chromeos.patch @@ -0,0 +1,11 @@ +--- chromium-57.0.2987.21/chrome/browser/ui/views/frame/browser_frame.cc.orig 2017-02-08 21:28:13.908935990 +0100 ++++ chromium-57.0.2987.21/chrome/browser/ui/views/frame/browser_frame.cc 2017-02-08 21:27:38.568469139 +0100 +@@ -42,7 +42,7 @@ + #endif + + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) +-#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" ++//#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" + #endif + + //////////////////////////////////////////////////////////////////////////////// diff --git a/patches/www-client/chromium-58.0.3029.81/gcc7.patch b/patches/www-client/chromium-58.0.3029.81/gcc7.patch new file mode 100644 index 0000000..440ad82 --- /dev/null +++ b/patches/www-client/chromium-58.0.3029.81/gcc7.patch @@ -0,0 +1,93 @@ +diff --git a/third_party/WebKit/Source/wtf/LinkedHashSet.h b/third_party/WebKit/Source/wtf/LinkedHashSet.h +index 1a380b4..4accad2 100644 +--- a/third_party/WebKit/Source/wtf/LinkedHashSet.h ++++ b/third_party/WebKit/Source/wtf/LinkedHashSet.h +@@ -687,6 +687,8 @@ inline LinkedHashSet& LinkedHashSet::operator=( + return *this; + } + ++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); ++ + template + inline void LinkedHashSet::swap(LinkedHashSet& other) { + m_impl.swap(other.m_impl); +diff --git a/v8/src/objects-body-descriptors.h b/v8/src/objects-body-descriptors.h +index 91cb888..a1c3634 100644 +--- a/v8/src/objects-body-descriptors.h ++++ b/v8/src/objects-body-descriptors.h +@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { + + template + static inline void IterateBody(HeapObject* obj, int object_size) { +- IterateBody(obj); ++ IterateBody(obj); + } + }; + +diff --git a/v8/src/objects-inl.h b/v8/src/objects-inl.h +index 3aa26c5..e018147 100644 +--- a/v8/src/objects-inl.h ++++ b/v8/src/objects-inl.h +@@ -7858,6 +7858,24 @@ bool GlobalDictionaryShape::IsDeleted(Dictionary* dict, int entry) { + return PropertyCell::cast(dict->ValueAt(entry))->value()->IsTheHole(isolate); + } + ++template ++inline uint32_t HashTable::Hash(Key key) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHash(key, GetHeap()->HashSeed()); ++ } else { ++ return Shape::Hash(key); ++ } ++} ++ ++template ++inline uint32_t HashTable::HashForObject(Key key, Object* object) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); ++ } else { ++ return Shape::HashForObject(key, object); ++ } ++} ++ + + bool ObjectHashTableShape::IsMatch(Handle key, Object* other) { + return key->SameValue(other); +diff --git a/v8/src/objects.h b/v8/src/objects.h +index 04d3d38..697ce55 100644 +--- a/v8/src/objects.h ++++ b/v8/src/objects.h +@@ -3359,21 +3359,9 @@ class HashTable : public HashTableBase { + typedef Shape ShapeT; + + // Wrapper methods +- inline uint32_t Hash(Key key) { +- if (Shape::UsesSeed) { +- return Shape::SeededHash(key, GetHeap()->HashSeed()); +- } else { +- return Shape::Hash(key); +- } +- } ++ inline uint32_t Hash(Key key); + +- inline uint32_t HashForObject(Key key, Object* object) { +- if (Shape::UsesSeed) { +- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); +- } else { +- return Shape::HashForObject(key, object); +- } +- } ++ inline uint32_t HashForObject(Key key, Object* object); + + // Returns a new HashTable object. + MUST_USE_RESULT static Handle New( +--- a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h 2017-05-20 02:22:24.966948019 +0200 ++++ b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h 2017-05-20 02:10:59.966194905 +0200 +@@ -6,6 +6,7 @@ + #include "wtf/ThreadSpecific.h" + + #include ++#include + + namespace gpu { + namespace gles2 { diff --git a/patches/www-client/chromium-58.0.3029.81/mgg-nochromeos-nox11.patch b/patches/www-client/chromium-58.0.3029.81/mgg-nochromeos-nox11.patch new file mode 100644 index 0000000..9cb8e5c --- /dev/null +++ b/patches/www-client/chromium-58.0.3029.81/mgg-nochromeos-nox11.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/browser/ui/views/frame/browser_frame.cc b/chrome/browser/ui/views/frame/browser_frame.cc +index 0df9950..834d3c9 100644 +--- a/chrome/browser/ui/views/frame/browser_frame.cc ++++ b/chrome/browser/ui/views/frame/browser_frame.cc +@@ -41,7 +41,7 @@ + #endif + + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) +-#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" ++//#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" + #endif + + //////////////////////////////////////////////////////////////////////////////// diff --git a/patches/www-client/chromium-59.0.3071.61/gcc7.patch b/patches/www-client/chromium-59.0.3071.61/gcc7.patch new file mode 100644 index 0000000..ad99260 --- /dev/null +++ b/patches/www-client/chromium-59.0.3071.61/gcc7.patch @@ -0,0 +1,38 @@ +diff --git a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h +index d773626..49f8285 100644 +--- a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h ++++ b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h +@@ -6,6 +6,7 @@ + #include "platform/wtf/ThreadSpecific.h" + + #include ++#include + + namespace gpu { + namespace gles2 { +diff --git a/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h b/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h +index 4050a22..ba68319 100644 +--- a/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h ++++ b/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h +@@ -685,6 +685,8 @@ inline LinkedHashSet& LinkedHashSet::operator=( + return *this; + } + ++inline void SwapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); ++ + template + inline void LinkedHashSet::Swap(LinkedHashSet& other) { + impl_.Swap(other.impl_); +diff --git a/v8/src/objects-body-descriptors.h b/v8/src/objects-body-descriptors.h +index 9f080eb..b201c20 100644 +--- a/v8/src/objects-body-descriptors.h ++++ b/v8/src/objects-body-descriptors.h +@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { + + template + static inline void IterateBody(HeapObject* obj, int object_size) { +- IterateBody(obj); ++ IterateBody(obj); + } + }; + diff --git a/patches/www-client/chromium-59.0.3071.61/mgg-nochromeos-nox11.patch b/patches/www-client/chromium-59.0.3071.61/mgg-nochromeos-nox11.patch new file mode 100644 index 0000000..9cb8e5c --- /dev/null +++ b/patches/www-client/chromium-59.0.3071.61/mgg-nochromeos-nox11.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/browser/ui/views/frame/browser_frame.cc b/chrome/browser/ui/views/frame/browser_frame.cc +index 0df9950..834d3c9 100644 +--- a/chrome/browser/ui/views/frame/browser_frame.cc ++++ b/chrome/browser/ui/views/frame/browser_frame.cc +@@ -41,7 +41,7 @@ + #endif + + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) +-#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" ++//#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" + #endif + + //////////////////////////////////////////////////////////////////////////////// diff --git a/patches/www-client/chromium-63.0.3213.0/remove-deps.patch b/patches/www-client/chromium-63.0.3213.0/remove-deps.patch new file mode 100644 index 0000000..c7fb0c5 --- /dev/null +++ b/patches/www-client/chromium-63.0.3213.0/remove-deps.patch @@ -0,0 +1,60 @@ +diff --git a/DEPS b/DEPS +index c8da7d3610fc..935aa3944315 100644 +--- a/DEPS ++++ b/DEPS +@@ -589,19 +589,19 @@ hooks = [ + 'src/tools', + ], + }, +- { +- # This downloads binaries for Native Client's newlib toolchain. +- # Done in lieu of building the toolchain from scratch as it can take +- # anywhere from 30 minutes to 4 hours depending on platform to build. +- 'name': 'nacltools', +- 'pattern': '.', +- 'action': [ +- 'python', +- 'src/build/download_nacl_toolchains.py', +- '--mode', 'nacl_core_sdk', +- 'sync', '--extract', +- ], +- }, ++ #{ ++ # # This downloads binaries for Native Client's newlib toolchain. ++ # # Done in lieu of building the toolchain from scratch as it can take ++ # # anywhere from 30 minutes to 4 hours depending on platform to build. ++ # 'name': 'nacltools', ++ # 'pattern': '.', ++ # 'action': [ ++ # 'python', ++ # 'src/build/download_nacl_toolchains.py', ++ # '--mode', 'nacl_core_sdk', ++ # 'sync', '--extract', ++ # ], ++ #}, + { + # Downloads the current stable linux sysroot to build/linux/ if needed. + # This sysroot updates at about the same rate that the chrome build deps +@@ -627,14 +627,14 @@ hooks = [ + # Pull binutils for linux, enabled debug fission for faster linking / + # debugging when used with clang on Ubuntu Precise. + # https://code.google.com/p/chromium/issues/detail?id=352046 +- { +- 'name': 'binutils', +- 'pattern': 'src/third_party/binutils', +- 'action': [ +- 'python', +- 'src/third_party/binutils/download.py', +- ], +- }, ++ #{ ++ # 'name': 'binutils', ++ # 'pattern': 'src/third_party/binutils', ++ # 'action': [ ++ # 'python', ++ # 'src/third_party/binutils/download.py', ++ # ], ++ #}, + { + # Pull clang if needed or requested via GYP_DEFINES. + # Note: On Win, this should run after win_toolchain, as it may use it. diff --git a/patches/www-client/chromium-63.0.3224.0/fix-bootstrap.patch b/patches/www-client/chromium-63.0.3224.0/fix-bootstrap.patch new file mode 100644 index 0000000..7b0d3b9 --- /dev/null +++ b/patches/www-client/chromium-63.0.3224.0/fix-bootstrap.patch @@ -0,0 +1,20 @@ +diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py +index b274fa8623fc..601d5331698e 100755 +--- a/tools/gn/bootstrap/bootstrap.py ++++ b/tools/gn/bootstrap/bootstrap.py +@@ -546,6 +546,7 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/timer/timer.cc', + 'base/trace_event/category_registry.cc', + 'base/trace_event/event_name_filter.cc', ++ 'base/trace_event/freed_object_tracker.cc', + 'base/trace_event/heap_profiler_allocation_context.cc', + 'base/trace_event/heap_profiler_allocation_context_tracker.cc', + 'base/trace_event/heap_profiler_allocation_register.cc', +@@ -605,7 +606,6 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/strings/string16.cc', + 'base/synchronization/condition_variable_posix.cc', + 'base/synchronization/lock_impl_posix.cc', +- 'base/synchronization/read_write_lock_posix.cc', + 'base/sys_info_posix.cc', + 'base/task_scheduler/task_tracker_posix.cc', + 'base/threading/platform_thread_internal_posix.cc', diff --git a/patches/www-client/chromium-63.0.3224.0/remove-deps.patch b/patches/www-client/chromium-63.0.3224.0/remove-deps.patch new file mode 100644 index 0000000..c7fb0c5 --- /dev/null +++ b/patches/www-client/chromium-63.0.3224.0/remove-deps.patch @@ -0,0 +1,60 @@ +diff --git a/DEPS b/DEPS +index c8da7d3610fc..935aa3944315 100644 +--- a/DEPS ++++ b/DEPS +@@ -589,19 +589,19 @@ hooks = [ + 'src/tools', + ], + }, +- { +- # This downloads binaries for Native Client's newlib toolchain. +- # Done in lieu of building the toolchain from scratch as it can take +- # anywhere from 30 minutes to 4 hours depending on platform to build. +- 'name': 'nacltools', +- 'pattern': '.', +- 'action': [ +- 'python', +- 'src/build/download_nacl_toolchains.py', +- '--mode', 'nacl_core_sdk', +- 'sync', '--extract', +- ], +- }, ++ #{ ++ # # This downloads binaries for Native Client's newlib toolchain. ++ # # Done in lieu of building the toolchain from scratch as it can take ++ # # anywhere from 30 minutes to 4 hours depending on platform to build. ++ # 'name': 'nacltools', ++ # 'pattern': '.', ++ # 'action': [ ++ # 'python', ++ # 'src/build/download_nacl_toolchains.py', ++ # '--mode', 'nacl_core_sdk', ++ # 'sync', '--extract', ++ # ], ++ #}, + { + # Downloads the current stable linux sysroot to build/linux/ if needed. + # This sysroot updates at about the same rate that the chrome build deps +@@ -627,14 +627,14 @@ hooks = [ + # Pull binutils for linux, enabled debug fission for faster linking / + # debugging when used with clang on Ubuntu Precise. + # https://code.google.com/p/chromium/issues/detail?id=352046 +- { +- 'name': 'binutils', +- 'pattern': 'src/third_party/binutils', +- 'action': [ +- 'python', +- 'src/third_party/binutils/download.py', +- ], +- }, ++ #{ ++ # 'name': 'binutils', ++ # 'pattern': 'src/third_party/binutils', ++ # 'action': [ ++ # 'python', ++ # 'src/third_party/binutils/download.py', ++ # ], ++ #}, + { + # Pull clang if needed or requested via GYP_DEFINES. + # Note: On Win, this should run after win_toolchain, as it may use it. diff --git a/patches/www-client/chromium-9999/fix-bootstrap.patch b/patches/www-client/chromium-9999/fix-bootstrap.patch new file mode 100644 index 0000000..7b0d3b9 --- /dev/null +++ b/patches/www-client/chromium-9999/fix-bootstrap.patch @@ -0,0 +1,20 @@ +diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py +index b274fa8623fc..601d5331698e 100755 +--- a/tools/gn/bootstrap/bootstrap.py ++++ b/tools/gn/bootstrap/bootstrap.py +@@ -546,6 +546,7 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/timer/timer.cc', + 'base/trace_event/category_registry.cc', + 'base/trace_event/event_name_filter.cc', ++ 'base/trace_event/freed_object_tracker.cc', + 'base/trace_event/heap_profiler_allocation_context.cc', + 'base/trace_event/heap_profiler_allocation_context_tracker.cc', + 'base/trace_event/heap_profiler_allocation_register.cc', +@@ -605,7 +606,6 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/strings/string16.cc', + 'base/synchronization/condition_variable_posix.cc', + 'base/synchronization/lock_impl_posix.cc', +- 'base/synchronization/read_write_lock_posix.cc', + 'base/sys_info_posix.cc', + 'base/task_scheduler/task_tracker_posix.cc', + 'base/threading/platform_thread_internal_posix.cc', diff --git a/patches/www-client/chromium-9999/remove-deps.patch b/patches/www-client/chromium-9999/remove-deps.patch new file mode 100644 index 0000000..c7fb0c5 --- /dev/null +++ b/patches/www-client/chromium-9999/remove-deps.patch @@ -0,0 +1,60 @@ +diff --git a/DEPS b/DEPS +index c8da7d3610fc..935aa3944315 100644 +--- a/DEPS ++++ b/DEPS +@@ -589,19 +589,19 @@ hooks = [ + 'src/tools', + ], + }, +- { +- # This downloads binaries for Native Client's newlib toolchain. +- # Done in lieu of building the toolchain from scratch as it can take +- # anywhere from 30 minutes to 4 hours depending on platform to build. +- 'name': 'nacltools', +- 'pattern': '.', +- 'action': [ +- 'python', +- 'src/build/download_nacl_toolchains.py', +- '--mode', 'nacl_core_sdk', +- 'sync', '--extract', +- ], +- }, ++ #{ ++ # # This downloads binaries for Native Client's newlib toolchain. ++ # # Done in lieu of building the toolchain from scratch as it can take ++ # # anywhere from 30 minutes to 4 hours depending on platform to build. ++ # 'name': 'nacltools', ++ # 'pattern': '.', ++ # 'action': [ ++ # 'python', ++ # 'src/build/download_nacl_toolchains.py', ++ # '--mode', 'nacl_core_sdk', ++ # 'sync', '--extract', ++ # ], ++ #}, + { + # Downloads the current stable linux sysroot to build/linux/ if needed. + # This sysroot updates at about the same rate that the chrome build deps +@@ -627,14 +627,14 @@ hooks = [ + # Pull binutils for linux, enabled debug fission for faster linking / + # debugging when used with clang on Ubuntu Precise. + # https://code.google.com/p/chromium/issues/detail?id=352046 +- { +- 'name': 'binutils', +- 'pattern': 'src/third_party/binutils', +- 'action': [ +- 'python', +- 'src/third_party/binutils/download.py', +- ], +- }, ++ #{ ++ # 'name': 'binutils', ++ # 'pattern': 'src/third_party/binutils', ++ # 'action': [ ++ # 'python', ++ # 'src/third_party/binutils/download.py', ++ # ], ++ #}, + { + # Pull clang if needed or requested via GYP_DEFINES. + # Note: On Win, this should run after win_toolchain, as it may use it. diff --git a/patches/www-client/firefox-51.0.1/big-no-x11.patch b/patches/www-client/firefox-51.0.1/big-no-x11.patch new file mode 100644 index 0000000..2d42bba --- /dev/null +++ b/patches/www-client/firefox-51.0.1/big-no-x11.patch @@ -0,0 +1,1197 @@ +diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp +index da3e88e..a86138e 100644 +--- a/dom/ipc/ContentChild.cpp ++++ b/dom/ipc/ContentChild.cpp +@@ -161,7 +161,7 @@ + #include "mozilla/widget/AudioSession.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -564,7 +564,7 @@ ContentChild::Init(MessageLoop* aIOLoop, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + XRE_InstallX11ErrorHandler(); + #endif +@@ -591,7 +591,7 @@ ContentChild::Init(MessageLoop* aIOLoop, + GetIPCChannel()->SetChannelFlags(MessageChannel::REQUIRE_A11Y_REENTRY); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Send the parent our X socket to act as a proxy reference for our X + // resources. + int xSocketFd = ConnectionNumber(DefaultXDisplay()); +diff --git a/dom/plugins/base/npapi.h b/dom/plugins/base/npapi.h +index ebc53a8..fabf6fd 100644 +--- a/dom/plugins/base/npapi.h ++++ b/dom/plugins/base/npapi.h +@@ -43,7 +43,7 @@ + + #if defined(XP_UNIX) + #include +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include + #include + #include "X11UndefineNone.h" +@@ -243,7 +243,7 @@ typedef struct + typedef struct + { + int32_t type; +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + Display* display; + Visual* visual; + Colormap colormap; +@@ -539,7 +539,7 @@ typedef struct _NPEvent + uintptr_t wParam; + uintptr_t lParam; + } NPEvent; +-#elif defined(XP_UNIX) && defined(MOZ_X11) ++#elif defined(XP_UNIX) && defined(MOZ_X11_no) + typedef XEvent NPEvent; + #else + typedef void* NPEvent; +@@ -553,7 +553,7 @@ typedef RgnHandle NPQDRegion; + typedef CGPathRef NPCGRegion; + #elif defined(XP_WIN) + typedef HRGN NPRegion; +-#elif defined(XP_UNIX) && defined(MOZ_X11) ++#elif defined(XP_UNIX) && defined(MOZ_X11_no) + typedef Region NPRegion; + #elif defined(XP_SYMBIAN) + typedef QRegion* NPRegion; +diff --git a/dom/plugins/base/nsPluginInstanceOwner.h b/dom/plugins/base/nsPluginInstanceOwner.h +index 589bcb0..66609b4 100644 +--- a/dom/plugins/base/nsPluginInstanceOwner.h ++++ b/dom/plugins/base/nsPluginInstanceOwner.h +@@ -45,7 +45,7 @@ class PuppetWidget; + + using mozilla::widget::PuppetWidget; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibNativeRenderer.h" + #endif + +@@ -214,7 +214,7 @@ public: + return mPluginWindow->type == NPWindowTypeDrawable && + (MatchPluginName("Shockwave Flash") || + MatchPluginName("Test Plug-in")); +-#elif defined(MOZ_X11) || defined(XP_MACOSX) ++#elif defined(MOZ_X11_no) || defined(XP_MACOSX) + return true; + #else + return false; +@@ -393,7 +393,7 @@ private: + + int mLastMouseDownButtonType; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + class Renderer : public gfxXlibNativeRenderer + { + public: +diff --git a/dom/plugins/ipc/NPEventUnix.h b/dom/plugins/ipc/NPEventUnix.h +index 4cc9a54..fe0e295 100644 +--- a/dom/plugins/ipc/NPEventUnix.h ++++ b/dom/plugins/ipc/NPEventUnix.h +@@ -9,7 +9,7 @@ + + #include "npapi.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -61,7 +61,7 @@ struct ParamTraits // synonym for XEvent + return false; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + SetXDisplay(aResult->event); + #endif + return true; +@@ -73,7 +73,7 @@ struct ParamTraits // synonym for XEvent + aLog->append(L"(XEvent)"); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + private: + static void SetXDisplay(XEvent& ev) + { +diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h +index 25343d1..96e7392 100644 +--- a/dom/plugins/ipc/PluginMessageUtils.h ++++ b/dom/plugins/ipc/PluginMessageUtils.h +@@ -89,7 +89,7 @@ struct NPRemoteWindow + uint32_t height; + NPRect clipRect; + NPWindowType type; +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + VisualID visualID; + Colormap colormap; + #endif /* XP_UNIX */ +@@ -104,6 +104,8 @@ typedef HWND NativeWindowHandle; + typedef XID NativeWindowHandle; + #elif defined(XP_DARWIN) || defined(ANDROID) + typedef intptr_t NativeWindowHandle; // never actually used, will always be 0 ++#elif defined(XP_UNIX) ++typedef intptr_t NativeWindowHandle; + #else + #error Need NativeWindowHandle for this platform + #endif +@@ -342,7 +344,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 defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + aMsg->WriteULong(aParam.visualID); + aMsg->WriteULong(aParam.colormap); + #endif +@@ -367,7 +369,7 @@ struct ParamTraits + ReadParam(aMsg, aIter, &type))) + return false; + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + unsigned long visualID; + unsigned long colormap; + if (!(aMsg->ReadULong(aIter, &visualID) && +@@ -388,7 +390,7 @@ struct ParamTraits + aResult->height = height; + aResult->clipRect = clipRect; + aResult->type = type; +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + aResult->visualID = visualID; + aResult->colormap = colormap; + #endif +diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h +index 25f4a09..cd6ff3a 100644 +--- a/dom/plugins/ipc/PluginModuleChild.h ++++ b/dom/plugins/ipc/PluginModuleChild.h +@@ -11,6 +11,7 @@ + + #include + #include ++#include + + #include "base/basictypes.h" + +diff --git a/gfx/angle/include/EGL/eglplatform.h b/gfx/angle/include/EGL/eglplatform.h +index 6d550da..2099e0d 100755 +--- a/gfx/angle/include/EGL/eglplatform.h ++++ b/gfx/angle/include/EGL/eglplatform.h +@@ -105,6 +105,13 @@ typedef intptr_t EGLNativeDisplayType; + typedef intptr_t EGLNativeWindowType; + typedef intptr_t EGLNativePixmapType; + ++//#elif defined(MESA_EGL_NO_X11_HEADERS) ++#elif defined(__unix__) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ + #elif defined(__unix__) + + /* X11 (tentative) */ +diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h +index 6e096c1..b6ea9b7 100644 +--- a/gfx/gl/GLContextProvider.h ++++ b/gfx/gl/GLContextProvider.h +@@ -41,18 +41,20 @@ namespace gl { + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderCGL + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #define GL_CONTEXT_PROVIDER_NAME GLContextProviderGLX + #include "GLContextProviderImpl.h" + #undef GL_CONTEXT_PROVIDER_NAME + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderGLX + #endif + +-#define GL_CONTEXT_PROVIDER_NAME GLContextProviderEGL +-#include "GLContextProviderImpl.h" +-#undef GL_CONTEXT_PROVIDER_NAME +-#ifndef GL_CONTEXT_PROVIDER_DEFAULT +- #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL ++#ifndef MOZ_GL_PROVIDER ++ #define GL_CONTEXT_PROVIDER_NAME GLContextProviderEGL ++ #include "GLContextProviderImpl.h" ++ #undef GL_CONTEXT_PROVIDER_NAME ++ #ifndef GL_CONTEXT_PROVIDER_DEFAULT ++ #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL ++ #endif + #endif + + #if defined(MOZ_WIDGET_UIKIT) +diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp +index 8ef607e..bbd5ccf 100644 +--- a/gfx/gl/GLContextProviderEGL.cpp ++++ b/gfx/gl/GLContextProviderEGL.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/. */ + +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + #include + // we're using default display for now + #define GET_NATIVE_WINDOW(aWidget) ((EGLNativeWindowType)GDK_WINDOW_XID((GdkWindow*)aWidget->GetNativeData(NS_NATIVE_WINDOW))) +diff --git a/gfx/gl/GLLibraryEGL.h b/gfx/gl/GLLibraryEGL.h +index fa6ea74..1cbabff 100644 +--- a/gfx/gl/GLLibraryEGL.h ++++ b/gfx/gl/GLLibraryEGL.h +@@ -5,7 +5,7 @@ + #ifndef GLLIBRARYEGL_H_ + #define GLLIBRARYEGL_H_ + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include "mozilla/X11Util.h" + #endif + +@@ -46,7 +46,7 @@ + #endif + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)mozilla::DefaultXDisplay()) + #else + #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build +index 95c52a4..1d93962 100644 +--- a/gfx/gl/moz.build ++++ b/gfx/gl/moz.build +@@ -13,10 +13,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit': + gl_provider = 'EAGL' + elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: +- if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']: +- gl_provider = 'EGL' +- else: +- gl_provider = 'GLX' ++ gl_provider = 'EGL' + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': + gl_provider = 'EGL' + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': +diff --git a/gfx/ipc/GPUProcessManager.cpp b/gfx/ipc/GPUProcessManager.cpp +index a8467d3..c82f154 100644 +--- a/gfx/ipc/GPUProcessManager.cpp ++++ b/gfx/ipc/GPUProcessManager.cpp +@@ -16,7 +16,7 @@ + #include "mozilla/layers/LayerTreeOwnerTracker.h" + #include "mozilla/layers/RemoteCompositorSession.h" + #include "mozilla/widget/PlatformWidgetTypes.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetChild.h" + #endif + #include "nsBaseWidget.h" +@@ -344,7 +344,7 @@ GPUProcessManager::CreateRemoteSession(nsBaseWidget* aWidget, + bool aUseExternalSurfaceSize, + const gfx::IntSize& aSurfaceSize) + { +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + ipc::Endpoint parentPipe; + ipc::Endpoint childPipe; + +diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp +index 986b986..ba3924a 100644 +--- a/gfx/layers/client/TextureClient.cpp ++++ b/gfx/layers/client/TextureClient.cpp +@@ -42,7 +42,7 @@ + #include "gfxWindowsPlatform.h" + #include "gfx2DGlue.h" + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/layers/TextureClientX11.h" + #ifdef GL_PROVIDER_GLX + #include "GLXLibrary.h" +@@ -1074,7 +1074,7 @@ TextureClient::CreateForDrawing(TextureForwarder* aAllocator, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxSurfaceType type = + gfxPlatform::GetPlatform()->ScreenReferenceSurface()->GetType(); + +diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp +index a2f6eea..1047060 100644 +--- a/gfx/layers/composite/TextureHost.cpp ++++ b/gfx/layers/composite/TextureHost.cpp +@@ -39,7 +39,7 @@ + #include "../opengl/GrallocTextureHost.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/layers/X11TextureHost.h" + #endif + +@@ -247,7 +247,7 @@ TextureHost::Create(const SurfaceDescriptor& aDesc, + return CreateTextureHostBasic(aDesc, aDeallocator, aFlags); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case SurfaceDescriptor::TSurfaceDescriptorX11: { + const SurfaceDescriptorX11& desc = aDesc.get_SurfaceDescriptorX11(); + return MakeAndAddRef(aFlags, desc); +diff --git a/gfx/layers/ipc/CompositorBridgeChild.cpp b/gfx/layers/ipc/CompositorBridgeChild.cpp +index c4cf7f6..3b209b0 100644 +--- a/gfx/layers/ipc/CompositorBridgeChild.cpp ++++ b/gfx/layers/ipc/CompositorBridgeChild.cpp +@@ -38,7 +38,7 @@ + #include "WinUtils.h" + #endif + #include "mozilla/widget/CompositorWidget.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetChild.h" + #endif + #include "VsyncSource.h" +@@ -1008,7 +1008,7 @@ CompositorBridgeChild::AllocPCompositorWidgetChild(const CompositorWidgetInitDat + bool + CompositorBridgeChild::DeallocPCompositorWidgetChild(PCompositorWidgetChild* aActor) + { +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + delete aActor; + return true; + #else +diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp +index cf936a0..fcc546d 100644 +--- a/gfx/layers/ipc/CompositorBridgeParent.cpp ++++ b/gfx/layers/ipc/CompositorBridgeParent.cpp +@@ -52,7 +52,7 @@ + #include "mozilla/media/MediaSystemResourceService.h" // for MediaSystemResourceService + #include "mozilla/mozalloc.h" // for operator new, etc + #include "mozilla/Telemetry.h" +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + #include "basic/X11BasicCompositor.h" // for X11BasicCompositor + #endif + #include "nsCOMPtr.h" // for already_AddRefed +@@ -81,7 +81,7 @@ + #include "VsyncSource.h" + #endif + #include "mozilla/widget/CompositorWidget.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetParent.h" + #endif + +@@ -1721,7 +1721,7 @@ CompositorBridgeParent::NewCompositor(const nsTArray& aBackendHin + mEGLSurfaceSize.height, + mUseExternalSurfaceSize); + } else if (aBackendHints[i] == LayersBackend::LAYERS_BASIC) { +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + if (gfxVars::UseXRender()) { + compositor = new X11BasicCompositor(this, mWidget); + } else +@@ -2008,7 +2008,7 @@ CompositorBridgeParent::PostInsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp) + widget::PCompositorWidgetParent* + CompositorBridgeParent::AllocPCompositorWidgetParent(const CompositorWidgetInitData& aInitData) + { +-#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + if (mWidget) { + // Should not create two widgets on the same compositor. + return nullptr; +@@ -2029,7 +2029,7 @@ CompositorBridgeParent::AllocPCompositorWidgetParent(const CompositorWidgetInitD + bool + CompositorBridgeParent::DeallocPCompositorWidgetParent(PCompositorWidgetParent* aActor) + { +-#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + static_cast(aActor)->Release(); + return true; + #else +diff --git a/gfx/layers/ipc/ShadowLayerUtils.h b/gfx/layers/ipc/ShadowLayerUtils.h +index c93a6b9..8569cbf 100644 +--- a/gfx/layers/ipc/ShadowLayerUtils.h ++++ b/gfx/layers/ipc/ShadowLayerUtils.h +@@ -17,7 +17,7 @@ + #define MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + # include "mozilla/layers/ShadowLayerUtilsX11.h" + #else + namespace mozilla { namespace layers { +diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build +index 22490e8..85a39ff 100644 +--- a/gfx/layers/moz.build ++++ b/gfx/layers/moz.build +@@ -201,7 +201,7 @@ EXPORTS.mozilla.layers += [ + 'TransactionIdAllocator.h', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + EXPORTS.mozilla.layers += [ + 'basic/TextureClientX11.h', + 'basic/X11TextureSourceBasic.h', +diff --git a/gfx/src/moz.build b/gfx/src/moz.build +index 3678eee..dc48470 100644 +--- a/gfx/src/moz.build ++++ b/gfx/src/moz.build +@@ -51,7 +51,7 @@ EXPORTS.mozilla.gfx += [ + 'TiledRegion.h', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + EXPORTS.mozilla += ['X11Util.h'] + SOURCES += [ + 'X11Util.cpp', +diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp +index 31f1855..fdbac19 100644 +--- a/gfx/thebes/gfxASurface.cpp ++++ b/gfx/thebes/gfxASurface.cpp +@@ -29,7 +29,7 @@ + #include "gfxWindowsSurface.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + +@@ -160,7 +160,7 @@ gfxASurface::Wrap (cairo_surface_t *csurf, const IntSize& aSize) + result = new gfxWindowsSurface(csurf); + } + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + else if (stype == CAIRO_SURFACE_TYPE_XLIB) { + result = new gfxXlibSurface(csurf); + } +diff --git a/gfx/thebes/gfxDrawable.cpp b/gfx/thebes/gfxDrawable.cpp +index 7d25cc9..aebf654 100644 +--- a/gfx/thebes/gfxDrawable.cpp ++++ b/gfx/thebes/gfxDrawable.cpp +@@ -8,7 +8,7 @@ + #include "gfxContext.h" + #include "gfxPlatform.h" + #include "gfx2DGlue.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "cairo.h" + #include "gfxXlibSurface.h" + #endif +diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp +index 9f56842..fe0d42d 100644 +--- a/gfx/thebes/gfxFcPlatformFontList.cpp ++++ b/gfx/thebes/gfxFcPlatformFontList.cpp +@@ -33,7 +33,7 @@ + #include "gfxPlatformGtk.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -719,7 +719,7 @@ gfxFontconfigFontEntry::CreateScaledFont(FcPattern* aRenderPattern, + static void ApplyGdkScreenFontOptions(FcPattern *aPattern); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static bool + GetXftInt(Display* aDisplay, const char* aName, int* aResult) + { +@@ -771,7 +771,7 @@ PreparePattern(FcPattern* aPattern, bool aIsPrinterFont) + ApplyGdkScreenFontOptions(aPattern); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + FcValue value; + int lcdfilter; + if (FcPatternGet(aPattern, FC_LCD_FILTER, 0, &value) +diff --git a/gfx/thebes/gfxGdkNativeRenderer.cpp b/gfx/thebes/gfxGdkNativeRenderer.cpp +index f8964ad..4b27491 100644 +--- a/gfx/thebes/gfxGdkNativeRenderer.cpp ++++ b/gfx/thebes/gfxGdkNativeRenderer.cpp +@@ -7,7 +7,7 @@ + #include "gfxContext.h" + #include "gfxPlatformGtk.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include "cairo-xlib.h" + #include "gfxXlibSurface.h" +diff --git a/gfx/thebes/gfxGdkNativeRenderer.h b/gfx/thebes/gfxGdkNativeRenderer.h +index d95b1fe..4c465d6 100644 +--- a/gfx/thebes/gfxGdkNativeRenderer.h ++++ b/gfx/thebes/gfxGdkNativeRenderer.h +@@ -8,7 +8,7 @@ + + #include + #include "nsSize.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibNativeRenderer.h" + #endif + +@@ -21,7 +21,7 @@ class gfxContext; + * to all Thebes transformations, clipping etc. + */ + class gfxGdkNativeRenderer +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + : private gfxXlibNativeRenderer + #endif + { +@@ -46,7 +46,7 @@ public: + // will be set and there is no dependence on what the existing pixels + // in the drawable are set to. + DRAW_IS_OPAQUE = +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibNativeRenderer::DRAW_IS_OPAQUE + #else + 0x1 +@@ -54,7 +54,7 @@ public: + // If set, then numClipRects can be zero or one. + // If not set, then numClipRects will be zero. + , DRAW_SUPPORTS_CLIP_RECT = +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibNativeRenderer::DRAW_SUPPORTS_CLIP_RECT + #else + 0x2 +@@ -73,7 +73,7 @@ public: + #endif + + private: +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // for gfxXlibNativeRenderer: + virtual nsresult DrawWithXlib(cairo_surface_t* surface, + nsIntPoint offset, +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index 9d7f512..840e35a 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -36,11 +36,11 @@ + + #include "gfxImageSurface.h" + #ifdef MOZ_X11 +-#include +-#include "gfxXlibSurface.h" +-#include "cairo-xlib.h" ++//#include ++//#include "gfxXlibSurface.h" ++//#include "cairo-xlib.h" + #include "mozilla/Preferences.h" +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + #ifdef GL_PROVIDER_GLX + #include "GLContextProvider.h" +@@ -86,7 +86,7 @@ gfxPlatformGtk::gfxPlatformGtk() + + mMaxGenericSubstitutions = UNINITIALIZED_VALUE; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (XRE_IsParentProcess()) { + if (GDK_IS_X11_DISPLAY(gdk_display_get_default()) && + mozilla::Preferences::GetBool("gfx.xrender.enabled")) +@@ -106,12 +106,7 @@ gfxPlatformGtk::gfxPlatformGtk() + contentMask, BackendType::CAIRO); + + #ifdef MOZ_X11 +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { +- mCompositorDisplay = XOpenDisplay(nullptr); +- MOZ_ASSERT(mCompositorDisplay, "Failed to create compositor display!"); +- } else { + mCompositorDisplay = nullptr; +- } + #endif // MOZ_X11 + } + +@@ -123,7 +118,7 @@ gfxPlatformGtk::~gfxPlatformGtk() + gfxPangoFontGroup::Shutdown(); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (mCompositorDisplay) { + XCloseDisplay(mCompositorDisplay); + } +@@ -133,9 +128,9 @@ gfxPlatformGtk::~gfxPlatformGtk() + void + gfxPlatformGtk::FlushContentDrawing() + { +- if (gfxVars::UseXRender()) { +- XFlush(DefaultXDisplay()); +- } ++// if (gfxVars::UseXRender()) { ++// XFlush(DefaultXDisplay()); ++// } + } + + already_AddRefed +@@ -156,24 +151,12 @@ gfxPlatformGtk::CreateOffscreenSurface(const IntSize& aSize, + if (gdkScreen) { + // When forcing PaintedLayers to use image surfaces for content, + // force creation of gfxImageSurface surfaces. +- if (gfxVars::UseXRender() && !UseImageOffscreenSurfaces()) { +- Screen *screen = gdk_x11_screen_get_xscreen(gdkScreen); +- XRenderPictFormat* xrenderFormat = +- gfxXlibSurface::FindRenderFormat(DisplayOfScreen(screen), +- aFormat); +- +- if (xrenderFormat) { +- newSurface = gfxXlibSurface::Create(screen, xrenderFormat, +- aSize); +- } +- } else { + // We're not going to use XRender, so we don't need to + // search for a render format + newSurface = new gfxImageSurface(aSize, aFormat); + // The gfxImageSurface ctor zeroes this for us, no need to + // waste time clearing again + needsClear = false; +- } + } + #endif + +@@ -462,7 +445,7 @@ gfxPlatformGtk::GetPlatformCMSOutputProfile(void *&mem, size_t &size) + mem = nullptr; + size = 0; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + GdkDisplay *display = gdk_display_get_default(); + if (!GDK_IS_X11_DISPLAY(display)) + return; +@@ -615,7 +598,7 @@ gfxPlatformGtk::GetGdkDrawable(cairo_surface_t *target) + if (result) + return result; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (cairo_surface_get_type(target) != CAIRO_SURFACE_TYPE_XLIB) + return nullptr; + +diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build +index 82a2ecd..2a565f3 100644 +--- a/gfx/thebes/moz.build ++++ b/gfx/thebes/moz.build +@@ -131,7 +131,7 @@ elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + 'PrintTargetPS.cpp', + ] + +- if CONFIG['MOZ_X11']: ++ if CONFIG['MOZ_X11_no']: + EXPORTS += [ + 'gfxXlibNativeRenderer.h', + 'gfxXlibSurface.h', +diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp +index 156baf0..5d22208 100644 +--- a/layout/generic/nsPluginFrame.cpp ++++ b/layout/generic/nsPluginFrame.cpp +@@ -74,7 +74,7 @@ + #include "mozilla/gfx/QuartzSupport.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + using mozilla::DefaultXDisplay; + #endif +diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build +index ae279eb..f5ce405 100644 +--- a/toolkit/components/moz.build ++++ b/toolkit/components/moz.build +@@ -5,7 +5,7 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + # These component dirs are built for all apps (including suite) +-if CONFIG['MOZ_ENABLE_XREMOTE']: ++if CONFIG['MOZ_ENABLE_XREMOTE_no']: + DIRS += ['remote'] + + DIRS += [ +diff --git a/toolkit/components/remote/nsGTKRemoteService.cpp b/toolkit/components/remote/nsGTKRemoteService.cpp +index 860efe0..ccd0e5f 100644 +--- a/toolkit/components/remote/nsGTKRemoteService.cpp ++++ b/toolkit/components/remote/nsGTKRemoteService.cpp +@@ -9,7 +9,7 @@ + + #include + #include +-#include ++//#include + + #include "nsIBaseWindow.h" + #include "nsIDocShell.h" +diff --git a/toolkit/components/remote/nsGTKRemoteService.h b/toolkit/components/remote/nsGTKRemoteService.h +index 034a77a..5493fe7 100644 +--- a/toolkit/components/remote/nsGTKRemoteService.h ++++ b/toolkit/components/remote/nsGTKRemoteService.h +@@ -9,14 +9,14 @@ + #define __nsGTKRemoteService_h__ + + #include +-#include ++//#include + #include + + #include "nsInterfaceHashtable.h" +-#include "nsXRemoteService.h" ++//#include "nsXRemoteService.h" + #include "mozilla/Attributes.h" + +-class nsGTKRemoteService final : public nsXRemoteService ++class nsGTKRemoteService final + { + public: + // We will be a static singleton, so don't use the ordinary methods. +diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild +index eaae9d3..25ec8d6 100644 +--- a/toolkit/toolkit.mozbuild ++++ b/toolkit/toolkit.mozbuild +@@ -118,7 +118,7 @@ DIRS += [ + '/xpfe/components', + ] + +-if CONFIG['MOZ_ENABLE_XREMOTE']: ++if CONFIG['MOZ_ENABLE_XREMOTE_no']: + DIRS += ['/widget/xremoteclient'] + + if CONFIG['MOZ_SPELLCHECK']: +diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build +index 53b5474..a88f81a 100644 +--- a/toolkit/xre/moz.build ++++ b/toolkit/xre/moz.build +@@ -58,7 +58,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': + 'nsGDKErrorHandler.cpp', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + UNIFIED_SOURCES += [ + 'nsX11ErrorHandler.cpp', + ] +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +index c18075e..8db9506 100644 +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -165,7 +165,7 @@ + #endif + + // for X remote support +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + #include "XRemoteClient.h" + #include "nsIRemoteService.h" + #endif +@@ -241,7 +241,7 @@ nsString gAbsoluteArgv0Path; + #include + #endif + #include +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif /* MOZ_X11 */ + #include "nsGTKToolkit.h" +@@ -1593,7 +1593,7 @@ DumpHelp() + printf("Usage: %s [ options ... ] [URL]\n" + " where options include:\n\n", gArgv[0]); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + printf("X11 options\n" + " --display=DISPLAY X display to use\n" + " --sync Make X calls synchronous\n"); +@@ -1677,7 +1677,7 @@ DumpVersion() + printf("\n"); + } + +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + static RemoteResult + RemoteCommandLine(const char* aDesktopStartupID) + { +@@ -2993,7 +2993,7 @@ public: + XREMain() : + mStartOffline(false) + , mShuttingDown(false) +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + , mDisableRemote(false) + #endif + #if defined(MOZ_WIDGET_GTK) +@@ -3016,7 +3016,7 @@ public: + nsCOMPtr mProfD; + nsCOMPtr mProfLD; + nsCOMPtr mProfileLock; +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + nsCOMPtr mRemoteService; + #endif + +@@ -3029,7 +3029,7 @@ public: + + bool mStartOffline; + bool mShuttingDown; +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + bool mDisableRemote; + #endif + +@@ -3758,12 +3758,12 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + } + } + #endif /* MOZ_WIDGET_GTK */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Init X11 in thread-safe mode. Must be called prior to the first call to XOpenDisplay + // (called inside gdk_display_open). This is a requirement for off main tread compositing. + XInitThreads(); + #endif +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + mGdkDisplay = gdk_display_open(display_name); + if (!mGdkDisplay) { + PR_fprintf(PR_STDERR, "Error: cannot open display: %s\n", display_name); +@@ -3771,15 +3771,9 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + } + gdk_display_manager_set_default_display (gdk_display_manager_get(), + mGdkDisplay); +- if (GDK_IS_X11_DISPLAY(mGdkDisplay)) { +- if (saveDisplayArg) { +- SaveWordToEnv("DISPLAY", nsDependentCString(display_name)); +- } +- } else { + mDisableRemote = true; +- } + #endif +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // handle --remote now that xpcom is fired up + bool newInstance; + { +@@ -3815,7 +3809,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + gtk_widget_set_default_colormap(gdk_rgb_get_colormap()); + #endif /* (MOZ_WIDGET_GTK == 2) */ + #endif /* defined(MOZ_WIDGET_GTK) */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + XRE_InstallX11ErrorHandler(); + #endif +@@ -4363,7 +4357,7 @@ XREMain::XRE_mainRun() + } + + if (!mShuttingDown) { +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // if we have X remote support, start listening for requests on the + // proxy window. + if (!mDisableRemote) +@@ -4551,7 +4545,7 @@ XREMain::XRE_main(int argc, char* argv[], const nsXREAppData* aAppData) + } + + if (!mShuttingDown) { +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // shut down the x remote proxy window + if (mRemoteService) { + mRemoteService->Shutdown(); +diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp +index 19fb128..4405526 100644 +--- a/toolkit/xre/nsEmbedFunctions.cpp ++++ b/toolkit/xre/nsEmbedFunctions.cpp +@@ -43,7 +43,7 @@ + #include "nsVersionComparator.h" + #include "chrome/common/mach_ipc_mac.h" + #endif +-#include "nsX11ErrorHandler.h" ++//#include "nsX11ErrorHandler.h" + #include "nsGDKErrorHandler.h" + #include "base/at_exit.h" + #include "base/command_line.h" +@@ -492,7 +492,7 @@ XRE_InitChildProcess(int aArgc, + gArgv = aArgv; + gArgc = aArgc; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XInitThreads(); + #endif + #if MOZ_WIDGET_GTK == 2 +diff --git a/toolkit/xre/nsGDKErrorHandler.cpp b/toolkit/xre/nsGDKErrorHandler.cpp +index a01a7c5..89b1c8b 100644 +--- a/toolkit/xre/nsGDKErrorHandler.cpp ++++ b/toolkit/xre/nsGDKErrorHandler.cpp +@@ -6,14 +6,12 @@ + #include "nsGDKErrorHandler.h" + + #include +-#include + #include + #include + #include + + #include "nsDebug.h" + #include "nsString.h" +-#include "nsX11ErrorHandler.h" + + #include "prenv.h" + +@@ -29,62 +27,8 @@ static void + GdkErrorHandler(const gchar *log_domain, GLogLevelFlags log_level, + const gchar *message, gpointer user_data) + { +- if (strstr(message, "X Window System error")) { +- XErrorEvent event; +- nsDependentCString buffer(message); +- char *endptr; +- +- /* Parse Gdk X Window error message which has this format: +- * (Details: serial XXXX error_code XXXX request_code XXXX (XXXX) minor_code XXXX) +- */ +- NS_NAMED_LITERAL_CSTRING(serialString, "(Details: serial "); +- int32_t start = buffer.Find(serialString); +- if (start == kNotFound) +- NS_RUNTIMEABORT(message); +- +- start += serialString.Length(); +- errno = 0; +- event.serial = strtol(buffer.BeginReading() + start, &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(errorCodeString, " error_code "); +- if (!StringBeginsWith(Substring(endptr, buffer.EndReading()), errorCodeString)) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.error_code = strtol(endptr + errorCodeString.Length(), &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(requestCodeString, " request_code "); +- if (!StringBeginsWith(Substring(endptr, buffer.EndReading()), requestCodeString)) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.request_code = strtol(endptr + requestCodeString.Length(), &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(minorCodeString, " minor_code "); +- start = buffer.Find(minorCodeString, endptr - buffer.BeginReading()); +- if (!start) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.minor_code = strtol(buffer.BeginReading() + start + minorCodeString.Length(), nullptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- event.display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +- // Gdk does not provide resource ID +- event.resourceid = 0; +- +- X11Error(event.display, &event); +- } else { + g_log_default_handler(log_domain, log_level, message, user_data); + NS_RUNTIMEABORT(message); +- } + } + + void +@@ -94,7 +38,4 @@ InstallGdkErrorHandler() + (GLogLevelFlags)(G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION), + GdkErrorHandler, + nullptr); +- if (PR_GetEnv("MOZ_X_SYNC")) { +- XSynchronize(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), True); +- } + } +diff --git a/toolkit/xre/nsNativeAppSupportUnix.cpp b/toolkit/xre/nsNativeAppSupportUnix.cpp +index a04a799..a0f55f6 100644 +--- a/toolkit/xre/nsNativeAppSupportUnix.cpp ++++ b/toolkit/xre/nsNativeAppSupportUnix.cpp +@@ -32,7 +32,7 @@ + #include + #include + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include +@@ -52,7 +52,7 @@ + You have GTK+ %d.%d.\nThis application requires GTK+ %d.%d or newer.\n\n\ + Please upgrade your GTK+ library if you wish to use this application." + +-#if MOZ_X11 ++#if MOZ_X11_no + #undef IceSetIOErrorHandler + #undef IceAddConnectionWatch + #undef IceConnectionNumber +@@ -126,7 +126,7 @@ static LazyLogModule sMozSMLog("MozSM"); + class nsNativeAppSupportUnix : public nsNativeAppSupportBase + { + public: +-#if MOZ_X11 ++#if MOZ_X11_no + nsNativeAppSupportUnix(): mSessionConnection(nullptr), + mClientState(STATE_DISCONNECTED) {}; + ~nsNativeAppSupportUnix() +@@ -143,7 +143,7 @@ public: + NS_IMETHOD Enable(); + + private: +-#if MOZ_X11 ++#if MOZ_X11_no + static void SaveYourselfCB(SmcConn smc_conn, SmPointer client_data, + int save_style, Bool shutdown, int interact_style, + Bool fast); +@@ -163,7 +163,7 @@ private: + #endif + }; + +-#if MOZ_X11 ++#if MOZ_X11_no + static gboolean + process_ice_messages(IceConn connection) + { +@@ -479,7 +479,7 @@ nsNativeAppSupportUnix::Start(bool *aRetVal) + + *aRetVal = true; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gboolean sm_disable = FALSE; + if (!getenv("SESSION_MANAGER")) { + sm_disable = TRUE; +diff --git a/widget/gtk/CompositorWidgetChild.h b/widget/gtk/CompositorWidgetChild.h +index 403b905..d8b445d 100644 +--- a/widget/gtk/CompositorWidgetChild.h ++++ b/widget/gtk/CompositorWidgetChild.h +@@ -6,7 +6,7 @@ + #ifndef widget_gtk_CompositorWidgetChild_h + #define widget_gtk_CompositorWidgetChild_h + +-#include "X11CompositorWidget.h" ++//#include "X11CompositorWidget.h" + #include "mozilla/widget/PCompositorWidgetChild.h" + #include "mozilla/widget/CompositorWidgetVsyncObserver.h" + +diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c +index 285ad14..17aa8f6 100644 +--- a/widget/gtk/mozgtk/mozgtk.c ++++ b/widget/gtk/mozgtk/mozgtk.c +@@ -597,7 +597,7 @@ STUB(gtk_color_chooser_get_rgba) + STUB(gtk_color_chooser_set_use_alpha) + #endif + +-#ifdef GTK2_SYMBOLS ++#ifdef GTK2_SYMBOLS_no + STUB(gdk_drawable_get_screen) + STUB(gdk_rgb_get_colormap) + STUB(gdk_rgb_get_visual) +@@ -612,17 +612,4 @@ STUB(gdkx_visual_get) + STUB(gtk_object_get_type) + #endif + +-#include +-// Bug 1271100 +-// We need to trick system Cairo into not using the XShm extension due to +-// a race condition in it that results in frequent BadAccess errors. Cairo +-// relies upon XShmQueryExtension to initially detect if XShm is available. +-// So we define our own stub that always indicates XShm not being present. +-// mozgtk loads before libXext/libcairo and so this stub will take priority. +-// Our tree usage goes through xcb and remains unaffected by this. +-MOZ_EXPORT Bool +-XShmQueryExtension(Display* aDisplay) +-{ +- return False; +-} + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index 3791eab..3228425 100644 +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -40,11 +40,12 @@ + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include + #include ++#endif /* MOZ_X11 */ + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +@@ -52,7 +53,6 @@ + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif +-#endif /* MOZ_X11 */ + #include + #if (MOZ_WIDGET_GTK == 2) + #include +diff --git a/widget/moz.build b/widget/moz.build +index 2229668..51c8a09 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -205,7 +205,7 @@ if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']: + + EXPORTS.ipc = ['nsGUIEventIPC.h'] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + DIRS += ['x11'] + UNIFIED_SOURCES += [ + 'GfxInfoX11.cpp' +diff --git a/widget/nsShmImage.h b/widget/nsShmImage.h +index 64c0ff5..fca67a3 100644 +--- a/widget/nsShmImage.h ++++ b/widget/nsShmImage.h +@@ -7,7 +7,7 @@ + #ifndef __mozilla_widget_nsShmImage_h__ + #define __mozilla_widget_nsShmImage_h__ + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + # define MOZ_HAVE_SHMIMAGE + #endif + diff --git a/patches/www-client/firefox-51.0.1/big-no-x12.patch b/patches/www-client/firefox-51.0.1/big-no-x12.patch new file mode 100644 index 0000000..f3b0e37 --- /dev/null +++ b/patches/www-client/firefox-51.0.1/big-no-x12.patch @@ -0,0 +1,2639 @@ +diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp +index a2f5b92..3734c94 100644 +--- a/dom/base/nsDOMWindowUtils.cpp ++++ b/dom/base/nsDOMWindowUtils.cpp +@@ -68,7 +68,7 @@ + + #if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK) + #include +-#include ++//#include + #endif + + #include "Layers.h" +@@ -310,7 +310,7 @@ nsDOMWindowUtils::Redraw(uint32_t aCount, uint32_t *aDurationOut) + for (uint32_t i = 0; i < aCount; i++) + rootFrame->InvalidateFrame(); + +-#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_X11_no) && defined(MOZ_WIDGET_GTK) + XSync(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), False); + #endif + +diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp +index b459701..cce0b65 100644 +--- a/dom/plugins/base/nsNPAPIPlugin.cpp ++++ b/dom/plugins/base/nsNPAPIPlugin.cpp +@@ -58,7 +58,7 @@ + // needed for nppdf plugin + #if (MOZ_WIDGET_GTK) + #include +-#include ++//#include + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif +@@ -85,7 +85,7 @@ using mozilla::PluginPRLibrary; + using mozilla::plugins::PluginModuleChromeParent; + using mozilla::plugins::PluginModuleContentParent; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -1765,7 +1765,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result) + + #if defined(XP_UNIX) && !defined(XP_MACOSX) + case NPNVxDisplay : { +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + if (npp) { + nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *) npp->ndata; + bool windowless = false; +diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp +index b7651be..0f7e4b0 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 ++#ifdef MOZ_X11_no + #include + #include "gfxXlibSurface.h" + /* X headers suck */ +@@ -745,7 +745,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value) + } + + return NS_OK; +-#elif defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) ++#elif defined(MOZ_WIDGET_GTK) && defined(MOZ_X11_no) + // X11 window managers want the toplevel window for WM_TRANSIENT_FOR. + nsIWidget* win = mPluginFrame->GetNearestWidget(); + if (!win) +@@ -2102,7 +2102,7 @@ nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent) + return NS_OK; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static unsigned int XInputEventState(const WidgetInputEvent& anEvent) + { + unsigned int state = 0; +@@ -2582,7 +2582,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent) + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // this code supports windowless plugins + nsIWidget* widget = anEvent.mWidget; + XEvent pluginEvent = XEvent(); +@@ -3055,7 +3055,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext, + } + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + void nsPluginInstanceOwner::Paint(gfxContext* aContext, + const gfxRect& aFrameRect, + const gfxRect& aDirtyRect) +@@ -3200,7 +3200,7 @@ nsPluginInstanceOwner::Renderer::DrawWithXlib(cairo_surface_t* xsurface, + + NPSetWindowCallbackStruct* ws_info = + static_cast(mWindow->ws_info); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (ws_info->visual != visual || ws_info->colormap != colormap) { + ws_info->visual = visual; + ws_info->colormap = colormap; +@@ -3419,7 +3419,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void) + // passing HDC till paint event when it is really + // needed. Change spec? + mPluginWindow->window = nullptr; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Fill in the display field. + NPSetWindowCallbackStruct* ws_info = + static_cast(mPluginWindow->ws_info); +diff --git a/dom/plugins/base/nsPluginNativeWindowGtk.cpp b/dom/plugins/base/nsPluginNativeWindowGtk.cpp +index bfb9510..62eabdb 100644 +--- a/dom/plugins/base/nsPluginNativeWindowGtk.cpp ++++ b/dom/plugins/base/nsPluginNativeWindowGtk.cpp +@@ -14,15 +14,15 @@ + #include "nsNPAPIPlugin.h" + #include "npapi.h" + #include +-#include ++//#include + #include + + #if (GTK_MAJOR_VERSION == 3) +-#include ++//#include + #else + #include "gtk2xtbin.h" + #endif +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + static void plug_added_cb(GtkWidget *widget, gpointer data); + static gboolean plug_removed_cb (GtkWidget *widget, gpointer data); +@@ -41,10 +41,10 @@ nsPluginNativeWindowGtk::nsPluginNativeWindowGtk() : nsPluginNativeWindow() + type = NPWindowTypeWindow; + mSocketWidget = 0; + mWsInfo.type = 0; +- mWsInfo.display = nullptr; +- mWsInfo.visual = nullptr; +- mWsInfo.colormap = 0; +- mWsInfo.depth = 0; ++ //mWsInfo.display = nullptr; ++ //mWsInfo.visual = nullptr; ++ //mWsInfo.colormap = 0; ++ //mWsInfo.depth = 0; + } + + nsPluginNativeWindowGtk::~nsPluginNativeWindowGtk() +@@ -71,158 +71,13 @@ nsresult PLUG_DeletePluginNativeWindow(nsPluginNativeWindow * aPluginNativeWindo + + nsresult nsPluginNativeWindowGtk::CallSetWindow(RefPtr &aPluginInstance) + { +- if (aPluginInstance) { +- if (type == NPWindowTypeWindow && +- XRE_IsContentProcess()) { +- // In this case, most of the initialization code here has already happened +- // in the chrome process. The window we have in content is the XID of the +- // socket widget we need to hand to plugins. +- SetWindow((XID)window); +- } else if (type == NPWindowTypeWindow) { +- if (!mSocketWidget) { +- nsresult rv; +- +- // The documentation on the types for many variables in NP(N|P)_GetValue +- // is vague. Often boolean values are NPBool (1 byte), but +- // https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins +- // treats NPPVpluginNeedsXEmbed as PRBool (int), and +- // on x86/32-bit, flash stores to this using |movl 0x1,&needsXEmbed|. +- // thus we can't use NPBool for needsXEmbed, or the three bytes above +- // it on the stack would get clobbered. so protect with the larger bool. +- int needsXEmbed = 0; +- rv = aPluginInstance->GetValueFromPlugin(NPPVpluginNeedsXEmbed, &needsXEmbed); +- // If the call returned an error code make sure we still use our default value. +- if (NS_FAILED(rv)) { +- needsXEmbed = 0; +- } +-#ifdef DEBUG +- printf("nsPluginNativeWindowGtk: NPPVpluginNeedsXEmbed=%d\n", needsXEmbed); +-#endif +- +- bool isOOPPlugin = aPluginInstance->GetPlugin()->GetLibrary()->IsOOP(); +- if (needsXEmbed || isOOPPlugin) { +- bool enableXtFocus = !needsXEmbed; +- rv = CreateXEmbedWindow(enableXtFocus); +- } +- else { +-#if (MOZ_WIDGET_GTK == 2) +- rv = CreateXtWindow(); +-#else +- return NS_ERROR_FAILURE; +-#endif +- } +- +- if (NS_FAILED(rv)) { +- return NS_ERROR_FAILURE; +- } +- } +- +- if (!mSocketWidget) { +- return NS_ERROR_FAILURE; +- } +- +- // Make sure to resize and re-place the window if required. +- SetAllocation(); +- // Need to reset "window" each time as nsPluginFrame::DidReflow sets it +- // to the ancestor window. +-#if (MOZ_WIDGET_GTK == 2) +- if (GTK_IS_XTBIN(mSocketWidget)) { +- // Point the NPWindow structures window to the actual X window +- SetWindow(GTK_XTBIN(mSocketWidget)->xtwindow); +- } +- else { // XEmbed or OOP&Xt +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +- } +-#else +- // Gtk3 supports only OOP by GtkSocket +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +-#endif +- +-#ifdef DEBUG +- printf("nsPluginNativeWindowGtk: call SetWindow with xid=%p\n", (void *)window); +-#endif +- } // NPWindowTypeWindow +- aPluginInstance->SetWindow(this); +- } else if (mPluginInstance) { + mPluginInstance->SetWindow(nullptr); +- } + + SetPluginInstance(aPluginInstance); + return NS_OK; + } + + nsresult nsPluginNativeWindowGtk::CreateXEmbedWindow(bool aEnableXtFocus) { +- NS_ASSERTION(!mSocketWidget,"Already created a socket widget!"); +- GdkDisplay *display = gdk_display_get_default(); +- GdkWindow *parent_win = gdk_x11_window_lookup_for_display(display, GetWindow()); +- mSocketWidget = gtk_socket_new(); +- +- //attach the socket to the container widget +- gtk_widget_set_parent_window(mSocketWidget, parent_win); +- +- // enable/disable focus event handlers, +- // see plugin_window_filter_func() for details +- g_object_set_data(G_OBJECT(mSocketWidget), "enable-xt-focus", (void *)aEnableXtFocus); +- +- g_signal_connect(mSocketWidget, "plug_added", +- G_CALLBACK(plug_added_cb), nullptr); +- +- // Make sure to handle the plug_removed signal. If we don't the +- // socket will automatically be destroyed when the plug is +- // removed, which means we're destroying it more than once. +- // SYNTAX ERROR. +- g_signal_connect(mSocketWidget, "plug_removed", +- G_CALLBACK(plug_removed_cb), nullptr); +- +- g_signal_connect(mSocketWidget, "unrealize", +- G_CALLBACK(socket_unrealize_cb), nullptr); +- +- g_signal_connect(mSocketWidget, "destroy", +- G_CALLBACK(gtk_widget_destroyed), &mSocketWidget); +- +- gpointer user_data = nullptr; +- gdk_window_get_user_data(parent_win, &user_data); +- +- GtkContainer *container = GTK_CONTAINER(user_data); +- gtk_container_add(container, mSocketWidget); +- gtk_widget_realize(mSocketWidget); +- +- // The GtkSocket has a visible window, but the plugin's XEmbed plug will +- // cover this window. Normally GtkSockets let the X server paint their +- // background and this would happen immediately (before the plug is +- // created). Setting the background to None prevents the server from +- // painting this window, avoiding flicker. +- // TODO GTK3 +-#if (MOZ_WIDGET_GTK == 2) +- gdk_window_set_back_pixmap(gtk_widget_get_window(mSocketWidget), nullptr, FALSE); +-#endif +- +- // Resize before we show +- SetAllocation(); +- +- gtk_widget_show(mSocketWidget); +- +- gdk_flush(); +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +- +- // Fill out the ws_info structure. +- // (The windowless case is done in nsPluginFrame.cpp.) +- GdkWindow *gdkWindow = gdk_x11_window_lookup_for_display(display, GetWindow()); +- if(!gdkWindow) +- return NS_ERROR_FAILURE; +- +- mWsInfo.display = GDK_WINDOW_XDISPLAY(gdkWindow); +-#if (MOZ_WIDGET_GTK == 2) +- mWsInfo.colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(gdkWindow)); +- GdkVisual* gdkVisual = gdk_drawable_get_visual(gdkWindow); +- mWsInfo.depth = gdkVisual->depth; +-#else +- mWsInfo.colormap = X11None; +- GdkVisual* gdkVisual = gdk_window_get_visual(gdkWindow); +- mWsInfo.depth = gdk_visual_get_depth(gdkVisual); +-#endif +- mWsInfo.visual = GDK_VISUAL_XVISUAL(gdkVisual); +- + return NS_OK; + } + +@@ -241,6 +96,7 @@ void nsPluginNativeWindowGtk::SetAllocation() { + #if (MOZ_WIDGET_GTK == 2) + nsresult nsPluginNativeWindowGtk::CreateXtWindow() { + NS_ASSERTION(!mSocketWidget,"Already created a socket widget!"); ++ return NS_ERROR_FAILURE; + + #ifdef DEBUG + printf("About to create new xtbin of %i X %i from %p...\n", +@@ -304,8 +160,6 @@ plug_added_cb(GtkWidget *socket, gpointer data) + // receives the DestroyNotify event for the plug window, GDK releases its + // reference to plugWindow. This is typically the last reference and so the + // weak ref callback triggers release of the socket. +- GdkWindow* plugWindow = gtk_socket_get_plug_window(GTK_SOCKET(socket)); +- g_object_weak_ref(G_OBJECT(plugWindow), plug_window_finalize_cb, socket); + } + + /* static */ +@@ -319,38 +173,4 @@ plug_removed_cb (GtkWidget *widget, gpointer data) + static void + socket_unrealize_cb(GtkWidget *widget, gpointer data) + { +- // Unmap and reparent any child windows that GDK does not yet know about. +- // (See bug 540114 comment 10.) +- GdkWindow* socket_window = gtk_widget_get_window(widget); +- GdkDisplay* gdkDisplay = gdk_display_get_default(); +- Display* display = GDK_DISPLAY_XDISPLAY(gdkDisplay); +- +- // Ignore X errors that may happen if windows get destroyed (possibly +- // requested by the plugin) between XQueryTree and when we operate on them. +- gdk_error_trap_push(); +- +- Window root, parent; +- Window* children; +- unsigned int nchildren; +- if (!XQueryTree(display, gdk_x11_window_get_xid(socket_window), +- &root, &parent, &children, &nchildren)) +- return; +- +- for (unsigned int i = 0; i < nchildren; ++i) { +- Window child = children[i]; +- if (!gdk_x11_window_lookup_for_display(gdkDisplay, child)) { +- // This window is not known to GDK. +- XUnmapWindow(display, child); +- XReparentWindow(display, child, DefaultRootWindow(display), 0, 0); +- } +- } +- +- if (children) XFree(children); +- +- mozilla::FinishX(display); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif + } +diff --git a/dom/plugins/base/nsPluginNativeWindowGtk.h b/dom/plugins/base/nsPluginNativeWindowGtk.h +index 872d7f0..30cd67a 100644 +--- a/dom/plugins/base/nsPluginNativeWindowGtk.h ++++ b/dom/plugins/base/nsPluginNativeWindowGtk.h +@@ -8,14 +8,14 @@ + #include "nsPluginNativeWindow.h" + #include "npapi.h" + #include +-#include ++//#include + #include + #if (GTK_MAJOR_VERSION == 3) +-#include ++//#include + #else + #include "gtk2xtbin.h" + #endif +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + class nsPluginNativeWindowGtk : public nsPluginNativeWindow { + public: +@@ -26,16 +26,8 @@ public: + nsresult CreateXEmbedWindow(bool aEnableXtFocus); + void SetAllocation(); + +- XID GetWindow() const +- { +- return static_cast(reinterpret_cast(window)); +- } + + private: +- void SetWindow(XID aWindow) +- { +- window = reinterpret_cast(static_cast(aWindow)); +- } + + NPSetWindowCallbackStruct mWsInfo; + /** +diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp +index 6f07de5..f587b17 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.cpp ++++ b/dom/plugins/ipc/PluginInstanceChild.cpp +@@ -16,7 +16,7 @@ + #include "gfx2DGlue.h" + #include "nsNPAPIPluginInstance.h" + #include "mozilla/gfx/2D.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + #ifdef XP_WIN +@@ -50,7 +50,7 @@ using namespace std; + #ifdef MOZ_WIDGET_GTK + + #include +-#include ++//#include + #include + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" +@@ -200,7 +200,7 @@ 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 defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + mWindow.ws_info = &mWsInfo; + memset(&mWsInfo, 0, sizeof(mWsInfo)); + #if (MOZ_WIDGET_GTK == 2) +@@ -386,7 +386,7 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar, + + switch(aVar) { + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + case NPNVToolkit: + *((NPNToolkitType*)aValue) = NPNVGtk2; + return NPERR_NO_ERROR; +@@ -456,7 +456,7 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar, + *static_cast(aValue) = mPluginWindowHWND; + return NPERR_NO_ERROR; + } +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + NPError result; + CallNPN_GetValue_NPNVnetscapeWindow(static_cast(aValue), &result); + return result; +@@ -720,7 +720,7 @@ PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginNeedsXEmbed( + AssertPluginThread(); + AutoStackHelper guard(this); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // The documentation on the types for many variables in NP(N|P)_GetValue + // is vague. Often boolean values are NPBool (1 byte), but + // https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins +@@ -866,7 +866,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent(const NPRemoteEvent& event, + AssertPluginThread(); + AutoStackHelper guard(this); + +-#if defined(MOZ_X11) && defined(DEBUG) ++#if defined(MOZ_X11_no) && defined(DEBUG) + if (GraphicsExpose == event.event.type) + PLUGIN_LOG_DEBUG((" received drawable 0x%lx\n", + event.event.xgraphicsexpose.drawable)); +@@ -924,7 +924,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent(const NPRemoteEvent& event, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (GraphicsExpose == event.event.type) { + // Make sure the X server completes the drawing before the parent + // draws on top and destroys the Drawable. +@@ -1157,7 +1157,7 @@ PluginInstanceChild::RecvContentsScaleFactorChanged(const double& aContentsScale + #endif + } + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + // Create a new window from NPWindow + bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow) + { +@@ -1255,7 +1255,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + AssertPluginThread(); + AutoStackHelper guard(this); + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + NS_ASSERTION(mWsInfo.display, "We should have a valid display!"); + + // The minimum info is sent over IPC to allow this +@@ -1394,6 +1394,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + + #elif defined(ANDROID) + // TODO: Need Android impl ++#elif defined(MOZ_WIDGET_GTK) + #elif defined(MOZ_WIDGET_UIKIT) + // Don't care + #else +@@ -3373,7 +3374,7 @@ PluginInstanceChild::CreateOptSurface(void) + (mIsTransparent && !mBackground) ? SurfaceFormat::A8R8G8B8_UINT32 : + SurfaceFormat::X8R8G8B8_UINT32; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Display* dpy = mWsInfo.display; + Screen* screen = DefaultScreenOfDisplay(dpy); + if (format == SurfaceFormat::X8R8G8B8_UINT32 && +@@ -3433,7 +3434,7 @@ PluginInstanceChild::MaybeCreatePlatformHelperSurface(void) + return false; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + bool supportNonDefaultVisual = false; + Screen* screen = DefaultScreenOfDisplay(mWsInfo.display); + Visual* defaultVisual = DefaultVisualOfScreen(screen); +@@ -3592,11 +3593,11 @@ PluginInstanceChild::EnsureCurrentBuffer(void) + void + PluginInstanceChild::UpdateWindowAttributes(bool aForceSetWindow) + { +-#if defined(MOZ_X11) || defined(XP_WIN) ++#if defined(MOZ_X11_no) || defined(XP_WIN) + RefPtr curSurface = mHelperSurface ? mHelperSurface : mCurrentSurface; + #endif // Only used within MOZ_X11 or XP_WIN blocks. Unused variable otherwise + bool needWindowUpdate = aForceSetWindow; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Visual* visual = nullptr; + Colormap colormap = 0; + if (curSurface && curSurface->GetType() == gfxSurfaceType::Xlib) { +@@ -3692,7 +3693,7 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect, + // We should not send an async surface if we're using direct rendering. + MOZ_ASSERT(!IsUsingDirectDrawing()); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { + NS_ASSERTION(aSurface->GetType() == gfxSurfaceType::Xlib, + "Non supported platform surface type"); +@@ -3749,7 +3750,7 @@ PluginInstanceChild::PaintRectToSurface(const nsIntRect& aRect, + // Render using temporary X surface, with copy to image surface + nsIntRect plPaintRect(aRect); + RefPtr renderSurface = aSurface; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + 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 +@@ -4098,7 +4099,7 @@ 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 ++#ifdef MOZ_X11_no + if (mCurrentSurface->GetType() == gfxSurfaceType::Xlib) { + gfxXlibSurface *xsurf = static_cast(mCurrentSurface.get()); + currSurf = SurfaceDescriptorX11(xsurf); +@@ -4150,7 +4151,7 @@ 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 defined(MOZ_X11_no) + if (mBackSurface->GetType() != gfxSurfaceType::Xlib && + !gfxSharedImageSurface::IsSharedImage(mBackSurface)) + return false; +@@ -4159,7 +4160,7 @@ PluginInstanceChild::ReadbackDifferenceRect(const nsIntRect& rect) + return false; + #endif + +-#if defined(MOZ_X11) || defined(XP_WIN) ++#if defined(MOZ_X11_no) || defined(XP_WIN) + if (mCurrentSurface->GetContentType() != mBackSurface->GetContentType()) + return false; + +@@ -4277,7 +4278,7 @@ PluginInstanceChild::RecvUpdateBackground(const SurfaceDescriptor& aBackground, + if (!mBackground) { + // XXX refactor me + switch (aBackground.type()) { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case SurfaceDescriptor::TSurfaceDescriptorX11: { + mBackground = aBackground.get_SurfaceDescriptorX11().OpenForeign(); + break; +@@ -4622,7 +4623,7 @@ PluginInstanceChild::Destroy() + xt_client_xloop_destroy(); + } + #endif +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + DeleteWindow(); + #endif + } +diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp +index eeb8551..42bf07b 100644 +--- a/dom/plugins/ipc/PluginInstanceParent.cpp ++++ b/dom/plugins/ipc/PluginInstanceParent.cpp +@@ -28,7 +28,7 @@ + #include "nsPluginInstanceOwner.h" + #include "nsFocusManager.h" + #include "nsIDOMElement.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + #include "gfxContext.h" +@@ -193,7 +193,7 @@ PluginInstanceParent::ActorDestroy(ActorDestroyReason why) + if (mImageContainer) { + mImageContainer->ClearAllImages(); + } +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + FinishX(DefaultXDisplay()); + #endif + } +@@ -266,7 +266,7 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle* + { + #ifdef XP_WIN + HWND id; +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + XID id; + #elif defined(XP_DARWIN) + intptr_t id; +@@ -274,7 +274,7 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle* + // TODO: Need Android impl + int id; + #else +-#warning Implement me ++ int id; + #endif + + *result = mNPNIface->getvalue(mNPP, NPNVnetscapeWindow, &id); +@@ -476,7 +476,7 @@ PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginDrawingModel( + case NPDrawingModelAsyncWindowsDXGISurface: + allowed = AllowDirectDXGISurfaceDrawing(); + break; +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + case NPDrawingModelSyncX: + allowed = true; + break; +@@ -910,7 +910,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, + return true; + } + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + else if (newSurface.type() == SurfaceDescriptor::TSurfaceDescriptorX11) { + surface = newSurface.get_SurfaceDescriptorX11().OpenForeign(); + } +@@ -927,7 +927,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, + // 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 ++#ifdef MOZ_X11_no + 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 +@@ -1170,7 +1170,7 @@ PluginInstanceParent::EndUpdateBackground(const nsIntRect& aRect) + ("[InstanceParent][%p] EndUpdateBackground for ", + this, aRect.x, aRect.y, aRect.width, aRect.height)); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // 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 +@@ -1227,7 +1227,7 @@ PluginInstanceParent::CreateBackground(const nsIntSize& aSize) + + // XXX refactor me + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + Screen* screen = DefaultScreenOfDisplay(DefaultXDisplay()); + Visual* visual = DefaultVisualOfScreen(screen); + mBackground = gfxXlibSurface::Create(screen, visual, +@@ -1272,7 +1272,7 @@ PluginInstanceParent::BackgroundDescriptor() + + // XXX refactor me + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibSurface* xsurf = static_cast(mBackground.get()); + return SurfaceDescriptorX11(xsurf); + #endif +@@ -1399,7 +1399,7 @@ PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow) + } + #endif + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + const NPSetWindowCallbackStruct* ws_info = + static_cast(aWindow->ws_info); + window.visualID = ws_info->visual ? ws_info->visual->visualid : 0; +@@ -1436,7 +1436,7 @@ PluginInstanceParent::NPP_GetValue(NPPVariable aVariable, + return NPERR_NO_ERROR; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case NPPVpluginNeedsXEmbed: { + bool needsXEmbed; + NPError rv; +@@ -1616,7 +1616,7 @@ PluginInstanceParent::NPP_HandleEvent(void* event) + } + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + switch (npevent->type) { + case GraphicsExpose: + PLUGIN_LOG_DEBUG((" schlepping drawable 0x%lx across the pipe\n", +diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp +index 47653fe..60b3f20 100644 +--- a/dom/plugins/ipc/PluginMessageUtils.cpp ++++ b/dom/plugins/ipc/PluginMessageUtils.cpp +@@ -50,7 +50,7 @@ namespace plugins { + + NPRemoteWindow::NPRemoteWindow() : + window(0), x(0), y(0), width(0), height(0), type(NPWindowTypeDrawable) +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + , visualID(0) + , colormap(0) + #endif /* XP_UNIX */ +diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp +index 8b5dfd5..06379d2 100644 +--- a/dom/plugins/ipc/PluginModuleChild.cpp ++++ b/dom/plugins/ipc/PluginModuleChild.cpp +@@ -11,7 +11,7 @@ + + #include "mozilla/ipc/MessageChannel.h" + +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + #include + #endif + +@@ -23,7 +23,7 @@ + #include "nsPluginsDir.h" + #include "nsXULAppAPI.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + # include "mozilla/X11Util.h" + #endif + #include "mozilla/ipc/ProcessChild.h" +@@ -120,7 +120,7 @@ PluginModuleChild::PluginModuleChild(bool aIsChrome) + , mInitializeFunc(0) + #if defined(OS_WIN) || defined(OS_MACOSX) + , mGetEntryPointsFunc(0) +-#elif defined(MOZ_WIDGET_GTK) ++#elif defined(MOZ_WIDGET_GTK_no) + , mNestedLoopTimerId(0) + #endif + #ifdef OS_WIN +@@ -256,7 +256,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + // XXX quirks isn't initialized yet + mAsyncRenderSupport = info.fSupportsAsyncRender; + #endif +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + NS_NAMED_LITERAL_CSTRING(flash10Head, "Shockwave Flash 10."); + if (StringBeginsWith(nsDependentCString(info.fDescription), flash10Head)) { + AddQuirk(QUIRK_FLASH_EXPOSE_COORD_TRANSLATION); +@@ -269,7 +269,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + mozilla::plugins::PluginUtilsOSX::SetProcessName(nameBuffer); + #endif + pluginFile.FreePluginInfo(info); +-#if defined(MOZ_X11) || defined(XP_MACOSX) ++#if defined(MOZ_X11_no) || defined(XP_MACOSX) + if (!mLibrary) + #endif + { +@@ -317,7 +317,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + return true; + } + +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + + typedef void (*GObjectDisposeFn)(GObject*); + typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*); +@@ -566,7 +566,7 @@ PluginModuleChild::ShouldContinueFromReplyTimeout() + bool + PluginModuleChild::InitGraphics() + { +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + // Work around plugins that don't interact well with GDK + // client-side windows. + PR_SetEnv("GDK_NATIVE_WINDOWS=1"); +@@ -605,7 +605,7 @@ PluginModuleChild::InitGraphics() + #else + // may not be necessary on all platforms + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + XRE_InstallX11ErrorHandler(); + #endif +@@ -615,7 +615,7 @@ PluginModuleChild::InitGraphics() + void + PluginModuleChild::DeinitGraphics() + { +-#if defined(MOZ_X11) && defined(NS_FREE_PERMANENT_DATA) ++#if defined(MOZ_X11_no) && defined(NS_FREE_PERMANENT_DATA) + // 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. +@@ -1101,7 +1101,7 @@ _getvalue(NPP aNPP, + switch (aVariable) { + // Copied from nsNPAPIPlugin.cpp + case NPNVToolkit: +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + *static_cast(aValue) = NPNVGtk2; + return NPERR_NO_ERROR; + #endif +@@ -1122,7 +1122,7 @@ _getvalue(NPP aNPP, + case NPNVSupportsWindowless: + *(NPBool*)aValue = PluginModuleChild::GetChrome()->Settings().supportsWindowless(); + return NPERR_NO_ERROR; +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + case NPNVxDisplay: { + if (aNPP) { + return InstCast(aNPP)->NPN_GetValue(aVariable, aValue); +@@ -1886,7 +1886,7 @@ PluginModuleChild::DoNP_Initialize(const PluginSettings& aSettings) + SetEventHooks(); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Send the parent our X socket to act as a proxy reference for our X + // resources. + int xSocketFd = ConnectionNumber(DefaultXDisplay()); +diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build +index 5bb50c1..f41d761 100644 +--- a/dom/plugins/ipc/moz.build ++++ b/dom/plugins/ipc/moz.build +@@ -136,7 +136,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gtk3': + CXXFLAGS += CONFIG['TK_CFLAGS'] + else: + # Force build against gtk+2 for struct offsets and such. +- CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] ++ CXXFLAGS += CONFIG['TK_CFLAGS'] ++ #CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] + + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + +diff --git a/gfx/2d/BorrowedContext.h b/gfx/2d/BorrowedContext.h +index ee50bf7..7c48053 100644 +--- a/gfx/2d/BorrowedContext.h ++++ b/gfx/2d/BorrowedContext.h +@@ -8,7 +8,7 @@ + + #include "2D.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include "X11UndefineNone.h" +@@ -75,7 +75,7 @@ private: + DrawTarget *mDT; + }; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + /* This is a helper class that let's you borrow an Xlib drawable from + * a DrawTarget. This is used for drawing themed widgets. + * +diff --git a/gfx/2d/DrawTargetCairo.cpp b/gfx/2d/DrawTargetCairo.cpp +index c0e4f0a..c91489d 100644 +--- a/gfx/2d/DrawTargetCairo.cpp ++++ b/gfx/2d/DrawTargetCairo.cpp +@@ -16,7 +16,7 @@ + #include "mozilla/Vector.h" + + #include "cairo.h" +-#include "cairo-tee.h" ++//#include "cairo-tee.h" + #include + + #include "Blur.h" +@@ -631,12 +631,6 @@ DrawTargetCairo::GetType() const + { + if (mContext) { + cairo_surface_type_t type = cairo_surface_get_type(mSurface); +- if (type == CAIRO_SURFACE_TYPE_TEE) { +- type = cairo_surface_get_type(cairo_tee_surface_index(mSurface, 0)); +- MOZ_ASSERT(type != CAIRO_SURFACE_TYPE_TEE, "C'mon!"); +- MOZ_ASSERT(type == cairo_surface_get_type(cairo_tee_surface_index(mSurface, 1)), +- "What should we do here?"); +- } + switch (type) { + case CAIRO_SURFACE_TYPE_PDF: + case CAIRO_SURFACE_TYPE_PS: +@@ -928,20 +922,8 @@ DrawTargetCairo::DrawSurfaceWithShadow(SourceSurface *aSurface, + + // We only use the A8 surface for blurred shadows. Unblurred shadows can just + // use the RGBA surface directly. +- if (cairo_surface_get_type(sourcesurf) == CAIRO_SURFACE_TYPE_TEE) { +- blursurf = cairo_tee_surface_index(sourcesurf, 0); +- surf = cairo_tee_surface_index(sourcesurf, 1); +- +- MOZ_ASSERT(cairo_surface_get_type(blursurf) == CAIRO_SURFACE_TYPE_IMAGE); +- Rect extents(0, 0, width, height); +- AlphaBoxBlur blur(extents, +- cairo_image_surface_get_stride(blursurf), +- aSigma, aSigma); +- blur.Blur(cairo_image_surface_get_data(blursurf)); +- } else { + blursurf = sourcesurf; + surf = sourcesurf; +- } + + WillChange(); + ClearSurfaceForUnboundedSource(aOperator); +@@ -1941,20 +1923,6 @@ DrawTargetCairo::CreateShadowDrawTarget(const IntSize &aSize, SurfaceFormat aFor + return nullptr; + } + +- cairo_surface_t* tee = cairo_tee_surface_create(blursurf); +- cairo_surface_destroy(blursurf); +- if (cairo_surface_status(tee)) { +- cairo_surface_destroy(similar); +- return nullptr; +- } +- +- cairo_tee_surface_add(tee, similar); +- cairo_surface_destroy(similar); +- +- RefPtr target = new DrawTargetCairo(); +- if (target->InitAlreadyReferenced(tee, aSize)) { +- return target.forget(); +- } + return nullptr; + } + +@@ -2315,7 +2283,7 @@ BorrowedCairoContext::ReturnCairoContextToDrawTarget(DrawTarget* aDT, + cairoDT->mContext = aCairo; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + bool + BorrowedXlibDrawable::Init(DrawTarget* aDT) + { +@@ -2324,7 +2292,7 @@ BorrowedXlibDrawable::Init(DrawTarget* aDT) + mDT = aDT; + mDrawable = X11None; + +-#ifdef CAIRO_HAS_XLIB_SURFACE ++#ifdef CAIRO_HAS_XLIB_SURFACE_no + if (aDT->GetBackendType() != BackendType::CAIRO || + aDT->IsDualDrawTarget() || + aDT->IsTiledDrawTarget()) { +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc +index b7f123b..ce8d360 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc +@@ -15,7 +15,7 @@ namespace webrtc { + DesktopCaptureOptions::DesktopCaptureOptions() + : use_update_notifications_(true), + disable_effects_(true) { +-#if defined(USE_X11) ++#if defined(USE_X11_no) + // XDamage is often broken, so don't use it by default. + use_update_notifications_ = false; + #endif +@@ -30,7 +30,7 @@ DesktopCaptureOptions::~DesktopCaptureOptions() {} + // static + DesktopCaptureOptions DesktopCaptureOptions::CreateDefault() { + DesktopCaptureOptions result; +-#if defined(USE_X11) ++#if defined(USE_X11_no) + result.set_x_display(SharedXDisplay::CreateDefault()); + #endif + #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h +index 030cb2b..f7bb2a4 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h +@@ -13,7 +13,7 @@ + #include "webrtc/base/constructormagic.h" + #include "webrtc/system_wrappers/interface/scoped_refptr.h" + +-#if defined(USE_X11) ++#if defined(USE_X11_no) + #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" + #endif + +@@ -37,7 +37,7 @@ class DesktopCaptureOptions { + // X11 connection failed (e.g. DISPLAY isn't set). + static DesktopCaptureOptions CreateDefault(); + +-#if defined(USE_X11) ++#if defined(USE_X11_no) + SharedXDisplay* x_display() const { return x_display_; } + void set_x_display(scoped_refptr x_display) { + x_display_ = x_display; +@@ -85,7 +85,7 @@ class DesktopCaptureOptions { + #endif + + private: +-#if defined(USE_X11) ++#if defined(USE_X11_no) + scoped_refptr x_display_; + #endif + +diff --git a/widget/gtk/CompositorWidgetChild.h b/widget/gtk/CompositorWidgetChild.h +index d8b445d..cbf5a94 100644 +--- a/widget/gtk/CompositorWidgetChild.h ++++ b/widget/gtk/CompositorWidgetChild.h +@@ -15,7 +15,6 @@ namespace widget { + + class CompositorWidgetChild final + : public PCompositorWidgetChild +- , public CompositorWidgetDelegate + { + public: + CompositorWidgetChild(RefPtr aVsyncDispatcher, +@@ -25,7 +24,7 @@ public: + bool RecvObserveVsync() override; + bool RecvUnobserveVsync() override; + +- void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; ++ void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) ; + + private: + RefPtr mVsyncDispatcher; +diff --git a/widget/gtk/CompositorWidgetParent.cpp b/widget/gtk/CompositorWidgetParent.cpp +index c882f4f..cd5dc97 100644 +--- a/widget/gtk/CompositorWidgetParent.cpp ++++ b/widget/gtk/CompositorWidgetParent.cpp +@@ -10,7 +10,6 @@ namespace mozilla { + namespace widget { + + CompositorWidgetParent::CompositorWidgetParent(const CompositorWidgetInitData& aInitData) +- : X11CompositorWidget(aInitData) + { + MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_GPU); + } +@@ -40,7 +39,7 @@ CompositorWidgetParent::GetVsyncObserver() const + bool + CompositorWidgetParent::RecvNotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) + { +- NotifyClientSizeChanged(aClientSize); ++ //NotifyClientSizeChanged(aClientSize); + return true; + } + +diff --git a/widget/gtk/CompositorWidgetParent.h b/widget/gtk/CompositorWidgetParent.h +index e80c0f8..4230605 100644 +--- a/widget/gtk/CompositorWidgetParent.h ++++ b/widget/gtk/CompositorWidgetParent.h +@@ -6,15 +6,15 @@ + #ifndef widget_gtk_CompositorWidgetParent_h + #define widget_gtk_CompositorWidgetParent_h + +-#include "X11CompositorWidget.h" ++//#include "X11CompositorWidget.h" + #include "mozilla/widget/PCompositorWidgetParent.h" + + namespace mozilla { + namespace widget { + + class CompositorWidgetParent final +- : public PCompositorWidgetParent, +- public X11CompositorWidget ++ : public PCompositorWidgetParent//, ++ //public X11CompositorWidget + { + public: + explicit CompositorWidgetParent(const CompositorWidgetInitData& aInitData); +@@ -22,8 +22,8 @@ public: + + void ActorDestroy(ActorDestroyReason aWhy) override { } + +- void ObserveVsync(VsyncObserver* aObserver) override; +- RefPtr GetVsyncObserver() const override; ++ void ObserveVsync(VsyncObserver* aObserver); ++ RefPtr GetVsyncObserver() const ; + + bool RecvNotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; + +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index baccb6c..0bfd195 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -47,15 +47,15 @@ if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ + 'CompositorWidgetChild.cpp', + 'CompositorWidgetParent.cpp', +- 'InProcessX11CompositorWidget.cpp', +- 'nsIdleServiceGTK.cpp', +- 'X11CompositorWidget.cpp', ++ #'InProcessX11CompositorWidget.cpp', ++ #'nsIdleServiceGTK.cpp', ++ #'X11CompositorWidget.cpp', + ] + EXPORTS.mozilla.widget += [ + 'CompositorWidgetChild.h', + 'CompositorWidgetParent.h', +- 'InProcessX11CompositorWidget.h', +- 'X11CompositorWidget.h', ++ #'InProcessX11CompositorWidget.h', ++ #'X11CompositorWidget.h', + ] + + if CONFIG['NS_PRINTING']: +@@ -71,15 +71,15 @@ if CONFIG['NS_PRINTING']: + + if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ +- 'nsClipboard.cpp', +- 'nsDragService.cpp', +- 'WindowSurfaceProvider.cpp', +- 'WindowSurfaceX11.cpp', +- 'WindowSurfaceX11Image.cpp', +- 'WindowSurfaceXRender.cpp', ++ #'nsClipboard.cpp', ++ #'nsDragService.cpp', ++ #'WindowSurfaceProvider.cpp', ++ #'WindowSurfaceX11.cpp', ++ #'WindowSurfaceX11Image.cpp', ++ #'WindowSurfaceXRender.cpp', + ] + EXPORTS.mozilla.widget += [ +- 'WindowSurfaceProvider.h', ++ #'WindowSurfaceProvider.h', + ] + + if CONFIG['ACCESSIBILITY']: +diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp +index 3dcdb91..8512e80 100644 +--- a/widget/gtk/nsClipboard.cpp ++++ b/widget/gtk/nsClipboard.cpp +@@ -26,8 +26,8 @@ + #include + + // For manipulation of the X event queue +-#include +-#include ++//#include ++//#include + #include + #include + #include +@@ -806,6 +806,7 @@ void GetHTMLCharset(guchar * data, int32_t dataLength, nsCString& str) + str.AssignLiteral("UNKNOWN"); + } + ++#ifdef MOZ_X11_no + static void + DispatchSelectionNotifyEvent(GtkWidget *widget, XEvent *xevent) + { +@@ -866,6 +867,7 @@ checkEventProc(Display *display, XEvent *event, XPointer arg) + + return False; + } ++#endif + + // Idle timeout for receiving selection and property notify events (microsec) + static const int kClipboardTimeout = 500000; +@@ -930,53 +932,6 @@ RetrievalContext::Wait() + } + + GdkDisplay *gdkDisplay = gdk_display_get_default(); +- if (GDK_IS_X11_DISPLAY(gdkDisplay)) { +- Display *xDisplay = GDK_DISPLAY_XDISPLAY(gdkDisplay); +- checkEventContext context; +- context.cbWidget = nullptr; +- context.selAtom = gdk_x11_atom_to_xatom(gdk_atom_intern("GDK_SELECTION", +- FALSE)); +- +- // Send X events which are relevant to the ongoing selection retrieval +- // to the clipboard widget. Wait until either the operation completes, or +- // we hit our timeout. All other X events remain queued. +- +- int select_result; +- +- int cnumber = ConnectionNumber(xDisplay); +- fd_set select_set; +- FD_ZERO(&select_set); +- FD_SET(cnumber, &select_set); +- ++cnumber; +- TimeStamp start = TimeStamp::Now(); +- +- do { +- XEvent xevent; +- +- while (XCheckIfEvent(xDisplay, &xevent, checkEventProc, +- (XPointer) &context)) { +- +- if (xevent.xany.type == SelectionNotify) +- DispatchSelectionNotifyEvent(context.cbWidget, &xevent); +- else +- DispatchPropertyNotifyEvent(context.cbWidget, &xevent); +- +- if (mState == COMPLETED) { +- void *data = mData; +- mData = nullptr; +- return data; +- } +- } +- +- TimeStamp now = TimeStamp::Now(); +- struct timeval tv; +- tv.tv_sec = 0; +- tv.tv_usec = std::max(0, +- kClipboardTimeout - (now - start).ToMicroseconds()); +- select_result = select(cnumber, &select_set, nullptr, nullptr, &tv); +- } while (select_result == 1 || +- (select_result == -1 && errno == EINTR)); +- } + #ifdef DEBUG_CLIPBOARD + printf("exceeded clipboard timeout\n"); + #endif +diff --git a/widget/gtk/nsDragService.cpp b/widget/gtk/nsDragService.cpp +index 952c6ba..334019d 100644 +--- a/widget/gtk/nsDragService.cpp ++++ b/widget/gtk/nsDragService.cpp +@@ -21,12 +21,12 @@ + #include "prthread.h" + #include + #include +-#include ++//#include + #include "nsCRT.h" + #include "mozilla/BasicEvents.h" + #include "mozilla/Services.h" + +-#include "gfxXlibSurface.h" ++//#include "gfxXlibSurface.h" + #include "gfxContext.h" + #include "nsImageToPixbuf.h" + #include "nsPresContext.h" +diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp +index 7d7f56a..606bbdf 100644 +--- a/widget/gtk/nsGtkKeyUtils.cpp ++++ b/widget/gtk/nsGtkKeyUtils.cpp +@@ -12,11 +12,11 @@ + #include + #include + #include +-#include ++//#include + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +-#include ++//#include + #include "WidgetUtils.h" + #include "keysym2ucs.h" + #include "nsGtkUtils.h" +@@ -171,8 +171,8 @@ KeymapWrapper::KeymapWrapper() : + g_signal_connect(mGdkKeymap, "keys-changed", + (GCallback)OnKeysChanged, this); + +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) +- InitXKBExtension(); ++ //if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) ++ // InitXKBExtension(); + + Init(); + } +@@ -192,10 +192,10 @@ KeymapWrapper::Init() + mModifierKeys.Clear(); + memset(mModifierMasks, 0, sizeof(mModifierMasks)); + +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) +- InitBySystemSettings(); ++ //if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) ++ // InitBySystemSettings(); + +- gdk_window_add_filter(nullptr, FilterEvents, this); ++ //gdk_window_add_filter(nullptr, FilterEvents, this); + + MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, + ("%p Init, CapsLock=0x%X, NumLock=0x%X, " +@@ -213,233 +213,16 @@ KeymapWrapper::Init() + void + KeymapWrapper::InitXKBExtension() + { +- PodZero(&mKeyboardState); +- +- int xkbMajorVer = XkbMajorVersion; +- int xkbMinorVer = XkbMinorVersion; +- if (!XkbLibraryVersion(&xkbMajorVer, &xkbMinorVer)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbLibraryVersion()", this)); +- return; +- } +- +- Display* display = +- gdk_x11_display_get_xdisplay(gdk_display_get_default()); +- +- // XkbLibraryVersion() set xkbMajorVer and xkbMinorVer to that of the +- // library, which may be newer than what is required of the server in +- // XkbQueryExtension(), so these variables should be reset to +- // XkbMajorVersion and XkbMinorVersion before the XkbQueryExtension call. +- xkbMajorVer = XkbMajorVersion; +- xkbMinorVer = XkbMinorVersion; +- int opcode, baseErrorCode; +- if (!XkbQueryExtension(display, &opcode, &mXKBBaseEventCode, &baseErrorCode, +- &xkbMajorVer, &xkbMinorVer)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbQueryExtension(), display=0x%p", this, display)); +- return; +- } +- +- if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbStateNotify, +- XkbModifierStateMask, XkbModifierStateMask)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbSelectEventDetails() for XModifierStateMask, display=0x%p", +- this, display)); +- return; +- } +- +- if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbControlsNotify, +- XkbPerKeyRepeatMask, XkbPerKeyRepeatMask)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbSelectEventDetails() for XkbControlsNotify, display=0x%p", +- this, display)); +- return; +- } +- +- if (!XGetKeyboardControl(display, &mKeyboardState)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XGetKeyboardControl(), display=0x%p", +- this, display)); +- return; +- } +- +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension, Succeeded", this)); + } + + void + KeymapWrapper::InitBySystemSettings() + { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, mGdkKeymap=%p", +- this, mGdkKeymap)); +- +- Display* display = +- gdk_x11_display_get_xdisplay(gdk_display_get_default()); +- +- int min_keycode = 0; +- int max_keycode = 0; +- XDisplayKeycodes(display, &min_keycode, &max_keycode); +- +- int keysyms_per_keycode = 0; +- KeySym* xkeymap = XGetKeyboardMapping(display, min_keycode, +- max_keycode - min_keycode + 1, +- &keysyms_per_keycode); +- if (!xkeymap) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- "Failed due to null xkeymap", this)); +- return; +- } +- +- XModifierKeymap* xmodmap = XGetModifierMapping(display); +- if (!xmodmap) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- "Failed due to null xmodmap", this)); +- XFree(xkeymap); +- return; +- } +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, min_keycode=%d, " +- "max_keycode=%d, keysyms_per_keycode=%d, max_keypermod=%d", +- this, min_keycode, max_keycode, keysyms_per_keycode, +- xmodmap->max_keypermod)); +- +- // The modifiermap member of the XModifierKeymap structure contains 8 sets +- // of max_keypermod KeyCodes, one for each modifier in the order Shift, +- // Lock, Control, Mod1, Mod2, Mod3, Mod4, and Mod5. +- // Only nonzero KeyCodes have meaning in each set, and zero KeyCodes are +- // ignored. +- +- // Note that two or more modifiers may use one modifier flag. E.g., +- // on Ubuntu 10.10, Alt and Meta share the Mod1 in default settings. +- // And also Super and Hyper share the Mod4. In such cases, we need to +- // decide which modifier flag means one of DOM modifiers. +- +- // mod[0] is Modifier introduced by Mod1. +- Modifier mod[5]; +- int32_t foundLevel[5]; +- for (uint32_t i = 0; i < ArrayLength(mod); i++) { +- mod[i] = NOT_MODIFIER; +- foundLevel[i] = INT32_MAX; +- } +- const uint32_t map_size = 8 * xmodmap->max_keypermod; +- for (uint32_t i = 0; i < map_size; i++) { +- KeyCode keycode = xmodmap->modifiermap[i]; +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- " i=%d, keycode=0x%08X", +- this, i, keycode)); +- if (!keycode || keycode < min_keycode || keycode > max_keycode) { +- continue; +- } +- +- ModifierKey* modifierKey = GetModifierKey(keycode); +- if (!modifierKey) { +- modifierKey = mModifierKeys.AppendElement(ModifierKey(keycode)); +- } +- +- const KeySym* syms = +- xkeymap + (keycode - min_keycode) * keysyms_per_keycode; +- const uint32_t bit = i / xmodmap->max_keypermod; +- modifierKey->mMask |= 1 << bit; +- +- // We need to know the meaning of Mod1, Mod2, Mod3, Mod4 and Mod5. +- // Let's skip if current map is for others. +- if (bit < 3) { +- continue; +- } +- +- const int32_t modIndex = bit - 3; +- for (int32_t j = 0; j < keysyms_per_keycode; j++) { +- Modifier modifier = GetModifierForGDKKeyval(syms[j]); +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- " Mod%d, j=%d, syms[j]=%s(0x%X), modifier=%s", +- this, modIndex + 1, j, gdk_keyval_name(syms[j]), syms[j], +- GetModifierName(modifier))); +- +- switch (modifier) { +- case NOT_MODIFIER: +- // Don't overwrite the stored information with +- // NOT_MODIFIER. +- break; +- case CAPS_LOCK: +- case SHIFT: +- case CTRL: +- // Ignore the modifiers defined in GDK spec. They shouldn't +- // be mapped to Mod1-5 because they must not work on native +- // GTK applications. +- break; +- default: +- // If new modifier is found in higher level than stored +- // value, we don't need to overwrite it. +- if (j > foundLevel[modIndex]) { +- break; +- } +- // If new modifier is more important than stored value, +- // we should overwrite it with new modifier. +- if (j == foundLevel[modIndex]) { +- mod[modIndex] = std::min(modifier, mod[modIndex]); +- break; +- } +- foundLevel[modIndex] = j; +- mod[modIndex] = modifier; +- break; +- } +- } +- } +- +- for (uint32_t i = 0; i < COUNT_OF_MODIFIER_INDEX; i++) { +- Modifier modifier; +- switch (i) { +- case INDEX_NUM_LOCK: +- modifier = NUM_LOCK; +- break; +- case INDEX_SCROLL_LOCK: +- modifier = SCROLL_LOCK; +- break; +- case INDEX_ALT: +- modifier = ALT; +- break; +- case INDEX_META: +- modifier = META; +- break; +- case INDEX_SUPER: +- modifier = SUPER; +- break; +- case INDEX_HYPER: +- modifier = HYPER; +- break; +- case INDEX_LEVEL3: +- modifier = LEVEL3; +- break; +- case INDEX_LEVEL5: +- modifier = LEVEL5; +- break; +- default: +- MOZ_CRASH("All indexes must be handled here"); +- } +- for (uint32_t j = 0; j < ArrayLength(mod); j++) { +- if (modifier == mod[j]) { +- mModifierMasks[i] |= 1 << (j + 3); +- } +- } +- } +- +- XFreeModifiermap(xmodmap); +- XFree(xkeymap); + } + + KeymapWrapper::~KeymapWrapper() + { +- gdk_window_remove_filter(nullptr, FilterEvents, this); ++ //gdk_window_remove_filter(nullptr, FilterEvents, this); + g_signal_handlers_disconnect_by_func(mGdkKeymap, + FuncToGpointer(OnKeysChanged), this); + g_object_unref(mGdkKeymap); +@@ -448,77 +231,6 @@ KeymapWrapper::~KeymapWrapper() + ("%p Destructor", this)); + } + +-/* static */ GdkFilterReturn +-KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, +- GdkEvent* aGdkEvent, +- gpointer aData) +-{ +- XEvent* xEvent = static_cast(aXEvent); +- switch (xEvent->type) { +- case KeyPress: { +- // If the key doesn't support auto repeat, ignore the event because +- // even if such key (e.g., Shift) is pressed during auto repeat of +- // anoter key, it doesn't stop the auto repeat. +- KeymapWrapper* self = static_cast(aData); +- if (!self->IsAutoRepeatableKey(xEvent->xkey.keycode)) { +- break; +- } +- if (sRepeatState == NOT_PRESSED) { +- sRepeatState = FIRST_PRESS; +- } else if (sLastRepeatableHardwareKeyCode == xEvent->xkey.keycode) { +- sRepeatState = REPEATING; +- } else { +- // If a different key is pressed while another key is pressed, +- // auto repeat system repeats only the last pressed key. +- // So, setting new keycode and setting repeat state as first key +- // press should work fine. +- sRepeatState = FIRST_PRESS; +- } +- sLastRepeatableHardwareKeyCode = xEvent->xkey.keycode; +- break; +- } +- case KeyRelease: { +- if (sLastRepeatableHardwareKeyCode != xEvent->xkey.keycode) { +- // This case means the key release event is caused by +- // a non-repeatable key such as Shift or a repeatable key that +- // was pressed before sLastRepeatableHardwareKeyCode was +- // pressed. +- break; +- } +- sRepeatState = NOT_PRESSED; +- break; +- } +- case FocusOut: { +- // At moving focus, we should reset keyboard repeat state. +- // Strictly, this causes incorrect behavior. However, this +- // correctness must be enough for web applications. +- sRepeatState = NOT_PRESSED; +- break; +- } +- default: { +- KeymapWrapper* self = static_cast(aData); +- if (xEvent->type != self->mXKBBaseEventCode) { +- break; +- } +- XkbEvent* xkbEvent = (XkbEvent*)xEvent; +- if (xkbEvent->any.xkb_type != XkbControlsNotify || +- !(xkbEvent->ctrls.changed_ctrls & XkbPerKeyRepeatMask)) { +- break; +- } +- if (!XGetKeyboardControl(xkbEvent->any.display, +- &self->mKeyboardState)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p FilterEvents failed due to failure " +- "of XGetKeyboardControl(), display=0x%p", +- self, xkbEvent->any.display)); +- } +- break; +- } +- } +- +- return GDK_FILTER_CONTINUE; +-} +- + /* static */ void + KeymapWrapper::OnKeysChanged(GdkKeymap *aGdkKeymap, + KeymapWrapper* aKeymapWrapper) +@@ -893,23 +605,6 @@ KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, + // key release events, the result isn't what we want. + guint modifierState = aGdkKeyEvent->state; + GdkDisplay* gdkDisplay = gdk_display_get_default(); +- if (aGdkKeyEvent->is_modifier && GDK_IS_X11_DISPLAY(gdkDisplay)) { +- Display* display = +- gdk_x11_display_get_xdisplay(gdkDisplay); +- if (XEventsQueued(display, QueuedAfterReading)) { +- XEvent nextEvent; +- XPeekEvent(display, &nextEvent); +- if (nextEvent.type == keymapWrapper->mXKBBaseEventCode) { +- XkbEvent* XKBEvent = (XkbEvent*)&nextEvent; +- if (XKBEvent->any.xkb_type == XkbStateNotify) { +- XkbStateNotifyEvent* stateNotifyEvent = +- (XkbStateNotifyEvent*)XKBEvent; +- modifierState &= ~0xFF; +- modifierState |= stateNotifyEvent->lookup_mods; +- } +- } +- } +- } + InitInputEvent(aKeyEvent, modifierState); + + switch (aGdkKeyEvent->keyval) { +@@ -1149,11 +844,7 @@ KeymapWrapper::IsLatinGroup(guint8 aGroup) + bool + KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) + { +- uint8_t indexOfArray = aHardwareKeyCode / 8; +- MOZ_ASSERT(indexOfArray < ArrayLength(mKeyboardState.auto_repeats), +- "invalid index"); +- char bitMask = 1 << (aHardwareKeyCode % 8); +- return (mKeyboardState.auto_repeats[indexOfArray] & bitMask) != 0; ++ return true; + } + + /* static */ bool +diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h +index f906153..c81a213 100644 +--- a/widget/gtk/nsGtkKeyUtils.h ++++ b/widget/gtk/nsGtkKeyUtils.h +@@ -12,7 +12,7 @@ + #include "mozilla/EventForwards.h" + + #include +-#include ++//#include + + namespace mozilla { + namespace widget { +@@ -223,14 +223,6 @@ protected: + int mXKBBaseEventCode; + + /** +- * Only auto_repeats[] stores valid value. If you need to use other +- * members, you need to listen notification events for them. +- * See a call of XkbSelectEventDetails() with XkbControlsNotify in +- * InitXKBExtension(). +- */ +- XKeyboardState mKeyboardState; +- +- /** + * Pointer of the singleton instance. + */ + static KeymapWrapper* sInstance; +@@ -337,15 +329,6 @@ protected: + static uint32_t GetDOMKeyCodeFromKeyPairs(guint aGdkKeyval); + + /** +- * FilterEvents() listens all events on all our windows. +- * Be careful, this may make damage to performance if you add expensive +- * code in this method. +- */ +- static GdkFilterReturn FilterEvents(GdkXEvent* aXEvent, +- GdkEvent* aGdkEvent, +- gpointer aData); +- +- /** + * See the document of WillDispatchKeyboardEvent(). + */ + void WillDispatchKeyboardEventInternal(WidgetKeyboardEvent& aKeyEvent, +diff --git a/widget/gtk/nsScreenGtk.cpp b/widget/gtk/nsScreenGtk.cpp +index 61e6605..a9f8cb9 100644 +--- a/widget/gtk/nsScreenGtk.cpp ++++ b/widget/gtk/nsScreenGtk.cpp +@@ -8,7 +8,7 @@ + #include "nsIWidget.h" + + #include +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #endif +@@ -130,7 +130,7 @@ nsScreenGtk :: Init (GdkWindow *aRootWindow) + // versions of GDK predating the GdkScreen object. See bug 256646. + mAvailRect = mRect = nsIntRect(0, 0, width, height); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // We need to account for the taskbar, etc in the available rect. + // See http://freedesktop.org/Standards/wm-spec/index.html#id2767771 + +@@ -193,7 +193,7 @@ nsScreenGtk :: Init (GdkWindow *aRootWindow) + #endif + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void + nsScreenGtk :: Init (XineramaScreenInfo *aScreenInfo) + { +diff --git a/widget/gtk/nsScreenGtk.h b/widget/gtk/nsScreenGtk.h +index d58ea4b..afe468f 100644 +--- a/widget/gtk/nsScreenGtk.h ++++ b/widget/gtk/nsScreenGtk.h +@@ -9,7 +9,7 @@ + #include "nsBaseScreen.h" + #include "nsRect.h" + #include "gdk/gdk.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + + // from Xinerama.h +@@ -40,7 +40,7 @@ public: + NS_IMETHOD GetDefaultCSSScaleFactor(double* aScaleFactor) override; + + void Init(GdkWindow *aRootWindow); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void Init(XineramaScreenInfo *aScreenInfo); + #endif /* MOZ_X11 */ + +diff --git a/widget/gtk/nsScreenManagerGtk.cpp b/widget/gtk/nsScreenManagerGtk.cpp +index 98166cc..4dfc0ee 100644 +--- a/widget/gtk/nsScreenManagerGtk.cpp ++++ b/widget/gtk/nsScreenManagerGtk.cpp +@@ -13,7 +13,7 @@ + + #define SCREEN_MANAGER_LIBRARY_LOAD_FAILED ((PRLibrary*)1) + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + // prototypes from Xinerama.h + typedef Bool (*_XnrmIsActive_fn)(Display *dpy); +@@ -34,7 +34,7 @@ root_window_event_filter(GdkXEvent *aGdkXEvent, GdkEvent *aGdkEvent, + gpointer aClosure) + { + nsScreenManagerGtk *manager = static_cast(aClosure); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent *xevent = static_cast(aGdkXEvent); + + // See comments in nsScreenGtk::Init below. +@@ -58,7 +58,6 @@ root_window_event_filter(GdkXEvent *aGdkXEvent, GdkEvent *aGdkEvent, + nsScreenManagerGtk :: nsScreenManagerGtk ( ) + : mXineramalib(nullptr) + , mRootWindow(nullptr) +- , mNetWorkareaAtom(0) + { + // nothing else to do. I guess we could cache a bunch of information + // here, but we want to ask the device at runtime in case anything +@@ -114,7 +113,7 @@ nsScreenManagerGtk :: EnsureInit() + + g_signal_connect(gdk_screen_get_default(), "monitors-changed", + G_CALLBACK(monitors_changed), this); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gdk_window_add_filter(mRootWindow, root_window_event_filter, this); + if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) + mNetWorkareaAtom = +@@ -127,7 +126,7 @@ nsScreenManagerGtk :: EnsureInit() + nsresult + nsScreenManagerGtk :: Init() + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XineramaScreenInfo *screenInfo = nullptr; + int numScreens; + +@@ -170,7 +169,7 @@ nsScreenManagerGtk :: Init() + } + + screen->Init(mRootWindow); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + } + // If Xinerama is enabled and there's more than one screen, fill + // in the info for all of the screens. If that's not the case +diff --git a/widget/gtk/nsScreenManagerGtk.h b/widget/gtk/nsScreenManagerGtk.h +index 9afb3bf..60c016d 100644 +--- a/widget/gtk/nsScreenManagerGtk.h ++++ b/widget/gtk/nsScreenManagerGtk.h +@@ -12,7 +12,7 @@ + #include "nsCOMArray.h" + #include "prlink.h" + #include "gdk/gdk.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif + +@@ -26,7 +26,7 @@ public: + NS_DECL_ISUPPORTS + NS_DECL_NSISCREENMANAGER + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Atom NetWorkareaAtom() { return mNetWorkareaAtom; } + #endif + +@@ -44,7 +44,7 @@ private: + PRLibrary *mXineramalib; + + GdkWindow *mRootWindow; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Atom mNetWorkareaAtom; + #endif + }; +diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp +index 7e42743..9ff9c4c 100644 +--- a/widget/gtk/nsWidgetFactory.cpp ++++ b/widget/gtk/nsWidgetFactory.cpp +@@ -17,7 +17,7 @@ + #include "nsWindow.h" + #include "nsTransferable.h" + #include "nsHTMLFormatConverter.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "nsClipboardHelper.h" + #include "nsClipboard.h" + #include "nsDragService.h" +@@ -44,7 +44,7 @@ + #include "nsImageToPixbuf.h" + #include "nsPrintDialogGTK.h" + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include "nsIdleServiceGTK.h" + #include "GfxInfoX11.h" + #endif +@@ -70,7 +70,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildWindow) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter) +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIdleServiceGTK, nsIdleServiceGTK::GetInstance) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper) + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsClipboard, Init) +@@ -112,7 +112,7 @@ nsNativeThemeGTKConstructor(nsISupports *aOuter, REFNSIID aIID, + return rv; + } + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + namespace mozilla { + namespace widget { + // This constructor should really be shared with all platforms. +@@ -202,7 +202,7 @@ NS_DEFINE_NAMED_CID(NS_APPLICATIONCHOOSER_CID); + #endif + NS_DEFINE_NAMED_CID(NS_SOUND_CID); + NS_DEFINE_NAMED_CID(NS_TRANSFERABLE_CID); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + NS_DEFINE_NAMED_CID(NS_CLIPBOARD_CID); + NS_DEFINE_NAMED_CID(NS_CLIPBOARDHELPER_CID); + NS_DEFINE_NAMED_CID(NS_DRAGSERVICE_CID); +@@ -219,7 +219,7 @@ NS_DEFINE_NAMED_CID(NS_DEVICE_CONTEXT_SPEC_CID); + NS_DEFINE_NAMED_CID(NS_PRINTDIALOGSERVICE_CID); + #endif + NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_CID); +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID); + NS_DEFINE_NAMED_CID(NS_GFXINFO_CID); + #endif +@@ -236,7 +236,7 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = { + #endif + { &kNS_SOUND_CID, false, nullptr, nsSoundConstructor, Module::MAIN_PROCESS_ONLY }, + { &kNS_TRANSFERABLE_CID, false, nullptr, nsTransferableConstructor }, +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardConstructor, Module::MAIN_PROCESS_ONLY }, + { &kNS_CLIPBOARDHELPER_CID, false, nullptr, nsClipboardHelperConstructor }, + { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor, Module::MAIN_PROCESS_ONLY }, +@@ -254,7 +254,7 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = { + { &kNS_PRINTDIALOGSERVICE_CID, false, nullptr, nsPrintDialogServiceGTKConstructor }, + #endif + { &kNS_IMAGE_TO_PIXBUF_CID, false, nullptr, nsImageToPixbufConstructor }, +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + { &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor }, + { &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor }, + #endif +@@ -272,7 +272,7 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = { + #endif + { "@mozilla.org/sound;1", &kNS_SOUND_CID, Module::MAIN_PROCESS_ONLY }, + { "@mozilla.org/widget/transferable;1", &kNS_TRANSFERABLE_CID }, +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { "@mozilla.org/widget/clipboard;1", &kNS_CLIPBOARD_CID, Module::MAIN_PROCESS_ONLY }, + { "@mozilla.org/widget/clipboardhelper;1", &kNS_CLIPBOARDHELPER_CID }, + { "@mozilla.org/widget/dragservice;1", &kNS_DRAGSERVICE_CID, Module::MAIN_PROCESS_ONLY }, +@@ -291,7 +291,7 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = { + { NS_PRINTDIALOGSERVICE_CONTRACTID, &kNS_PRINTDIALOGSERVICE_CID }, + #endif + { "@mozilla.org/widget/image-to-gdk-pixbuf;1", &kNS_IMAGE_TO_PIXBUF_CID }, +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + { "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID }, + { "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID }, + #endif +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index 3228425..ccc815c 100644 +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -116,7 +116,7 @@ using namespace mozilla::widget; + #include "mozilla/layers/CompositorBridgeParent.h" + #include "mozilla/layers/CompositorThread.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "X11CompositorWidget.h" + #include "gfxXlibSurface.h" + #include "WindowSurfaceX11Image.h" +@@ -131,6 +131,7 @@ using namespace mozilla::widget; + #include "NativeKeyBindings.h" + + #include ++#include + + #include "mozilla/layers/APZCTreeManager.h" + +@@ -238,7 +239,7 @@ static nsWindow* GetFirstNSWindowForGDKWindow (GdkWindow *aGdkWindow); + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static GdkFilterReturn popup_take_focus_filter (GdkXEvent *gdk_xevent, + GdkEvent *event, + gpointer data); +@@ -303,47 +304,20 @@ public: + + guint32 GetCurrentTime() const + { +- return gdk_x11_get_server_time(mWindow); ++ return g_get_monotonic_time()/1000; + } + + void GetTimeAsyncForPossibleBackwardsSkew(const TimeStamp& aNow) + { +- // Check for in-flight request +- if (!mAsyncUpdateStart.IsNull()) { +- return; +- } +- mAsyncUpdateStart = aNow; +- +- Display* xDisplay = GDK_WINDOW_XDISPLAY(mWindow); +- Window xWindow = GDK_WINDOW_XID(mWindow); +- unsigned char c = 'a'; +- Atom timeStampPropAtom = TimeStampPropAtom(); +- XChangeProperty(xDisplay, xWindow, timeStampPropAtom, +- timeStampPropAtom, 8, PropModeReplace, &c, 1); +- XFlush(xDisplay); + } + + gboolean PropertyNotifyHandler(GtkWidget* aWidget, + GdkEventProperty* aEvent) + { +- if (aEvent->atom != +- gdk_x11_xatom_to_atom(TimeStampPropAtom())) { +- return FALSE; +- } +- +- guint32 eventTime = aEvent->time; +- TimeStamp lowerBound = mAsyncUpdateStart; +- +- TimeConverter().CompensateForBackwardsSkew(eventTime, lowerBound); +- mAsyncUpdateStart = TimeStamp(); +- return TRUE; ++ return FALSE; + } + + private: +- static Atom TimeStampPropAtom() { +- return gdk_x11_get_xatom_by_name_for_display( +- gdk_display_get_default(), "GDK_TIMESTAMP_PROP"); +- } + + // This is safe because this class is stored as a member of mWindow and + // won't outlive it. +@@ -435,7 +409,7 @@ nsWindow::nsWindow() + mHandleTouchEvent = false; + #endif + mIsDragPopup = false; +- mIsX11Display = GDK_IS_X11_DISPLAY(gdk_display_get_default()); ++ mIsX11Display = false; + + mContainer = nullptr; + mGdkWindow = nullptr; +@@ -449,7 +423,7 @@ nsWindow::nsWindow() + mLastSizeMode = nsSizeMode_Normal; + mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + mOldFocusWindow = 0; + + mXDisplay = nullptr; +@@ -742,10 +716,6 @@ nsWindow::Destroy() + } + + // dragService will be null after shutdown of the service manager. +- nsDragService *dragService = nsDragService::GetInstance(); +- if (dragService && this == dragService->GetMostRecentDestWindow()) { +- dragService->ScheduleLeaveEvent(); +- } + + NativeShow(false); + +@@ -1376,14 +1346,7 @@ nsWindow::GetLastUserInputTime() + // drags, WM_DELETE_WINDOW delete events, but not usually mouse motion nor + // button and key releases. Therefore use the most recent of + // gdk_x11_display_get_user_time and the last time that we have seen. +- guint32 timestamp = +- gdk_x11_display_get_user_time(gdk_display_get_default()); +- if (sLastUserInputTime != GDK_CURRENT_TIME && +- TimestampIsNewerThan(sLastUserInputTime, timestamp)) { +- return sLastUserInputTime; +- } +- +- return timestamp; ++ return sLastUserInputTime; + } + + NS_IMETHODIMP +@@ -1526,41 +1489,7 @@ nsWindow::UpdateClientOffset() + { + PROFILER_LABEL("nsWindow", "UpdateClientOffset", js::ProfileEntry::Category::GRAPHICS); + +- if (!mIsTopLevel || !mShell || !mGdkWindow || !mIsX11Display || +- gtk_window_get_window_type(GTK_WINDOW(mShell)) == GTK_WINDOW_POPUP) { +- mClientOffset = nsIntPoint(0, 0); +- return; +- } +- +- GdkAtom cardinal_atom = gdk_x11_xatom_to_atom(XA_CARDINAL); +- +- GdkAtom type_returned; +- int format_returned; +- int length_returned; +- long *frame_extents; +- +- if (!gdk_property_get(mGdkWindow, +- gdk_atom_intern ("_NET_FRAME_EXTENTS", FALSE), +- cardinal_atom, +- 0, // offset +- 4*4, // length +- FALSE, // delete +- &type_returned, +- &format_returned, +- &length_returned, +- (guchar **) &frame_extents) || +- length_returned/sizeof(glong) != 4) { +- mClientOffset = nsIntPoint(0, 0); +- return; +- } +- +- // data returned is in the order left, right, top, bottom +- int32_t left = int32_t(frame_extents[0]); +- int32_t top = int32_t(frame_extents[2]); +- +- g_free(frame_extents); +- +- mClientOffset = nsIntPoint(left, top); ++ return; + } + + LayoutDeviceIntPoint +@@ -1721,7 +1650,7 @@ nsWindow::GetNativeData(uint32_t aDataType) + return (void*)mPluginNativeWindow->window; + + case NS_NATIVE_DISPLAY: { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + GdkDisplay* gdkDisplay = gdk_display_get_default(); + if (GDK_IS_X11_DISPLAY(gdkDisplay)) { + return GDK_DISPLAY_XDISPLAY(gdkDisplay); +@@ -1733,7 +1662,7 @@ nsWindow::GetNativeData(uint32_t aDataType) + return GetToplevelWidget(); + + case NS_NATIVE_SHAREABLE_WINDOW: +- return (void *) GDK_WINDOW_XID(gdk_window_get_toplevel(mGdkWindow)); ++ return (void *) NULL; + case NS_NATIVE_PLUGIN_OBJECT_PTR: + return (void *) mPluginNativeWindow; + case NS_RAW_NATIVE_IME_CONTEXT: { +@@ -1949,7 +1878,7 @@ nsWindow::HasPendingInputEvent() + // anything except expose events. Reordering expose and others should be + // ok, hopefully. + bool haveEvent = false; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent ev; + if (mIsX11Display) { + Display *display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +@@ -1984,7 +1913,7 @@ nsWindow::HasPendingInputEvent() + #define WANT_PAINT_FLASHING \ + (debug_WantPaintFlashing() && CAPS_LOCK_IS_ON) + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static void + gdk_window_flash(GdkWindow * aGdkWindow, + unsigned int aTimes, +@@ -2167,10 +2096,6 @@ nsWindow::OnExposeEvent(cairo_t *cr) + clientLayers->SetNeedsComposite(false); + } + +- LOGDRAW(("sending expose event [%p] %p 0x%lx (rects follow):\n", +- (void *)this, (void *)mGdkWindow, +- gdk_x11_window_get_xid(mGdkWindow))); +- + // Our bounds may have changed after calling WillPaintWindow. Clip + // to the new bounds here. The region is relative to this + // window. +@@ -2490,7 +2415,7 @@ nsWindow::OnSizeAllocate(GtkAllocation *aAllocation) + + mBounds.SizeTo(size); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + if (mCompositorWidgetDelegate) { + mCompositorWidgetDelegate->NotifyClientSizeChanged(GetClientSize()); +@@ -2604,7 +2529,7 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent) + // XXXldb Why skip every other motion event when we have multiple, + // but not more than that? + bool synthEvent = false; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent xevent; + + if (mIsX11Display) { +@@ -2640,7 +2565,7 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent) + + guint modifierState; + if (synthEvent) { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + event.mRefPoint.x = nscoord(xevent.xmotion.x); + event.mRefPoint.y = nscoord(xevent.xmotion.y); + +@@ -3430,9 +3355,6 @@ nsWindow::OnDragDataReceivedEvent(GtkWidget *aWidget, + { + LOGDRAG(("nsWindow::OnDragDataReceived(%p)\n", (void*)this)); + +- nsDragService::GetInstance()-> +- TargetDataReceived(aWidget, aDragContext, aX, aY, +- aSelectionData, aInfo, aTime); + } + + #if GTK_CHECK_VERSION(3,4,0) +@@ -3696,7 +3618,7 @@ nsWindow::Create(nsIWidget* aParent, + // WM_HINTS input field is set to False to tell the window + // manager not to set input focus to this window ... + gtk_window_set_accept_focus(GTK_WINDOW(mShell), FALSE); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // ... but when the window manager offers focus through + // WM_TAKE_FOCUS, focus is requested on the parent window. + gtk_widget_realize(mShell); +@@ -3975,9 +3897,6 @@ nsWindow::Create(nsIWidget* aParent, + + LOG(("nsWindow [%p]\n", (void *)this)); + if (mShell) { +- LOG(("\tmShell %p mContainer %p mGdkWindow %p 0x%lx\n", +- mShell, mContainer, mGdkWindow, +- gdk_x11_window_get_xid(mGdkWindow))); + } else if (mContainer) { + LOG(("\tmContainer %p mGdkWindow %p\n", mContainer, mGdkWindow)); + } +@@ -3990,7 +3909,7 @@ nsWindow::Create(nsIWidget* aParent, + if (!mIsTopLevel) + Resize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, false); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (mIsX11Display && mGdkWindow) { + mXDisplay = GDK_WINDOW_XDISPLAY(mGdkWindow); + mXWindow = gdk_x11_window_get_xid(mGdkWindow); +@@ -4039,7 +3958,7 @@ nsWindow::SetWindowClass(const nsAString &xulWinType) + + gdk_window_set_role(mGdkWindow, role); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (mIsX11Display) { + XClassHint *class_hint = XAllocClassHint(); + if (!class_hint) { +@@ -4101,7 +4020,7 @@ nsWindow::NativeResize() + gdk_window_resize(mGdkWindow, size.width, size.height); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + // This is different than OnSizeAllocate to catch initial sizing + if (mCompositorWidgetDelegate) { +@@ -4157,7 +4076,7 @@ nsWindow::NativeMoveResize() + topLeft.x, topLeft.y, size.width, size.height); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + // This is different than OnSizeAllocate to catch initial sizing + if (mCompositorWidgetDelegate) { +@@ -4548,7 +4467,7 @@ void UpdateMaskBits(gchar* aMaskBits, int32_t aMaskWidth, int32_t aMaskHeight, + void + nsWindow::ApplyTransparencyBitmap() + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // We use X11 calls where possible, because GDK handles expose events + // for shaped windows in a way that's incompatible with us (Bug 635903). + // It doesn't occur when the shapes are set through X. +@@ -4584,9 +4503,6 @@ nsWindow::ApplyTransparencyBitmap() + if (!maskBitmap) + return; + +- cairo_region_t * maskRegion = gdk_cairo_region_create_from_surface(maskBitmap); +- gtk_widget_shape_combine_region(mShell, maskRegion); +- cairo_region_destroy(maskRegion); + cairo_surface_destroy(maskBitmap); + #endif // MOZ_WIDGET_GTK == 2 + #endif // MOZ_X11 +@@ -4606,7 +4522,7 @@ nsWindow::ClearTransparencyBitmap() + if (!mShell) + return; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (!mGdkWindow) + return; + +@@ -4771,31 +4687,7 @@ nsWindow::SetUrgencyHint(GtkWidget *top_window, bool state) + void * + nsWindow::SetupPluginPort(void) + { +- if (!mGdkWindow) +- return nullptr; +- +- if (gdk_window_is_destroyed(mGdkWindow) == TRUE) +- return nullptr; +- +- Window window = gdk_x11_window_get_xid(mGdkWindow); +- +- // we have to flush the X queue here so that any plugins that +- // might be running on separate X connections will be able to use +- // this window in case it was just created +-#ifdef MOZ_X11 +- XWindowAttributes xattrs; +- Display *display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +- XGetWindowAttributes(display, window, &xattrs); +- XSelectInput (display, window, +- xattrs.your_event_mask | +- SubstructureNotifyMask); +- +- gdk_window_add_filter(mGdkWindow, plugin_window_filter_func, this); +- +- XSync(display, False); +-#endif /* MOZ_X11 */ +- +- return (void *)window; ++ return nullptr; + } + + void +@@ -4810,66 +4702,10 @@ nsWindow::SetPluginType(PluginType aPluginType) + mPluginType = aPluginType; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void + nsWindow::SetNonXEmbedPluginFocus() + { +- if (gPluginFocusWindow == this || mPluginType!=PluginType_NONXEMBED) { +- return; +- } +- +- if (gPluginFocusWindow) { +- RefPtr kungFuDeathGrip = gPluginFocusWindow; +- gPluginFocusWindow->LoseNonXEmbedPluginFocus(); +- } +- +- LOGFOCUS(("nsWindow::SetNonXEmbedPluginFocus\n")); +- +- Window curFocusWindow; +- int focusState; +- +- GdkDisplay *gdkDisplay = gdk_window_get_display(mGdkWindow); +- XGetInputFocus(gdk_x11_display_get_xdisplay(gdkDisplay), +- &curFocusWindow, +- &focusState); +- +- LOGFOCUS(("\t curFocusWindow=%p\n", curFocusWindow)); +- +- GdkWindow* toplevel = gdk_window_get_toplevel(mGdkWindow); +-#if (MOZ_WIDGET_GTK == 2) +- GdkWindow *gdkfocuswin = gdk_window_lookup(curFocusWindow); +-#else +- GdkWindow *gdkfocuswin = gdk_x11_window_lookup_for_display(gdkDisplay, +- curFocusWindow); +-#endif +- +- // lookup with the focus proxy window is supposed to get the +- // same GdkWindow as toplevel. If the current focused window +- // is not the focus proxy, we return without any change. +- if (gdkfocuswin != toplevel) { +- return; +- } +- +- // switch the focus from the focus proxy to the plugin window +- mOldFocusWindow = curFocusWindow; +- XRaiseWindow(GDK_WINDOW_XDISPLAY(mGdkWindow), +- gdk_x11_window_get_xid(mGdkWindow)); +- gdk_error_trap_push(); +- XSetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- gdk_x11_window_get_xid(mGdkWindow), +- RevertToNone, +- CurrentTime); +- gdk_flush(); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif +- gPluginFocusWindow = this; +- gdk_window_add_filter(nullptr, plugin_client_message_filter, this); +- +- LOGFOCUS(("nsWindow::SetNonXEmbedPluginFocus oldfocus=%p new=%p\n", +- mOldFocusWindow, gdk_x11_window_get_xid(mGdkWindow))); + } + + void +@@ -4877,44 +4713,6 @@ nsWindow::LoseNonXEmbedPluginFocus() + { + LOGFOCUS(("nsWindow::LoseNonXEmbedPluginFocus\n")); + +- // This method is only for the nsWindow which contains a +- // Non-XEmbed plugin, for example, JAVA plugin. +- if (gPluginFocusWindow != this || mPluginType!=PluginType_NONXEMBED) { +- return; +- } +- +- Window curFocusWindow; +- int focusState; +- +- XGetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- &curFocusWindow, +- &focusState); +- +- // we only switch focus between plugin window and focus proxy. If the +- // current focused window is not the plugin window, just removing the +- // event filter that blocks the WM_TAKE_FOCUS is enough. WM and gtk2 +- // will take care of the focus later. +- if (!curFocusWindow || +- curFocusWindow == gdk_x11_window_get_xid(mGdkWindow)) { +- +- gdk_error_trap_push(); +- XRaiseWindow(GDK_WINDOW_XDISPLAY(mGdkWindow), +- mOldFocusWindow); +- XSetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- mOldFocusWindow, +- RevertToParent, +- CurrentTime); +- gdk_flush(); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif +- } +- gPluginFocusWindow = nullptr; +- mOldFocusWindow = 0; +- gdk_window_remove_filter(nullptr, plugin_client_message_filter, this); +- + LOGFOCUS(("nsWindow::LoseNonXEmbedPluginFocus end\n")); + } + #endif /* MOZ_X11 */ +@@ -5067,7 +4865,7 @@ nsWindow::PerformFullscreenTransition(FullscreenTransitionStage aStage, + static bool + IsFullscreenSupported(GtkWidget* aShell) + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + GdkScreen* screen = gtk_widget_get_screen(aShell); + GdkAtom atom = gdk_atom_intern("_NET_WM_STATE_FULLSCREEN", FALSE); + if (!gdk_x11_screen_supports_net_wm_hint(screen, atom)) { +@@ -5146,7 +4944,7 @@ nsWindow::HideWindowChrome(bool aShouldHide) + // and flush the queue here so that we don't end up with a BadWindow + // error later when this happens (when the persistence timer fires + // and GetWindowPos is called) +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XSync(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()) , False); + #else + gdk_flush (); +@@ -5751,7 +5549,7 @@ focus_out_event_cb(GtkWidget *widget, GdkEventFocus *event) + return FALSE; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // For long-lived popup windows that don't really take focus themselves but + // may have elements that accept keyboard input when the parent window is + // active, focus is handled specially. These windows include noautohide +@@ -5933,7 +5731,7 @@ key_press_event_cb(GtkWidget *widget, GdkEventKey *event) + + RefPtr focusWindow = gFocusWindow ? gFocusWindow : window; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Keyboard repeat can cause key press events to queue up when there are + // slow event handlers (bug 301029). Throttle these events by removing + // consecutive pending duplicate KeyPress events to the same window. +@@ -6136,30 +5934,7 @@ drag_motion_event_cb(GtkWidget *aWidget, + guint aTime, + gpointer aData) + { +- RefPtr window = get_window_for_gtk_widget(aWidget); +- if (!window) +- return FALSE; +- +- // figure out which internal widget this drag motion actually happened on +- nscoord retx = 0; +- nscoord rety = 0; +- +- GdkWindow *innerWindow = +- get_inner_gdk_window(gtk_widget_get_window(aWidget), aX, aY, +- &retx, &rety); +- RefPtr innerMostWindow = get_window_for_gdk_window(innerWindow); +- +- if (!innerMostWindow) { +- innerMostWindow = window; +- } +- +- LOGDRAG(("nsWindow drag-motion signal for %p\n", (void*)innerMostWindow)); +- +- LayoutDeviceIntPoint point = window->GdkPointToDevicePixels({ retx, rety }); +- +- return nsDragService::GetInstance()-> +- ScheduleMotionEvent(innerMostWindow, aDragContext, +- point, aTime); ++ return FALSE; + } + + static void +@@ -6168,35 +5943,6 @@ drag_leave_event_cb(GtkWidget *aWidget, + guint aTime, + gpointer aData) + { +- RefPtr window = get_window_for_gtk_widget(aWidget); +- if (!window) +- return; +- +- nsDragService *dragService = nsDragService::GetInstance(); +- +- nsWindow *mostRecentDragWindow = dragService->GetMostRecentDestWindow(); +- if (!mostRecentDragWindow) { +- // This can happen when the target will not accept a drop. A GTK drag +- // source sends the leave message to the destination before the +- // drag-failed signal on the source widget, but the leave message goes +- // via the X server, and so doesn't get processed at least until the +- // event loop runs again. +- return; +- } +- +- GtkWidget *mozContainer = mostRecentDragWindow->GetMozContainerWidget(); +- if (aWidget != mozContainer) +- { +- // When the drag moves between widgets, GTK can send leave signal for +- // the old widget after the motion or drop signal for the new widget. +- // We'll send the leave event when the motion or drop event is run. +- return; +- } +- +- LOGDRAG(("nsWindow drag-leave signal for %p\n", +- (void*)mostRecentDragWindow)); +- +- dragService->ScheduleLeaveEvent(); + } + + +@@ -6208,30 +5954,7 @@ drag_drop_event_cb(GtkWidget *aWidget, + guint aTime, + gpointer aData) + { +- RefPtr window = get_window_for_gtk_widget(aWidget); +- if (!window) + return FALSE; +- +- // figure out which internal widget this drag motion actually happened on +- nscoord retx = 0; +- nscoord rety = 0; +- +- GdkWindow *innerWindow = +- get_inner_gdk_window(gtk_widget_get_window(aWidget), aX, aY, +- &retx, &rety); +- RefPtr innerMostWindow = get_window_for_gdk_window(innerWindow); +- +- if (!innerMostWindow) { +- innerMostWindow = window; +- } +- +- LOGDRAG(("nsWindow drag-drop signal for %p\n", (void*)innerMostWindow)); +- +- LayoutDeviceIntPoint point = window->GdkPointToDevicePixels({ retx, rety }); +- +- return nsDragService::GetInstance()-> +- ScheduleDropEvent(innerMostWindow, aDragContext, +- point, aTime); + } + + static void +@@ -6561,14 +6284,13 @@ nsWindow::GetDrawTargetForGdkDrawable(GdkDrawable* aDrawable, + already_AddRefed + nsWindow::StartRemoteDrawingInRegion(LayoutDeviceIntRegion& aInvalidRegion, BufferMode* aBufferMode) + { +- return mSurfaceProvider.StartRemoteDrawingInRegion(aInvalidRegion, aBufferMode); ++ return NULL; + } + + void + nsWindow::EndRemoteDrawingInRegion(DrawTarget* aDrawTarget, + LayoutDeviceIntRegion& aInvalidRegion) + { +- mSurfaceProvider.EndRemoteDrawingInRegion(aDrawTarget, aInvalidRegion); + } + + // Code shared begin BeginMoveDrag and BeginResizeDrag +@@ -7007,7 +6729,7 @@ nsWindow::RoundsWidgetCoordinatesTo() + + void nsWindow::GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInitData* aInitData) + { +- #ifdef MOZ_X11 ++ #ifdef MOZ_X11_no + *aInitData = mozilla::widget::CompositorWidgetInitData( + mXWindow, + nsCString(XDisplayString(mXDisplay)), +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +index d45b84d..dfbae6f 100644 +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -20,12 +20,12 @@ + #include + #include + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif /* MOZ_X11 */ + + #include "mozilla/widget/WindowSurface.h" +-#include "mozilla/widget/WindowSurfaceProvider.h" ++//#include "mozilla/widget/WindowSurfaceProvider.h" + + #ifdef ACCESSIBILITY + #include "mozilla/a11y/Accessible.h" +@@ -243,7 +243,7 @@ public: + }; + + void SetPluginType(PluginType aPluginType); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void SetNonXEmbedPluginFocus(void); + void LoseNonXEmbedPluginFocus(void); + #endif /* MOZ_X11 */ +@@ -252,7 +252,7 @@ public: + void OnDPIChanged(void); + void OnCheckResize(void); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Window mOldFocusWindow; + #endif /* MOZ_X11 */ + +@@ -346,7 +346,7 @@ public: + nsIObserver* aObserver) override; + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Display* XDisplay() { return mXDisplay; } + #endif + virtual void GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInitData* aInitData) override; +@@ -456,7 +456,7 @@ private: + nsRefPtrHashtable, mozilla::dom::Touch> mTouches; + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Display* mXDisplay; + Window mXWindow; + Visual* mXVisual; +diff --git a/widget/x11/keysym2ucs.h b/widget/x11/keysym2ucs.h +index d3c49a6..b3db16d 100644 +--- a/widget/x11/keysym2ucs.h ++++ b/widget/x11/keysym2ucs.h +@@ -11,7 +11,7 @@ + * (UCS, Unicode) values. + */ + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #else + #define KeySym unsigned int diff --git a/patches/www-client/firefox-51.0.1/big-no-x13.patch b/patches/www-client/firefox-51.0.1/big-no-x13.patch new file mode 100644 index 0000000..980246e --- /dev/null +++ b/patches/www-client/firefox-51.0.1/big-no-x13.patch @@ -0,0 +1,80 @@ +diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp +index 06379d2..282e4a3 100644 +--- a/dom/plugins/ipc/PluginModuleChild.cpp ++++ b/dom/plugins/ipc/PluginModuleChild.cpp +@@ -543,6 +543,17 @@ PluginModuleChild::ExitedCxxStack() + mNestedLoopTimerId = 0; + } + ++#else ++void ++PluginModuleChild::EnteredCxxStack() ++{ ++} ++ ++void ++PluginModuleChild::ExitedCxxStack() ++{ ++} ++ + #endif + + bool +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index 840e35a..a5fcc77 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -878,6 +878,7 @@ gfxPlatformGtk::CreateHardwareVsyncSource() + } + return gfxPlatform::CreateHardwareVsyncSource(); + } ++#endif + + bool + gfxPlatformGtk::SupportsApzTouchInput() const +@@ -886,4 +887,3 @@ gfxPlatformGtk::SupportsApzTouchInput() const + return value == 1 || value == 2; + } + +-#endif +diff --git a/widget/InProcessCompositorWidget.cpp b/widget/InProcessCompositorWidget.cpp +index 3531b7f..c01144f 100644 +--- a/widget/InProcessCompositorWidget.cpp ++++ b/widget/InProcessCompositorWidget.cpp +@@ -10,7 +10,7 @@ namespace widget { + + // Platforms with no OOP compositor process support use + // InProcessCompositorWidget by default. +-#if !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + /* static */ RefPtr + CompositorWidget::CreateLocal(const CompositorWidgetInitData& aInitData, nsIWidget* aWidget) + { +diff --git a/widget/moz.build b/widget/moz.build +index 51c8a09..275bf1b 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -205,15 +205,15 @@ if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']: + + EXPORTS.ipc = ['nsGUIEventIPC.h'] + +-if CONFIG['MOZ_X11_no']: ++if CONFIG['MOZ_X11']: + DIRS += ['x11'] +- UNIFIED_SOURCES += [ +- 'GfxInfoX11.cpp' +- ] +- SOURCES += [ +- 'nsShmImage.cpp', +- 'WindowSurfaceX11SHM.cpp', +- ] ++ #UNIFIED_SOURCES += [ ++ # 'GfxInfoX11.cpp' ++ #] ++ #SOURCES += [ ++ # 'nsShmImage.cpp', ++ # 'WindowSurfaceX11SHM.cpp', ++ #] + + if toolkit in ('cocoa', 'windows'): + UNIFIED_SOURCES += [ diff --git a/patches/www-client/firefox-51.0.1/configure-no-cairo-tee.patch b/patches/www-client/firefox-51.0.1/configure-no-cairo-tee.patch new file mode 100644 index 0000000..74ee3fb --- /dev/null +++ b/patches/www-client/firefox-51.0.1/configure-no-cairo-tee.patch @@ -0,0 +1,18 @@ +diff --git a/old-configure.in b/old-configure.in +index 0dd0ba0..1f15268 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -5375,13 +5375,6 @@ else + PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION) + MOZ_CAIRO_CFLAGS="$CAIRO_CFLAGS" + MOZ_CAIRO_LIBS="$CAIRO_LIBS" +- PKG_CHECK_MODULES(CAIRO_TEE, cairo-tee >= $CAIRO_VERSION) +- if test "$MOZ_X11"; then +- PKG_CHECK_MODULES(CAIRO_XRENDER, cairo-xlib-xrender >= $CAIRO_VERSION) +- MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS" +- MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_LIBS" +- MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS" +- fi + fi + + case "$MOZ_WIDGET_TOOLKIT" in diff --git a/patches/www-client/firefox-51.0.1/configure-nogtk2.patch b/patches/www-client/firefox-51.0.1/configure-nogtk2.patch new file mode 100644 index 0000000..8f3a45a --- /dev/null +++ b/patches/www-client/firefox-51.0.1/configure-nogtk2.patch @@ -0,0 +1,13 @@ +diff --git a/old-configure.in b/old-configure.in +index ee1bd35..1531f85 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -2556,8 +2556,6 @@ if test "$COMPILE_ENVIRONMENT"; then + AC_DEFINE_UNQUOTED(GLIB_VERSION_MIN_REQUIRED,$GLIB_VERSION_MIN_REQUIRED) + AC_DEFINE_UNQUOTED(GLIB_VERSION_MAX_ALLOWED,$GLIB_VERSION_MAX_ALLOWED) + +- PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES) +- MOZ_GTK2_CFLAGS="-I${_topsrcdir}/widget/gtk/compat $MOZ_GTK2_CFLAGS" + fi + if test "$MOZ_WIDGET_TOOLKIT" = gtk2; then + TK_CFLAGS=$MOZ_GTK2_CFLAGS diff --git a/patches/www-client/firefox-51.0.1/configure-nox11-libs.patch b/patches/www-client/firefox-51.0.1/configure-nox11-libs.patch new file mode 100644 index 0000000..c8f96ba --- /dev/null +++ b/patches/www-client/firefox-51.0.1/configure-nox11-libs.patch @@ -0,0 +1,13 @@ +diff --git a/old-configure.in b/old-configure.in +index 1f15268..e0dfd09 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -2939,7 +2939,7 @@ dnl enable once PeerConnection lands + AC_DEFINE(MOZ_SCTP) + AC_DEFINE(MOZ_SRTP) + if test -n "$MOZ_X11"; then +- MOZ_WEBRTC_X11_LIBS="-lXext -lXdamage -lXfixes -lXcomposite" ++ MOZ_WEBRTC_X11_LIBS="" + fi + else + MOZ_SYNTH_PICO= diff --git a/patches/www-client/firefox-51.0.1/configure-nox11.patch b/patches/www-client/firefox-51.0.1/configure-nox11.patch new file mode 100644 index 0000000..4b2618d --- /dev/null +++ b/patches/www-client/firefox-51.0.1/configure-nox11.patch @@ -0,0 +1,13 @@ +diff --git a/old-configure.in b/old-configure.in +index 1531f85..0dd0ba0 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -5930,7 +5930,7 @@ if test -n "$COMPILE_ENVIRONMENT"; then + AC_CHECK_FUNCS(posix_fadvise posix_fallocate) + + dnl Check for missing components +-if test "$MOZ_X11"; then ++if test "$MOZ_X11_no"; then + dnl ==================================================== + dnl = Check if X headers exist + dnl ==================================================== diff --git a/patches/www-client/firefox-51.0.1/gtkxtbin-gtk2only.patch b/patches/www-client/firefox-51.0.1/gtkxtbin-gtk2only.patch new file mode 100644 index 0000000..ef869de --- /dev/null +++ b/patches/www-client/firefox-51.0.1/gtkxtbin-gtk2only.patch @@ -0,0 +1,108 @@ +diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp +index ec4acab..6f07de5 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.cpp ++++ b/dom/plugins/ipc/PluginInstanceChild.cpp +@@ -52,7 +52,9 @@ using namespace std; + #include + #include + #include ++#if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" ++#endif + + #elif defined(OS_WIN) + +@@ -152,7 +154,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface, + , mAsyncInvalidateTask(0) + , mCachedWindowActor(nullptr) + , mCachedElementActor(nullptr) +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + , mXEmbed(false) + #endif // MOZ_WIDGET_GTK + #if defined(OS_WIN) +@@ -201,7 +203,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface, + #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) + mWindow.ws_info = &mWsInfo; + memset(&mWsInfo, 0, sizeof(mWsInfo)); +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + mWsInfo.display = nullptr; + mXtClient.top_widget = nullptr; + #else +@@ -602,7 +604,7 @@ PluginInstanceChild::NPN_SetValue(NPPVariable aVar, void* aValue) + return NPERR_GENERIC_ERROR; + + NPWindowType newWindowType = windowed ? NPWindowTypeWindow : NPWindowTypeDrawable; +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mWindow.type != newWindowType && mWsInfo.display) { + // plugin type has been changed but we already have a valid display + // so update it for the recent plugin mode +@@ -1165,7 +1167,7 @@ bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow) + aWindow.x, aWindow.y, + aWindow.width, aWindow.height)); + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXEmbed) { + mWindow.window = reinterpret_cast(aWindow.window); + } +@@ -1194,7 +1196,7 @@ void PluginInstanceChild::DeleteWindow() + if (!mWindow.window) + return; + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXtClient.top_widget) { + xt_client_unrealize(&mXtClient); + xt_client_destroy(&mXtClient); +@@ -1276,7 +1278,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + CreateWindow(aWindow); + } + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXEmbed && gtk_check_version(2,18,7) != nullptr) { // older + if (aWindow.type == NPWindowTypeWindow) { + GdkWindow* socket_window = gdk_window_lookup(static_cast(aWindow.window)); +@@ -1404,7 +1406,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + bool + PluginInstanceChild::Initialize() + { +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + NPError rv; + + if (mWsInfo.display) { +@@ -4615,7 +4617,7 @@ PluginInstanceChild::Destroy() + + mPendingAsyncCalls.Clear(); + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mWindow.type == NPWindowTypeWindow && !mXEmbed) { + xt_client_xloop_destroy(); + } +diff --git a/dom/plugins/ipc/PluginInstanceChild.h b/dom/plugins/ipc/PluginInstanceChild.h +index 80abea7..aa281bb 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.h ++++ b/dom/plugins/ipc/PluginInstanceChild.h +@@ -35,7 +35,7 @@ + + #include + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif + +@@ -454,7 +454,7 @@ private: + + #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) + NPSetWindowCallbackStruct mWsInfo; +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + bool mXEmbed; + XtClient mXtClient; + #endif diff --git a/patches/www-client/firefox-51.0.1/mozbuild-nogtk2.patch b/patches/www-client/firefox-51.0.1/mozbuild-nogtk2.patch new file mode 100644 index 0000000..16b65ad --- /dev/null +++ b/patches/www-client/firefox-51.0.1/mozbuild-nogtk2.patch @@ -0,0 +1,10 @@ +diff --git a/widget/gtk/mozgtk/moz.build b/widget/gtk/mozgtk/moz.build +index 528e2e9..d32ee82 100644 +--- a/widget/gtk/mozgtk/moz.build ++++ b/widget/gtk/mozgtk/moz.build +@@ -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'] diff --git a/patches/www-client/firefox-51.0.1/mozbuild-nogtkxtbin.patch b/patches/www-client/firefox-51.0.1/mozbuild-nogtkxtbin.patch new file mode 100644 index 0000000..5774940 --- /dev/null +++ b/patches/www-client/firefox-51.0.1/mozbuild-nogtkxtbin.patch @@ -0,0 +1,14 @@ +diff --git a/widget/moz.build b/widget/moz.build +index 86c72d8..2229668 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -52,9 +52,6 @@ TEST_DIRS += ['tests'] + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + DIRS += ['gtk'] + +- if CONFIG['MOZ_X11']: +- DIRS += ['gtkxtbin'] +- + XPIDL_SOURCES += [ + 'nsIAppShell.idl', + 'nsIBaseWindow.idl', diff --git a/patches/www-client/firefox-52.0.1/nogtk2-and-nox11-configure.patch b/patches/www-client/firefox-52.0.1/nogtk2-and-nox11-configure.patch new file mode 100644 index 0000000..a28c7b7 --- /dev/null +++ b/patches/www-client/firefox-52.0.1/nogtk2-and-nox11-configure.patch @@ -0,0 +1,177 @@ +diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp +index af9db91..2640fdd 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.cpp ++++ b/dom/plugins/ipc/PluginInstanceChild.cpp +@@ -52,7 +52,9 @@ using namespace std; + #include + #include + #include ++#if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" ++#endif + + #elif defined(OS_WIN) + +@@ -152,7 +154,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface, + , mAsyncInvalidateTask(0) + , mCachedWindowActor(nullptr) + , mCachedElementActor(nullptr) +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + , mXEmbed(false) + #endif // MOZ_WIDGET_GTK + #if defined(OS_WIN) +@@ -201,7 +203,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface, + #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) + mWindow.ws_info = &mWsInfo; + memset(&mWsInfo, 0, sizeof(mWsInfo)); +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + mWsInfo.display = nullptr; + mXtClient.top_widget = nullptr; + #else +@@ -607,7 +609,7 @@ PluginInstanceChild::NPN_SetValue(NPPVariable aVar, void* aValue) + return NPERR_GENERIC_ERROR; + + NPWindowType newWindowType = windowed ? NPWindowTypeWindow : NPWindowTypeDrawable; +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mWindow.type != newWindowType && mWsInfo.display) { + // plugin type has been changed but we already have a valid display + // so update it for the recent plugin mode +@@ -1199,7 +1201,7 @@ bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow) + aWindow.x, aWindow.y, + aWindow.width, aWindow.height)); + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXEmbed) { + mWindow.window = reinterpret_cast(aWindow.window); + } +@@ -1228,7 +1230,7 @@ void PluginInstanceChild::DeleteWindow() + if (!mWindow.window) + return; + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXtClient.top_widget) { + xt_client_unrealize(&mXtClient); + xt_client_destroy(&mXtClient); +@@ -1310,7 +1312,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + CreateWindow(aWindow); + } + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXEmbed && gtk_check_version(2,18,7) != nullptr) { // older + if (aWindow.type == NPWindowTypeWindow) { + GdkWindow* socket_window = gdk_window_lookup(static_cast(aWindow.window)); +@@ -1438,7 +1440,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + bool + PluginInstanceChild::Initialize() + { +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + NPError rv; + + if (mWsInfo.display) { +@@ -4649,7 +4651,7 @@ PluginInstanceChild::Destroy() + + mPendingAsyncCalls.Clear(); + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mWindow.type == NPWindowTypeWindow && !mXEmbed) { + xt_client_xloop_destroy(); + } +diff --git a/dom/plugins/ipc/PluginInstanceChild.h b/dom/plugins/ipc/PluginInstanceChild.h +index 0ad6e14..a3526ab 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.h ++++ b/dom/plugins/ipc/PluginInstanceChild.h +@@ -35,7 +35,7 @@ + + #include + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif + +@@ -458,7 +458,7 @@ private: + + #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) + NPSetWindowCallbackStruct mWsInfo; +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + bool mXEmbed; + XtClient mXtClient; + #endif +diff --git a/old-configure.in b/old-configure.in +index 68433b0..ab65dc4 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -2522,8 +2522,6 @@ if test "$COMPILE_ENVIRONMENT"; then + AC_DEFINE_UNQUOTED(GLIB_VERSION_MIN_REQUIRED,$GLIB_VERSION_MIN_REQUIRED) + AC_DEFINE_UNQUOTED(GLIB_VERSION_MAX_ALLOWED,$GLIB_VERSION_MAX_ALLOWED) + +- PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES) +- MOZ_GTK2_CFLAGS="-I${_topsrcdir}/widget/gtk/compat $MOZ_GTK2_CFLAGS" + fi + if test "$MOZ_WIDGET_TOOLKIT" = gtk2; then + TK_CFLAGS=$MOZ_GTK2_CFLAGS +@@ -2897,7 +2895,7 @@ dnl enable once PeerConnection lands + AC_DEFINE(MOZ_SCTP) + AC_DEFINE(MOZ_SRTP) + if test -n "$MOZ_X11"; then +- MOZ_WEBRTC_X11_LIBS="-lXext -lXdamage -lXfixes -lXcomposite" ++ MOZ_WEBRTC_X11_LIBS="" + fi + else + MOZ_SYNTH_PICO= +@@ -5154,13 +5152,8 @@ else + PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION) + MOZ_CAIRO_CFLAGS="$CAIRO_CFLAGS" + MOZ_CAIRO_LIBS="$CAIRO_LIBS" + PKG_CHECK_MODULES(CAIRO_TEE, cairo-tee >= $CAIRO_VERSION) +- if test "$MOZ_X11"; then +- PKG_CHECK_MODULES(CAIRO_XRENDER, cairo-xlib-xrender >= $CAIRO_VERSION) +- MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS" + MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_LIBS" +- MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS" +- fi + fi + + case "$MOZ_WIDGET_TOOLKIT" in +@@ -5705,7 +5696,7 @@ if test -n "$COMPILE_ENVIRONMENT"; then + AC_CHECK_FUNCS(posix_fadvise posix_fallocate) + + dnl Check for missing components +-if test "$MOZ_X11"; then ++if test "$MOZ_X11_no"; then + dnl ==================================================== + dnl = Check if X headers exist + dnl ==================================================== +diff --git a/widget/gtk/mozgtk/moz.build b/widget/gtk/mozgtk/moz.build +index 528e2e9..d32ee82 100644 +--- a/widget/gtk/mozgtk/moz.build ++++ b/widget/gtk/mozgtk/moz.build +@@ -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'] +diff --git a/widget/moz.build b/widget/moz.build +index 0919217..f2f2f2e 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -52,9 +52,6 @@ TEST_DIRS += ['tests'] + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + DIRS += ['gtk'] + +- if CONFIG['MOZ_X11']: +- DIRS += ['gtkxtbin'] +- + XPIDL_SOURCES += [ + 'nsIAppShell.idl', + 'nsIBaseWindow.idl', diff --git a/patches/www-client/firefox-52.0.1/stransky-wayland.patch b/patches/www-client/firefox-52.0.1/stransky-wayland.patch new file mode 100644 index 0000000..7f20e9a --- /dev/null +++ b/patches/www-client/firefox-52.0.1/stransky-wayland.patch @@ -0,0 +1,4233 @@ +diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in +index a57879d..b6478f6 100644 +--- a/browser/installer/package-manifest.in ++++ b/browser/installer/package-manifest.in +@@ -107,6 +107,9 @@ + #ifdef MOZ_GTK3 + @BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@ + @BINPATH@/gtk2/@DLL_PREFIX@mozgtk@DLL_SUFFIX@ ++#ifdef MOZ_WAYLAND ++@BINPATH@/@DLL_PREFIX@mozwayland@DLL_SUFFIX@ ++#endif + #endif + + [browser] +diff --git a/config/system-headers b/config/system-headers +index e6374bd..73a2045 100644 +--- a/config/system-headers ++++ b/config/system-headers +@@ -489,6 +489,7 @@ gdk/gdkkeysyms.h + gdk/gdkprivate.h + gdk/gdkx.h + gdk/gdkdirectfb.h ++gdk/gdkwayland.h + gdk-pixbuf/gdk-pixbuf.h + Gestalt.h + getopt.h +diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp +index 8a26550..22ff711 100644 +--- a/dom/ipc/ContentChild.cpp ++++ b/dom/ipc/ContentChild.cpp +@@ -524,6 +524,44 @@ NS_INTERFACE_MAP_BEGIN(ContentChild) + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentChild) + NS_INTERFACE_MAP_END + ++#ifdef MOZ_WIDGET_GTK ++// We need to keep in sync whith the same detection routine at nsAppRunner.cpp ++static char* detectDisplay(void) ++{ ++ bool tryX11 = false; ++ bool tryWayland = false; ++ bool tryBroadway = false; ++ ++ // Honor user backend selection ++ char *backend = PR_GetEnv("GDK_BACKEND"); ++ if (!backend || strstr(backend, "*")) { ++ // Try all backends ++ tryX11 = true; ++ tryWayland = true; ++ tryBroadway = true; ++ } else if (backend) { ++ if (strstr(backend, "x11")) ++ tryX11 = true; ++ if (strstr(backend, "wayland")) ++ tryWayland = true; ++ if (strstr(backend, "broadway")) ++ tryBroadway = true; ++ } ++ ++ char *display_name; ++ if (tryX11 && (display_name = PR_GetEnv("DISPLAY"))) { ++ return display_name; ++ } else if (tryWayland && (display_name = PR_GetEnv("WAYLAND_DISPLAY"))) { ++ return display_name; ++ } else if (tryBroadway && (display_name = PR_GetEnv("BROADWAY_DISPLAY"))) { ++ return display_name; ++ } ++ ++ MOZ_ASSERT(display_name); ++ return nullptr; ++} ++#endif ++ + bool + ContentChild::Init(MessageLoop* aIOLoop, + base::ProcessId aParentPid, +@@ -535,7 +573,7 @@ ContentChild::Init(MessageLoop* aIOLoop, + // to use, and when starting under XWayland, it may choose to start with + // the wayland backend instead of the x11 backend. + // The DISPLAY environment variable is normally set by the parent process. +- char* display_name = PR_GetEnv("DISPLAY"); ++ char* display_name = detectDisplay(); + if (display_name) { + int argc = 3; + char option_name[] = "--display"; +diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp +index 9a1157f..09eb82a 100644 +--- a/gfx/gl/GLContextProviderGLX.cpp ++++ b/gfx/gl/GLContextProviderGLX.cpp +@@ -67,6 +67,8 @@ HasExtension(const char* aExtensions, const char* aRequiredExtension) + bool + GLXLibrary::EnsureInitialized() + { ++ return false; ++ + if (mInitialized) { + return true; + } +diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp +index 4b82e80..b6e9167 100644 +--- a/gfx/thebes/gfxFcPlatformFontList.cpp ++++ b/gfx/thebes/gfxFcPlatformFontList.cpp +@@ -772,12 +772,14 @@ PreparePattern(FcPattern* aPattern, bool aIsPrinterFont) + #endif + + #ifdef MOZ_X11 +- FcValue value; +- int lcdfilter; +- if (FcPatternGet(aPattern, FC_LCD_FILTER, 0, &value) +- == FcResultNoMatch && +- GetXftInt(DefaultXDisplay(), "lcdfilter", &lcdfilter)) { +- FcPatternAddInteger(aPattern, FC_LCD_FILTER, lcdfilter); ++ if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { ++ FcValue value; ++ int lcdfilter; ++ if (FcPatternGet(aPattern, FC_LCD_FILTER, 0, &value) ++ == FcResultNoMatch && ++ GetXftInt(DefaultXDisplay(), "lcdfilter", &lcdfilter)) { ++ FcPatternAddInteger(aPattern, FC_LCD_FILTER, lcdfilter); ++ } + } + #endif + } +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index 9d7f512..5a5f7e3 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -105,14 +105,23 @@ gfxPlatformGtk::gfxPlatformGtk() + InitBackendPrefs(canvasMask, BackendType::CAIRO, + contentMask, BackendType::CAIRO); + +-#ifdef MOZ_X11 +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { +- mCompositorDisplay = XOpenDisplay(nullptr); +- MOZ_ASSERT(mCompositorDisplay, "Failed to create compositor display!"); +- } else { +- mCompositorDisplay = nullptr; ++#if defined(MOZ_X11) ++ mXCompositorDisplay = nullptr; ++ mWaylandCompositorDisplay = nullptr; ++ ++ GdkDisplay *gdkDisplay = gdk_display_get_default(); ++ mIsX11Display = GDK_IS_X11_DISPLAY(gdkDisplay); ++ if (mIsX11Display) { ++ mXCompositorDisplay = XOpenDisplay(nullptr); ++ MOZ_ASSERT(mXCompositorDisplay, "Failed to create compositor display!"); + } +-#endif // MOZ_X11 ++#if defined(GDK_WINDOWING_WAYLAND) ++ else { ++ mWaylandCompositorDisplay = wl_display_connect(nullptr); ++ MOZ_ASSERT(mWaylandCompositorDisplay, "Failed to create compositor display!"); ++ } ++#endif ++#endif // defined(MOZ_X11) + } + + gfxPlatformGtk::~gfxPlatformGtk() +@@ -123,11 +132,16 @@ gfxPlatformGtk::~gfxPlatformGtk() + gfxPangoFontGroup::Shutdown(); + } + +-#ifdef MOZ_X11 +- if (mCompositorDisplay) { +- XCloseDisplay(mCompositorDisplay); ++#if defined(MOZ_X11) ++ if (mIsX11Display) { ++ XCloseDisplay(mXCompositorDisplay); ++ } ++#if defined(GDK_WINDOWING_WAYLAND) ++ else { ++ wl_display_disconnect(mWaylandCompositorDisplay); + } +-#endif // MOZ_X11 ++#endif ++#endif + } + + void +diff --git a/mozglue/misc/TimeStamp.h b/mozglue/misc/TimeStamp.h +index a1a0eb3..2440bdc 100644 +--- a/mozglue/misc/TimeStamp.h ++++ b/mozglue/misc/TimeStamp.h +@@ -405,9 +405,11 @@ public: + * on platforms that support vsync aligned refresh drivers / compositors + * Verified true as of Jan 31, 2015: B2G and OS X + * False on Windows 7 ++ * Wayland/GTK event time also uses CLOCK_MONOTONIC. + * UNTESTED ON OTHER PLATFORMS + */ +-#if defined(MOZ_WIDGET_GONK) || defined(XP_DARWIN) ++#if defined(MOZ_WIDGET_GONK) || defined(XP_DARWIN) || \ ++ defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK) + static TimeStamp FromSystemTime(int64_t aSystemTime) + { + static_assert(sizeof(aSystemTime) == sizeof(TimeStampValue), +diff --git a/toolkit/components/remote/moz.build b/toolkit/components/remote/moz.build +index faa119e..50b13b7 100644 +--- a/toolkit/components/remote/moz.build ++++ b/toolkit/components/remote/moz.build +@@ -13,7 +13,6 @@ XPIDL_MODULE = 'toolkitremote' + SOURCES += [ + 'nsXRemoteService.cpp', + ] +- + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + SOURCES += [ + 'nsGTKRemoteService.cpp', +diff --git a/toolkit/components/remote/nsGTKRemoteService.cpp b/toolkit/components/remote/nsGTKRemoteService.cpp +index 860efe0..d72cf93 100644 +--- a/toolkit/components/remote/nsGTKRemoteService.cpp ++++ b/toolkit/components/remote/nsGTKRemoteService.cpp +@@ -20,11 +20,17 @@ + #include "nsIWidget.h" + #include "nsIAppShellService.h" + #include "nsAppShellCID.h" ++#include "nsPrintfCString.h" + + #include "nsCOMPtr.h" + + #include "nsGTKToolkit.h" + ++#ifdef ENABLE_REMOTE_DBUS ++#include ++#include ++#endif ++ + NS_IMPL_ISUPPORTS(nsGTKRemoteService, + nsIRemoteService, + nsIObserver) +@@ -37,14 +43,24 @@ nsGTKRemoteService::Startup(const char* aAppName, const char* aProfileName) + + if (mServerWindow) return NS_ERROR_ALREADY_INITIALIZED; + +- XRemoteBaseStartup(aAppName, aProfileName); +- + mServerWindow = gtk_invisible_new(); + gtk_widget_realize(mServerWindow); +- HandleCommandsFor(mServerWindow, nullptr); + +- for (auto iter = mWindows.Iter(); !iter.Done(); iter.Next()) { +- HandleCommandsFor(iter.Key(), iter.UserData()); ++ mIsX11Display = GDK_IS_X11_DISPLAY(gdk_display_get_default()); ++#ifdef ENABLE_REMOTE_DBUS ++ if (!mIsX11Display) { ++ if (!Connect(aAppName, aProfileName)) ++ return NS_ERROR_FAILURE; ++ } else ++#endif ++ { ++ XRemoteBaseStartup(aAppName, aProfileName); ++ ++ HandleCommandsFor(mServerWindow, nullptr); ++ ++ for (auto iter = mWindows.Iter(); !iter.Done(); iter.Next()) { ++ HandleCommandsFor(iter.Key(), iter.UserData()); ++ } + } + + return NS_OK; +@@ -78,7 +94,7 @@ nsGTKRemoteService::RegisterWindow(mozIDOMWindow* aWindow) + mWindows.Put(widget, weak); + + // If Startup() has already been called, immediately register this window. +- if (mServerWindow) { ++ if (mServerWindow && mIsX11Display) { + HandleCommandsFor(widget, weak); + } + +@@ -154,6 +170,161 @@ nsGTKRemoteService::HandlePropertyChange(GtkWidget *aWidget, + return FALSE; + } + ++#ifdef ENABLE_REMOTE_DBUS ++ ++void nsGTKRemoteService::OpenURL(const char *aCommandLine) ++{ ++ ++ ++} ++ ++#define MOZILLA_REMOTE_OBJECT "/org/mozilla/Firefox/Remote" ++ ++const char* introspect_xml = ++"\n" ++"\n" ++" \n" ++" \n" ++" \n" ++" \n" ++" \n" ++" \n" ++" \n" ++" \n" ++" \n" ++" \n" ++"\n"; ++ ++DBusHandlerResult ++nsGTKRemoteService::Introspect(DBusMessage *msg) ++{ ++ DBusMessage *reply; ++ ++ reply = dbus_message_new_method_return(msg); ++ if (!reply) ++ return DBUS_HANDLER_RESULT_NEED_MEMORY; ++ ++ dbus_message_append_args(reply, ++ DBUS_TYPE_STRING, &introspect_xml, ++ DBUS_TYPE_INVALID); ++ ++ dbus_connection_send(mConnection, reply, NULL); ++ dbus_message_unref(reply); ++ ++ return DBUS_HANDLER_RESULT_HANDLED; ++} ++ ++DBusHandlerResult ++nsGTKRemoteService::OpenURL(DBusMessage *msg) ++{ ++ DBusMessage *reply = nullptr; ++ const char *commandLine; ++ ++ if (!dbus_message_get_args(msg, nullptr, DBUS_TYPE_STRING, &commandLine, ++ DBUS_TYPE_INVALID)) { ++ reply = dbus_message_new_error(msg, "org.mozilla.firefox.Error", ++ "Wrong argument"); ++ } else { ++ OpenURL(commandLine); ++ reply = dbus_message_new_method_return(msg); ++ } ++ ++ dbus_connection_send(mConnection, reply, NULL); ++ dbus_message_unref(reply); ++ ++ return DBUS_HANDLER_RESULT_HANDLED; ++} ++ ++DBusHandlerResult ++nsGTKRemoteService::HandleDBusMessage(DBusConnection *aConnection, DBusMessage *msg) ++{ ++ NS_ASSERTION(mConnection == aConnection, "Wrong D-Bus connection."); ++ ++ const char *method = dbus_message_get_member(msg); ++ const char *iface = dbus_message_get_interface(msg); ++ ++ if ((strcmp("Introspect", method) == 0) && ++ (strcmp("org.freedesktop.DBus.Introspectable", iface) == 0)) { ++ return Introspect(msg); ++ } ++ ++ if ((strcmp("OpenURL", method) == 0) && ++ (strcmp("org.mozilla.firefox", iface) == 0)) { ++ return OpenURL(msg); ++ } ++ ++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; ++} ++ ++void ++nsGTKRemoteService::UnregisterDBusInterface(DBusConnection *aConnection) ++{ ++ NS_ASSERTION(mConnection == aConnection, "Wrong D-Bus connection."); ++ // Not implemented ++} ++ ++static DBusHandlerResult ++message_handler(DBusConnection *conn, DBusMessage *msg, void *user_data) ++{ ++ auto interface = static_cast(user_data); ++ return interface->HandleDBusMessage(conn, msg); ++} ++ ++static void ++unregister(DBusConnection *conn, void *user_data) ++{ ++ auto interface = static_cast(user_data); ++ interface->UnregisterDBusInterface(conn); ++} ++ ++static DBusObjectPathVTable remoteHandlersTable = { ++ .unregister_function = unregister, ++ .message_function = message_handler, ++}; ++ ++bool ++nsGTKRemoteService::Connect(const char* aAppName, const char* aProfileName) ++{ ++ mConnection = already_AddRefed( ++ dbus_bus_get(DBUS_BUS_SESSION, nullptr)); ++ if (!mConnection) ++ return false; ++ ++ dbus_connection_set_exit_on_disconnect(mConnection, false); ++ ++ nsAutoCString interfaceName; ++ interfaceName = nsPrintfCString("org.mozilla.%s.%s", aAppName, aProfileName); ++ ++ int ret = dbus_bus_request_name(mConnection, interfaceName.get(), ++ DBUS_NAME_FLAG_DO_NOT_QUEUE, nullptr); ++ // The interface is already owned - there is another application/profile ++ // instance already running. ++ if (ret == -1) { ++ dbus_connection_unref(mConnection); ++ mConnection = nullptr; ++ return false; ++ } ++ ++ if (!dbus_connection_register_object_path(mConnection, MOZILLA_REMOTE_OBJECT, ++ &remoteHandlersTable, this)) { ++ dbus_connection_unref(mConnection); ++ mConnection = nullptr; ++ return false; ++ } ++ ++ return true; ++} ++ ++void ++nsGTKRemoteService::Disconnect() ++{ ++ if (mConnection) { ++ dbus_connection_unref(mConnection); ++ mConnection = nullptr; ++ } ++} ++#endif + + // {C0773E90-5799-4eff-AD03-3EBCD85624AC} + #define NS_REMOTESERVICE_CID \ +diff --git a/toolkit/components/remote/nsGTKRemoteService.h b/toolkit/components/remote/nsGTKRemoteService.h +index 034a77a..638558b 100644 +--- a/toolkit/components/remote/nsGTKRemoteService.h ++++ b/toolkit/components/remote/nsGTKRemoteService.h +@@ -8,6 +8,10 @@ + #ifndef __nsGTKRemoteService_h__ + #define __nsGTKRemoteService_h__ + ++#if defined(MOZ_WAYLAND) && defined(MOZ_ENABLE_DBUS) ++#define ENABLE_REMOTE_DBUS 1 ++#endif ++ + #include + #include + #include +@@ -15,6 +19,10 @@ + #include "nsInterfaceHashtable.h" + #include "nsXRemoteService.h" + #include "mozilla/Attributes.h" ++#ifdef ENABLE_REMOTE_DBUS ++#include "mozilla/ipc/DBusConnectionRefPtr.h" ++#endif ++ + + class nsGTKRemoteService final : public nsXRemoteService + { +@@ -24,8 +32,15 @@ public: + NS_DECL_NSIREMOTESERVICE + + +- nsGTKRemoteService() : +- mServerWindow(nullptr) { } ++ nsGTKRemoteService() ++ : mServerWindow(nullptr) ++#ifdef ENABLE_REMOTE_DBUS ++ , mConnection(nullptr) ++#endif ++ { } ++ ++ DBusHandlerResult HandleDBusMessage(DBusConnection *aConnection, DBusMessage *msg); ++ void UnregisterDBusInterface(); + + private: + ~nsGTKRemoteService() { } +@@ -42,8 +57,22 @@ private: + virtual void SetDesktopStartupIDOrTimestamp(const nsACString& aDesktopStartupID, + uint32_t aTimestamp) override; + ++#ifdef ENABLE_REMOTE_DBUS ++ void OpenURL(const char *aCommandLine); ++ ++ DBusHandlerResult OpenURL(DBusMessage *msg); ++ DBusHandlerResult Introspect(DBusMessage *msg); ++ ++ bool Connect(const char* aAppName, const char* aProfileName); ++ void Disconnect(); ++#endif ++ + nsInterfaceHashtable, nsIWeakReference> mWindows; +- GtkWidget* mServerWindow; ++ GtkWidget* mServerWindow; ++ bool mIsX11Display; ++#ifdef ENABLE_REMOTE_DBUS ++ RefPtr mConnection; ++#endif + }; + + #endif // __nsGTKRemoteService_h__ +diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build +index 8adfc80..3006fd0 100644 +--- a/toolkit/library/moz.build ++++ b/toolkit/library/moz.build +@@ -135,6 +135,11 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': + 'mozgtk_stub', + ] + ++if CONFIG['MOZ_WAYLAND']: ++ USE_LIBS += [ ++ 'mozwayland', ++ ] ++ + if CONFIG['MOZ_JPROF']: + USE_LIBS += [ + 'jprof', +diff --git a/toolkit/moz.configure b/toolkit/moz.configure +index 68f9814..a90e365 100644 +--- a/toolkit/moz.configure ++++ b/toolkit/moz.configure +@@ -145,11 +145,16 @@ def toolkit(value, target): + + return platform_choices[0] + ++@depends(toolkit) ++def wayland(toolkit): ++ return toolkit == 'cairo-gtk3-wayland' + + @depends(toolkit) + def toolkit(toolkit): + if toolkit == 'cairo-gtk2-x11': + widget_toolkit = 'gtk2' ++ elif toolkit == 'cairo-gtk3-wayland' : ++ widget_toolkit = 'gtk3' + else: + widget_toolkit = toolkit.replace('cairo-', '') + return widget_toolkit +@@ -194,6 +199,14 @@ set_config('MOZ_X11', x11) + set_define('MOZ_X11', x11) + add_old_configure_assignment('MOZ_X11', x11) + ++# Wayland support ++# ============================================================== ++wayland_headers = pkg_check_modules('MOZ_WAYLAND', 'gtk+-wayland-3.0 >= 3.22', ++ when=wayland) ++ ++set_config('MOZ_WAYLAND', depends_if(wayland_headers)(lambda _: True)) ++set_define('MOZ_WAYLAND', depends_if(wayland_headers)(lambda _: True)) ++ + # GL Provider + # ============================================================== + option('--with-gl-provider', nargs=1, help='Set GL provider backend type') +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +index dca7611..ee36da7 100644 +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -246,6 +246,9 @@ nsString gAbsoluteArgv0Path; + #include + #endif + #include ++#ifdef MOZ_WAYLAND ++#include ++#endif + #ifdef MOZ_X11 + #include + #endif /* MOZ_X11 */ +@@ -2879,7 +2882,6 @@ static const char* detectDisplay(void) + { + bool tryX11 = false; + bool tryWayland = false; +- bool tryBroadway = false; + + // Honor user backend selection + const char *backend = PR_GetEnv("GDK_BACKEND"); +@@ -2887,14 +2889,11 @@ static const char* detectDisplay(void) + // Try all backends + tryX11 = true; + tryWayland = true; +- tryBroadway = true; + } else if (backend) { + if (strstr(backend, "x11")) + tryX11 = true; + if (strstr(backend, "wayland")) + tryWayland = true; +- if (strstr(backend, "broadway")) +- tryBroadway = true; + } + + const char *display_name; +@@ -3785,9 +3784,14 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + if (saveDisplayArg) { + SaveWordToEnv("DISPLAY", nsDependentCString(display_name)); + } +- } else { +- mDisableRemote = true; + } ++#ifdef MOZ_WAYLAND ++ else if (GDK_IS_WAYLAND_DISPLAY(mGdkDisplay)) { ++ if (saveDisplayArg) { ++ SaveWordToEnv("WAYLAND_DISPLAY", nsDependentCString(display_name)); ++ } ++ } ++#endif + #endif + #ifdef MOZ_ENABLE_XREMOTE + // handle --remote now that xpcom is fired up +diff --git a/widget/gtk/WindowSurfaceProvider.cpp b/widget/gtk/WindowSurfaceProvider.cpp +index 526fe6a..6d5fdc0 100644 +--- a/widget/gtk/WindowSurfaceProvider.cpp ++++ b/widget/gtk/WindowSurfaceProvider.cpp +@@ -11,6 +11,9 @@ + #include "WindowSurfaceX11Image.h" + #include "WindowSurfaceX11SHM.h" + #include "WindowSurfaceXRender.h" ++#ifdef MOZ_WAYLAND ++#include "WindowSurfaceWayland.h" ++#endif + + namespace mozilla { + namespace widget { +@@ -19,11 +22,17 @@ using namespace mozilla::gfx; + using namespace mozilla::layers; + + WindowSurfaceProvider::WindowSurfaceProvider() +- : mXDisplay(nullptr) ++ : mIsX11Display(false) ++ , mXDisplay(nullptr) + , mXWindow(0) + , mXVisual(nullptr) + , mXDepth(0) + , mWindowSurface(nullptr) ++#ifdef MOZ_WAYLAND ++ , mWidget(nullptr) ++ , mWaylandDisplay(nullptr) ++ , mWaylandSurface(nullptr) ++#endif + { + } + +@@ -43,7 +52,25 @@ void WindowSurfaceProvider::Initialize( + mXWindow = aWindow; + mXVisual = aVisual; + mXDepth = aDepth; ++ mIsX11Display = true; + } ++ ++#ifdef MOZ_WAYLAND ++void WindowSurfaceProvider::Initialize( ++ nsWindow *aWidget, ++ wl_display *aWaylandDisplay, ++ wl_surface *aWaylandSurface) ++{ ++ // We should not be initialized ++ MOZ_ASSERT(!mWaylandSurface); ++ ++ mWidget = aWidget; ++ mWaylandDisplay = aWaylandDisplay; ++ mWaylandSurface = aWaylandSurface; ++ mIsX11Display = false; ++} ++#endif ++ + void WindowSurfaceProvider::CleanupResources() + { + mWindowSurface = nullptr; +@@ -52,30 +79,39 @@ void WindowSurfaceProvider::CleanupResources() + UniquePtr + WindowSurfaceProvider::CreateWindowSurface() + { +- // We should be initialized +- MOZ_ASSERT(mXDisplay); +- +- // Blit to the window with the following priority: +- // 1. XRender (iff XRender is enabled && we are in-process) +- // 2. MIT-SHM +- // 3. XPutImage ++#ifdef MOZ_WAYLAND ++ if (!mIsX11Display) { ++ MOZ_ASSERT(mWaylandDisplay); ++ LOGDRAW(("Drawing to nsWindow %p using wl_surface\n", (void*)this)); ++ return MakeUnique(mWidget, mWaylandDisplay, mWaylandSurface); ++ } else ++#endif ++ { ++ // We should be initialized ++ MOZ_ASSERT(mXDisplay); ++ ++ // Blit to the window with the following priority: ++ // 1. XRender (iff XRender is enabled && we are in-process) ++ // 2. MIT-SHM ++ // 3. XPutImage + + #ifdef MOZ_WIDGET_GTK +- if (gfxVars::UseXRender()) { +- LOGDRAW(("Drawing to nsWindow %p using XRender\n", (void*)this)); +- return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); +- } ++ if (gfxVars::UseXRender()) { ++ LOGDRAW(("Drawing to nsWindow %p using XRender\n", (void*)this)); ++ return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); ++ } + #endif // MOZ_WIDGET_GTK + + #ifdef MOZ_HAVE_SHMIMAGE +- if (nsShmImage::UseShm()) { +- LOGDRAW(("Drawing to nsWindow %p using MIT-SHM\n", (void*)this)); +- return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); +- } ++ if (nsShmImage::UseShm()) { ++ LOGDRAW(("Drawing to nsWindow %p using MIT-SHM\n", (void*)this)); ++ return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); ++ } + #endif // MOZ_HAVE_SHMIMAGE + +- LOGDRAW(("Drawing to nsWindow %p using XPutImage\n", (void*)this)); +- return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); ++ LOGDRAW(("Drawing to nsWindow %p using XPutImage\n", (void*)this)); ++ return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); ++ } + } + + already_AddRefed +@@ -93,7 +129,7 @@ WindowSurfaceProvider::StartRemoteDrawingInRegion(LayoutDeviceIntRegion& aInvali + + *aBufferMode = BufferMode::BUFFER_NONE; + RefPtr dt = nullptr; +- if (!(dt = mWindowSurface->Lock(aInvalidRegion)) && ++ if (!(dt = mWindowSurface->Lock(aInvalidRegion)) && mIsX11Display + !mWindowSurface->IsFallback()) { + gfxWarningOnce() << "Failed to lock WindowSurface, falling back to XPutImage backend."; + mWindowSurface = MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); +diff --git a/widget/gtk/WindowSurfaceProvider.h b/widget/gtk/WindowSurfaceProvider.h +index 73b2303..9764180 100644 +--- a/widget/gtk/WindowSurfaceProvider.h ++++ b/widget/gtk/WindowSurfaceProvider.h +@@ -12,8 +12,14 @@ + #include "mozilla/gfx/2D.h" + #include "Units.h" + ++#include ++#ifdef MOZ_WAYLAND ++#include ++#endif + #include // for Window, Display, Visual, etc. + ++class nsWindow; ++ + namespace mozilla { + namespace widget { + +@@ -39,6 +45,12 @@ public: + Visual* aVisual, + int aDepth); + ++#ifdef MOZ_WAYLAND ++ void Initialize(nsWindow *aWidget, ++ wl_display *aWaylandDisplay, ++ wl_surface *aWaylandSurface); ++#endif ++ + /** + * Releases any surfaces created by this provider. + * This is used by X11CompositorWidget to get rid +@@ -55,12 +67,18 @@ public: + private: + UniquePtr CreateWindowSurface(); + +- Display* mXDisplay; +- Window mXWindow; +- Visual* mXVisual; +- int mXDepth; +- ++ // Can we access X? ++ bool mIsX11Display; ++ Display* mXDisplay; ++ Window mXWindow; ++ Visual* mXVisual; ++ int mXDepth; + UniquePtr mWindowSurface; ++#ifdef MOZ_WAYLAND ++ nsWindow* mWidget; ++ wl_display* mWaylandDisplay; ++ wl_surface* mWaylandSurface; ++#endif + }; + + } // namespace widget +diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp +new file mode 100644 +index 0000000..5e78d76 +--- /dev/null ++++ b/widget/gtk/WindowSurfaceWayland.cpp +@@ -0,0 +1,488 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++/* ++TODO: ++- do we need our event queue in mozcontainer? ++*/ ++ ++#include "WindowSurfaceWayland.h" ++ ++#include "base/message_loop.h" // for MessageLoop ++#include "base/task.h" // for NewRunnableMethod, etc ++#include "nsPrintfCString.h" ++#include "mozilla/gfx/2D.h" ++#include "mozilla/gfx/Tools.h" ++#include "gfxPlatform.h" ++#include "mozcontainer.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++namespace mozilla { ++namespace widget { ++ ++static WaylandDisplay *gWaylandDisplay = nullptr; ++ ++void ++WaylandDisplayInit(wl_display *aDisplay) ++{ ++ if (!gWaylandDisplay) { ++ gWaylandDisplay = new WaylandDisplay(aDisplay); ++ } ++} ++ ++void ++WaylandDisplay::SetWaylandPixelFormat(uint32_t format) ++{ ++ switch (format) { ++ case WL_SHM_FORMAT_ARGB8888: ++ mFormat = gfx::SurfaceFormat::B8G8R8A8; ++ break; ++ case WL_SHM_FORMAT_XRGB8888: ++ // TODO - We can use non-alpha formats when we need that ++ default: ++ break; ++ } ++} ++ ++static void ++shm_format(void *data, wl_shm *wl_shm, uint32_t format) ++{ ++ auto interface = reinterpret_cast(data); ++ interface->SetWaylandPixelFormat(format); ++ } ++ ++struct wl_shm_listener shm_listener = { ++ shm_format ++}; ++ ++static void ++global_registry_handler(void *data, wl_registry *registry, uint32_t id, ++ const char *interface, uint32_t version) ++{ ++ if (strcmp(interface, "wl_shm") == 0) { ++ auto interface = reinterpret_cast(data); ++ auto shm = static_cast( ++ wl_registry_bind(registry, id, &wl_shm_interface, 1)); ++ wl_proxy_set_queue((struct wl_proxy *)shm, interface->GetEventQueue()); ++ wl_shm_add_listener(shm, &shm_listener, data); ++ interface->SetShm(shm); ++ } ++} ++ ++static void ++global_registry_remover(void *data, wl_registry *registry, uint32_t id) ++{ ++} ++ ++static const struct wl_registry_listener registry_listener = { ++ global_registry_handler, ++ global_registry_remover ++}; ++ ++void ++WaylandDisplay::DisplayLoop() ++{ ++ /* NoteThis function may dispatch other events being received on the given ++ queue. This function uses wl_display_dispatch_queue() internally. ++ If you are using wl_display_read_events() from more threads, ++ don't use this function (or make sure that calling wl_display_roundtrip_queue() ++ doesn't interfere with calling wl_display_prepare_read() and ++ wl_display_read_events()). ++ */ ++ wl_display_roundtrip_queue(mDisplay, mEventQueue); ++} ++ ++static void ++RunDisplayLoop(WaylandDisplay *aWaylandDisplay) ++{ ++ // TODO - don't register task when firefox quits. ++ aWaylandDisplay->DisplayLoop(); ++ MessageLoop::current()->PostTask( ++ NewRunnableFunction(&RunDisplayLoop, aWaylandDisplay)); ++} ++ ++WaylandDisplay::WaylandDisplay(wl_display *aDisplay) ++ : mDisplay(aDisplay) ++{ ++ mEventQueue = wl_display_create_queue(mDisplay); ++ ++ // wl_shm and wl_subcompositor are not provided by Gtk so we need ++ // to query wayland directly ++ wl_registry* registry = wl_display_get_registry(mDisplay); ++ wl_proxy_set_queue((struct wl_proxy *)registry, mEventQueue); ++ wl_registry_add_listener(registry, ®istry_listener, this); ++ ++ // We need two roundtrips here to get the registry info ++ wl_display_dispatch_queue(mDisplay, mEventQueue); ++ wl_display_roundtrip_queue(mDisplay, mEventQueue); ++ wl_display_roundtrip_queue(mDisplay, mEventQueue); ++ ++ // We must have a valid pixel format ++ MOZ_RELEASE_ASSERT(mFormat != gfx::SurfaceFormat::UNKNOWN, ++ "We don't have any pixel format!"); ++ ++ // TODO - is that correct way how to run wayland event pump? ++ MessageLoop::current()->PostTask(NewRunnableFunction(&RunDisplayLoop, this)); ++} ++ ++int ++WaylandShmPool::CreateTemporaryFile(int aSize) ++{ ++ const char* tmppath = getenv("XDG_RUNTIME_DIR"); ++ MOZ_RELEASE_ASSERT(tmppath, "Missing XDG_RUNTIME_DIR env variable."); ++ ++ nsPrintfCString tmpname("%s/weston-shared-XXXXXX", tmppath); ++ ++ char* filename; ++ int fd = -1; ++ ++ if (tmpname.GetMutableData(&filename)) { ++ fd = mkstemp(filename); ++ if (fd >= 0) { ++ int flags = fcntl(fd, F_GETFD); ++ if (flags >= 0) { ++ fcntl(fd, F_SETFD, flags | FD_CLOEXEC); ++ } ++ } ++ } ++ ++ if (fd >= 0) { ++ unlink(tmpname.get()); ++ } else { ++ printf_stderr("Unable to create mapping file %s\n", filename); ++ MOZ_CRASH(); ++ } ++ ++#ifdef HAVE_POSIX_FALLOCATE ++ int ret = posix_fallocate(fd, 0, aSize); ++#else ++ int ret = ftruncate(fd, aSize); ++#endif ++ MOZ_RELEASE_ASSERT(ret == 0, "Mapping file allocation failed."); ++ ++ return fd; ++} ++ ++WaylandShmPool::WaylandShmPool(int aSize) ++{ ++ mAllocatedSize = aSize; ++ ++ mShmPoolFd = CreateTemporaryFile(mAllocatedSize); ++ mImageData = mmap(nullptr, mAllocatedSize, ++ PROT_READ | PROT_WRITE, MAP_SHARED, mShmPoolFd, 0); ++ MOZ_RELEASE_ASSERT(mImageData != MAP_FAILED, ++ "Unable to map drawing surface!"); ++ ++ mShmPool = wl_shm_create_pool(gWaylandDisplay->GetShm(), ++ mShmPoolFd, mAllocatedSize); ++ wl_proxy_set_queue((struct wl_proxy *)mShmPool, ++ gWaylandDisplay->GetEventQueue()); ++} ++ ++bool ++WaylandShmPool::Resize(int aSize) ++{ ++ // We do size increase only ++ if (aSize <= mAllocatedSize) ++ return true; ++ ++ if (ftruncate(mShmPoolFd, aSize) < 0) ++ return false; ++ ++#ifdef HAVE_POSIX_FALLOCATE ++ errno = posix_fallocate(mShmPoolFd, 0, aSize); ++ if (errno != 0) ++ return false; ++#endif ++ ++ wl_shm_pool_resize(mShmPool, aSize); ++ ++ munmap(mImageData, mAllocatedSize); ++ ++ mImageData = mmap(nullptr, aSize, ++ PROT_READ | PROT_WRITE, MAP_SHARED, mShmPoolFd, 0); ++ if (mImageData == MAP_FAILED) ++ return false; ++ ++ mAllocatedSize = aSize; ++ return true; ++} ++ ++WaylandShmPool::~WaylandShmPool() ++{ ++ munmap(mImageData, mAllocatedSize); ++ wl_shm_pool_destroy(mShmPool); ++ close(mShmPoolFd); ++} ++ ++WaylandDisplay::~WaylandDisplay() ++{ ++} ++ ++static void ++buffer_release(void *data, wl_buffer *buffer) ++{ ++ auto surface = reinterpret_cast(data); ++ surface->Detach(); ++} ++ ++static const struct wl_buffer_listener buffer_listener = { ++ buffer_release ++}; ++ ++void WindowBackBuffer::Create(int aWidth, int aHeight) ++{ ++ MOZ_ASSERT(!IsAttached(), "We can't resize attached buffers."); ++ ++ int newBufferSize = aWidth*aHeight*BUFFER_BPP; ++ mShmPool.Resize(newBufferSize); ++ ++ mWaylandBuffer = wl_shm_pool_create_buffer(mShmPool.GetShmPool(), 0, ++ aWidth, aHeight, aWidth*BUFFER_BPP, ++ WL_SHM_FORMAT_ARGB8888); ++ wl_proxy_set_queue((struct wl_proxy *)mWaylandBuffer, ++ gWaylandDisplay->GetEventQueue()); ++ wl_buffer_add_listener(mWaylandBuffer, &buffer_listener, this); ++ ++ mWidth = aWidth; ++ mHeight = aHeight; ++} ++ ++void WindowBackBuffer::Release() ++{ ++ wl_buffer_destroy(mWaylandBuffer); ++ mWidth = mHeight = 0; ++} ++ ++WindowBackBuffer::WindowBackBuffer(int aWidth, int aHeight) ++ : mShmPool(aWidth*aHeight*BUFFER_BPP) ++ ,mWaylandBuffer(nullptr) ++ ,mWidth(aWidth) ++ ,mHeight(aHeight) ++ ,mAttached(false) ++{ ++ Create(aWidth, aHeight); ++} ++ ++WindowBackBuffer::~WindowBackBuffer() ++{ ++ Release(); ++} ++ ++bool ++WindowBackBuffer::Resize(int aWidth, int aHeight) ++{ ++ if (aWidth == mWidth && aHeight == mHeight) ++ return true; ++ ++ Release(); ++ Create(aWidth, aHeight); ++ ++ return (mWaylandBuffer != nullptr); ++} ++ ++void ++WindowBackBuffer::Attach(wl_surface* aSurface) ++{ ++ wl_surface_attach(aSurface, mWaylandBuffer, 0, 0); ++ wl_surface_commit(aSurface); ++ wl_display_flush(gWaylandDisplay->GetDisplay()); ++ mAttached = true; ++} ++ ++void ++WindowBackBuffer::Detach() ++{ ++ mAttached = false; ++} ++ ++bool WindowBackBuffer::Sync(class WindowBackBuffer* aSourceBuffer) ++{ ++ bool bufferSizeMatches = MatchSize(aSourceBuffer); ++ if (!bufferSizeMatches) { ++ Resize(aSourceBuffer->mWidth, aSourceBuffer->mHeight); ++ } ++ ++ memcpy(mShmPool.GetImageData(), aSourceBuffer->mShmPool.GetImageData(), ++ aSourceBuffer->mWidth * aSourceBuffer->mHeight * BUFFER_BPP); ++ return true; ++} ++ ++already_AddRefed ++WindowBackBuffer::Lock(const LayoutDeviceIntRegion& aRegion) ++{ ++ gfx::IntRect bounds = aRegion.GetBounds().ToUnknownRect(); ++ gfx::IntSize lockSize(bounds.XMost(), bounds.YMost()); ++ ++ return gfxPlatform::CreateDrawTargetForData(static_cast(mShmPool.GetImageData()), ++ lockSize, ++ BUFFER_BPP * mWidth, ++ gWaylandDisplay->GetSurfaceFormat()); ++} ++ ++ ++static void ++frame_callback_handler(void *data, struct wl_callback *callback, uint32_t time) ++{ ++ auto surface = reinterpret_cast(data); ++ surface->FrameCallbackHandler(); ++} ++ ++static const struct wl_callback_listener frame_listener = { ++ frame_callback_handler ++}; ++ ++WindowSurfaceWayland::WindowSurfaceWayland(nsWindow *aWidget, ++ wl_display *aDisplay, ++ wl_surface *aSurface) ++ : mWidget(aWidget) ++ , mSurface(aSurface) ++ , mFrontBuffer(nullptr) ++ , mBackBuffer(nullptr) ++ , mFrameCallback(nullptr) ++ , mDelayedCommit(false) ++ , mFullScreenDamage(false) ++{ ++ MOZ_RELEASE_ASSERT(mSurface != nullptr, ++ "We can't do anything useful without valid wl_surface."); ++ // Ensure we have valid display connection ++ WaylandDisplayInit(aDisplay); ++ ++ // Make sure the drawing surface is handled by our event loop ++ // and not the default (Gdk) one to draw out of main thread. ++ wl_proxy_set_queue((struct wl_proxy *)mSurface, ++ gWaylandDisplay->GetEventQueue()); ++} ++ ++WindowSurfaceWayland::~WindowSurfaceWayland() ++{ ++ delete mFrontBuffer; ++ delete mBackBuffer; ++ ++ if (mFrameCallback) { ++ wl_callback_destroy(mFrameCallback); ++ } ++} ++ ++WindowBackBuffer* ++WindowSurfaceWayland::GetBufferToDraw(int aWidth, int aHeight) ++{ ++ if (!mFrontBuffer) { ++ mFrontBuffer = new WindowBackBuffer(aWidth, aHeight); ++ mBackBuffer = new WindowBackBuffer(aWidth, aHeight); ++ return mFrontBuffer; ++ } ++ ++ if (!mFrontBuffer->IsAttached()) { ++ if (!mFrontBuffer->MatchSize(aWidth, aHeight)) { ++ mFrontBuffer->Resize(aWidth, aHeight); ++ } ++ return mFrontBuffer; ++ } ++ ++ // Front buffer is used by compositor, draw to back buffer ++ if (mBackBuffer->IsAttached()) { ++ NS_WARNING("No drawing buffer available"); ++ return nullptr; ++ } ++ ++ NS_ASSERTION(!mDelayedCommit, ++ "Uncommitted buffer switch, screen artifacts ahead."); ++ ++ WindowBackBuffer *tmp = mFrontBuffer; ++ mFrontBuffer = mBackBuffer; ++ mBackBuffer = tmp; ++ ++ if (mBackBuffer->MatchSize(aWidth, aHeight)) { ++ // Former front buffer has the same size as a requested one. ++ // Gecko may expect a content already drawn on screen so copy ++ // existing data to the new buffer. ++ mFrontBuffer->Sync(mBackBuffer); ++ // When buffer switches we need to damage whole screen ++ // (https://bugzilla.redhat.com/show_bug.cgi?id=1418260) ++ mFullScreenDamage = true; ++ } else { ++ // Former buffer has different size from the new request. Only resize ++ // the new buffer and leave geck to render new whole content. ++ mFrontBuffer->Resize(aWidth, aHeight); ++ } ++ ++ return mFrontBuffer; ++} ++ ++already_AddRefed ++WindowSurfaceWayland::Lock(const LayoutDeviceIntRegion& aRegion) ++{ ++ // We allocate back buffer to widget size but return only ++ // portion requested by aRegion. ++ LayoutDeviceIntRect rect = mWidget->GetBounds(); ++ WindowBackBuffer* buffer = GetBufferToDraw(rect.width, ++ rect.height); ++ NS_ASSERTION(buffer, "We don't have any buffer to draw to!"); ++ if (!buffer) { ++ return nullptr; ++ } ++ ++ return buffer->Lock(aRegion); ++} ++ ++void ++WindowSurfaceWayland::Commit(const LayoutDeviceIntRegion& aInvalidRegion) ++{ ++ for (auto iter = aInvalidRegion.RectIter(); !iter.Done(); iter.Next()) { ++ const mozilla::LayoutDeviceIntRect &r = iter.Get(); ++ if (!mFullScreenDamage) ++ wl_surface_damage(mSurface, r.x, r.y, r.width, r.height); ++ } ++ ++ if (mFullScreenDamage) { ++ LayoutDeviceIntRect rect = mWidget->GetBounds(); ++ wl_surface_damage(mSurface, 0, 0, rect.width, rect.height); ++ mFullScreenDamage = false; ++ } ++ ++ if (mFrameCallback) { ++ // Do nothing here - buffer will be commited to compositor ++ // in next frame callback event. ++ mDelayedCommit = true; ++ return; ++ } else { ++ mFrameCallback = wl_surface_frame(mSurface); ++ wl_callback_add_listener(mFrameCallback, &frame_listener, this); ++ ++ // There's no pending frame callback so we can draw immediately ++ // and create frame callback for possible subsequent drawing. ++ mFrontBuffer->Attach(mSurface); ++ mDelayedCommit = false; ++ } ++} ++ ++void ++WindowSurfaceWayland::FrameCallbackHandler() ++{ ++ if (mFrameCallback) { ++ wl_callback_destroy(mFrameCallback); ++ mFrameCallback = nullptr; ++ } ++ ++ if (mDelayedCommit) { ++ // Send pending surface to compositor and register frame callback ++ // for possible subsequent drawing. ++ mFrameCallback = wl_surface_frame(mSurface); ++ wl_callback_add_listener(mFrameCallback, &frame_listener, this); ++ ++ mFrontBuffer->Attach(mSurface); ++ mDelayedCommit = false; ++ } ++} ++ ++} // namespace widget ++} // namespace mozilla +diff --git a/widget/gtk/WindowSurfaceWayland.h b/widget/gtk/WindowSurfaceWayland.h +new file mode 100644 +index 0000000..6f7af42 +--- /dev/null ++++ b/widget/gtk/WindowSurfaceWayland.h +@@ -0,0 +1,128 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_WAYLAND_H ++#define _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_WAYLAND_H ++ ++namespace mozilla { ++namespace widget { ++ ++// We support only 32bpp formats ++#define BUFFER_BPP 4 ++ ++// Our general connection to Wayland display server, ++// holds our display connection and runs event loop. ++class WaylandDisplay { ++public: ++ WaylandDisplay(wl_display *aDisplay); ++ ~WaylandDisplay(); ++ ++ void SetShm(wl_shm* aShm) { mShm = aShm; }; ++ wl_shm* GetShm() { return(mShm); }; ++ wl_event_queue* GetEventQueue() { return mEventQueue; }; ++ wl_display* GetDisplay() { return mDisplay; }; ++ gfx::SurfaceFormat GetSurfaceFormat() { return mFormat; }; ++ void SetWaylandPixelFormat(uint32_t format); ++ void DisplayLoop(); ++ ++private: ++ gfx::SurfaceFormat mFormat; ++ wl_shm* mShm; ++ wl_event_queue* mEventQueue; ++ GThread* mLoopThread; ++ wl_display* mDisplay; ++}; ++ ++// Allocates and owns shared memory for Wayland drawing surfaces ++class WaylandShmPool { ++public: ++ WaylandShmPool(int aSize); ++ ~WaylandShmPool(); ++ ++ bool Resize(int aSize); ++ wl_shm_pool* GetShmPool() { return mShmPool; }; ++ void* GetImageData() { return mImageData; }; ++ ++private: ++ int CreateTemporaryFile(int aSize); ++ ++ wl_shm_pool* mShmPool; ++ int mShmPoolFd; ++ int mAllocatedSize; ++ void* mImageData; ++}; ++ ++// Holds actual graphics data for wl_surface ++class WindowBackBuffer { ++public: ++ WindowBackBuffer(int aWidth, int aHeight); ++ ~WindowBackBuffer(); ++ ++ already_AddRefed Lock(const LayoutDeviceIntRegion& aRegion); ++ ++ void Attach(wl_surface* aSurface); ++ void Detach(); ++ bool IsAttached() { return mAttached; } ++ ++ bool Resize(int aWidth, int aHeight); ++ bool Sync(class WindowBackBuffer* aSourceBuffer); ++ ++ bool MatchSize(int aWidth, int aHeight) ++ { ++ return aWidth == mWidth && aHeight == mHeight; ++ } ++ bool MatchSize(class WindowBackBuffer *aBuffer) ++ { ++ return aBuffer->mWidth == mWidth && aBuffer->mHeight == mHeight; ++ } ++ ++private: ++ void Create(int aWidth, int aHeight); ++ void Release(); ++ ++ // WaylandShmPool provides actual shared memory we draw into ++ WaylandShmPool mShmPool; ++ ++ // wl_buffer is a wayland object that encapsulates the shared memory ++ // and passes it to wayland compositor by wl_surface object. ++ wl_buffer* mWaylandBuffer; ++ int mWidth; ++ int mHeight; ++ bool mAttached; ++}; ++ ++// WindowSurfaceWayland is an abstraction for wl_surface ++// and related management ++class WindowSurfaceWayland : public WindowSurface { ++public: ++ WindowSurfaceWayland(nsWindow *aWidget, wl_display *aDisplay, wl_surface *aSurface); ++ ~WindowSurfaceWayland(); ++ ++ already_AddRefed Lock(const LayoutDeviceIntRegion& aRegion) override; ++ void Commit(const LayoutDeviceIntRegion& aInvalidRegion) final; ++ void FrameCallbackHandler(); ++ ++private: ++ WindowBackBuffer* GetBufferToDraw(int aWidth, int aHeight); ++ ++ nsWindow* mWidget; ++ ++ // The surface size is dynamically allocated by Commit() call, ++ // we store the latest size request here to optimize ++ // buffer usage and our gfx operations ++ wl_surface* mSurface; ++ ++ WindowBackBuffer* mFrontBuffer; ++ WindowBackBuffer* mBackBuffer; ++ wl_callback* mFrameCallback; ++ bool mDelayedCommit; ++ bool mFullScreenDamage; ++}; ++ ++} // namespace widget ++} // namespace mozilla ++ ++#endif // _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_WAYLAND_H +diff --git a/widget/gtk/X11CompositorWidget.cpp b/widget/gtk/X11CompositorWidget.cpp +index 05113a0..bec9cd5 100644 +--- a/widget/gtk/X11CompositorWidget.cpp ++++ b/widget/gtk/X11CompositorWidget.cpp +@@ -21,27 +21,47 @@ X11CompositorWidget::X11CompositorWidget(const CompositorWidgetInitData& aInitDa + // If we have a nsWindow, then grab the already existing display connection + // If we don't, then use the init data to connect to the display + if (aWindow) { +- mXDisplay = aWindow->XDisplay(); ++ mIsX11Display = aWindow->IsX11Display(); ++#ifdef MOZ_WAYLAND ++ if (!mIsX11Display) { ++ mWaylandDisplay = aWindow->WaylandDisplay(); ++ } else ++#endif ++ { ++ mXDisplay = aWindow->XDisplay(); ++ } + } else { ++#ifdef MOZ_WAYLAND ++ // TODO - not implemented ++ MOZ_CRASH(); ++#endif + mXDisplay = XOpenDisplay(aInitData.XDisplayString().get()); ++ } ++ ++#ifdef MOZ_WAYLAND ++ if (!mIsX11Display) { ++ mWaylandSurface = (wl_surface *)aInitData.XWindow(); ++ mProvider.Initialize(aWindow, mWaylandDisplay, mWaylandSurface); ++ } else ++#endif ++ { ++ mXWindow = (Window)aInitData.XWindow(); ++ ++ // Grab the window's visual and depth ++ XWindowAttributes windowAttrs; ++ XGetWindowAttributes(mXDisplay, mXWindow, &windowAttrs); ++ ++ Visual* visual = windowAttrs.visual; ++ int depth = windowAttrs.depth; ++ ++ // Initialize the window surface provider ++ mProvider.Initialize( ++ mXDisplay, ++ mXWindow, ++ visual, ++ depth ++ ); + } +- mXWindow = (Window)aInitData.XWindow(); +- +- // Grab the window's visual and depth +- XWindowAttributes windowAttrs; +- XGetWindowAttributes(mXDisplay, mXWindow, &windowAttrs); +- +- Visual* visual = windowAttrs.visual; +- int depth = windowAttrs.depth; +- +- // Initialize the window surface provider +- mProvider.Initialize( +- mXDisplay, +- mXWindow, +- visual, +- depth +- ); +- + mClientSize = aInitData.InitialClientSize(); + } + +diff --git a/widget/gtk/X11CompositorWidget.h b/widget/gtk/X11CompositorWidget.h +index c0e0ede..e92de46 100644 +--- a/widget/gtk/X11CompositorWidget.h ++++ b/widget/gtk/X11CompositorWidget.h +@@ -58,8 +58,13 @@ protected: + private: + LayoutDeviceIntSize mClientSize; + ++ bool mIsX11Display; + Display* mXDisplay; + Window mXWindow; ++#ifdef MOZ_WAYLAND ++ wl_display* mWaylandDisplay; ++ wl_surface* mWaylandSurface; ++#endif + WindowSurfaceProvider mProvider; + }; + +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index baccb6c..1cc8917 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -7,6 +7,9 @@ + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': + DIRS += ['mozgtk'] + ++if CONFIG['MOZ_WAYLAND']: ++ DIRS += ['mozwayland'] ++ + EXPORTS += [ + 'mozcontainer.h', + 'nsGTKToolkit.h', +@@ -72,6 +75,7 @@ if CONFIG['NS_PRINTING']: + if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ + 'nsClipboard.cpp', ++ 'nsClipboardX11.cpp', + 'nsDragService.cpp', + 'WindowSurfaceProvider.cpp', + 'WindowSurfaceX11.cpp', +@@ -82,6 +86,12 @@ if CONFIG['MOZ_X11']: + 'WindowSurfaceProvider.h', + ] + ++if CONFIG['MOZ_WAYLAND']: ++ UNIFIED_SOURCES += [ ++ 'nsClipboardWayland.cpp', ++ 'WindowSurfaceWayland.cpp', ++ ] ++ + if CONFIG['ACCESSIBILITY']: + UNIFIED_SOURCES += [ + 'maiRedundantObjectFactory.c', +diff --git a/widget/gtk/mozcontainer.c b/widget/gtk/mozcontainer.cpp +similarity index 71% +rename from widget/gtk/mozcontainer.c +rename to widget/gtk/mozcontainer.cpp +index 9b596e4..3e5ab6e 100644 +--- a/widget/gtk/mozcontainer.c ++++ b/widget/gtk/mozcontainer.cpp +@@ -7,12 +7,18 @@ + + #include "mozcontainer.h" + #include ++#ifdef MOZ_WAYLAND ++#include ++#include ++#endif ++ + #include ++#include + + #ifdef ACCESSIBILITY + #include + #include "maiRedundantObjectFactory.h" +-#endif ++#endif + + /* init methods */ + static void moz_container_class_init (MozContainerClass *klass); +@@ -22,6 +28,9 @@ static void moz_container_init (MozContainer *container); + static void moz_container_map (GtkWidget *widget); + static void moz_container_unmap (GtkWidget *widget); + static void moz_container_realize (GtkWidget *widget); ++#if defined(MOZ_WAYLAND) ++static void moz_container_unrealize (GtkWidget *widget); ++#endif + static void moz_container_size_allocate (GtkWidget *widget, + GtkAllocation *allocation); + +@@ -71,7 +80,8 @@ moz_container_get_type(void) + + moz_container_type = g_type_register_static (GTK_TYPE_CONTAINER, + "MozContainer", +- &moz_container_info, 0); ++ &moz_container_info, ++ static_cast(0)); + #ifdef ACCESSIBILITY + /* Set a factory to return accessible object with ROLE_REDUNDANT for + * MozContainer, so that gail won't send focus notification for it */ +@@ -89,7 +99,7 @@ moz_container_new (void) + { + MozContainer *container; + +- container = g_object_new (MOZ_CONTAINER_TYPE, NULL); ++ container = static_cast(g_object_new (MOZ_CONTAINER_TYPE, nullptr)); + + return GTK_WIDGET(container); + } +@@ -143,6 +153,69 @@ moz_container_move (MozContainer *container, GtkWidget *child_widget, + + /* static methods */ + ++#if defined(MOZ_WAYLAND) ++/* We have to recreate our wl_surfaces when GdkWindow is shown, ++ * otherwise Gdk resources may not finished ++ * and gdk_wayland_window_get_wl_surface() fails. ++ */ ++gboolean ++moz_container_map_wl_surface(MozContainer *container) ++{ ++ if (container->subsurface) ++ return TRUE; ++ ++ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); ++ wl_surface* gtk_surface = gdk_wayland_window_get_wl_surface(window); ++ if (!gtk_surface) { ++ // We requested the underlying wl_surface too early. ++ return FALSE; ++ } ++ ++ container->subsurface = ++ wl_subcompositor_get_subsurface (container->subcompositor, ++ container->surface, ++ gtk_surface); ++ gint x, y; ++ gdk_window_get_position(window, &x, &y); ++ wl_subsurface_set_position(container->subsurface, x, y); ++ wl_subsurface_set_desync(container->subsurface); ++ ++ // Don't accept input on subsurface ++ GdkDisplay* display = gtk_widget_get_display(GTK_WIDGET (container)); ++ wl_compositor* compositor = gdk_wayland_display_get_wl_compositor(display); ++ wl_region* region = wl_compositor_create_region(compositor); ++ wl_surface_set_input_region(container->surface, region); ++ wl_region_destroy(region); ++ return TRUE; ++} ++ ++static void ++moz_container_unmap_surface(MozContainer *container) ++{ ++ g_clear_pointer(&container->subsurface, wl_subsurface_destroy); ++} ++ ++static void ++moz_container_create_surface(MozContainer *container) ++{ ++ GdkDisplay *display = gtk_widget_get_display(GTK_WIDGET(container)); ++ if (GDK_IS_X11_DISPLAY(display)) ++ return; ++ ++ if (!container->surface) { ++ struct wl_compositor *compositor; ++ compositor = gdk_wayland_display_get_wl_compositor(display); ++ container->surface = wl_compositor_create_surface(compositor); ++ } ++} ++ ++static void ++moz_container_delete_surface(MozContainer *container) ++{ ++ g_clear_pointer(&container->surface, wl_surface_destroy); ++} ++#endif ++ + void + moz_container_class_init (MozContainerClass *klass) + { +@@ -154,6 +227,9 @@ moz_container_class_init (MozContainerClass *klass) + widget_class->map = moz_container_map; + widget_class->unmap = moz_container_unmap; + widget_class->realize = moz_container_realize; ++#if defined(MOZ_WAYLAND) ++ widget_class->unrealize = moz_container_unrealize; ++#endif + widget_class->size_allocate = moz_container_size_allocate; + + container_class->remove = moz_container_remove; +@@ -161,12 +237,56 @@ moz_container_class_init (MozContainerClass *klass) + container_class->add = moz_container_add; + } + ++#if defined(MOZ_WAYLAND) ++static void ++registry_handle_global (void *data, ++ struct wl_registry *registry, ++ uint32_t name, ++ const char *interface, ++ uint32_t version) ++{ ++ MozContainer *container = MOZ_CONTAINER(data); ++ if(strcmp(interface, "wl_subcompositor") == 0) { ++ container->subcompositor = ++ static_cast(wl_registry_bind(registry, ++ name, ++ &wl_subcompositor_interface, ++ 1)); ++ } ++} ++ ++static void ++registry_handle_global_remove (void *data, ++ struct wl_registry *registry, ++ uint32_t name) ++{ ++} ++ ++static const struct wl_registry_listener registry_listener = { ++ registry_handle_global, ++ registry_handle_global_remove ++}; ++#endif ++ + void + moz_container_init (MozContainer *container) + { + gtk_widget_set_can_focus(GTK_WIDGET(container), TRUE); + gtk_container_set_resize_mode(GTK_CONTAINER(container), GTK_RESIZE_IMMEDIATE); + gtk_widget_set_redraw_on_allocate(GTK_WIDGET(container), FALSE); ++ ++#if defined(MOZ_WAYLAND) ++ { ++ GdkDisplay *gdk_display = gtk_widget_get_display(GTK_WIDGET(container)); ++ if (GDK_IS_WAYLAND_DISPLAY (gdk_display)) { ++ wl_display* display = gdk_wayland_display_get_wl_display(gdk_display); ++ wl_registry* registry = wl_display_get_registry(display); ++ wl_registry_add_listener(registry, ®istry_listener, container); ++ wl_display_roundtrip(display); ++ wl_display_roundtrip(display); ++ } ++ } ++#endif + } + + void +@@ -184,7 +304,7 @@ moz_container_map (GtkWidget *widget) + tmp_list = container->children; + while (tmp_list) { + tmp_child = ((MozContainerChild *)tmp_list->data)->widget; +- ++ + if (gtk_widget_get_visible(tmp_child)) { + if (!gtk_widget_get_mapped(tmp_child)) + gtk_widget_map(tmp_child); +@@ -207,6 +327,13 @@ moz_container_unmap (GtkWidget *widget) + if (gtk_widget_get_has_window (widget)) { + gdk_window_hide (gtk_widget_get_window(widget)); + } ++#if defined(MOZ_WAYLAND) ++ /* Gdk/Wayland deletes underlying GdkWindow wl_surface on unmap event. ++ * Delete the wl_subsurface interface which ++ * keeps wl_surface object and it's available for reuse. ++ */ ++ moz_container_unmap_surface(MOZ_CONTAINER(widget)); ++#endif + } + + void +@@ -231,7 +358,6 @@ moz_container_realize (GtkWidget *widget) + attributes.wclass = GDK_INPUT_OUTPUT; + attributes.visual = gtk_widget_get_visual (widget); + attributes.window_type = GDK_WINDOW_CHILD; +- + #if (MOZ_WIDGET_GTK == 2) + attributes.colormap = gtk_widget_get_colormap (widget); + attributes_mask |= GDK_WA_COLORMAP; +@@ -255,7 +381,20 @@ moz_container_realize (GtkWidget *widget) + #if (MOZ_WIDGET_GTK == 2) + widget->style = gtk_style_attach (widget->style, widget->window); + #endif ++#if defined(MOZ_WAYLAND) ++ moz_container_create_surface(MOZ_CONTAINER(widget)); ++#endif ++} ++ ++#if defined(MOZ_WAYLAND) ++static void ++moz_container_unrealize (GtkWidget *widget) ++{ ++ MozContainer* container = MOZ_CONTAINER(widget); ++ moz_container_unmap_surface(container); ++ moz_container_delete_surface(container); + } ++#endif + + void + moz_container_size_allocate (GtkWidget *widget, +@@ -267,7 +406,7 @@ moz_container_size_allocate (GtkWidget *widget, + + g_return_if_fail (IS_MOZ_CONTAINER (widget)); + +- /* printf("moz_container_size_allocate %p %d %d %d %d\n", ++ /* printf("moz_container_size_allocate %p %d %d %d %d\n", + (void *)widget, + allocation->x, + allocation->y, +@@ -290,7 +429,7 @@ moz_container_size_allocate (GtkWidget *widget, + tmp_list = container->children; + + while (tmp_list) { +- MozContainerChild *child = tmp_list->data; ++ MozContainerChild *child = static_cast(tmp_list->data); + + moz_container_allocate_child (container, child); + +@@ -306,6 +445,14 @@ moz_container_size_allocate (GtkWidget *widget, + allocation->width, + allocation->height); + } ++ ++#if defined(MOZ_WAYLAND) ++ if (container->subsurface) { ++ gint x, y; ++ gdk_window_get_position(gtk_widget_get_window(widget), &x, &y); ++ wl_subsurface_set_position(container->subsurface, x, y); ++ } ++#endif + } + + void +@@ -363,7 +510,7 @@ moz_container_forall (GtkContainer *container, gboolean include_internals, + { + MozContainer *moz_container; + GList *tmp_list; +- ++ + g_return_if_fail (IS_MOZ_CONTAINER(container)); + g_return_if_fail (callback != NULL); + +@@ -372,7 +519,7 @@ moz_container_forall (GtkContainer *container, gboolean include_internals, + tmp_list = moz_container->children; + while (tmp_list) { + MozContainerChild *child; +- child = tmp_list->data; ++ child = static_cast(tmp_list->data); + tmp_list = tmp_list->next; + (* callback) (child->widget, callback_data); + } +@@ -399,8 +546,8 @@ moz_container_get_child (MozContainer *container, GtkWidget *child_widget) + tmp_list = container->children; + while (tmp_list) { + MozContainerChild *child; +- +- child = tmp_list->data; ++ ++ child = static_cast(tmp_list->data); + tmp_list = tmp_list->next; + + if (child->widget == child_widget) +@@ -410,9 +557,16 @@ moz_container_get_child (MozContainer *container, GtkWidget *child_widget) + return NULL; + } + +-static void ++static void + moz_container_add(GtkContainer *container, GtkWidget *widget) + { + moz_container_put(MOZ_CONTAINER(container), widget, 0, 0); + } + ++#ifdef MOZ_WAYLAND ++struct wl_surface* ++moz_container_get_wl_surface(MozContainer *container) ++{ ++ return container->surface; ++} ++#endif +diff --git a/widget/gtk/mozcontainer.h b/widget/gtk/mozcontainer.h +index 23e17f7..5b1aa1a 100644 +--- a/widget/gtk/mozcontainer.h ++++ b/widget/gtk/mozcontainer.h +@@ -10,10 +10,6 @@ + + #include + +-#ifdef __cplusplus +-extern "C" { +-#endif /* __cplusplus */ +- + /* + * MozContainer + * +@@ -44,7 +40,7 @@ extern "C" { + * gtk_widget_set_parent_window should be called on the child GtkWidget before + * it is realized. + */ +- ++ + #define MOZ_CONTAINER_TYPE (moz_container_get_type()) + #define MOZ_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOZ_CONTAINER_TYPE, MozContainer)) + #define MOZ_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOZ_CONTAINER_TYPE, MozContainerClass)) +@@ -55,10 +51,25 @@ extern "C" { + typedef struct _MozContainer MozContainer; + typedef struct _MozContainerClass MozContainerClass; + ++/* Workaround for bug at wayland-util.h, ++ * present in wayland < 1.12 ++ */ ++#ifdef MOZ_WAYLAND ++struct wl_subcompositor; ++struct wl_surface; ++struct wl_subsurface; ++#endif ++ + struct _MozContainer + { + GtkContainer container; + GList *children; ++ ++#ifdef MOZ_WAYLAND ++ struct wl_subcompositor *subcompositor; ++ struct wl_surface *surface; ++ struct wl_subsurface *subsurface; ++#endif + }; + + struct _MozContainerClass +@@ -79,8 +90,9 @@ void moz_container_move (MozContainer *container, + gint width, + gint height); + +-#ifdef __cplusplus +-} +-#endif /* __cplusplus */ ++#ifdef MOZ_WAYLAND ++struct wl_surface * moz_container_get_wl_surface (MozContainer *container); ++gboolean moz_container_map_wl_surface (MozContainer *container); ++#endif + + #endif /* __MOZ_CONTAINER_H__ */ +diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c +index d9fb938..8db92ba 100644 +--- a/widget/gtk/mozgtk/mozgtk.c ++++ b/widget/gtk/mozgtk/mozgtk.c +@@ -515,11 +515,19 @@ STUB(gdk_device_manager_get_client_pointer) + STUB(gdk_disable_multidevice) + STUB(gdk_device_manager_list_devices) + STUB(gdk_display_get_device_manager) ++STUB(gdk_display_get_default_seat) + STUB(gdk_error_trap_pop_ignored) + STUB(gdk_event_get_source_device) ++STUB(gdk_seat_grab) ++STUB(gdk_seat_ungrab) + STUB(gdk_window_get_type) + STUB(gdk_x11_window_get_xid) + STUB(gdk_x11_display_get_type) ++STUB(gdk_wayland_window_get_wl_surface) ++STUB(gdk_wayland_window_set_use_custom_surface) ++STUB(gdk_wayland_display_get_wl_display) ++STUB(gdk_wayland_display_get_wl_compositor) ++STUB(gdk_wayland_display_get_type) + STUB(gtk_box_new) + STUB(gtk_cairo_should_draw_window) + STUB(gtk_cairo_transform_to_window) +@@ -586,6 +594,7 @@ STUB(gtk_widget_path_iter_add_class) + STUB(gtk_widget_path_new) + STUB(gtk_widget_path_unref) + STUB(gtk_widget_set_visual) ++STUB(gtk_widget_unregister_window) + STUB(gtk_app_chooser_dialog_new_for_content_type) + STUB(gtk_app_chooser_get_type) + STUB(gtk_app_chooser_get_app_info) +diff --git a/widget/gtk/mozwayland/moz.build b/widget/gtk/mozwayland/moz.build +new file mode 100644 +index 0000000..cc27368 +--- /dev/null ++++ b/widget/gtk/mozwayland/moz.build +@@ -0,0 +1,15 @@ ++# -*- 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 += [ ++ 'mozwayland.c', ++] ++ ++SharedLibrary('mozwayland') ++ ++SONAME = 'mozwayland' ++ ++CFLAGS += CONFIG['TK_CFLAGS'] +diff --git a/widget/gtk/mozwayland/mozwayland.c b/widget/gtk/mozwayland/mozwayland.c +new file mode 100644 +index 0000000..9dbb581 +--- /dev/null ++++ b/widget/gtk/mozwayland/mozwayland.c +@@ -0,0 +1,273 @@ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "mozilla/Types.h" ++#include ++#include ++ ++const struct wl_interface wl_buffer_interface; ++const struct wl_interface wl_callback_interface; ++const struct wl_interface wl_data_device_interface; ++const struct wl_interface wl_data_device_manager_interface; ++const struct wl_interface wl_keyboard_interface; ++const struct wl_interface wl_region_interface; ++const struct wl_interface wl_registry_interface; ++const struct wl_interface wl_shm_interface; ++const struct wl_interface wl_shm_pool_interface; ++const struct wl_interface wl_seat_interface; ++const struct wl_interface wl_surface_interface; ++const struct wl_interface wl_subsurface_interface; ++const struct wl_interface wl_subcompositor_interface; ++ ++MOZ_EXPORT void ++wl_event_queue_destroy(struct wl_event_queue *queue) ++{ ++} ++ ++MOZ_EXPORT void ++wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...) ++{ ++} ++ ++MOZ_EXPORT void ++wl_proxy_marshal_array(struct wl_proxy *p, uint32_t opcode, ++ union wl_argument *args) ++{ ++} ++ ++MOZ_EXPORT struct wl_proxy * ++wl_proxy_create(struct wl_proxy *factory, ++ const struct wl_interface *interface) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT void * ++wl_proxy_create_wrapper(void *proxy) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT void ++wl_proxy_wrapper_destroy(void *proxy_wrapper) ++{ ++} ++ ++MOZ_EXPORT struct wl_proxy * ++wl_proxy_marshal_constructor(struct wl_proxy *proxy, ++ uint32_t opcode, ++ const struct wl_interface *interface, ++ ...) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT struct wl_proxy * ++wl_proxy_marshal_constructor_versioned(struct wl_proxy *proxy, ++ uint32_t opcode, ++ const struct wl_interface *interface, ++ uint32_t version, ++ ...) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT struct wl_proxy * ++wl_proxy_marshal_array_constructor(struct wl_proxy *proxy, ++ uint32_t opcode, union wl_argument *args, ++ const struct wl_interface *interface) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT struct wl_proxy * ++wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, ++ uint32_t opcode, ++ union wl_argument *args, ++ const struct wl_interface *interface, ++ uint32_t version) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT void ++wl_proxy_destroy(struct wl_proxy *proxy) ++{ ++} ++ ++MOZ_EXPORT int ++wl_proxy_add_listener(struct wl_proxy *proxy, ++ void (**implementation)(void), void *data) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT const void * ++wl_proxy_get_listener(struct wl_proxy *proxy) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT int ++wl_proxy_add_dispatcher(struct wl_proxy *proxy, ++ wl_dispatcher_func_t dispatcher_func, ++ const void * dispatcher_data, void *data) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT void ++wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data) ++{ ++} ++ ++MOZ_EXPORT void * ++wl_proxy_get_user_data(struct wl_proxy *proxy) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT uint32_t ++wl_proxy_get_version(struct wl_proxy *proxy) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT uint32_t ++wl_proxy_get_id(struct wl_proxy *proxy) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT const char * ++wl_proxy_get_class(struct wl_proxy *proxy) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT void ++wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue) ++{ ++} ++ ++MOZ_EXPORT struct wl_display * ++wl_display_connect(const char *name) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT struct wl_display * ++wl_display_connect_to_fd(int fd) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT void ++wl_display_disconnect(struct wl_display *display) ++{ ++} ++ ++MOZ_EXPORT int ++wl_display_get_fd(struct wl_display *display) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_dispatch(struct wl_display *display) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_dispatch_queue(struct wl_display *display, ++ struct wl_event_queue *queue) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_dispatch_queue_pending(struct wl_display *display, ++ struct wl_event_queue *queue) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_dispatch_pending(struct wl_display *display) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_get_error(struct wl_display *display) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT uint32_t ++wl_display_get_protocol_error(struct wl_display *display, ++ const struct wl_interface **interface, ++ uint32_t *id) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_flush(struct wl_display *display) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_roundtrip_queue(struct wl_display *display, ++ struct wl_event_queue *queue) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_roundtrip(struct wl_display *display) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT struct wl_event_queue * ++wl_display_create_queue(struct wl_display *display) ++{ ++ return NULL; ++} ++ ++MOZ_EXPORT int ++wl_display_prepare_read_queue(struct wl_display *display, ++ struct wl_event_queue *queue) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT int ++wl_display_prepare_read(struct wl_display *display) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT void ++wl_display_cancel_read(struct wl_display *display) ++{ ++} ++ ++MOZ_EXPORT int ++wl_display_read_events(struct wl_display *display) ++{ ++ return -1; ++} ++ ++MOZ_EXPORT void ++wl_log_set_handler_client(wl_log_func_t handler) ++{ ++} ++ +diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp +index 053ae97..48f6ca7 100644 +--- a/widget/gtk/nsClipboard.cpp ++++ b/widget/gtk/nsClipboard.cpp +@@ -9,6 +9,10 @@ + + #include "nsArrayUtils.h" + #include "nsClipboard.h" ++#include "nsClipboardX11.h" ++#if defined(MOZ_WAYLAND) ++#include "nsClipboardWayland.h" ++#endif + #include "nsSupportsPrimitives.h" + #include "nsString.h" + #include "nsReadableUtils.h" +@@ -20,20 +24,11 @@ + #include "nsIObserverService.h" + #include "mozilla/Services.h" + #include "mozilla/RefPtr.h" +-#include "mozilla/TimeStamp.h" + + #include "imgIContainer.h" + + #include +- +-// For manipulation of the X event queue +-#include +-#include +-#include +-#include +-#include +-#include +-#include "X11UndefineNone.h" ++#include + + #include "mozilla/dom/EncodingUtils.h" + #include "nsIUnicodeDecoder.h" +@@ -62,24 +57,52 @@ ConvertHTMLtoUCS2 (guchar *data, + static void + GetHTMLCharset (guchar * data, int32_t dataLength, nsCString& str); + ++GdkAtom ++GetSelectionAtom(int32_t aWhichClipboard) ++{ ++ if (aWhichClipboard == nsIClipboard::kGlobalClipboard) ++ return GDK_SELECTION_CLIPBOARD; ++ ++ return GDK_SELECTION_PRIMARY; ++} ++ ++// Idle timeout for receiving selection and property notify events (microsec) ++const int ++nsRetrievalContext::kClipboardTimeout = 500000; ++ ++NS_IMPL_ISUPPORTS(nsRetrievalContext, nsIObserver) + +-// Our own versions of gtk_clipboard_wait_for_contents and +-// gtk_clipboard_wait_for_text, which don't run the event loop while +-// waiting for the data. This prevents a lot of problems related to +-// dispatching events at unexpected times. ++nsRetrievalContext::nsRetrievalContext(void) ++{ ++ nsCOMPtr os = mozilla::services::GetObserverService(); ++ if (os) { ++ os->AddObserver(this, "quit-application", false); ++ } ++} + +-static GtkSelectionData * +-wait_for_contents (GtkClipboard *clipboard, GdkAtom target); ++nsRetrievalContext::~nsRetrievalContext(void) ++{ ++} + +-static gchar * +-wait_for_text (GtkClipboard *clipboard); ++NS_IMETHODIMP ++nsRetrievalContext::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) ++{ ++ if (strcmp(aTopic, "quit-application") == 0) { ++ // application is going to quit, save clipboard content ++ Store(); ++ } ++ return NS_OK; ++} + +-static GdkFilterReturn +-selection_request_filter (GdkXEvent *gdk_xevent, +- GdkEvent *event, +- gpointer data); ++void ++nsRetrievalContext::Store(void) ++{ ++ GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); ++ gtk_clipboard_store(clipboard); ++} + + nsClipboard::nsClipboard() ++ : mContext(nullptr) + { + } + +@@ -100,40 +123,24 @@ NS_IMPL_ISUPPORTS(nsClipboard, nsIClipboard) + nsresult + nsClipboard::Init(void) + { +- nsCOMPtr os = mozilla::services::GetObserverService(); +- if (!os) +- return NS_ERROR_FAILURE; +- +- os->AddObserver(this, "quit-application", false); +- +- // A custom event filter to workaround attempting to dereference a null +- // selection requestor in GTK3 versions before 3.11.3. See bug 1178799. +-#if (MOZ_WIDGET_GTK == 3) && defined(MOZ_X11) +- if (gtk_check_version(3, 11, 3)) +- gdk_window_add_filter(nullptr, selection_request_filter, nullptr); ++ // create nsRetrievalContext ++ if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { ++ mContext = new nsRetrievalContextX11(); ++#if defined(MOZ_WAYLAND) ++ } else { ++ mContext = new nsRetrievalContextWayland(); + #endif +- +- return NS_OK; +-} +- +-NS_IMETHODIMP +-nsClipboard::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) +-{ +- if (strcmp(aTopic, "quit-application") == 0) { +- // application is going to quit, save clipboard content +- Store(); +- gdk_window_remove_filter(nullptr, selection_request_filter, nullptr); + } + return NS_OK; + } + ++ + nsresult + nsClipboard::Store(void) + { + // Ask the clipboard manager to store the current clipboard content + if (mGlobalTransferable) { +- GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); +- gtk_clipboard_store(clipboard); ++ mContext->Store(); + } + return NS_OK; + } +@@ -248,11 +255,8 @@ nsClipboard::GetData(nsITransferable *aTransferable, int32_t aWhichClipboard) + if (!aTransferable) + return NS_ERROR_FAILURE; + +- GtkClipboard *clipboard; +- clipboard = gtk_clipboard_get(GetSelectionAtom(aWhichClipboard)); +- + guchar *data = nullptr; +- gint length = 0; ++ uint32_t length = 0; + bool foundData = false; + nsAutoCString foundFlavor; + +@@ -276,21 +280,34 @@ nsClipboard::GetData(nsITransferable *aTransferable, int32_t aWhichClipboard) + // Special case text/unicode since we can convert any + // string into text/unicode + if (!strcmp(flavorStr, kUnicodeMime)) { +- gchar* new_text = wait_for_text(clipboard); +- if (new_text) { +- // Convert utf-8 into our unicode format. +- NS_ConvertUTF8toUTF16 ucs2string(new_text); +- data = (guchar *)ToNewUnicode(ucs2string); +- length = ucs2string.Length() * 2; ++ nsCOMPtr dataStream; ++ rv = mContext->GetClipboardContent(GTK_DEFAULT_MIME_TEXT, ++ aWhichClipboard, ++ getter_AddRefs(dataStream), ++ &length); ++ if (NS_FAILED(rv)) { ++ // If the type was text/unicode and we couldn't get ++ // text off the clipboard, run the next loop ++ // iteration. ++ continue; ++ } ++ ++ char* new_text = (char*)g_malloc(length); ++ uint32_t ret; ++ rv = dataStream->Read(new_text, length, &ret); ++ if(NS_FAILED(rv)) { + g_free(new_text); +- foundData = true; +- foundFlavor = kUnicodeMime; +- break; ++ continue; + } +- // If the type was text/unicode and we couldn't get +- // text off the clipboard, run the next loop +- // iteration. +- continue; ++ ++ // Convert utf-8 into our unicode format. ++ NS_ConvertUTF8toUTF16 ucs2string(new_text, length); ++ data = (guchar *)ToNewUnicode(ucs2string); ++ length = ucs2string.Length() * 2; ++ g_free(new_text); ++ foundData = true; ++ foundFlavor = kUnicodeMime; ++ break; + } + + // For images, we must wrap the data in an nsIInputStream then return instead of break, +@@ -304,52 +321,54 @@ nsClipboard::GetData(nsITransferable *aTransferable, int32_t aWhichClipboard) + flavorStr.Assign(kJPEGImageMime); + } + +- GdkAtom atom = gdk_atom_intern(flavorStr, FALSE); +- +- GtkSelectionData *selectionData = wait_for_contents(clipboard, atom); +- if (!selectionData) ++ nsCOMPtr byteStream; ++ rv = mContext->GetClipboardContent(flavorStr.get(), aWhichClipboard, ++ getter_AddRefs(byteStream), ++ &length); ++ if (NS_FAILED(rv)) + continue; + +- nsCOMPtr byteStream; +- NS_NewByteInputStream(getter_AddRefs(byteStream), +- (const char*)gtk_selection_data_get_data(selectionData), +- gtk_selection_data_get_length(selectionData), +- NS_ASSIGNMENT_COPY); + aTransferable->SetTransferData(flavorStr, byteStream, sizeof(nsIInputStream*)); +- gtk_selection_data_free(selectionData); + return NS_OK; + } + +- // Get the atom for this type and try to request it off +- // the clipboard. +- GdkAtom atom = gdk_atom_intern(flavorStr, FALSE); +- GtkSelectionData *selectionData; +- selectionData = wait_for_contents(clipboard, atom); +- if (selectionData) { +- const guchar *clipboardData = gtk_selection_data_get_data(selectionData); +- length = gtk_selection_data_get_length(selectionData); ++ // Try to request it off the clipboard. ++ nsCOMPtr byteStream; ++ rv = mContext->GetClipboardContent(flavorStr.get(), aWhichClipboard, ++ getter_AddRefs(byteStream), ++ &length); ++ if (NS_SUCCEEDED(rv)) { + // Special case text/html since we can convert into UCS2 + if (!strcmp(flavorStr, kHTMLMime)) { ++ guchar *clipboardData = (guchar *)g_malloc(length); ++ uint32_t ret; ++ rv = byteStream->Read((char*)clipboardData, length, &ret); ++ if(NS_FAILED(rv)) { ++ g_free(clipboardData); ++ continue; ++ } ++ + char16_t* htmlBody= nullptr; + int32_t htmlBodyLen = 0; + // Convert text/html into our unicode format +- ConvertHTMLtoUCS2(const_cast(clipboardData), length, ++ ConvertHTMLtoUCS2(clipboardData, length, + &htmlBody, htmlBodyLen); ++ g_free(clipboardData); ++ + // Try next data format? + if (!htmlBodyLen) + continue; + data = (guchar *)htmlBody; + length = htmlBodyLen * 2; ++ ++ foundData = true; ++ foundFlavor = flavorStr; ++ + } else { +- data = (guchar *)moz_xmalloc(length); +- if (!data) +- break; +- memcpy(data, clipboardData, length); ++ aTransferable->SetTransferData(flavorStr, byteStream, ++ sizeof(nsIInputStream*)); ++ return NS_OK; + } +- gtk_selection_data_free(selectionData); +- foundData = true; +- foundFlavor = flavorStr; +- break; + } + } + } +@@ -394,63 +413,16 @@ NS_IMETHODIMP + nsClipboard::HasDataMatchingFlavors(const char** aFlavorList, uint32_t aLength, + int32_t aWhichClipboard, bool *_retval) + { +- if (!aFlavorList || !_retval) +- return NS_ERROR_NULL_POINTER; +- +- *_retval = false; +- +- GtkSelectionData *selection_data = +- GetTargets(GetSelectionAtom(aWhichClipboard)); +- if (!selection_data) +- return NS_OK; +- +- gint n_targets = 0; +- GdkAtom *targets = nullptr; +- +- if (!gtk_selection_data_get_targets(selection_data, +- &targets, &n_targets) || +- !n_targets) +- return NS_OK; +- +- // Walk through the provided types and try to match it to a +- // provided type. +- for (uint32_t i = 0; i < aLength && !*_retval; i++) { +- // We special case text/unicode here. +- if (!strcmp(aFlavorList[i], kUnicodeMime) && +- gtk_selection_data_targets_include_text(selection_data)) { +- *_retval = true; +- break; +- } +- +- for (int32_t j = 0; j < n_targets; j++) { +- gchar *atom_name = gdk_atom_name(targets[j]); +- if (!atom_name) +- continue; +- +- if (!strcmp(atom_name, aFlavorList[i])) +- *_retval = true; +- +- // X clipboard supports image/jpeg, but we want to emulate support +- // for image/jpg as well +- if (!strcmp(aFlavorList[i], kJPGImageMime) && !strcmp(atom_name, kJPEGImageMime)) +- *_retval = true; +- +- g_free(atom_name); +- +- if (*_retval) +- break; +- } +- } +- gtk_selection_data_free(selection_data); +- g_free(targets); +- +- return NS_OK; ++ return mContext->HasDataMatchingFlavors(aFlavorList, aLength, ++ aWhichClipboard, _retval); + } + + NS_IMETHODIMP + nsClipboard::SupportsSelectionClipboard(bool *_retval) + { +- *_retval = true; // yeah, unix supports the selection clipboard ++ // yeah, unix supports the selection clipboard on X11 ++ // TODO Wayland ++ *_retval = GDK_IS_X11_DISPLAY(gdk_display_get_default()); + return NS_OK; + } + +@@ -461,24 +433,6 @@ nsClipboard::SupportsFindClipboard(bool* _retval) + return NS_OK; + } + +-/* static */ +-GdkAtom +-nsClipboard::GetSelectionAtom(int32_t aWhichClipboard) +-{ +- if (aWhichClipboard == kGlobalClipboard) +- return GDK_SELECTION_CLIPBOARD; +- +- return GDK_SELECTION_PRIMARY; +-} +- +-/* static */ +-GtkSelectionData * +-nsClipboard::GetTargets(GdkAtom aWhichClipboard) +-{ +- GtkClipboard *clipboard = gtk_clipboard_get(aWhichClipboard); +- return wait_for_contents(clipboard, gdk_atom_intern("TARGETS", FALSE)); +-} +- + nsITransferable * + nsClipboard::GetTransferable(int32_t aWhichClipboard) + { +@@ -801,246 +755,3 @@ void GetHTMLCharset(guchar * data, int32_t dataLength, nsCString& str) + } + str.AssignLiteral("UNKNOWN"); + } +- +-static void +-DispatchSelectionNotifyEvent(GtkWidget *widget, XEvent *xevent) +-{ +- GdkEvent event; +- event.selection.type = GDK_SELECTION_NOTIFY; +- event.selection.window = gtk_widget_get_window(widget); +- event.selection.selection = gdk_x11_xatom_to_atom(xevent->xselection.selection); +- event.selection.target = gdk_x11_xatom_to_atom(xevent->xselection.target); +- event.selection.property = gdk_x11_xatom_to_atom(xevent->xselection.property); +- event.selection.time = xevent->xselection.time; +- +- gtk_widget_event(widget, &event); +-} +- +-static void +-DispatchPropertyNotifyEvent(GtkWidget *widget, XEvent *xevent) +-{ +- GdkWindow *window = gtk_widget_get_window(widget); +- if ((gdk_window_get_events(window)) & GDK_PROPERTY_CHANGE_MASK) { +- GdkEvent event; +- event.property.type = GDK_PROPERTY_NOTIFY; +- event.property.window = window; +- event.property.atom = gdk_x11_xatom_to_atom(xevent->xproperty.atom); +- event.property.time = xevent->xproperty.time; +- event.property.state = xevent->xproperty.state; +- +- gtk_widget_event(widget, &event); +- } +-} +- +-struct checkEventContext +-{ +- GtkWidget *cbWidget; +- Atom selAtom; +-}; +- +-static Bool +-checkEventProc(Display *display, XEvent *event, XPointer arg) +-{ +- checkEventContext *context = (checkEventContext *) arg; +- +- if (event->xany.type == SelectionNotify || +- (event->xany.type == PropertyNotify && +- event->xproperty.atom == context->selAtom)) { +- +- GdkWindow *cbWindow = +- gdk_x11_window_lookup_for_display(gdk_x11_lookup_xdisplay(display), +- event->xany.window); +- if (cbWindow) { +- GtkWidget *cbWidget = nullptr; +- gdk_window_get_user_data(cbWindow, (gpointer *)&cbWidget); +- if (cbWidget && GTK_IS_WIDGET(cbWidget)) { +- context->cbWidget = cbWidget; +- return True; +- } +- } +- } +- +- return False; +-} +- +-// Idle timeout for receiving selection and property notify events (microsec) +-static const int kClipboardTimeout = 500000; +- +-static gchar* CopyRetrievedData(const gchar *aData) +-{ +- return g_strdup(aData); +-} +- +-static GtkSelectionData* CopyRetrievedData(GtkSelectionData *aData) +-{ +- // A negative length indicates that retrieving the data failed. +- return gtk_selection_data_get_length(aData) >= 0 ? +- gtk_selection_data_copy(aData) : nullptr; +-} +- +-class RetrievalContext { +- ~RetrievalContext() +- { +- MOZ_ASSERT(!mData, "Wait() wasn't called"); +- } +- +-public: +- NS_INLINE_DECL_REFCOUNTING(RetrievalContext) +- enum State { INITIAL, COMPLETED, TIMED_OUT }; +- +- RetrievalContext() : mState(INITIAL), mData(nullptr) {} +- +- /** +- * Call this when data has been retrieved. +- */ +- template void Complete(T *aData) +- { +- if (mState == INITIAL) { +- mState = COMPLETED; +- mData = CopyRetrievedData(aData); +- } else { +- // Already timed out +- MOZ_ASSERT(mState == TIMED_OUT); +- } +- } +- +- /** +- * Spins X event loop until timing out or being completed. Returns +- * null if we time out, otherwise returns the completed data (passing +- * ownership to caller). +- */ +- void *Wait(); +- +-protected: +- State mState; +- void* mData; +-}; +- +-void * +-RetrievalContext::Wait() +-{ +- if (mState == COMPLETED) { // the request completed synchronously +- void *data = mData; +- mData = nullptr; +- return data; +- } +- +- GdkDisplay *gdkDisplay = gdk_display_get_default(); +- if (GDK_IS_X11_DISPLAY(gdkDisplay)) { +- Display *xDisplay = GDK_DISPLAY_XDISPLAY(gdkDisplay); +- checkEventContext context; +- context.cbWidget = nullptr; +- context.selAtom = gdk_x11_atom_to_xatom(gdk_atom_intern("GDK_SELECTION", +- FALSE)); +- +- // Send X events which are relevant to the ongoing selection retrieval +- // to the clipboard widget. Wait until either the operation completes, or +- // we hit our timeout. All other X events remain queued. +- +- int select_result; +- +- int cnumber = ConnectionNumber(xDisplay); +- fd_set select_set; +- FD_ZERO(&select_set); +- FD_SET(cnumber, &select_set); +- ++cnumber; +- TimeStamp start = TimeStamp::Now(); +- +- do { +- XEvent xevent; +- +- while (XCheckIfEvent(xDisplay, &xevent, checkEventProc, +- (XPointer) &context)) { +- +- if (xevent.xany.type == SelectionNotify) +- DispatchSelectionNotifyEvent(context.cbWidget, &xevent); +- else +- DispatchPropertyNotifyEvent(context.cbWidget, &xevent); +- +- if (mState == COMPLETED) { +- void *data = mData; +- mData = nullptr; +- return data; +- } +- } +- +- TimeStamp now = TimeStamp::Now(); +- struct timeval tv; +- tv.tv_sec = 0; +- tv.tv_usec = std::max(0, +- kClipboardTimeout - (now - start).ToMicroseconds()); +- select_result = select(cnumber, &select_set, nullptr, nullptr, &tv); +- } while (select_result == 1 || +- (select_result == -1 && errno == EINTR)); +- } +-#ifdef DEBUG_CLIPBOARD +- printf("exceeded clipboard timeout\n"); +-#endif +- mState = TIMED_OUT; +- return nullptr; +-} +- +-static void +-clipboard_contents_received(GtkClipboard *clipboard, +- GtkSelectionData *selection_data, +- gpointer data) +-{ +- RetrievalContext *context = static_cast(data); +- context->Complete(selection_data); +- context->Release(); +-} +- +-static GtkSelectionData * +-wait_for_contents(GtkClipboard *clipboard, GdkAtom target) +-{ +- RefPtr context = new RetrievalContext(); +- // Balanced by Release in clipboard_contents_received +- context.get()->AddRef(); +- gtk_clipboard_request_contents(clipboard, target, +- clipboard_contents_received, +- context.get()); +- return static_cast(context->Wait()); +-} +- +-static void +-clipboard_text_received(GtkClipboard *clipboard, +- const gchar *text, +- gpointer data) +-{ +- RetrievalContext *context = static_cast(data); +- context->Complete(text); +- context->Release(); +-} +- +-static gchar * +-wait_for_text(GtkClipboard *clipboard) +-{ +- RefPtr context = new RetrievalContext(); +- // Balanced by Release in clipboard_text_received +- context.get()->AddRef(); +- gtk_clipboard_request_text(clipboard, clipboard_text_received, context.get()); +- return static_cast(context->Wait()); +-} +- +-static GdkFilterReturn +-selection_request_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) +-{ +- XEvent *xevent = static_cast(gdk_xevent); +- if (xevent->xany.type == SelectionRequest) { +- if (xevent->xselectionrequest.requestor == X11None) +- return GDK_FILTER_REMOVE; +- +- GdkDisplay *display = gdk_x11_lookup_xdisplay( +- xevent->xselectionrequest.display); +- if (!display) +- return GDK_FILTER_REMOVE; +- +- GdkWindow *window = gdk_x11_window_foreign_new_for_display(display, +- xevent->xselectionrequest.requestor); +- if (!window) +- return GDK_FILTER_REMOVE; +- +- g_object_unref(window); +- } +- return GDK_FILTER_CONTINUE; +-} +diff --git a/widget/gtk/nsClipboard.h b/widget/gtk/nsClipboard.h +index 70c866a..21c9661 100644 +--- a/widget/gtk/nsClipboard.h ++++ b/widget/gtk/nsClipboard.h +@@ -10,10 +10,39 @@ + + #include "nsIClipboard.h" + #include "nsIObserver.h" ++#include "nsIBinaryOutputStream.h" + #include + +-class nsClipboard : public nsIClipboard, +- public nsIObserver ++// Default Gtk MIME for text ++#define GTK_DEFAULT_MIME_TEXT "UTF8_STRING" ++ ++class nsRetrievalContext : public nsIObserver { ++public: ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSIOBSERVER ++ ++ nsRetrievalContext(); ++ ++ NS_IMETHOD HasDataMatchingFlavors(const char** aFlavorList, ++ uint32_t aLength, ++ int32_t aWhichClipboard, ++ bool *_retval) = 0; ++ NS_IMETHOD GetClipboardContent(const char* aMimeType, ++ int32_t aWhichClipboard, ++ nsIInputStream** aResult, ++ uint32_t* aContentLength) = 0; ++ ++ // Save global clipboard content to gtk ++ void Store(void); ++ ++protected: ++ virtual ~nsRetrievalContext(); ++ ++ // Idle timeout for receiving selection and property notify events (microsec) ++ static const int kClipboardTimeout; ++}; ++ ++class nsClipboard : public nsIClipboard + { + public: + nsClipboard(); +@@ -21,7 +50,6 @@ public: + NS_DECL_ISUPPORTS + + NS_DECL_NSICLIPBOARD +- NS_DECL_NSIOBSERVER + + // Make sure we are initialized, called from the factory + // constructor +@@ -35,10 +63,6 @@ public: + private: + virtual ~nsClipboard(); + +- // Utility methods +- static GdkAtom GetSelectionAtom (int32_t aWhichClipboard); +- static GtkSelectionData *GetTargets (GdkAtom aWhichClipboard); +- + // Save global clipboard content to gtk + nsresult Store (void); + +@@ -52,7 +76,9 @@ private: + nsCOMPtr mGlobalOwner; + nsCOMPtr mSelectionTransferable; + nsCOMPtr mGlobalTransferable; +- ++ RefPtr mContext; + }; + ++GdkAtom GetSelectionAtom(int32_t aWhichClipboard); ++ + #endif /* __nsClipboard_h_ */ +diff --git a/widget/gtk/nsClipboardWayland.cpp b/widget/gtk/nsClipboardWayland.cpp +new file mode 100644 +index 0000000..a7e8a21 +--- /dev/null ++++ b/widget/gtk/nsClipboardWayland.cpp +@@ -0,0 +1,435 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "mozilla/ArrayUtils.h" ++ ++#include "nsArrayUtils.h" ++#include "nsClipboard.h" ++#include "nsClipboardWayland.h" ++#include "nsIStorageStream.h" ++#include "nsIBinaryOutputStream.h" ++#include "nsSupportsPrimitives.h" ++#include "nsString.h" ++#include "nsReadableUtils.h" ++#include "nsXPIDLString.h" ++#include "nsPrimitiveHelpers.h" ++#include "nsIServiceManager.h" ++#include "nsImageToPixbuf.h" ++#include "nsStringStream.h" ++#include "nsIObserverService.h" ++#include "mozilla/Services.h" ++#include "mozilla/RefPtr.h" ++#include "mozilla/TimeStamp.h" ++ ++#include "imgIContainer.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++void ++nsRetrievalContextWayland::ResetMIMETypeList(void) ++{ ++ int length = mMIMETypes.Length(); ++ for (int i = 0; i < length; i++) { ++ free(mMIMETypes[i]); ++ } ++ mMIMETypes.Clear(); ++} ++ ++void ++nsRetrievalContextWayland::AddMIMEType(const char *aMimeType) ++{ ++ mMIMETypes.AppendElement(strdup(aMimeType)); ++} ++ ++bool ++nsRetrievalContextWayland::HasMIMEType(const char *aMimeType) ++{ ++ int length = mMIMETypes.Length(); ++ for (int i = 0; i < length; i++) { ++ if(strcmp(mMIMETypes[i], aMimeType) == 0) ++ return true; ++ } ++ return false; ++} ++ ++bool ++nsRetrievalContextWayland::HasMIMETypeText(void) ++{ ++ // Taken from gtk_targets_include_text() ++ int length = mMIMETypes.Length(); ++ for (int i = 0; i < length; i++) { ++ if(strcmp(mMIMETypes[i], "UTF8_STRING") == 0 || ++ strcmp(mMIMETypes[i], "TEXT") == 0 || ++ strcmp(mMIMETypes[i], "COMPOUND_TEXT") == 0 || ++ strcmp(mMIMETypes[i], "text/plain") == 0 || ++ strcmp(mMIMETypes[i], "text/plain;charset=utf-8") == 0 || ++ strcmp(mMIMETypes[i], "mTextPlainLocale") == 0) ++ { ++ return true; ++ } ++ } ++ return false; ++} ++ ++void ++nsRetrievalContextWayland::SetDataOffer(wl_data_offer *aDataOffer) ++{ ++ if(mDataOffer) { ++ wl_data_offer_destroy(mDataOffer); ++ } ++ mDataOffer = aDataOffer; ++} ++ ++static void ++data_device_selection (void *data, ++ struct wl_data_device *wl_data_device, ++ struct wl_data_offer *offer) ++{ ++ nsRetrievalContextWayland *context = ++ static_cast(data); ++ context->SetDataOffer(offer); ++} ++ ++static void ++data_offer_offer (void *data, ++ struct wl_data_offer *wl_data_offer, ++ const char *type) ++{ ++ nsRetrievalContextWayland *context = ++ static_cast(data); ++ context->AddMIMEType(type); ++} ++ ++static void ++data_offer_source_actions(void *data, ++ struct wl_data_offer *wl_data_offer, ++ uint32_t source_actions) ++{ ++} ++ ++static void ++data_offer_action(void *data, ++ struct wl_data_offer *wl_data_offer, ++ uint32_t dnd_action) ++{ ++} ++ ++static const struct wl_data_offer_listener data_offer_listener = { ++ data_offer_offer, ++ data_offer_source_actions, ++ data_offer_action ++}; ++ ++static void ++data_device_data_offer (void *data, ++ struct wl_data_device *data_device, ++ struct wl_data_offer *offer) ++{ ++ nsRetrievalContextWayland *context = ++ static_cast(data); ++ ++ // We have a new fresh clipboard content ++ context->ResetMIMETypeList(); ++ wl_data_offer_add_listener (offer, &data_offer_listener, data); ++} ++ ++static void ++data_device_enter (void *data, ++ struct wl_data_device *data_device, ++ uint32_t time, ++ struct wl_surface *surface, ++ int32_t x, ++ int32_t y, ++ struct wl_data_offer *offer) ++{ ++} ++ ++static void ++data_device_leave (void *data, ++ struct wl_data_device *data_device) ++{ ++} ++ ++static void ++data_device_motion (void *data, ++ struct wl_data_device *data_device, ++ uint32_t time, ++ int32_t x, ++ int32_t y) ++{ ++} ++ ++static void ++data_device_drop (void *data, ++ struct wl_data_device *data_device) ++{ ++} ++ ++static const struct wl_data_device_listener data_device_listener = { ++ data_device_data_offer, ++ data_device_enter, ++ data_device_leave, ++ data_device_motion, ++ data_device_drop, ++ data_device_selection ++}; ++ ++static void ++keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, ++ uint32_t format, int fd, uint32_t size) ++{ ++} ++ ++static void ++keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, ++ uint32_t serial, struct wl_surface *surface, ++ struct wl_array *keys) ++{ ++} ++ ++static void ++keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, ++ uint32_t serial, struct wl_surface *surface) ++{ ++ // We lost focus so our clipboard data are outdated ++ nsRetrievalContextWayland *context = ++ static_cast(data); ++ ++ context->ResetMIMETypeList(); ++ context->SetDataOffer(nullptr); ++} ++ ++static void ++keyboard_handle_key(void *data, struct wl_keyboard *keyboard, ++ uint32_t serial, uint32_t time, uint32_t key, ++ uint32_t state) ++{ ++} ++ ++static void ++keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, ++ uint32_t serial, uint32_t mods_depressed, ++ uint32_t mods_latched, uint32_t mods_locked, ++ uint32_t group) ++{ ++} ++ ++static const struct wl_keyboard_listener keyboard_listener = { ++ keyboard_handle_keymap, ++ keyboard_handle_enter, ++ keyboard_handle_leave, ++ keyboard_handle_key, ++ keyboard_handle_modifiers, ++}; ++ ++void ++nsRetrievalContextWayland::ConfigureKeyboard(wl_seat_capability caps) ++{ ++ if (caps & WL_SEAT_CAPABILITY_KEYBOARD) { ++ mKeyboard = wl_seat_get_keyboard(mSeat); ++ wl_keyboard_add_listener(mKeyboard, &keyboard_listener, this); ++ } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD)) { ++ wl_keyboard_destroy(mKeyboard); ++ mKeyboard = nullptr; ++ } ++} ++ ++static void ++seat_handle_capabilities(void *data, struct wl_seat *seat, ++ unsigned int caps) ++{ ++ nsRetrievalContextWayland *context = ++ static_cast(data); ++ context->ConfigureKeyboard((wl_seat_capability)caps); ++} ++ ++static const struct wl_seat_listener seat_listener = { ++ seat_handle_capabilities, ++}; ++ ++void ++nsRetrievalContextWayland::InitDataDeviceManager(wl_registry *registry, ++ uint32_t id, ++ uint32_t version) ++{ ++ int data_device_manager_version = MIN (version, 3); ++ mDataDeviceManager = (wl_data_device_manager *)wl_registry_bind(registry, id, ++ &wl_data_device_manager_interface, data_device_manager_version); ++} ++ ++void nsRetrievalContextWayland::InitSeat(wl_registry *registry, ++ uint32_t id, uint32_t version, ++ void *data) ++{ ++ mSeat = (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, 1); ++ wl_seat_add_listener(mSeat, &seat_listener, data); ++} ++ ++static void ++gdk_registry_handle_global(void *data, ++ struct wl_registry *registry, ++ uint32_t id, ++ const char *interface, ++ uint32_t version) ++{ ++ nsRetrievalContextWayland *context = ++ static_cast(data); ++ ++ if (strcmp (interface, "wl_data_device_manager") == 0) { ++ context->InitDataDeviceManager(registry, id, version); ++ } else if (strcmp(interface, "wl_seat") == 0) { ++ context->InitSeat(registry, id, version, data); ++ } ++} ++ ++static void ++gdk_registry_handle_global_remove(void *data, ++ struct wl_registry *registry, ++ uint32_t id) ++{ ++} ++ ++static const struct wl_registry_listener clipboard_registry_listener = { ++ gdk_registry_handle_global, ++ gdk_registry_handle_global_remove ++}; ++ ++nsRetrievalContextWayland::nsRetrievalContextWayland(void) ++ : mInitialized(false), ++ mDataDeviceManager(nullptr), ++ mDataOffer(nullptr) ++{ ++ const gchar* charset; ++ g_get_charset(&charset); ++ mTextPlainLocale = g_strdup_printf("text/plain;charset=%s", charset); ++ ++ mDisplay = gdk_wayland_display_get_wl_display(gdk_display_get_default()); ++ wl_registry_add_listener(wl_display_get_registry(mDisplay), ++ &clipboard_registry_listener, this); ++ wl_display_roundtrip(mDisplay); ++ ++ // We don't have Wayland support here so just give up ++ if (!mDataDeviceManager || !mSeat) ++ return; ++ ++ wl_data_device *dataDevice = ++ wl_data_device_manager_get_data_device(mDataDeviceManager, mSeat); ++ wl_data_device_add_listener(dataDevice, &data_device_listener, this); ++ wl_display_roundtrip(mDisplay); ++ ++ mInitialized = true; ++} ++ ++nsRetrievalContextWayland::~nsRetrievalContextWayland(void) ++{ ++ g_free(mTextPlainLocale); ++} ++ ++NS_IMETHODIMP ++nsRetrievalContextWayland::HasDataMatchingFlavors(const char** aFlavorList, ++ uint32_t aLength, int32_t aWhichClipboard, bool *_retval) ++{ ++ if (!aFlavorList || !_retval) ++ return NS_ERROR_NULL_POINTER; ++ ++ *_retval = false; ++ ++ // Walk through the provided types and try to match it to a ++ // provided type. ++ for (uint32_t i = 0; i < aLength; i++) { ++ // We special case text/unicode here. ++ if (!strcmp(aFlavorList[i], kUnicodeMime) && ++ HasMIMETypeText()) { ++ *_retval = true; ++ break; ++ } ++ if (HasMIMEType(aFlavorList[i])) { ++ *_retval = true; ++ break; ++ } ++ // X clipboard supports image/jpeg, but we want to emulate support ++ // for image/jpg as well ++ if (!strcmp(aFlavorList[i], kJPGImageMime) && ++ HasMIMEType(kJPEGImageMime)) { ++ *_retval = true; ++ break; ++ } ++ } ++ ++ return NS_OK; ++} ++ ++nsresult ++nsRetrievalContextWayland::GetClipboardContent(const char* aMimeType, ++ int32_t aWhichClipboard, ++ nsIInputStream** aResult, ++ uint32_t* aContentLength) ++{ ++ NS_ASSERTION(mDataOffer, "Requested data without valid data offer!"); ++ ++ int pipe_fd[2]; ++ if (pipe(pipe_fd) == -1) ++ return NS_ERROR_FAILURE; ++ ++ wl_data_offer_receive(mDataOffer, aMimeType, pipe_fd[1]); ++ close(pipe_fd[1]); ++ wl_display_flush(mDisplay); ++ ++ nsresult rv; ++ nsCOMPtr storageStream; ++ nsCOMPtr stream; ++ int length; ++ ++ struct pollfd fds; ++ fds.fd = pipe_fd[0]; ++ fds.events = POLLIN; ++ ++ // Choose some reasonable timeout here ++ int ret = poll(&fds, 1, kClipboardTimeout*1000); ++ if (!ret || ret == -1) { ++ close(pipe_fd[0]); ++ return NS_ERROR_FAILURE; ++ } ++ ++ #define BUFFER_SIZE 4096 ++ ++ NS_NewStorageStream(BUFFER_SIZE, UINT32_MAX, getter_AddRefs(storageStream)); ++ nsCOMPtr outputStream; ++ rv = storageStream->GetOutputStream(0, getter_AddRefs(outputStream)); ++ if (NS_FAILED(rv)) { ++ close(pipe_fd[0]); ++ return NS_ERROR_FAILURE; ++ } ++ ++ do { ++ char buffer[BUFFER_SIZE]; ++ length = read(pipe_fd[0], buffer, sizeof(buffer)); ++ if (length == 0 || length == -1) ++ break; ++ ++ uint32_t ret; ++ rv = outputStream->Write(buffer, length, &ret); ++ } while(NS_SUCCEEDED(rv) && length == BUFFER_SIZE); ++ ++ outputStream->Close(); ++ close(pipe_fd[0]); ++ ++ rv = storageStream->GetLength(aContentLength); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ rv = storageStream->NewInputStream(0, aResult); ++ NS_ENSURE_SUCCESS(rv, rv); ++ return NS_OK; ++} +diff --git a/widget/gtk/nsClipboardWayland.h b/widget/gtk/nsClipboardWayland.h +new file mode 100644 +index 0000000..0feede8 +--- /dev/null ++++ b/widget/gtk/nsClipboardWayland.h +@@ -0,0 +1,53 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef __nsClipboardWayland_h_ ++#define __nsClipboardWayland_h_ ++ ++#include "nsIClipboard.h" ++#include ++#include ++#include ++ ++class nsRetrievalContextWayland : public nsRetrievalContext ++{ ++public: ++ nsRetrievalContextWayland(); ++ ++ NS_IMETHOD HasDataMatchingFlavors(const char** aFlavorList, ++ uint32_t aLength, ++ int32_t aWhichClipboard, ++ bool *_retval) override; ++ NS_IMETHOD GetClipboardContent(const char* aMimeType, ++ int32_t aWhichClipboard, ++ nsIInputStream** aResult, ++ uint32_t* aContentLength) override; ++ ++ void SetDataOffer(wl_data_offer *aDataOffer); ++ void AddMIMEType(const char *aMimeType); ++ bool HasMIMEType(const char *aMimeType); ++ // Our version of gtk_selection_data_targets_include_text() ++ bool HasMIMETypeText(void); ++ void ResetMIMETypeList(void); ++ void ConfigureKeyboard(wl_seat_capability caps); ++ ++ void InitDataDeviceManager(wl_registry *registry, uint32_t id, uint32_t version); ++ void InitSeat(wl_registry *registry, uint32_t id, uint32_t version, void *data); ++private: ++ virtual ~nsRetrievalContextWayland() override; ++ ++ bool mInitialized; ++ wl_display *mDisplay; ++ wl_seat *mSeat; ++ wl_data_device_manager *mDataDeviceManager; ++ wl_data_offer *mDataOffer; ++ wl_keyboard *mKeyboard; ++ nsTArray mMIMETypes; ++ gchar *mTextPlainLocale; ++}; ++ ++#endif /* __nsClipboardWayland_h_ */ +diff --git a/widget/gtk/nsClipboardX11.cpp b/widget/gtk/nsClipboardX11.cpp +new file mode 100644 +index 0000000..45c6d9f +--- /dev/null ++++ b/widget/gtk/nsClipboardX11.cpp +@@ -0,0 +1,309 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "mozilla/ArrayUtils.h" ++ ++#include "nsArrayUtils.h" ++#include "nsClipboard.h" ++#include "nsClipboardX11.h" ++#include "nsSupportsPrimitives.h" ++#include "nsString.h" ++#include "nsReadableUtils.h" ++#include "nsXPIDLString.h" ++#include "nsPrimitiveHelpers.h" ++#include "nsIServiceManager.h" ++#include "nsImageToPixbuf.h" ++#include "nsStringStream.h" ++#include "nsIObserverService.h" ++#include "mozilla/Services.h" ++#include "mozilla/RefPtr.h" ++#include "mozilla/TimeStamp.h" ++ ++#include "imgIContainer.h" ++ ++#include ++ ++// For manipulation of the X event queue ++#include ++#include ++#include ++#include ++#include ++#include ++#include "X11UndefineNone.h" ++ ++using namespace mozilla; ++ ++static GdkFilterReturn ++selection_request_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) ++{ ++ XEvent *xevent = static_cast(gdk_xevent); ++ if (xevent->xany.type == SelectionRequest) { ++ if (xevent->xselectionrequest.requestor == X11None) ++ return GDK_FILTER_REMOVE; ++ ++ GdkDisplay *display = gdk_x11_lookup_xdisplay( ++ xevent->xselectionrequest.display); ++ if (!display) ++ return GDK_FILTER_REMOVE; ++ ++ GdkWindow *window = gdk_x11_window_foreign_new_for_display(display, ++ xevent->xselectionrequest.requestor); ++ if (!window) ++ return GDK_FILTER_REMOVE; ++ ++ g_object_unref(window); ++ } ++ return GDK_FILTER_CONTINUE; ++} ++ ++nsRetrievalContextX11::nsRetrievalContextX11(void) ++: mState(INITIAL), ++ mData(nullptr) ++{ ++ // A custom event filter to workaround attempting to dereference a null ++ // selection requestor in GTK3 versions before 3.11.3. See bug 1178799. ++#if (MOZ_WIDGET_GTK == 3) && defined(MOZ_X11) ++ if (gtk_check_version(3, 11, 3)) ++ gdk_window_add_filter(nullptr, selection_request_filter, nullptr); ++#endif ++} ++ ++nsRetrievalContextX11::~nsRetrievalContextX11(void) ++{ ++ gdk_window_remove_filter(nullptr, selection_request_filter, nullptr); ++} ++ ++static void ++DispatchSelectionNotifyEvent(GtkWidget *widget, XEvent *xevent) ++{ ++ GdkEvent event; ++ event.selection.type = GDK_SELECTION_NOTIFY; ++ event.selection.window = gtk_widget_get_window(widget); ++ event.selection.selection = gdk_x11_xatom_to_atom(xevent->xselection.selection); ++ event.selection.target = gdk_x11_xatom_to_atom(xevent->xselection.target); ++ event.selection.property = gdk_x11_xatom_to_atom(xevent->xselection.property); ++ event.selection.time = xevent->xselection.time; ++ ++ gtk_widget_event(widget, &event); ++} ++ ++static void ++DispatchPropertyNotifyEvent(GtkWidget *widget, XEvent *xevent) ++{ ++ GdkWindow *window = gtk_widget_get_window(widget); ++ if ((gdk_window_get_events(window)) & GDK_PROPERTY_CHANGE_MASK) { ++ GdkEvent event; ++ event.property.type = GDK_PROPERTY_NOTIFY; ++ event.property.window = window; ++ event.property.atom = gdk_x11_xatom_to_atom(xevent->xproperty.atom); ++ event.property.time = xevent->xproperty.time; ++ event.property.state = xevent->xproperty.state; ++ ++ gtk_widget_event(widget, &event); ++ } ++} ++ ++struct checkEventContext ++{ ++ GtkWidget *cbWidget; ++ Atom selAtom; ++}; ++ ++static Bool ++checkEventProc(Display *display, XEvent *event, XPointer arg) ++{ ++ checkEventContext *context = (checkEventContext *) arg; ++ ++ if (event->xany.type == SelectionNotify || ++ (event->xany.type == PropertyNotify && ++ event->xproperty.atom == context->selAtom)) { ++ ++ GdkWindow *cbWindow = ++ gdk_x11_window_lookup_for_display(gdk_x11_lookup_xdisplay(display), ++ event->xany.window); ++ if (cbWindow) { ++ GtkWidget *cbWidget = nullptr; ++ gdk_window_get_user_data(cbWindow, (gpointer *)&cbWidget); ++ if (cbWidget && GTK_IS_WIDGET(cbWidget)) { ++ context->cbWidget = cbWidget; ++ return True; ++ } ++ } ++ } ++ ++ return False; ++} ++ ++void * ++nsRetrievalContextX11::Wait() ++{ ++ if (mState == COMPLETED) { // the request completed synchronously ++ void *data = mData; ++ mData = nullptr; ++ return data; ++ } ++ ++ GdkDisplay *gdkDisplay = gdk_display_get_default(); ++ if (GDK_IS_X11_DISPLAY(gdkDisplay)) { ++ Display *xDisplay = GDK_DISPLAY_XDISPLAY(gdkDisplay); ++ checkEventContext context; ++ context.cbWidget = nullptr; ++ context.selAtom = gdk_x11_atom_to_xatom(gdk_atom_intern("GDK_SELECTION", ++ FALSE)); ++ ++ // Send X events which are relevant to the ongoing selection retrieval ++ // to the clipboard widget. Wait until either the operation completes, or ++ // we hit our timeout. All other X events remain queued. ++ ++ int select_result; ++ ++ int cnumber = ConnectionNumber(xDisplay); ++ fd_set select_set; ++ FD_ZERO(&select_set); ++ FD_SET(cnumber, &select_set); ++ ++cnumber; ++ TimeStamp start = TimeStamp::Now(); ++ ++ do { ++ XEvent xevent; ++ ++ while (XCheckIfEvent(xDisplay, &xevent, checkEventProc, ++ (XPointer) &context)) { ++ ++ if (xevent.xany.type == SelectionNotify) ++ DispatchSelectionNotifyEvent(context.cbWidget, &xevent); ++ else ++ DispatchPropertyNotifyEvent(context.cbWidget, &xevent); ++ ++ if (mState == COMPLETED) { ++ void *data = mData; ++ mData = nullptr; ++ return data; ++ } ++ } ++ ++ TimeStamp now = TimeStamp::Now(); ++ struct timeval tv; ++ tv.tv_sec = 0; ++ tv.tv_usec = std::max(0, ++ kClipboardTimeout - (now - start).ToMicroseconds()); ++ select_result = select(cnumber, &select_set, nullptr, nullptr, &tv); ++ } while (select_result == 1 || ++ (select_result == -1 && errno == EINTR)); ++ } ++#ifdef DEBUG_CLIPBOARD ++ printf("exceeded clipboard timeout\n"); ++#endif ++ mState = TIMED_OUT; ++ return nullptr; ++} ++ ++static void ++clipboard_contents_received(GtkClipboard *clipboard, ++ GtkSelectionData *selection_data, ++ gpointer data) ++{ ++ nsRetrievalContextX11 *context = static_cast(data); ++ context->Complete(selection_data); ++} ++ ++GtkSelectionData* ++nsRetrievalContextX11::WaitForContents(GtkClipboard *clipboard, const char *aMimeType) ++{ ++ mState = INITIAL; ++ NS_ASSERTION(!mData, "Leaking clipboard content!"); ++ ++ gtk_clipboard_request_contents(clipboard, ++ gdk_atom_intern(aMimeType, FALSE), ++ clipboard_contents_received, ++ this); ++ return static_cast(Wait()); ++} ++ ++NS_IMETHODIMP ++nsRetrievalContextX11::HasDataMatchingFlavors(const char** aFlavorList, ++ uint32_t aLength, ++ int32_t aWhichClipboard, ++ bool *_retval) ++{ ++ if (!aFlavorList || !_retval) ++ return NS_ERROR_NULL_POINTER; ++ ++ *_retval = false; ++ ++ GtkClipboard *clipboard = ++ gtk_clipboard_get(GetSelectionAtom(aWhichClipboard)); ++ ++ GtkSelectionData *selection_data = ++ WaitForContents(clipboard, "TARGETS"); ++ if (!selection_data) ++ return NS_OK; ++ ++ gint n_targets = 0; ++ GdkAtom *targets = nullptr; ++ ++ if (!gtk_selection_data_get_targets(selection_data, ++ &targets, &n_targets) || ++ !n_targets) ++ return NS_OK; ++ ++ // Walk through the provided types and try to match it to a ++ // provided type. ++ for (uint32_t i = 0; i < aLength && !*_retval; i++) { ++ // We special case text/unicode here. ++ if (!strcmp(aFlavorList[i], kUnicodeMime) && ++ gtk_selection_data_targets_include_text(selection_data)) { ++ *_retval = true; ++ break; ++ } ++ ++ for (int32_t j = 0; j < n_targets; j++) { ++ gchar *atom_name = gdk_atom_name(targets[j]); ++ if (!atom_name) ++ continue; ++ ++ if (!strcmp(atom_name, aFlavorList[i])) ++ *_retval = true; ++ ++ // X clipboard supports image/jpeg, but we want to emulate support ++ // for image/jpg as well ++ if (!strcmp(aFlavorList[i], kJPGImageMime) && !strcmp(atom_name, kJPEGImageMime)) ++ *_retval = true; ++ ++ g_free(atom_name); ++ ++ if (*_retval) ++ break; ++ } ++ } ++ gtk_selection_data_free(selection_data); ++ g_free(targets); ++ ++ return NS_OK; ++} ++ ++nsresult ++nsRetrievalContextX11::GetClipboardContent(const char* aMimeType, ++ int32_t aWhichClipboard, ++ nsIInputStream** aResult, ++ uint32_t* aContentLength) ++{ ++ GtkClipboard *clipboard; ++ clipboard = gtk_clipboard_get(GetSelectionAtom(aWhichClipboard)); ++ ++ GtkSelectionData *selectionData = WaitForContents(clipboard, aMimeType); ++ if (!selectionData) ++ return NS_ERROR_FAILURE; ++ ++ *aContentLength = gtk_selection_data_get_length(selectionData); ++ NS_NewByteInputStream(aResult, ++ (const char*)gtk_selection_data_get_data(selectionData), ++ *aContentLength, NS_ASSIGNMENT_COPY); ++ gtk_selection_data_free(selectionData); ++ return NS_OK; ++} +diff --git a/widget/gtk/nsClipboardX11.h b/widget/gtk/nsClipboardX11.h +new file mode 100644 +index 0000000..f9eb0d3 +--- /dev/null ++++ b/widget/gtk/nsClipboardX11.h +@@ -0,0 +1,68 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef __nsClipboardX11_h_ ++#define __nsClipboardX11_h_ ++ ++#include "nsIClipboard.h" ++#include ++ ++class nsRetrievalContextX11 : public nsRetrievalContext ++{ ++public: ++ enum State { INITIAL, COMPLETED, TIMED_OUT }; ++ ++ nsRetrievalContextX11(); ++ ++ NS_IMETHOD HasDataMatchingFlavors(const char** aFlavorList, ++ uint32_t aLength, ++ int32_t aWhichClipboard, ++ bool *_retval) override; ++ NS_IMETHOD GetClipboardContent(const char* aMimeType, ++ int32_t aWhichClipboard, ++ nsIInputStream** aResult, ++ uint32_t* aContentLength) override; ++ ++ gchar* CopyRetrievedData(const gchar *aData) ++ { ++ return g_strdup(aData); ++ } ++ GtkSelectionData* CopyRetrievedData(GtkSelectionData *aData) ++ { ++ // A negative length indicates that retrieving the data failed. ++ return gtk_selection_data_get_length(aData) >= 0 ? ++ gtk_selection_data_copy(aData) : nullptr; ++ } ++ ++ // Call this when data has been retrieved. ++ template void Complete(T *aData) ++ { ++ if (mState == INITIAL) { ++ mState = COMPLETED; ++ mData = CopyRetrievedData(aData); ++ } else { ++ // Already timed out ++ MOZ_ASSERT(mState == TIMED_OUT); ++ } ++ } ++private: ++ virtual ~nsRetrievalContextX11() override; ++ ++ GtkSelectionData* WaitForContents(GtkClipboard *clipboard, ++ const char *aMimeType); ++ /** ++ * Spins X event loop until timing out or being completed. Returns ++ * null if we time out, otherwise returns the completed data (passing ++ * ownership to caller). ++ */ ++ void *Wait(); ++ ++ State mState; ++ void* mData; ++}; ++ ++#endif /* __nsClipboardX11_h_ */ +diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp +index 89b8ab7..a6e6558 100644 +--- a/widget/gtk/nsNativeThemeGTK.cpp ++++ b/widget/gtk/nsNativeThemeGTK.cpp +@@ -7,6 +7,7 @@ + #include "nsThemeConstants.h" + #include "gtkdrawing.h" + #include "nsScreenGtk.h" ++#include "X11UndefineNone.h" + + #include "gfx2DGlue.h" + #include "nsIObserverService.h" +@@ -30,6 +31,7 @@ + + #include + #include ++#include + + #include "gfxContext.h" + #include "gfxPlatformGtk.h" +@@ -1212,7 +1214,11 @@ nsNativeThemeGTK::DrawWidgetBackground(nsRenderingContext* aContext, + #endif + + if (!safeState) { +- gdk_flush(); ++ // gdk_flush() call from expose event crashes Gtk+ on Wayland ++ // (Gnome BZ #773307) ++ if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { ++ gdk_flush(); ++ } + gLastGdkError = gdk_error_trap_pop (); + + if (gLastGdkError) { +diff --git a/widget/gtk/nsNativeThemeGTK.h b/widget/gtk/nsNativeThemeGTK.h +index 56ae031..7ad7c17 100644 +--- a/widget/gtk/nsNativeThemeGTK.h ++++ b/widget/gtk/nsNativeThemeGTK.h +@@ -6,6 +6,7 @@ + #ifndef _GTK_NSNATIVETHEMEGTK_H_ + #define _GTK_NSNATIVETHEMEGTK_H_ + ++#include "X11UndefineNone.h" + #include "nsITheme.h" + #include "nsCOMPtr.h" + #include "nsIAtom.h" +diff --git a/widget/gtk/nsScreenGtk.cpp b/widget/gtk/nsScreenGtk.cpp +index 61e6605..28e7f23 100644 +--- a/widget/gtk/nsScreenGtk.cpp ++++ b/widget/gtk/nsScreenGtk.cpp +@@ -50,7 +50,7 @@ nsScreenGtk :: GetRect(int32_t *outLeft, int32_t *outTop, int32_t *outWidth, int + *outHeight = mRect.height; + + return NS_OK; +- ++ + } // GetRect + + +@@ -63,7 +63,7 @@ nsScreenGtk :: GetAvailRect(int32_t *outLeft, int32_t *outTop, int32_t *outWidth + *outHeight = mAvailRect.height; + + return NS_OK; +- ++ + } // GetAvailRect + + gint +@@ -93,7 +93,7 @@ nsScreenGtk :: GetDPIScale() + return dpiScale; + } + +-NS_IMETHODIMP ++NS_IMETHODIMP + nsScreenGtk :: GetPixelDepth(int32_t *aPixelDepth) + { + GdkVisual * visual = gdk_screen_get_system_visual(gdk_screen_get_default()); +@@ -103,7 +103,7 @@ nsScreenGtk :: GetPixelDepth(int32_t *aPixelDepth) + + } // GetPixelDepth + +-NS_IMETHODIMP ++NS_IMETHODIMP + nsScreenGtk :: GetColorDepth(int32_t *aColorDepth) + { + return GetPixelDepth ( aColorDepth ); +@@ -130,6 +130,8 @@ nsScreenGtk :: Init (GdkWindow *aRootWindow) + // versions of GDK predating the GdkScreen object. See bug 256646. + mAvailRect = mRect = nsIntRect(0, 0, width, height); + ++ return; ++ + #ifdef MOZ_X11 + // We need to account for the taskbar, etc in the available rect. + // See http://freedesktop.org/Standards/wm-spec/index.html#id2767771 +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index d97b350..9942399 100644 +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -5,6 +5,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/. */ + ++#include + #include "nsWindow.h" + + #include "mozilla/ArrayUtils.h" +@@ -58,6 +59,10 @@ + #include + #endif + ++#if defined(MOZ_WAYLAND) ++#include ++#endif ++ + #include "nsGkAtoms.h" + + #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION +@@ -457,7 +462,9 @@ nsWindow::nsWindow() + mXVisual = nullptr; + mXDepth = 0; + #endif /* MOZ_X11 */ +- mPluginType = PluginType_NONE; ++#ifdef MOZ_WAYLAND ++ mWaylandSurface = nullptr; ++#endif + + if (!gGlobalsInitialized) { + gGlobalsInitialized = true; +@@ -1390,6 +1397,9 @@ SetUserTimeAndStartupIDForActivatedWindow(GtkWidget* aWindow) + /* static */ guint32 + nsWindow::GetLastUserInputTime() + { ++ if (!GDK_IS_X11_DISPLAY(gdk_display_get_default())) ++ return sLastUserInputTime; ++ + // gdk_x11_display_get_user_time tracks button and key presses, + // DESKTOP_STARTUP_ID used to start the app, drop events from external + // drags, WM_DELETE_WINDOW delete events, but not usually mouse motion nor +@@ -1740,12 +1750,17 @@ nsWindow::GetNativeData(uint32_t aDataType) + return (void*)mPluginNativeWindow->window; + + case NS_NATIVE_DISPLAY: { +-#ifdef MOZ_X11 + GdkDisplay* gdkDisplay = gdk_display_get_default(); ++#if defined(MOZ_X11) + if (GDK_IS_X11_DISPLAY(gdkDisplay)) { + return GDK_DISPLAY_XDISPLAY(gdkDisplay); + } +-#endif /* MOZ_X11 */ ++#endif ++#if defined(MOZ_WAYLAND) ++ if (GDK_IS_WAYLAND_DISPLAY(gdkDisplay)) { ++ return gdk_wayland_display_get_wl_display(gdkDisplay); ++ } ++#endif + return nullptr; + } + case NS_NATIVE_SHELLWIDGET: +@@ -1769,10 +1784,10 @@ nsWindow::GetNativeData(uint32_t aDataType) + } + case NS_NATIVE_OPENGL_CONTEXT: + return nullptr; +-#ifdef MOZ_X11 ++#if defined(MOZ_X11) + case NS_NATIVE_COMPOSITOR_DISPLAY: + return gfxPlatformGtk::GetPlatform()->GetCompositorDisplay(); +-#endif // MOZ_X11 ++#endif + default: + NS_WARNING("nsWindow::GetNativeData called with bad value"); + return nullptr; +@@ -2139,6 +2154,12 @@ nsWindow::OnExposeEvent(cairo_t *cr) + if (!listener) + return FALSE; + ++#ifdef MOZ_WAYLAND ++ // We don't have any Wayland surface to paint to ++ if (mContainer && !mIsX11Display && !moz_container_map_wl_surface(mContainer)) ++ return FALSE; ++#endif ++ + LayoutDeviceIntRegion exposeRegion; + #if (MOZ_WIDGET_GTK == 2) + if (!ExtractExposeRegion(exposeRegion, aEvent)) { +@@ -3055,11 +3076,20 @@ nsWindow::GetEventTimeStamp(guint32 aEventTime) + // In this case too, just return the current timestamp. + return TimeStamp::Now(); + } +- CurrentX11TimeGetter* getCurrentTime = GetCurrentTimeGetter(); +- MOZ_ASSERT(getCurrentTime, +- "Null current time getter despite having a window"); +- return TimeConverter().GetTimeStampFromSystemTime(aEventTime, +- *getCurrentTime); ++ if (!mIsX11Display) { ++ // Wayland uses SYSTEM_TIME_MONOTONIC. ++ // Our posix implemententaion of TimeStamp::Now uses SYSTEM_TIME_MONOTONIC ++ // too. Due to same implementation, we can use this via FromSystemTime. ++ int64_t tick = ++ BaseTimeDurationPlatformUtils::TicksFromMilliseconds(aEventTime); ++ return TimeStamp::FromSystemTime(tick); ++ } else { ++ CurrentX11TimeGetter* getCurrentTime = GetCurrentTimeGetter(); ++ MOZ_ASSERT(getCurrentTime, ++ "Null current time getter despite having a window"); ++ return TimeConverter().GetTimeStampFromSystemTime(aEventTime, ++ *getCurrentTime); ++ } + } + + mozilla::CurrentX11TimeGetter* +@@ -3773,7 +3803,13 @@ nsWindow::Create(nsIWidget* aParent, + // We can't draw directly to top-level window when client side + // decorations are enabled. We use container with GdkWindow instead. + GtkStyleContext* style = gtk_widget_get_style_context(mShell); ++ ++ // Always draw to mozcontainer on Wayland + shellHasCSD = gtk_style_context_has_class(style, "csd"); ++ // We use mContainer to draw on Wayland ++ if (!mIsX11Display) { ++ shellHasCSD = true; ++ } + #endif + if (!shellHasCSD) { + // Use mShell's window for drawing and events. +@@ -3781,13 +3817,14 @@ nsWindow::Create(nsIWidget* aParent, + // Prevent GtkWindow from painting a background to flicker. + gtk_widget_set_app_paintable(mShell, TRUE); + } ++ + // Set up event widget + eventWidget = shellHasCSD ? container : mShell; + gtk_widget_add_events(eventWidget, kEvents); + + gtk_container_add(GTK_CONTAINER(mShell), container); + gtk_widget_realize(container); +- ++ + // make sure this is the focus widget in the container + gtk_widget_show(container); + gtk_widget_grab_focus(container); +@@ -4021,8 +4058,14 @@ nsWindow::Create(nsIWidget* aParent, + + mSurfaceProvider.Initialize(mXDisplay, mXWindow, mXVisual, mXDepth); + } ++#ifdef MOZ_WAYLAND ++ else { ++ mWaylandDisplay = gdk_wayland_display_get_wl_display(gdk_display_get_default()); ++ mWaylandSurface = moz_container_get_wl_surface(MOZ_CONTAINER(mContainer)); ++ mSurfaceProvider.Initialize(this, mWaylandDisplay, mWaylandSurface); ++ } ++#endif + #endif +- + return NS_OK; + } + +@@ -4203,7 +4246,6 @@ nsWindow::NativeShow(bool aAction) + if (mWindowType != eWindowType_invisible) { + SetUserTimeAndStartupIDForActivatedWindow(mShell); + } +- + gtk_widget_show(mShell); + } + else if (mContainer) { +@@ -4704,7 +4746,12 @@ nsWindow::GrabPointer(guint32 aTime) + + if (!mGdkWindow) + return; +- ++/* ++ GdkSeat *gdkSeat = gdk_display_get_default_seat(gdk_display_get_default()); ++ gint retval; ++ retval = gdk_seat_grab(gdkSeat, mGdkWindow, GDK_SEAT_CAPABILITY_ALL_POINTING, TRUE, ++ nullptr, nullptr, nullptr, nullptr); ++*/ + gint retval; + retval = gdk_pointer_grab(mGdkWindow, TRUE, + (GdkEventMask)(GDK_BUTTON_PRESS_MASK | +@@ -4736,6 +4783,10 @@ nsWindow::ReleaseGrabs(void) + LOG(("ReleaseGrabs\n")); + + mRetryPointerGrab = false; ++/* ++ GdkSeat *gdkSeat = gdk_display_get_default_seat(gdk_display_get_default()); ++ gdk_seat_ungrab(gdkSeat); ++*/ + gdk_pointer_ungrab(GDK_CURRENT_TIME); + } + +@@ -6687,8 +6738,7 @@ nsWindow::BeginResizeDrag(WidgetGUIEvent* aEvent, + window_edge = GDK_WINDOW_EDGE_NORTH_WEST; + } else if (aHorizontal == 0) { + window_edge = GDK_WINDOW_EDGE_NORTH; +- } else { +- window_edge = GDK_WINDOW_EDGE_NORTH_EAST; ++ } else { window_edge = GDK_WINDOW_EDGE_NORTH_EAST; + } + } else if (aVertical == 0) { + if (aHorizontal < 0) { +@@ -7027,10 +7077,20 @@ nsWindow::RoundsWidgetCoordinatesTo() + + void nsWindow::GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInitData* aInitData) + { +- #ifdef MOZ_X11 +- *aInitData = mozilla::widget::CompositorWidgetInitData( ++#ifdef MOZ_X11 ++#ifdef MOZ_WAYLAND ++ if (!mIsX11Display) { ++ *aInitData = mozilla::widget::CompositorWidgetInitData( ++ (uintptr_t)mWaylandSurface, ++ nsCString(nullptr), ++ GetClientSize()); ++ } else ++#endif ++ { ++ *aInitData = mozilla::widget::CompositorWidgetInitData( + mXWindow, + nsCString(XDisplayString(mXDisplay)), + GetClientSize()); +- #endif ++ } ++#endif + } +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +index 49a8d4b..e571bed 100644 +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -23,6 +23,9 @@ + #ifdef MOZ_X11 + #include + #endif /* MOZ_X11 */ ++#ifdef MOZ_WAYLAND ++#include ++#endif + + #include "mozilla/widget/WindowSurface.h" + #include "mozilla/widget/WindowSurfaceProvider.h" +@@ -346,9 +349,13 @@ public: + nsIObserver* aObserver) override; + #endif + ++ bool IsX11Display() { return mIsX11Display; } + #ifdef MOZ_X11 + Display* XDisplay() { return mXDisplay; } + #endif ++#ifdef MOZ_WAYLAND ++ wl_display* WaylandDisplay() { return mWaylandDisplay; } ++#endif + virtual void GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInitData* aInitData) override; + + // HiDPI scale conversion +@@ -462,9 +469,12 @@ private: + Window mXWindow; + Visual* mXVisual; + int mXDepth; ++#ifdef MOZ_WAYLAND ++ wl_display* mWaylandDisplay; ++ wl_surface* mWaylandSurface; ++#endif + mozilla::widget::WindowSurfaceProvider mSurfaceProvider; + #endif +- + // Upper bound on pending ConfigureNotify events to be dispatched to the + // window. See bug 1225044. + unsigned int mPendingConfigures; +diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp +index b820fed..ba7fb91 100644 +--- a/widget/nsBaseWidget.cpp ++++ b/widget/nsBaseWidget.cpp +@@ -1407,6 +1407,7 @@ void nsBaseWidget::NotifyRemoteCompositorSessionLost(CompositorSession* aSession + bool nsBaseWidget::ShouldUseOffMainThreadCompositing() + { + return gfxPlatform::UsesOffMainThreadCompositing(); ++ //return false; + } + + LayerManager* nsBaseWidget::GetLayerManager(PLayerTransactionChild* aShadowManager, diff --git a/patches/www-client/firefox-52.0.1/zz-nox11.patch b/patches/www-client/firefox-52.0.1/zz-nox11.patch new file mode 100644 index 0000000..29ef6fa --- /dev/null +++ b/patches/www-client/firefox-52.0.1/zz-nox11.patch @@ -0,0 +1,3734 @@ +diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp +index 6a94176..be9b566 100644 +--- a/dom/base/nsDOMWindowUtils.cpp ++++ b/dom/base/nsDOMWindowUtils.cpp +@@ -69,7 +69,7 @@ + + #if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK) + #include +-#include ++//#include + #endif + + #include "Layers.h" +@@ -312,7 +312,7 @@ nsDOMWindowUtils::Redraw(uint32_t aCount, uint32_t *aDurationOut) + for (uint32_t i = 0; i < aCount; i++) + rootFrame->InvalidateFrame(); + +-#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_X11_no) && defined(MOZ_WIDGET_GTK) + XSync(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), False); + #endif + +diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp +index 22ff711..802d9fe 100644 +--- a/dom/ipc/ContentChild.cpp ++++ b/dom/ipc/ContentChild.cpp +@@ -164,7 +164,7 @@ + #include "mozilla/widget/AudioSession.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -592,7 +592,7 @@ ContentChild::Init(MessageLoop* aIOLoop, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + XRE_InstallX11ErrorHandler(); + #endif +@@ -619,7 +619,7 @@ ContentChild::Init(MessageLoop* aIOLoop, + GetIPCChannel()->SetChannelFlags(MessageChannel::REQUIRE_A11Y_REENTRY); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Send the parent our X socket to act as a proxy reference for our X + // resources. + int xSocketFd = ConnectionNumber(DefaultXDisplay()); +diff --git a/dom/plugins/base/npapi.h b/dom/plugins/base/npapi.h +index 12ac635..2577699 100644 +--- a/dom/plugins/base/npapi.h ++++ b/dom/plugins/base/npapi.h +@@ -43,7 +43,7 @@ + + #if defined(XP_UNIX) + #include +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include + #include + #include "X11UndefineNone.h" +@@ -243,7 +243,7 @@ typedef struct + typedef struct + { + int32_t type; +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + Display* display; + Visual* visual; + Colormap colormap; +@@ -566,7 +566,7 @@ typedef struct _NPEvent + uintptr_t wParam; + uintptr_t lParam; + } NPEvent; +-#elif defined(XP_UNIX) && defined(MOZ_X11) ++#elif defined(XP_UNIX) && defined(MOZ_X11_no) + typedef XEvent NPEvent; + #else + typedef void* NPEvent; +@@ -580,7 +580,7 @@ typedef RgnHandle NPQDRegion; + typedef CGPathRef NPCGRegion; + #elif defined(XP_WIN) + typedef HRGN NPRegion; +-#elif defined(XP_UNIX) && defined(MOZ_X11) ++#elif defined(XP_UNIX) && defined(MOZ_X11_no) + typedef Region NPRegion; + #elif defined(XP_SYMBIAN) + typedef QRegion* NPRegion; +diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp +index 1bea269..0ee9b14 100644 +--- a/dom/plugins/base/nsNPAPIPlugin.cpp ++++ b/dom/plugins/base/nsNPAPIPlugin.cpp +@@ -58,7 +58,7 @@ + // needed for nppdf plugin + #if (MOZ_WIDGET_GTK) + #include +-#include ++//#include + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif +@@ -85,7 +85,7 @@ using mozilla::PluginPRLibrary; + using mozilla::plugins::PluginModuleChromeParent; + using mozilla::plugins::PluginModuleContentParent; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -1745,7 +1745,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result) + + #if defined(XP_UNIX) && !defined(XP_MACOSX) + case NPNVxDisplay : { +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + if (npp) { + nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *) npp->ndata; + bool windowless = false; +diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp +index b7651be..0f7e4b0 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 ++#ifdef MOZ_X11_no + #include + #include "gfxXlibSurface.h" + /* X headers suck */ +@@ -745,7 +745,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value) + } + + return NS_OK; +-#elif defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) ++#elif defined(MOZ_WIDGET_GTK) && defined(MOZ_X11_no) + // X11 window managers want the toplevel window for WM_TRANSIENT_FOR. + nsIWidget* win = mPluginFrame->GetNearestWidget(); + if (!win) +@@ -2102,7 +2102,7 @@ nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent) + return NS_OK; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static unsigned int XInputEventState(const WidgetInputEvent& anEvent) + { + unsigned int state = 0; +@@ -2582,7 +2582,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent) + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // this code supports windowless plugins + nsIWidget* widget = anEvent.mWidget; + XEvent pluginEvent = XEvent(); +@@ -3055,7 +3055,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext, + } + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + void nsPluginInstanceOwner::Paint(gfxContext* aContext, + const gfxRect& aFrameRect, + const gfxRect& aDirtyRect) +@@ -3200,7 +3200,7 @@ nsPluginInstanceOwner::Renderer::DrawWithXlib(cairo_surface_t* xsurface, + + NPSetWindowCallbackStruct* ws_info = + static_cast(mWindow->ws_info); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (ws_info->visual != visual || ws_info->colormap != colormap) { + ws_info->visual = visual; + ws_info->colormap = colormap; +@@ -3419,7 +3419,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void) + // passing HDC till paint event when it is really + // needed. Change spec? + mPluginWindow->window = nullptr; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // 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 589bcb0..66609b4 100644 +--- a/dom/plugins/base/nsPluginInstanceOwner.h ++++ b/dom/plugins/base/nsPluginInstanceOwner.h +@@ -45,7 +45,7 @@ class PuppetWidget; + + using mozilla::widget::PuppetWidget; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibNativeRenderer.h" + #endif + +@@ -214,7 +214,7 @@ public: + return mPluginWindow->type == NPWindowTypeDrawable && + (MatchPluginName("Shockwave Flash") || + MatchPluginName("Test Plug-in")); +-#elif defined(MOZ_X11) || defined(XP_MACOSX) ++#elif defined(MOZ_X11_no) || defined(XP_MACOSX) + return true; + #else + return false; +@@ -393,7 +393,7 @@ private: + + int mLastMouseDownButtonType; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + class Renderer : public gfxXlibNativeRenderer + { + public: +diff --git a/dom/plugins/base/nsPluginNativeWindowGtk.cpp b/dom/plugins/base/nsPluginNativeWindowGtk.cpp +index bfb9510..33a6982 100644 +--- a/dom/plugins/base/nsPluginNativeWindowGtk.cpp ++++ b/dom/plugins/base/nsPluginNativeWindowGtk.cpp +@@ -14,15 +14,15 @@ + #include "nsNPAPIPlugin.h" + #include "npapi.h" + #include +-#include ++//#include + #include + + #if (GTK_MAJOR_VERSION == 3) +-#include ++//#include + #else + #include "gtk2xtbin.h" + #endif +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + static void plug_added_cb(GtkWidget *widget, gpointer data); + static gboolean plug_removed_cb (GtkWidget *widget, gpointer data); +@@ -41,10 +41,10 @@ nsPluginNativeWindowGtk::nsPluginNativeWindowGtk() : nsPluginNativeWindow() + type = NPWindowTypeWindow; + mSocketWidget = 0; + mWsInfo.type = 0; +- mWsInfo.display = nullptr; +- mWsInfo.visual = nullptr; +- mWsInfo.colormap = 0; +- mWsInfo.depth = 0; ++ //mWsInfo.display = nullptr; ++ //mWsInfo.visual = nullptr; ++ //mWsInfo.colormap = 0; ++ //mWsInfo.depth = 0; + } + + nsPluginNativeWindowGtk::~nsPluginNativeWindowGtk() +@@ -71,159 +71,11 @@ nsresult PLUG_DeletePluginNativeWindow(nsPluginNativeWindow * aPluginNativeWindo + + nsresult nsPluginNativeWindowGtk::CallSetWindow(RefPtr &aPluginInstance) + { +- if (aPluginInstance) { +- if (type == NPWindowTypeWindow && +- XRE_IsContentProcess()) { +- // In this case, most of the initialization code here has already happened +- // in the chrome process. The window we have in content is the XID of the +- // socket widget we need to hand to plugins. +- SetWindow((XID)window); +- } else if (type == NPWindowTypeWindow) { +- if (!mSocketWidget) { +- nsresult rv; +- +- // The documentation on the types for many variables in NP(N|P)_GetValue +- // is vague. Often boolean values are NPBool (1 byte), but +- // https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins +- // treats NPPVpluginNeedsXEmbed as PRBool (int), and +- // on x86/32-bit, flash stores to this using |movl 0x1,&needsXEmbed|. +- // thus we can't use NPBool for needsXEmbed, or the three bytes above +- // it on the stack would get clobbered. so protect with the larger bool. +- int needsXEmbed = 0; +- rv = aPluginInstance->GetValueFromPlugin(NPPVpluginNeedsXEmbed, &needsXEmbed); +- // If the call returned an error code make sure we still use our default value. +- if (NS_FAILED(rv)) { +- needsXEmbed = 0; +- } +-#ifdef DEBUG +- printf("nsPluginNativeWindowGtk: NPPVpluginNeedsXEmbed=%d\n", needsXEmbed); +-#endif +- +- bool isOOPPlugin = aPluginInstance->GetPlugin()->GetLibrary()->IsOOP(); +- if (needsXEmbed || isOOPPlugin) { +- bool enableXtFocus = !needsXEmbed; +- rv = CreateXEmbedWindow(enableXtFocus); +- } +- else { +-#if (MOZ_WIDGET_GTK == 2) +- rv = CreateXtWindow(); +-#else +- return NS_ERROR_FAILURE; +-#endif +- } +- +- if (NS_FAILED(rv)) { +- return NS_ERROR_FAILURE; +- } +- } +- +- if (!mSocketWidget) { +- return NS_ERROR_FAILURE; +- } +- +- // Make sure to resize and re-place the window if required. +- SetAllocation(); +- // Need to reset "window" each time as nsPluginFrame::DidReflow sets it +- // to the ancestor window. +-#if (MOZ_WIDGET_GTK == 2) +- if (GTK_IS_XTBIN(mSocketWidget)) { +- // Point the NPWindow structures window to the actual X window +- SetWindow(GTK_XTBIN(mSocketWidget)->xtwindow); +- } +- else { // XEmbed or OOP&Xt +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +- } +-#else +- // Gtk3 supports only OOP by GtkSocket +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +-#endif +- +-#ifdef DEBUG +- printf("nsPluginNativeWindowGtk: call SetWindow with xid=%p\n", (void *)window); +-#endif +- } // NPWindowTypeWindow +- aPluginInstance->SetWindow(this); +- } else if (mPluginInstance) { +- mPluginInstance->SetWindow(nullptr); +- } +- +- SetPluginInstance(aPluginInstance); +- return NS_OK; ++ return NS_ERROR_FAILURE; + } + + nsresult nsPluginNativeWindowGtk::CreateXEmbedWindow(bool aEnableXtFocus) { +- NS_ASSERTION(!mSocketWidget,"Already created a socket widget!"); +- GdkDisplay *display = gdk_display_get_default(); +- GdkWindow *parent_win = gdk_x11_window_lookup_for_display(display, GetWindow()); +- mSocketWidget = gtk_socket_new(); +- +- //attach the socket to the container widget +- gtk_widget_set_parent_window(mSocketWidget, parent_win); +- +- // enable/disable focus event handlers, +- // see plugin_window_filter_func() for details +- g_object_set_data(G_OBJECT(mSocketWidget), "enable-xt-focus", (void *)aEnableXtFocus); +- +- g_signal_connect(mSocketWidget, "plug_added", +- G_CALLBACK(plug_added_cb), nullptr); +- +- // Make sure to handle the plug_removed signal. If we don't the +- // socket will automatically be destroyed when the plug is +- // removed, which means we're destroying it more than once. +- // SYNTAX ERROR. +- g_signal_connect(mSocketWidget, "plug_removed", +- G_CALLBACK(plug_removed_cb), nullptr); +- +- g_signal_connect(mSocketWidget, "unrealize", +- G_CALLBACK(socket_unrealize_cb), nullptr); +- +- g_signal_connect(mSocketWidget, "destroy", +- G_CALLBACK(gtk_widget_destroyed), &mSocketWidget); +- +- gpointer user_data = nullptr; +- gdk_window_get_user_data(parent_win, &user_data); +- +- GtkContainer *container = GTK_CONTAINER(user_data); +- gtk_container_add(container, mSocketWidget); +- gtk_widget_realize(mSocketWidget); +- +- // The GtkSocket has a visible window, but the plugin's XEmbed plug will +- // cover this window. Normally GtkSockets let the X server paint their +- // background and this would happen immediately (before the plug is +- // created). Setting the background to None prevents the server from +- // painting this window, avoiding flicker. +- // TODO GTK3 +-#if (MOZ_WIDGET_GTK == 2) +- gdk_window_set_back_pixmap(gtk_widget_get_window(mSocketWidget), nullptr, FALSE); +-#endif +- +- // Resize before we show +- SetAllocation(); +- +- gtk_widget_show(mSocketWidget); +- +- gdk_flush(); +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +- +- // Fill out the ws_info structure. +- // (The windowless case is done in nsPluginFrame.cpp.) +- GdkWindow *gdkWindow = gdk_x11_window_lookup_for_display(display, GetWindow()); +- if(!gdkWindow) +- return NS_ERROR_FAILURE; +- +- mWsInfo.display = GDK_WINDOW_XDISPLAY(gdkWindow); +-#if (MOZ_WIDGET_GTK == 2) +- mWsInfo.colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(gdkWindow)); +- GdkVisual* gdkVisual = gdk_drawable_get_visual(gdkWindow); +- mWsInfo.depth = gdkVisual->depth; +-#else +- mWsInfo.colormap = X11None; +- GdkVisual* gdkVisual = gdk_window_get_visual(gdkWindow); +- mWsInfo.depth = gdk_visual_get_depth(gdkVisual); +-#endif +- mWsInfo.visual = GDK_VISUAL_XVISUAL(gdkVisual); +- +- return NS_OK; ++ return NS_ERROR_FAILURE; + } + + void nsPluginNativeWindowGtk::SetAllocation() { +@@ -304,8 +156,6 @@ plug_added_cb(GtkWidget *socket, gpointer data) + // receives the DestroyNotify event for the plug window, GDK releases its + // reference to plugWindow. This is typically the last reference and so the + // weak ref callback triggers release of the socket. +- GdkWindow* plugWindow = gtk_socket_get_plug_window(GTK_SOCKET(socket)); +- g_object_weak_ref(G_OBJECT(plugWindow), plug_window_finalize_cb, socket); + } + + /* static */ +@@ -319,38 +169,4 @@ plug_removed_cb (GtkWidget *widget, gpointer data) + static void + socket_unrealize_cb(GtkWidget *widget, gpointer data) + { +- // Unmap and reparent any child windows that GDK does not yet know about. +- // (See bug 540114 comment 10.) +- GdkWindow* socket_window = gtk_widget_get_window(widget); +- GdkDisplay* gdkDisplay = gdk_display_get_default(); +- Display* display = GDK_DISPLAY_XDISPLAY(gdkDisplay); +- +- // Ignore X errors that may happen if windows get destroyed (possibly +- // requested by the plugin) between XQueryTree and when we operate on them. +- gdk_error_trap_push(); +- +- Window root, parent; +- Window* children; +- unsigned int nchildren; +- if (!XQueryTree(display, gdk_x11_window_get_xid(socket_window), +- &root, &parent, &children, &nchildren)) +- return; +- +- for (unsigned int i = 0; i < nchildren; ++i) { +- Window child = children[i]; +- if (!gdk_x11_window_lookup_for_display(gdkDisplay, child)) { +- // This window is not known to GDK. +- XUnmapWindow(display, child); +- XReparentWindow(display, child, DefaultRootWindow(display), 0, 0); +- } +- } +- +- if (children) XFree(children); +- +- mozilla::FinishX(display); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif + } +diff --git a/dom/plugins/base/nsPluginNativeWindowGtk.h b/dom/plugins/base/nsPluginNativeWindowGtk.h +index 872d7f0..30cd67a 100644 +--- a/dom/plugins/base/nsPluginNativeWindowGtk.h ++++ b/dom/plugins/base/nsPluginNativeWindowGtk.h +@@ -8,14 +8,14 @@ + #include "nsPluginNativeWindow.h" + #include "npapi.h" + #include +-#include ++//#include + #include + #if (GTK_MAJOR_VERSION == 3) +-#include ++//#include + #else + #include "gtk2xtbin.h" + #endif +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + class nsPluginNativeWindowGtk : public nsPluginNativeWindow { + public: +@@ -26,16 +26,8 @@ public: + nsresult CreateXEmbedWindow(bool aEnableXtFocus); + void SetAllocation(); + +- XID GetWindow() const +- { +- return static_cast(reinterpret_cast(window)); +- } + + private: +- void SetWindow(XID aWindow) +- { +- window = reinterpret_cast(static_cast(aWindow)); +- } + + NPSetWindowCallbackStruct mWsInfo; + /** +diff --git a/dom/plugins/ipc/NPEventUnix.h b/dom/plugins/ipc/NPEventUnix.h +index 4cc9a54..fe0e295 100644 +--- a/dom/plugins/ipc/NPEventUnix.h ++++ b/dom/plugins/ipc/NPEventUnix.h +@@ -9,7 +9,7 @@ + + #include "npapi.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -61,7 +61,7 @@ struct ParamTraits // synonym for XEvent + return false; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + SetXDisplay(aResult->event); + #endif + return true; +@@ -73,7 +73,7 @@ struct ParamTraits // synonym for XEvent + aLog->append(L"(XEvent)"); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + private: + static void SetXDisplay(XEvent& ev) + { +diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp +index 2640fdd..1a60ab7 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.cpp ++++ b/dom/plugins/ipc/PluginInstanceChild.cpp +@@ -16,7 +16,7 @@ + #include "gfx2DGlue.h" + #include "nsNPAPIPluginInstance.h" + #include "mozilla/gfx/2D.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + #ifdef XP_WIN +@@ -50,7 +50,7 @@ using namespace std; + #ifdef MOZ_WIDGET_GTK + + #include +-#include ++//#include + #include + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" +@@ -200,7 +200,7 @@ 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 defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + mWindow.ws_info = &mWsInfo; + memset(&mWsInfo, 0, sizeof(mWsInfo)); + #if (MOZ_WIDGET_GTK == 2) +@@ -391,7 +391,7 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar, + + switch(aVar) { + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + case NPNVToolkit: + *((NPNToolkitType*)aValue) = NPNVGtk2; + return NPERR_NO_ERROR; +@@ -461,7 +461,7 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar, + *static_cast(aValue) = mPluginWindowHWND; + return NPERR_NO_ERROR; + } +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + NPError result; + CallNPN_GetValue_NPNVnetscapeWindow(static_cast(aValue), &result); + return result; +@@ -742,7 +742,7 @@ PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginNeedsXEmbed( + AssertPluginThread(); + AutoStackHelper guard(this); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // The documentation on the types for many variables in NP(N|P)_GetValue + // is vague. Often boolean values are NPBool (1 byte), but + // https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins +@@ -900,7 +900,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent(const NPRemoteEvent& event, + AssertPluginThread(); + AutoStackHelper guard(this); + +-#if defined(MOZ_X11) && defined(DEBUG) ++#if defined(MOZ_X11_no) && defined(DEBUG) + if (GraphicsExpose == event.event.type) + PLUGIN_LOG_DEBUG((" received drawable 0x%lx\n", + event.event.xgraphicsexpose.drawable)); +@@ -958,7 +958,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent(const NPRemoteEvent& event, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (GraphicsExpose == event.event.type) { + // Make sure the X server completes the drawing before the parent + // draws on top and destroys the Drawable. +@@ -1191,7 +1191,7 @@ PluginInstanceChild::RecvContentsScaleFactorChanged(const double& aContentsScale + #endif + } + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + // Create a new window from NPWindow + bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow) + { +@@ -1289,7 +1289,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + AssertPluginThread(); + AutoStackHelper guard(this); + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + NS_ASSERTION(mWsInfo.display, "We should have a valid display!"); + + // The minimum info is sent over IPC to allow this +@@ -1428,6 +1428,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + + #elif defined(ANDROID) + // TODO: Need Android impl ++#elif defined(MOZ_WIDGET_GTK) + #elif defined(MOZ_WIDGET_UIKIT) + // Don't care + #else +@@ -3407,7 +3408,7 @@ PluginInstanceChild::CreateOptSurface(void) + (mIsTransparent && !mBackground) ? SurfaceFormat::A8R8G8B8_UINT32 : + SurfaceFormat::X8R8G8B8_UINT32; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Display* dpy = mWsInfo.display; + Screen* screen = DefaultScreenOfDisplay(dpy); + if (format == SurfaceFormat::X8R8G8B8_UINT32 && +@@ -3467,7 +3468,7 @@ PluginInstanceChild::MaybeCreatePlatformHelperSurface(void) + return false; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + bool supportNonDefaultVisual = false; + Screen* screen = DefaultScreenOfDisplay(mWsInfo.display); + Visual* defaultVisual = DefaultVisualOfScreen(screen); +@@ -3626,11 +3627,11 @@ PluginInstanceChild::EnsureCurrentBuffer(void) + void + PluginInstanceChild::UpdateWindowAttributes(bool aForceSetWindow) + { +-#if defined(MOZ_X11) || defined(XP_WIN) ++#if defined(MOZ_X11_no) || defined(XP_WIN) + RefPtr curSurface = mHelperSurface ? mHelperSurface : mCurrentSurface; + #endif // Only used within MOZ_X11 or XP_WIN blocks. Unused variable otherwise + bool needWindowUpdate = aForceSetWindow; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Visual* visual = nullptr; + Colormap colormap = 0; + if (curSurface && curSurface->GetType() == gfxSurfaceType::Xlib) { +@@ -3726,7 +3727,7 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect, + // We should not send an async surface if we're using direct rendering. + MOZ_ASSERT(!IsUsingDirectDrawing()); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { + NS_ASSERTION(aSurface->GetType() == gfxSurfaceType::Xlib, + "Non supported platform surface type"); +@@ -3783,7 +3784,7 @@ PluginInstanceChild::PaintRectToSurface(const nsIntRect& aRect, + // Render using temporary X surface, with copy to image surface + nsIntRect plPaintRect(aRect); + RefPtr renderSurface = aSurface; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + 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 +@@ -4132,7 +4133,7 @@ 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 ++#ifdef MOZ_X11_no + if (mCurrentSurface->GetType() == gfxSurfaceType::Xlib) { + gfxXlibSurface *xsurf = static_cast(mCurrentSurface.get()); + currSurf = SurfaceDescriptorX11(xsurf); +@@ -4184,7 +4185,7 @@ 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 defined(MOZ_X11_no) + if (mBackSurface->GetType() != gfxSurfaceType::Xlib && + !gfxSharedImageSurface::IsSharedImage(mBackSurface)) + return false; +@@ -4193,7 +4194,7 @@ PluginInstanceChild::ReadbackDifferenceRect(const nsIntRect& rect) + return false; + #endif + +-#if defined(MOZ_X11) || defined(XP_WIN) ++#if defined(MOZ_X11_no) || defined(XP_WIN) + if (mCurrentSurface->GetContentType() != mBackSurface->GetContentType()) + return false; + +@@ -4311,7 +4312,7 @@ PluginInstanceChild::RecvUpdateBackground(const SurfaceDescriptor& aBackground, + if (!mBackground) { + // XXX refactor me + switch (aBackground.type()) { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case SurfaceDescriptor::TSurfaceDescriptorX11: { + mBackground = aBackground.get_SurfaceDescriptorX11().OpenForeign(); + break; +@@ -4656,7 +4657,7 @@ PluginInstanceChild::Destroy() + xt_client_xloop_destroy(); + } + #endif +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + DeleteWindow(); + #endif + } +diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp +index 02f0641..cc0dff1 100644 +--- a/dom/plugins/ipc/PluginInstanceParent.cpp ++++ b/dom/plugins/ipc/PluginInstanceParent.cpp +@@ -28,7 +28,7 @@ + #include "nsPluginInstanceOwner.h" + #include "nsFocusManager.h" + #include "nsIDOMElement.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + #include "gfxContext.h" +@@ -193,7 +193,7 @@ PluginInstanceParent::ActorDestroy(ActorDestroyReason why) + if (mImageContainer) { + mImageContainer->ClearAllImages(); + } +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + FinishX(DefaultXDisplay()); + #endif + } +@@ -266,7 +266,7 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle* + { + #ifdef XP_WIN + HWND id; +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + XID id; + #elif defined(XP_DARWIN) + intptr_t id; +@@ -274,7 +274,7 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle* + // TODO: Need Android impl + int id; + #else +-#warning Implement me ++ int id; + #endif + + *result = mNPNIface->getvalue(mNPP, NPNVnetscapeWindow, &id); +@@ -476,7 +476,7 @@ PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginDrawingModel( + case NPDrawingModelAsyncWindowsDXGISurface: + allowed = AllowDirectDXGISurfaceDrawing(); + break; +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + case NPDrawingModelSyncX: + allowed = true; + break; +@@ -910,7 +910,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, + return true; + } + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + else if (newSurface.type() == SurfaceDescriptor::TSurfaceDescriptorX11) { + surface = newSurface.get_SurfaceDescriptorX11().OpenForeign(); + } +@@ -927,7 +927,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, + // 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 ++#ifdef MOZ_X11_no + 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 +@@ -1170,7 +1170,7 @@ PluginInstanceParent::EndUpdateBackground(const nsIntRect& aRect) + ("[InstanceParent][%p] EndUpdateBackground for ", + this, aRect.x, aRect.y, aRect.width, aRect.height)); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // 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 +@@ -1227,7 +1227,7 @@ PluginInstanceParent::CreateBackground(const nsIntSize& aSize) + + // XXX refactor me + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + Screen* screen = DefaultScreenOfDisplay(DefaultXDisplay()); + Visual* visual = DefaultVisualOfScreen(screen); + mBackground = gfxXlibSurface::Create(screen, visual, +@@ -1272,7 +1272,7 @@ PluginInstanceParent::BackgroundDescriptor() + + // XXX refactor me + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibSurface* xsurf = static_cast(mBackground.get()); + return SurfaceDescriptorX11(xsurf); + #endif +@@ -1399,7 +1399,7 @@ PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow) + } + #endif + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + const NPSetWindowCallbackStruct* ws_info = + static_cast(aWindow->ws_info); + window.visualID = ws_info->visual ? ws_info->visual->visualid : 0; +@@ -1436,7 +1436,7 @@ PluginInstanceParent::NPP_GetValue(NPPVariable aVariable, + return NPERR_NO_ERROR; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case NPPVpluginNeedsXEmbed: { + bool needsXEmbed; + NPError rv; +@@ -1616,7 +1616,7 @@ PluginInstanceParent::NPP_HandleEvent(void* event) + } + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + switch (npevent->type) { + case GraphicsExpose: + PLUGIN_LOG_DEBUG((" schlepping drawable 0x%lx across the pipe\n", +diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp +index 47653fe..60b3f20 100644 +--- a/dom/plugins/ipc/PluginMessageUtils.cpp ++++ b/dom/plugins/ipc/PluginMessageUtils.cpp +@@ -50,7 +50,7 @@ namespace plugins { + + NPRemoteWindow::NPRemoteWindow() : + window(0), x(0), y(0), width(0), height(0), type(NPWindowTypeDrawable) +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + , visualID(0) + , colormap(0) + #endif /* XP_UNIX */ +diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h +index 55be59d..f158e91 100644 +--- a/dom/plugins/ipc/PluginMessageUtils.h ++++ b/dom/plugins/ipc/PluginMessageUtils.h +@@ -90,7 +90,7 @@ struct NPRemoteWindow + uint32_t height; + NPRect clipRect; + NPWindowType type; +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + VisualID visualID; + Colormap colormap; + #endif /* XP_UNIX */ +@@ -112,10 +112,12 @@ struct NPAudioDeviceChangeDetailsIPC + + #ifdef XP_WIN + typedef HWND NativeWindowHandle; +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + typedef XID NativeWindowHandle; + #elif defined(XP_DARWIN) || defined(ANDROID) + typedef intptr_t NativeWindowHandle; // never actually used, will always be 0 ++#elif defined(XP_UNIX) ++typedef intptr_t NativeWindowHandle; + #else + #error Need NativeWindowHandle for this platform + #endif +@@ -360,7 +362,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 defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + aMsg->WriteULong(aParam.visualID); + aMsg->WriteULong(aParam.colormap); + #endif +@@ -385,7 +387,7 @@ struct ParamTraits + ReadParam(aMsg, aIter, &type))) + return false; + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + unsigned long visualID; + unsigned long colormap; + if (!(aMsg->ReadULong(aIter, &visualID) && +@@ -406,7 +408,7 @@ struct ParamTraits + aResult->height = height; + aResult->clipRect = clipRect; + aResult->type = type; +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + aResult->visualID = visualID; + aResult->colormap = colormap; + #endif +diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp +index 84dc7c7..c21d328 100644 +--- a/dom/plugins/ipc/PluginModuleChild.cpp ++++ b/dom/plugins/ipc/PluginModuleChild.cpp +@@ -11,7 +11,7 @@ + + #include "mozilla/ipc/MessageChannel.h" + +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + #include + #endif + +@@ -23,7 +23,7 @@ + #include "nsPluginsDir.h" + #include "nsXULAppAPI.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + # include "nsX11ErrorHandler.h" + # include "mozilla/X11Util.h" + #endif +@@ -122,7 +122,7 @@ PluginModuleChild::PluginModuleChild(bool aIsChrome) + , mInitializeFunc(0) + #if defined(OS_WIN) || defined(OS_MACOSX) + , mGetEntryPointsFunc(0) +-#elif defined(MOZ_WIDGET_GTK) ++#elif defined(MOZ_WIDGET_GTK_no) + , mNestedLoopTimerId(0) + #endif + #ifdef OS_WIN +@@ -258,7 +258,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + // XXX quirks isn't initialized yet + mAsyncRenderSupport = info.fSupportsAsyncRender; + #endif +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + NS_NAMED_LITERAL_CSTRING(flash10Head, "Shockwave Flash 10."); + if (StringBeginsWith(nsDependentCString(info.fDescription), flash10Head)) { + AddQuirk(QUIRK_FLASH_EXPOSE_COORD_TRANSLATION); +@@ -271,7 +271,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + mozilla::plugins::PluginUtilsOSX::SetProcessName(nameBuffer); + #endif + pluginFile.FreePluginInfo(info); +-#if defined(MOZ_X11) || defined(XP_MACOSX) ++#if defined(MOZ_X11_no) || defined(XP_MACOSX) + if (!mLibrary) + #endif + { +@@ -319,7 +319,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + return true; + } + +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + + typedef void (*GObjectDisposeFn)(GObject*); + typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*); +@@ -545,6 +545,17 @@ PluginModuleChild::ExitedCxxStack() + mNestedLoopTimerId = 0; + } + ++#else ++void ++PluginModuleChild::EnteredCxxStack() ++{ ++} ++ ++void ++PluginModuleChild::ExitedCxxStack() ++{ ++} ++ + #endif + + bool +@@ -568,7 +579,7 @@ PluginModuleChild::ShouldContinueFromReplyTimeout() + bool + PluginModuleChild::InitGraphics() + { +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + // Work around plugins that don't interact well with GDK + // client-side windows. + PR_SetEnv("GDK_NATIVE_WINDOWS=1"); +@@ -607,7 +618,7 @@ PluginModuleChild::InitGraphics() + #else + // may not be necessary on all platforms + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + InstallX11ErrorHandler(); + #endif +@@ -617,7 +628,7 @@ PluginModuleChild::InitGraphics() + void + PluginModuleChild::DeinitGraphics() + { +-#if defined(MOZ_X11) && defined(NS_FREE_PERMANENT_DATA) ++#if defined(MOZ_X11_no) && defined(NS_FREE_PERMANENT_DATA) + // 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. +@@ -1103,7 +1114,7 @@ _getvalue(NPP aNPP, + switch (aVariable) { + // Copied from nsNPAPIPlugin.cpp + case NPNVToolkit: +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + *static_cast(aValue) = NPNVGtk2; + return NPERR_NO_ERROR; + #endif +@@ -1124,7 +1135,7 @@ _getvalue(NPP aNPP, + case NPNVSupportsWindowless: + *(NPBool*)aValue = PluginModuleChild::GetChrome()->Settings().supportsWindowless(); + return NPERR_NO_ERROR; +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + case NPNVxDisplay: { + if (aNPP) { + return InstCast(aNPP)->NPN_GetValue(aVariable, aValue); +@@ -1888,7 +1899,7 @@ PluginModuleChild::DoNP_Initialize(const PluginSettings& aSettings) + SetEventHooks(); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Send the parent our X socket to act as a proxy reference for our X + // resources. + int xSocketFd = ConnectionNumber(DefaultXDisplay()); +diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h +index 233a953..4c88f4f 100644 +--- a/dom/plugins/ipc/PluginModuleChild.h ++++ b/dom/plugins/ipc/PluginModuleChild.h +@@ -11,6 +11,7 @@ + + #include + #include ++#include + + #include "base/basictypes.h" + +diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build +index b569aeb..f4dab4a 100644 +--- a/dom/plugins/ipc/moz.build ++++ b/dom/plugins/ipc/moz.build +@@ -137,7 +137,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gtk3': + CXXFLAGS += CONFIG['TK_CFLAGS'] + else: + # Force build against gtk+2 for struct offsets and such. +- CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] ++ CXXFLAGS += CONFIG['TK_CFLAGS'] ++ #CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] + + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + +diff --git a/gfx/2d/BorrowedContext.h b/gfx/2d/BorrowedContext.h +index edb923b..148067a 100644 +--- a/gfx/2d/BorrowedContext.h ++++ b/gfx/2d/BorrowedContext.h +@@ -8,7 +8,7 @@ + + #include "2D.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include "X11UndefineNone.h" +@@ -75,7 +75,7 @@ private: + DrawTarget *mDT; + }; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + /* This is a helper class that let's you borrow an Xlib drawable from + * a DrawTarget. This is used for drawing themed widgets. + * +diff --git a/gfx/2d/DrawTargetCairo.cpp b/gfx/2d/DrawTargetCairo.cpp +index c0e4f0a..b4775ec 100644 +--- a/gfx/2d/DrawTargetCairo.cpp ++++ b/gfx/2d/DrawTargetCairo.cpp +@@ -2315,7 +2315,7 @@ BorrowedCairoContext::ReturnCairoContextToDrawTarget(DrawTarget* aDT, + cairoDT->mContext = aCairo; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + bool + BorrowedXlibDrawable::Init(DrawTarget* aDT) + { +diff --git a/gfx/angle/include/EGL/eglplatform.h b/gfx/angle/include/EGL/eglplatform.h +index 6d550da..2099e0d 100755 +--- a/gfx/angle/include/EGL/eglplatform.h ++++ b/gfx/angle/include/EGL/eglplatform.h +@@ -105,6 +105,13 @@ typedef intptr_t EGLNativeDisplayType; + typedef intptr_t EGLNativeWindowType; + typedef intptr_t EGLNativePixmapType; + ++//#elif defined(MESA_EGL_NO_X11_HEADERS) ++#elif defined(__unix__) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ + #elif defined(__unix__) + + /* X11 (tentative) */ +diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h +index 6e096c1..b6ea9b7 100644 +--- a/gfx/gl/GLContextProvider.h ++++ b/gfx/gl/GLContextProvider.h +@@ -41,18 +41,20 @@ namespace gl { + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderCGL + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #define GL_CONTEXT_PROVIDER_NAME GLContextProviderGLX + #include "GLContextProviderImpl.h" + #undef GL_CONTEXT_PROVIDER_NAME + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderGLX + #endif + +-#define GL_CONTEXT_PROVIDER_NAME GLContextProviderEGL +-#include "GLContextProviderImpl.h" +-#undef GL_CONTEXT_PROVIDER_NAME +-#ifndef GL_CONTEXT_PROVIDER_DEFAULT +- #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL ++#ifndef MOZ_GL_PROVIDER ++ #define GL_CONTEXT_PROVIDER_NAME GLContextProviderEGL ++ #include "GLContextProviderImpl.h" ++ #undef GL_CONTEXT_PROVIDER_NAME ++ #ifndef GL_CONTEXT_PROVIDER_DEFAULT ++ #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL ++ #endif + #endif + + #if defined(MOZ_WIDGET_UIKIT) +diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp +index ca972e0..c34e231 100644 +--- a/gfx/gl/GLContextProviderEGL.cpp ++++ b/gfx/gl/GLContextProviderEGL.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/. */ + +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + #include + // we're using default display for now + #define GET_NATIVE_WINDOW(aWidget) ((EGLNativeWindowType)GDK_WINDOW_XID((GdkWindow*)aWidget->GetNativeData(NS_NATIVE_WINDOW))) +diff --git a/gfx/gl/GLLibraryEGL.h b/gfx/gl/GLLibraryEGL.h +index fa6ea74..1cbabff 100644 +--- a/gfx/gl/GLLibraryEGL.h ++++ b/gfx/gl/GLLibraryEGL.h +@@ -5,7 +5,7 @@ + #ifndef GLLIBRARYEGL_H_ + #define GLLIBRARYEGL_H_ + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include "mozilla/X11Util.h" + #endif + +@@ -46,7 +46,7 @@ + #endif + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)mozilla::DefaultXDisplay()) + #else + #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build +index 596612b..859d6bb 100644 +--- a/gfx/gl/moz.build ++++ b/gfx/gl/moz.build +@@ -13,10 +13,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit': + gl_provider = 'EAGL' + elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: +- if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']: +- gl_provider = 'EGL' +- else: +- gl_provider = 'GLX' ++ gl_provider = 'EGL' + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': + gl_provider = 'EGL' + +diff --git a/gfx/ipc/GPUProcessManager.cpp b/gfx/ipc/GPUProcessManager.cpp +index 0b55cd9..cb03c05 100644 +--- a/gfx/ipc/GPUProcessManager.cpp ++++ b/gfx/ipc/GPUProcessManager.cpp +@@ -17,7 +17,7 @@ + #include "mozilla/layers/LayerTreeOwnerTracker.h" + #include "mozilla/layers/RemoteCompositorSession.h" + #include "mozilla/widget/PlatformWidgetTypes.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetChild.h" + #endif + #include "nsBaseWidget.h" +@@ -526,7 +526,7 @@ GPUProcessManager::CreateRemoteSession(nsBaseWidget* aWidget, + bool aUseExternalSurfaceSize, + const gfx::IntSize& aSurfaceSize) + { +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + ipc::Endpoint parentPipe; + ipc::Endpoint childPipe; + +diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp +index 7182731..6149ede 100644 +--- a/gfx/layers/client/TextureClient.cpp ++++ b/gfx/layers/client/TextureClient.cpp +@@ -41,7 +41,7 @@ + #include "gfxWindowsPlatform.h" + #include "gfx2DGlue.h" + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/layers/TextureClientX11.h" + #ifdef GL_PROVIDER_GLX + #include "GLXLibrary.h" +@@ -1054,7 +1054,7 @@ TextureClient::CreateForDrawing(TextureForwarder* aAllocator, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxSurfaceType type = + gfxPlatform::GetPlatform()->ScreenReferenceSurface()->GetType(); + +diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp +index 8c5b8c7..1af335e 100644 +--- a/gfx/layers/composite/TextureHost.cpp ++++ b/gfx/layers/composite/TextureHost.cpp +@@ -35,7 +35,7 @@ + #include "../d3d11/CompositorD3D11.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/layers/X11TextureHost.h" + #endif + +@@ -208,7 +208,7 @@ TextureHost::Create(const SurfaceDescriptor& aDesc, + return CreateTextureHostBasic(aDesc, aDeallocator, aFlags); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case SurfaceDescriptor::TSurfaceDescriptorX11: { + const SurfaceDescriptorX11& desc = aDesc.get_SurfaceDescriptorX11(); + return MakeAndAddRef(aFlags, desc); +diff --git a/gfx/layers/ipc/CompositorBridgeChild.cpp b/gfx/layers/ipc/CompositorBridgeChild.cpp +index 6c716ec..e3fb4cd 100644 +--- a/gfx/layers/ipc/CompositorBridgeChild.cpp ++++ b/gfx/layers/ipc/CompositorBridgeChild.cpp +@@ -40,7 +40,7 @@ + #include "WinUtils.h" + #endif + #include "mozilla/widget/CompositorWidget.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetChild.h" + #endif + #include "VsyncSource.h" +@@ -1064,7 +1064,7 @@ CompositorBridgeChild::AllocPCompositorWidgetChild(const CompositorWidgetInitDat + bool + CompositorBridgeChild::DeallocPCompositorWidgetChild(PCompositorWidgetChild* aActor) + { +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + delete aActor; + return true; + #else +diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp +index 977662e..9409cf3 100644 +--- a/gfx/layers/ipc/CompositorBridgeParent.cpp ++++ b/gfx/layers/ipc/CompositorBridgeParent.cpp +@@ -53,7 +53,7 @@ + #include "mozilla/media/MediaSystemResourceService.h" // for MediaSystemResourceService + #include "mozilla/mozalloc.h" // for operator new, etc + #include "mozilla/Telemetry.h" +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + #include "basic/X11BasicCompositor.h" // for X11BasicCompositor + #endif + #include "nsCOMPtr.h" // for already_AddRefed +@@ -82,7 +82,7 @@ + #include "VsyncSource.h" + #endif + #include "mozilla/widget/CompositorWidget.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetParent.h" + #endif + +@@ -1642,7 +1642,7 @@ CompositorBridgeParent::NewCompositor(const nsTArray& aBackendHin + mEGLSurfaceSize.height, + mUseExternalSurfaceSize); + } else if (aBackendHints[i] == LayersBackend::LAYERS_BASIC) { +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + if (gfxVars::UseXRender()) { + compositor = new X11BasicCompositor(this, mWidget); + } else +@@ -1943,7 +1943,7 @@ CompositorBridgeParent::PostInsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp) + widget::PCompositorWidgetParent* + CompositorBridgeParent::AllocPCompositorWidgetParent(const CompositorWidgetInitData& aInitData) + { +-#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + if (mWidget) { + // Should not create two widgets on the same compositor. + return nullptr; +@@ -1964,7 +1964,7 @@ CompositorBridgeParent::AllocPCompositorWidgetParent(const CompositorWidgetInitD + bool + CompositorBridgeParent::DeallocPCompositorWidgetParent(PCompositorWidgetParent* aActor) + { +-#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + static_cast(aActor)->Release(); + return true; + #else +diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp +index 1bb6d04..8b90a67 100644 +--- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp ++++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp +@@ -52,7 +52,7 @@ + #include "mozilla/media/MediaSystemResourceService.h" // for MediaSystemResourceService + #include "mozilla/mozalloc.h" // for operator new, etc + #include "mozilla/Telemetry.h" +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + #include "basic/X11BasicCompositor.h" // for X11BasicCompositor + #endif + #include "nsCOMPtr.h" // for already_AddRefed +@@ -81,7 +81,7 @@ + #include "VsyncSource.h" + #endif + #include "mozilla/widget/CompositorWidget.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetParent.h" + #endif + +diff --git a/gfx/layers/ipc/ShadowLayerUtils.h b/gfx/layers/ipc/ShadowLayerUtils.h +index 257cee8..c1393b2 100644 +--- a/gfx/layers/ipc/ShadowLayerUtils.h ++++ b/gfx/layers/ipc/ShadowLayerUtils.h +@@ -17,7 +17,7 @@ + #define MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + # include "mozilla/layers/ShadowLayerUtilsX11.h" + #else + namespace mozilla { namespace layers { +diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build +index 2a2fa11..508673b 100644 +--- a/gfx/layers/moz.build ++++ b/gfx/layers/moz.build +@@ -204,7 +204,7 @@ EXPORTS.mozilla.layers += [ + 'TransactionIdAllocator.h', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + EXPORTS.mozilla.layers += [ + 'basic/TextureClientX11.h', + 'basic/X11TextureSourceBasic.h', +diff --git a/gfx/src/moz.build b/gfx/src/moz.build +index 3678eee..dc48470 100644 +--- a/gfx/src/moz.build ++++ b/gfx/src/moz.build +@@ -51,7 +51,7 @@ EXPORTS.mozilla.gfx += [ + 'TiledRegion.h', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + EXPORTS.mozilla += ['X11Util.h'] + SOURCES += [ + 'X11Util.cpp', +diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp +index 31f1855..fdbac19 100644 +--- a/gfx/thebes/gfxASurface.cpp ++++ b/gfx/thebes/gfxASurface.cpp +@@ -29,7 +29,7 @@ + #include "gfxWindowsSurface.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + +@@ -160,7 +160,7 @@ gfxASurface::Wrap (cairo_surface_t *csurf, const IntSize& aSize) + result = new gfxWindowsSurface(csurf); + } + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + else if (stype == CAIRO_SURFACE_TYPE_XLIB) { + result = new gfxXlibSurface(csurf); + } +diff --git a/gfx/thebes/gfxDrawable.cpp b/gfx/thebes/gfxDrawable.cpp +index 7d25cc9..26c5ea0 100644 +--- a/gfx/thebes/gfxDrawable.cpp ++++ b/gfx/thebes/gfxDrawable.cpp +@@ -8,8 +8,8 @@ + #include "gfxContext.h" + #include "gfxPlatform.h" + #include "gfx2DGlue.h" +-#ifdef MOZ_X11 + #include "cairo.h" ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + #include "mozilla/gfx/Logging.h" +diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp +index b6e9167..4ae683d 100644 +--- a/gfx/thebes/gfxFcPlatformFontList.cpp ++++ b/gfx/thebes/gfxFcPlatformFontList.cpp +@@ -33,7 +33,7 @@ + #include "gfxPlatformGtk.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -719,7 +719,7 @@ gfxFontconfigFontEntry::CreateScaledFont(FcPattern* aRenderPattern, + static void ApplyGdkScreenFontOptions(FcPattern *aPattern); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static bool + GetXftInt(Display* aDisplay, const char* aName, int* aResult) + { +@@ -771,7 +771,7 @@ PreparePattern(FcPattern* aPattern, bool aIsPrinterFont) + ApplyGdkScreenFontOptions(aPattern); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { + FcValue value; + int lcdfilter; +diff --git a/gfx/thebes/gfxGdkNativeRenderer.cpp b/gfx/thebes/gfxGdkNativeRenderer.cpp +index f8964ad..4b27491 100644 +--- a/gfx/thebes/gfxGdkNativeRenderer.cpp ++++ b/gfx/thebes/gfxGdkNativeRenderer.cpp +@@ -7,7 +7,7 @@ + #include "gfxContext.h" + #include "gfxPlatformGtk.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include "cairo-xlib.h" + #include "gfxXlibSurface.h" +diff --git a/gfx/thebes/gfxGdkNativeRenderer.h b/gfx/thebes/gfxGdkNativeRenderer.h +index d95b1fe..4c465d6 100644 +--- a/gfx/thebes/gfxGdkNativeRenderer.h ++++ b/gfx/thebes/gfxGdkNativeRenderer.h +@@ -8,7 +8,7 @@ + + #include + #include "nsSize.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibNativeRenderer.h" + #endif + +@@ -21,7 +21,7 @@ class gfxContext; + * to all Thebes transformations, clipping etc. + */ + class gfxGdkNativeRenderer +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + : private gfxXlibNativeRenderer + #endif + { +@@ -46,7 +46,7 @@ public: + // will be set and there is no dependence on what the existing pixels + // in the drawable are set to. + DRAW_IS_OPAQUE = +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibNativeRenderer::DRAW_IS_OPAQUE + #else + 0x1 +@@ -54,7 +54,7 @@ public: + // If set, then numClipRects can be zero or one. + // If not set, then numClipRects will be zero. + , DRAW_SUPPORTS_CLIP_RECT = +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibNativeRenderer::DRAW_SUPPORTS_CLIP_RECT + #else + 0x2 +@@ -73,7 +73,7 @@ public: + #endif + + private: +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // for gfxXlibNativeRenderer: + virtual nsresult DrawWithXlib(cairo_surface_t* surface, + nsIntPoint offset, +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index 5a5f7e3..7effcef 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -36,11 +36,11 @@ + + #include "gfxImageSurface.h" + #ifdef MOZ_X11 +-#include +-#include "gfxXlibSurface.h" +-#include "cairo-xlib.h" ++//#include ++//#include "gfxXlibSurface.h" ++//#include "cairo-xlib.h" + #include "mozilla/Preferences.h" +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + #ifdef GL_PROVIDER_GLX + #include "GLContextProvider.h" +@@ -86,7 +86,7 @@ gfxPlatformGtk::gfxPlatformGtk() + + mMaxGenericSubstitutions = UNINITIALIZED_VALUE; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (XRE_IsParentProcess()) { + if (GDK_IS_X11_DISPLAY(gdk_display_get_default()) && + mozilla::Preferences::GetBool("gfx.xrender.enabled")) +@@ -105,7 +105,7 @@ gfxPlatformGtk::gfxPlatformGtk() + InitBackendPrefs(canvasMask, BackendType::CAIRO, + contentMask, BackendType::CAIRO); + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + mXCompositorDisplay = nullptr; + mWaylandCompositorDisplay = nullptr; + +@@ -117,11 +117,11 @@ gfxPlatformGtk::gfxPlatformGtk() + } + #if defined(GDK_WINDOWING_WAYLAND) + else { +- mWaylandCompositorDisplay = wl_display_connect(nullptr); +- MOZ_ASSERT(mWaylandCompositorDisplay, "Failed to create compositor display!"); + } + #endif + #endif // defined(MOZ_X11) ++ mWaylandCompositorDisplay = wl_display_connect(nullptr); ++ MOZ_ASSERT(mWaylandCompositorDisplay, "Failed to create compositor display!"); + } + + gfxPlatformGtk::~gfxPlatformGtk() +@@ -132,24 +132,24 @@ gfxPlatformGtk::~gfxPlatformGtk() + gfxPangoFontGroup::Shutdown(); + } + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + if (mIsX11Display) { + XCloseDisplay(mXCompositorDisplay); + } + #if defined(GDK_WINDOWING_WAYLAND) + else { +- wl_display_disconnect(mWaylandCompositorDisplay); + } + #endif + #endif ++ wl_display_disconnect(mWaylandCompositorDisplay); + } + + void + gfxPlatformGtk::FlushContentDrawing() + { +- if (gfxVars::UseXRender()) { +- XFlush(DefaultXDisplay()); +- } ++// if (gfxVars::UseXRender()) { ++// XFlush(DefaultXDisplay()); ++// } + } + + already_AddRefed +@@ -170,24 +170,12 @@ gfxPlatformGtk::CreateOffscreenSurface(const IntSize& aSize, + if (gdkScreen) { + // When forcing PaintedLayers to use image surfaces for content, + // force creation of gfxImageSurface surfaces. +- if (gfxVars::UseXRender() && !UseImageOffscreenSurfaces()) { +- Screen *screen = gdk_x11_screen_get_xscreen(gdkScreen); +- XRenderPictFormat* xrenderFormat = +- gfxXlibSurface::FindRenderFormat(DisplayOfScreen(screen), +- aFormat); +- +- if (xrenderFormat) { +- newSurface = gfxXlibSurface::Create(screen, xrenderFormat, +- aSize); +- } +- } else { + // We're not going to use XRender, so we don't need to + // search for a render format + newSurface = new gfxImageSurface(aSize, aFormat); + // The gfxImageSurface ctor zeroes this for us, no need to + // waste time clearing again + needsClear = false; +- } + } + #endif + +@@ -476,7 +464,7 @@ gfxPlatformGtk::GetPlatformCMSOutputProfile(void *&mem, size_t &size) + mem = nullptr; + size = 0; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + GdkDisplay *display = gdk_display_get_default(); + if (!GDK_IS_X11_DISPLAY(display)) + return; +@@ -629,7 +617,7 @@ gfxPlatformGtk::GetGdkDrawable(cairo_surface_t *target) + if (result) + return result; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (cairo_surface_get_type(target) != CAIRO_SURFACE_TYPE_XLIB) + return nullptr; + +@@ -909,6 +897,7 @@ gfxPlatformGtk::CreateHardwareVsyncSource() + } + return gfxPlatform::CreateHardwareVsyncSource(); + } ++#endif + + bool + gfxPlatformGtk::SupportsApzTouchInput() const +@@ -917,4 +906,3 @@ gfxPlatformGtk::SupportsApzTouchInput() const + return value == 1 || value == 2; + } + +-#endif +diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build +index 0623b5b..533c943 100644 +--- a/gfx/thebes/moz.build ++++ b/gfx/thebes/moz.build +@@ -114,7 +114,7 @@ elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + 'PrintTargetPS.cpp', + ] + +- if CONFIG['MOZ_X11']: ++ if CONFIG['MOZ_X11_no']: + EXPORTS += [ + 'gfxXlibNativeRenderer.h', + 'gfxXlibSurface.h', +diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp +index 5455ea4..36915c6 100644 +--- a/layout/generic/nsPluginFrame.cpp ++++ b/layout/generic/nsPluginFrame.cpp +@@ -74,7 +74,7 @@ + #include "mozilla/gfx/QuartzSupport.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + using mozilla::DefaultXDisplay; + #endif +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc +index b7f123b..eacd634 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc +@@ -30,7 +30,7 @@ DesktopCaptureOptions::~DesktopCaptureOptions() {} + // static + DesktopCaptureOptions DesktopCaptureOptions::CreateDefault() { + DesktopCaptureOptions result; +-#if defined(USE_X11) ++#if defined(USE_X11_no) + result.set_x_display(SharedXDisplay::CreateDefault()); + #endif + #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h +index 030cb2b..f7bb2a4 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h +@@ -13,7 +13,7 @@ + #include "webrtc/base/constructormagic.h" + #include "webrtc/system_wrappers/interface/scoped_refptr.h" + +-#if defined(USE_X11) ++#if defined(USE_X11_no) + #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" + #endif + +@@ -37,7 +37,7 @@ class DesktopCaptureOptions { + // X11 connection failed (e.g. DISPLAY isn't set). + static DesktopCaptureOptions CreateDefault(); + +-#if defined(USE_X11) ++#if defined(USE_X11_no) + SharedXDisplay* x_display() const { return x_display_; } + void set_x_display(scoped_refptr x_display) { + x_display_ = x_display; +@@ -85,7 +85,7 @@ class DesktopCaptureOptions { + #endif + + private: +-#if defined(USE_X11) ++#if defined(USE_X11_no) + scoped_refptr x_display_; + #endif + +diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build +index 74f3ad7..dbd48e1 100644 +--- a/toolkit/components/moz.build ++++ b/toolkit/components/moz.build +@@ -5,7 +5,7 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + # These component dirs are built for all apps (including suite) +-if CONFIG['MOZ_ENABLE_XREMOTE']: ++if CONFIG['MOZ_ENABLE_XREMOTE_no']: + DIRS += ['remote'] + + DIRS += [ +diff --git a/toolkit/components/remote/nsGTKRemoteService.cpp b/toolkit/components/remote/nsGTKRemoteService.cpp +index d72cf93..08fa886 100644 +--- a/toolkit/components/remote/nsGTKRemoteService.cpp ++++ b/toolkit/components/remote/nsGTKRemoteService.cpp +@@ -9,7 +9,7 @@ + + #include + #include +-#include ++//#include + + #include "nsIBaseWindow.h" + #include "nsIDocShell.h" +diff --git a/toolkit/components/remote/nsGTKRemoteService.h b/toolkit/components/remote/nsGTKRemoteService.h +index 638558b..559e6a3 100644 +--- a/toolkit/components/remote/nsGTKRemoteService.h ++++ b/toolkit/components/remote/nsGTKRemoteService.h +@@ -13,18 +13,18 @@ + #endif + + #include +-#include ++//#include + #include + + #include "nsInterfaceHashtable.h" +-#include "nsXRemoteService.h" ++//#include "nsXRemoteService.h" + #include "mozilla/Attributes.h" + #ifdef ENABLE_REMOTE_DBUS + #include "mozilla/ipc/DBusConnectionRefPtr.h" + #endif + + +-class nsGTKRemoteService final : public nsXRemoteService ++class nsGTKRemoteService final + { + public: + // We will be a static singleton, so don't use the ordinary methods. +diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build +index 3006fd0..770956f 100644 +--- a/toolkit/library/moz.build ++++ b/toolkit/library/moz.build +@@ -311,11 +311,7 @@ if CONFIG['MOZ_ENABLE_DBUS']: + OS_LIBS += CONFIG['MOZ_DBUS_GLIB_LIBS'] + + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: +- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': +- OS_LIBS += [l for l in CONFIG['TK_LIBS'] +- if l not in ('-lgtk-3', '-lgdk-3')] +- else: +- OS_LIBS += CONFIG['TK_LIBS'] ++ OS_LIBS += CONFIG['TK_LIBS'] + OS_LIBS += CONFIG['XLDFLAGS'] + OS_LIBS += CONFIG['XLIBS'] + OS_LIBS += CONFIG['XEXT_LIBS'] +diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild +index 0f5b6e9..b6ba71c 100644 +--- a/toolkit/toolkit.mozbuild ++++ b/toolkit/toolkit.mozbuild +@@ -118,7 +118,7 @@ DIRS += [ + '/xpfe/components', + ] + +-if CONFIG['MOZ_ENABLE_XREMOTE']: ++if CONFIG['MOZ_ENABLE_XREMOTE_no']: + DIRS += ['/widget/xremoteclient'] + + if CONFIG['MOZ_SPELLCHECK']: +diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build +index dd15dc0..9d8bd32 100644 +--- a/toolkit/xre/moz.build ++++ b/toolkit/xre/moz.build +@@ -58,7 +58,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': + 'nsGDKErrorHandler.cpp', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + EXPORTS += ['nsX11ErrorHandler.h'] + UNIFIED_SOURCES += [ + 'nsX11ErrorHandler.cpp', +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +index ee36da7..a8aa0fe 100644 +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -165,7 +165,7 @@ + #endif + + // for X remote support +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + #include "XRemoteClient.h" + #include "nsIRemoteService.h" + #include "nsProfileLock.h" +@@ -249,7 +249,7 @@ nsString gAbsoluteArgv0Path; + #ifdef MOZ_WAYLAND + #include + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif /* MOZ_X11 */ + #include "nsGTKToolkit.h" +@@ -1591,7 +1591,7 @@ DumpHelp() + printf("Usage: %s [ options ... ] [URL]\n" + " where options include:\n\n", gArgv[0]); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + printf("X11 options\n" + " --display=DISPLAY X display to use\n" + " --sync Make X calls synchronous\n"); +@@ -1676,7 +1676,7 @@ DumpVersion() + printf("\n"); + } + +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + static RemoteResult + ParseRemoteCommandLine(nsCString& program, + const char** profile, +@@ -2993,7 +2993,7 @@ public: + XREMain() : + mStartOffline(false) + , mShuttingDown(false) +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + , mDisableRemote(false) + #endif + #if defined(MOZ_WIDGET_GTK) +@@ -3016,7 +3016,7 @@ public: + nsCOMPtr mProfD; + nsCOMPtr mProfLD; + nsCOMPtr mProfileLock; +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + nsCOMPtr mRemoteService; + nsProfileLock mRemoteLock; + nsCOMPtr mRemoteLockDir; +@@ -3031,7 +3031,7 @@ public: + + bool mStartOffline; + bool mShuttingDown; +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + bool mDisableRemote; + #endif + +@@ -3767,7 +3767,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + } + } + #endif /* MOZ_WIDGET_GTK */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Init X11 in thread-safe mode. Must be called prior to the first call to XOpenDisplay + // (called inside gdk_display_open). This is a requirement for off main tread compositing. + XInitThreads(); +@@ -3793,7 +3793,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + } + #endif + #endif +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // handle --remote now that xpcom is fired up + bool newInstance; + { +@@ -3870,7 +3870,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + gtk_widget_set_default_colormap(gdk_rgb_get_colormap()); + #endif /* (MOZ_WIDGET_GTK == 2) */ + #endif /* defined(MOZ_WIDGET_GTK) */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + XRE_InstallX11ErrorHandler(); + #endif +@@ -4418,7 +4418,7 @@ XREMain::XRE_mainRun() + } + + if (!mShuttingDown) { +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // if we have X remote support, start listening for requests on the + // proxy window. + if (!mDisableRemote) +@@ -4626,7 +4626,7 @@ XREMain::XRE_main(int argc, char* argv[], const nsXREAppData* aAppData) + } + + if (!mShuttingDown) { +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // shut down the x remote proxy window + if (mRemoteService) { + mRemoteService->Shutdown(); +diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp +index 0e85532..a619121 100644 +--- a/toolkit/xre/nsEmbedFunctions.cpp ++++ b/toolkit/xre/nsEmbedFunctions.cpp +@@ -43,7 +43,7 @@ + #include "nsVersionComparator.h" + #include "chrome/common/mach_ipc_mac.h" + #endif +-#include "nsX11ErrorHandler.h" ++//#include "nsX11ErrorHandler.h" + #include "nsGDKErrorHandler.h" + #include "base/at_exit.h" + #include "base/command_line.h" +@@ -492,7 +492,7 @@ XRE_InitChildProcess(int aArgc, + gArgv = aArgv; + gArgc = aArgc; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XInitThreads(); + #endif + #if MOZ_WIDGET_GTK == 2 +diff --git a/toolkit/xre/nsGDKErrorHandler.cpp b/toolkit/xre/nsGDKErrorHandler.cpp +index a01a7c5..89b1c8b 100644 +--- a/toolkit/xre/nsGDKErrorHandler.cpp ++++ b/toolkit/xre/nsGDKErrorHandler.cpp +@@ -6,14 +6,12 @@ + #include "nsGDKErrorHandler.h" + + #include +-#include + #include + #include + #include + + #include "nsDebug.h" + #include "nsString.h" +-#include "nsX11ErrorHandler.h" + + #include "prenv.h" + +@@ -29,62 +27,8 @@ static void + GdkErrorHandler(const gchar *log_domain, GLogLevelFlags log_level, + const gchar *message, gpointer user_data) + { +- if (strstr(message, "X Window System error")) { +- XErrorEvent event; +- nsDependentCString buffer(message); +- char *endptr; +- +- /* Parse Gdk X Window error message which has this format: +- * (Details: serial XXXX error_code XXXX request_code XXXX (XXXX) minor_code XXXX) +- */ +- NS_NAMED_LITERAL_CSTRING(serialString, "(Details: serial "); +- int32_t start = buffer.Find(serialString); +- if (start == kNotFound) +- NS_RUNTIMEABORT(message); +- +- start += serialString.Length(); +- errno = 0; +- event.serial = strtol(buffer.BeginReading() + start, &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(errorCodeString, " error_code "); +- if (!StringBeginsWith(Substring(endptr, buffer.EndReading()), errorCodeString)) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.error_code = strtol(endptr + errorCodeString.Length(), &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(requestCodeString, " request_code "); +- if (!StringBeginsWith(Substring(endptr, buffer.EndReading()), requestCodeString)) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.request_code = strtol(endptr + requestCodeString.Length(), &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(minorCodeString, " minor_code "); +- start = buffer.Find(minorCodeString, endptr - buffer.BeginReading()); +- if (!start) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.minor_code = strtol(buffer.BeginReading() + start + minorCodeString.Length(), nullptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- event.display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +- // Gdk does not provide resource ID +- event.resourceid = 0; +- +- X11Error(event.display, &event); +- } else { + g_log_default_handler(log_domain, log_level, message, user_data); + NS_RUNTIMEABORT(message); +- } + } + + void +@@ -94,7 +38,4 @@ InstallGdkErrorHandler() + (GLogLevelFlags)(G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION), + GdkErrorHandler, + nullptr); +- if (PR_GetEnv("MOZ_X_SYNC")) { +- XSynchronize(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), True); +- } + } +diff --git a/toolkit/xre/nsNativeAppSupportUnix.cpp b/toolkit/xre/nsNativeAppSupportUnix.cpp +index a04a799..a0f55f6 100644 +--- a/toolkit/xre/nsNativeAppSupportUnix.cpp ++++ b/toolkit/xre/nsNativeAppSupportUnix.cpp +@@ -32,7 +32,7 @@ + #include + #include + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include +@@ -52,7 +52,7 @@ + You have GTK+ %d.%d.\nThis application requires GTK+ %d.%d or newer.\n\n\ + Please upgrade your GTK+ library if you wish to use this application." + +-#if MOZ_X11 ++#if MOZ_X11_no + #undef IceSetIOErrorHandler + #undef IceAddConnectionWatch + #undef IceConnectionNumber +@@ -126,7 +126,7 @@ static LazyLogModule sMozSMLog("MozSM"); + class nsNativeAppSupportUnix : public nsNativeAppSupportBase + { + public: +-#if MOZ_X11 ++#if MOZ_X11_no + nsNativeAppSupportUnix(): mSessionConnection(nullptr), + mClientState(STATE_DISCONNECTED) {}; + ~nsNativeAppSupportUnix() +@@ -143,7 +143,7 @@ public: + NS_IMETHOD Enable(); + + private: +-#if MOZ_X11 ++#if MOZ_X11_no + static void SaveYourselfCB(SmcConn smc_conn, SmPointer client_data, + int save_style, Bool shutdown, int interact_style, + Bool fast); +@@ -163,7 +163,7 @@ private: + #endif + }; + +-#if MOZ_X11 ++#if MOZ_X11_no + static gboolean + process_ice_messages(IceConn connection) + { +@@ -479,7 +479,7 @@ nsNativeAppSupportUnix::Start(bool *aRetVal) + + *aRetVal = true; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gboolean sm_disable = FALSE; + if (!getenv("SESSION_MANAGER")) { + sm_disable = TRUE; +diff --git a/widget/CompositorWidget.h b/widget/CompositorWidget.h +index 93269ea..23a2964 100644 +--- a/widget/CompositorWidget.h ++++ b/widget/CompositorWidget.h +@@ -41,7 +41,7 @@ class CompositorWidgetInitData; + class CompositorWidgetDelegate; + + // Platforms that support out-of-process widgets. +-#if defined(XP_WIN) || defined(MOZ_X11) ++#if defined(XP_WIN) || defined(MOZ_X11_no) + // CompositorWidgetParent should implement CompositorWidget and + // PCompositorWidgetParent. + class CompositorWidgetParent; +diff --git a/widget/InProcessCompositorWidget.cpp b/widget/InProcessCompositorWidget.cpp +index 9b301fc..6f412cb 100644 +--- a/widget/InProcessCompositorWidget.cpp ++++ b/widget/InProcessCompositorWidget.cpp +@@ -14,7 +14,7 @@ namespace widget { + + // Platforms with no OOP compositor process support use + // InProcessCompositorWidget by default. +-#if !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + /* static */ RefPtr + CompositorWidget::CreateLocal(const CompositorWidgetInitData& aInitData, nsIWidget* aWidget) + { +diff --git a/widget/gtk/CompositorWidgetChild.h b/widget/gtk/CompositorWidgetChild.h +index 403b905..cbf5a94 100644 +--- a/widget/gtk/CompositorWidgetChild.h ++++ b/widget/gtk/CompositorWidgetChild.h +@@ -6,7 +6,7 @@ + #ifndef widget_gtk_CompositorWidgetChild_h + #define widget_gtk_CompositorWidgetChild_h + +-#include "X11CompositorWidget.h" ++//#include "X11CompositorWidget.h" + #include "mozilla/widget/PCompositorWidgetChild.h" + #include "mozilla/widget/CompositorWidgetVsyncObserver.h" + +@@ -15,7 +15,6 @@ namespace widget { + + class CompositorWidgetChild final + : public PCompositorWidgetChild +- , public CompositorWidgetDelegate + { + public: + CompositorWidgetChild(RefPtr aVsyncDispatcher, +@@ -25,7 +24,7 @@ public: + bool RecvObserveVsync() override; + bool RecvUnobserveVsync() override; + +- void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; ++ void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) ; + + private: + RefPtr mVsyncDispatcher; +diff --git a/widget/gtk/CompositorWidgetParent.cpp b/widget/gtk/CompositorWidgetParent.cpp +index c882f4f..cd5dc97 100644 +--- a/widget/gtk/CompositorWidgetParent.cpp ++++ b/widget/gtk/CompositorWidgetParent.cpp +@@ -10,7 +10,6 @@ namespace mozilla { + namespace widget { + + CompositorWidgetParent::CompositorWidgetParent(const CompositorWidgetInitData& aInitData) +- : X11CompositorWidget(aInitData) + { + MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_GPU); + } +@@ -40,7 +39,7 @@ CompositorWidgetParent::GetVsyncObserver() const + bool + CompositorWidgetParent::RecvNotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) + { +- NotifyClientSizeChanged(aClientSize); ++ //NotifyClientSizeChanged(aClientSize); + return true; + } + +diff --git a/widget/gtk/CompositorWidgetParent.h b/widget/gtk/CompositorWidgetParent.h +index e80c0f8..4230605 100644 +--- a/widget/gtk/CompositorWidgetParent.h ++++ b/widget/gtk/CompositorWidgetParent.h +@@ -6,15 +6,15 @@ + #ifndef widget_gtk_CompositorWidgetParent_h + #define widget_gtk_CompositorWidgetParent_h + +-#include "X11CompositorWidget.h" ++//#include "X11CompositorWidget.h" + #include "mozilla/widget/PCompositorWidgetParent.h" + + namespace mozilla { + namespace widget { + + class CompositorWidgetParent final +- : public PCompositorWidgetParent, +- public X11CompositorWidget ++ : public PCompositorWidgetParent//, ++ //public X11CompositorWidget + { + public: + explicit CompositorWidgetParent(const CompositorWidgetInitData& aInitData); +@@ -22,8 +22,8 @@ public: + + void ActorDestroy(ActorDestroyReason aWhy) override { } + +- void ObserveVsync(VsyncObserver* aObserver) override; +- RefPtr GetVsyncObserver() const override; ++ void ObserveVsync(VsyncObserver* aObserver); ++ RefPtr GetVsyncObserver() const ; + + bool RecvNotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; + +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index 1cc8917..bfca2d1 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -50,15 +50,15 @@ if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ + 'CompositorWidgetChild.cpp', + 'CompositorWidgetParent.cpp', +- 'InProcessX11CompositorWidget.cpp', +- 'nsIdleServiceGTK.cpp', +- 'X11CompositorWidget.cpp', ++ #'InProcessX11CompositorWidget.cpp', ++ #'nsIdleServiceGTK.cpp', ++ #'X11CompositorWidget.cpp', + ] + EXPORTS.mozilla.widget += [ + 'CompositorWidgetChild.h', + 'CompositorWidgetParent.h', +- 'InProcessX11CompositorWidget.h', +- 'X11CompositorWidget.h', ++ #'InProcessX11CompositorWidget.h', ++ #'X11CompositorWidget.h', + ] + + if CONFIG['NS_PRINTING']: +@@ -75,12 +75,12 @@ if CONFIG['NS_PRINTING']: + if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ + 'nsClipboard.cpp', +- 'nsClipboardX11.cpp', ++ #'nsClipboardX11.cpp', + 'nsDragService.cpp', + 'WindowSurfaceProvider.cpp', +- 'WindowSurfaceX11.cpp', +- 'WindowSurfaceX11Image.cpp', +- 'WindowSurfaceXRender.cpp', ++ #'WindowSurfaceX11.cpp', ++ #'WindowSurfaceX11Image.cpp', ++ #'WindowSurfaceXRender.cpp', + ] + EXPORTS.mozilla.widget += [ + 'WindowSurfaceProvider.h', +diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c +index 8db92ba..60e88e2 100644 +--- a/widget/gtk/mozgtk/mozgtk.c ++++ b/widget/gtk/mozgtk/mozgtk.c +@@ -608,7 +608,7 @@ STUB(gtk_color_chooser_get_rgba) + STUB(gtk_color_chooser_set_use_alpha) + #endif + +-#ifdef GTK2_SYMBOLS ++#ifdef GTK2_SYMBOLS_no + STUB(gdk_drawable_get_screen) + STUB(gdk_rgb_get_colormap) + STUB(gdk_rgb_get_visual) +@@ -623,21 +623,3 @@ 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. +-#include +-// Bug 1271100 +-// We need to trick system Cairo into not using the XShm extension due to +-// a race condition in it that results in frequent BadAccess errors. Cairo +-// relies upon XShmQueryExtension to initially detect if XShm is available. +-// So we define our own stub that always indicates XShm not being present. +-// mozgtk loads before libXext/libcairo and so this stub will take priority. +-// Our tree usage goes through xcb and remains unaffected by this. +-MOZ_EXPORT Bool +-XShmQueryExtension(Display* aDisplay) +-{ +- return False; +-} +-#endif +- +diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp +index 48f6ca7..d79bffc 100644 +--- a/widget/gtk/nsClipboard.cpp ++++ b/widget/gtk/nsClipboard.cpp +@@ -9,7 +9,7 @@ + + #include "nsArrayUtils.h" + #include "nsClipboard.h" +-#include "nsClipboardX11.h" ++//#include "nsClipboardX11.h" + #if defined(MOZ_WAYLAND) + #include "nsClipboardWayland.h" + #endif +@@ -28,7 +28,7 @@ + #include "imgIContainer.h" + + #include +-#include ++//#include + + #include "mozilla/dom/EncodingUtils.h" + #include "nsIUnicodeDecoder.h" +@@ -54,6 +54,7 @@ ConvertHTMLtoUCS2 (guchar *data, + char16_t **unicodeData, + int32_t &outUnicodeLen); + ++#ifdef MOZ_X11_no + static void + GetHTMLCharset (guchar * data, int32_t dataLength, nsCString& str); + +@@ -117,6 +118,7 @@ nsClipboard::~nsClipboard() + gtk_clipboard_clear(gtk_clipboard_get(GDK_SELECTION_PRIMARY)); + } + } ++#endif + + NS_IMPL_ISUPPORTS(nsClipboard, nsIClipboard) + +@@ -124,13 +126,13 @@ nsresult + nsClipboard::Init(void) + { + // create nsRetrievalContext +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { +- mContext = new nsRetrievalContextX11(); ++ //if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { ++ // mContext = new nsRetrievalContextX11(); + #if defined(MOZ_WAYLAND) +- } else { ++ //} else { + mContext = new nsRetrievalContextWayland(); + #endif +- } ++ //} + return NS_OK; + } + +diff --git a/widget/gtk/nsDragService.cpp b/widget/gtk/nsDragService.cpp +index 15b4eef..bc76399 100644 +--- a/widget/gtk/nsDragService.cpp ++++ b/widget/gtk/nsDragService.cpp +@@ -22,12 +22,12 @@ + #include "prthread.h" + #include + #include +-#include ++//#include + #include "nsCRT.h" + #include "mozilla/BasicEvents.h" + #include "mozilla/Services.h" + +-#include "gfxXlibSurface.h" ++//#include "gfxXlibSurface.h" + #include "gfxContext.h" + #include "nsImageToPixbuf.h" + #include "nsPresContext.h" +diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp +index ce55cf1..d4ca3db 100644 +--- a/widget/gtk/nsGtkKeyUtils.cpp ++++ b/widget/gtk/nsGtkKeyUtils.cpp +@@ -12,11 +12,11 @@ + #include + #include + #include +-#include ++//#include + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +-#include ++//#include + #include "WidgetUtils.h" + #include "keysym2ucs.h" + #include "nsContentUtils.h" +@@ -173,8 +173,8 @@ KeymapWrapper::KeymapWrapper() : + g_signal_connect(mGdkKeymap, "direction-changed", + (GCallback)OnDirectionChanged, this); + +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) +- InitXKBExtension(); ++ //if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) ++ // InitXKBExtension(); + + Init(); + } +@@ -194,10 +194,10 @@ KeymapWrapper::Init() + mModifierKeys.Clear(); + memset(mModifierMasks, 0, sizeof(mModifierMasks)); + +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) +- InitBySystemSettings(); ++ //if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) ++ // InitBySystemSettings(); + +- gdk_window_add_filter(nullptr, FilterEvents, this); ++ //gdk_window_add_filter(nullptr, FilterEvents, this); + + MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, + ("%p Init, CapsLock=0x%X, NumLock=0x%X, " +@@ -215,233 +215,16 @@ KeymapWrapper::Init() + void + KeymapWrapper::InitXKBExtension() + { +- PodZero(&mKeyboardState); +- +- int xkbMajorVer = XkbMajorVersion; +- int xkbMinorVer = XkbMinorVersion; +- if (!XkbLibraryVersion(&xkbMajorVer, &xkbMinorVer)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbLibraryVersion()", this)); +- return; +- } +- +- Display* display = +- gdk_x11_display_get_xdisplay(gdk_display_get_default()); +- +- // XkbLibraryVersion() set xkbMajorVer and xkbMinorVer to that of the +- // library, which may be newer than what is required of the server in +- // XkbQueryExtension(), so these variables should be reset to +- // XkbMajorVersion and XkbMinorVersion before the XkbQueryExtension call. +- xkbMajorVer = XkbMajorVersion; +- xkbMinorVer = XkbMinorVersion; +- int opcode, baseErrorCode; +- if (!XkbQueryExtension(display, &opcode, &mXKBBaseEventCode, &baseErrorCode, +- &xkbMajorVer, &xkbMinorVer)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbQueryExtension(), display=0x%p", this, display)); +- return; +- } +- +- if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbStateNotify, +- XkbModifierStateMask, XkbModifierStateMask)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbSelectEventDetails() for XModifierStateMask, display=0x%p", +- this, display)); +- return; +- } +- +- if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbControlsNotify, +- XkbPerKeyRepeatMask, XkbPerKeyRepeatMask)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbSelectEventDetails() for XkbControlsNotify, display=0x%p", +- this, display)); +- return; +- } +- +- if (!XGetKeyboardControl(display, &mKeyboardState)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XGetKeyboardControl(), display=0x%p", +- this, display)); +- return; +- } +- +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension, Succeeded", this)); + } + + void + KeymapWrapper::InitBySystemSettings() + { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, mGdkKeymap=%p", +- this, mGdkKeymap)); +- +- Display* display = +- gdk_x11_display_get_xdisplay(gdk_display_get_default()); +- +- int min_keycode = 0; +- int max_keycode = 0; +- XDisplayKeycodes(display, &min_keycode, &max_keycode); +- +- int keysyms_per_keycode = 0; +- KeySym* xkeymap = XGetKeyboardMapping(display, min_keycode, +- max_keycode - min_keycode + 1, +- &keysyms_per_keycode); +- if (!xkeymap) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- "Failed due to null xkeymap", this)); +- return; +- } +- +- XModifierKeymap* xmodmap = XGetModifierMapping(display); +- if (!xmodmap) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- "Failed due to null xmodmap", this)); +- XFree(xkeymap); +- return; +- } +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, min_keycode=%d, " +- "max_keycode=%d, keysyms_per_keycode=%d, max_keypermod=%d", +- this, min_keycode, max_keycode, keysyms_per_keycode, +- xmodmap->max_keypermod)); +- +- // The modifiermap member of the XModifierKeymap structure contains 8 sets +- // of max_keypermod KeyCodes, one for each modifier in the order Shift, +- // Lock, Control, Mod1, Mod2, Mod3, Mod4, and Mod5. +- // Only nonzero KeyCodes have meaning in each set, and zero KeyCodes are +- // ignored. +- +- // Note that two or more modifiers may use one modifier flag. E.g., +- // on Ubuntu 10.10, Alt and Meta share the Mod1 in default settings. +- // And also Super and Hyper share the Mod4. In such cases, we need to +- // decide which modifier flag means one of DOM modifiers. +- +- // mod[0] is Modifier introduced by Mod1. +- Modifier mod[5]; +- int32_t foundLevel[5]; +- for (uint32_t i = 0; i < ArrayLength(mod); i++) { +- mod[i] = NOT_MODIFIER; +- foundLevel[i] = INT32_MAX; +- } +- const uint32_t map_size = 8 * xmodmap->max_keypermod; +- for (uint32_t i = 0; i < map_size; i++) { +- KeyCode keycode = xmodmap->modifiermap[i]; +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- " i=%d, keycode=0x%08X", +- this, i, keycode)); +- if (!keycode || keycode < min_keycode || keycode > max_keycode) { +- continue; +- } +- +- ModifierKey* modifierKey = GetModifierKey(keycode); +- if (!modifierKey) { +- modifierKey = mModifierKeys.AppendElement(ModifierKey(keycode)); +- } +- +- const KeySym* syms = +- xkeymap + (keycode - min_keycode) * keysyms_per_keycode; +- const uint32_t bit = i / xmodmap->max_keypermod; +- modifierKey->mMask |= 1 << bit; +- +- // We need to know the meaning of Mod1, Mod2, Mod3, Mod4 and Mod5. +- // Let's skip if current map is for others. +- if (bit < 3) { +- continue; +- } +- +- const int32_t modIndex = bit - 3; +- for (int32_t j = 0; j < keysyms_per_keycode; j++) { +- Modifier modifier = GetModifierForGDKKeyval(syms[j]); +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- " Mod%d, j=%d, syms[j]=%s(0x%X), modifier=%s", +- this, modIndex + 1, j, gdk_keyval_name(syms[j]), syms[j], +- GetModifierName(modifier))); +- +- switch (modifier) { +- case NOT_MODIFIER: +- // Don't overwrite the stored information with +- // NOT_MODIFIER. +- break; +- case CAPS_LOCK: +- case SHIFT: +- case CTRL: +- // Ignore the modifiers defined in GDK spec. They shouldn't +- // be mapped to Mod1-5 because they must not work on native +- // GTK applications. +- break; +- default: +- // If new modifier is found in higher level than stored +- // value, we don't need to overwrite it. +- if (j > foundLevel[modIndex]) { +- break; +- } +- // If new modifier is more important than stored value, +- // we should overwrite it with new modifier. +- if (j == foundLevel[modIndex]) { +- mod[modIndex] = std::min(modifier, mod[modIndex]); +- break; +- } +- foundLevel[modIndex] = j; +- mod[modIndex] = modifier; +- break; +- } +- } +- } +- +- for (uint32_t i = 0; i < COUNT_OF_MODIFIER_INDEX; i++) { +- Modifier modifier; +- switch (i) { +- case INDEX_NUM_LOCK: +- modifier = NUM_LOCK; +- break; +- case INDEX_SCROLL_LOCK: +- modifier = SCROLL_LOCK; +- break; +- case INDEX_ALT: +- modifier = ALT; +- break; +- case INDEX_META: +- modifier = META; +- break; +- case INDEX_SUPER: +- modifier = SUPER; +- break; +- case INDEX_HYPER: +- modifier = HYPER; +- break; +- case INDEX_LEVEL3: +- modifier = LEVEL3; +- break; +- case INDEX_LEVEL5: +- modifier = LEVEL5; +- break; +- default: +- MOZ_CRASH("All indexes must be handled here"); +- } +- for (uint32_t j = 0; j < ArrayLength(mod); j++) { +- if (modifier == mod[j]) { +- mModifierMasks[i] |= 1 << (j + 3); +- } +- } +- } +- +- XFreeModifiermap(xmodmap); +- XFree(xkeymap); + } + + KeymapWrapper::~KeymapWrapper() + { +- gdk_window_remove_filter(nullptr, FilterEvents, this); ++ //gdk_window_remove_filter(nullptr, FilterEvents, this); + g_signal_handlers_disconnect_by_func(mGdkKeymap, + FuncToGpointer(OnKeysChanged), this); + g_signal_handlers_disconnect_by_func(mGdkKeymap, +@@ -451,77 +234,6 @@ KeymapWrapper::~KeymapWrapper() + ("%p Destructor", this)); + } + +-/* static */ GdkFilterReturn +-KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, +- GdkEvent* aGdkEvent, +- gpointer aData) +-{ +- XEvent* xEvent = static_cast(aXEvent); +- switch (xEvent->type) { +- case KeyPress: { +- // If the key doesn't support auto repeat, ignore the event because +- // even if such key (e.g., Shift) is pressed during auto repeat of +- // anoter key, it doesn't stop the auto repeat. +- KeymapWrapper* self = static_cast(aData); +- if (!self->IsAutoRepeatableKey(xEvent->xkey.keycode)) { +- break; +- } +- if (sRepeatState == NOT_PRESSED) { +- sRepeatState = FIRST_PRESS; +- } else if (sLastRepeatableHardwareKeyCode == xEvent->xkey.keycode) { +- sRepeatState = REPEATING; +- } else { +- // If a different key is pressed while another key is pressed, +- // auto repeat system repeats only the last pressed key. +- // So, setting new keycode and setting repeat state as first key +- // press should work fine. +- sRepeatState = FIRST_PRESS; +- } +- sLastRepeatableHardwareKeyCode = xEvent->xkey.keycode; +- break; +- } +- case KeyRelease: { +- if (sLastRepeatableHardwareKeyCode != xEvent->xkey.keycode) { +- // This case means the key release event is caused by +- // a non-repeatable key such as Shift or a repeatable key that +- // was pressed before sLastRepeatableHardwareKeyCode was +- // pressed. +- break; +- } +- sRepeatState = NOT_PRESSED; +- break; +- } +- case FocusOut: { +- // At moving focus, we should reset keyboard repeat state. +- // Strictly, this causes incorrect behavior. However, this +- // correctness must be enough for web applications. +- sRepeatState = NOT_PRESSED; +- break; +- } +- default: { +- KeymapWrapper* self = static_cast(aData); +- if (xEvent->type != self->mXKBBaseEventCode) { +- break; +- } +- XkbEvent* xkbEvent = (XkbEvent*)xEvent; +- if (xkbEvent->any.xkb_type != XkbControlsNotify || +- !(xkbEvent->ctrls.changed_ctrls & XkbPerKeyRepeatMask)) { +- break; +- } +- if (!XGetKeyboardControl(xkbEvent->any.display, +- &self->mKeyboardState)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p FilterEvents failed due to failure " +- "of XGetKeyboardControl(), display=0x%p", +- self, xkbEvent->any.display)); +- } +- break; +- } +- } +- +- return GDK_FILTER_CONTINUE; +-} +- + static void + ResetBidiKeyboard() + { +@@ -920,23 +632,6 @@ KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, + // key release events, the result isn't what we want. + guint modifierState = aGdkKeyEvent->state; + GdkDisplay* gdkDisplay = gdk_display_get_default(); +- if (aGdkKeyEvent->is_modifier && GDK_IS_X11_DISPLAY(gdkDisplay)) { +- Display* display = +- gdk_x11_display_get_xdisplay(gdkDisplay); +- if (XEventsQueued(display, QueuedAfterReading)) { +- XEvent nextEvent; +- XPeekEvent(display, &nextEvent); +- if (nextEvent.type == keymapWrapper->mXKBBaseEventCode) { +- XkbEvent* XKBEvent = (XkbEvent*)&nextEvent; +- if (XKBEvent->any.xkb_type == XkbStateNotify) { +- XkbStateNotifyEvent* stateNotifyEvent = +- (XkbStateNotifyEvent*)XKBEvent; +- modifierState &= ~0xFF; +- modifierState |= stateNotifyEvent->lookup_mods; +- } +- } +- } +- } + InitInputEvent(aKeyEvent, modifierState); + + switch (aGdkKeyEvent->keyval) { +@@ -1176,11 +871,7 @@ KeymapWrapper::IsLatinGroup(guint8 aGroup) + bool + KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) + { +- uint8_t indexOfArray = aHardwareKeyCode / 8; +- MOZ_ASSERT(indexOfArray < ArrayLength(mKeyboardState.auto_repeats), +- "invalid index"); +- char bitMask = 1 << (aHardwareKeyCode % 8); +- return (mKeyboardState.auto_repeats[indexOfArray] & bitMask) != 0; ++ return true; + } + + /* static */ bool +diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h +index 67528d8..f1ecd6b 100644 +--- a/widget/gtk/nsGtkKeyUtils.h ++++ b/widget/gtk/nsGtkKeyUtils.h +@@ -12,7 +12,7 @@ + #include "mozilla/EventForwards.h" + + #include +-#include ++//#include + + namespace mozilla { + namespace widget { +@@ -223,14 +223,6 @@ protected: + int mXKBBaseEventCode; + + /** +- * Only auto_repeats[] stores valid value. If you need to use other +- * members, you need to listen notification events for them. +- * See a call of XkbSelectEventDetails() with XkbControlsNotify in +- * InitXKBExtension(). +- */ +- XKeyboardState mKeyboardState; +- +- /** + * Pointer of the singleton instance. + */ + static KeymapWrapper* sInstance; +@@ -339,15 +331,6 @@ protected: + static uint32_t GetDOMKeyCodeFromKeyPairs(guint aGdkKeyval); + + /** +- * FilterEvents() listens all events on all our windows. +- * Be careful, this may make damage to performance if you add expensive +- * code in this method. +- */ +- static GdkFilterReturn FilterEvents(GdkXEvent* aXEvent, +- GdkEvent* aGdkEvent, +- gpointer aData); +- +- /** + * See the document of WillDispatchKeyboardEvent(). + */ + void WillDispatchKeyboardEventInternal(WidgetKeyboardEvent& aKeyEvent, +diff --git a/widget/gtk/nsScreenGtk.cpp b/widget/gtk/nsScreenGtk.cpp +index 28e7f23..a8eb2be 100644 +--- a/widget/gtk/nsScreenGtk.cpp ++++ b/widget/gtk/nsScreenGtk.cpp +@@ -8,7 +8,7 @@ + #include "nsIWidget.h" + + #include +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #endif +@@ -132,7 +132,7 @@ nsScreenGtk :: Init (GdkWindow *aRootWindow) + + return; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // We need to account for the taskbar, etc in the available rect. + // See http://freedesktop.org/Standards/wm-spec/index.html#id2767771 + +@@ -195,7 +195,7 @@ nsScreenGtk :: Init (GdkWindow *aRootWindow) + #endif + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void + nsScreenGtk :: Init (XineramaScreenInfo *aScreenInfo) + { +diff --git a/widget/gtk/nsScreenGtk.h b/widget/gtk/nsScreenGtk.h +index d58ea4b..afe468f 100644 +--- a/widget/gtk/nsScreenGtk.h ++++ b/widget/gtk/nsScreenGtk.h +@@ -9,7 +9,7 @@ + #include "nsBaseScreen.h" + #include "nsRect.h" + #include "gdk/gdk.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + + // from Xinerama.h +@@ -40,7 +40,7 @@ public: + NS_IMETHOD GetDefaultCSSScaleFactor(double* aScaleFactor) override; + + void Init(GdkWindow *aRootWindow); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void Init(XineramaScreenInfo *aScreenInfo); + #endif /* MOZ_X11 */ + +diff --git a/widget/gtk/nsScreenManagerGtk.cpp b/widget/gtk/nsScreenManagerGtk.cpp +index 98166cc..4dfc0ee 100644 +--- a/widget/gtk/nsScreenManagerGtk.cpp ++++ b/widget/gtk/nsScreenManagerGtk.cpp +@@ -13,7 +13,7 @@ + + #define SCREEN_MANAGER_LIBRARY_LOAD_FAILED ((PRLibrary*)1) + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + // prototypes from Xinerama.h + typedef Bool (*_XnrmIsActive_fn)(Display *dpy); +@@ -34,7 +34,7 @@ root_window_event_filter(GdkXEvent *aGdkXEvent, GdkEvent *aGdkEvent, + gpointer aClosure) + { + nsScreenManagerGtk *manager = static_cast(aClosure); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent *xevent = static_cast(aGdkXEvent); + + // See comments in nsScreenGtk::Init below. +@@ -58,7 +58,6 @@ root_window_event_filter(GdkXEvent *aGdkXEvent, GdkEvent *aGdkEvent, + nsScreenManagerGtk :: nsScreenManagerGtk ( ) + : mXineramalib(nullptr) + , mRootWindow(nullptr) +- , mNetWorkareaAtom(0) + { + // nothing else to do. I guess we could cache a bunch of information + // here, but we want to ask the device at runtime in case anything +@@ -114,7 +113,7 @@ nsScreenManagerGtk :: EnsureInit() + + g_signal_connect(gdk_screen_get_default(), "monitors-changed", + G_CALLBACK(monitors_changed), this); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gdk_window_add_filter(mRootWindow, root_window_event_filter, this); + if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) + mNetWorkareaAtom = +@@ -127,7 +126,7 @@ nsScreenManagerGtk :: EnsureInit() + nsresult + nsScreenManagerGtk :: Init() + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XineramaScreenInfo *screenInfo = nullptr; + int numScreens; + +@@ -170,7 +169,7 @@ nsScreenManagerGtk :: Init() + } + + screen->Init(mRootWindow); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + } + // If Xinerama is enabled and there's more than one screen, fill + // in the info for all of the screens. If that's not the case +diff --git a/widget/gtk/nsScreenManagerGtk.h b/widget/gtk/nsScreenManagerGtk.h +index 9afb3bf..60c016d 100644 +--- a/widget/gtk/nsScreenManagerGtk.h ++++ b/widget/gtk/nsScreenManagerGtk.h +@@ -12,7 +12,7 @@ + #include "nsCOMArray.h" + #include "prlink.h" + #include "gdk/gdk.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif + +@@ -26,7 +26,7 @@ public: + NS_DECL_ISUPPORTS + NS_DECL_NSISCREENMANAGER + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Atom NetWorkareaAtom() { return mNetWorkareaAtom; } + #endif + +@@ -44,7 +44,7 @@ private: + PRLibrary *mXineramalib; + + GdkWindow *mRootWindow; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Atom mNetWorkareaAtom; + #endif + }; +diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp +index 7e42743..553fd2e 100644 +--- a/widget/gtk/nsWidgetFactory.cpp ++++ b/widget/gtk/nsWidgetFactory.cpp +@@ -17,11 +17,11 @@ + #include "nsWindow.h" + #include "nsTransferable.h" + #include "nsHTMLFormatConverter.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "nsClipboardHelper.h" + #include "nsClipboard.h" +-#include "nsDragService.h" + #endif ++#include "nsDragService.h" + #if (MOZ_WIDGET_GTK == 3) + #include "nsApplicationChooser.h" + #endif +@@ -44,10 +44,10 @@ + #include "nsImageToPixbuf.h" + #include "nsPrintDialogGTK.h" + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include "nsIdleServiceGTK.h" +-#include "GfxInfoX11.h" + #endif ++#include "GfxInfoX11.h" + + #include "nsNativeThemeGTK.h" + +@@ -70,12 +70,12 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildWindow) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter) +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIdleServiceGTK, nsIdleServiceGTK::GetInstance) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper) + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsClipboard, Init) +-NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService) + #endif ++NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerGtk) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsImageToPixbuf) +@@ -202,11 +202,11 @@ NS_DEFINE_NAMED_CID(NS_APPLICATIONCHOOSER_CID); + #endif + NS_DEFINE_NAMED_CID(NS_SOUND_CID); + NS_DEFINE_NAMED_CID(NS_TRANSFERABLE_CID); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + NS_DEFINE_NAMED_CID(NS_CLIPBOARD_CID); + NS_DEFINE_NAMED_CID(NS_CLIPBOARDHELPER_CID); +-NS_DEFINE_NAMED_CID(NS_DRAGSERVICE_CID); + #endif ++NS_DEFINE_NAMED_CID(NS_DRAGSERVICE_CID); + NS_DEFINE_NAMED_CID(NS_HTMLFORMATCONVERTER_CID); + NS_DEFINE_NAMED_CID(NS_BIDIKEYBOARD_CID); + NS_DEFINE_NAMED_CID(NS_SCREENMANAGER_CID); +@@ -219,10 +219,10 @@ NS_DEFINE_NAMED_CID(NS_DEVICE_CONTEXT_SPEC_CID); + NS_DEFINE_NAMED_CID(NS_PRINTDIALOGSERVICE_CID); + #endif + NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_CID); +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID); +-NS_DEFINE_NAMED_CID(NS_GFXINFO_CID); + #endif ++NS_DEFINE_NAMED_CID(NS_GFXINFO_CID); + + + static const mozilla::Module::CIDEntry kWidgetCIDs[] = { +@@ -236,11 +236,11 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = { + #endif + { &kNS_SOUND_CID, false, nullptr, nsSoundConstructor, Module::MAIN_PROCESS_ONLY }, + { &kNS_TRANSFERABLE_CID, false, nullptr, nsTransferableConstructor }, +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardConstructor, Module::MAIN_PROCESS_ONLY }, + { &kNS_CLIPBOARDHELPER_CID, false, nullptr, nsClipboardHelperConstructor }, +- { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor, Module::MAIN_PROCESS_ONLY }, + #endif ++ { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor, Module::MAIN_PROCESS_ONLY }, + { &kNS_HTMLFORMATCONVERTER_CID, false, nullptr, nsHTMLFormatConverterConstructor }, + { &kNS_BIDIKEYBOARD_CID, false, nullptr, nsBidiKeyboardConstructor }, + { &kNS_SCREENMANAGER_CID, false, nullptr, nsScreenManagerGtkConstructor, +@@ -254,10 +254,10 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = { + { &kNS_PRINTDIALOGSERVICE_CID, false, nullptr, nsPrintDialogServiceGTKConstructor }, + #endif + { &kNS_IMAGE_TO_PIXBUF_CID, false, nullptr, nsImageToPixbufConstructor }, +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + { &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor }, +- { &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor }, + #endif ++ { &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor }, + { nullptr } + }; + +@@ -272,11 +272,11 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = { + #endif + { "@mozilla.org/sound;1", &kNS_SOUND_CID, Module::MAIN_PROCESS_ONLY }, + { "@mozilla.org/widget/transferable;1", &kNS_TRANSFERABLE_CID }, +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { "@mozilla.org/widget/clipboard;1", &kNS_CLIPBOARD_CID, Module::MAIN_PROCESS_ONLY }, + { "@mozilla.org/widget/clipboardhelper;1", &kNS_CLIPBOARDHELPER_CID }, +- { "@mozilla.org/widget/dragservice;1", &kNS_DRAGSERVICE_CID, Module::MAIN_PROCESS_ONLY }, + #endif ++ { "@mozilla.org/widget/dragservice;1", &kNS_DRAGSERVICE_CID, Module::MAIN_PROCESS_ONLY }, + { "@mozilla.org/widget/htmlformatconverter;1", &kNS_HTMLFORMATCONVERTER_CID }, + { "@mozilla.org/widget/bidikeyboard;1", &kNS_BIDIKEYBOARD_CID, + Module::MAIN_PROCESS_ONLY }, +@@ -291,10 +291,10 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = { + { NS_PRINTDIALOGSERVICE_CONTRACTID, &kNS_PRINTDIALOGSERVICE_CID }, + #endif + { "@mozilla.org/widget/image-to-gdk-pixbuf;1", &kNS_IMAGE_TO_PIXBUF_CID }, +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + { "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID }, +- { "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID }, + #endif ++ { "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID }, + { nullptr } + }; + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index 9942399..811b13f 100644 +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -41,11 +41,12 @@ + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include + #include ++#endif /* MOZ_X11 */ + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +@@ -53,7 +54,6 @@ + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif +-#endif /* MOZ_X11 */ + #include + #if (MOZ_WIDGET_GTK == 2) + #include +@@ -121,7 +121,7 @@ using namespace mozilla::widget; + #include "mozilla/layers/CompositorBridgeParent.h" + #include "mozilla/layers/CompositorThread.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "X11CompositorWidget.h" + #include "gfxXlibSurface.h" + #include "WindowSurfaceX11Image.h" +@@ -136,6 +136,7 @@ using namespace mozilla::widget; + #include "NativeKeyBindings.h" + + #include ++#include + + #include "mozilla/layers/APZCTreeManager.h" + +@@ -243,7 +244,7 @@ static nsWindow* GetFirstNSWindowForGDKWindow (GdkWindow *aGdkWindow); + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static GdkFilterReturn popup_take_focus_filter (GdkXEvent *gdk_xevent, + GdkEvent *event, + gpointer data); +@@ -308,47 +309,20 @@ public: + + guint32 GetCurrentTime() const + { +- return gdk_x11_get_server_time(mWindow); ++ return g_get_monotonic_time()/1000; + } + + void GetTimeAsyncForPossibleBackwardsSkew(const TimeStamp& aNow) + { +- // Check for in-flight request +- if (!mAsyncUpdateStart.IsNull()) { +- return; +- } +- mAsyncUpdateStart = aNow; +- +- Display* xDisplay = GDK_WINDOW_XDISPLAY(mWindow); +- Window xWindow = GDK_WINDOW_XID(mWindow); +- unsigned char c = 'a'; +- Atom timeStampPropAtom = TimeStampPropAtom(); +- XChangeProperty(xDisplay, xWindow, timeStampPropAtom, +- timeStampPropAtom, 8, PropModeReplace, &c, 1); +- XFlush(xDisplay); + } + + gboolean PropertyNotifyHandler(GtkWidget* aWidget, + GdkEventProperty* aEvent) + { +- if (aEvent->atom != +- gdk_x11_xatom_to_atom(TimeStampPropAtom())) { +- return FALSE; +- } +- +- guint32 eventTime = aEvent->time; +- TimeStamp lowerBound = mAsyncUpdateStart; +- +- TimeConverter().CompensateForBackwardsSkew(eventTime, lowerBound); +- mAsyncUpdateStart = TimeStamp(); +- return TRUE; ++ return FALSE; + } + + private: +- static Atom TimeStampPropAtom() { +- return gdk_x11_get_xatom_by_name_for_display( +- gdk_display_get_default(), "GDK_TIMESTAMP_PROP"); +- } + + // This is safe because this class is stored as a member of mWindow and + // won't outlive it. +@@ -440,7 +414,7 @@ nsWindow::nsWindow() + mHandleTouchEvent = false; + #endif + mIsDragPopup = false; +- mIsX11Display = GDK_IS_X11_DISPLAY(gdk_display_get_default()); ++ mIsX11Display = false; + + mContainer = nullptr; + mGdkWindow = nullptr; +@@ -454,7 +428,7 @@ nsWindow::nsWindow() + mLastSizeMode = nsSizeMode_Normal; + mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + mOldFocusWindow = 0; + + mXDisplay = nullptr; +@@ -734,7 +708,7 @@ nsWindow::Destroy() + // destroys the the gl context attached to it). + DestroyCompositor(); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Ensure any resources assigned to the window get cleaned up first + // to avoid double-freeing. + mSurfaceProvider.CleanupResources(); +@@ -1356,7 +1330,7 @@ SetUserTimeAndStartupIDForActivatedWindow(GtkWidget* aWindow) + return; + } + +-#if defined(MOZ_ENABLE_STARTUP_NOTIFICATION) ++#if defined(MOZ_ENABLE_STARTUP_NOTIFICATION_no) + // TODO - Implement for non-X11 Gtk backends (Bug 726479) + if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { + GdkWindow* gdkWindow = gtk_widget_get_window(aWindow); +@@ -1405,14 +1379,7 @@ nsWindow::GetLastUserInputTime() + // drags, WM_DELETE_WINDOW delete events, but not usually mouse motion nor + // button and key releases. Therefore use the most recent of + // gdk_x11_display_get_user_time and the last time that we have seen. +- guint32 timestamp = +- gdk_x11_display_get_user_time(gdk_display_get_default()); +- if (sLastUserInputTime != GDK_CURRENT_TIME && +- TimestampIsNewerThan(sLastUserInputTime, timestamp)) { +- return sLastUserInputTime; +- } +- +- return timestamp; ++ return sLastUserInputTime; + } + + NS_IMETHODIMP +@@ -1555,41 +1522,7 @@ nsWindow::UpdateClientOffset() + { + PROFILER_LABEL("nsWindow", "UpdateClientOffset", js::ProfileEntry::Category::GRAPHICS); + +- if (!mIsTopLevel || !mShell || !mGdkWindow || !mIsX11Display || +- gtk_window_get_window_type(GTK_WINDOW(mShell)) == GTK_WINDOW_POPUP) { +- mClientOffset = nsIntPoint(0, 0); +- return; +- } +- +- GdkAtom cardinal_atom = gdk_x11_xatom_to_atom(XA_CARDINAL); +- +- GdkAtom type_returned; +- int format_returned; +- int length_returned; +- long *frame_extents; +- +- if (!gdk_property_get(mGdkWindow, +- gdk_atom_intern ("_NET_FRAME_EXTENTS", FALSE), +- cardinal_atom, +- 0, // offset +- 4*4, // length +- FALSE, // delete +- &type_returned, +- &format_returned, +- &length_returned, +- (guchar **) &frame_extents) || +- length_returned/sizeof(glong) != 4) { +- mClientOffset = nsIntPoint(0, 0); +- return; +- } +- +- // data returned is in the order left, right, top, bottom +- int32_t left = int32_t(frame_extents[0]); +- int32_t top = int32_t(frame_extents[2]); +- +- g_free(frame_extents); +- +- mClientOffset = nsIntPoint(left, top); ++ return; + } + + LayoutDeviceIntPoint +@@ -1751,7 +1684,7 @@ nsWindow::GetNativeData(uint32_t aDataType) + + case NS_NATIVE_DISPLAY: { + GdkDisplay* gdkDisplay = gdk_display_get_default(); +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + if (GDK_IS_X11_DISPLAY(gdkDisplay)) { + return GDK_DISPLAY_XDISPLAY(gdkDisplay); + } +@@ -1767,7 +1700,7 @@ nsWindow::GetNativeData(uint32_t aDataType) + return GetToplevelWidget(); + + case NS_NATIVE_SHAREABLE_WINDOW: +- return (void *) GDK_WINDOW_XID(gdk_window_get_toplevel(mGdkWindow)); ++ return (void *) NULL; + case NS_NATIVE_PLUGIN_OBJECT_PTR: + return (void *) mPluginNativeWindow; + case NS_RAW_NATIVE_IME_CONTEXT: { +@@ -1985,7 +1918,7 @@ nsWindow::HasPendingInputEvent() + // anything except expose events. Reordering expose and others should be + // ok, hopefully. + bool haveEvent = false; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent ev; + if (mIsX11Display) { + Display *display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +@@ -2020,7 +1953,7 @@ nsWindow::HasPendingInputEvent() + #define WANT_PAINT_FLASHING \ + (debug_WantPaintFlashing() && CAPS_LOCK_IS_ON) + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static void + gdk_window_flash(GdkWindow * aGdkWindow, + unsigned int aTimes, +@@ -2206,10 +2139,6 @@ nsWindow::OnExposeEvent(cairo_t *cr) + clientLayers->SetNeedsComposite(false); + } + +- LOGDRAW(("sending expose event [%p] %p 0x%lx (rects follow):\n", +- (void *)this, (void *)mGdkWindow, +- gdk_x11_window_get_xid(mGdkWindow))); +- + // Our bounds may have changed after calling WillPaintWindow. Clip + // to the new bounds here. The region is relative to this + // window. +@@ -2531,7 +2460,7 @@ nsWindow::OnSizeAllocate(GtkAllocation *aAllocation) + + mBounds.SizeTo(size); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + if (mCompositorWidgetDelegate) { + mCompositorWidgetDelegate->NotifyClientSizeChanged(GetClientSize()); +@@ -2645,7 +2574,7 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent) + // XXXldb Why skip every other motion event when we have multiple, + // but not more than that? + bool synthEvent = false; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent xevent; + + if (mIsX11Display) { +@@ -2681,7 +2610,7 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent) + + guint modifierState; + if (synthEvent) { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + event.mRefPoint.x = nscoord(xevent.xmotion.x); + event.mRefPoint.y = nscoord(xevent.xmotion.y); + +@@ -3746,7 +3675,7 @@ nsWindow::Create(nsIWidget* aParent, + // WM_HINTS input field is set to False to tell the window + // manager not to set input focus to this window ... + gtk_window_set_accept_focus(GTK_WINDOW(mShell), FALSE); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // ... but when the window manager offers focus through + // WM_TAKE_FOCUS, focus is requested on the parent window. + gtk_widget_realize(mShell); +@@ -4032,9 +3961,6 @@ nsWindow::Create(nsIWidget* aParent, + + LOG(("nsWindow [%p]\n", (void *)this)); + if (mShell) { +- LOG(("\tmShell %p mContainer %p mGdkWindow %p 0x%lx\n", +- mShell, mContainer, mGdkWindow, +- gdk_x11_window_get_xid(mGdkWindow))); + } else if (mContainer) { + LOG(("\tmContainer %p mGdkWindow %p\n", mContainer, mGdkWindow)); + } +@@ -4047,7 +3973,7 @@ nsWindow::Create(nsIWidget* aParent, + if (!mIsTopLevel) + Resize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, false); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (mIsX11Display && mGdkWindow) { + mXDisplay = GDK_WINDOW_XDISPLAY(mGdkWindow); + mXWindow = gdk_x11_window_get_xid(mGdkWindow); +@@ -4102,7 +4028,7 @@ nsWindow::SetWindowClass(const nsAString &xulWinType) + + gdk_window_set_role(mGdkWindow, role); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (mIsX11Display) { + XClassHint *class_hint = XAllocClassHint(); + if (!class_hint) { +@@ -4164,7 +4090,7 @@ nsWindow::NativeResize() + gdk_window_resize(mGdkWindow, size.width, size.height); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + // This is different than OnSizeAllocate to catch initial sizing + if (mCompositorWidgetDelegate) { +@@ -4220,7 +4146,7 @@ nsWindow::NativeMoveResize() + topLeft.x, topLeft.y, size.width, size.height); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + // This is different than OnSizeAllocate to catch initial sizing + if (mCompositorWidgetDelegate) { +@@ -4610,7 +4536,7 @@ void UpdateMaskBits(gchar* aMaskBits, int32_t aMaskWidth, int32_t aMaskHeight, + void + nsWindow::ApplyTransparencyBitmap() + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // We use X11 calls where possible, because GDK handles expose events + // for shaped windows in a way that's incompatible with us (Bug 635903). + // It doesn't occur when the shapes are set through X. +@@ -4668,7 +4594,7 @@ nsWindow::ClearTransparencyBitmap() + if (!mShell) + return; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (!mGdkWindow) + return; + +@@ -4842,31 +4768,7 @@ nsWindow::SetUrgencyHint(GtkWidget *top_window, bool state) + void * + nsWindow::SetupPluginPort(void) + { +- if (!mGdkWindow) +- return nullptr; +- +- if (gdk_window_is_destroyed(mGdkWindow) == TRUE) +- return nullptr; +- +- Window window = gdk_x11_window_get_xid(mGdkWindow); +- +- // we have to flush the X queue here so that any plugins that +- // might be running on separate X connections will be able to use +- // this window in case it was just created +-#ifdef MOZ_X11 +- XWindowAttributes xattrs; +- Display *display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +- XGetWindowAttributes(display, window, &xattrs); +- XSelectInput (display, window, +- xattrs.your_event_mask | +- SubstructureNotifyMask); +- +- gdk_window_add_filter(mGdkWindow, plugin_window_filter_func, this); +- +- XSync(display, False); +-#endif /* MOZ_X11 */ +- +- return (void *)window; ++ return nullptr; + } + + void +@@ -4881,66 +4783,10 @@ nsWindow::SetPluginType(PluginType aPluginType) + mPluginType = aPluginType; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void + nsWindow::SetNonXEmbedPluginFocus() + { +- if (gPluginFocusWindow == this || mPluginType!=PluginType_NONXEMBED) { +- return; +- } +- +- if (gPluginFocusWindow) { +- RefPtr kungFuDeathGrip = gPluginFocusWindow; +- gPluginFocusWindow->LoseNonXEmbedPluginFocus(); +- } +- +- LOGFOCUS(("nsWindow::SetNonXEmbedPluginFocus\n")); +- +- Window curFocusWindow; +- int focusState; +- +- GdkDisplay *gdkDisplay = gdk_window_get_display(mGdkWindow); +- XGetInputFocus(gdk_x11_display_get_xdisplay(gdkDisplay), +- &curFocusWindow, +- &focusState); +- +- LOGFOCUS(("\t curFocusWindow=%p\n", curFocusWindow)); +- +- GdkWindow* toplevel = gdk_window_get_toplevel(mGdkWindow); +-#if (MOZ_WIDGET_GTK == 2) +- GdkWindow *gdkfocuswin = gdk_window_lookup(curFocusWindow); +-#else +- GdkWindow *gdkfocuswin = gdk_x11_window_lookup_for_display(gdkDisplay, +- curFocusWindow); +-#endif +- +- // lookup with the focus proxy window is supposed to get the +- // same GdkWindow as toplevel. If the current focused window +- // is not the focus proxy, we return without any change. +- if (gdkfocuswin != toplevel) { +- return; +- } +- +- // switch the focus from the focus proxy to the plugin window +- mOldFocusWindow = curFocusWindow; +- XRaiseWindow(GDK_WINDOW_XDISPLAY(mGdkWindow), +- gdk_x11_window_get_xid(mGdkWindow)); +- gdk_error_trap_push(); +- XSetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- gdk_x11_window_get_xid(mGdkWindow), +- RevertToNone, +- CurrentTime); +- gdk_flush(); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif +- gPluginFocusWindow = this; +- gdk_window_add_filter(nullptr, plugin_client_message_filter, this); +- +- LOGFOCUS(("nsWindow::SetNonXEmbedPluginFocus oldfocus=%p new=%p\n", +- mOldFocusWindow, gdk_x11_window_get_xid(mGdkWindow))); + } + + void +@@ -4948,44 +4794,6 @@ nsWindow::LoseNonXEmbedPluginFocus() + { + LOGFOCUS(("nsWindow::LoseNonXEmbedPluginFocus\n")); + +- // This method is only for the nsWindow which contains a +- // Non-XEmbed plugin, for example, JAVA plugin. +- if (gPluginFocusWindow != this || mPluginType!=PluginType_NONXEMBED) { +- return; +- } +- +- Window curFocusWindow; +- int focusState; +- +- XGetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- &curFocusWindow, +- &focusState); +- +- // we only switch focus between plugin window and focus proxy. If the +- // current focused window is not the plugin window, just removing the +- // event filter that blocks the WM_TAKE_FOCUS is enough. WM and gtk2 +- // will take care of the focus later. +- if (!curFocusWindow || +- curFocusWindow == gdk_x11_window_get_xid(mGdkWindow)) { +- +- gdk_error_trap_push(); +- XRaiseWindow(GDK_WINDOW_XDISPLAY(mGdkWindow), +- mOldFocusWindow); +- XSetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- mOldFocusWindow, +- RevertToParent, +- CurrentTime); +- gdk_flush(); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif +- } +- gPluginFocusWindow = nullptr; +- mOldFocusWindow = 0; +- gdk_window_remove_filter(nullptr, plugin_client_message_filter, this); +- + LOGFOCUS(("nsWindow::LoseNonXEmbedPluginFocus end\n")); + } + #endif /* MOZ_X11 */ +@@ -5138,7 +4946,7 @@ nsWindow::PerformFullscreenTransition(FullscreenTransitionStage aStage, + static bool + IsFullscreenSupported(GtkWidget* aShell) + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + GdkScreen* screen = gtk_widget_get_screen(aShell); + GdkAtom atom = gdk_atom_intern("_NET_WM_STATE_FULLSCREEN", FALSE); + if (!gdk_x11_screen_supports_net_wm_hint(screen, atom)) { +@@ -5217,7 +5025,7 @@ nsWindow::HideWindowChrome(bool aShouldHide) + // and flush the queue here so that we don't end up with a BadWindow + // error later when this happens (when the persistence timer fires + // and GetWindowPos is called) +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XSync(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()) , False); + #else + gdk_flush (); +@@ -5822,7 +5630,7 @@ focus_out_event_cb(GtkWidget *widget, GdkEventFocus *event) + return FALSE; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // For long-lived popup windows that don't really take focus themselves but + // may have elements that accept keyboard input when the parent window is + // active, focus is handled specially. These windows include noautohide +@@ -6004,7 +5812,7 @@ key_press_event_cb(GtkWidget *widget, GdkEventKey *event) + + RefPtr focusWindow = gFocusWindow ? gFocusWindow : window; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Keyboard repeat can cause key press events to queue up when there are + // slow event handlers (bug 301029). Throttle these events by removing + // consecutive pending duplicate KeyPress events to the same window. +@@ -6632,14 +6440,13 @@ nsWindow::GetDrawTargetForGdkDrawable(GdkDrawable* aDrawable, + already_AddRefed + nsWindow::StartRemoteDrawingInRegion(LayoutDeviceIntRegion& aInvalidRegion, BufferMode* aBufferMode) + { +- return mSurfaceProvider.StartRemoteDrawingInRegion(aInvalidRegion, aBufferMode); ++ return NULL; + } + + void + nsWindow::EndRemoteDrawingInRegion(DrawTarget* aDrawTarget, + LayoutDeviceIntRegion& aInvalidRegion) + { +- mSurfaceProvider.EndRemoteDrawingInRegion(aDrawTarget, aInvalidRegion); + } + + // Code shared begin BeginMoveDrag and BeginResizeDrag +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +index e571bed..aa0d03f 100644 +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -20,7 +20,7 @@ + #include + #include + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif /* MOZ_X11 */ + #ifdef MOZ_WAYLAND +@@ -246,7 +246,7 @@ public: + }; + + void SetPluginType(PluginType aPluginType); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void SetNonXEmbedPluginFocus(void); + void LoseNonXEmbedPluginFocus(void); + #endif /* MOZ_X11 */ +@@ -255,7 +255,7 @@ public: + void OnDPIChanged(void); + void OnCheckResize(void); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Window mOldFocusWindow; + #endif /* MOZ_X11 */ + +@@ -464,17 +464,17 @@ private: + nsRefPtrHashtable, mozilla::dom::Touch> mTouches; + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Display* mXDisplay; + Window mXWindow; + Visual* mXVisual; + int mXDepth; ++#endif + #ifdef MOZ_WAYLAND + wl_display* mWaylandDisplay; + wl_surface* mWaylandSurface; + #endif + mozilla::widget::WindowSurfaceProvider mSurfaceProvider; +-#endif + // Upper bound on pending ConfigureNotify events to be dispatched to the + // window. See bug 1225044. + unsigned int mPendingConfigures; +diff --git a/widget/moz.build b/widget/moz.build +index f2f2f2e..2c341a5 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -210,10 +210,10 @@ if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ + 'GfxInfoX11.cpp' + ] +- SOURCES += [ +- 'nsShmImage.cpp', +- 'WindowSurfaceX11SHM.cpp', +- ] ++ #SOURCES += [ ++ # 'nsShmImage.cpp', ++ # 'WindowSurfaceX11SHM.cpp', ++ #] + + if toolkit in ('cocoa', 'windows'): + UNIFIED_SOURCES += [ +diff --git a/widget/nsShmImage.h b/widget/nsShmImage.h +index dae09c6..adfe56f 100644 +--- a/widget/nsShmImage.h ++++ b/widget/nsShmImage.h +@@ -7,7 +7,7 @@ + #ifndef __mozilla_widget_nsShmImage_h__ + #define __mozilla_widget_nsShmImage_h__ + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + # define MOZ_HAVE_SHMIMAGE + #endif + +diff --git a/widget/x11/keysym2ucs.h b/widget/x11/keysym2ucs.h +index d3c49a6..b3db16d 100644 +--- a/widget/x11/keysym2ucs.h ++++ b/widget/x11/keysym2ucs.h +@@ -11,7 +11,7 @@ + * (UCS, Unicode) values. + */ + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #else + #define KeySym unsigned int diff --git a/patches/www-client/firefox-53.0/big-no-x11.patch b/patches/www-client/firefox-53.0/big-no-x11.patch new file mode 100644 index 0000000..e359dfe --- /dev/null +++ b/patches/www-client/firefox-53.0/big-no-x11.patch @@ -0,0 +1,9207 @@ +diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp +index d0fa70a..78ca858 100644 +--- a/dom/base/nsDOMWindowUtils.cpp ++++ b/dom/base/nsDOMWindowUtils.cpp +@@ -69,7 +69,7 @@ + + #if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK) + #include +-#include ++//#include + #endif + + #include "Layers.h" +@@ -314,7 +314,7 @@ nsDOMWindowUtils::Redraw(uint32_t aCount, uint32_t *aDurationOut) + for (uint32_t i = 0; i < aCount; i++) + rootFrame->InvalidateFrame(); + +-#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_X11_no) && defined(MOZ_WIDGET_GTK) + XSync(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), False); + #endif + +diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp +index 33f4a85..de211bd 100644 +--- a/dom/ipc/ContentChild.cpp ++++ b/dom/ipc/ContentChild.cpp +@@ -166,7 +166,7 @@ + #include "mozilla/widget/AudioSession.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -560,7 +560,7 @@ ContentChild::Init(MessageLoop* aIOLoop, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + XRE_InstallX11ErrorHandler(); + #endif +@@ -587,7 +587,7 @@ ContentChild::Init(MessageLoop* aIOLoop, + GetIPCChannel()->SetChannelFlags(MessageChannel::REQUIRE_A11Y_REENTRY); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Send the parent our X socket to act as a proxy reference for our X + // resources. + int xSocketFd = ConnectionNumber(DefaultXDisplay()); +diff --git a/dom/plugins/base/npapi.h b/dom/plugins/base/npapi.h +index 12ac635..2577699 100644 +--- a/dom/plugins/base/npapi.h ++++ b/dom/plugins/base/npapi.h +@@ -43,7 +43,7 @@ + + #if defined(XP_UNIX) + #include +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include + #include + #include "X11UndefineNone.h" +@@ -243,7 +243,7 @@ typedef struct + typedef struct + { + int32_t type; +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + Display* display; + Visual* visual; + Colormap colormap; +@@ -566,7 +566,7 @@ typedef struct _NPEvent + uintptr_t wParam; + uintptr_t lParam; + } NPEvent; +-#elif defined(XP_UNIX) && defined(MOZ_X11) ++#elif defined(XP_UNIX) && defined(MOZ_X11_no) + typedef XEvent NPEvent; + #else + typedef void* NPEvent; +@@ -580,7 +580,7 @@ typedef RgnHandle NPQDRegion; + typedef CGPathRef NPCGRegion; + #elif defined(XP_WIN) + typedef HRGN NPRegion; +-#elif defined(XP_UNIX) && defined(MOZ_X11) ++#elif defined(XP_UNIX) && defined(MOZ_X11_no) + typedef Region NPRegion; + #elif defined(XP_SYMBIAN) + typedef QRegion* NPRegion; +diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp +index 429ebd6..2c2ad22 100644 +--- a/dom/plugins/base/nsNPAPIPlugin.cpp ++++ b/dom/plugins/base/nsNPAPIPlugin.cpp +@@ -58,7 +58,7 @@ + // needed for nppdf plugin + #if (MOZ_WIDGET_GTK) + #include +-#include ++//#include + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif +@@ -85,7 +85,7 @@ using mozilla::PluginPRLibrary; + using mozilla::plugins::PluginModuleChromeParent; + using mozilla::plugins::PluginModuleContentParent; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -1728,7 +1728,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result) + + #if defined(XP_UNIX) && !defined(XP_MACOSX) + case NPNVxDisplay : { +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + if (npp) { + nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *) npp->ndata; + bool windowless = false; +diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp +index 1e3118e..e9dbcdf 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 ++#ifdef MOZ_X11_no + #include + #include "gfxXlibSurface.h" + /* X headers suck */ +@@ -748,7 +748,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value) + } + + return NS_OK; +-#elif defined(MOZ_WIDGET_GTK) && defined(MOZ_X11) ++#elif defined(MOZ_WIDGET_GTK) && defined(MOZ_X11_no) + // X11 window managers want the toplevel window for WM_TRANSIENT_FOR. + nsIWidget* win = mPluginFrame->GetNearestWidget(); + if (!win) +@@ -2105,7 +2105,7 @@ nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent) + return NS_OK; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static unsigned int XInputEventState(const WidgetInputEvent& anEvent) + { + unsigned int state = 0; +@@ -2586,7 +2586,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent) + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // this code supports windowless plugins + nsIWidget* widget = anEvent.mWidget; + XEvent pluginEvent = XEvent(); +@@ -3061,7 +3061,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext, + } + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + void nsPluginInstanceOwner::Paint(gfxContext* aContext, + const gfxRect& aFrameRect, + const gfxRect& aDirtyRect) +@@ -3206,7 +3206,7 @@ nsPluginInstanceOwner::Renderer::DrawWithXlib(cairo_surface_t* xsurface, + + NPSetWindowCallbackStruct* ws_info = + static_cast(mWindow->ws_info); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (ws_info->visual != visual || ws_info->colormap != colormap) { + ws_info->visual = visual; + ws_info->colormap = colormap; +@@ -3425,7 +3425,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void) + // passing HDC till paint event when it is really + // needed. Change spec? + mPluginWindow->window = nullptr; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // 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 589bcb0..66609b4 100644 +--- a/dom/plugins/base/nsPluginInstanceOwner.h ++++ b/dom/plugins/base/nsPluginInstanceOwner.h +@@ -45,7 +45,7 @@ class PuppetWidget; + + using mozilla::widget::PuppetWidget; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibNativeRenderer.h" + #endif + +@@ -214,7 +214,7 @@ public: + return mPluginWindow->type == NPWindowTypeDrawable && + (MatchPluginName("Shockwave Flash") || + MatchPluginName("Test Plug-in")); +-#elif defined(MOZ_X11) || defined(XP_MACOSX) ++#elif defined(MOZ_X11_no) || defined(XP_MACOSX) + return true; + #else + return false; +@@ -393,7 +393,7 @@ private: + + int mLastMouseDownButtonType; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + class Renderer : public gfxXlibNativeRenderer + { + public: +diff --git a/dom/plugins/base/nsPluginNativeWindowGtk.cpp b/dom/plugins/base/nsPluginNativeWindowGtk.cpp +index bfb9510..33a6982 100644 +--- a/dom/plugins/base/nsPluginNativeWindowGtk.cpp ++++ b/dom/plugins/base/nsPluginNativeWindowGtk.cpp +@@ -14,15 +14,15 @@ + #include "nsNPAPIPlugin.h" + #include "npapi.h" + #include +-#include ++//#include + #include + + #if (GTK_MAJOR_VERSION == 3) +-#include ++//#include + #else + #include "gtk2xtbin.h" + #endif +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + static void plug_added_cb(GtkWidget *widget, gpointer data); + static gboolean plug_removed_cb (GtkWidget *widget, gpointer data); +@@ -41,10 +41,10 @@ nsPluginNativeWindowGtk::nsPluginNativeWindowGtk() : nsPluginNativeWindow() + type = NPWindowTypeWindow; + mSocketWidget = 0; + mWsInfo.type = 0; +- mWsInfo.display = nullptr; +- mWsInfo.visual = nullptr; +- mWsInfo.colormap = 0; +- mWsInfo.depth = 0; ++ //mWsInfo.display = nullptr; ++ //mWsInfo.visual = nullptr; ++ //mWsInfo.colormap = 0; ++ //mWsInfo.depth = 0; + } + + nsPluginNativeWindowGtk::~nsPluginNativeWindowGtk() +@@ -71,159 +71,11 @@ nsresult PLUG_DeletePluginNativeWindow(nsPluginNativeWindow * aPluginNativeWindo + + nsresult nsPluginNativeWindowGtk::CallSetWindow(RefPtr &aPluginInstance) + { +- if (aPluginInstance) { +- if (type == NPWindowTypeWindow && +- XRE_IsContentProcess()) { +- // In this case, most of the initialization code here has already happened +- // in the chrome process. The window we have in content is the XID of the +- // socket widget we need to hand to plugins. +- SetWindow((XID)window); +- } else if (type == NPWindowTypeWindow) { +- if (!mSocketWidget) { +- nsresult rv; +- +- // The documentation on the types for many variables in NP(N|P)_GetValue +- // is vague. Often boolean values are NPBool (1 byte), but +- // https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins +- // treats NPPVpluginNeedsXEmbed as PRBool (int), and +- // on x86/32-bit, flash stores to this using |movl 0x1,&needsXEmbed|. +- // thus we can't use NPBool for needsXEmbed, or the three bytes above +- // it on the stack would get clobbered. so protect with the larger bool. +- int needsXEmbed = 0; +- rv = aPluginInstance->GetValueFromPlugin(NPPVpluginNeedsXEmbed, &needsXEmbed); +- // If the call returned an error code make sure we still use our default value. +- if (NS_FAILED(rv)) { +- needsXEmbed = 0; +- } +-#ifdef DEBUG +- printf("nsPluginNativeWindowGtk: NPPVpluginNeedsXEmbed=%d\n", needsXEmbed); +-#endif +- +- bool isOOPPlugin = aPluginInstance->GetPlugin()->GetLibrary()->IsOOP(); +- if (needsXEmbed || isOOPPlugin) { +- bool enableXtFocus = !needsXEmbed; +- rv = CreateXEmbedWindow(enableXtFocus); +- } +- else { +-#if (MOZ_WIDGET_GTK == 2) +- rv = CreateXtWindow(); +-#else +- return NS_ERROR_FAILURE; +-#endif +- } +- +- if (NS_FAILED(rv)) { +- return NS_ERROR_FAILURE; +- } +- } +- +- if (!mSocketWidget) { +- return NS_ERROR_FAILURE; +- } +- +- // Make sure to resize and re-place the window if required. +- SetAllocation(); +- // Need to reset "window" each time as nsPluginFrame::DidReflow sets it +- // to the ancestor window. +-#if (MOZ_WIDGET_GTK == 2) +- if (GTK_IS_XTBIN(mSocketWidget)) { +- // Point the NPWindow structures window to the actual X window +- SetWindow(GTK_XTBIN(mSocketWidget)->xtwindow); +- } +- else { // XEmbed or OOP&Xt +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +- } +-#else +- // Gtk3 supports only OOP by GtkSocket +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +-#endif +- +-#ifdef DEBUG +- printf("nsPluginNativeWindowGtk: call SetWindow with xid=%p\n", (void *)window); +-#endif +- } // NPWindowTypeWindow +- aPluginInstance->SetWindow(this); +- } else if (mPluginInstance) { +- mPluginInstance->SetWindow(nullptr); +- } +- +- SetPluginInstance(aPluginInstance); +- return NS_OK; ++ return NS_ERROR_FAILURE; + } + + nsresult nsPluginNativeWindowGtk::CreateXEmbedWindow(bool aEnableXtFocus) { +- NS_ASSERTION(!mSocketWidget,"Already created a socket widget!"); +- GdkDisplay *display = gdk_display_get_default(); +- GdkWindow *parent_win = gdk_x11_window_lookup_for_display(display, GetWindow()); +- mSocketWidget = gtk_socket_new(); +- +- //attach the socket to the container widget +- gtk_widget_set_parent_window(mSocketWidget, parent_win); +- +- // enable/disable focus event handlers, +- // see plugin_window_filter_func() for details +- g_object_set_data(G_OBJECT(mSocketWidget), "enable-xt-focus", (void *)aEnableXtFocus); +- +- g_signal_connect(mSocketWidget, "plug_added", +- G_CALLBACK(plug_added_cb), nullptr); +- +- // Make sure to handle the plug_removed signal. If we don't the +- // socket will automatically be destroyed when the plug is +- // removed, which means we're destroying it more than once. +- // SYNTAX ERROR. +- g_signal_connect(mSocketWidget, "plug_removed", +- G_CALLBACK(plug_removed_cb), nullptr); +- +- g_signal_connect(mSocketWidget, "unrealize", +- G_CALLBACK(socket_unrealize_cb), nullptr); +- +- g_signal_connect(mSocketWidget, "destroy", +- G_CALLBACK(gtk_widget_destroyed), &mSocketWidget); +- +- gpointer user_data = nullptr; +- gdk_window_get_user_data(parent_win, &user_data); +- +- GtkContainer *container = GTK_CONTAINER(user_data); +- gtk_container_add(container, mSocketWidget); +- gtk_widget_realize(mSocketWidget); +- +- // The GtkSocket has a visible window, but the plugin's XEmbed plug will +- // cover this window. Normally GtkSockets let the X server paint their +- // background and this would happen immediately (before the plug is +- // created). Setting the background to None prevents the server from +- // painting this window, avoiding flicker. +- // TODO GTK3 +-#if (MOZ_WIDGET_GTK == 2) +- gdk_window_set_back_pixmap(gtk_widget_get_window(mSocketWidget), nullptr, FALSE); +-#endif +- +- // Resize before we show +- SetAllocation(); +- +- gtk_widget_show(mSocketWidget); +- +- gdk_flush(); +- SetWindow(gtk_socket_get_id(GTK_SOCKET(mSocketWidget))); +- +- // Fill out the ws_info structure. +- // (The windowless case is done in nsPluginFrame.cpp.) +- GdkWindow *gdkWindow = gdk_x11_window_lookup_for_display(display, GetWindow()); +- if(!gdkWindow) +- return NS_ERROR_FAILURE; +- +- mWsInfo.display = GDK_WINDOW_XDISPLAY(gdkWindow); +-#if (MOZ_WIDGET_GTK == 2) +- mWsInfo.colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(gdkWindow)); +- GdkVisual* gdkVisual = gdk_drawable_get_visual(gdkWindow); +- mWsInfo.depth = gdkVisual->depth; +-#else +- mWsInfo.colormap = X11None; +- GdkVisual* gdkVisual = gdk_window_get_visual(gdkWindow); +- mWsInfo.depth = gdk_visual_get_depth(gdkVisual); +-#endif +- mWsInfo.visual = GDK_VISUAL_XVISUAL(gdkVisual); +- +- return NS_OK; ++ return NS_ERROR_FAILURE; + } + + void nsPluginNativeWindowGtk::SetAllocation() { +@@ -304,8 +156,6 @@ plug_added_cb(GtkWidget *socket, gpointer data) + // receives the DestroyNotify event for the plug window, GDK releases its + // reference to plugWindow. This is typically the last reference and so the + // weak ref callback triggers release of the socket. +- GdkWindow* plugWindow = gtk_socket_get_plug_window(GTK_SOCKET(socket)); +- g_object_weak_ref(G_OBJECT(plugWindow), plug_window_finalize_cb, socket); + } + + /* static */ +@@ -319,38 +169,4 @@ plug_removed_cb (GtkWidget *widget, gpointer data) + static void + socket_unrealize_cb(GtkWidget *widget, gpointer data) + { +- // Unmap and reparent any child windows that GDK does not yet know about. +- // (See bug 540114 comment 10.) +- GdkWindow* socket_window = gtk_widget_get_window(widget); +- GdkDisplay* gdkDisplay = gdk_display_get_default(); +- Display* display = GDK_DISPLAY_XDISPLAY(gdkDisplay); +- +- // Ignore X errors that may happen if windows get destroyed (possibly +- // requested by the plugin) between XQueryTree and when we operate on them. +- gdk_error_trap_push(); +- +- Window root, parent; +- Window* children; +- unsigned int nchildren; +- if (!XQueryTree(display, gdk_x11_window_get_xid(socket_window), +- &root, &parent, &children, &nchildren)) +- return; +- +- for (unsigned int i = 0; i < nchildren; ++i) { +- Window child = children[i]; +- if (!gdk_x11_window_lookup_for_display(gdkDisplay, child)) { +- // This window is not known to GDK. +- XUnmapWindow(display, child); +- XReparentWindow(display, child, DefaultRootWindow(display), 0, 0); +- } +- } +- +- if (children) XFree(children); +- +- mozilla::FinishX(display); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif + } +diff --git a/dom/plugins/base/nsPluginNativeWindowGtk.h b/dom/plugins/base/nsPluginNativeWindowGtk.h +index 872d7f0..30cd67a 100644 +--- a/dom/plugins/base/nsPluginNativeWindowGtk.h ++++ b/dom/plugins/base/nsPluginNativeWindowGtk.h +@@ -8,14 +8,14 @@ + #include "nsPluginNativeWindow.h" + #include "npapi.h" + #include +-#include ++//#include + #include + #if (GTK_MAJOR_VERSION == 3) +-#include ++//#include + #else + #include "gtk2xtbin.h" + #endif +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + class nsPluginNativeWindowGtk : public nsPluginNativeWindow { + public: +@@ -26,16 +26,8 @@ public: + nsresult CreateXEmbedWindow(bool aEnableXtFocus); + void SetAllocation(); + +- XID GetWindow() const +- { +- return static_cast(reinterpret_cast(window)); +- } + + private: +- void SetWindow(XID aWindow) +- { +- window = reinterpret_cast(static_cast(aWindow)); +- } + + NPSetWindowCallbackStruct mWsInfo; + /** +diff --git a/dom/plugins/ipc/NPEventUnix.h b/dom/plugins/ipc/NPEventUnix.h +index 4cc9a54..fe0e295 100644 +--- a/dom/plugins/ipc/NPEventUnix.h ++++ b/dom/plugins/ipc/NPEventUnix.h +@@ -9,7 +9,7 @@ + + #include "npapi.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -61,7 +61,7 @@ struct ParamTraits // synonym for XEvent + return false; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + SetXDisplay(aResult->event); + #endif + return true; +@@ -73,7 +73,7 @@ struct ParamTraits // synonym for XEvent + aLog->append(L"(XEvent)"); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + private: + static void SetXDisplay(XEvent& ev) + { +diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp +index 1d7dc13..ffef92a 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.cpp ++++ b/dom/plugins/ipc/PluginInstanceChild.cpp +@@ -16,7 +16,7 @@ + #include "gfx2DGlue.h" + #include "nsNPAPIPluginInstance.h" + #include "mozilla/gfx/2D.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + #ifdef XP_WIN +@@ -50,7 +50,7 @@ using namespace std; + #ifdef MOZ_WIDGET_GTK + + #include +-#include ++//#include + #include + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" +@@ -198,7 +198,7 @@ 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 defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + mWindow.ws_info = &mWsInfo; + memset(&mWsInfo, 0, sizeof(mWsInfo)); + #if (MOZ_WIDGET_GTK == 2) +@@ -383,7 +383,7 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar, + + switch(aVar) { + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + case NPNVToolkit: + *((NPNToolkitType*)aValue) = NPNVGtk2; + return NPERR_NO_ERROR; +@@ -453,7 +453,7 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar, + *static_cast(aValue) = mPluginWindowHWND; + return NPERR_NO_ERROR; + } +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + NPError result; + CallNPN_GetValue_NPNVnetscapeWindow(static_cast(aValue), &result); + return result; +@@ -734,7 +734,7 @@ PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginNeedsXEmbed( + AssertPluginThread(); + AutoStackHelper guard(this); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // The documentation on the types for many variables in NP(N|P)_GetValue + // is vague. Often boolean values are NPBool (1 byte), but + // https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins +@@ -892,7 +892,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent(const NPRemoteEvent& event, + AssertPluginThread(); + AutoStackHelper guard(this); + +-#if defined(MOZ_X11) && defined(DEBUG) ++#if defined(MOZ_X11_no) && defined(DEBUG) + if (GraphicsExpose == event.event.type) + PLUGIN_LOG_DEBUG((" received drawable 0x%lx\n", + event.event.xgraphicsexpose.drawable)); +@@ -950,7 +950,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent(const NPRemoteEvent& event, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (GraphicsExpose == event.event.type) { + // Make sure the X server completes the drawing before the parent + // draws on top and destroys the Drawable. +@@ -1183,7 +1183,7 @@ PluginInstanceChild::RecvContentsScaleFactorChanged(const double& aContentsScale + #endif + } + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + // Create a new window from NPWindow + bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow) + { +@@ -1281,7 +1281,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + AssertPluginThread(); + AutoStackHelper guard(this); + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + NS_ASSERTION(mWsInfo.display, "We should have a valid display!"); + + // The minimum info is sent over IPC to allow this +@@ -1415,6 +1415,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + + #elif defined(ANDROID) + // TODO: Need Android impl ++#elif defined(MOZ_WIDGET_GTK) + #elif defined(MOZ_WIDGET_UIKIT) + // Don't care + #else +@@ -3256,7 +3257,7 @@ PluginInstanceChild::CreateOptSurface(void) + (mIsTransparent && !mBackground) ? SurfaceFormat::A8R8G8B8_UINT32 : + SurfaceFormat::X8R8G8B8_UINT32; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Display* dpy = mWsInfo.display; + Screen* screen = DefaultScreenOfDisplay(dpy); + if (format == SurfaceFormat::X8R8G8B8_UINT32 && +@@ -3316,7 +3317,7 @@ PluginInstanceChild::MaybeCreatePlatformHelperSurface(void) + return false; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + bool supportNonDefaultVisual = false; + Screen* screen = DefaultScreenOfDisplay(mWsInfo.display); + Visual* defaultVisual = DefaultVisualOfScreen(screen); +@@ -3475,11 +3476,11 @@ PluginInstanceChild::EnsureCurrentBuffer(void) + void + PluginInstanceChild::UpdateWindowAttributes(bool aForceSetWindow) + { +-#if defined(MOZ_X11) || defined(XP_WIN) ++#if defined(MOZ_X11_no) || defined(XP_WIN) + RefPtr curSurface = mHelperSurface ? mHelperSurface : mCurrentSurface; + #endif // Only used within MOZ_X11 or XP_WIN blocks. Unused variable otherwise + bool needWindowUpdate = aForceSetWindow; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Visual* visual = nullptr; + Colormap colormap = 0; + if (curSurface && curSurface->GetType() == gfxSurfaceType::Xlib) { +@@ -3575,7 +3576,7 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect, + // We should not send an async surface if we're using direct rendering. + MOZ_ASSERT(!IsUsingDirectDrawing()); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { + NS_ASSERTION(aSurface->GetType() == gfxSurfaceType::Xlib, + "Non supported platform surface type"); +@@ -3632,7 +3633,7 @@ PluginInstanceChild::PaintRectToSurface(const nsIntRect& aRect, + // Render using temporary X surface, with copy to image surface + nsIntRect plPaintRect(aRect); + RefPtr renderSurface = aSurface; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + 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 +@@ -3981,7 +3982,7 @@ 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 ++#ifdef MOZ_X11_no + if (mCurrentSurface->GetType() == gfxSurfaceType::Xlib) { + gfxXlibSurface *xsurf = static_cast(mCurrentSurface.get()); + currSurf = SurfaceDescriptorX11(xsurf); +@@ -4033,7 +4034,7 @@ 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 defined(MOZ_X11_no) + if (mBackSurface->GetType() != gfxSurfaceType::Xlib && + !gfxSharedImageSurface::IsSharedImage(mBackSurface)) + return false; +@@ -4042,7 +4043,7 @@ PluginInstanceChild::ReadbackDifferenceRect(const nsIntRect& rect) + return false; + #endif + +-#if defined(MOZ_X11) || defined(XP_WIN) ++#if defined(MOZ_X11_no) || defined(XP_WIN) + if (mCurrentSurface->GetContentType() != mBackSurface->GetContentType()) + return false; + +@@ -4167,7 +4168,7 @@ PluginInstanceChild::RecvUpdateBackground(const SurfaceDescriptor& aBackground, + if (!mBackground) { + // XXX refactor me + switch (aBackground.type()) { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case SurfaceDescriptor::TSurfaceDescriptorX11: { + mBackground = aBackground.get_SurfaceDescriptorX11().OpenForeign(); + break; +@@ -4515,7 +4516,7 @@ PluginInstanceChild::Destroy() + xt_client_xloop_destroy(); + } + #endif +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + DeleteWindow(); + #endif + } +diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp +index 14f00d3..e836906 100644 +--- a/dom/plugins/ipc/PluginInstanceParent.cpp ++++ b/dom/plugins/ipc/PluginInstanceParent.cpp +@@ -28,7 +28,7 @@ + #include "nsPluginInstanceOwner.h" + #include "nsFocusManager.h" + #include "nsIDOMElement.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + #include "gfxContext.h" +@@ -193,7 +193,7 @@ PluginInstanceParent::ActorDestroy(ActorDestroyReason why) + if (mImageContainer) { + mImageContainer->ClearAllImages(); + } +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + FinishX(DefaultXDisplay()); + #endif + } +@@ -266,7 +266,7 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle* + { + #ifdef XP_WIN + HWND id; +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + XID id; + #elif defined(XP_DARWIN) + intptr_t id; +@@ -274,7 +274,7 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle* + // TODO: Need Android impl + int id; + #else +-#warning Implement me ++ int id; + #endif + + *result = mNPNIface->getvalue(mNPP, NPNVnetscapeWindow, &id); +@@ -482,7 +482,7 @@ PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginDrawingModel( + case NPDrawingModelAsyncWindowsDXGISurface: + allowed = AllowDirectDXGISurfaceDrawing(); + break; +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + case NPDrawingModelSyncX: + allowed = true; + break; +@@ -920,7 +920,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, + return IPC_OK(); + } + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + else if (newSurface.type() == SurfaceDescriptor::TSurfaceDescriptorX11) { + surface = newSurface.get_SurfaceDescriptorX11().OpenForeign(); + } +@@ -937,7 +937,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, + // 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 ++#ifdef MOZ_X11_no + 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 +@@ -1180,7 +1180,7 @@ PluginInstanceParent::EndUpdateBackground(const nsIntRect& aRect) + ("[InstanceParent][%p] EndUpdateBackground for ", + this, aRect.x, aRect.y, aRect.width, aRect.height)); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // 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 +@@ -1237,7 +1237,7 @@ PluginInstanceParent::CreateBackground(const nsIntSize& aSize) + + // XXX refactor me + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + Screen* screen = DefaultScreenOfDisplay(DefaultXDisplay()); + Visual* visual = DefaultVisualOfScreen(screen); + mBackground = gfxXlibSurface::Create(screen, visual, +@@ -1282,7 +1282,7 @@ PluginInstanceParent::BackgroundDescriptor() + + // XXX refactor me + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibSurface* xsurf = static_cast(mBackground.get()); + return SurfaceDescriptorX11(xsurf); + #endif +@@ -1403,7 +1403,7 @@ PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow) + } + #endif + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + const NPSetWindowCallbackStruct* ws_info = + static_cast(aWindow->ws_info); + window.visualID = ws_info->visual ? ws_info->visual->visualid : 0; +@@ -1440,7 +1440,7 @@ PluginInstanceParent::NPP_GetValue(NPPVariable aVariable, + return NPERR_NO_ERROR; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case NPPVpluginNeedsXEmbed: { + bool needsXEmbed; + NPError rv; +@@ -1620,7 +1620,7 @@ PluginInstanceParent::NPP_HandleEvent(void* event) + } + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + switch (npevent->type) { + case GraphicsExpose: + PLUGIN_LOG_DEBUG((" schlepping drawable 0x%lx across the pipe\n", +diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp +index 47653fe..60b3f20 100644 +--- a/dom/plugins/ipc/PluginMessageUtils.cpp ++++ b/dom/plugins/ipc/PluginMessageUtils.cpp +@@ -50,7 +50,7 @@ namespace plugins { + + NPRemoteWindow::NPRemoteWindow() : + window(0), x(0), y(0), width(0), height(0), type(NPWindowTypeDrawable) +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + , visualID(0) + , colormap(0) + #endif /* XP_UNIX */ +diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h +index fd43473..bd32ed8 100644 +--- a/dom/plugins/ipc/PluginMessageUtils.h ++++ b/dom/plugins/ipc/PluginMessageUtils.h +@@ -90,7 +90,7 @@ struct NPRemoteWindow + uint32_t height; + NPRect clipRect; + NPWindowType type; +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + VisualID visualID; + Colormap colormap; + #endif /* XP_UNIX */ +@@ -112,10 +112,12 @@ struct NPAudioDeviceChangeDetailsIPC + + #ifdef XP_WIN + typedef HWND NativeWindowHandle; +-#elif defined(MOZ_X11) ++#elif defined(MOZ_X11_no) + typedef XID NativeWindowHandle; + #elif defined(XP_DARWIN) || defined(ANDROID) + typedef intptr_t NativeWindowHandle; // never actually used, will always be 0 ++#elif defined(XP_UNIX) ++typedef intptr_t NativeWindowHandle; + #else + #error Need NativeWindowHandle for this platform + #endif +@@ -360,7 +362,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 defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + aMsg->WriteULong(aParam.visualID); + aMsg->WriteULong(aParam.colormap); + #endif +@@ -385,7 +387,7 @@ struct ParamTraits + ReadParam(aMsg, aIter, &type))) + return false; + +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + unsigned long visualID; + unsigned long colormap; + if (!(aMsg->ReadULong(aIter, &visualID) && +@@ -406,7 +408,7 @@ struct ParamTraits + aResult->height = height; + aResult->clipRect = clipRect; + aResult->type = type; +-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) ++#if defined(MOZ_X11_no) && defined(XP_UNIX) && !defined(XP_MACOSX) + aResult->visualID = visualID; + aResult->colormap = colormap; + #endif +diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp +index 3c76a6b..dc1015b 100644 +--- a/dom/plugins/ipc/PluginModuleChild.cpp ++++ b/dom/plugins/ipc/PluginModuleChild.cpp +@@ -11,7 +11,7 @@ + + #include "mozilla/ipc/MessageChannel.h" + +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + #include + #endif + +@@ -23,7 +23,7 @@ + #include "nsPluginsDir.h" + #include "nsXULAppAPI.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + # include "nsX11ErrorHandler.h" + # include "mozilla/X11Util.h" + #endif +@@ -122,7 +122,7 @@ PluginModuleChild::PluginModuleChild(bool aIsChrome) + , mInitializeFunc(0) + #if defined(OS_WIN) || defined(OS_MACOSX) + , mGetEntryPointsFunc(0) +-#elif defined(MOZ_WIDGET_GTK) ++#elif defined(MOZ_WIDGET_GTK_no) + , mNestedLoopTimerId(0) + #endif + #ifdef OS_WIN +@@ -258,7 +258,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + // XXX quirks isn't initialized yet + mAsyncRenderSupport = info.fSupportsAsyncRender; + #endif +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + NS_NAMED_LITERAL_CSTRING(flash10Head, "Shockwave Flash 10."); + if (StringBeginsWith(nsDependentCString(info.fDescription), flash10Head)) { + AddQuirk(QUIRK_FLASH_EXPOSE_COORD_TRANSLATION); +@@ -271,7 +271,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + mozilla::plugins::PluginUtilsOSX::SetProcessName(nameBuffer); + #endif + pluginFile.FreePluginInfo(info); +-#if defined(MOZ_X11) || defined(XP_MACOSX) ++#if defined(MOZ_X11_no) || defined(XP_MACOSX) + if (!mLibrary) + #endif + { +@@ -319,7 +319,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + return true; + } + +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + + typedef void (*GObjectDisposeFn)(GObject*); + typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*); +@@ -545,6 +545,17 @@ PluginModuleChild::ExitedCxxStack() + mNestedLoopTimerId = 0; + } + ++#else ++void ++PluginModuleChild::EnteredCxxStack() ++{ ++} ++ ++void ++PluginModuleChild::ExitedCxxStack() ++{ ++} ++ + #endif + + mozilla::ipc::IPCResult +@@ -568,7 +579,7 @@ PluginModuleChild::ShouldContinueFromReplyTimeout() + bool + PluginModuleChild::InitGraphics() + { +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + // Work around plugins that don't interact well with GDK + // client-side windows. + PR_SetEnv("GDK_NATIVE_WINDOWS=1"); +@@ -607,7 +618,7 @@ PluginModuleChild::InitGraphics() + #else + // may not be necessary on all platforms + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + InstallX11ErrorHandler(); + #endif +@@ -617,7 +628,7 @@ PluginModuleChild::InitGraphics() + void + PluginModuleChild::DeinitGraphics() + { +-#if defined(MOZ_X11) && defined(NS_FREE_PERMANENT_DATA) ++#if defined(MOZ_X11_no) && defined(NS_FREE_PERMANENT_DATA) + // 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. +@@ -1103,7 +1114,7 @@ _getvalue(NPP aNPP, + switch (aVariable) { + // Copied from nsNPAPIPlugin.cpp + case NPNVToolkit: +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + *static_cast(aValue) = NPNVGtk2; + return NPERR_NO_ERROR; + #endif +@@ -1124,7 +1135,7 @@ _getvalue(NPP aNPP, + case NPNVSupportsWindowless: + *(NPBool*)aValue = PluginModuleChild::GetChrome()->Settings().supportsWindowless(); + return NPERR_NO_ERROR; +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + case NPNVxDisplay: { + if (aNPP) { + return InstCast(aNPP)->NPN_GetValue(aVariable, aValue); +@@ -1891,7 +1902,7 @@ PluginModuleChild::DoNP_Initialize(const PluginSettings& aSettings) + SetEventHooks(); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Send the parent our X socket to act as a proxy reference for our X + // resources. + int xSocketFd = ConnectionNumber(DefaultXDisplay()); +diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h +index 8611003..563b04b 100644 +--- a/dom/plugins/ipc/PluginModuleChild.h ++++ b/dom/plugins/ipc/PluginModuleChild.h +@@ -11,6 +11,7 @@ + + #include + #include ++#include + + #include "base/basictypes.h" + +diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build +index b569aeb..f4dab4a 100644 +--- a/dom/plugins/ipc/moz.build ++++ b/dom/plugins/ipc/moz.build +@@ -137,7 +137,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gtk3': + CXXFLAGS += CONFIG['TK_CFLAGS'] + else: + # Force build against gtk+2 for struct offsets and such. +- CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] ++ CXXFLAGS += CONFIG['TK_CFLAGS'] ++ #CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] + + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + +diff --git a/gfx/2d/BorrowedContext.h b/gfx/2d/BorrowedContext.h +index edb923b..148067a 100644 +--- a/gfx/2d/BorrowedContext.h ++++ b/gfx/2d/BorrowedContext.h +@@ -8,7 +8,7 @@ + + #include "2D.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include "X11UndefineNone.h" +@@ -75,7 +75,7 @@ private: + DrawTarget *mDT; + }; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + /* This is a helper class that let's you borrow an Xlib drawable from + * a DrawTarget. This is used for drawing themed widgets. + * +diff --git a/gfx/2d/DrawTargetCairo.cpp b/gfx/2d/DrawTargetCairo.cpp +index ad22a9a..4caaca2 100644 +--- a/gfx/2d/DrawTargetCairo.cpp ++++ b/gfx/2d/DrawTargetCairo.cpp +@@ -2316,7 +2316,7 @@ BorrowedCairoContext::ReturnCairoContextToDrawTarget(DrawTarget* aDT, + cairoDT->mContext = aCairo; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + bool + BorrowedXlibDrawable::Init(DrawTarget* aDT) + { +diff --git a/gfx/angle/include/EGL/eglplatform.h b/gfx/angle/include/EGL/eglplatform.h +index 6d550da..2099e0d 100755 +--- a/gfx/angle/include/EGL/eglplatform.h ++++ b/gfx/angle/include/EGL/eglplatform.h +@@ -105,6 +105,13 @@ typedef intptr_t EGLNativeDisplayType; + typedef intptr_t EGLNativeWindowType; + typedef intptr_t EGLNativePixmapType; + ++//#elif defined(MESA_EGL_NO_X11_HEADERS) ++#elif defined(__unix__) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ + #elif defined(__unix__) + + /* X11 (tentative) */ +diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h +index 6e096c1..b6ea9b7 100644 +--- a/gfx/gl/GLContextProvider.h ++++ b/gfx/gl/GLContextProvider.h +@@ -41,18 +41,20 @@ namespace gl { + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderCGL + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #define GL_CONTEXT_PROVIDER_NAME GLContextProviderGLX + #include "GLContextProviderImpl.h" + #undef GL_CONTEXT_PROVIDER_NAME + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderGLX + #endif + +-#define GL_CONTEXT_PROVIDER_NAME GLContextProviderEGL +-#include "GLContextProviderImpl.h" +-#undef GL_CONTEXT_PROVIDER_NAME +-#ifndef GL_CONTEXT_PROVIDER_DEFAULT +- #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL ++#ifndef MOZ_GL_PROVIDER ++ #define GL_CONTEXT_PROVIDER_NAME GLContextProviderEGL ++ #include "GLContextProviderImpl.h" ++ #undef GL_CONTEXT_PROVIDER_NAME ++ #ifndef GL_CONTEXT_PROVIDER_DEFAULT ++ #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL ++ #endif + #endif + + #if defined(MOZ_WIDGET_UIKIT) +diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp +index edd5678..57862b7 100644 +--- a/gfx/gl/GLContextProviderEGL.cpp ++++ b/gfx/gl/GLContextProviderEGL.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/. */ + +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK_no) + #include + // we're using default display for now + #define GET_NATIVE_WINDOW(aWidget) ((EGLNativeWindowType)GDK_WINDOW_XID((GdkWindow*)aWidget->GetNativeData(NS_NATIVE_WINDOW))) +diff --git a/gfx/gl/GLLibraryEGL.h b/gfx/gl/GLLibraryEGL.h +index fa6ea74..1cbabff 100644 +--- a/gfx/gl/GLLibraryEGL.h ++++ b/gfx/gl/GLLibraryEGL.h +@@ -5,7 +5,7 @@ + #ifndef GLLIBRARYEGL_H_ + #define GLLIBRARYEGL_H_ + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include "mozilla/X11Util.h" + #endif + +@@ -46,7 +46,7 @@ + #endif + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)mozilla::DefaultXDisplay()) + #else + #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build +index 6f43a49..a882cee 100644 +--- a/gfx/gl/moz.build ++++ b/gfx/gl/moz.build +@@ -13,10 +13,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit': + gl_provider = 'EAGL' + elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: +- if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']: +- gl_provider = 'EGL' +- else: +- gl_provider = 'GLX' ++ gl_provider = 'EGL' + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': + gl_provider = 'EGL' + +diff --git a/gfx/ipc/GPUProcessManager.cpp b/gfx/ipc/GPUProcessManager.cpp +index 4ef83ba..d5341fc 100644 +--- a/gfx/ipc/GPUProcessManager.cpp ++++ b/gfx/ipc/GPUProcessManager.cpp +@@ -19,7 +19,7 @@ + #include "mozilla/layers/LayerTreeOwnerTracker.h" + #include "mozilla/layers/RemoteCompositorSession.h" + #include "mozilla/widget/PlatformWidgetTypes.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetChild.h" + #endif + #include "nsBaseWidget.h" +@@ -578,7 +578,7 @@ GPUProcessManager::CreateRemoteSession(nsBaseWidget* aWidget, + bool aUseExternalSurfaceSize, + const gfx::IntSize& aSurfaceSize) + { +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + ipc::Endpoint parentPipe; + ipc::Endpoint childPipe; + +diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp +index 1e61c5a..80ccf8e 100644 +--- a/gfx/layers/client/TextureClient.cpp ++++ b/gfx/layers/client/TextureClient.cpp +@@ -41,7 +41,7 @@ + #include "gfxWindowsPlatform.h" + #include "gfx2DGlue.h" + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/layers/TextureClientX11.h" + #ifdef GL_PROVIDER_GLX + #include "GLXLibrary.h" +@@ -1059,7 +1059,7 @@ TextureClient::CreateForDrawing(TextureForwarder* aAllocator, + } + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxSurfaceType type = + gfxPlatform::GetPlatform()->ScreenReferenceSurface()->GetType(); + +diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp +index 5f1e1cf..c7d0763 100644 +--- a/gfx/layers/composite/TextureHost.cpp ++++ b/gfx/layers/composite/TextureHost.cpp +@@ -35,7 +35,7 @@ + #include "../d3d11/CompositorD3D11.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/layers/X11TextureHost.h" + #endif + +@@ -208,7 +208,7 @@ TextureHost::Create(const SurfaceDescriptor& aDesc, + return CreateTextureHostBasic(aDesc, aDeallocator, aFlags); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + case SurfaceDescriptor::TSurfaceDescriptorX11: { + const SurfaceDescriptorX11& desc = aDesc.get_SurfaceDescriptorX11(); + return MakeAndAddRef(aFlags, desc); +diff --git a/gfx/layers/ipc/CompositorBridgeChild.cpp b/gfx/layers/ipc/CompositorBridgeChild.cpp +index 78d26c0..df3e4d1 100644 +--- a/gfx/layers/ipc/CompositorBridgeChild.cpp ++++ b/gfx/layers/ipc/CompositorBridgeChild.cpp +@@ -40,7 +40,7 @@ + #include "WinUtils.h" + #endif + #include "mozilla/widget/CompositorWidget.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetChild.h" + #endif + #include "VsyncSource.h" +@@ -1086,7 +1086,7 @@ CompositorBridgeChild::AllocPCompositorWidgetChild(const CompositorWidgetInitDat + bool + CompositorBridgeChild::DeallocPCompositorWidgetChild(PCompositorWidgetChild* aActor) + { +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + delete aActor; + return true; + #else +diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp +index ea8e3ec..468646e 100644 +--- a/gfx/layers/ipc/CompositorBridgeParent.cpp ++++ b/gfx/layers/ipc/CompositorBridgeParent.cpp +@@ -54,7 +54,7 @@ + #include "mozilla/media/MediaSystemResourceService.h" // for MediaSystemResourceService + #include "mozilla/mozalloc.h" // for operator new, etc + #include "mozilla/Telemetry.h" +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + #include "basic/X11BasicCompositor.h" // for X11BasicCompositor + #endif + #include "nsCOMPtr.h" // for already_AddRefed +@@ -83,7 +83,7 @@ + #include "VsyncSource.h" + #endif + #include "mozilla/widget/CompositorWidget.h" +-#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING ++#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no + # include "mozilla/widget/CompositorWidgetParent.h" + #endif + +@@ -1354,7 +1354,7 @@ CompositorBridgeParent::NewCompositor(const nsTArray& aBackendHin + mEGLSurfaceSize.height, + mUseExternalSurfaceSize); + } else if (aBackendHints[i] == LayersBackend::LAYERS_BASIC) { +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + if (gfxVars::UseXRender()) { + compositor = new X11BasicCompositor(this, mWidget); + } else +@@ -1655,7 +1655,7 @@ CompositorBridgeParent::PostInsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp) + widget::PCompositorWidgetParent* + CompositorBridgeParent::AllocPCompositorWidgetParent(const CompositorWidgetInitData& aInitData) + { +-#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + if (mWidget) { + // Should not create two widgets on the same compositor. + return nullptr; +@@ -1676,7 +1676,7 @@ CompositorBridgeParent::AllocPCompositorWidgetParent(const CompositorWidgetInitD + bool + CompositorBridgeParent::DeallocPCompositorWidgetParent(PCompositorWidgetParent* aActor) + { +-#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + static_cast(aActor)->Release(); + return true; + #else +diff --git a/gfx/layers/ipc/ShadowLayerUtils.h b/gfx/layers/ipc/ShadowLayerUtils.h +index 257cee8..c1393b2 100644 +--- a/gfx/layers/ipc/ShadowLayerUtils.h ++++ b/gfx/layers/ipc/ShadowLayerUtils.h +@@ -17,7 +17,7 @@ + #define MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + # include "mozilla/layers/ShadowLayerUtilsX11.h" + #else + namespace mozilla { namespace layers { +diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build +index 79b2932..b34e919 100644 +--- a/gfx/layers/moz.build ++++ b/gfx/layers/moz.build +@@ -201,7 +201,7 @@ EXPORTS.mozilla.layers += [ + 'TransactionIdAllocator.h', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + EXPORTS.mozilla.layers += [ + 'basic/TextureClientX11.h', + 'basic/X11TextureSourceBasic.h', +diff --git a/gfx/src/moz.build b/gfx/src/moz.build +index 3678eee..dc48470 100644 +--- a/gfx/src/moz.build ++++ b/gfx/src/moz.build +@@ -51,7 +51,7 @@ EXPORTS.mozilla.gfx += [ + 'TiledRegion.h', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + EXPORTS.mozilla += ['X11Util.h'] + SOURCES += [ + 'X11Util.cpp', +diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp +index 33a6353..6ff968a 100644 +--- a/gfx/thebes/gfxASurface.cpp ++++ b/gfx/thebes/gfxASurface.cpp +@@ -29,7 +29,7 @@ + #include "gfxWindowsSurface.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + +@@ -160,7 +160,7 @@ gfxASurface::Wrap (cairo_surface_t *csurf, const IntSize& aSize) + result = new gfxWindowsSurface(csurf); + } + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + else if (stype == CAIRO_SURFACE_TYPE_XLIB) { + result = new gfxXlibSurface(csurf); + } +diff --git a/gfx/thebes/gfxDrawable.cpp b/gfx/thebes/gfxDrawable.cpp +index cf6c2d8..61cbe44 100644 +--- a/gfx/thebes/gfxDrawable.cpp ++++ b/gfx/thebes/gfxDrawable.cpp +@@ -8,8 +8,8 @@ + #include "gfxContext.h" + #include "gfxPlatform.h" + #include "gfx2DGlue.h" +-#ifdef MOZ_X11 + #include "cairo.h" ++#ifdef MOZ_X11_no + #include "gfxXlibSurface.h" + #endif + #include "mozilla/gfx/Logging.h" +diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp +index 1947115..bda52a6 100644 +--- a/gfx/thebes/gfxFcPlatformFontList.cpp ++++ b/gfx/thebes/gfxFcPlatformFontList.cpp +@@ -33,7 +33,7 @@ + #include "gfxPlatformGtk.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + #endif + +@@ -719,7 +719,7 @@ gfxFontconfigFontEntry::CreateScaledFont(FcPattern* aRenderPattern, + static void ApplyGdkScreenFontOptions(FcPattern *aPattern); + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static bool + GetXftInt(Display* aDisplay, const char* aName, int* aResult) + { +@@ -770,7 +770,7 @@ PreparePattern(FcPattern* aPattern, bool aIsPrinterFont) + #ifdef MOZ_WIDGET_GTK + ApplyGdkScreenFontOptions(aPattern); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + FcValue value; + int lcdfilter; + if (FcPatternGet(aPattern, FC_LCD_FILTER, 0, &value) == FcResultNoMatch) { +diff --git a/gfx/thebes/gfxGdkNativeRenderer.cpp b/gfx/thebes/gfxGdkNativeRenderer.cpp +index f8964ad..4b27491 100644 +--- a/gfx/thebes/gfxGdkNativeRenderer.cpp ++++ b/gfx/thebes/gfxGdkNativeRenderer.cpp +@@ -7,7 +7,7 @@ + #include "gfxContext.h" + #include "gfxPlatformGtk.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include "cairo-xlib.h" + #include "gfxXlibSurface.h" +diff --git a/gfx/thebes/gfxGdkNativeRenderer.h b/gfx/thebes/gfxGdkNativeRenderer.h +index d95b1fe..4c465d6 100644 +--- a/gfx/thebes/gfxGdkNativeRenderer.h ++++ b/gfx/thebes/gfxGdkNativeRenderer.h +@@ -8,7 +8,7 @@ + + #include + #include "nsSize.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "gfxXlibNativeRenderer.h" + #endif + +@@ -21,7 +21,7 @@ class gfxContext; + * to all Thebes transformations, clipping etc. + */ + class gfxGdkNativeRenderer +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + : private gfxXlibNativeRenderer + #endif + { +@@ -46,7 +46,7 @@ public: + // will be set and there is no dependence on what the existing pixels + // in the drawable are set to. + DRAW_IS_OPAQUE = +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibNativeRenderer::DRAW_IS_OPAQUE + #else + 0x1 +@@ -54,7 +54,7 @@ public: + // If set, then numClipRects can be zero or one. + // If not set, then numClipRects will be zero. + , DRAW_SUPPORTS_CLIP_RECT = +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gfxXlibNativeRenderer::DRAW_SUPPORTS_CLIP_RECT + #else + 0x2 +@@ -73,7 +73,7 @@ public: + #endif + + private: +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // for gfxXlibNativeRenderer: + virtual nsresult DrawWithXlib(cairo_surface_t* surface, + nsIntPoint offset, +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index 8be91c9..815b5f2 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -36,11 +36,11 @@ + + #include "gfxImageSurface.h" + #ifdef MOZ_X11 +-#include +-#include "gfxXlibSurface.h" +-#include "cairo-xlib.h" ++//#include ++//#include "gfxXlibSurface.h" ++//#include "cairo-xlib.h" + #include "mozilla/Preferences.h" +-#include "mozilla/X11Util.h" ++//#include "mozilla/X11Util.h" + + #ifdef GL_PROVIDER_GLX + #include "GLContextProvider.h" +@@ -86,7 +86,7 @@ gfxPlatformGtk::gfxPlatformGtk() + + mMaxGenericSubstitutions = UNINITIALIZED_VALUE; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (XRE_IsParentProcess()) { + if (GDK_IS_X11_DISPLAY(gdk_display_get_default()) && + mozilla::Preferences::GetBool("gfx.xrender.enabled")) +@@ -106,12 +106,7 @@ gfxPlatformGtk::gfxPlatformGtk() + contentMask, BackendType::CAIRO); + + #ifdef MOZ_X11 +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { +- mCompositorDisplay = XOpenDisplay(nullptr); +- MOZ_ASSERT(mCompositorDisplay, "Failed to create compositor display!"); +- } else { + mCompositorDisplay = nullptr; +- } + #endif // MOZ_X11 + } + +@@ -123,7 +118,7 @@ gfxPlatformGtk::~gfxPlatformGtk() + gfxPangoFontGroup::Shutdown(); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (mCompositorDisplay) { + XCloseDisplay(mCompositorDisplay); + } +@@ -133,9 +128,9 @@ gfxPlatformGtk::~gfxPlatformGtk() + void + gfxPlatformGtk::FlushContentDrawing() + { +- if (gfxVars::UseXRender()) { +- XFlush(DefaultXDisplay()); +- } ++// if (gfxVars::UseXRender()) { ++// XFlush(DefaultXDisplay()); ++// } + } + + already_AddRefed +@@ -156,24 +151,12 @@ gfxPlatformGtk::CreateOffscreenSurface(const IntSize& aSize, + if (gdkScreen) { + // When forcing PaintedLayers to use image surfaces for content, + // force creation of gfxImageSurface surfaces. +- if (gfxVars::UseXRender() && !UseImageOffscreenSurfaces()) { +- Screen *screen = gdk_x11_screen_get_xscreen(gdkScreen); +- XRenderPictFormat* xrenderFormat = +- gfxXlibSurface::FindRenderFormat(DisplayOfScreen(screen), +- aFormat); +- +- if (xrenderFormat) { +- newSurface = gfxXlibSurface::Create(screen, xrenderFormat, +- aSize); +- } +- } else { + // We're not going to use XRender, so we don't need to + // search for a render format + newSurface = new gfxImageSurface(aSize, aFormat); + // The gfxImageSurface ctor zeroes this for us, no need to + // waste time clearing again + needsClear = false; +- } + } + #endif + +@@ -472,7 +455,7 @@ gfxPlatformGtk::GetPlatformCMSOutputProfile(void *&mem, size_t &size) + mem = nullptr; + size = 0; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + GdkDisplay *display = gdk_display_get_default(); + if (!GDK_IS_X11_DISPLAY(display)) + return; +@@ -625,7 +608,7 @@ gfxPlatformGtk::GetGdkDrawable(cairo_surface_t *target) + if (result) + return result; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (cairo_surface_get_type(target) != CAIRO_SURFACE_TYPE_XLIB) + return nullptr; + +@@ -905,5 +888,5 @@ gfxPlatformGtk::CreateHardwareVsyncSource() + } + return gfxPlatform::CreateHardwareVsyncSource(); + } +- + #endif ++ +diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build +index ad6ea00..45b88ef 100644 +--- a/gfx/thebes/moz.build ++++ b/gfx/thebes/moz.build +@@ -115,7 +115,7 @@ elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + 'PrintTargetPS.cpp', + ] + +- if CONFIG['MOZ_X11']: ++ if CONFIG['MOZ_X11_no']: + EXPORTS += [ + 'gfxXlibNativeRenderer.h', + 'gfxXlibSurface.h', +diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp +index ac987b6..0a2bf77 100644 +--- a/layout/generic/nsPluginFrame.cpp ++++ b/layout/generic/nsPluginFrame.cpp +@@ -74,7 +74,7 @@ + #include "mozilla/gfx/QuartzSupport.h" + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "mozilla/X11Util.h" + using mozilla::DefaultXDisplay; + #endif +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc +index b7f123b..eacd634 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.cc +@@ -30,7 +30,7 @@ DesktopCaptureOptions::~DesktopCaptureOptions() {} + // static + DesktopCaptureOptions DesktopCaptureOptions::CreateDefault() { + DesktopCaptureOptions result; +-#if defined(USE_X11) ++#if defined(USE_X11_no) + result.set_x_display(SharedXDisplay::CreateDefault()); + #endif + #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h +index 68bb588..b9286cb 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h +@@ -13,7 +13,7 @@ + #include "webrtc/base/constructormagic.h" + #include "webrtc/base/scoped_ref_ptr.h" + +-#if defined(USE_X11) ++#if defined(USE_X11_no) + #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" + #endif + +@@ -37,7 +37,7 @@ class DesktopCaptureOptions { + // X11 connection failed (e.g. DISPLAY isn't set). + static DesktopCaptureOptions CreateDefault(); + +-#if defined(USE_X11) ++#if defined(USE_X11_no) + SharedXDisplay* x_display() const { return x_display_; } + void set_x_display(rtc::scoped_refptr x_display) { + x_display_ = x_display; +@@ -86,7 +86,7 @@ class DesktopCaptureOptions { + #endif + + private: +-#if defined(USE_X11) ++#if defined(USE_X11_no) + rtc::scoped_refptr x_display_; + #endif + +diff --git a/old-configure b/old-configure +index feafdb3..2bf04b4 100644 +--- a/old-configure ++++ b/old-configure +@@ -1896,64 +1896,13 @@ else + fi + fi + +-for ac_declaration in \ +- ''\ +- '#include ' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat > conftest.$ac_ext < +-$ac_declaration +-int main() { +-exit (42); +-; return 0; } +-EOF +-if { (eval echo configure:1918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- : +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- continue +-fi +-rm -f conftest* +- cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* +- break +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +-fi +-rm -f conftest* +-done +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- +- + + for ac_prog in "${TOOLCHAIN_PREFIX}ranlib" + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1957: checking for $ac_word" >&5 ++echo "configure:1906: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1988,7 +1937,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1992: checking for $ac_word" >&5 ++echo "configure:1941: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2023,7 +1972,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2027: checking for $ac_word" >&5 ++echo "configure:1976: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2058,7 +2007,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2062: checking for $ac_word" >&5 ++echo "configure:2011: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2093,7 +2042,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2097: checking for $ac_word" >&5 ++echo "configure:2046: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2128,7 +2077,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2132: checking for $ac_word" >&5 ++echo "configure:2081: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2163,7 +2112,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2167: checking for $ac_word" >&5 ++echo "configure:2116: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2198,7 +2147,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2202: checking for $ac_word" >&5 ++echo "configure:2151: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2234,7 +2183,7 @@ else + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2238: checking for $ac_word" >&5 ++echo "configure:2187: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2264,7 +2213,7 @@ if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2268: checking for $ac_word" >&5 ++echo "configure:2217: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2315,7 +2264,7 @@ fi + # Extract the first word of "cl", so it can be a program name with args. + set dummy cl; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2319: checking for $ac_word" >&5 ++echo "configure:2268: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2347,7 +2296,7 @@ fi + fi + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:2351: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:2300: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +@@ -2358,12 +2307,12 @@ cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext << EOF + +-#line 2362 "configure" ++#line 2311 "configure" + #include "confdefs.h" + + main(){return(0);} + EOF +-if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +@@ -2389,12 +2338,12 @@ if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:2393: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:2342: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +-echo "configure:2398: checking whether we are using GNU C" >&5 ++echo "configure:2347: checking whether we are using GNU C" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2403,7 +2352,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes + else + ac_cv_prog_gcc=no +@@ -2422,7 +2371,7 @@ ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +-echo "configure:2426: checking whether ${CC-cc} accepts -g" >&5 ++echo "configure:2375: checking whether ${CC-cc} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2463,7 +2412,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2467: checking for $ac_word" >&5 ++echo "configure:2416: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2495,7 +2444,7 @@ test -n "$CXX" || CXX="gcc" + + + echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:2499: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ++echo "configure:2448: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + + ac_ext=C + # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +@@ -2506,12 +2455,12 @@ cross_compiling=$ac_cv_prog_cxx_cross + + cat > conftest.$ac_ext << EOF + +-#line 2510 "configure" ++#line 2459 "configure" + #include "confdefs.h" + + int main(){return(0);} + EOF +-if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +@@ -2537,12 +2486,12 @@ if test $ac_cv_prog_cxx_works = no; then + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } + fi + echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:2541: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:2490: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 + cross_compiling=$ac_cv_prog_cxx_cross + + echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +-echo "configure:2546: checking whether we are using GNU C++" >&5 ++echo "configure:2495: checking whether we are using GNU C++" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2551,7 +2500,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx=yes + else + ac_cv_prog_gxx=no +@@ -2570,7 +2519,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS= + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +-echo "configure:2574: checking whether ${CXX-g++} accepts -g" >&5 ++echo "configure:2523: checking whether ${CXX-g++} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2601,61 +2550,10 @@ else + fi + fi + +-for ac_declaration in \ +- ''\ +- '#include ' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat > conftest.$ac_ext < +-$ac_declaration +-int main() { +-exit (42); +-; return 0; } +-EOF +-if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- : +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- continue +-fi +-rm -f conftest* +- cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* +- break +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +-fi +-rm -f conftest* +-done +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- +- + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2659: checking for $ac_word" >&5 ++echo "configure:2557: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2687,7 +2585,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2691: checking for $ac_word" >&5 ++echo "configure:2589: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2741,7 +2639,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2745: checking for $ac_word" >&5 ++echo "configure:2643: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2776,7 +2674,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2780: checking for $ac_word" >&5 ++echo "configure:2678: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2811,7 +2709,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2815: checking for $ac_word" >&5 ++echo "configure:2713: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2846,7 +2744,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2850: checking for $ac_word" >&5 ++echo "configure:2748: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2948,7 +2846,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2952: checking for $ac_word" >&5 ++echo "configure:2850: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_MIDL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2990,14 +2888,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a + cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext < + int main() { + printf("Hello World\n"); + ; return 0; } + EOF +-if { (eval echo configure:3001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 +@@ -3015,14 +2913,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes + cross_compiling=$ac_cv_prog_cxx_cross + + cat > conftest.$ac_ext < + int main() { + unsigned *test = new unsigned(42); + ; return 0; } + EOF +-if { (eval echo configure:3026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 +@@ -3076,12 +2974,12 @@ EOF + + ac_safe=`echo "dia2.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for dia2.h""... $ac_c" 1>&6 +-echo "configure:3080: checking for dia2.h" >&5 ++echo "configure:2978: checking for dia2.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -3089,7 +2987,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:3093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -3189,7 +3087,7 @@ EOF + unset _MSVC_VER_FILTER + + echo $ac_n "checking for overridable _RAISE""... $ac_c" 1>&6 +-echo "configure:3193: checking for overridable _RAISE" >&5 ++echo "configure:3091: checking for overridable _RAISE" >&5 + if eval "test \"`echo '$''{'ac_cv_have__RAISE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3205,7 +3103,7 @@ cross_compiling=$ac_cv_prog_cxx_cross + _SAVE_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0" + cat > conftest.$ac_ext < + #undef _RAISE +@@ -3216,7 +3114,7 @@ int main() { + std::vector v; return v.at(1); + ; return 0; } + EOF +-if { (eval echo configure:3220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have__RAISE="no" + else +@@ -3262,9 +3160,9 @@ EOF + _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` + _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` + echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6 +-echo "configure:3266: checking for w32api version >= $W32API_VERSION" >&5 ++echo "configure:3164: checking for w32api version >= $W32API_VERSION" >&5 + cat > conftest.$ac_ext < + int main() { +@@ -3276,7 +3174,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:3280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + res=yes + else +@@ -3292,7 +3190,7 @@ rm -f conftest* + fi + # Check windres version + echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6 +-echo "configure:3296: checking for windres version >= $WINDRES_VERSION" >&5 ++echo "configure:3194: checking for windres version >= $WINDRES_VERSION" >&5 + _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'` + echo "$ac_t""$_WINDRES_VERSION" 1>&6 + _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'` +@@ -3316,7 +3214,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:3320: checking for $ac_word" >&5 ++echo "configure:3218: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_MIDL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3503,7 +3401,7 @@ tools are selected during the Xcode/Developer Tools installation." 1>&5; exit 1; + + + echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6 +-echo "configure:3507: checking for valid compiler/Mac OS X SDK combination" >&5 ++echo "configure:3405: checking for valid compiler/Mac OS X SDK combination" >&5 + ac_ext=C + # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CXXCPP $CPPFLAGS' +@@ -3512,14 +3410,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes + cross_compiling=$ac_cv_prog_cxx_cross + + cat > conftest.$ac_ext < + int main() { + + ; return 0; } + EOF +-if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + result=yes + else +@@ -3550,7 +3448,7 @@ fi + # Uses ac_ vars as temps to allow command line to override cache and checks. + # --without-x overrides everything else, but does not touch the cache. + echo $ac_n "checking for X""... $ac_c" 1>&6 +-echo "configure:3554: checking for X" >&5 ++echo "configure:3452: checking for X" >&5 + + # Check whether --with-x or --without-x was given. + if test "${with_x+set}" = set; then +@@ -3612,12 +3510,12 @@ if test "$ac_x_includes" = NO; then + + # First, try using that file with no special directory specified. + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:3621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:3519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -3686,14 +3584,14 @@ if test "$ac_x_libraries" = NO; then + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LIBS="$ac_save_LIBS" + # We can link X programs with no special library path. +@@ -3802,17 +3700,17 @@ else + case "`(uname -sr) 2>/dev/null`" in + "SunOS 5"*) + echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 +-echo "configure:3806: checking whether -R must be followed by a space" >&5 ++echo "configure:3704: checking whether -R must be followed by a space" >&5 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_nospace=yes + else +@@ -3828,14 +3726,14 @@ rm -f conftest* + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_space=yes + else +@@ -3867,7 +3765,7 @@ rm -f conftest* + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 +-echo "configure:3871: checking for dnet_ntoa in -ldnet" >&5 ++echo "configure:3769: checking for dnet_ntoa in -ldnet" >&5 + ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3875,7 +3773,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-ldnet $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3908,7 +3806,7 @@ fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 +-echo "configure:3912: checking for dnet_ntoa in -ldnet_stub" >&5 ++echo "configure:3810: checking for dnet_ntoa in -ldnet_stub" >&5 + ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3916,7 +3814,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-ldnet_stub $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3956,12 +3854,12 @@ fi + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 +-echo "configure:3960: checking for gethostbyname" >&5 ++echo "configure:3858: checking for gethostbyname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" + else +@@ -4009,7 +3907,7 @@ fi + + if test $ac_cv_func_gethostbyname = no; then + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +-echo "configure:4013: checking for gethostbyname in -lnsl" >&5 ++echo "configure:3911: checking for gethostbyname in -lnsl" >&5 + ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4017,7 +3915,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -4058,12 +3956,12 @@ fi + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + echo $ac_n "checking for connect""... $ac_c" 1>&6 +-echo "configure:4062: checking for connect" >&5 ++echo "configure:3960: checking for connect" >&5 + if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_connect=yes" + else +@@ -4111,7 +4009,7 @@ fi + + if test $ac_cv_func_connect = no; then + echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 +-echo "configure:4115: checking for connect in -lsocket" >&5 ++echo "configure:4013: checking for connect in -lsocket" >&5 + ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4119,7 +4017,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lsocket $X_EXTRA_LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -4154,12 +4052,12 @@ fi + + # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. + echo $ac_n "checking for remove""... $ac_c" 1>&6 +-echo "configure:4158: checking for remove" >&5 ++echo "configure:4056: checking for remove" >&5 + if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_remove=yes" + else +@@ -4207,7 +4105,7 @@ fi + + if test $ac_cv_func_remove = no; then + echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 +-echo "configure:4211: checking for remove in -lposix" >&5 ++echo "configure:4109: checking for remove in -lposix" >&5 + ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4215,7 +4113,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lposix $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -4250,12 +4148,12 @@ fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo $ac_n "checking for shmat""... $ac_c" 1>&6 +-echo "configure:4254: checking for shmat" >&5 ++echo "configure:4152: checking for shmat" >&5 + if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shmat=yes" + else +@@ -4303,7 +4201,7 @@ fi + + if test $ac_cv_func_shmat = no; then + echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 +-echo "configure:4307: checking for shmat in -lipc" >&5 ++echo "configure:4205: checking for shmat in -lipc" >&5 + ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4311,7 +4209,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lipc $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -4355,7 +4253,7 @@ fi + # libraries we check for below, so use a different variable. + # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. + echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 +-echo "configure:4359: checking for IceConnectionNumber in -lICE" >&5 ++echo "configure:4257: checking for IceConnectionNumber in -lICE" >&5 + ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4363,7 +4261,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lICE $X_EXTRA_LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -4533,14 +4431,14 @@ no) + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$arch_flag" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + MOZ_THUMB2=1 + else +@@ -4623,16 +4521,16 @@ if test -n "$align_flag"; then + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $align_flag" + echo $ac_n "checking whether alignment flag ($align_flag) is supported""... $ac_c" 1>&6 +-echo "configure:4627: checking whether alignment flag ($align_flag) is supported" >&5 ++echo "configure:4525: checking whether alignment flag ($align_flag) is supported" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 +@@ -4649,16 +4547,16 @@ if test -n "$all_flags"; then + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$all_flags" + echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6 +-echo "configure:4653: checking whether the chosen combination of compiler flags ($all_flags) works" >&5 ++echo "configure:4551: checking whether the chosen combination of compiler flags ($all_flags) works" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + else +@@ -4682,18 +4580,18 @@ fi + if test "$CPU_ARCH" = "arm"; then + NEON_FLAGS="-mfpu=neon" + echo $ac_n "checking for ARM SIMD support in compiler""... $ac_c" 1>&6 +-echo "configure:4686: checking for ARM SIMD support in compiler" >&5 ++echo "configure:4584: checking for ARM SIMD support in compiler" >&5 + # We try to link so that this also fails when + # building with LTO. + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + result="yes" + else +@@ -4716,23 +4614,23 @@ EOF + fi + + echo $ac_n "checking ARM version support in compiler""... $ac_c" 1>&6 +-echo "configure:4720: checking ARM version support in compiler" >&5 ++echo "configure:4618: checking ARM version support in compiler" >&5 + ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([0-9][0-9]*\).*/\1/p'` + echo "$ac_t"""$ARM_ARCH"" 1>&6 + + echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6 +-echo "configure:4725: checking for ARM NEON support in compiler" >&5 ++echo "configure:4623: checking for ARM NEON support in compiler" >&5 + # We try to link so that this also fails when + # building with LTO. + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + result="yes" + else +@@ -4911,7 +4809,7 @@ if test -n "$MOZ_ASAN"; then + # Extract the first word of "$MOZ_CLANG_RT_ASAN_LIB", so it can be a program name with args. + set dummy $MOZ_CLANG_RT_ASAN_LIB; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:4915: checking for $ac_word" >&5 ++echo "configure:4813: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -4981,7 +4879,7 @@ EOF + # Extract the first word of "llvm-symbolizer", so it can be a program name with args. + set dummy llvm-symbolizer; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:4985: checking for $ac_word" >&5 ++echo "configure:4883: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -5058,7 +4956,7 @@ EOF + # Extract the first word of "llvm-symbolizer", so it can be a program name with args. + set dummy llvm-symbolizer; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:5062: checking for $ac_word" >&5 ++echo "configure:4960: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -5135,7 +5033,7 @@ EOF + # Extract the first word of "llvm-symbolizer", so it can be a program name with args. + set dummy llvm-symbolizer; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:5139: checking for $ac_word" >&5 ++echo "configure:5037: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -5206,14 +5104,14 @@ fi + + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + : + else + echo "configure: failed program was:" >&5 +@@ -5240,18 +5138,18 @@ if test "$GNU_CC"; then + DSO_PIC_CFLAGS='-fPIC' + ASFLAGS="$ASFLAGS -fPIC" + echo $ac_n "checking for --noexecstack option to as""... $ac_c" 1>&6 +-echo "configure:5244: checking for --noexecstack option to as" >&5 ++echo "configure:5142: checking for --noexecstack option to as" >&5 + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Wa,--noexecstack" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:5153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ASFLAGS="$ASFLAGS -Wa,--noexecstack" +@@ -5264,18 +5162,18 @@ fi + rm -f conftest* + CFLAGS=$_SAVE_CFLAGS + echo $ac_n "checking for -z noexecstack option to ld""... $ac_c" 1>&6 +-echo "configure:5268: checking for -z noexecstack option to ld" >&5 ++echo "configure:5166: checking for -z noexecstack option to ld" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + else +@@ -5288,18 +5186,18 @@ fi + rm -f conftest* + + echo $ac_n "checking for -z text option to ld""... $ac_c" 1>&6 +-echo "configure:5292: checking for -z text option to ld" >&5 ++echo "configure:5190: checking for -z text option to ld" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,text" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,text" +@@ -5312,45 +5210,20 @@ else + fi + rm -f conftest* + +- echo $ac_n "checking for --build-id option to ld""... $ac_c" 1>&6 +-echo "configure:5317: checking for --build-id option to ld" >&5 +- _SAVE_LDFLAGS=$LDFLAGS +- LDFLAGS="$LDFLAGS -Wl,--build-id" +- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- echo "$ac_t""yes" 1>&6 +- NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,--build-id" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- echo "$ac_t""no" 1>&6 +- LDFLAGS=$_SAVE_LDFLAGS +-fi +-rm -f conftest* +- +- echo $ac_n "checking for --ignore-unresolved-symbol option to ld""... $ac_c" 1>&6 +-echo "configure:5342: checking for --ignore-unresolved-symbol option to ld" >&5 ++ echo $ac_n "checking for --ignore-unresolved-symbol option to ld""... $ac_c" 1>&6 ++echo "configure:5215: checking for --ignore-unresolved-symbol option to ld" >&5 + HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED= + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--ignore-unresolved-symbol,environ" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED=1 +@@ -5365,19 +5238,19 @@ rm -f conftest* + + # Check for -mssse3 on $CC + echo $ac_n "checking if toolchain supports -mssse3 option""... $ac_c" 1>&6 +-echo "configure:5369: checking if toolchain supports -mssse3 option" >&5 ++echo "configure:5242: checking if toolchain supports -mssse3 option" >&5 + HAVE_TOOLCHAIN_SUPPORT_MSSSE3= + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -mssse3" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:5254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1 +@@ -5392,19 +5265,19 @@ rm -f conftest* + + # Check for -msse4.1 on $CC + echo $ac_n "checking if toolchain supports -msse4.1 option""... $ac_c" 1>&6 +-echo "configure:5396: checking if toolchain supports -msse4.1 option" >&5 ++echo "configure:5269: checking if toolchain supports -msse4.1 option" >&5 + HAVE_TOOLCHAIN_SUPPORT_MSSE4_1= + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -msse4.1" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:5281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1 +@@ -5420,16 +5293,16 @@ rm -f conftest* + case "${CPU_ARCH}" in + x86 | x86_64) + echo $ac_n "checking for x86 AVX2 asm support in compiler""... $ac_c" 1>&6 +-echo "configure:5424: checking for x86 AVX2 asm support in compiler" >&5 ++echo "configure:5297: checking for x86 AVX2 asm support in compiler" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:5306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + result="yes" + else +@@ -5447,19 +5320,19 @@ rm -f conftest* + + ppc*) + echo $ac_n "checking whether we can enable AltiVec support""... $ac_c" 1>&6 +-echo "configure:5451: checking whether we can enable AltiVec support" >&5 ++echo "configure:5324: checking whether we can enable AltiVec support" >&5 + HAVE_ALTIVEC= + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -maltivec" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:5336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + HAVE_ALTIVEC=1 +@@ -5525,12 +5398,12 @@ fi + if test -n "$MOZ_VALGRIND"; then + ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6 +-echo "configure:5529: checking for valgrind/valgrind.h" >&5 ++echo "configure:5402: checking for valgrind/valgrind.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -5538,7 +5411,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:5542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:5415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -5696,12 +5569,12 @@ case "$target" in + STRIP_FLAGS="$STRIP_FLAGS -x -S" + # Ensure that if we're targeting iOS an SDK was provided. + echo $ac_n "checking for iOS target""... $ac_c" 1>&6 +-echo "configure:5700: checking for iOS target" >&5 ++echo "configure:5573: checking for iOS target" >&5 + if eval "test \"`echo '$''{'ac_cv_ios_target'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if !(TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR) +@@ -5711,7 +5584,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_ios_target="yes" + else +@@ -5742,18 +5615,18 @@ echo "$ac_t""$ac_cv_ios_target" 1>&6 + echo "Skipping -dead_strip because DTrace is enabled. See bug 403132." + else + echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6 +-echo "configure:5746: checking for -dead_strip option to ld" >&5 ++echo "configure:5619: checking for -dead_strip option to ld" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-dead_strip" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + _HAVE_DEAD_STRIP=1 + else +@@ -6140,7 +6013,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:6144: checking for $ac_word" >&5 ++echo "configure:6017: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_XZ'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -6218,18 +6091,18 @@ fi + if test -n "$MOZ_DEBUG"; then + if test -n "$COMPILE_ENVIRONMENT"; then + echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 +-echo "configure:6222: checking for valid debug flags" >&5 ++echo "configure:6095: checking for valid debug flags" >&5 + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" + cat > conftest.$ac_ext < + int main() { + printf("Hello World\n"); + ; return 0; } + EOF +-if { (eval echo configure:6233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:6106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + _results=yes + else +@@ -6277,18 +6150,18 @@ fi + if test -n "$MOZ_DEBUG"; then + if test -n "$COMPILE_ENVIRONMENT"; then + echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 +-echo "configure:6281: checking for valid debug flags" >&5 ++echo "configure:6154: checking for valid debug flags" >&5 + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" + cat > conftest.$ac_ext < + int main() { + printf("Hello World\n"); + ; return 0; } + EOF +-if { (eval echo configure:6292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:6165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + _results=yes + else +@@ -6437,7 +6310,7 @@ fi + + if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF" -a -z "$DEVELOPER_OPTIONS"; then + echo $ac_n "checking whether the linker supports Identical Code Folding""... $ac_c" 1>&6 +-echo "configure:6441: checking whether the linker supports Identical Code Folding" >&5 ++echo "configure:6314: checking whether the linker supports Identical Code Folding" >&5 + if eval "test \"`echo '$''{'LD_SUPPORTS_ICF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -6446,7 +6319,7 @@ else + 'int main() {return foo() - bar();}' > conftest.${ac_ext} + # If the linker supports ICF, foo and bar symbols will have + # the same address +- if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:6450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:6323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && + test -s conftest${ac_exeext} && + objdump -t conftest${ac_exeext} | awk '{a[$6] = $1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'; then + LD_SUPPORTS_ICF=yes +@@ -6461,14 +6334,14 @@ echo "$ac_t""$LD_SUPPORTS_ICF" 1>&6 + _SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe" + LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LD_PRINT_ICF_SECTIONS=-Wl,--print-icf-sections + else +@@ -6487,15 +6360,15 @@ fi + if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then + if test -n "$MOZ_DEBUG_FLAGS"; then + echo $ac_n "checking whether removing dead symbols breaks debugging""... $ac_c" 1>&6 +-echo "configure:6491: checking whether removing dead symbols breaks debugging" >&5 ++echo "configure:6364: checking whether removing dead symbols breaks debugging" >&5 + if eval "test \"`echo '$''{'GC_SECTIONS_BREAKS_DEBUG_RANGES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + echo 'int foo() {return 42;}' \ + 'int bar() {return 1;}' \ + 'int main() {return foo();}' > conftest.${ac_ext} +- if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:6498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && +- { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:6499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:6371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:6372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && + test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then + if test "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest.${ac_objext} conftest.${ac_ext}`" = \ + "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest${ac_exeext} conftest.${ac_ext}`"; then +@@ -6546,18 +6419,20 @@ fi + + if test "$GNU_CC" -a -n "$MOZ_PIE"; then + echo $ac_n "checking for PIE support""... $ac_c" 1>&6 +-echo "configure:6550: checking for PIE support" >&5 ++echo "configure:6423: checking for PIE support" >&5 ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS -fPIC" + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -pie" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -pie" +@@ -6570,6 +6445,7 @@ else + fi + rm -f conftest* + LDFLAGS=$_SAVE_LDFLAGS ++ CFLAGS=$_SAVE_CFLAGS + fi + + +@@ -6587,12 +6463,12 @@ fi # COMPILE_ENVIRONMENT + + if test -z "$SKIP_COMPILER_CHECKS"; then + echo $ac_n "checking for working const""... $ac_c" 1>&6 +-echo "configure:6591: checking for working const" >&5 ++echo "configure:6467: checking for working const" >&5 + if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:6521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes + else +@@ -6667,12 +6543,12 @@ fi + + + echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +-echo "configure:6671: checking for mode_t" >&5 ++echo "configure:6547: checking for mode_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -6705,12 +6581,12 @@ fi + + + echo $ac_n "checking for off_t""... $ac_c" 1>&6 +-echo "configure:6709: checking for off_t" >&5 ++echo "configure:6585: checking for off_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -6743,12 +6619,12 @@ fi + + + echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +-echo "configure:6747: checking for pid_t" >&5 ++echo "configure:6623: checking for pid_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -6781,12 +6657,12 @@ fi + + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:6785: checking for size_t" >&5 ++echo "configure:6661: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -6849,12 +6725,12 @@ cross_compiling=$ac_cv_prog_cxx_cross + + if test "$GNU_CXX"; then + echo $ac_n "checking whether 64-bits std::atomic requires -latomic""... $ac_c" 1>&6 +-echo "configure:6853: checking whether 64-bits std::atomic requires -latomic" >&5 ++echo "configure:6729: checking whether 64-bits std::atomic requires -latomic" >&5 + if eval "test \"`echo '$''{'ac_cv_needs_atomic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -6862,7 +6738,7 @@ int main() { + std::atomic foo; foo = 1; + ; return 0; } + EOF +-if { (eval echo configure:6866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_needs_atomic=no + else +@@ -6872,7 +6748,7 @@ else + _SAVE_LIBS="$LIBS" + LIBS="$LIBS -latomic" + cat > conftest.$ac_ext < + #include +@@ -6880,7 +6756,7 @@ int main() { + std::atomic foo; foo = 1; + ; return 0; } + EOF +-if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_needs_atomic=yes + else +@@ -6936,12 +6812,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +-echo "configure:6940: checking for $ac_hdr that defines DIR" >&5 ++echo "configure:6816: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +@@ -6949,7 +6825,7 @@ int main() { + DIR *dirp = 0; + ; return 0; } + EOF +-if { (eval echo configure:6953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:6829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +@@ -6977,7 +6853,7 @@ done + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then + echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +-echo "configure:6981: checking for opendir in -ldir" >&5 ++echo "configure:6857: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -6985,7 +6861,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-ldir $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7018,7 +6894,7 @@ fi + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +-echo "configure:7022: checking for opendir in -lx" >&5 ++echo "configure:6898: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7026,7 +6902,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7067,12 +6943,12 @@ bitrig*|dragonfly*|freebsd*|openbsd*) + esac + + echo $ac_n "checking for sockaddr_in.sin_len""... $ac_c" 1>&6 +-echo "configure:7071: checking for sockaddr_in.sin_len" >&5 ++echo "configure:6947: checking for sockaddr_in.sin_len" >&5 + if eval "test \"`echo '$''{'ac_cv_sockaddr_in_sin_len'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -7084,7 +6960,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:7088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:6964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sockaddr_in_sin_len=true + else +@@ -7115,12 +6991,12 @@ EOF + fi + + echo $ac_n "checking for sockaddr_in6.sin6_len""... $ac_c" 1>&6 +-echo "configure:7119: checking for sockaddr_in6.sin6_len" >&5 ++echo "configure:6995: checking for sockaddr_in6.sin6_len" >&5 + if eval "test \"`echo '$''{'ac_cv_sockaddr_in6_sin6_len'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -7132,7 +7008,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:7136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:7012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sockaddr_in6_sin6_len=true + else +@@ -7156,12 +7032,12 @@ EOF + fi + + echo $ac_n "checking for sockaddr.sa_len""... $ac_c" 1>&6 +-echo "configure:7160: checking for sockaddr.sa_len" >&5 ++echo "configure:7036: checking for sockaddr.sa_len" >&5 + if eval "test \"`echo '$''{'ac_cv_sockaddr_sa_len'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -7173,7 +7049,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:7177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:7053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sockaddr_sa_len=true + else +@@ -7211,12 +7087,12 @@ fi + if test "x$enable_dtrace" = "xyes"; then + ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6 +-echo "configure:7215: checking for sys/sdt.h" >&5 ++echo "configure:7091: checking for sys/sdt.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -7224,7 +7100,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:7104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -7259,7 +7135,7 @@ fi + + + echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 +-echo "configure:7263: checking for gethostbyname_r in -lc_r" >&5 ++echo "configure:7139: checking for gethostbyname_r in -lc_r" >&5 + ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7267,7 +7143,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lc_r $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7315,14 +7191,14 @@ case $target in + *) + + echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6 +-echo "configure:7319: checking for library containing dlopen" >&5 ++echo "configure:7195: checking for library containing dlopen" >&5 + if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_func_search_save_LIBS="$LIBS" + ac_cv_search_dlopen="no" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_dlopen="none required" + else +@@ -7344,7 +7220,7 @@ rm -f conftest* + test "$ac_cv_search_dlopen" = "no" && for i in dl; do + LIBS="-l$i $ac_func_search_save_LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_dlopen="-l$i" + break +@@ -7373,12 +7249,12 @@ if test "$ac_cv_search_dlopen" != "no"; then + test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" + ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 +-echo "configure:7377: checking for dlfcn.h" >&5 ++echo "configure:7253: checking for dlfcn.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -7386,7 +7262,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:7390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -7423,12 +7299,12 @@ CFLAGS="$CFLAGS -D_GNU_SOURCE" + for ac_func in dladdr memmem + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7427: checking for $ac_func" >&5 ++echo "configure:7303: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -7486,7 +7362,7 @@ CFLAGS="$_SAVE_CFLAGS" + + if test ! "$GNU_CXX"; then + echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 +-echo "configure:7490: checking for demangle in -lC" >&5 ++echo "configure:7366: checking for demangle in -lC" >&5 + ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7494,7 +7370,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lC $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7538,7 +7414,7 @@ fi + fi + + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +-echo "configure:7542: checking for socket in -lsocket" >&5 ++echo "configure:7418: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7546,7 +7422,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7603,7 +7479,7 @@ EOF + _SAVE_LIBS="$LIBS" + LDFLAGS="$XLDFLAGS $LDFLAGS" + echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6 +-echo "configure:7607: checking for XDrawLines in -lX11" >&5 ++echo "configure:7483: checking for XDrawLines in -lX11" >&5 + ac_lib_var=`echo X11'_'XDrawLines | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7611,7 +7487,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lX11 $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7644,7 +7520,7 @@ MISSING_X="$MISSING_X -lX11" + fi + + echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6 +-echo "configure:7648: checking for XextAddDisplay in -lXext" >&5 ++echo "configure:7524: checking for XextAddDisplay in -lXext" >&5 + ac_lib_var=`echo Xext'_'XextAddDisplay | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7652,7 +7528,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lXext $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7686,7 +7562,7 @@ fi + + + echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 +-echo "configure:7690: checking for XtFree in -lXt" >&5 ++echo "configure:7566: checking for XtFree in -lXt" >&5 + ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7694,7 +7570,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lXt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7726,7 +7602,7 @@ else + + unset ac_cv_lib_Xt_XtFree + echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6 +-echo "configure:7730: checking for IceFlush in -lICE" >&5 ++echo "configure:7606: checking for IceFlush in -lICE" >&5 + ac_lib_var=`echo ICE'_'IceFlush | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7734,7 +7610,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lICE $XT_LIBS $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7766,7 +7642,7 @@ else + fi + + echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6 +-echo "configure:7770: checking for SmcCloseConnection in -lSM" >&5 ++echo "configure:7646: checking for SmcCloseConnection in -lSM" >&5 + ac_lib_var=`echo SM'_'SmcCloseConnection | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7774,7 +7650,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lSM $XT_LIBS $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7806,7 +7682,7 @@ else + fi + + echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 +-echo "configure:7810: checking for XtFree in -lXt" >&5 ++echo "configure:7686: checking for XtFree in -lXt" >&5 + ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7814,7 +7690,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lXt $X_PRE_LIBS $XT_LIBS $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7851,7 +7727,7 @@ fi + + + echo $ac_n "checking for xcb_connect in -lxcb""... $ac_c" 1>&6 +-echo "configure:7855: checking for xcb_connect in -lxcb" >&5 ++echo "configure:7731: checking for xcb_connect in -lxcb" >&5 + ac_lib_var=`echo xcb'_'xcb_connect | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7859,7 +7735,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lxcb $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7892,7 +7768,7 @@ MISSING_X="$MISSING_X -lxcb" + fi + + echo $ac_n "checking for xcb_shm_query_version in -lxcb-shm""... $ac_c" 1>&6 +-echo "configure:7896: checking for xcb_shm_query_version in -lxcb-shm" >&5 ++echo "configure:7772: checking for xcb_shm_query_version in -lxcb-shm" >&5 + ac_lib_var=`echo xcb-shm'_'xcb_shm_query_version | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7900,7 +7776,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lxcb-shm $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7933,7 +7809,7 @@ MISSING_X="$MISSING_X -lxcb-shm" + fi + + echo $ac_n "checking for XGetXCBConnection in -lX11-xcb""... $ac_c" 1>&6 +-echo "configure:7937: checking for XGetXCBConnection in -lX11-xcb" >&5 ++echo "configure:7813: checking for XGetXCBConnection in -lX11-xcb" >&5 + ac_lib_var=`echo X11-xcb'_'XGetXCBConnection | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7941,7 +7817,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lX11-xcb $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -7976,12 +7852,12 @@ fi + + ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6 +-echo "configure:7980: checking for X11/extensions/scrnsaver.h" >&5 ++echo "configure:7856: checking for X11/extensions/scrnsaver.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -7989,7 +7865,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:7993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:7869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -8004,7 +7880,7 @@ fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for XScreenSaverQueryInfo in -lXss""... $ac_c" 1>&6 +-echo "configure:8008: checking for XScreenSaverQueryInfo in -lXss" >&5 ++echo "configure:7884: checking for XScreenSaverQueryInfo in -lXss" >&5 + ac_lib_var=`echo Xss'_'XScreenSaverQueryInfo | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8012,7 +7888,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lXss $XEXT_LIBS $XLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -8073,7 +7949,7 @@ darwin*) + ;; + *) + echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 +-echo "configure:8077: checking for pthread_create in -lpthreads" >&5 ++echo "configure:7953: checking for pthread_create in -lpthreads" >&5 + ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8081,7 +7957,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lpthreads $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -8111,7 +7987,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +-echo "configure:8115: checking for pthread_create in -lpthread" >&5 ++echo "configure:7991: checking for pthread_create in -lpthread" >&5 + ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8119,7 +7995,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lpthread $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -8149,7 +8025,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +-echo "configure:8153: checking for pthread_create in -lc_r" >&5 ++echo "configure:8029: checking for pthread_create in -lc_r" >&5 + ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8157,7 +8033,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lc_r $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -8187,7 +8063,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 +-echo "configure:8191: checking for pthread_create in -lc" >&5 ++echo "configure:8067: checking for pthread_create in -lc" >&5 + ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8195,7 +8071,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lc $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -8261,7 +8137,7 @@ then + rm -f conftest* + ac_cv_have_dash_pthread=no + echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 +-echo "configure:8265: checking whether ${CC-cc} accepts -pthread" >&5 ++echo "configure:8141: checking whether ${CC-cc} accepts -pthread" >&5 + echo 'int main() { return 0; }' | cat > conftest.c + ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 + if test $? -eq 0; then +@@ -8284,7 +8160,7 @@ echo "configure:8265: checking whether ${CC-cc} accepts -pthread" >&5 + ac_cv_have_dash_pthreads=no + if test "$ac_cv_have_dash_pthread" = "no"; then + echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 +-echo "configure:8288: checking whether ${CC-cc} accepts -pthreads" >&5 ++echo "configure:8164: checking whether ${CC-cc} accepts -pthreads" >&5 + echo 'int main() { return 0; }' | cat > conftest.c + ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 + if test $? -eq 0; then +@@ -8356,12 +8232,12 @@ EOF + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:8360: checking for $ac_hdr" >&5 ++echo "configure:8236: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -8369,7 +8245,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:8373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:8249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -8406,13 +8282,13 @@ fi + + if test $ac_cv_prog_gcc = yes; then + echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 +-echo "configure:8410: checking whether ${CC-cc} needs -traditional" >&5 ++echo "configure:8286: checking whether ${CC-cc} needs -traditional" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_pattern="Autoconf.*'x'" + cat > conftest.$ac_ext < + Autoconf TIOCGETP +@@ -8430,7 +8306,7 @@ rm -f conftest* + + if test $ac_cv_prog_gcc_traditional = no; then + cat > conftest.$ac_ext < + Autoconf TCGETA +@@ -8452,7 +8328,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 + fi + + echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +-echo "configure:8456: checking for 8-bit clean memcmp" >&5 ++echo "configure:8332: checking for 8-bit clean memcmp" >&5 + if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8460,7 +8336,7 @@ else + ac_cv_func_memcmp_clean=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:8350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_memcmp_clean=yes + else +@@ -8490,12 +8366,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + for ac_func in stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize gmtime_r localtime_r arc4random arc4random_buf mallinfo gettid lchown setpriority strerror syscall + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:8494: checking for $ac_func" >&5 ++echo "configure:8370: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -8555,7 +8431,7 @@ Darwin) + ;; + *) + echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC)""... $ac_c" 1>&6 +-echo "configure:8559: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 ++echo "configure:8435: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 + if eval "test \"`echo '$''{'ac_cv_clock_monotonic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8563,7 +8439,7 @@ else + _SAVE_LIBS="$LIBS" + LIBS="$LIBS $libs" + cat > conftest.$ac_ext < + int main() { +@@ -8571,7 +8447,7 @@ int main() { + clock_gettime(CLOCK_MONOTONIC, &ts); + ; return 0; } + EOF +-if { (eval echo configure:8575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_clock_monotonic=$libs + LIBS="$_SAVE_LIBS" +@@ -8605,19 +8481,19 @@ EOF + esac + + echo $ac_n "checking for pthread_cond_timedwait_monotonic_np""... $ac_c" 1>&6 +-echo "configure:8609: checking for pthread_cond_timedwait_monotonic_np" >&5 ++echo "configure:8485: checking for pthread_cond_timedwait_monotonic_np" >&5 + if eval "test \"`echo '$''{'ac_cv_pthread_cond_timedwait_monotonic_np'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + pthread_cond_timedwait_monotonic_np(0, 0, 0); + ; return 0; } + EOF +-if { (eval echo configure:8621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_pthread_cond_timewait_monotonic_np=yes + else +@@ -8650,19 +8526,19 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes + cross_compiling=$ac_cv_prog_cxx_cross + + echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6 +-echo "configure:8654: checking for wcrtomb" >&5 ++echo "configure:8530: checking for wcrtomb" >&5 + if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + mbstate_t ps={0};wcrtomb(0,'f',&ps); + ; return 0; } + EOF +-if { (eval echo configure:8666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_have_wcrtomb="yes" + else +@@ -8685,19 +8561,19 @@ EOF + + fi + echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6 +-echo "configure:8689: checking for mbrtowc" >&5 ++echo "configure:8565: checking for mbrtowc" >&5 + if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + mbstate_t ps={0};mbrtowc(0,0,0,&ps); + ; return 0; } + EOF +-if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_have_mbrtowc="yes" + else +@@ -8729,7 +8605,7 @@ cross_compiling=$ac_cv_prog_cc_cross + fi + + echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6 +-echo "configure:8733: checking for res_ninit()" >&5 ++echo "configure:8609: checking for res_ninit()" >&5 + if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8737,7 +8613,7 @@ else + ac_cv_func_res_ninit=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_res_ninit=yes + else +@@ -8794,7 +8670,7 @@ case $target_os in + *) + + echo $ac_n "checking for iconv in -lc""... $ac_c" 1>&6 +-echo "configure:8798: checking for iconv in -lc" >&5 ++echo "configure:8674: checking for iconv in -lc" >&5 + ac_lib_var=`echo c'_'iconv | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8802,7 +8678,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lc $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -8835,7 +8711,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6 +-echo "configure:8839: checking for iconv in -liconv" >&5 ++echo "configure:8715: checking for iconv in -liconv" >&5 + ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8843,7 +8719,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-liconv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -8876,7 +8752,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6 +-echo "configure:8880: checking for libiconv in -liconv" >&5 ++echo "configure:8756: checking for libiconv in -liconv" >&5 + ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8884,7 +8760,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-liconv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -8925,12 +8801,12 @@ fi + _SAVE_LIBS=$LIBS + LIBS="$LIBS $ICONV_LIBS" + echo $ac_n "checking for iconv()""... $ac_c" 1>&6 +-echo "configure:8929: checking for iconv()" >&5 ++echo "configure:8805: checking for iconv()" >&5 + if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -8944,7 +8820,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_iconv=yes + else +@@ -8969,12 +8845,12 @@ EOF + + LIBICONV="$ICONV_LIBS" + echo $ac_n "checking for iconv() with const input""... $ac_c" 1>&6 +-echo "configure:8973: checking for iconv() with const input" >&5 ++echo "configure:8849: checking for iconv() with const input" >&5 + if eval "test \"`echo '$''{'ac_cv_func_const_iconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -8989,7 +8865,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:8993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:8869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_func_const_iconv=yes + else +@@ -9023,19 +8899,19 @@ esac + + + echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 +-echo "configure:9027: checking for nl_langinfo and CODESET" >&5 ++echo "configure:8903: checking for nl_langinfo and CODESET" >&5 + if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + char* cs = nl_langinfo(CODESET); + ; return 0; } + EOF +-if { (eval echo configure:9039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + am_cv_langinfo_codeset=yes + else +@@ -9071,12 +8947,12 @@ cross_compiling=$ac_cv_prog_cc_cross + + + echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 +-echo "configure:9075: checking for an implementation of va_copy()" >&5 ++echo "configure:8951: checking for an implementation of va_copy()" >&5 + if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -9092,7 +8968,7 @@ int main() { + f(0, 42); return 0 + ; return 0; } + EOF +-if { (eval echo configure:9096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:8972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_va_copy=yes + else +@@ -9108,12 +8984,12 @@ fi + + echo "$ac_t""$ac_cv_va_copy" 1>&6 + echo $ac_n "checking whether va_list can be copied by value""... $ac_c" 1>&6 +-echo "configure:9112: checking whether va_list can be copied by value" >&5 ++echo "configure:8988: checking whether va_list can be copied by value" >&5 + if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -9129,7 +9005,7 @@ int main() { + f(0, 42); return 0 + ; return 0; } + EOF +-if { (eval echo configure:9133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_va_val_copy=yes + else +@@ -9182,12 +9058,12 @@ ARM_ABI_PREFIX= + if test "$GNU_CC"; then + if test "$CPU_ARCH" = "arm" ; then + echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6 +-echo "configure:9186: checking for ARM EABI" >&5 ++echo "configure:9062: checking for ARM EABI" >&5 + if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_gcc_arm_eabi="yes" + else +@@ -9225,7 +9101,7 @@ echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6 + fi + + echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 +-echo "configure:9229: checking for C++ dynamic_cast to void*" >&5 ++echo "configure:9105: checking for C++ dynamic_cast to void*" >&5 + if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9233,8 +9109,11 @@ else + ac_cv_cpp_dynamic_cast_void_ptr=no + else + cat > conftest.$ac_ext <(suby)))); + } + EOF +-if { (eval echo configure:9253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:9132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_cpp_dynamic_cast_void_ptr=yes + else +@@ -9282,19 +9161,19 @@ fi + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS" + echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6 +-echo "configure:9286: checking for __thread keyword for TLS variables" >&5 ++echo "configure:9165: checking for __thread keyword for TLS variables" >&5 + if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_thread_keyword=yes + else +@@ -9350,12 +9229,12 @@ fi + + if test -n "$MOZ_LINKER" -a "$OS_TARGET" = "Android"; then + echo $ac_n "checking whether the CRT objects have text relocations""... $ac_c" 1>&6 +-echo "configure:9354: checking whether the CRT objects have text relocations" >&5 ++echo "configure:9233: checking whether the CRT objects have text relocations" >&5 + if eval "test \"`echo '$''{'ac_cv_crt_has_text_relocations'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + echo 'int foo() { return 0; }' > conftest.cpp +- if { ac_try='${CXX-g++} -o conftest${DLL_SUFFIX} $CXXFLAGS $DSO_LDOPTS $LDFLAGS conftest.cpp $LIBS 1>&5'; { (eval echo configure:9359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ if { ac_try='${CXX-g++} -o conftest${DLL_SUFFIX} $CXXFLAGS $DSO_LDOPTS $LDFLAGS conftest.cpp $LIBS 1>&5'; { (eval echo configure:9238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && + test -s conftest${DLL_SUFFIX}; then + if ${TOOLCHAIN_PREFIX}readelf -d conftest${DLL_SUFFIX} | grep TEXTREL > /dev/null; then + ac_cv_crt_has_text_relocations=yes +@@ -9385,19 +9264,19 @@ cross_compiling=$ac_cv_prog_cc_cross + + + echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +-echo "configure:9389: checking for LC_MESSAGES" >&5 ++echo "configure:9268: checking for LC_MESSAGES" >&5 + if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + int category = LC_MESSAGES; + ; return 0; } + EOF +-if { (eval echo configure:9401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_i18n_lc_messages=yes + else +@@ -9423,12 +9302,12 @@ fi + for ac_func in localeconv + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:9427: checking for $ac_func" >&5 ++echo "configure:9306: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -9496,12 +9375,12 @@ MALLOC_H= + for file in $MALLOC_HEADERS; do + ac_safe=`echo "$file" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $file""... $ac_c" 1>&6 +-echo "configure:9500: checking for $file" >&5 ++echo "configure:9379: checking for $file" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -9509,7 +9388,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:9513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -9544,12 +9423,12 @@ done + for ac_func in strndup posix_memalign memalign + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:9548: checking for $ac_func" >&5 ++echo "configure:9427: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -9607,12 +9486,12 @@ done + for ac_func in malloc_usable_size + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:9611: checking for $ac_func" >&5 ++echo "configure:9490: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -9669,9 +9548,9 @@ done + MALLOC_USABLE_SIZE_CONST_PTR=const + if test -n "$HAVE_MALLOC_H"; then + echo $ac_n "checking whether malloc_usable_size definition can use const argument""... $ac_c" 1>&6 +-echo "configure:9673: checking whether malloc_usable_size definition can use const argument" >&5 ++echo "configure:9552: checking whether malloc_usable_size definition can use const argument" >&5 + cat > conftest.$ac_ext < + #include +@@ -9680,7 +9559,7 @@ int main() { + return malloc_usable_size(0); + ; return 0; } + EOF +-if { (eval echo configure:9684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + else +@@ -9702,9 +9581,9 @@ EOF + + + echo $ac_n "checking for valloc in malloc.h""... $ac_c" 1>&6 +-echo "configure:9706: checking for valloc in malloc.h" >&5 ++echo "configure:9585: checking for valloc in malloc.h" >&5 + cat > conftest.$ac_ext < + EOF +@@ -9727,9 +9606,9 @@ rm -f conftest* + + + echo $ac_n "checking for valloc in unistd.h""... $ac_c" 1>&6 +-echo "configure:9731: checking for valloc in unistd.h" >&5 ++echo "configure:9610: checking for valloc in unistd.h" >&5 + cat > conftest.$ac_ext < + EOF +@@ -9882,7 +9761,7 @@ fi + + + echo $ac_n "checking NSPR selection""... $ac_c" 1>&6 +-echo "configure:9886: checking NSPR selection" >&5 ++echo "configure:9765: checking NSPR selection" >&5 + nspr_opts= + which_nspr=default + if test -n "$_USE_SYSTEM_NSPR"; then +@@ -9982,7 +9861,7 @@ fi + # Extract the first word of "nspr-config", so it can be a program name with args. + set dummy nspr-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:9986: checking for $ac_word" >&5 ++echo "configure:9865: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10017,7 +9896,7 @@ fi + + min_nspr_version=$NSPR_MINVER + echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6 +-echo "configure:10021: checking for NSPR - version >= $min_nspr_version" >&5 ++echo "configure:9900: checking for NSPR - version >= $min_nspr_version" >&5 + + no_nspr="" + if test "$NSPR_CONFIG" != "no"; then +@@ -10084,7 +9963,7 @@ if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $NSPR_CFLAGS" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 +@@ -10103,7 +9982,7 @@ else + fi + rm -f conftest* + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 +@@ -10153,7 +10032,7 @@ if test -n "$MOZ_SYSTEM_NSPR"; then + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $NSPR_CFLAGS" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 +@@ -10201,19 +10080,19 @@ if test "$LIBEVENT_DIR" = yes; then + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for libevent""... $ac_c" 1>&6 +-echo "configure:10205: checking for libevent" >&5 ++echo "configure:10084: checking for libevent" >&5 + + if $PKG_CONFIG --exists "libevent" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_LIBEVENT_CFLAGS""... $ac_c" 1>&6 +-echo "configure:10212: checking MOZ_LIBEVENT_CFLAGS" >&5 ++echo "configure:10091: checking MOZ_LIBEVENT_CFLAGS" >&5 + MOZ_LIBEVENT_CFLAGS=`$PKG_CONFIG --cflags "libevent"` + echo "$ac_t""$MOZ_LIBEVENT_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_LIBEVENT_LIBS""... $ac_c" 1>&6 +-echo "configure:10217: checking MOZ_LIBEVENT_LIBS" >&5 ++echo "configure:10096: checking MOZ_LIBEVENT_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_LIBEVENT_LIBS="`$PKG_CONFIG --libs \"libevent\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_LIBEVENT_LIBS" 1>&6 +@@ -10250,12 +10129,12 @@ elif test -z "$MOZ_SYSTEM_LIBEVENT"; then + LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS" + ac_safe=`echo "event.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for event.h""... $ac_c" 1>&6 +-echo "configure:10254: checking for event.h" >&5 ++echo "configure:10133: checking for event.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -10263,7 +10142,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:10267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -10286,7 +10165,7 @@ fi + fi + + echo $ac_n "checking for event_init in -levent""... $ac_c" 1>&6 +-echo "configure:10290: checking for event_init in -levent" >&5 ++echo "configure:10169: checking for event_init in -levent" >&5 + ac_lib_var=`echo event'_'event_init | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -10294,7 +10173,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-levent $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -10386,7 +10265,7 @@ fi + # Extract the first word of "nss-config", so it can be a program name with args. + set dummy nss-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:10390: checking for $ac_word" >&5 ++echo "configure:10269: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NSS_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10421,7 +10300,7 @@ fi + + min_nss_version=3.29.5 + echo $ac_n "checking for NSS - version >= $min_nss_version""... $ac_c" 1>&6 +-echo "configure:10425: checking for NSS - version >= $min_nss_version" >&5 ++echo "configure:10304: checking for NSS - version >= $min_nss_version" >&5 + + no_nss="" + if test "$NSS_CONFIG" = "no"; then +@@ -10510,7 +10389,7 @@ if test -z "$JPEG_DIR" -o "$JPEG_DIR" = no; then + MOZ_SYSTEM_JPEG= + else + echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 +-echo "configure:10514: checking for jpeg_destroy_compress in -ljpeg" >&5 ++echo "configure:10393: checking for jpeg_destroy_compress in -ljpeg" >&5 + ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -10518,7 +10397,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-ljpeg $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -10554,7 +10433,7 @@ fi + + if test "$MOZ_SYSTEM_JPEG" = 1; then + cat > conftest.$ac_ext < + #include +@@ -10569,7 +10448,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:10573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + MOZ_SYSTEM_JPEG=1 + else +@@ -10616,7 +10495,7 @@ if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLAGS$SKIP_LIBRARY_CHECKS"; then + MOZ_SYSTEM_ZLIB= + else + echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 +-echo "configure:10620: checking for gzread in -lz" >&5 ++echo "configure:10499: checking for gzread in -lz" >&5 + ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -10624,7 +10503,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lz $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -10659,7 +10538,7 @@ fi + if test "$MOZ_SYSTEM_ZLIB" = 1; then + MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'` + cat > conftest.$ac_ext < + #include +@@ -10670,7 +10549,7 @@ int main() { + #endif + ; return 0; } + EOF +-if { (eval echo configure:10674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + MOZ_SYSTEM_ZLIB=1 + else +@@ -10716,7 +10595,7 @@ if test -z "$BZ2_DIR" -o "$BZ2_DIR" = no; then + MOZ_SYSTEM_BZ2= + else + echo $ac_n "checking for BZ2_bzread in -lbz2""... $ac_c" 1>&6 +-echo "configure:10720: checking for BZ2_bzread in -lbz2" >&5 ++echo "configure:10599: checking for BZ2_bzread in -lbz2" >&5 + ac_lib_var=`echo bz2'_'BZ2_bzread | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -10724,7 +10603,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lbz2 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -10784,7 +10663,7 @@ if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then + MOZ_SYSTEM_PNG= + else + echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 +-echo "configure:10788: checking for png_get_valid in -lpng" >&5 ++echo "configure:10667: checking for png_get_valid in -lpng" >&5 + ac_lib_var=`echo png'_'png_get_valid | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -10792,7 +10671,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lpng $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -10825,7 +10704,7 @@ else + fi + + echo $ac_n "checking for png_get_acTL in -lpng""... $ac_c" 1>&6 +-echo "configure:10829: checking for png_get_acTL in -lpng" >&5 ++echo "configure:10708: checking for png_get_acTL in -lpng" >&5 + ac_lib_var=`echo png'_'png_get_acTL | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -10833,7 +10712,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lpng $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -10878,7 +10757,7 @@ fi + fi + if test "$MOZ_SYSTEM_PNG" = 1; then + cat > conftest.$ac_ext < + #include +@@ -10892,7 +10771,7 @@ int main() { + #endif + ; return 0; } + EOF +-if { (eval echo configure:10896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + MOZ_SYSTEM_PNG=1 + else +@@ -11025,7 +10904,7 @@ fi + + # Allow the application to influence configure with a confvars.sh script. + echo $ac_n "checking if app-specific confvars.sh exists""... $ac_c" 1>&6 +-echo "configure:11029: checking if app-specific confvars.sh exists" >&5 ++echo "configure:10908: checking if app-specific confvars.sh exists" >&5 + if test -f "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" ; then + echo "$ac_t""${srcdir}/${MOZ_BUILD_APP}/confvars.sh" 1>&6 + . "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" +@@ -11190,7 +11069,7 @@ case "$target" in + + android_target_sdk=23 + echo $ac_n "checking for Android SDK platform version $android_target_sdk""... $ac_c" 1>&6 +-echo "configure:11194: checking for Android SDK platform version $android_target_sdk" >&5 ++echo "configure:11073: checking for Android SDK platform version $android_target_sdk" >&5 + android_sdk=$android_sdk_root/platforms/android-$android_target_sdk + if ! test -e "$android_sdk/source.properties" ; then + { echo "configure: error: You must download Android SDK platform version $android_target_sdk. Try |mach bootstrap|. (Looked for $android_sdk)" 1>&2; echo "configure: error: You must download Android SDK platform version $android_target_sdk. Try |mach bootstrap|. (Looked for $android_sdk)" 1>&5; exit 1; } +@@ -11198,7 +11077,7 @@ echo "configure:11194: checking for Android SDK platform version $android_target + echo "$ac_t""$android_sdk" 1>&6 + + echo $ac_n "checking for Android build-tools""... $ac_c" 1>&6 +-echo "configure:11202: checking for Android build-tools" >&5 ++echo "configure:11081: checking for Android build-tools" >&5 + android_build_tools_base="$android_sdk_root"/build-tools + android_build_tools_version="" + for version in 23.0.3 23.0.1; do +@@ -11217,7 +11096,7 @@ echo "configure:11202: checking for Android build-tools" >&5 + # Extract the first word of "zipalign", so it can be a program name with args. + set dummy zipalign; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:11221: checking for $ac_word" >&5 ++echo "configure:11100: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ZIPALIGN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11266,7 +11145,7 @@ fi + # Extract the first word of "dx", so it can be a program name with args. + set dummy dx; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:11270: checking for $ac_word" >&5 ++echo "configure:11149: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_DX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11315,7 +11194,7 @@ fi + # Extract the first word of "aapt", so it can be a program name with args. + set dummy aapt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:11319: checking for $ac_word" >&5 ++echo "configure:11198: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AAPT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11364,7 +11243,7 @@ fi + # Extract the first word of "aidl", so it can be a program name with args. + set dummy aidl; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:11368: checking for $ac_word" >&5 ++echo "configure:11247: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AIDL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11425,7 +11304,7 @@ fi + + android_platform_tools="$android_sdk_root"/platform-tools + echo $ac_n "checking for Android platform-tools""... $ac_c" 1>&6 +-echo "configure:11429: checking for Android platform-tools" >&5 ++echo "configure:11308: checking for Android platform-tools" >&5 + if test -d "$android_platform_tools" -a -f "$android_platform_tools/adb"; then + echo "$ac_t""$android_platform_tools" 1>&6 + else +@@ -11435,7 +11314,7 @@ echo "configure:11429: checking for Android platform-tools" >&5 + # Extract the first word of "adb", so it can be a program name with args. + set dummy adb; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:11439: checking for $ac_word" >&5 ++echo "configure:11318: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ADB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11487,7 +11366,7 @@ fi + + android_tools="$android_sdk_root"/tools + echo $ac_n "checking for Android tools""... $ac_c" 1>&6 +-echo "configure:11491: checking for Android tools" >&5 ++echo "configure:11370: checking for Android tools" >&5 + if test -d "$android_tools" -a -f "$android_tools/emulator"; then + echo "$ac_t""$android_tools" 1>&6 + else +@@ -11497,7 +11376,7 @@ echo "configure:11491: checking for Android tools" >&5 + # Extract the first word of "emulator", so it can be a program name with args. + set dummy emulator; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:11501: checking for $ac_word" >&5 ++echo "configure:11380: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_EMULATOR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11570,7 +11449,7 @@ EOF + + ANDROID_CUSTOMTABS_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/customtabs/$ANDROID_SUPPORT_LIBRARY_VERSION/customtabs-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for customtabs AAR""... $ac_c" 1>&6 +-echo "configure:11574: checking for customtabs AAR" >&5 ++echo "configure:11453: checking for customtabs AAR" >&5 + if ! test -e "$ANDROID_CUSTOMTABS_AAR" ; then + { echo "configure: error: You must download the customtabs AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_CUSTOMTABS_AAR)" 1>&2; echo "configure: error: You must download the customtabs AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_CUSTOMTABS_AAR)" 1>&5; exit 1; } + fi +@@ -11585,7 +11464,7 @@ echo "configure:11574: checking for customtabs AAR" >&5 + + + echo $ac_n "checking for ANDROID_CUSTOMTABS_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:11589: checking for ANDROID_CUSTOMTABS_AAR_LIB" >&5 ++echo "configure:11468: checking for ANDROID_CUSTOMTABS_AAR_LIB" >&5 + ANDROID_CUSTOMTABS_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/customtabs-$ANDROID_SUPPORT_LIBRARY_VERSION/customtabs-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_CUSTOMTABS_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_CUSTOMTABS_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_CUSTOMTABS_AAR_LIB!" 1>&5; exit 1; } +@@ -11597,7 +11476,7 @@ echo "configure:11589: checking for ANDROID_CUSTOMTABS_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_CUSTOMTABS_AAR_RES""... $ac_c" 1>&6 +-echo "configure:11601: checking for ANDROID_CUSTOMTABS_AAR_RES" >&5 ++echo "configure:11480: checking for ANDROID_CUSTOMTABS_AAR_RES" >&5 + ANDROID_CUSTOMTABS_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/customtabs-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_CUSTOMTABS_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_CUSTOMTABS_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_CUSTOMTABS_AAR_RES!" 1>&5; exit 1; } +@@ -11626,7 +11505,7 @@ echo "configure:11601: checking for ANDROID_CUSTOMTABS_AAR_RES" >&5 + + ANDROID_APPCOMPAT_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/appcompat-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/appcompat-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for appcompat-v7 AAR""... $ac_c" 1>&6 +-echo "configure:11630: checking for appcompat-v7 AAR" >&5 ++echo "configure:11509: checking for appcompat-v7 AAR" >&5 + if ! test -e "$ANDROID_APPCOMPAT_V7_AAR" ; then + { echo "configure: error: You must download the appcompat-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_APPCOMPAT_V7_AAR)" 1>&2; echo "configure: error: You must download the appcompat-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_APPCOMPAT_V7_AAR)" 1>&5; exit 1; } + fi +@@ -11641,7 +11520,7 @@ echo "configure:11630: checking for appcompat-v7 AAR" >&5 + + + echo $ac_n "checking for ANDROID_APPCOMPAT_V7_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:11645: checking for ANDROID_APPCOMPAT_V7_AAR_LIB" >&5 ++echo "configure:11524: checking for ANDROID_APPCOMPAT_V7_AAR_LIB" >&5 + ANDROID_APPCOMPAT_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/appcompat-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/appcompat-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_APPCOMPAT_V7_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_APPCOMPAT_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_APPCOMPAT_V7_AAR_LIB!" 1>&5; exit 1; } +@@ -11653,7 +11532,7 @@ echo "configure:11645: checking for ANDROID_APPCOMPAT_V7_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_APPCOMPAT_V7_AAR_RES""... $ac_c" 1>&6 +-echo "configure:11657: checking for ANDROID_APPCOMPAT_V7_AAR_RES" >&5 ++echo "configure:11536: checking for ANDROID_APPCOMPAT_V7_AAR_RES" >&5 + ANDROID_APPCOMPAT_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/appcompat-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_APPCOMPAT_V7_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_APPCOMPAT_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_APPCOMPAT_V7_AAR_RES!" 1>&5; exit 1; } +@@ -11682,7 +11561,7 @@ echo "configure:11657: checking for ANDROID_APPCOMPAT_V7_AAR_RES" >&5 + + ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/support-vector-drawable/$ANDROID_SUPPORT_LIBRARY_VERSION/support-vector-drawable-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for support-vector-drawable AAR""... $ac_c" 1>&6 +-echo "configure:11686: checking for support-vector-drawable AAR" >&5 ++echo "configure:11565: checking for support-vector-drawable AAR" >&5 + if ! test -e "$ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR" ; then + { echo "configure: error: You must download the support-vector-drawable AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR)" 1>&2; echo "configure: error: You must download the support-vector-drawable AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR)" 1>&5; exit 1; } + fi +@@ -11697,7 +11576,7 @@ echo "configure:11686: checking for support-vector-drawable AAR" >&5 + + + echo $ac_n "checking for ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:11701: checking for ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB" >&5 ++echo "configure:11580: checking for ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB" >&5 + ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/support-vector-drawable-$ANDROID_SUPPORT_LIBRARY_VERSION/support-vector-drawable-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB!" 1>&5; exit 1; } +@@ -11709,7 +11588,7 @@ echo "configure:11701: checking for ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_RES""... $ac_c" 1>&6 +-echo "configure:11713: checking for ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_RES" >&5 ++echo "configure:11592: checking for ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_RES" >&5 + ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/support-vector-drawable-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_RES!" 1>&5; exit 1; } +@@ -11738,7 +11617,7 @@ echo "configure:11713: checking for ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_RES" >&5 + + ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/animated-vector-drawable/$ANDROID_SUPPORT_LIBRARY_VERSION/animated-vector-drawable-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for animated-vector-drawable AAR""... $ac_c" 1>&6 +-echo "configure:11742: checking for animated-vector-drawable AAR" >&5 ++echo "configure:11621: checking for animated-vector-drawable AAR" >&5 + if ! test -e "$ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR" ; then + { echo "configure: error: You must download the animated-vector-drawable AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR)" 1>&2; echo "configure: error: You must download the animated-vector-drawable AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR)" 1>&5; exit 1; } + fi +@@ -11753,7 +11632,7 @@ echo "configure:11742: checking for animated-vector-drawable AAR" >&5 + + + echo $ac_n "checking for ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:11757: checking for ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB" >&5 ++echo "configure:11636: checking for ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB" >&5 + ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/animated-vector-drawable-$ANDROID_SUPPORT_LIBRARY_VERSION/animated-vector-drawable-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB!" 1>&5; exit 1; } +@@ -11765,7 +11644,7 @@ echo "configure:11757: checking for ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB" >& + + + echo $ac_n "checking for ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_RES""... $ac_c" 1>&6 +-echo "configure:11769: checking for ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_RES" >&5 ++echo "configure:11648: checking for ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_RES" >&5 + ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/animated-vector-drawable-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_RES!" 1>&5; exit 1; } +@@ -11794,7 +11673,7 @@ echo "configure:11769: checking for ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_RES" >& + + ANDROID_CARDVIEW_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/cardview-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/cardview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for cardview-v7 AAR""... $ac_c" 1>&6 +-echo "configure:11798: checking for cardview-v7 AAR" >&5 ++echo "configure:11677: checking for cardview-v7 AAR" >&5 + if ! test -e "$ANDROID_CARDVIEW_V7_AAR" ; then + { echo "configure: error: You must download the cardview-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_CARDVIEW_V7_AAR)" 1>&2; echo "configure: error: You must download the cardview-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_CARDVIEW_V7_AAR)" 1>&5; exit 1; } + fi +@@ -11809,7 +11688,7 @@ echo "configure:11798: checking for cardview-v7 AAR" >&5 + + + echo $ac_n "checking for ANDROID_CARDVIEW_V7_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:11813: checking for ANDROID_CARDVIEW_V7_AAR_LIB" >&5 ++echo "configure:11692: checking for ANDROID_CARDVIEW_V7_AAR_LIB" >&5 + ANDROID_CARDVIEW_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/cardview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/cardview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_CARDVIEW_V7_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_CARDVIEW_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_CARDVIEW_V7_AAR_LIB!" 1>&5; exit 1; } +@@ -11821,7 +11700,7 @@ echo "configure:11813: checking for ANDROID_CARDVIEW_V7_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_CARDVIEW_V7_AAR_RES""... $ac_c" 1>&6 +-echo "configure:11825: checking for ANDROID_CARDVIEW_V7_AAR_RES" >&5 ++echo "configure:11704: checking for ANDROID_CARDVIEW_V7_AAR_RES" >&5 + ANDROID_CARDVIEW_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/cardview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_CARDVIEW_V7_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_CARDVIEW_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_CARDVIEW_V7_AAR_RES!" 1>&5; exit 1; } +@@ -11850,7 +11729,7 @@ echo "configure:11825: checking for ANDROID_CARDVIEW_V7_AAR_RES" >&5 + + ANDROID_DESIGN_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/design/$ANDROID_SUPPORT_LIBRARY_VERSION/design-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for design AAR""... $ac_c" 1>&6 +-echo "configure:11854: checking for design AAR" >&5 ++echo "configure:11733: checking for design AAR" >&5 + if ! test -e "$ANDROID_DESIGN_AAR" ; then + { echo "configure: error: You must download the design AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_DESIGN_AAR)" 1>&2; echo "configure: error: You must download the design AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_DESIGN_AAR)" 1>&5; exit 1; } + fi +@@ -11865,7 +11744,7 @@ echo "configure:11854: checking for design AAR" >&5 + + + echo $ac_n "checking for ANDROID_DESIGN_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:11869: checking for ANDROID_DESIGN_AAR_LIB" >&5 ++echo "configure:11748: checking for ANDROID_DESIGN_AAR_LIB" >&5 + ANDROID_DESIGN_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/design-$ANDROID_SUPPORT_LIBRARY_VERSION/design-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_DESIGN_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_DESIGN_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_DESIGN_AAR_LIB!" 1>&5; exit 1; } +@@ -11877,7 +11756,7 @@ echo "configure:11869: checking for ANDROID_DESIGN_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_DESIGN_AAR_RES""... $ac_c" 1>&6 +-echo "configure:11881: checking for ANDROID_DESIGN_AAR_RES" >&5 ++echo "configure:11760: checking for ANDROID_DESIGN_AAR_RES" >&5 + ANDROID_DESIGN_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/design-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_DESIGN_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_DESIGN_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_DESIGN_AAR_RES!" 1>&5; exit 1; } +@@ -11906,7 +11785,7 @@ echo "configure:11881: checking for ANDROID_DESIGN_AAR_RES" >&5 + + ANDROID_RECYCLERVIEW_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/recyclerview-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/recyclerview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for recyclerview-v7 AAR""... $ac_c" 1>&6 +-echo "configure:11910: checking for recyclerview-v7 AAR" >&5 ++echo "configure:11789: checking for recyclerview-v7 AAR" >&5 + if ! test -e "$ANDROID_RECYCLERVIEW_V7_AAR" ; then + { echo "configure: error: You must download the recyclerview-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_RECYCLERVIEW_V7_AAR)" 1>&2; echo "configure: error: You must download the recyclerview-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_RECYCLERVIEW_V7_AAR)" 1>&5; exit 1; } + fi +@@ -11921,7 +11800,7 @@ echo "configure:11910: checking for recyclerview-v7 AAR" >&5 + + + echo $ac_n "checking for ANDROID_RECYCLERVIEW_V7_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:11925: checking for ANDROID_RECYCLERVIEW_V7_AAR_LIB" >&5 ++echo "configure:11804: checking for ANDROID_RECYCLERVIEW_V7_AAR_LIB" >&5 + ANDROID_RECYCLERVIEW_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/recyclerview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/recyclerview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_RECYCLERVIEW_V7_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_RECYCLERVIEW_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_RECYCLERVIEW_V7_AAR_LIB!" 1>&5; exit 1; } +@@ -11933,7 +11812,7 @@ echo "configure:11925: checking for ANDROID_RECYCLERVIEW_V7_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_RECYCLERVIEW_V7_AAR_RES""... $ac_c" 1>&6 +-echo "configure:11937: checking for ANDROID_RECYCLERVIEW_V7_AAR_RES" >&5 ++echo "configure:11816: checking for ANDROID_RECYCLERVIEW_V7_AAR_RES" >&5 + ANDROID_RECYCLERVIEW_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/recyclerview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_RECYCLERVIEW_V7_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_RECYCLERVIEW_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_RECYCLERVIEW_V7_AAR_RES!" 1>&5; exit 1; } +@@ -11962,7 +11841,7 @@ echo "configure:11937: checking for ANDROID_RECYCLERVIEW_V7_AAR_RES" >&5 + + ANDROID_SUPPORT_V4_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/support-v4/$ANDROID_SUPPORT_LIBRARY_VERSION/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for support-v4 AAR""... $ac_c" 1>&6 +-echo "configure:11966: checking for support-v4 AAR" >&5 ++echo "configure:11845: checking for support-v4 AAR" >&5 + if ! test -e "$ANDROID_SUPPORT_V4_AAR" ; then + { echo "configure: error: You must download the support-v4 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_SUPPORT_V4_AAR)" 1>&2; echo "configure: error: You must download the support-v4 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_SUPPORT_V4_AAR)" 1>&5; exit 1; } + fi +@@ -11977,7 +11856,7 @@ echo "configure:11966: checking for support-v4 AAR" >&5 + + + echo $ac_n "checking for ANDROID_SUPPORT_V4_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:11981: checking for ANDROID_SUPPORT_V4_AAR_LIB" >&5 ++echo "configure:11860: checking for ANDROID_SUPPORT_V4_AAR_LIB" >&5 + ANDROID_SUPPORT_V4_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_SUPPORT_V4_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_LIB!" 1>&5; exit 1; } +@@ -11989,7 +11868,7 @@ echo "configure:11981: checking for ANDROID_SUPPORT_V4_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_SUPPORT_V4_AAR_RES""... $ac_c" 1>&6 +-echo "configure:11993: checking for ANDROID_SUPPORT_V4_AAR_RES" >&5 ++echo "configure:11872: checking for ANDROID_SUPPORT_V4_AAR_RES" >&5 + ANDROID_SUPPORT_V4_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_SUPPORT_V4_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_RES!" 1>&5; exit 1; } +@@ -12001,7 +11880,7 @@ echo "configure:11993: checking for ANDROID_SUPPORT_V4_AAR_RES" >&5 + + + echo $ac_n "checking for ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB""... $ac_c" 1>&6 +-echo "configure:12005: checking for ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB" >&5 ++echo "configure:11884: checking for ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB" >&5 + ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION/libs/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION-internal_impl-$ANDROID_SUPPORT_LIBRARY_VERSION.jar" + if ! test -e "$ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB!" 1>&5; exit 1; } +@@ -12023,7 +11902,7 @@ echo "configure:12005: checking for ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB" >&5 + + ANDROID_PALETTE_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/palette-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/palette-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for palette-v7 AAR""... $ac_c" 1>&6 +-echo "configure:12027: checking for palette-v7 AAR" >&5 ++echo "configure:11906: checking for palette-v7 AAR" >&5 + if ! test -e "$ANDROID_PALETTE_V7_AAR" ; then + { echo "configure: error: You must download the palette-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PALETTE_V7_AAR)" 1>&2; echo "configure: error: You must download the palette-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PALETTE_V7_AAR)" 1>&5; exit 1; } + fi +@@ -12038,7 +11917,7 @@ echo "configure:12027: checking for palette-v7 AAR" >&5 + + + echo $ac_n "checking for ANDROID_PALETTE_V7_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12042: checking for ANDROID_PALETTE_V7_AAR_LIB" >&5 ++echo "configure:11921: checking for ANDROID_PALETTE_V7_AAR_LIB" >&5 + ANDROID_PALETTE_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/palette-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/palette-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_PALETTE_V7_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PALETTE_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PALETTE_V7_AAR_LIB!" 1>&5; exit 1; } +@@ -12050,7 +11929,7 @@ echo "configure:12042: checking for ANDROID_PALETTE_V7_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PALETTE_V7_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12054: checking for ANDROID_PALETTE_V7_AAR_RES" >&5 ++echo "configure:11933: checking for ANDROID_PALETTE_V7_AAR_RES" >&5 + ANDROID_PALETTE_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/palette-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_PALETTE_V7_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PALETTE_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PALETTE_V7_AAR_RES!" 1>&5; exit 1; } +@@ -12077,7 +11956,7 @@ echo "configure:12054: checking for ANDROID_PALETTE_V7_AAR_RES" >&5 + + ANDROID_SUPPORT_ANNOTATIONS_JAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/support-annotations/$ANDROID_SUPPORT_LIBRARY_VERSION/support-annotations-$ANDROID_SUPPORT_LIBRARY_VERSION.jar" + echo $ac_n "checking for support-annotations JAR""... $ac_c" 1>&6 +-echo "configure:12081: checking for support-annotations JAR" >&5 ++echo "configure:11960: checking for support-annotations JAR" >&5 + if ! test -e $ANDROID_SUPPORT_ANNOTATIONS_JAR ; then + { echo "configure: error: You must download the support-annotations lib. Run the Android SDK tool and install the Android Support Repository under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_SUPPORT_ANNOTATIONS_JAR)" 1>&2; echo "configure: error: You must download the support-annotations lib. Run the Android SDK tool and install the Android Support Repository under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_SUPPORT_ANNOTATIONS_JAR)" 1>&5; exit 1; } + fi +@@ -12187,19 +12066,19 @@ if test "$COMPILE_ENVIRONMENT"; then + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES""... $ac_c" 1>&6 +-echo "configure:12191: checking for gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES" >&5 ++echo "configure:12070: checking for gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES" >&5 + + if $PKG_CONFIG --exists "gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_GTK3_CFLAGS""... $ac_c" 1>&6 +-echo "configure:12198: checking MOZ_GTK3_CFLAGS" >&5 ++echo "configure:12077: checking MOZ_GTK3_CFLAGS" >&5 + MOZ_GTK3_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES"` + echo "$ac_t""$MOZ_GTK3_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_GTK3_LIBS""... $ac_c" 1>&6 +-echo "configure:12203: checking MOZ_GTK3_LIBS" >&5 ++echo "configure:12082: checking MOZ_GTK3_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_GTK3_LIBS="`$PKG_CONFIG --libs \"gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_GTK3_LIBS" 1>&6 +@@ -12262,59 +12141,6 @@ cat >> confdefs.h <= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES""... $ac_c" 1>&6 +-echo "configure:12277: checking for gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-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 $GDK_PACKAGES" ; then +- echo "$ac_t""yes" 1>&6 +- succeeded=yes +- +- echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6 +-echo "configure:12284: 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 $GDK_PACKAGES"` +- echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6 +- +- echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6 +-echo "configure:12289: 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 $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 $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 $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 $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 + if test "$MOZ_WIDGET_TOOLKIT" = gtk2; then + TK_CFLAGS=$MOZ_GTK2_CFLAGS +@@ -12354,19 +12180,19 @@ fi + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION""... $ac_c" 1>&6 +-echo "configure:12358: checking for libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" >&5 ++echo "configure:12184: checking for libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" >&5 + + if $PKG_CONFIG --exists "libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_STARTUP_NOTIFICATION_CFLAGS""... $ac_c" 1>&6 +-echo "configure:12365: checking MOZ_STARTUP_NOTIFICATION_CFLAGS" >&5 ++echo "configure:12191: checking MOZ_STARTUP_NOTIFICATION_CFLAGS" >&5 + MOZ_STARTUP_NOTIFICATION_CFLAGS=`$PKG_CONFIG --cflags "libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION"` + echo "$ac_t""$MOZ_STARTUP_NOTIFICATION_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_STARTUP_NOTIFICATION_LIBS""... $ac_c" 1>&6 +-echo "configure:12370: checking MOZ_STARTUP_NOTIFICATION_LIBS" >&5 ++echo "configure:12196: checking MOZ_STARTUP_NOTIFICATION_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_STARTUP_NOTIFICATION_LIBS="`$PKG_CONFIG --libs \"libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_STARTUP_NOTIFICATION_LIBS" 1>&6 +@@ -12502,7 +12328,7 @@ if test -n "$MOZ_NATIVE_DEVICES" ; then + + ANDROID_PLAY_SERVICES_BASE_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-base/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-base AAR""... $ac_c" 1>&6 +-echo "configure:12506: checking for play-services-base AAR" >&5 ++echo "configure:12332: checking for play-services-base AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR" ; then + { echo "configure: error: You must download the play-services-base AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASE_AAR)" 1>&2; echo "configure: error: You must download the play-services-base AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASE_AAR)" 1>&5; exit 1; } + fi +@@ -12517,7 +12343,7 @@ echo "configure:12506: checking for play-services-base AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12521: checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB" >&5 ++echo "configure:12347: checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_BASE_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_LIB!" 1>&5; exit 1; } +@@ -12529,7 +12355,7 @@ echo "configure:12521: checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12533: checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES" >&5 ++echo "configure:12359: checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_BASE_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_RES!" 1>&5; exit 1; } +@@ -12558,7 +12384,7 @@ echo "configure:12533: checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES" >&5 + + ANDROID_PLAY_SERVICES_BASEMENT_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-basement/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-basement AAR""... $ac_c" 1>&6 +-echo "configure:12562: checking for play-services-basement AAR" >&5 ++echo "configure:12388: checking for play-services-basement AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR" ; then + { echo "configure: error: You must download the play-services-basement AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&2; echo "configure: error: You must download the play-services-basement AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&5; exit 1; } + fi +@@ -12573,7 +12399,7 @@ echo "configure:12562: checking for play-services-basement AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12577: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 ++echo "configure:12403: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&5; exit 1; } +@@ -12585,7 +12411,7 @@ echo "configure:12577: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12589: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5 ++echo "configure:12415: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&5; exit 1; } +@@ -12614,7 +12440,7 @@ echo "configure:12589: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5 + + ANDROID_PLAY_SERVICES_CAST_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-cast/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-cast-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-cast AAR""... $ac_c" 1>&6 +-echo "configure:12618: checking for play-services-cast AAR" >&5 ++echo "configure:12444: checking for play-services-cast AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_CAST_AAR" ; then + { echo "configure: error: You must download the play-services-cast AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_CAST_AAR)" 1>&2; echo "configure: error: You must download the play-services-cast AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_CAST_AAR)" 1>&5; exit 1; } + fi +@@ -12629,7 +12455,7 @@ echo "configure:12618: checking for play-services-cast AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_CAST_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12633: checking for ANDROID_PLAY_SERVICES_CAST_AAR_LIB" >&5 ++echo "configure:12459: checking for ANDROID_PLAY_SERVICES_CAST_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_CAST_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-cast-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-cast-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_CAST_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_CAST_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_CAST_AAR_LIB!" 1>&5; exit 1; } +@@ -12641,7 +12467,7 @@ echo "configure:12633: checking for ANDROID_PLAY_SERVICES_CAST_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_CAST_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12645: checking for ANDROID_PLAY_SERVICES_CAST_AAR_RES" >&5 ++echo "configure:12471: checking for ANDROID_PLAY_SERVICES_CAST_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_CAST_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-cast-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_CAST_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_CAST_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_CAST_AAR_RES!" 1>&5; exit 1; } +@@ -12670,7 +12496,7 @@ echo "configure:12645: checking for ANDROID_PLAY_SERVICES_CAST_AAR_RES" >&5 + + ANDROID_MEDIAROUTER_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/mediarouter-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar" + echo $ac_n "checking for mediarouter-v7 AAR""... $ac_c" 1>&6 +-echo "configure:12674: checking for mediarouter-v7 AAR" >&5 ++echo "configure:12500: checking for mediarouter-v7 AAR" >&5 + if ! test -e "$ANDROID_MEDIAROUTER_V7_AAR" ; then + { echo "configure: error: You must download the mediarouter-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_MEDIAROUTER_V7_AAR)" 1>&2; echo "configure: error: You must download the mediarouter-v7 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_MEDIAROUTER_V7_AAR)" 1>&5; exit 1; } + fi +@@ -12685,7 +12511,7 @@ echo "configure:12674: checking for mediarouter-v7 AAR" >&5 + + + echo $ac_n "checking for ANDROID_MEDIAROUTER_V7_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12689: checking for ANDROID_MEDIAROUTER_V7_AAR_LIB" >&5 ++echo "configure:12515: checking for ANDROID_MEDIAROUTER_V7_AAR_LIB" >&5 + ANDROID_MEDIAROUTER_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar" + if ! test -e "$ANDROID_MEDIAROUTER_V7_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_LIB!" 1>&5; exit 1; } +@@ -12697,7 +12523,7 @@ echo "configure:12689: checking for ANDROID_MEDIAROUTER_V7_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_MEDIAROUTER_V7_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12701: checking for ANDROID_MEDIAROUTER_V7_AAR_RES" >&5 ++echo "configure:12527: checking for ANDROID_MEDIAROUTER_V7_AAR_RES" >&5 + ANDROID_MEDIAROUTER_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res" + if ! test -e "$ANDROID_MEDIAROUTER_V7_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_RES!" 1>&5; exit 1; } +@@ -12709,7 +12535,7 @@ echo "configure:12701: checking for ANDROID_MEDIAROUTER_V7_AAR_RES" >&5 + + + echo $ac_n "checking for ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB""... $ac_c" 1>&6 +-echo "configure:12713: checking for ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB" >&5 ++echo "configure:12539: checking for ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB" >&5 + ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/libs/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-internal_impl-$ANDROID_SUPPORT_LIBRARY_VERSION.jar" + if ! test -e "$ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB!" 1>&5; exit 1; } +@@ -12737,7 +12563,7 @@ if test -n "$MOZ_ANDROID_GCM" ; then + + ANDROID_PLAY_SERVICES_BASE_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-base/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-base AAR""... $ac_c" 1>&6 +-echo "configure:12741: checking for play-services-base AAR" >&5 ++echo "configure:12567: checking for play-services-base AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR" ; then + { echo "configure: error: You must download the play-services-base AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASE_AAR)" 1>&2; echo "configure: error: You must download the play-services-base AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASE_AAR)" 1>&5; exit 1; } + fi +@@ -12752,7 +12578,7 @@ echo "configure:12741: checking for play-services-base AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12756: checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB" >&5 ++echo "configure:12582: checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_BASE_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_LIB!" 1>&5; exit 1; } +@@ -12764,7 +12590,7 @@ echo "configure:12756: checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12768: checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES" >&5 ++echo "configure:12594: checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_BASE_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_RES!" 1>&5; exit 1; } +@@ -12793,7 +12619,7 @@ echo "configure:12768: checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES" >&5 + + ANDROID_PLAY_SERVICES_BASEMENT_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-basement/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-basement AAR""... $ac_c" 1>&6 +-echo "configure:12797: checking for play-services-basement AAR" >&5 ++echo "configure:12623: checking for play-services-basement AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR" ; then + { echo "configure: error: You must download the play-services-basement AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&2; echo "configure: error: You must download the play-services-basement AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&5; exit 1; } + fi +@@ -12808,7 +12634,7 @@ echo "configure:12797: checking for play-services-basement AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12812: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 ++echo "configure:12638: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&5; exit 1; } +@@ -12820,7 +12646,7 @@ echo "configure:12812: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12824: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5 ++echo "configure:12650: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&5; exit 1; } +@@ -12849,7 +12675,7 @@ echo "configure:12824: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5 + + ANDROID_PLAY_SERVICES_GCM_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-gcm/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-gcm-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-gcm AAR""... $ac_c" 1>&6 +-echo "configure:12853: checking for play-services-gcm AAR" >&5 ++echo "configure:12679: checking for play-services-gcm AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_GCM_AAR" ; then + { echo "configure: error: You must download the play-services-gcm AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_GCM_AAR)" 1>&2; echo "configure: error: You must download the play-services-gcm AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_GCM_AAR)" 1>&5; exit 1; } + fi +@@ -12864,7 +12690,7 @@ echo "configure:12853: checking for play-services-gcm AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_GCM_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12868: checking for ANDROID_PLAY_SERVICES_GCM_AAR_LIB" >&5 ++echo "configure:12694: checking for ANDROID_PLAY_SERVICES_GCM_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_GCM_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-gcm-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-gcm-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_GCM_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_GCM_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_GCM_AAR_LIB!" 1>&5; exit 1; } +@@ -12876,7 +12702,7 @@ echo "configure:12868: checking for ANDROID_PLAY_SERVICES_GCM_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_GCM_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12880: checking for ANDROID_PLAY_SERVICES_GCM_AAR_RES" >&5 ++echo "configure:12706: checking for ANDROID_PLAY_SERVICES_GCM_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_GCM_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-gcm-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_GCM_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_GCM_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_GCM_AAR_RES!" 1>&5; exit 1; } +@@ -12905,7 +12731,7 @@ echo "configure:12880: checking for ANDROID_PLAY_SERVICES_GCM_AAR_RES" >&5 + + ANDROID_PLAY_SERVICES_MEASUREMENT_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-measurement/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-measurement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-measurement AAR""... $ac_c" 1>&6 +-echo "configure:12909: checking for play-services-measurement AAR" >&5 ++echo "configure:12735: checking for play-services-measurement AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR" ; then + { echo "configure: error: You must download the play-services-measurement AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR)" 1>&2; echo "configure: error: You must download the play-services-measurement AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR)" 1>&5; exit 1; } + fi +@@ -12920,7 +12746,7 @@ echo "configure:12909: checking for play-services-measurement AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12924: checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB" >&5 ++echo "configure:12750: checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-measurement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-measurement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB!" 1>&5; exit 1; } +@@ -12932,7 +12758,7 @@ echo "configure:12924: checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB" > + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12936: checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES" >&5 ++echo "configure:12762: checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-measurement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES!" 1>&5; exit 1; } +@@ -12968,7 +12794,7 @@ if test -n "$MOZ_INSTALL_TRACKING"; then + + ANDROID_PLAY_SERVICES_ADS_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-ads/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-ads-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-ads AAR""... $ac_c" 1>&6 +-echo "configure:12972: checking for play-services-ads AAR" >&5 ++echo "configure:12798: checking for play-services-ads AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_ADS_AAR" ; then + { echo "configure: error: You must download the play-services-ads AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_ADS_AAR)" 1>&2; echo "configure: error: You must download the play-services-ads AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_ADS_AAR)" 1>&5; exit 1; } + fi +@@ -12983,7 +12809,7 @@ echo "configure:12972: checking for play-services-ads AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_ADS_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:12987: checking for ANDROID_PLAY_SERVICES_ADS_AAR_LIB" >&5 ++echo "configure:12813: checking for ANDROID_PLAY_SERVICES_ADS_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_ADS_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-ads-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-ads-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_ADS_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_ADS_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_ADS_AAR_LIB!" 1>&5; exit 1; } +@@ -12995,7 +12821,7 @@ echo "configure:12987: checking for ANDROID_PLAY_SERVICES_ADS_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_ADS_AAR_RES""... $ac_c" 1>&6 +-echo "configure:12999: checking for ANDROID_PLAY_SERVICES_ADS_AAR_RES" >&5 ++echo "configure:12825: checking for ANDROID_PLAY_SERVICES_ADS_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_ADS_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-ads-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_ADS_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_ADS_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_ADS_AAR_RES!" 1>&5; exit 1; } +@@ -13024,7 +12850,7 @@ echo "configure:12999: checking for ANDROID_PLAY_SERVICES_ADS_AAR_RES" >&5 + + ANDROID_PLAY_SERVICES_BASEMENT_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-basement/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar" + echo $ac_n "checking for play-services-basement AAR""... $ac_c" 1>&6 +-echo "configure:13028: checking for play-services-basement AAR" >&5 ++echo "configure:12854: checking for play-services-basement AAR" >&5 + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR" ; then + { echo "configure: error: You must download the play-services-basement AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&2; echo "configure: error: You must download the play-services-basement AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&5; exit 1; } + fi +@@ -13039,7 +12865,7 @@ echo "configure:13028: checking for play-services-basement AAR" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB""... $ac_c" 1>&6 +-echo "configure:13043: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 ++echo "configure:12869: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 + ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar" + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&5; exit 1; } +@@ -13051,7 +12877,7 @@ echo "configure:13043: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5 + + + echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES""... $ac_c" 1>&6 +-echo "configure:13055: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5 ++echo "configure:12881: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5 + ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res" + if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" ; then + { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&5; exit 1; } +@@ -13117,19 +12943,19 @@ fi + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for gtk+-2.0 >= 2.14""... $ac_c" 1>&6 +-echo "configure:13121: checking for gtk+-2.0 >= 2.14" >&5 ++echo "configure:12947: checking for gtk+-2.0 >= 2.14" >&5 + + if $PKG_CONFIG --exists "gtk+-2.0 >= 2.14" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking _GTKCHECK_CFLAGS""... $ac_c" 1>&6 +-echo "configure:13128: checking _GTKCHECK_CFLAGS" >&5 ++echo "configure:12954: checking _GTKCHECK_CFLAGS" >&5 + _GTKCHECK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.14"` + echo "$ac_t""$_GTKCHECK_CFLAGS" 1>&6 + + echo $ac_n "checking _GTKCHECK_LIBS""... $ac_c" 1>&6 +-echo "configure:13133: checking _GTKCHECK_LIBS" >&5 ++echo "configure:12959: checking _GTKCHECK_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + _GTKCHECK_LIBS="`$PKG_CONFIG --libs \"gtk+-2.0 >= 2.14\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$_GTKCHECK_LIBS" 1>&6 +@@ -13170,19 +12996,19 @@ echo "configure:13133: checking _GTKCHECK_LIBS" >&5 + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for gio-2.0 >= $GIO_VERSION""... $ac_c" 1>&6 +-echo "configure:13174: checking for gio-2.0 >= $GIO_VERSION" >&5 ++echo "configure:13000: checking for gio-2.0 >= $GIO_VERSION" >&5 + + if $PKG_CONFIG --exists "gio-2.0 >= $GIO_VERSION" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_GIO_CFLAGS""... $ac_c" 1>&6 +-echo "configure:13181: checking MOZ_GIO_CFLAGS" >&5 ++echo "configure:13007: checking MOZ_GIO_CFLAGS" >&5 + MOZ_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= $GIO_VERSION"` + echo "$ac_t""$MOZ_GIO_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_GIO_LIBS""... $ac_c" 1>&6 +-echo "configure:13186: checking MOZ_GIO_LIBS" >&5 ++echo "configure:13012: checking MOZ_GIO_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_GIO_LIBS="`$PKG_CONFIG --libs \"gio-2.0 >= $GIO_VERSION\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_GIO_LIBS" 1>&6 +@@ -13257,19 +13083,19 @@ fi + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for gconf-2.0 >= $GCONF_VERSION gobject-2.0 ""... $ac_c" 1>&6 +-echo "configure:13261: checking for gconf-2.0 >= $GCONF_VERSION gobject-2.0 " >&5 ++echo "configure:13087: checking for gconf-2.0 >= $GCONF_VERSION gobject-2.0 " >&5 + + if $PKG_CONFIG --exists "gconf-2.0 >= $GCONF_VERSION gobject-2.0 " ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_GCONF_CFLAGS""... $ac_c" 1>&6 +-echo "configure:13268: checking MOZ_GCONF_CFLAGS" >&5 ++echo "configure:13094: checking MOZ_GCONF_CFLAGS" >&5 + MOZ_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= $GCONF_VERSION gobject-2.0 "` + echo "$ac_t""$MOZ_GCONF_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_GCONF_LIBS""... $ac_c" 1>&6 +-echo "configure:13273: checking MOZ_GCONF_LIBS" >&5 ++echo "configure:13099: checking MOZ_GCONF_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_GCONF_LIBS="`$PKG_CONFIG --libs \"gconf-2.0 >= $GCONF_VERSION gobject-2.0 \" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_GCONF_LIBS" 1>&6 +@@ -13354,19 +13180,19 @@ fi + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for libproxy-1.0""... $ac_c" 1>&6 +-echo "configure:13358: checking for libproxy-1.0" >&5 ++echo "configure:13184: checking for libproxy-1.0" >&5 + + if $PKG_CONFIG --exists "libproxy-1.0" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_LIBPROXY_CFLAGS""... $ac_c" 1>&6 +-echo "configure:13365: checking MOZ_LIBPROXY_CFLAGS" >&5 ++echo "configure:13191: checking MOZ_LIBPROXY_CFLAGS" >&5 + MOZ_LIBPROXY_CFLAGS=`$PKG_CONFIG --cflags "libproxy-1.0"` + echo "$ac_t""$MOZ_LIBPROXY_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_LIBPROXY_LIBS""... $ac_c" 1>&6 +-echo "configure:13370: checking MOZ_LIBPROXY_LIBS" >&5 ++echo "configure:13196: checking MOZ_LIBPROXY_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_LIBPROXY_LIBS="`$PKG_CONFIG --libs \"libproxy-1.0\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_LIBPROXY_LIBS" 1>&6 +@@ -13435,19 +13261,19 @@ fi + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for libgnomeui-2.0 >= $GNOMEUI_VERSION""... $ac_c" 1>&6 +-echo "configure:13439: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5 ++echo "configure:13265: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5 + + if $PKG_CONFIG --exists "libgnomeui-2.0 >= $GNOMEUI_VERSION" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_GNOMEUI_CFLAGS""... $ac_c" 1>&6 +-echo "configure:13446: checking MOZ_GNOMEUI_CFLAGS" >&5 ++echo "configure:13272: checking MOZ_GNOMEUI_CFLAGS" >&5 + MOZ_GNOMEUI_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 >= $GNOMEUI_VERSION"` + echo "$ac_t""$MOZ_GNOMEUI_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_GNOMEUI_LIBS""... $ac_c" 1>&6 +-echo "configure:13451: checking MOZ_GNOMEUI_LIBS" >&5 ++echo "configure:13277: checking MOZ_GNOMEUI_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_GNOMEUI_LIBS="`$PKG_CONFIG --libs \"libgnomeui-2.0 >= $GNOMEUI_VERSION\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_GNOMEUI_LIBS" 1>&6 +@@ -13530,19 +13356,19 @@ fi + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for dbus-1 >= $DBUS_VERSION""... $ac_c" 1>&6 +-echo "configure:13534: checking for dbus-1 >= $DBUS_VERSION" >&5 ++echo "configure:13360: checking for dbus-1 >= $DBUS_VERSION" >&5 + + if $PKG_CONFIG --exists "dbus-1 >= $DBUS_VERSION" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_DBUS_CFLAGS""... $ac_c" 1>&6 +-echo "configure:13541: checking MOZ_DBUS_CFLAGS" >&5 ++echo "configure:13367: checking MOZ_DBUS_CFLAGS" >&5 + MOZ_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= $DBUS_VERSION"` + echo "$ac_t""$MOZ_DBUS_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_DBUS_LIBS""... $ac_c" 1>&6 +-echo "configure:13546: checking MOZ_DBUS_LIBS" >&5 ++echo "configure:13372: checking MOZ_DBUS_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_DBUS_LIBS="`$PKG_CONFIG --libs \"dbus-1 >= $DBUS_VERSION\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_DBUS_LIBS" 1>&6 +@@ -13582,19 +13408,19 @@ echo "configure:13546: checking MOZ_DBUS_LIBS" >&5 + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for dbus-glib-1 >= $DBUS_VERSION""... $ac_c" 1>&6 +-echo "configure:13586: checking for dbus-glib-1 >= $DBUS_VERSION" >&5 ++echo "configure:13412: checking for dbus-glib-1 >= $DBUS_VERSION" >&5 + + if $PKG_CONFIG --exists "dbus-glib-1 >= $DBUS_VERSION" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_DBUS_GLIB_CFLAGS""... $ac_c" 1>&6 +-echo "configure:13593: checking MOZ_DBUS_GLIB_CFLAGS" >&5 ++echo "configure:13419: checking MOZ_DBUS_GLIB_CFLAGS" >&5 + MOZ_DBUS_GLIB_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= $DBUS_VERSION"` + echo "$ac_t""$MOZ_DBUS_GLIB_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_DBUS_GLIB_LIBS""... $ac_c" 1>&6 +-echo "configure:13598: checking MOZ_DBUS_GLIB_LIBS" >&5 ++echo "configure:13424: checking MOZ_DBUS_GLIB_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_DBUS_GLIB_LIBS="`$PKG_CONFIG --libs \"dbus-glib-1 >= $DBUS_VERSION\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_DBUS_GLIB_LIBS" 1>&6 +@@ -13697,14 +13523,14 @@ if test -n "$MOZ_WEBRTC"; then + fi + + cat > conftest.$ac_ext < + int main() { + struct ethtool_cmd cmd; cmd.speed_hi = 0; + ; return 0; } + EOF +-if { (eval echo configure:13708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:13534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI=1 + else +@@ -13790,7 +13616,7 @@ cat >> confdefs.h <<\EOF + EOF + + if test -n "$MOZ_X11"; then +- MOZ_WEBRTC_X11_LIBS="-lXext -lXdamage -lXfixes -lXcomposite" ++ MOZ_WEBRTC_X11_LIBS="" + fi + else + MOZ_SYNTH_PICO= +@@ -13883,17 +13709,17 @@ if test -n "$MOZ_APPLEMEDIA"; then + + ac_safe=`echo "CoreMedia/CoreMedia.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for CoreMedia/CoreMedia.h""... $ac_c" 1>&6 +-echo "configure:13887: checking for CoreMedia/CoreMedia.h" >&5 ++echo "configure:13713: checking for CoreMedia/CoreMedia.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:13897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:13723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -14043,19 +13869,19 @@ if test -n "$MOZ_SYSTEM_LIBVPX"; then + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for vpx >= 1.5.0""... $ac_c" 1>&6 +-echo "configure:14047: checking for vpx >= 1.5.0" >&5 ++echo "configure:13873: checking for vpx >= 1.5.0" >&5 + + if $PKG_CONFIG --exists "vpx >= 1.5.0" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_LIBVPX_CFLAGS""... $ac_c" 1>&6 +-echo "configure:14054: checking MOZ_LIBVPX_CFLAGS" >&5 ++echo "configure:13880: checking MOZ_LIBVPX_CFLAGS" >&5 + MOZ_LIBVPX_CFLAGS=`$PKG_CONFIG --cflags "vpx >= 1.5.0"` + echo "$ac_t""$MOZ_LIBVPX_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_LIBVPX_LIBS""... $ac_c" 1>&6 +-echo "configure:14059: checking MOZ_LIBVPX_LIBS" >&5 ++echo "configure:13885: checking MOZ_LIBVPX_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_LIBVPX_LIBS="`$PKG_CONFIG --libs \"vpx >= 1.5.0\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_LIBVPX_LIBS" 1>&6 +@@ -14090,12 +13916,12 @@ echo "configure:14059: checking MOZ_LIBVPX_LIBS" >&5 + + ac_safe=`echo "vpx/vpx_decoder.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for vpx/vpx_decoder.h""... $ac_c" 1>&6 +-echo "configure:14094: checking for vpx/vpx_decoder.h" >&5 ++echo "configure:13920: checking for vpx/vpx_decoder.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -14103,7 +13929,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:14107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:13933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -14125,7 +13951,7 @@ fi + + + echo $ac_n "checking for vpx_codec_dec_init_ver in -lvpx""... $ac_c" 1>&6 +-echo "configure:14129: checking for vpx_codec_dec_init_ver in -lvpx" >&5 ++echo "configure:13955: checking for vpx_codec_dec_init_ver in -lvpx" >&5 + ac_lib_var=`echo vpx'_'vpx_codec_dec_init_ver | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -14133,7 +13959,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lvpx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:13974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -14178,12 +14004,12 @@ fi + + ac_safe=`echo "vpx_mem/vpx_mem.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for vpx_mem/vpx_mem.h""... $ac_c" 1>&6 +-echo "configure:14182: checking for vpx_mem/vpx_mem.h" >&5 ++echo "configure:14008: checking for vpx_mem/vpx_mem.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -14191,7 +14017,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:14195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:14021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -14206,12 +14032,12 @@ fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for vpx_mem_set_functions""... $ac_c" 1>&6 +-echo "configure:14210: checking for vpx_mem_set_functions" >&5 ++echo "configure:14036: checking for vpx_mem_set_functions" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vpx_mem_set_functions'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vpx_mem_set_functions=yes" + else +@@ -14318,7 +14144,7 @@ if test -z "$MOZ_SYSTEM_LIBVPX"; then + VPX_AS_CONVERSION='$(PERL) $(topsrcdir)/media/libvpx/libvpx/build/make/ads2gas.pl' + VPX_ARM_ASM=1 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:14157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + VPX_ASFLAGS="$VPX_ASFLAGS -mfloat-abi=softfp" + +@@ -14450,19 +14276,19 @@ if test -n "$MOZ_ALSA"; then + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for alsa""... $ac_c" 1>&6 +-echo "configure:14454: checking for alsa" >&5 ++echo "configure:14280: checking for alsa" >&5 + + if $PKG_CONFIG --exists "alsa" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_ALSA_CFLAGS""... $ac_c" 1>&6 +-echo "configure:14461: checking MOZ_ALSA_CFLAGS" >&5 ++echo "configure:14287: checking MOZ_ALSA_CFLAGS" >&5 + MOZ_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa"` + echo "$ac_t""$MOZ_ALSA_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_ALSA_LIBS""... $ac_c" 1>&6 +-echo "configure:14466: checking MOZ_ALSA_LIBS" >&5 ++echo "configure:14292: checking MOZ_ALSA_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_ALSA_LIBS="`$PKG_CONFIG --libs \"alsa\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_ALSA_LIBS" 1>&6 +@@ -14538,19 +14364,19 @@ EOF + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for libpulse""... $ac_c" 1>&6 +-echo "configure:14542: checking for libpulse" >&5 ++echo "configure:14368: checking for libpulse" >&5 + + if $PKG_CONFIG --exists "libpulse" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_PULSEAUDIO_CFLAGS""... $ac_c" 1>&6 +-echo "configure:14549: checking MOZ_PULSEAUDIO_CFLAGS" >&5 ++echo "configure:14375: checking MOZ_PULSEAUDIO_CFLAGS" >&5 + MOZ_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse"` + echo "$ac_t""$MOZ_PULSEAUDIO_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_PULSEAUDIO_LIBS""... $ac_c" 1>&6 +-echo "configure:14554: checking MOZ_PULSEAUDIO_LIBS" >&5 ++echo "configure:14380: checking MOZ_PULSEAUDIO_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_PULSEAUDIO_LIBS="`$PKG_CONFIG --libs \"libpulse\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_PULSEAUDIO_LIBS" 1>&6 +@@ -14736,12 +14562,12 @@ if test -n "$MOZ_ANGLE_RENDERER"; then + if test -n "$GNU_CC"; then + ac_safe=`echo "d3d10.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for d3d10.h""... $ac_c" 1>&6 +-echo "configure:14740: checking for d3d10.h" >&5 ++echo "configure:14566: checking for d3d10.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -14749,7 +14575,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:14753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:14579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -14804,12 +14630,12 @@ WINNT) + Linux) + ac_safe=`echo "linux/joystick.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for linux/joystick.h""... $ac_c" 1>&6 +-echo "configure:14808: checking for linux/joystick.h" >&5 ++echo "configure:14634: checking for linux/joystick.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -14817,7 +14643,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:14821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:14647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -14913,19 +14739,19 @@ EOF + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for gthread-2.0""... $ac_c" 1>&6 +-echo "configure:14917: checking for gthread-2.0" >&5 ++echo "configure:14743: checking for gthread-2.0" >&5 + + if $PKG_CONFIG --exists "gthread-2.0" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_GTHREAD_CFLAGS""... $ac_c" 1>&6 +-echo "configure:14924: checking MOZ_GTHREAD_CFLAGS" >&5 ++echo "configure:14750: checking MOZ_GTHREAD_CFLAGS" >&5 + MOZ_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0"` + echo "$ac_t""$MOZ_GTHREAD_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_GTHREAD_LIBS""... $ac_c" 1>&6 +-echo "configure:14929: checking MOZ_GTHREAD_LIBS" >&5 ++echo "configure:14755: checking MOZ_GTHREAD_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_GTHREAD_LIBS="`$PKG_CONFIG --libs \"gthread-2.0\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_GTHREAD_LIBS" 1>&6 +@@ -15223,7 +15049,7 @@ do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:15227: checking for $ac_word" >&5 ++echo "configure:15053: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_WGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -15596,19 +15422,19 @@ then + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for sqlite3 >= $SQLITE_VERSION""... $ac_c" 1>&6 +-echo "configure:15600: checking for sqlite3 >= $SQLITE_VERSION" >&5 ++echo "configure:15426: checking for sqlite3 >= $SQLITE_VERSION" >&5 + + if $PKG_CONFIG --exists "sqlite3 >= $SQLITE_VERSION" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking SQLITE_CFLAGS""... $ac_c" 1>&6 +-echo "configure:15607: checking SQLITE_CFLAGS" >&5 ++echo "configure:15433: checking SQLITE_CFLAGS" >&5 + SQLITE_CFLAGS=`$PKG_CONFIG --cflags "sqlite3 >= $SQLITE_VERSION"` + echo "$ac_t""$SQLITE_CFLAGS" 1>&6 + + echo $ac_n "checking SQLITE_LIBS""... $ac_c" 1>&6 +-echo "configure:15612: checking SQLITE_LIBS" >&5 ++echo "configure:15438: checking SQLITE_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + SQLITE_LIBS="`$PKG_CONFIG --libs \"sqlite3 >= $SQLITE_VERSION\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$SQLITE_LIBS" 1>&6 +@@ -15639,7 +15465,7 @@ echo "configure:15612: checking SQLITE_LIBS" >&5 + + + echo $ac_n "checking for SQLITE_SECURE_DELETE support in system SQLite""... $ac_c" 1>&6 +-echo "configure:15643: checking for SQLITE_SECURE_DELETE support in system SQLite" >&5 ++echo "configure:15469: checking for SQLITE_SECURE_DELETE support in system SQLite" >&5 + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $SQLITE_CFLAGS" + _SAVE_LIBS="$LIBS" +@@ -15653,7 +15479,7 @@ else + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sqlite_secure_delete=yes + else +@@ -15685,7 +15511,7 @@ fi + fi + + echo $ac_n "checking for SQLITE_THREADSAFE support in system SQLite""... $ac_c" 1>&6 +-echo "configure:15689: checking for SQLITE_THREADSAFE support in system SQLite" >&5 ++echo "configure:15515: checking for SQLITE_THREADSAFE support in system SQLite" >&5 + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $SQLITE_CFLAGS" + _SAVE_LIBS="$LIBS" +@@ -15699,7 +15525,7 @@ else + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sqlite_threadsafe=yes + else +@@ -15731,7 +15557,7 @@ fi + fi + + echo $ac_n "checking for SQLITE_ENABLE_FTS3 support in system SQLite""... $ac_c" 1>&6 +-echo "configure:15735: checking for SQLITE_ENABLE_FTS3 support in system SQLite" >&5 ++echo "configure:15561: checking for SQLITE_ENABLE_FTS3 support in system SQLite" >&5 + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $SQLITE_CFLAGS" + _SAVE_LIBS="$LIBS" +@@ -15745,7 +15571,7 @@ else + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sqlite_enable_fts3=yes + else +@@ -15777,7 +15603,7 @@ fi + fi + + echo $ac_n "checking for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite""... $ac_c" 1>&6 +-echo "configure:15781: checking for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite" >&5 ++echo "configure:15607: checking for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite" >&5 + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $SQLITE_CFLAGS" + _SAVE_LIBS="$LIBS" +@@ -15791,7 +15617,7 @@ else + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sqlite_enable_unlock_notify=yes + else +@@ -15823,7 +15649,7 @@ fi + fi + + echo $ac_n "checking for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite""... $ac_c" 1>&6 +-echo "configure:15827: checking for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite" >&5 ++echo "configure:15653: checking for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite" >&5 + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $SQLITE_CFLAGS" + _SAVE_LIBS="$LIBS" +@@ -15837,7 +15663,7 @@ else + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sqlite_dbstat_vtab=yes + else +@@ -16030,18 +15856,18 @@ fi + if test "$COMPILE_ENVIRONMENT"; then + if test -n "$MOZ_OPTIMIZE"; then + echo $ac_n "checking for valid C compiler optimization flags""... $ac_c" 1>&6 +-echo "configure:16034: checking for valid C compiler optimization flags" >&5 ++echo "configure:15860: checking for valid C compiler optimization flags" >&5 + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" + cat > conftest.$ac_ext < + int main() { + printf("Hello World\n"); + ; return 0; } + EOF +-if { (eval echo configure:16045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:15871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + _results=yes + else +@@ -16174,12 +16000,12 @@ if test -n "$MOZ_REPLACE_MALLOC"; then + + if test -n "$MACOSX_DEPLOYMENT_TARGET"; then + echo $ac_n "checking how to do weak dynamic linking""... $ac_c" 1>&6 +-echo "configure:16178: checking how to do weak dynamic linking" >&5 ++echo "configure:16004: checking how to do weak dynamic linking" >&5 + if eval "test \"`echo '$''{'ac_cv_weak_dynamic_linking'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + echo 'extern void foo() __attribute__((weak_import));int bar() { if (foo) foo(); return 0; }' > conftest.c +- if { ac_try='${CC-cc} -o conftest${DLL_SUFFIX} $CFLAGS -dynamiclib $LDFLAGS -Wl,-U,_foo conftest.c $LIBS 1>&5'; { (eval echo configure:16183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ if { ac_try='${CC-cc} -o conftest${DLL_SUFFIX} $CFLAGS -dynamiclib $LDFLAGS -Wl,-U,_foo conftest.c $LIBS 1>&5'; { (eval echo configure:16009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && + test -s conftest${DLL_SUFFIX}; then + if "$OTOOL" -l conftest${DLL_SUFFIX} 2> /dev/null | grep "LC_DYLD_INFO_ONLY" > /dev/null; then + _CLASSIC_INFO= +@@ -16230,12 +16056,12 @@ else + for ac_func in mallctl nallocx + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:16234: checking for $ac_func" >&5 ++echo "configure:16060: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -16362,7 +16188,7 @@ if test -n "$ENABLE_CLANG_PLUGIN"; then + fi + + echo $ac_n "checking for llvm-config""... $ac_c" 1>&6 +-echo "configure:16366: checking for llvm-config" >&5 ++echo "configure:16192: checking for llvm-config" >&5 + if test -z "$LLVMCONFIG"; then + if test -n "$CLANG_CL"; then + CXX_COMPILER="$(dirname "$CXX")/clang" +@@ -16422,7 +16248,7 @@ echo "configure:16366: checking for llvm-config" >&5 + fi + + echo $ac_n "checking for new ASTMatcher API""... $ac_c" 1>&6 +-echo "configure:16426: checking for new ASTMatcher API" >&5 ++echo "configure:16252: checking for new ASTMatcher API" >&5 + if eval "test \"`echo '$''{'ac_cv_have_new_ASTMatcher_api'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -16442,14 +16268,14 @@ cross_compiling=$ac_cv_prog_cxx_cross + CXXFLAGS="${LLVM_CXXFLAGS}" + CXX="${HOST_CXX}" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:16279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_new_ASTMatcher_names="yes" + else +@@ -16478,7 +16304,7 @@ echo "$ac_t""$ac_cv_have_new_ASTMatcher_api" 1>&6 + fi + + echo $ac_n "checking for has with ignoringParenImpCasts""... $ac_c" 1>&6 +-echo "configure:16482: checking for has with ignoringParenImpCasts" >&5 ++echo "configure:16308: checking for has with ignoringParenImpCasts" >&5 + if eval "test \"`echo '$''{'ac_cv_has_accepts_ignoringParenImpCasts'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -16498,7 +16324,7 @@ cross_compiling=$ac_cv_prog_cxx_cross + CXXFLAGS="${LLVM_CXXFLAGS}" + CXX="${HOST_CXX}" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:16337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_has_accepts_ignoringParenImpCasts="yes" + else +@@ -16614,12 +16440,12 @@ fi + + if test -n "$COMPILE_ENVIRONMENT" -a -n "$USE_ELF_HACK"; then + echo $ac_n "checking whether linker creates PT_GNU_RELRO segments""... $ac_c" 1>&6 +-echo "configure:16618: checking whether linker creates PT_GNU_RELRO segments" >&5 ++echo "configure:16444: checking whether linker creates PT_GNU_RELRO segments" >&5 + if eval "test \"`echo '$''{'LINK_WITH_PT_GNU_RELRO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + echo "int main() {return 0;}" > conftest.${ac_ext} +- if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:16623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:16449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && + test -s conftest${ac_exeext}; then + if ${TOOLCHAIN_PREFIX}readelf -l conftest${ac_exeext} | grep GNU_RELRO > /dev/null; then + LINK_WITH_PT_GNU_RELRO=yes +@@ -16636,18 +16462,18 @@ echo "$ac_t""$LINK_WITH_PT_GNU_RELRO" 1>&6 + if test "$LINK_WITH_PT_GNU_RELRO" = yes; then + if test "$USE_ELF_HACK" = F; then + echo $ac_n "checking for -z norelro option to ld""... $ac_c" 1>&6 +-echo "configure:16640: checking for -z norelro option to ld" >&5 ++echo "configure:16466: checking for -z norelro option to ld" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,norelro" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,norelro" +@@ -16892,12 +16718,12 @@ cross_compiling=$ac_cv_prog_cxx_cross + for ac_func in __cxa_demangle + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:16896: checking for $ac_func" >&5 ++echo "configure:16722: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -16989,12 +16815,12 @@ cross_compiling=$ac_cv_prog_cxx_cross + + ac_safe=`echo "unwind.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for unwind.h""... $ac_c" 1>&6 +-echo "configure:16993: checking for unwind.h" >&5 ++echo "configure:16819: checking for unwind.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -17002,7 +16828,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:17006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:16832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -17019,12 +16845,12 @@ fi + for ac_func in _Unwind_Backtrace + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:17023: checking for $ac_func" >&5 ++echo "configure:16849: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -17202,7 +17028,7 @@ if test -z "$SKIP_COMPILER_CHECKS"; then + # Compiler Options + + echo $ac_n "checking for -pipe support""... $ac_c" 1>&6 +-echo "configure:17206: checking for -pipe support" >&5 ++echo "configure:17032: checking for -pipe support" >&5 + if test -n "$GNU_CC" -a -n "$GNU_CXX"; then + CFLAGS="$CFLAGS -pipe" + CXXFLAGS="$CXXFLAGS -pipe" +@@ -17216,16 +17042,16 @@ _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction" + + echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 +-echo "configure:17220: checking whether C compiler supports -fprofile-generate" >&5 ++echo "configure:17046: checking whether C compiler supports -fprofile-generate" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + PROFILE_GEN_CFLAGS="-fprofile-generate" + result="yes" +@@ -17272,20 +17098,20 @@ if test "$COMPILE_ENVIRONMENT"; then + + + echo $ac_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6 +-echo "configure:17276: checking what kind of list files are supported by the linker" >&5 ++echo "configure:17102: checking what kind of list files are supported by the linker" >&5 + if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + echo "int main() {return 0;}" > conftest.${ac_ext} +- if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:17281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then ++ if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:17107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then + echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list +- if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:17283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:17109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=linkerscript + else + echo "conftest.${OBJ_SUFFIX}" > conftest.list +- if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:17287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:17113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=filelist +- elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:17289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:17115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=list + else + EXPAND_LIBS_LIST_STYLE=none +@@ -17305,7 +17131,7 @@ LIBS_DESC_SUFFIX=desc + + if test "$GCC_USE_GNU_LD"; then + echo $ac_n "checking what kind of ordering can be done with the linker""... $ac_c" 1>&6 +-echo "configure:17309: checking what kind of ordering can be done with the linker" >&5 ++echo "configure:17135: checking what kind of ordering can be done with the linker" >&5 + if eval "test \"`echo '$''{'EXPAND_LIBS_ORDER_STYLE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -17313,14 +17139,14 @@ else + _SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="${LDFLAGS} -Wl,--section-ordering-file,conftest.order" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:17150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + EXPAND_LIBS_ORDER_STYLE=section-ordering-file + else +@@ -17332,7 +17158,7 @@ fi + rm -f conftest* + LDFLAGS="$_SAVE_LDFLAGS" + if test -z "$EXPAND_LIBS_ORDER_STYLE"; then +- if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:17336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ++ if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:17162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + EXPAND_LIBS_ORDER_STYLE=linkerscript + else + EXPAND_LIBS_ORDER_STYLE=none +@@ -17412,19 +17238,19 @@ if test -z "${GLIB_CFLAGS}" -o -z "${GLIB_LIBS}" ; then + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for glib-2.0 >= 1.3.7 gobject-2.0""... $ac_c" 1>&6 +-echo "configure:17416: checking for glib-2.0 >= 1.3.7 gobject-2.0" >&5 ++echo "configure:17242: checking for glib-2.0 >= 1.3.7 gobject-2.0" >&5 + + if $PKG_CONFIG --exists "glib-2.0 >= 1.3.7 gobject-2.0" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking GLIB_CFLAGS""... $ac_c" 1>&6 +-echo "configure:17423: checking GLIB_CFLAGS" >&5 ++echo "configure:17249: checking GLIB_CFLAGS" >&5 + GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 1.3.7 gobject-2.0"` + echo "$ac_t""$GLIB_CFLAGS" 1>&6 + + echo $ac_n "checking GLIB_LIBS""... $ac_c" 1>&6 +-echo "configure:17428: checking GLIB_LIBS" >&5 ++echo "configure:17254: checking GLIB_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + GLIB_LIBS="`$PKG_CONFIG --libs \"glib-2.0 >= 1.3.7 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$GLIB_LIBS" 1>&6 +@@ -17475,12 +17301,12 @@ if test "$USE_FC_FREETYPE"; then + CFLAGS="$CFLAGS $FT2_CFLAGS" + + echo $ac_n "checking for FT_Bitmap_Size.y_ppem""... $ac_c" 1>&6 +-echo "configure:17479: checking for FT_Bitmap_Size.y_ppem" >&5 ++echo "configure:17305: checking for FT_Bitmap_Size.y_ppem" >&5 + if eval "test \"`echo '$''{'ac_cv_member_FT_Bitmap_Size_y_ppem'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include FT_FREETYPE_H +@@ -17490,7 +17316,7 @@ FT_Bitmap_Size s; + return 1 + ; return 0; } + EOF +-if { (eval echo configure:17494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_member_FT_Bitmap_Size_y_ppem=yes + else +@@ -17519,12 +17345,12 @@ EOF + for ac_func in FT_GlyphSlot_Embolden FT_Load_Sfnt_Table + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:17523: checking for $ac_func" >&5 ++echo "configure:17349: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:17381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -17589,12 +17415,12 @@ done + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:17593: checking for $ac_hdr" >&5 ++echo "configure:17419: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +@@ -17602,7 +17428,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:17606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -17635,6 +17461,38 @@ EOF + fi + fi + ++if test -n "$MOZ_SYSTEM_GRAPHITE2"; then ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS" ++ cat > conftest.$ac_ext < ++ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \ ++ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \ ++ * 100 + GR2_VERSION_BUGFIX >= \ ++ (major) * 10000 + (minor) * 100 + (bugfix) ) ++ ++int main() { ++ ++ #if !GR2_VERSION_REQUIRE(1,3,8) ++ #error "Insufficient graphite2 version." ++ #endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:17485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: --with-system-graphite2 requested but no working libgraphite2 found" 1>&2; echo "configure: error: --with-system-graphite2 requested but no working libgraphite2 found" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ CFLAGS=$_SAVE_CFLAGS ++fi ++ + + + +@@ -17700,19 +17558,19 @@ else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for pixman-1 >= 0.19.2""... $ac_c" 1>&6 +-echo "configure:17704: checking for pixman-1 >= 0.19.2" >&5 ++echo "configure:17562: checking for pixman-1 >= 0.19.2" >&5 + + if $PKG_CONFIG --exists "pixman-1 >= 0.19.2" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_PIXMAN_CFLAGS""... $ac_c" 1>&6 +-echo "configure:17711: checking MOZ_PIXMAN_CFLAGS" >&5 ++echo "configure:17569: checking MOZ_PIXMAN_CFLAGS" >&5 + MOZ_PIXMAN_CFLAGS=`$PKG_CONFIG --cflags "pixman-1 >= 0.19.2"` + echo "$ac_t""$MOZ_PIXMAN_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_PIXMAN_LIBS""... $ac_c" 1>&6 +-echo "configure:17716: checking MOZ_PIXMAN_LIBS" >&5 ++echo "configure:17574: checking MOZ_PIXMAN_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_PIXMAN_LIBS="`$PKG_CONFIG --libs \"pixman-1 >= 0.19.2\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_PIXMAN_LIBS" 1>&6 +@@ -17796,12 +17654,12 @@ EOF + + ac_safe=`echo "d3d9.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for d3d9.h""... $ac_c" 1>&6 +-echo "configure:17800: checking for d3d9.h" >&5 ++echo "configure:17658: checking for d3d9.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -17809,7 +17667,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:17813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -17833,12 +17691,12 @@ fi + if test -n "$WIN32_D2D_SURFACE_FEATURE"; then + ac_safe=`echo "d3d10.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for d3d10.h""... $ac_c" 1>&6 +-echo "configure:17837: checking for d3d10.h" >&5 ++echo "configure:17695: checking for d3d10.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -17846,7 +17704,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:17850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -17915,19 +17773,19 @@ else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for cairo >= $CAIRO_VERSION""... $ac_c" 1>&6 +-echo "configure:17919: checking for cairo >= $CAIRO_VERSION" >&5 ++echo "configure:17777: checking for cairo >= $CAIRO_VERSION" >&5 + + if $PKG_CONFIG --exists "cairo >= $CAIRO_VERSION" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking CAIRO_CFLAGS""... $ac_c" 1>&6 +-echo "configure:17926: checking CAIRO_CFLAGS" >&5 ++echo "configure:17784: checking CAIRO_CFLAGS" >&5 + CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION"` + echo "$ac_t""$CAIRO_CFLAGS" 1>&6 + + echo $ac_n "checking CAIRO_LIBS""... $ac_c" 1>&6 +-echo "configure:17931: checking CAIRO_LIBS" >&5 ++echo "configure:17789: checking CAIRO_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + CAIRO_LIBS="`$PKG_CONFIG --libs \"cairo >= $CAIRO_VERSION\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$CAIRO_LIBS" 1>&6 +@@ -17969,19 +17827,19 @@ echo "configure:17931: checking CAIRO_LIBS" >&5 + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for cairo-tee >= $CAIRO_VERSION""... $ac_c" 1>&6 +-echo "configure:17973: checking for cairo-tee >= $CAIRO_VERSION" >&5 ++echo "configure:17831: checking for cairo-tee >= $CAIRO_VERSION" >&5 + + if $PKG_CONFIG --exists "cairo-tee >= $CAIRO_VERSION" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking CAIRO_TEE_CFLAGS""... $ac_c" 1>&6 +-echo "configure:17980: checking CAIRO_TEE_CFLAGS" >&5 ++echo "configure:17838: checking CAIRO_TEE_CFLAGS" >&5 + CAIRO_TEE_CFLAGS=`$PKG_CONFIG --cflags "cairo-tee >= $CAIRO_VERSION"` + echo "$ac_t""$CAIRO_TEE_CFLAGS" 1>&6 + + echo $ac_n "checking CAIRO_TEE_LIBS""... $ac_c" 1>&6 +-echo "configure:17985: checking CAIRO_TEE_LIBS" >&5 ++echo "configure:17843: checking CAIRO_TEE_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + CAIRO_TEE_LIBS="`$PKG_CONFIG --libs \"cairo-tee >= $CAIRO_VERSION\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$CAIRO_TEE_LIBS" 1>&6 +@@ -18010,63 +17868,7 @@ echo "configure:17985: checking CAIRO_TEE_LIBS" >&5 + fi + fi + +- if test "$MOZ_X11"; then +- succeeded=no +- +- if test -z "$PKG_CONFIG"; then +- echo "*** The pkg-config script could not be found. Make sure it is" +- echo "*** in your path, or set the PKG_CONFIG environment variable" +- echo "*** to the full path to pkg-config." +- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." +- else +- PKG_CONFIG_MIN_VERSION=0.9.0 +- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then +- echo $ac_n "checking for cairo-xlib-xrender >= $CAIRO_VERSION""... $ac_c" 1>&6 +-echo "configure:18026: checking for cairo-xlib-xrender >= $CAIRO_VERSION" >&5 +- +- if $PKG_CONFIG --exists "cairo-xlib-xrender >= $CAIRO_VERSION" ; then +- echo "$ac_t""yes" 1>&6 +- succeeded=yes +- +- echo $ac_n "checking CAIRO_XRENDER_CFLAGS""... $ac_c" 1>&6 +-echo "configure:18033: checking CAIRO_XRENDER_CFLAGS" >&5 +- CAIRO_XRENDER_CFLAGS=`$PKG_CONFIG --cflags "cairo-xlib-xrender >= $CAIRO_VERSION"` +- echo "$ac_t""$CAIRO_XRENDER_CFLAGS" 1>&6 +- +- echo $ac_n "checking CAIRO_XRENDER_LIBS""... $ac_c" 1>&6 +-echo "configure:18038: checking CAIRO_XRENDER_LIBS" >&5 +- ## Remove evil flags like -Wl,--export-dynamic +- CAIRO_XRENDER_LIBS="`$PKG_CONFIG --libs \"cairo-xlib-xrender >= $CAIRO_VERSION\" |sed s/-Wl,--export-dynamic//g`" +- echo "$ac_t""$CAIRO_XRENDER_LIBS" 1>&6 +- else +- CAIRO_XRENDER_CFLAGS="" +- CAIRO_XRENDER_LIBS="" +- ## If we have a custom action on failure, don't print errors, but +- ## do set a variable so people can do so. +- CAIRO_XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo-xlib-xrender >= $CAIRO_VERSION"` +- echo $CAIRO_XRENDER_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 (cairo-xlib-xrender >= $CAIRO_VERSION) 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 (cairo-xlib-xrender >= $CAIRO_VERSION) 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_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS" + MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_LIBS" +- MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS" +- fi + fi + + case "$MOZ_WIDGET_TOOLKIT" in +@@ -18580,19 +18382,19 @@ if test -n "$MOZ_SYSTEM_ICU"; then + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for icu-i18n >= 58.1""... $ac_c" 1>&6 +-echo "configure:18584: checking for icu-i18n >= 58.1" >&5 ++echo "configure:18386: checking for icu-i18n >= 58.1" >&5 + + if $PKG_CONFIG --exists "icu-i18n >= 58.1" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_ICU_CFLAGS""... $ac_c" 1>&6 +-echo "configure:18591: checking MOZ_ICU_CFLAGS" >&5 ++echo "configure:18393: checking MOZ_ICU_CFLAGS" >&5 + MOZ_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n >= 58.1"` + echo "$ac_t""$MOZ_ICU_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_ICU_LIBS""... $ac_c" 1>&6 +-echo "configure:18596: checking MOZ_ICU_LIBS" >&5 ++echo "configure:18398: checking MOZ_ICU_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_ICU_LIBS="`$PKG_CONFIG --libs \"icu-i18n >= 58.1\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_ICU_LIBS" 1>&6 +@@ -18877,12 +18679,12 @@ if test -n "$COMPILE_ENVIRONMENT"; then + for ac_func in posix_fadvise posix_fallocate + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:18881: checking for $ac_func" >&5 ++echo "configure:18683: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -18937,11 +18739,11 @@ fi + done + + +-if test "$MOZ_X11"; then ++if test "$MOZ_X11_no"; then + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $XCFLAGS" + cat > conftest.$ac_ext < +@@ -18960,7 +18762,7 @@ int main() { + + ; return 0; } + EOF +-if { (eval echo configure:18964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:18766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 +@@ -19391,8 +19193,6 @@ sed 's/$/,/' >> $CONFIG_STATUS <> $CONFIG_STATUS < + #include +-#include ++//#include + + #include "nsIBaseWindow.h" + #include "nsIDocShell.h" +diff --git a/toolkit/components/remote/nsGTKRemoteService.h b/toolkit/components/remote/nsGTKRemoteService.h +index 034a77a..5493fe7 100644 +--- a/toolkit/components/remote/nsGTKRemoteService.h ++++ b/toolkit/components/remote/nsGTKRemoteService.h +@@ -9,14 +9,14 @@ + #define __nsGTKRemoteService_h__ + + #include +-#include ++//#include + #include + + #include "nsInterfaceHashtable.h" +-#include "nsXRemoteService.h" ++//#include "nsXRemoteService.h" + #include "mozilla/Attributes.h" + +-class nsGTKRemoteService final : public nsXRemoteService ++class nsGTKRemoteService final + { + public: + // We will be a static singleton, so don't use the ordinary methods. +diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build +index 5c3f6b8..16747f7 100644 +--- a/toolkit/library/moz.build ++++ b/toolkit/library/moz.build +@@ -302,11 +302,7 @@ if CONFIG['MOZ_ENABLE_DBUS']: + OS_LIBS += CONFIG['MOZ_DBUS_GLIB_LIBS'] + + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: +- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': +- OS_LIBS += [l for l in CONFIG['TK_LIBS'] +- if l not in ('-lgtk-3', '-lgdk-3')] +- else: +- OS_LIBS += CONFIG['TK_LIBS'] ++ OS_LIBS += CONFIG['TK_LIBS'] + OS_LIBS += CONFIG['XLDFLAGS'] + OS_LIBS += CONFIG['XLIBS'] + OS_LIBS += CONFIG['XEXT_LIBS'] +diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild +index 0569a14..81c0a41 100644 +--- a/toolkit/toolkit.mozbuild ++++ b/toolkit/toolkit.mozbuild +@@ -117,7 +117,7 @@ DIRS += [ + '/xpfe/components', + ] + +-if CONFIG['MOZ_ENABLE_XREMOTE']: ++if CONFIG['MOZ_ENABLE_XREMOTE_no']: + DIRS += ['/widget/xremoteclient'] + + if CONFIG['MOZ_SPELLCHECK']: +diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build +index b119d38..1478ba2 100644 +--- a/toolkit/xre/moz.build ++++ b/toolkit/xre/moz.build +@@ -71,7 +71,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': + 'nsGDKErrorHandler.cpp', + ] + +-if CONFIG['MOZ_X11']: ++if CONFIG['MOZ_X11_no']: + EXPORTS += ['nsX11ErrorHandler.h'] + UNIFIED_SOURCES += [ + 'nsX11ErrorHandler.cpp', +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +index 8ceda40..4be40ec 100644 +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -166,7 +166,7 @@ + #endif + + // for X remote support +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + #include "XRemoteClient.h" + #include "nsIRemoteService.h" + #include "nsProfileLock.h" +@@ -247,7 +247,7 @@ nsString gAbsoluteArgv0Path; + #include + #endif + #include +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif /* MOZ_X11 */ + #include "nsGTKToolkit.h" +@@ -1602,7 +1602,7 @@ DumpHelp() + printf("Usage: %s [ options ... ] [URL]\n" + " where options include:\n\n", gArgv[0]); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + printf("X11 options\n" + " --display=DISPLAY X display to use\n" + " --sync Make X calls synchronous\n"); +@@ -1687,7 +1687,7 @@ DumpVersion() + printf("\n"); + } + +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + static RemoteResult + ParseRemoteCommandLine(nsCString& program, + const char** profile, +@@ -3012,7 +3012,7 @@ public: + XREMain() : + mStartOffline(false) + , mShuttingDown(false) +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + , mDisableRemote(false) + #endif + #if defined(MOZ_WIDGET_GTK) +@@ -3035,7 +3035,7 @@ public: + nsCOMPtr mProfD; + nsCOMPtr mProfLD; + nsCOMPtr mProfileLock; +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + nsCOMPtr mRemoteService; + nsProfileLock mRemoteLock; + nsCOMPtr mRemoteLockDir; +@@ -3050,7 +3050,7 @@ public: + + bool mStartOffline; + bool mShuttingDown; +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + bool mDisableRemote; + #endif + +@@ -3759,7 +3759,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + } + } + #endif /* MOZ_WIDGET_GTK */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Init X11 in thread-safe mode. Must be called prior to the first call to XOpenDisplay + // (called inside gdk_display_open). This is a requirement for off main tread compositing. + XInitThreads(); +@@ -3772,15 +3772,8 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + } + gdk_display_manager_set_default_display (gdk_display_manager_get(), + mGdkDisplay); +- if (GDK_IS_X11_DISPLAY(mGdkDisplay)) { +- if (saveDisplayArg) { +- SaveWordToEnv("DISPLAY", nsDependentCString(display_name)); +- } +- } else { +- mDisableRemote = true; +- } + #endif +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // handle --remote now that xpcom is fired up + bool newInstance; + { +@@ -3873,7 +3866,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) + gtk_widget_set_default_colormap(gdk_rgb_get_colormap()); + #endif /* (MOZ_WIDGET_GTK == 2) */ + #endif /* defined(MOZ_WIDGET_GTK) */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Do this after initializing GDK, or GDK will install its own handler. + XRE_InstallX11ErrorHandler(); + #endif +@@ -4419,7 +4412,7 @@ XREMain::XRE_mainRun() + } + + if (!mShuttingDown) { +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // if we have X remote support, start listening for requests on the + // proxy window. + if (!mDisableRemote) +@@ -4671,7 +4664,7 @@ XREMain::XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig) + } + + if (!mShuttingDown) { +-#ifdef MOZ_ENABLE_XREMOTE ++#ifdef MOZ_ENABLE_XREMOTE_no + // shut down the x remote proxy window + if (mRemoteService) { + mRemoteService->Shutdown(); +diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp +index 7b60600..d44d586 100644 +--- a/toolkit/xre/nsEmbedFunctions.cpp ++++ b/toolkit/xre/nsEmbedFunctions.cpp +@@ -43,7 +43,7 @@ + #include "nsVersionComparator.h" + #include "chrome/common/mach_ipc_mac.h" + #endif +-#include "nsX11ErrorHandler.h" ++//#include "nsX11ErrorHandler.h" + #include "nsGDKErrorHandler.h" + #include "base/at_exit.h" + #include "base/command_line.h" +@@ -550,7 +550,7 @@ XRE_InitChildProcess(int aArgc, + gArgv = aArgv; + gArgc = aArgc; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XInitThreads(); + #endif + #if MOZ_WIDGET_GTK == 2 +diff --git a/toolkit/xre/nsGDKErrorHandler.cpp b/toolkit/xre/nsGDKErrorHandler.cpp +index a01a7c5..89b1c8b 100644 +--- a/toolkit/xre/nsGDKErrorHandler.cpp ++++ b/toolkit/xre/nsGDKErrorHandler.cpp +@@ -6,14 +6,12 @@ + #include "nsGDKErrorHandler.h" + + #include +-#include + #include + #include + #include + + #include "nsDebug.h" + #include "nsString.h" +-#include "nsX11ErrorHandler.h" + + #include "prenv.h" + +@@ -29,62 +27,8 @@ static void + GdkErrorHandler(const gchar *log_domain, GLogLevelFlags log_level, + const gchar *message, gpointer user_data) + { +- if (strstr(message, "X Window System error")) { +- XErrorEvent event; +- nsDependentCString buffer(message); +- char *endptr; +- +- /* Parse Gdk X Window error message which has this format: +- * (Details: serial XXXX error_code XXXX request_code XXXX (XXXX) minor_code XXXX) +- */ +- NS_NAMED_LITERAL_CSTRING(serialString, "(Details: serial "); +- int32_t start = buffer.Find(serialString); +- if (start == kNotFound) +- NS_RUNTIMEABORT(message); +- +- start += serialString.Length(); +- errno = 0; +- event.serial = strtol(buffer.BeginReading() + start, &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(errorCodeString, " error_code "); +- if (!StringBeginsWith(Substring(endptr, buffer.EndReading()), errorCodeString)) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.error_code = strtol(endptr + errorCodeString.Length(), &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(requestCodeString, " request_code "); +- if (!StringBeginsWith(Substring(endptr, buffer.EndReading()), requestCodeString)) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.request_code = strtol(endptr + requestCodeString.Length(), &endptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- NS_NAMED_LITERAL_CSTRING(minorCodeString, " minor_code "); +- start = buffer.Find(minorCodeString, endptr - buffer.BeginReading()); +- if (!start) +- NS_RUNTIMEABORT(message); +- +- errno = 0; +- event.minor_code = strtol(buffer.BeginReading() + start + minorCodeString.Length(), nullptr, 10); +- if (errno) +- NS_RUNTIMEABORT(message); +- +- event.display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +- // Gdk does not provide resource ID +- event.resourceid = 0; +- +- X11Error(event.display, &event); +- } else { + g_log_default_handler(log_domain, log_level, message, user_data); + NS_RUNTIMEABORT(message); +- } + } + + void +@@ -94,7 +38,4 @@ InstallGdkErrorHandler() + (GLogLevelFlags)(G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION), + GdkErrorHandler, + nullptr); +- if (PR_GetEnv("MOZ_X_SYNC")) { +- XSynchronize(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), True); +- } + } +diff --git a/toolkit/xre/nsNativeAppSupportUnix.cpp b/toolkit/xre/nsNativeAppSupportUnix.cpp +index a04a799..a0f55f6 100644 +--- a/toolkit/xre/nsNativeAppSupportUnix.cpp ++++ b/toolkit/xre/nsNativeAppSupportUnix.cpp +@@ -32,7 +32,7 @@ + #include + #include + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include +@@ -52,7 +52,7 @@ + You have GTK+ %d.%d.\nThis application requires GTK+ %d.%d or newer.\n\n\ + Please upgrade your GTK+ library if you wish to use this application." + +-#if MOZ_X11 ++#if MOZ_X11_no + #undef IceSetIOErrorHandler + #undef IceAddConnectionWatch + #undef IceConnectionNumber +@@ -126,7 +126,7 @@ static LazyLogModule sMozSMLog("MozSM"); + class nsNativeAppSupportUnix : public nsNativeAppSupportBase + { + public: +-#if MOZ_X11 ++#if MOZ_X11_no + nsNativeAppSupportUnix(): mSessionConnection(nullptr), + mClientState(STATE_DISCONNECTED) {}; + ~nsNativeAppSupportUnix() +@@ -143,7 +143,7 @@ public: + NS_IMETHOD Enable(); + + private: +-#if MOZ_X11 ++#if MOZ_X11_no + static void SaveYourselfCB(SmcConn smc_conn, SmPointer client_data, + int save_style, Bool shutdown, int interact_style, + Bool fast); +@@ -163,7 +163,7 @@ private: + #endif + }; + +-#if MOZ_X11 ++#if MOZ_X11_no + static gboolean + process_ice_messages(IceConn connection) + { +@@ -479,7 +479,7 @@ nsNativeAppSupportUnix::Start(bool *aRetVal) + + *aRetVal = true; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gboolean sm_disable = FALSE; + if (!getenv("SESSION_MANAGER")) { + sm_disable = TRUE; +diff --git a/widget/CompositorWidget.h b/widget/CompositorWidget.h +index ce10c3e..d94c0c1 100644 +--- a/widget/CompositorWidget.h ++++ b/widget/CompositorWidget.h +@@ -42,7 +42,7 @@ class CompositorWidgetInitData; + class CompositorWidgetDelegate; + + // Platforms that support out-of-process widgets. +-#if defined(XP_WIN) || defined(MOZ_X11) ++#if defined(XP_WIN) || defined(MOZ_X11_no) + // CompositorWidgetParent should implement CompositorWidget and + // PCompositorWidgetParent. + class CompositorWidgetParent; +diff --git a/widget/InProcessCompositorWidget.cpp b/widget/InProcessCompositorWidget.cpp +index e7bbf7a..10e64d0 100644 +--- a/widget/InProcessCompositorWidget.cpp ++++ b/widget/InProcessCompositorWidget.cpp +@@ -14,7 +14,7 @@ namespace widget { + + // Platforms with no OOP compositor process support use + // InProcessCompositorWidget by default. +-#if !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) ++#if !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING_no) + /* static */ RefPtr + CompositorWidget::CreateLocal(const CompositorWidgetInitData& aInitData, + const layers::CompositorOptions& aOptions, +diff --git a/widget/gtk/CompositorWidgetChild.h b/widget/gtk/CompositorWidgetChild.h +index 8da8e47..4e188d9 100644 +--- a/widget/gtk/CompositorWidgetChild.h ++++ b/widget/gtk/CompositorWidgetChild.h +@@ -6,7 +6,7 @@ + #ifndef widget_gtk_CompositorWidgetChild_h + #define widget_gtk_CompositorWidgetChild_h + +-#include "X11CompositorWidget.h" ++//#include "X11CompositorWidget.h" + #include "mozilla/widget/PCompositorWidgetChild.h" + #include "mozilla/widget/CompositorWidgetVsyncObserver.h" + +@@ -15,7 +15,6 @@ namespace widget { + + class CompositorWidgetChild final + : public PCompositorWidgetChild +- , public CompositorWidgetDelegate + { + public: + CompositorWidgetChild(RefPtr aVsyncDispatcher, +@@ -25,7 +24,7 @@ public: + mozilla::ipc::IPCResult RecvObserveVsync() override; + mozilla::ipc::IPCResult RecvUnobserveVsync() override; + +- void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; ++ void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) ; + + private: + RefPtr mVsyncDispatcher; +diff --git a/widget/gtk/CompositorWidgetParent.h b/widget/gtk/CompositorWidgetParent.h +index 100e181..4f70cb3 100644 +--- a/widget/gtk/CompositorWidgetParent.h ++++ b/widget/gtk/CompositorWidgetParent.h +@@ -6,15 +6,15 @@ + #ifndef widget_gtk_CompositorWidgetParent_h + #define widget_gtk_CompositorWidgetParent_h + +-#include "X11CompositorWidget.h" ++//#include "X11CompositorWidget.h" + #include "mozilla/widget/PCompositorWidgetParent.h" + + namespace mozilla { + namespace widget { + + class CompositorWidgetParent final +- : public PCompositorWidgetParent, +- public X11CompositorWidget ++ : public PCompositorWidgetParent//, ++ //public X11CompositorWidget + { + public: + explicit CompositorWidgetParent(const CompositorWidgetInitData& aInitData, +@@ -23,8 +23,8 @@ public: + + void ActorDestroy(ActorDestroyReason aWhy) override { } + +- void ObserveVsync(VsyncObserver* aObserver) override; +- RefPtr GetVsyncObserver() const override; ++ void ObserveVsync(VsyncObserver* aObserver); ++ RefPtr GetVsyncObserver() const ; + + mozilla::ipc::IPCResult RecvNotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; + +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index baccb6c..1a2c11c 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -47,15 +47,15 @@ if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ + 'CompositorWidgetChild.cpp', + 'CompositorWidgetParent.cpp', +- 'InProcessX11CompositorWidget.cpp', +- 'nsIdleServiceGTK.cpp', +- 'X11CompositorWidget.cpp', ++ #'InProcessX11CompositorWidget.cpp', ++ #'nsIdleServiceGTK.cpp', ++ #'X11CompositorWidget.cpp', + ] + EXPORTS.mozilla.widget += [ + 'CompositorWidgetChild.h', + 'CompositorWidgetParent.h', +- 'InProcessX11CompositorWidget.h', +- 'X11CompositorWidget.h', ++ #'InProcessX11CompositorWidget.h', ++ #'X11CompositorWidget.h', + ] + + if CONFIG['NS_PRINTING']: +@@ -71,15 +71,15 @@ if CONFIG['NS_PRINTING']: + + if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ +- 'nsClipboard.cpp', ++ #'nsClipboard.cpp', + 'nsDragService.cpp', +- 'WindowSurfaceProvider.cpp', +- 'WindowSurfaceX11.cpp', +- 'WindowSurfaceX11Image.cpp', +- 'WindowSurfaceXRender.cpp', ++ #'WindowSurfaceProvider.cpp', ++ #'WindowSurfaceX11.cpp', ++ #'WindowSurfaceX11Image.cpp', ++ #'WindowSurfaceXRender.cpp', + ] + EXPORTS.mozilla.widget += [ +- 'WindowSurfaceProvider.h', ++ #'WindowSurfaceProvider.h', + ] + + if CONFIG['ACCESSIBILITY']: +diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c +index 8b62943..43a9303 100644 +--- a/widget/gtk/mozgtk/mozgtk.c ++++ b/widget/gtk/mozgtk/mozgtk.c +@@ -597,7 +597,7 @@ STUB(gtk_color_chooser_get_rgba) + STUB(gtk_color_chooser_set_use_alpha) + #endif + +-#ifdef GTK2_SYMBOLS ++#ifdef GTK2_SYMBOLS_no + STUB(gdk_drawable_get_screen) + STUB(gdk_rgb_get_colormap) + STUB(gdk_rgb_get_visual) +@@ -612,21 +612,3 @@ 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. +-#include +-// Bug 1271100 +-// We need to trick system Cairo into not using the XShm extension due to +-// a race condition in it that results in frequent BadAccess errors. Cairo +-// relies upon XShmQueryExtension to initially detect if XShm is available. +-// So we define our own stub that always indicates XShm not being present. +-// mozgtk loads before libXext/libcairo and so this stub will take priority. +-// Our tree usage goes through xcb and remains unaffected by this. +-MOZ_EXPORT Bool +-XShmQueryExtension(Display* aDisplay) +-{ +- return False; +-} +-#endif +- +diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp +index 053ae97..bd530da 100644 +--- a/widget/gtk/nsClipboard.cpp ++++ b/widget/gtk/nsClipboard.cpp +@@ -27,8 +27,8 @@ + #include + + // For manipulation of the X event queue +-#include +-#include ++//#include ++//#include + #include + #include + #include +@@ -802,6 +802,7 @@ void GetHTMLCharset(guchar * data, int32_t dataLength, nsCString& str) + str.AssignLiteral("UNKNOWN"); + } + ++#ifdef MOZ_X11_no + static void + DispatchSelectionNotifyEvent(GtkWidget *widget, XEvent *xevent) + { +@@ -862,6 +863,7 @@ checkEventProc(Display *display, XEvent *event, XPointer arg) + + return False; + } ++#endif + + // Idle timeout for receiving selection and property notify events (microsec) + static const int kClipboardTimeout = 500000; +@@ -926,53 +928,6 @@ RetrievalContext::Wait() + } + + GdkDisplay *gdkDisplay = gdk_display_get_default(); +- if (GDK_IS_X11_DISPLAY(gdkDisplay)) { +- Display *xDisplay = GDK_DISPLAY_XDISPLAY(gdkDisplay); +- checkEventContext context; +- context.cbWidget = nullptr; +- context.selAtom = gdk_x11_atom_to_xatom(gdk_atom_intern("GDK_SELECTION", +- FALSE)); +- +- // Send X events which are relevant to the ongoing selection retrieval +- // to the clipboard widget. Wait until either the operation completes, or +- // we hit our timeout. All other X events remain queued. +- +- int select_result; +- +- int cnumber = ConnectionNumber(xDisplay); +- fd_set select_set; +- FD_ZERO(&select_set); +- FD_SET(cnumber, &select_set); +- ++cnumber; +- TimeStamp start = TimeStamp::Now(); +- +- do { +- XEvent xevent; +- +- while (XCheckIfEvent(xDisplay, &xevent, checkEventProc, +- (XPointer) &context)) { +- +- if (xevent.xany.type == SelectionNotify) +- DispatchSelectionNotifyEvent(context.cbWidget, &xevent); +- else +- DispatchPropertyNotifyEvent(context.cbWidget, &xevent); +- +- if (mState == COMPLETED) { +- void *data = mData; +- mData = nullptr; +- return data; +- } +- } +- +- TimeStamp now = TimeStamp::Now(); +- struct timeval tv; +- tv.tv_sec = 0; +- tv.tv_usec = std::max(0, +- kClipboardTimeout - (now - start).ToMicroseconds()); +- select_result = select(cnumber, &select_set, nullptr, nullptr, &tv); +- } while (select_result == 1 || +- (select_result == -1 && errno == EINTR)); +- } + #ifdef DEBUG_CLIPBOARD + printf("exceeded clipboard timeout\n"); + #endif +diff --git a/widget/gtk/nsDragService.cpp b/widget/gtk/nsDragService.cpp +index 15b4eef..bc76399 100644 +--- a/widget/gtk/nsDragService.cpp ++++ b/widget/gtk/nsDragService.cpp +@@ -22,12 +22,12 @@ + #include "prthread.h" + #include + #include +-#include ++//#include + #include "nsCRT.h" + #include "mozilla/BasicEvents.h" + #include "mozilla/Services.h" + +-#include "gfxXlibSurface.h" ++//#include "gfxXlibSurface.h" + #include "gfxContext.h" + #include "nsImageToPixbuf.h" + #include "nsPresContext.h" +diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp +index ce55cf1..d4ca3db 100644 +--- a/widget/gtk/nsGtkKeyUtils.cpp ++++ b/widget/gtk/nsGtkKeyUtils.cpp +@@ -12,11 +12,11 @@ + #include + #include + #include +-#include ++//#include + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +-#include ++//#include + #include "WidgetUtils.h" + #include "keysym2ucs.h" + #include "nsContentUtils.h" +@@ -173,8 +173,8 @@ KeymapWrapper::KeymapWrapper() : + g_signal_connect(mGdkKeymap, "direction-changed", + (GCallback)OnDirectionChanged, this); + +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) +- InitXKBExtension(); ++ //if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) ++ // InitXKBExtension(); + + Init(); + } +@@ -194,10 +194,10 @@ KeymapWrapper::Init() + mModifierKeys.Clear(); + memset(mModifierMasks, 0, sizeof(mModifierMasks)); + +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) +- InitBySystemSettings(); ++ //if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) ++ // InitBySystemSettings(); + +- gdk_window_add_filter(nullptr, FilterEvents, this); ++ //gdk_window_add_filter(nullptr, FilterEvents, this); + + MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, + ("%p Init, CapsLock=0x%X, NumLock=0x%X, " +@@ -215,233 +215,16 @@ KeymapWrapper::Init() + void + KeymapWrapper::InitXKBExtension() + { +- PodZero(&mKeyboardState); +- +- int xkbMajorVer = XkbMajorVersion; +- int xkbMinorVer = XkbMinorVersion; +- if (!XkbLibraryVersion(&xkbMajorVer, &xkbMinorVer)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbLibraryVersion()", this)); +- return; +- } +- +- Display* display = +- gdk_x11_display_get_xdisplay(gdk_display_get_default()); +- +- // XkbLibraryVersion() set xkbMajorVer and xkbMinorVer to that of the +- // library, which may be newer than what is required of the server in +- // XkbQueryExtension(), so these variables should be reset to +- // XkbMajorVersion and XkbMinorVersion before the XkbQueryExtension call. +- xkbMajorVer = XkbMajorVersion; +- xkbMinorVer = XkbMinorVersion; +- int opcode, baseErrorCode; +- if (!XkbQueryExtension(display, &opcode, &mXKBBaseEventCode, &baseErrorCode, +- &xkbMajorVer, &xkbMinorVer)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbQueryExtension(), display=0x%p", this, display)); +- return; +- } +- +- if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbStateNotify, +- XkbModifierStateMask, XkbModifierStateMask)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbSelectEventDetails() for XModifierStateMask, display=0x%p", +- this, display)); +- return; +- } +- +- if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbControlsNotify, +- XkbPerKeyRepeatMask, XkbPerKeyRepeatMask)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XkbSelectEventDetails() for XkbControlsNotify, display=0x%p", +- this, display)); +- return; +- } +- +- if (!XGetKeyboardControl(display, &mKeyboardState)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension failed due to failure of " +- "XGetKeyboardControl(), display=0x%p", +- this, display)); +- return; +- } +- +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitXKBExtension, Succeeded", this)); + } + + void + KeymapWrapper::InitBySystemSettings() + { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, mGdkKeymap=%p", +- this, mGdkKeymap)); +- +- Display* display = +- gdk_x11_display_get_xdisplay(gdk_display_get_default()); +- +- int min_keycode = 0; +- int max_keycode = 0; +- XDisplayKeycodes(display, &min_keycode, &max_keycode); +- +- int keysyms_per_keycode = 0; +- KeySym* xkeymap = XGetKeyboardMapping(display, min_keycode, +- max_keycode - min_keycode + 1, +- &keysyms_per_keycode); +- if (!xkeymap) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- "Failed due to null xkeymap", this)); +- return; +- } +- +- XModifierKeymap* xmodmap = XGetModifierMapping(display); +- if (!xmodmap) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- "Failed due to null xmodmap", this)); +- XFree(xkeymap); +- return; +- } +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, min_keycode=%d, " +- "max_keycode=%d, keysyms_per_keycode=%d, max_keypermod=%d", +- this, min_keycode, max_keycode, keysyms_per_keycode, +- xmodmap->max_keypermod)); +- +- // The modifiermap member of the XModifierKeymap structure contains 8 sets +- // of max_keypermod KeyCodes, one for each modifier in the order Shift, +- // Lock, Control, Mod1, Mod2, Mod3, Mod4, and Mod5. +- // Only nonzero KeyCodes have meaning in each set, and zero KeyCodes are +- // ignored. +- +- // Note that two or more modifiers may use one modifier flag. E.g., +- // on Ubuntu 10.10, Alt and Meta share the Mod1 in default settings. +- // And also Super and Hyper share the Mod4. In such cases, we need to +- // decide which modifier flag means one of DOM modifiers. +- +- // mod[0] is Modifier introduced by Mod1. +- Modifier mod[5]; +- int32_t foundLevel[5]; +- for (uint32_t i = 0; i < ArrayLength(mod); i++) { +- mod[i] = NOT_MODIFIER; +- foundLevel[i] = INT32_MAX; +- } +- const uint32_t map_size = 8 * xmodmap->max_keypermod; +- for (uint32_t i = 0; i < map_size; i++) { +- KeyCode keycode = xmodmap->modifiermap[i]; +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- " i=%d, keycode=0x%08X", +- this, i, keycode)); +- if (!keycode || keycode < min_keycode || keycode > max_keycode) { +- continue; +- } +- +- ModifierKey* modifierKey = GetModifierKey(keycode); +- if (!modifierKey) { +- modifierKey = mModifierKeys.AppendElement(ModifierKey(keycode)); +- } +- +- const KeySym* syms = +- xkeymap + (keycode - min_keycode) * keysyms_per_keycode; +- const uint32_t bit = i / xmodmap->max_keypermod; +- modifierKey->mMask |= 1 << bit; +- +- // We need to know the meaning of Mod1, Mod2, Mod3, Mod4 and Mod5. +- // Let's skip if current map is for others. +- if (bit < 3) { +- continue; +- } +- +- const int32_t modIndex = bit - 3; +- for (int32_t j = 0; j < keysyms_per_keycode; j++) { +- Modifier modifier = GetModifierForGDKKeyval(syms[j]); +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p InitBySystemSettings, " +- " Mod%d, j=%d, syms[j]=%s(0x%X), modifier=%s", +- this, modIndex + 1, j, gdk_keyval_name(syms[j]), syms[j], +- GetModifierName(modifier))); +- +- switch (modifier) { +- case NOT_MODIFIER: +- // Don't overwrite the stored information with +- // NOT_MODIFIER. +- break; +- case CAPS_LOCK: +- case SHIFT: +- case CTRL: +- // Ignore the modifiers defined in GDK spec. They shouldn't +- // be mapped to Mod1-5 because they must not work on native +- // GTK applications. +- break; +- default: +- // If new modifier is found in higher level than stored +- // value, we don't need to overwrite it. +- if (j > foundLevel[modIndex]) { +- break; +- } +- // If new modifier is more important than stored value, +- // we should overwrite it with new modifier. +- if (j == foundLevel[modIndex]) { +- mod[modIndex] = std::min(modifier, mod[modIndex]); +- break; +- } +- foundLevel[modIndex] = j; +- mod[modIndex] = modifier; +- break; +- } +- } +- } +- +- for (uint32_t i = 0; i < COUNT_OF_MODIFIER_INDEX; i++) { +- Modifier modifier; +- switch (i) { +- case INDEX_NUM_LOCK: +- modifier = NUM_LOCK; +- break; +- case INDEX_SCROLL_LOCK: +- modifier = SCROLL_LOCK; +- break; +- case INDEX_ALT: +- modifier = ALT; +- break; +- case INDEX_META: +- modifier = META; +- break; +- case INDEX_SUPER: +- modifier = SUPER; +- break; +- case INDEX_HYPER: +- modifier = HYPER; +- break; +- case INDEX_LEVEL3: +- modifier = LEVEL3; +- break; +- case INDEX_LEVEL5: +- modifier = LEVEL5; +- break; +- default: +- MOZ_CRASH("All indexes must be handled here"); +- } +- for (uint32_t j = 0; j < ArrayLength(mod); j++) { +- if (modifier == mod[j]) { +- mModifierMasks[i] |= 1 << (j + 3); +- } +- } +- } +- +- XFreeModifiermap(xmodmap); +- XFree(xkeymap); + } + + KeymapWrapper::~KeymapWrapper() + { +- gdk_window_remove_filter(nullptr, FilterEvents, this); ++ //gdk_window_remove_filter(nullptr, FilterEvents, this); + g_signal_handlers_disconnect_by_func(mGdkKeymap, + FuncToGpointer(OnKeysChanged), this); + g_signal_handlers_disconnect_by_func(mGdkKeymap, +@@ -451,77 +234,6 @@ KeymapWrapper::~KeymapWrapper() + ("%p Destructor", this)); + } + +-/* static */ GdkFilterReturn +-KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, +- GdkEvent* aGdkEvent, +- gpointer aData) +-{ +- XEvent* xEvent = static_cast(aXEvent); +- switch (xEvent->type) { +- case KeyPress: { +- // If the key doesn't support auto repeat, ignore the event because +- // even if such key (e.g., Shift) is pressed during auto repeat of +- // anoter key, it doesn't stop the auto repeat. +- KeymapWrapper* self = static_cast(aData); +- if (!self->IsAutoRepeatableKey(xEvent->xkey.keycode)) { +- break; +- } +- if (sRepeatState == NOT_PRESSED) { +- sRepeatState = FIRST_PRESS; +- } else if (sLastRepeatableHardwareKeyCode == xEvent->xkey.keycode) { +- sRepeatState = REPEATING; +- } else { +- // If a different key is pressed while another key is pressed, +- // auto repeat system repeats only the last pressed key. +- // So, setting new keycode and setting repeat state as first key +- // press should work fine. +- sRepeatState = FIRST_PRESS; +- } +- sLastRepeatableHardwareKeyCode = xEvent->xkey.keycode; +- break; +- } +- case KeyRelease: { +- if (sLastRepeatableHardwareKeyCode != xEvent->xkey.keycode) { +- // This case means the key release event is caused by +- // a non-repeatable key such as Shift or a repeatable key that +- // was pressed before sLastRepeatableHardwareKeyCode was +- // pressed. +- break; +- } +- sRepeatState = NOT_PRESSED; +- break; +- } +- case FocusOut: { +- // At moving focus, we should reset keyboard repeat state. +- // Strictly, this causes incorrect behavior. However, this +- // correctness must be enough for web applications. +- sRepeatState = NOT_PRESSED; +- break; +- } +- default: { +- KeymapWrapper* self = static_cast(aData); +- if (xEvent->type != self->mXKBBaseEventCode) { +- break; +- } +- XkbEvent* xkbEvent = (XkbEvent*)xEvent; +- if (xkbEvent->any.xkb_type != XkbControlsNotify || +- !(xkbEvent->ctrls.changed_ctrls & XkbPerKeyRepeatMask)) { +- break; +- } +- if (!XGetKeyboardControl(xkbEvent->any.display, +- &self->mKeyboardState)) { +- MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, +- ("%p FilterEvents failed due to failure " +- "of XGetKeyboardControl(), display=0x%p", +- self, xkbEvent->any.display)); +- } +- break; +- } +- } +- +- return GDK_FILTER_CONTINUE; +-} +- + static void + ResetBidiKeyboard() + { +@@ -920,23 +632,6 @@ KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, + // key release events, the result isn't what we want. + guint modifierState = aGdkKeyEvent->state; + GdkDisplay* gdkDisplay = gdk_display_get_default(); +- if (aGdkKeyEvent->is_modifier && GDK_IS_X11_DISPLAY(gdkDisplay)) { +- Display* display = +- gdk_x11_display_get_xdisplay(gdkDisplay); +- if (XEventsQueued(display, QueuedAfterReading)) { +- XEvent nextEvent; +- XPeekEvent(display, &nextEvent); +- if (nextEvent.type == keymapWrapper->mXKBBaseEventCode) { +- XkbEvent* XKBEvent = (XkbEvent*)&nextEvent; +- if (XKBEvent->any.xkb_type == XkbStateNotify) { +- XkbStateNotifyEvent* stateNotifyEvent = +- (XkbStateNotifyEvent*)XKBEvent; +- modifierState &= ~0xFF; +- modifierState |= stateNotifyEvent->lookup_mods; +- } +- } +- } +- } + InitInputEvent(aKeyEvent, modifierState); + + switch (aGdkKeyEvent->keyval) { +@@ -1176,11 +871,7 @@ KeymapWrapper::IsLatinGroup(guint8 aGroup) + bool + KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) + { +- uint8_t indexOfArray = aHardwareKeyCode / 8; +- MOZ_ASSERT(indexOfArray < ArrayLength(mKeyboardState.auto_repeats), +- "invalid index"); +- char bitMask = 1 << (aHardwareKeyCode % 8); +- return (mKeyboardState.auto_repeats[indexOfArray] & bitMask) != 0; ++ return true; + } + + /* static */ bool +diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h +index 67528d8..f1ecd6b 100644 +--- a/widget/gtk/nsGtkKeyUtils.h ++++ b/widget/gtk/nsGtkKeyUtils.h +@@ -12,7 +12,7 @@ + #include "mozilla/EventForwards.h" + + #include +-#include ++//#include + + namespace mozilla { + namespace widget { +@@ -223,14 +223,6 @@ protected: + int mXKBBaseEventCode; + + /** +- * Only auto_repeats[] stores valid value. If you need to use other +- * members, you need to listen notification events for them. +- * See a call of XkbSelectEventDetails() with XkbControlsNotify in +- * InitXKBExtension(). +- */ +- XKeyboardState mKeyboardState; +- +- /** + * Pointer of the singleton instance. + */ + static KeymapWrapper* sInstance; +@@ -339,15 +331,6 @@ protected: + static uint32_t GetDOMKeyCodeFromKeyPairs(guint aGdkKeyval); + + /** +- * FilterEvents() listens all events on all our windows. +- * Be careful, this may make damage to performance if you add expensive +- * code in this method. +- */ +- static GdkFilterReturn FilterEvents(GdkXEvent* aXEvent, +- GdkEvent* aGdkEvent, +- gpointer aData); +- +- /** + * See the document of WillDispatchKeyboardEvent(). + */ + void WillDispatchKeyboardEventInternal(WidgetKeyboardEvent& aKeyEvent, +diff --git a/widget/gtk/nsScreenGtk.cpp b/widget/gtk/nsScreenGtk.cpp +index 61e6605..a9f8cb9 100644 +--- a/widget/gtk/nsScreenGtk.cpp ++++ b/widget/gtk/nsScreenGtk.cpp +@@ -8,7 +8,7 @@ + #include "nsIWidget.h" + + #include +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #endif +@@ -130,7 +130,7 @@ nsScreenGtk :: Init (GdkWindow *aRootWindow) + // versions of GDK predating the GdkScreen object. See bug 256646. + mAvailRect = mRect = nsIntRect(0, 0, width, height); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // We need to account for the taskbar, etc in the available rect. + // See http://freedesktop.org/Standards/wm-spec/index.html#id2767771 + +@@ -193,7 +193,7 @@ nsScreenGtk :: Init (GdkWindow *aRootWindow) + #endif + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void + nsScreenGtk :: Init (XineramaScreenInfo *aScreenInfo) + { +diff --git a/widget/gtk/nsScreenGtk.h b/widget/gtk/nsScreenGtk.h +index d58ea4b..afe468f 100644 +--- a/widget/gtk/nsScreenGtk.h ++++ b/widget/gtk/nsScreenGtk.h +@@ -9,7 +9,7 @@ + #include "nsBaseScreen.h" + #include "nsRect.h" + #include "gdk/gdk.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + + // from Xinerama.h +@@ -40,7 +40,7 @@ public: + NS_IMETHOD GetDefaultCSSScaleFactor(double* aScaleFactor) override; + + void Init(GdkWindow *aRootWindow); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void Init(XineramaScreenInfo *aScreenInfo); + #endif /* MOZ_X11 */ + +diff --git a/widget/gtk/nsScreenManagerGtk.cpp b/widget/gtk/nsScreenManagerGtk.cpp +index 98166cc..4dfc0ee 100644 +--- a/widget/gtk/nsScreenManagerGtk.cpp ++++ b/widget/gtk/nsScreenManagerGtk.cpp +@@ -13,7 +13,7 @@ + + #define SCREEN_MANAGER_LIBRARY_LOAD_FAILED ((PRLibrary*)1) + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + // prototypes from Xinerama.h + typedef Bool (*_XnrmIsActive_fn)(Display *dpy); +@@ -34,7 +34,7 @@ root_window_event_filter(GdkXEvent *aGdkXEvent, GdkEvent *aGdkEvent, + gpointer aClosure) + { + nsScreenManagerGtk *manager = static_cast(aClosure); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent *xevent = static_cast(aGdkXEvent); + + // See comments in nsScreenGtk::Init below. +@@ -58,7 +58,6 @@ root_window_event_filter(GdkXEvent *aGdkXEvent, GdkEvent *aGdkEvent, + nsScreenManagerGtk :: nsScreenManagerGtk ( ) + : mXineramalib(nullptr) + , mRootWindow(nullptr) +- , mNetWorkareaAtom(0) + { + // nothing else to do. I guess we could cache a bunch of information + // here, but we want to ask the device at runtime in case anything +@@ -114,7 +113,7 @@ nsScreenManagerGtk :: EnsureInit() + + g_signal_connect(gdk_screen_get_default(), "monitors-changed", + G_CALLBACK(monitors_changed), this); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + gdk_window_add_filter(mRootWindow, root_window_event_filter, this); + if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) + mNetWorkareaAtom = +@@ -127,7 +126,7 @@ nsScreenManagerGtk :: EnsureInit() + nsresult + nsScreenManagerGtk :: Init() + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XineramaScreenInfo *screenInfo = nullptr; + int numScreens; + +@@ -170,7 +169,7 @@ nsScreenManagerGtk :: Init() + } + + screen->Init(mRootWindow); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + } + // If Xinerama is enabled and there's more than one screen, fill + // in the info for all of the screens. If that's not the case +diff --git a/widget/gtk/nsScreenManagerGtk.h b/widget/gtk/nsScreenManagerGtk.h +index 9afb3bf..60c016d 100644 +--- a/widget/gtk/nsScreenManagerGtk.h ++++ b/widget/gtk/nsScreenManagerGtk.h +@@ -12,7 +12,7 @@ + #include "nsCOMArray.h" + #include "prlink.h" + #include "gdk/gdk.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif + +@@ -26,7 +26,7 @@ public: + NS_DECL_ISUPPORTS + NS_DECL_NSISCREENMANAGER + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Atom NetWorkareaAtom() { return mNetWorkareaAtom; } + #endif + +@@ -44,7 +44,7 @@ private: + PRLibrary *mXineramalib; + + GdkWindow *mRootWindow; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Atom mNetWorkareaAtom; + #endif + }; +diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp +index 7e42743..553fd2e 100644 +--- a/widget/gtk/nsWidgetFactory.cpp ++++ b/widget/gtk/nsWidgetFactory.cpp +@@ -17,11 +17,11 @@ + #include "nsWindow.h" + #include "nsTransferable.h" + #include "nsHTMLFormatConverter.h" +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "nsClipboardHelper.h" + #include "nsClipboard.h" +-#include "nsDragService.h" + #endif ++#include "nsDragService.h" + #if (MOZ_WIDGET_GTK == 3) + #include "nsApplicationChooser.h" + #endif +@@ -44,10 +44,10 @@ + #include "nsImageToPixbuf.h" + #include "nsPrintDialogGTK.h" + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #include "nsIdleServiceGTK.h" +-#include "GfxInfoX11.h" + #endif ++#include "GfxInfoX11.h" + + #include "nsNativeThemeGTK.h" + +@@ -70,12 +70,12 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildWindow) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter) +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIdleServiceGTK, nsIdleServiceGTK::GetInstance) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper) + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsClipboard, Init) +-NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService) + #endif ++NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerGtk) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsImageToPixbuf) +@@ -202,11 +202,11 @@ NS_DEFINE_NAMED_CID(NS_APPLICATIONCHOOSER_CID); + #endif + NS_DEFINE_NAMED_CID(NS_SOUND_CID); + NS_DEFINE_NAMED_CID(NS_TRANSFERABLE_CID); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + NS_DEFINE_NAMED_CID(NS_CLIPBOARD_CID); + NS_DEFINE_NAMED_CID(NS_CLIPBOARDHELPER_CID); +-NS_DEFINE_NAMED_CID(NS_DRAGSERVICE_CID); + #endif ++NS_DEFINE_NAMED_CID(NS_DRAGSERVICE_CID); + NS_DEFINE_NAMED_CID(NS_HTMLFORMATCONVERTER_CID); + NS_DEFINE_NAMED_CID(NS_BIDIKEYBOARD_CID); + NS_DEFINE_NAMED_CID(NS_SCREENMANAGER_CID); +@@ -219,10 +219,10 @@ NS_DEFINE_NAMED_CID(NS_DEVICE_CONTEXT_SPEC_CID); + NS_DEFINE_NAMED_CID(NS_PRINTDIALOGSERVICE_CID); + #endif + NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_CID); +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID); +-NS_DEFINE_NAMED_CID(NS_GFXINFO_CID); + #endif ++NS_DEFINE_NAMED_CID(NS_GFXINFO_CID); + + + static const mozilla::Module::CIDEntry kWidgetCIDs[] = { +@@ -236,11 +236,11 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = { + #endif + { &kNS_SOUND_CID, false, nullptr, nsSoundConstructor, Module::MAIN_PROCESS_ONLY }, + { &kNS_TRANSFERABLE_CID, false, nullptr, nsTransferableConstructor }, +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardConstructor, Module::MAIN_PROCESS_ONLY }, + { &kNS_CLIPBOARDHELPER_CID, false, nullptr, nsClipboardHelperConstructor }, +- { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor, Module::MAIN_PROCESS_ONLY }, + #endif ++ { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor, Module::MAIN_PROCESS_ONLY }, + { &kNS_HTMLFORMATCONVERTER_CID, false, nullptr, nsHTMLFormatConverterConstructor }, + { &kNS_BIDIKEYBOARD_CID, false, nullptr, nsBidiKeyboardConstructor }, + { &kNS_SCREENMANAGER_CID, false, nullptr, nsScreenManagerGtkConstructor, +@@ -254,10 +254,10 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = { + { &kNS_PRINTDIALOGSERVICE_CID, false, nullptr, nsPrintDialogServiceGTKConstructor }, + #endif + { &kNS_IMAGE_TO_PIXBUF_CID, false, nullptr, nsImageToPixbufConstructor }, +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + { &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor }, +- { &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor }, + #endif ++ { &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor }, + { nullptr } + }; + +@@ -272,11 +272,11 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = { + #endif + { "@mozilla.org/sound;1", &kNS_SOUND_CID, Module::MAIN_PROCESS_ONLY }, + { "@mozilla.org/widget/transferable;1", &kNS_TRANSFERABLE_CID }, +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + { "@mozilla.org/widget/clipboard;1", &kNS_CLIPBOARD_CID, Module::MAIN_PROCESS_ONLY }, + { "@mozilla.org/widget/clipboardhelper;1", &kNS_CLIPBOARDHELPER_CID }, +- { "@mozilla.org/widget/dragservice;1", &kNS_DRAGSERVICE_CID, Module::MAIN_PROCESS_ONLY }, + #endif ++ { "@mozilla.org/widget/dragservice;1", &kNS_DRAGSERVICE_CID, Module::MAIN_PROCESS_ONLY }, + { "@mozilla.org/widget/htmlformatconverter;1", &kNS_HTMLFORMATCONVERTER_CID }, + { "@mozilla.org/widget/bidikeyboard;1", &kNS_BIDIKEYBOARD_CID, + Module::MAIN_PROCESS_ONLY }, +@@ -291,10 +291,10 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = { + { NS_PRINTDIALOGSERVICE_CONTRACTID, &kNS_PRINTDIALOGSERVICE_CID }, + #endif + { "@mozilla.org/widget/image-to-gdk-pixbuf;1", &kNS_IMAGE_TO_PIXBUF_CID }, +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + { "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID }, +- { "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID }, + #endif ++ { "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID }, + { nullptr } + }; + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index 7dad6eb..4aefa28 100644 +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -40,11 +40,12 @@ + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #include + #include + #include ++#endif /* MOZ_X11 */ + #if (MOZ_WIDGET_GTK == 3) + #include + #endif +@@ -52,7 +53,6 @@ + #if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif +-#endif /* MOZ_X11 */ + #include + #if (MOZ_WIDGET_GTK == 2) + #include +@@ -116,7 +116,7 @@ using namespace mozilla::widget; + #include "mozilla/layers/CompositorBridgeParent.h" + #include "mozilla/layers/CompositorThread.h" + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include "X11CompositorWidget.h" + #include "gfxXlibSurface.h" + #include "WindowSurfaceX11Image.h" +@@ -131,6 +131,7 @@ using namespace mozilla::widget; + #include "NativeKeyBindings.h" + + #include ++#include + + #include "mozilla/layers/APZCTreeManager.h" + +@@ -238,7 +239,7 @@ static nsWindow* GetFirstNSWindowForGDKWindow (GdkWindow *aGdkWindow); + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static GdkFilterReturn popup_take_focus_filter (GdkXEvent *gdk_xevent, + GdkEvent *event, + gpointer data); +@@ -303,47 +304,20 @@ public: + + guint32 GetCurrentTime() const + { +- return gdk_x11_get_server_time(mWindow); ++ return g_get_monotonic_time()/1000; + } + + void GetTimeAsyncForPossibleBackwardsSkew(const TimeStamp& aNow) + { +- // Check for in-flight request +- if (!mAsyncUpdateStart.IsNull()) { +- return; +- } +- mAsyncUpdateStart = aNow; +- +- Display* xDisplay = GDK_WINDOW_XDISPLAY(mWindow); +- Window xWindow = GDK_WINDOW_XID(mWindow); +- unsigned char c = 'a'; +- Atom timeStampPropAtom = TimeStampPropAtom(); +- XChangeProperty(xDisplay, xWindow, timeStampPropAtom, +- timeStampPropAtom, 8, PropModeReplace, &c, 1); +- XFlush(xDisplay); + } + + gboolean PropertyNotifyHandler(GtkWidget* aWidget, + GdkEventProperty* aEvent) + { +- if (aEvent->atom != +- gdk_x11_xatom_to_atom(TimeStampPropAtom())) { +- return FALSE; +- } +- +- guint32 eventTime = aEvent->time; +- TimeStamp lowerBound = mAsyncUpdateStart; +- +- TimeConverter().CompensateForBackwardsSkew(eventTime, lowerBound); +- mAsyncUpdateStart = TimeStamp(); +- return TRUE; ++ return FALSE; + } + + private: +- static Atom TimeStampPropAtom() { +- return gdk_x11_get_xatom_by_name_for_display( +- gdk_display_get_default(), "GDK_TIMESTAMP_PROP"); +- } + + // This is safe because this class is stored as a member of mWindow and + // won't outlive it. +@@ -435,7 +409,7 @@ nsWindow::nsWindow() + mHandleTouchEvent = false; + #endif + mIsDragPopup = false; +- mIsX11Display = GDK_IS_X11_DISPLAY(gdk_display_get_default()); ++ mIsX11Display = false; + + mContainer = nullptr; + mGdkWindow = nullptr; +@@ -449,7 +423,7 @@ nsWindow::nsWindow() + mLastSizeMode = nsSizeMode_Normal; + mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + mOldFocusWindow = 0; + + mXDisplay = nullptr; +@@ -727,7 +701,7 @@ nsWindow::Destroy() + // destroys the the gl context attached to it). + DestroyCompositor(); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Ensure any resources assigned to the window get cleaned up first + // to avoid double-freeing. + mSurfaceProvider.CleanupResources(); +@@ -1387,14 +1361,7 @@ nsWindow::GetLastUserInputTime() + // drags, WM_DELETE_WINDOW delete events, but not usually mouse motion nor + // button and key releases. Therefore use the most recent of + // gdk_x11_display_get_user_time and the last time that we have seen. +- guint32 timestamp = +- gdk_x11_display_get_user_time(gdk_display_get_default()); +- if (sLastUserInputTime != GDK_CURRENT_TIME && +- TimestampIsNewerThan(sLastUserInputTime, timestamp)) { +- return sLastUserInputTime; +- } +- +- return timestamp; ++ return sLastUserInputTime; + } + + nsresult +@@ -1537,6 +1504,7 @@ nsWindow::UpdateClientOffset() + { + PROFILER_LABEL("nsWindow", "UpdateClientOffset", js::ProfileEntry::Category::GRAPHICS); + ++#ifdef MOZ_X11_no + if (!mIsTopLevel || !mShell || !mGdkWindow || !mIsX11Display || + gtk_window_get_window_type(GTK_WINDOW(mShell)) == GTK_WINDOW_POPUP) { + mClientOffset = nsIntPoint(0, 0); +@@ -1572,6 +1540,7 @@ nsWindow::UpdateClientOffset() + g_free(frame_extents); + + mClientOffset = nsIntPoint(left, top); ++#endif + } + + LayoutDeviceIntPoint +@@ -1729,7 +1698,7 @@ nsWindow::GetNativeData(uint32_t aDataType) + return (void*)mPluginNativeWindow->window; + + case NS_NATIVE_DISPLAY: { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + GdkDisplay* gdkDisplay = gdk_display_get_default(); + if (GDK_IS_X11_DISPLAY(gdkDisplay)) { + return GDK_DISPLAY_XDISPLAY(gdkDisplay); +@@ -1741,7 +1710,7 @@ nsWindow::GetNativeData(uint32_t aDataType) + return GetToplevelWidget(); + + case NS_NATIVE_SHAREABLE_WINDOW: +- return (void *) GDK_WINDOW_XID(gdk_window_get_toplevel(mGdkWindow)); ++ return (void *) NULL; + case NS_NATIVE_PLUGIN_OBJECT_PTR: + return (void *) mPluginNativeWindow; + case NS_RAW_NATIVE_IME_CONTEXT: { +@@ -1957,7 +1926,7 @@ nsWindow::HasPendingInputEvent() + // anything except expose events. Reordering expose and others should be + // ok, hopefully. + bool haveEvent = false; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent ev; + if (mIsX11Display) { + Display *display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +@@ -1992,7 +1961,7 @@ nsWindow::HasPendingInputEvent() + #define WANT_PAINT_FLASHING \ + (debug_WantPaintFlashing() && CAPS_LOCK_IS_ON) + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + static void + gdk_window_flash(GdkWindow * aGdkWindow, + unsigned int aTimes, +@@ -2172,10 +2141,6 @@ nsWindow::OnExposeEvent(cairo_t *cr) + clientLayers->SetNeedsComposite(false); + } + +- LOGDRAW(("sending expose event [%p] %p 0x%lx (rects follow):\n", +- (void *)this, (void *)mGdkWindow, +- gdk_x11_window_get_xid(mGdkWindow))); +- + // Our bounds may have changed after calling WillPaintWindow. Clip + // to the new bounds here. The region is relative to this + // window. +@@ -2497,7 +2462,7 @@ nsWindow::OnSizeAllocate(GtkAllocation *aAllocation) + + mBounds.SizeTo(size); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + if (mCompositorWidgetDelegate) { + mCompositorWidgetDelegate->NotifyClientSizeChanged(GetClientSize()); +@@ -2611,7 +2576,7 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent) + // XXXldb Why skip every other motion event when we have multiple, + // but not more than that? + bool synthEvent = false; +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XEvent xevent; + + if (mIsX11Display) { +@@ -2647,7 +2612,7 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent) + + guint modifierState; + if (synthEvent) { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + event.mRefPoint.x = nscoord(xevent.xmotion.x); + event.mRefPoint.y = nscoord(xevent.xmotion.y); + +@@ -3703,7 +3668,7 @@ nsWindow::Create(nsIWidget* aParent, + // WM_HINTS input field is set to False to tell the window + // manager not to set input focus to this window ... + gtk_window_set_accept_focus(GTK_WINDOW(mShell), FALSE); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // ... but when the window manager offers focus through + // WM_TAKE_FOCUS, focus is requested on the parent window. + gtk_widget_realize(mShell); +@@ -3982,9 +3947,6 @@ nsWindow::Create(nsIWidget* aParent, + + LOG(("nsWindow [%p]\n", (void *)this)); + if (mShell) { +- LOG(("\tmShell %p mContainer %p mGdkWindow %p 0x%lx\n", +- mShell, mContainer, mGdkWindow, +- gdk_x11_window_get_xid(mGdkWindow))); + } else if (mContainer) { + LOG(("\tmContainer %p mGdkWindow %p\n", mContainer, mGdkWindow)); + } +@@ -3997,7 +3959,7 @@ nsWindow::Create(nsIWidget* aParent, + if (!mIsTopLevel) + Resize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, false); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (mIsX11Display && mGdkWindow) { + mXDisplay = GDK_WINDOW_XDISPLAY(mGdkWindow); + mXWindow = gdk_x11_window_get_xid(mGdkWindow); +@@ -4046,7 +4008,7 @@ nsWindow::SetWindowClass(const nsAString &xulWinType) + + gdk_window_set_role(mGdkWindow, role); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (mIsX11Display) { + XClassHint *class_hint = XAllocClassHint(); + if (!class_hint) { +@@ -4108,7 +4070,7 @@ nsWindow::NativeResize() + gdk_window_resize(mGdkWindow, size.width, size.height); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + // This is different than OnSizeAllocate to catch initial sizing + if (mCompositorWidgetDelegate) { +@@ -4164,7 +4126,7 @@ nsWindow::NativeMoveResize() + topLeft.x, topLeft.y, size.width, size.height); + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Notify the X11CompositorWidget of a ClientSizeChange + // This is different than OnSizeAllocate to catch initial sizing + if (mCompositorWidgetDelegate) { +@@ -4555,7 +4517,7 @@ void UpdateMaskBits(gchar* aMaskBits, int32_t aMaskWidth, int32_t aMaskHeight, + void + nsWindow::ApplyTransparencyBitmap() + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // We use X11 calls where possible, because GDK handles expose events + // for shaped windows in a way that's incompatible with us (Bug 635903). + // It doesn't occur when the shapes are set through X. +@@ -4613,7 +4575,7 @@ nsWindow::ClearTransparencyBitmap() + if (!mShell) + return; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + if (!mGdkWindow) + return; + +@@ -4778,31 +4740,7 @@ nsWindow::SetUrgencyHint(GtkWidget *top_window, bool state) + void * + nsWindow::SetupPluginPort(void) + { +- if (!mGdkWindow) +- return nullptr; +- +- if (gdk_window_is_destroyed(mGdkWindow) == TRUE) +- return nullptr; +- +- Window window = gdk_x11_window_get_xid(mGdkWindow); +- +- // we have to flush the X queue here so that any plugins that +- // might be running on separate X connections will be able to use +- // this window in case it was just created +-#ifdef MOZ_X11 +- XWindowAttributes xattrs; +- Display *display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); +- XGetWindowAttributes(display, window, &xattrs); +- XSelectInput (display, window, +- xattrs.your_event_mask | +- SubstructureNotifyMask); +- +- gdk_window_add_filter(mGdkWindow, plugin_window_filter_func, this); +- +- XSync(display, False); +-#endif /* MOZ_X11 */ +- +- return (void *)window; ++ return nullptr; + } + + void +@@ -4817,66 +4755,10 @@ nsWindow::SetPluginType(PluginType aPluginType) + mPluginType = aPluginType; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void + nsWindow::SetNonXEmbedPluginFocus() + { +- if (gPluginFocusWindow == this || mPluginType!=PluginType_NONXEMBED) { +- return; +- } +- +- if (gPluginFocusWindow) { +- RefPtr kungFuDeathGrip = gPluginFocusWindow; +- gPluginFocusWindow->LoseNonXEmbedPluginFocus(); +- } +- +- LOGFOCUS(("nsWindow::SetNonXEmbedPluginFocus\n")); +- +- Window curFocusWindow; +- int focusState; +- +- GdkDisplay *gdkDisplay = gdk_window_get_display(mGdkWindow); +- XGetInputFocus(gdk_x11_display_get_xdisplay(gdkDisplay), +- &curFocusWindow, +- &focusState); +- +- LOGFOCUS(("\t curFocusWindow=%p\n", curFocusWindow)); +- +- GdkWindow* toplevel = gdk_window_get_toplevel(mGdkWindow); +-#if (MOZ_WIDGET_GTK == 2) +- GdkWindow *gdkfocuswin = gdk_window_lookup(curFocusWindow); +-#else +- GdkWindow *gdkfocuswin = gdk_x11_window_lookup_for_display(gdkDisplay, +- curFocusWindow); +-#endif +- +- // lookup with the focus proxy window is supposed to get the +- // same GdkWindow as toplevel. If the current focused window +- // is not the focus proxy, we return without any change. +- if (gdkfocuswin != toplevel) { +- return; +- } +- +- // switch the focus from the focus proxy to the plugin window +- mOldFocusWindow = curFocusWindow; +- XRaiseWindow(GDK_WINDOW_XDISPLAY(mGdkWindow), +- gdk_x11_window_get_xid(mGdkWindow)); +- gdk_error_trap_push(); +- XSetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- gdk_x11_window_get_xid(mGdkWindow), +- RevertToNone, +- CurrentTime); +- gdk_flush(); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif +- gPluginFocusWindow = this; +- gdk_window_add_filter(nullptr, plugin_client_message_filter, this); +- +- LOGFOCUS(("nsWindow::SetNonXEmbedPluginFocus oldfocus=%p new=%p\n", +- mOldFocusWindow, gdk_x11_window_get_xid(mGdkWindow))); + } + + void +@@ -4884,44 +4766,6 @@ nsWindow::LoseNonXEmbedPluginFocus() + { + LOGFOCUS(("nsWindow::LoseNonXEmbedPluginFocus\n")); + +- // This method is only for the nsWindow which contains a +- // Non-XEmbed plugin, for example, JAVA plugin. +- if (gPluginFocusWindow != this || mPluginType!=PluginType_NONXEMBED) { +- return; +- } +- +- Window curFocusWindow; +- int focusState; +- +- XGetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- &curFocusWindow, +- &focusState); +- +- // we only switch focus between plugin window and focus proxy. If the +- // current focused window is not the plugin window, just removing the +- // event filter that blocks the WM_TAKE_FOCUS is enough. WM and gtk2 +- // will take care of the focus later. +- if (!curFocusWindow || +- curFocusWindow == gdk_x11_window_get_xid(mGdkWindow)) { +- +- gdk_error_trap_push(); +- XRaiseWindow(GDK_WINDOW_XDISPLAY(mGdkWindow), +- mOldFocusWindow); +- XSetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), +- mOldFocusWindow, +- RevertToParent, +- CurrentTime); +- gdk_flush(); +-#if (MOZ_WIDGET_GTK == 3) +- gdk_error_trap_pop_ignored(); +-#else +- gdk_error_trap_pop(); +-#endif +- } +- gPluginFocusWindow = nullptr; +- mOldFocusWindow = 0; +- gdk_window_remove_filter(nullptr, plugin_client_message_filter, this); +- + LOGFOCUS(("nsWindow::LoseNonXEmbedPluginFocus end\n")); + } + #endif /* MOZ_X11 */ +@@ -5074,7 +4918,7 @@ nsWindow::PerformFullscreenTransition(FullscreenTransitionStage aStage, + static bool + IsFullscreenSupported(GtkWidget* aShell) + { +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + GdkScreen* screen = gtk_widget_get_screen(aShell); + GdkAtom atom = gdk_atom_intern("_NET_WM_STATE_FULLSCREEN", FALSE); + if (!gdk_x11_screen_supports_net_wm_hint(screen, atom)) { +@@ -5154,7 +4998,7 @@ nsWindow::HideWindowChrome(bool aShouldHide) + // and flush the queue here so that we don't end up with a BadWindow + // error later when this happens (when the persistence timer fires + // and GetWindowPos is called) +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + XSync(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()) , False); + #else + gdk_flush (); +@@ -5757,7 +5601,7 @@ focus_out_event_cb(GtkWidget *widget, GdkEventFocus *event) + return FALSE; + } + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // For long-lived popup windows that don't really take focus themselves but + // may have elements that accept keyboard input when the parent window is + // active, focus is handled specially. These windows include noautohide +@@ -5939,7 +5783,7 @@ key_press_event_cb(GtkWidget *widget, GdkEventKey *event) + + RefPtr focusWindow = gFocusWindow ? gFocusWindow : window; + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + // Keyboard repeat can cause key press events to queue up when there are + // slow event handlers (bug 301029). Throttle these events by removing + // consecutive pending duplicate KeyPress events to the same window. +@@ -6563,14 +6407,13 @@ nsWindow::GetDrawTargetForGdkDrawable(GdkDrawable* aDrawable, + already_AddRefed + nsWindow::StartRemoteDrawingInRegion(LayoutDeviceIntRegion& aInvalidRegion, BufferMode* aBufferMode) + { +- return mSurfaceProvider.StartRemoteDrawingInRegion(aInvalidRegion, aBufferMode); ++ return NULL; + } + + void + nsWindow::EndRemoteDrawingInRegion(DrawTarget* aDrawTarget, + LayoutDeviceIntRegion& aInvalidRegion) + { +- mSurfaceProvider.EndRemoteDrawingInRegion(aDrawTarget, aInvalidRegion); + } + + // Code shared begin BeginMoveDrag and BeginResizeDrag +@@ -7009,7 +6852,7 @@ nsWindow::RoundsWidgetCoordinatesTo() + + void nsWindow::GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInitData* aInitData) + { +- #ifdef MOZ_X11 ++ #ifdef MOZ_X11_no + *aInitData = mozilla::widget::CompositorWidgetInitData( + mXWindow, + nsCString(XDisplayString(mXDisplay)), +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +index 4f61de3..ff66233 100644 +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -20,12 +20,12 @@ + #include + #include + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #endif /* MOZ_X11 */ + + #include "mozilla/widget/WindowSurface.h" +-#include "mozilla/widget/WindowSurfaceProvider.h" ++//#include "mozilla/widget/WindowSurfaceProvider.h" + + #ifdef ACCESSIBILITY + #include "mozilla/a11y/Accessible.h" +@@ -243,7 +243,7 @@ public: + }; + + void SetPluginType(PluginType aPluginType); +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + void SetNonXEmbedPluginFocus(void); + void LoseNonXEmbedPluginFocus(void); + #endif /* MOZ_X11 */ +@@ -252,7 +252,7 @@ public: + void OnDPIChanged(void); + void OnCheckResize(void); + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Window mOldFocusWindow; + #endif /* MOZ_X11 */ + +@@ -348,7 +348,7 @@ public: + nsIObserver* aObserver) override; + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Display* XDisplay() { return mXDisplay; } + #endif + virtual void GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInitData* aInitData) override; +@@ -459,7 +459,7 @@ private: + nsRefPtrHashtable, mozilla::dom::Touch> mTouches; + #endif + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + Display* mXDisplay; + Window mXWindow; + Visual* mXVisual; +diff --git a/widget/moz.build b/widget/moz.build +index da62f78..856e483 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -209,10 +209,10 @@ if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ + 'GfxInfoX11.cpp' + ] +- SOURCES += [ +- 'nsShmImage.cpp', +- 'WindowSurfaceX11SHM.cpp', +- ] ++ #SOURCES += [ ++ # 'nsShmImage.cpp', ++ # 'WindowSurfaceX11SHM.cpp', ++ #] + + if toolkit in ('cocoa', 'windows'): + UNIFIED_SOURCES += [ +diff --git a/widget/nsShmImage.h b/widget/nsShmImage.h +index dae09c6..adfe56f 100644 +--- a/widget/nsShmImage.h ++++ b/widget/nsShmImage.h +@@ -7,7 +7,7 @@ + #ifndef __mozilla_widget_nsShmImage_h__ + #define __mozilla_widget_nsShmImage_h__ + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + # define MOZ_HAVE_SHMIMAGE + #endif + +diff --git a/widget/x11/keysym2ucs.h b/widget/x11/keysym2ucs.h +index d3c49a6..b3db16d 100644 +--- a/widget/x11/keysym2ucs.h ++++ b/widget/x11/keysym2ucs.h +@@ -11,7 +11,7 @@ + * (UCS, Unicode) values. + */ + +-#ifdef MOZ_X11 ++#ifdef MOZ_X11_no + #include + #else + #define KeySym unsigned int diff --git a/patches/www-client/firefox-53.0/namespace-conflict-gcc6.patch b/patches/www-client/firefox-53.0/namespace-conflict-gcc6.patch new file mode 100644 index 0000000..148d6d7 --- /dev/null +++ b/patches/www-client/firefox-53.0/namespace-conflict-gcc6.patch @@ -0,0 +1,31 @@ +diff --git a/dom/media/webrtc/MediaEngine.h b/dom/media/webrtc/MediaEngine.h +index fd24f16..57d59fd 100644 +--- a/dom/media/webrtc/MediaEngine.h ++++ b/dom/media/webrtc/MediaEngine.h +@@ -226,7 +226,7 @@ public: + ~AllocationHandle() {} + public: + AllocationHandle(const dom::MediaTrackConstraints& aConstraints, +- const ipc::PrincipalInfo& aPrincipalInfo, ++ const mozilla::ipc::PrincipalInfo& aPrincipalInfo, + const MediaEnginePrefs& aPrefs, + const nsString& aDeviceId) + +@@ -236,7 +236,7 @@ public: + mDeviceId(aDeviceId) {} + public: + NormalizedConstraints mConstraints; +- ipc::PrincipalInfo mPrincipalInfo; ++ mozilla::ipc::PrincipalInfo mPrincipalInfo; + MediaEnginePrefs mPrefs; + nsString mDeviceId; + }; +@@ -327,7 +327,7 @@ public: + virtual nsresult Allocate(const dom::MediaTrackConstraints &aConstraints, + const MediaEnginePrefs &aPrefs, + const nsString& aDeviceId, +- const ipc::PrincipalInfo& aPrincipalInfo, ++ const mozilla::ipc::PrincipalInfo& aPrincipalInfo, + AllocationHandle** aOutHandle, + const char** aOutBadConstraint) + { diff --git a/patches/www-client/firefox-53.0/nogtk2-and-nox11-configure.patch b/patches/www-client/firefox-53.0/nogtk2-and-nox11-configure.patch new file mode 100644 index 0000000..af8670f --- /dev/null +++ b/patches/www-client/firefox-53.0/nogtk2-and-nox11-configure.patch @@ -0,0 +1,176 @@ +diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp +index 9e0fa93..1d7dc13 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.cpp ++++ b/dom/plugins/ipc/PluginInstanceChild.cpp +@@ -52,7 +52,9 @@ using namespace std; + #include + #include + #include ++#if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" ++#endif + + #elif defined(OS_WIN) + +@@ -152,7 +154,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface, + , mAsyncInvalidateTask(0) + , mCachedWindowActor(nullptr) + , mCachedElementActor(nullptr) +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + , mXEmbed(false) + #endif // MOZ_WIDGET_GTK + #if defined(OS_WIN) +@@ -199,7 +201,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface, + #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) + mWindow.ws_info = &mWsInfo; + memset(&mWsInfo, 0, sizeof(mWsInfo)); +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + mWsInfo.display = nullptr; + mXtClient.top_widget = nullptr; + #else +@@ -599,7 +601,7 @@ PluginInstanceChild::NPN_SetValue(NPPVariable aVar, void* aValue) + return NPERR_GENERIC_ERROR; + + NPWindowType newWindowType = windowed ? NPWindowTypeWindow : NPWindowTypeDrawable; +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mWindow.type != newWindowType && mWsInfo.display) { + // plugin type has been changed but we already have a valid display + // so update it for the recent plugin mode +@@ -1191,7 +1193,7 @@ bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow) + aWindow.x, aWindow.y, + aWindow.width, aWindow.height)); + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXEmbed) { + mWindow.window = reinterpret_cast(aWindow.window); + } +@@ -1220,7 +1222,7 @@ void PluginInstanceChild::DeleteWindow() + if (!mWindow.window) + return; + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXtClient.top_widget) { + xt_client_unrealize(&mXtClient); + xt_client_destroy(&mXtClient); +@@ -1302,7 +1304,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + CreateWindow(aWindow); + } + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mXEmbed && gtk_check_version(2,18,7) != nullptr) { // older + if (aWindow.type == NPWindowTypeWindow) { + GdkWindow* socket_window = gdk_window_lookup(static_cast(aWindow.window)); +@@ -1425,7 +1427,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow) + bool + PluginInstanceChild::Initialize() + { +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + NPError rv; + + if (mWsInfo.display) { +@@ -4508,7 +4510,7 @@ PluginInstanceChild::Destroy() + + mPendingAsyncCalls.Clear(); + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + if (mWindow.type == NPWindowTypeWindow && !mXEmbed) { + xt_client_xloop_destroy(); + } +diff --git a/dom/plugins/ipc/PluginInstanceChild.h b/dom/plugins/ipc/PluginInstanceChild.h +index f6d5320..13124ff 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.h ++++ b/dom/plugins/ipc/PluginInstanceChild.h +@@ -35,7 +35,7 @@ + + #include + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif + +@@ -456,7 +456,7 @@ private: + + #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) + NPSetWindowCallbackStruct mWsInfo; +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + bool mXEmbed; + XtClient mXtClient; + #endif +diff --git a/old-configure.in b/old-configure.in +index bcc3b79..185bf75 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -2455,8 +2455,6 @@ if test "$COMPILE_ENVIRONMENT"; then + AC_DEFINE_UNQUOTED(GLIB_VERSION_MIN_REQUIRED,$GLIB_VERSION_MIN_REQUIRED) + AC_DEFINE_UNQUOTED(GLIB_VERSION_MAX_ALLOWED,$GLIB_VERSION_MAX_ALLOWED) + +- PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES) +- MOZ_GTK2_CFLAGS="-I${_topsrcdir}/widget/gtk/compat $MOZ_GTK2_CFLAGS" + fi + if test "$MOZ_WIDGET_TOOLKIT" = gtk2; then + TK_CFLAGS=$MOZ_GTK2_CFLAGS +@@ -2829,7 +2827,7 @@ dnl enable once PeerConnection lands + AC_DEFINE(MOZ_SCTP) + AC_DEFINE(MOZ_SRTP) + if test -n "$MOZ_X11"; then +- MOZ_WEBRTC_X11_LIBS="-lXext -lXdamage -lXfixes -lXcomposite" ++ MOZ_WEBRTC_X11_LIBS="" + fi + else + MOZ_SYNTH_PICO= +@@ -4979,12 +4977,7 @@ else + MOZ_CAIRO_CFLAGS="$CAIRO_CFLAGS" + MOZ_CAIRO_LIBS="$CAIRO_LIBS" + PKG_CHECK_MODULES(CAIRO_TEE, cairo-tee >= $CAIRO_VERSION) +- if test "$MOZ_X11"; then +- PKG_CHECK_MODULES(CAIRO_XRENDER, cairo-xlib-xrender >= $CAIRO_VERSION) +- MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS" + MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_LIBS" +- MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS" +- fi + fi + + case "$MOZ_WIDGET_TOOLKIT" in +@@ -5510,7 +5503,7 @@ if test -n "$COMPILE_ENVIRONMENT"; then + AC_CHECK_FUNCS(posix_fadvise posix_fallocate) + + dnl Check for missing components +-if test "$MOZ_X11"; then ++if test "$MOZ_X11_no"; then + dnl ==================================================== + dnl = Check if X headers exist + dnl ==================================================== +diff --git a/widget/gtk/mozgtk/moz.build b/widget/gtk/mozgtk/moz.build +index 528e2e9..d32ee82 100644 +--- a/widget/gtk/mozgtk/moz.build ++++ b/widget/gtk/mozgtk/moz.build +@@ -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'] +diff --git a/widget/moz.build b/widget/moz.build +index ae1694f..da62f78 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -51,9 +51,6 @@ TEST_DIRS += ['tests'] + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + DIRS += ['gtk'] + +- if CONFIG['MOZ_X11']: +- DIRS += ['gtkxtbin'] +- + XPIDL_SOURCES += [ + 'nsIAppShell.idl', + 'nsIBaseWindow.idl', diff --git a/patches/www-client/firefox-53.0/zz-test-x11comp.patch b/patches/www-client/firefox-53.0/zz-test-x11comp.patch new file mode 100644 index 0000000..d6b2459 --- /dev/null +++ b/patches/www-client/firefox-53.0/zz-test-x11comp.patch @@ -0,0 +1,185 @@ +diff --git a/widget/gtk/CompositorWidgetParent.h b/widget/gtk/CompositorWidgetParent.h +index 4f70cb3..90ddb70 100644 +--- a/widget/gtk/CompositorWidgetParent.h ++++ b/widget/gtk/CompositorWidgetParent.h +@@ -6,15 +6,15 @@ + #ifndef widget_gtk_CompositorWidgetParent_h + #define widget_gtk_CompositorWidgetParent_h + +-//#include "X11CompositorWidget.h" ++#include "X11CompositorWidget.h" + #include "mozilla/widget/PCompositorWidgetParent.h" + + namespace mozilla { + namespace widget { + + class CompositorWidgetParent final +- : public PCompositorWidgetParent//, +- //public X11CompositorWidget ++ : public PCompositorWidgetParent, ++ public X11CompositorWidget + { + public: + explicit CompositorWidgetParent(const CompositorWidgetInitData& aInitData, +diff --git a/widget/gtk/WindowSurfaceProvider.h b/widget/gtk/WindowSurfaceProvider.h +index 73b2303..7b69e4f 100644 +--- a/widget/gtk/WindowSurfaceProvider.h ++++ b/widget/gtk/WindowSurfaceProvider.h +@@ -12,7 +12,7 @@ + #include "mozilla/gfx/2D.h" + #include "Units.h" + +-#include // for Window, Display, Visual, etc. ++//#include // for Window, Display, Visual, etc. + + namespace mozilla { + namespace widget { +@@ -33,11 +33,11 @@ public: + * own the Display, Window, etc, and they must continue to exist + * while WindowSurfaceProvider is used. + */ +- void Initialize( +- Display* aDisplay, +- Window aWindow, +- Visual* aVisual, +- int aDepth); ++// void Initialize( ++// Display* aDisplay, ++// Window aWindow, ++// Visual* aVisual, ++// int aDepth); + + /** + * Releases any surfaces created by this provider. +@@ -55,10 +55,10 @@ public: + private: + UniquePtr CreateWindowSurface(); + +- Display* mXDisplay; +- Window mXWindow; +- Visual* mXVisual; +- int mXDepth; ++// Display* mXDisplay; ++// Window mXWindow; ++// Visual* mXVisual; ++// int mXDepth; + + UniquePtr mWindowSurface; + }; +diff --git a/widget/gtk/X11CompositorWidget.h b/widget/gtk/X11CompositorWidget.h +index a4d5763..9d09476 100644 +--- a/widget/gtk/X11CompositorWidget.h ++++ b/widget/gtk/X11CompositorWidget.h +@@ -50,8 +50,8 @@ public: + X11CompositorWidget* AsX11() override { return this; } + CompositorWidgetDelegate* AsDelegate() override { return this; } + +- Display* XDisplay() const { return mXDisplay; } +- Window XWindow() const { return mXWindow; } ++ //Display* XDisplay() const { return mXDisplay; } ++ //Window XWindow() const { return mXWindow; } + + protected: + nsWindow* mWidget; +@@ -59,8 +59,8 @@ protected: + private: + LayoutDeviceIntSize mClientSize; + +- Display* mXDisplay; +- Window mXWindow; ++ //Display* mXDisplay; ++ //Window mXWindow; + WindowSurfaceProvider mProvider; + }; + +diff --git a/widget/gtk/X11CompositorWidget.cpp b/widget/gtk/X11CompositorWidget.cpp +index 864f821..41cedd9 100644 +--- a/widget/gtk/X11CompositorWidget.cpp ++++ b/widget/gtk/X11CompositorWidget.cpp +@@ -15,34 +15,34 @@ namespace mozilla { + namespace widget { + + X11CompositorWidget::X11CompositorWidget(const CompositorWidgetInitData& aInitData, +- const CompositorOptions& aOptions, ++ const layers::CompositorOptions& aOptions, + nsWindow* aWindow) + : CompositorWidget(aOptions) + , mWidget(aWindow) + { + // If we have a nsWindow, then grab the already existing display connection + // If we don't, then use the init data to connect to the display +- if (aWindow) { +- mXDisplay = aWindow->XDisplay(); +- } else { +- mXDisplay = XOpenDisplay(aInitData.XDisplayString().get()); +- } +- mXWindow = (Window)aInitData.XWindow(); ++ //if (aWindow) { ++ // mXDisplay = aWindow->XDisplay(); ++ //} else { ++ // mXDisplay = XOpenDisplay(aInitData.XDisplayString().get()); ++ //} ++ //mXWindow = (Window)aInitData.XWindow(); + + // Grab the window's visual and depth +- XWindowAttributes windowAttrs; +- XGetWindowAttributes(mXDisplay, mXWindow, &windowAttrs); ++ //XWindowAttributes windowAttrs; ++ //XGetWindowAttributes(mXDisplay, mXWindow, &windowAttrs); + +- Visual* visual = windowAttrs.visual; +- int depth = windowAttrs.depth; ++ //Visual* visual = windowAttrs.visual; ++ //int depth = windowAttrs.depth; + + // Initialize the window surface provider +- mProvider.Initialize( +- mXDisplay, +- mXWindow, +- visual, +- depth +- ); ++ //mProvider.Initialize( ++ // mXDisplay, ++ // mXWindow, ++ // visual, ++ // depth ++ // ); + + mClientSize = aInitData.InitialClientSize(); + } +@@ -52,10 +52,10 @@ X11CompositorWidget::~X11CompositorWidget() + mProvider.CleanupResources(); + + // If we created our own display connection, we need to destroy it +- if (!mWidget && mXDisplay) { +- XCloseDisplay(mXDisplay); +- mXDisplay = nullptr; +- } ++ //if (!mWidget && mXDisplay) { ++ // XCloseDisplay(mXDisplay); ++ // mXDisplay = nullptr; ++ //} + } + + already_AddRefed +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index 1a2c11c..299e4d8 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -49,13 +49,13 @@ if CONFIG['MOZ_X11']: + 'CompositorWidgetParent.cpp', + #'InProcessX11CompositorWidget.cpp', + #'nsIdleServiceGTK.cpp', +- #'X11CompositorWidget.cpp', ++ 'X11CompositorWidget.cpp', + ] + EXPORTS.mozilla.widget += [ + 'CompositorWidgetChild.h', + 'CompositorWidgetParent.h', + #'InProcessX11CompositorWidget.h', +- #'X11CompositorWidget.h', ++ 'X11CompositorWidget.h', + ] + + if CONFIG['NS_PRINTING']: diff --git a/patches/www-client/firefox-53.0/zz-z-test-x11comp.patch b/patches/www-client/firefox-53.0/zz-z-test-x11comp.patch new file mode 100644 index 0000000..1f06357 --- /dev/null +++ b/patches/www-client/firefox-53.0/zz-z-test-x11comp.patch @@ -0,0 +1,1518 @@ +diff --git a/config/system-headers b/config/system-headers +index 15671ce..989e508 100644 +--- a/config/system-headers ++++ b/config/system-headers +@@ -488,6 +488,7 @@ gdk/gdk.h + gdk/gdkkeysyms.h + gdk/gdkprivate.h + gdk/gdkx.h ++gdk/gdkwayland.h + gdk/gdkdirectfb.h + gdk-pixbuf/gdk-pixbuf.h + Gestalt.h +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +index 815b5f2..0fbfac9 100644 +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -55,6 +55,8 @@ + + #endif /* MOZ_X11 */ + ++#include ++ + #include + + #include "nsMathUtils.h" +@@ -107,6 +109,8 @@ gfxPlatformGtk::gfxPlatformGtk() + + #ifdef MOZ_X11 + mCompositorDisplay = nullptr; ++ mWaylandCompositorDisplay = wl_display_connect(nullptr); ++ MOZ_ASSERT(mWaylandCompositorDisplay, "Failed to create compositor display!"); + #endif // MOZ_X11 + } + +@@ -123,6 +127,7 @@ gfxPlatformGtk::~gfxPlatformGtk() + XCloseDisplay(mCompositorDisplay); + } + #endif // MOZ_X11 ++ wl_display_disconnect(mWaylandCompositorDisplay); + } + + void +diff --git a/gfx/thebes/gfxPlatformGtk.h b/gfx/thebes/gfxPlatformGtk.h +index 25706de..46590a6 100644 +--- a/gfx/thebes/gfxPlatformGtk.h ++++ b/gfx/thebes/gfxPlatformGtk.h +@@ -21,6 +21,7 @@ extern "C" { + struct _XDisplay; + typedef struct _XDisplay Display; + #endif // MOZ_X11 ++struct wl_display; + + class gfxFontconfigUtils; + +@@ -144,6 +145,9 @@ public: + Display* GetCompositorDisplay() { + return mCompositorDisplay; + } ++ wl_display* GetWaylandCompositorDisplay() { ++ return mWaylandCompositorDisplay; ++ } + #endif // MOZ_X11 + + protected: +@@ -157,6 +161,7 @@ private: + + #ifdef MOZ_X11 + Display* mCompositorDisplay; ++ wl_display* mWaylandCompositorDisplay; + #endif + + // xxx - this will be removed once the new fontconfig platform font list +diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build +index 16747f7..c4ec6c1 100644 +--- a/toolkit/library/moz.build ++++ b/toolkit/library/moz.build +@@ -311,6 +311,9 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + OS_LIBS += [ + 'gthread-2.0', + ] ++ OS_LIBS += [ ++ 'wayland-client', ++ ] + + if CONFIG['MOZ_ENABLE_STARTUP_NOTIFICATION']: + OS_LIBS += CONFIG['MOZ_STARTUP_NOTIFICATION_LIBS'] +diff --git a/widget/gtk/CompositorWidgetChild.h b/widget/gtk/CompositorWidgetChild.h +index 4e188d9..fce2f14 100644 +--- a/widget/gtk/CompositorWidgetChild.h ++++ b/widget/gtk/CompositorWidgetChild.h +@@ -6,7 +6,7 @@ + #ifndef widget_gtk_CompositorWidgetChild_h + #define widget_gtk_CompositorWidgetChild_h + +-//#include "X11CompositorWidget.h" ++#include "X11CompositorWidget.h" + #include "mozilla/widget/PCompositorWidgetChild.h" + #include "mozilla/widget/CompositorWidgetVsyncObserver.h" + +@@ -15,6 +15,7 @@ namespace widget { + + class CompositorWidgetChild final + : public PCompositorWidgetChild ++ , public CompositorWidgetDelegate + { + public: + CompositorWidgetChild(RefPtr aVsyncDispatcher, +diff --git a/widget/gtk/WindowSurfaceProvider.cpp b/widget/gtk/WindowSurfaceProvider.cpp +index 526fe6a..5540628 100644 +--- a/widget/gtk/WindowSurfaceProvider.cpp ++++ b/widget/gtk/WindowSurfaceProvider.cpp +@@ -8,9 +8,10 @@ + + #include "gfxPlatformGtk.h" + #include "mozilla/layers/LayersTypes.h" +-#include "WindowSurfaceX11Image.h" +-#include "WindowSurfaceX11SHM.h" +-#include "WindowSurfaceXRender.h" ++//#include "WindowSurfaceX11Image.h" ++//#include "WindowSurfaceX11SHM.h" ++//#include "WindowSurfaceXRender.h" ++#include "WindowSurfaceWayland.h" + + namespace mozilla { + namespace widget { +@@ -19,30 +20,46 @@ using namespace mozilla::gfx; + using namespace mozilla::layers; + + WindowSurfaceProvider::WindowSurfaceProvider() +- : mXDisplay(nullptr) +- , mXWindow(0) +- , mXVisual(nullptr) +- , mXDepth(0) +- , mWindowSurface(nullptr) ++ : //mXDisplay(nullptr) ++ //, mXWindow(0) ++ //, mXVisual(nullptr) ++ //, mXDepth(0) ++ /*,*/ mWindowSurface(nullptr) ++ , mWidget(nullptr) ++ , mWaylandDisplay(nullptr) ++ , mWaylandSurface(nullptr) + { + } + ++//void WindowSurfaceProvider::Initialize( ++// Display* aDisplay, ++// Window aWindow, ++// Visual* aVisual, ++// int aDepth) ++//{ ++// // We should not be initialized ++// MOZ_ASSERT(!mXDisplay); ++// ++// // This should also be a valid initialization ++// MOZ_ASSERT(aDisplay && aWindow != X11None && aVisual); ++// ++// mXDisplay = aDisplay; ++// mXWindow = aWindow; ++// mXVisual = aVisual; ++// mXDepth = aDepth; ++//} ++ + void WindowSurfaceProvider::Initialize( +- Display* aDisplay, +- Window aWindow, +- Visual* aVisual, +- int aDepth) ++ nsWindow *aWidget, ++ wl_display *aWaylandDisplay, ++ wl_surface *aWaylandSurface) + { + // We should not be initialized +- MOZ_ASSERT(!mXDisplay); +- +- // This should also be a valid initialization +- MOZ_ASSERT(aDisplay && aWindow != X11None && aVisual); ++ MOZ_ASSERT(!mWaylandSurface); + +- mXDisplay = aDisplay; +- mXWindow = aWindow; +- mXVisual = aVisual; +- mXDepth = aDepth; ++ mWidget = aWidget; ++ mWaylandDisplay = aWaylandDisplay; ++ mWaylandSurface = aWaylandSurface; + } + void WindowSurfaceProvider::CleanupResources() + { +@@ -52,30 +69,33 @@ void WindowSurfaceProvider::CleanupResources() + UniquePtr + WindowSurfaceProvider::CreateWindowSurface() + { ++ MOZ_ASSERT(mWaylandDisplay); ++ LOGDRAW(("Drawing to nsWindow %p using wl_surface\n", (void*)this)); ++ return MakeUnique(mWidget, mWaylandDisplay, mWaylandSurface); + // We should be initialized +- MOZ_ASSERT(mXDisplay); ++// MOZ_ASSERT(mXDisplay); + + // Blit to the window with the following priority: + // 1. XRender (iff XRender is enabled && we are in-process) + // 2. MIT-SHM + // 3. XPutImage + +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK_no + if (gfxVars::UseXRender()) { + LOGDRAW(("Drawing to nsWindow %p using XRender\n", (void*)this)); + return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); + } + #endif // MOZ_WIDGET_GTK + +-#ifdef MOZ_HAVE_SHMIMAGE ++#ifdef MOZ_HAVE_SHMIMAGE_no + if (nsShmImage::UseShm()) { + LOGDRAW(("Drawing to nsWindow %p using MIT-SHM\n", (void*)this)); + return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); + } + #endif // MOZ_HAVE_SHMIMAGE + +- LOGDRAW(("Drawing to nsWindow %p using XPutImage\n", (void*)this)); +- return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); ++ //LOGDRAW(("Drawing to nsWindow %p using XPutImage\n", (void*)this)); ++ //return MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); + } + + already_AddRefed +@@ -93,12 +113,12 @@ WindowSurfaceProvider::StartRemoteDrawingInRegion(LayoutDeviceIntRegion& aInvali + + *aBufferMode = BufferMode::BUFFER_NONE; + RefPtr dt = nullptr; +- if (!(dt = mWindowSurface->Lock(aInvalidRegion)) && +- !mWindowSurface->IsFallback()) { +- gfxWarningOnce() << "Failed to lock WindowSurface, falling back to XPutImage backend."; +- mWindowSurface = MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); +- dt = mWindowSurface->Lock(aInvalidRegion); +- } ++ //if (!(dt = mWindowSurface->Lock(aInvalidRegion)) && ++ // !mWindowSurface->IsFallback()) { ++ // gfxWarningOnce() << "Failed to lock WindowSurface, falling back to XPutImage backend."; ++ // mWindowSurface = MakeUnique(mXDisplay, mXWindow, mXVisual, mXDepth); ++ // dt = mWindowSurface->Lock(aInvalidRegion); ++ //} + return dt.forget(); + } + +diff --git a/widget/gtk/WindowSurfaceProvider.h b/widget/gtk/WindowSurfaceProvider.h +index 7b69e4f..41829f1 100644 +--- a/widget/gtk/WindowSurfaceProvider.h ++++ b/widget/gtk/WindowSurfaceProvider.h +@@ -12,7 +12,10 @@ + #include "mozilla/gfx/2D.h" + #include "Units.h" + ++#include ++#include + //#include // for Window, Display, Visual, etc. ++class nsWindow; + + namespace mozilla { + namespace widget { +@@ -38,6 +41,9 @@ public: + // Window aWindow, + // Visual* aVisual, + // int aDepth); ++ void Initialize(nsWindow *aWidget, ++ wl_display *aWaylandDisplay, ++ wl_surface *aWaylandSurface); + + /** + * Releases any surfaces created by this provider. +@@ -61,6 +67,9 @@ private: + // int mXDepth; + + UniquePtr mWindowSurface; ++ nsWindow* mWidget; ++ wl_display* mWaylandDisplay; ++ wl_surface* mWaylandSurface; + }; + + } // namespace widget +diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp +new file mode 100644 +index 0000000..ed8c238 +--- /dev/null ++++ b/widget/gtk/WindowSurfaceWayland.cpp +@@ -0,0 +1,527 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "WindowSurfaceWayland.h" ++ ++#include "base/message_loop.h" // for MessageLoop ++#include "base/task.h" // for NewRunnableMethod, etc ++#include "nsPrintfCString.h" ++#include "mozilla/gfx/2D.h" ++#include "mozilla/gfx/Tools.h" ++#include "gfxPlatform.h" ++#include "mozcontainer.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++namespace mozilla { ++namespace widget { ++ ++static nsWaylandDisplay* gWaylandDisplay = nullptr; ++ ++static void ++WaylandDisplayAddRef(wl_display *aDisplay) ++{ ++ // We should run in Compositor thread ++ MOZ_ASSERT(!NS_IsMainThread()); ++ if (!gWaylandDisplay) { ++ gWaylandDisplay = new nsWaylandDisplay(aDisplay); ++ } else { ++ MOZ_ASSERT(gWaylandDisplay->GetDisplay() == aDisplay, ++ "Unknown Wayland display!"); ++ } ++ NS_ADDREF(gWaylandDisplay); ++} ++ ++static void ++WaylandDisplayRelease(void *aUnused) ++{ ++ MOZ_ASSERT(!NS_IsMainThread()); ++ NS_IF_RELEASE(gWaylandDisplay); ++} ++ ++static void ++WaylandDisplayLoop(void *tmp) ++{ ++ MOZ_ASSERT(!NS_IsMainThread()); ++ ++ // Check we still have the display interface ++ if (gWaylandDisplay && gWaylandDisplay->DisplayLoop()) { ++ MessageLoop::current()->PostTask( ++ NewRunnableFunction(&WaylandDisplayLoop, nullptr)); ++ } ++} ++ ++void ++nsWaylandDisplay::SetWaylandPixelFormat(uint32_t format) ++{ ++ switch (format) { ++ case WL_SHM_FORMAT_ARGB8888: ++ mFormat = gfx::SurfaceFormat::B8G8R8A8; ++ break; ++ case WL_SHM_FORMAT_XRGB8888: ++ // TODO - We can use non-alpha formats when we need that ++ default: ++ break; ++ } ++} ++ ++static void ++shm_format(void *data, wl_shm *wl_shm, uint32_t format) ++{ ++ auto interface = reinterpret_cast(data); ++ interface->SetWaylandPixelFormat(format); ++ } ++ ++struct wl_shm_listener shm_listener = { ++ shm_format ++}; ++ ++static void ++global_registry_handler(void *data, wl_registry *registry, uint32_t id, ++ const char *interface, uint32_t version) ++{ ++ if (strcmp(interface, "wl_shm") == 0) { ++ auto interface = reinterpret_cast(data); ++ auto shm = static_cast( ++ wl_registry_bind(registry, id, &wl_shm_interface, 1)); ++ wl_proxy_set_queue((struct wl_proxy *)shm, interface->GetEventQueue()); ++ wl_shm_add_listener(shm, &shm_listener, data); ++ interface->SetShm(shm); ++ } ++} ++ ++static void ++global_registry_remover(void *data, wl_registry *registry, uint32_t id) ++{ ++} ++ ++static const struct wl_registry_listener registry_listener = { ++ global_registry_handler, ++ global_registry_remover ++}; ++ ++bool ++nsWaylandDisplay::DisplayLoop() ++{ ++ /* NoteThis function may dispatch other events being received on the given ++ queue. This function uses wl_display_dispatch_queue() internally. ++ If you are using wl_display_read_events() from more threads, ++ don't use this function (or make sure that calling wl_display_roundtrip_queue() ++ doesn't interfere with calling wl_display_prepare_read() and ++ wl_display_read_events()). ++ */ ++ return wl_display_roundtrip_queue(mDisplay, mEventQueue) != -1; ++} ++ ++NS_IMPL_ISUPPORTS(nsWaylandDisplay, nsISupports); ++ ++nsWaylandDisplay::nsWaylandDisplay(wl_display *aDisplay) ++ : mDisplay(aDisplay) ++{ ++ // We're supposed to run in Compositor thread ++ MOZ_ASSERT(!NS_IsMainThread()); ++ ++ mEventQueue = wl_display_create_queue(mDisplay); ++ ++ // wl_shm and wl_subcompositor are not provided by Gtk so we need ++ // to query wayland directly ++ wl_registry* registry = wl_display_get_registry(mDisplay); ++ wl_proxy_set_queue((struct wl_proxy *)registry, mEventQueue); ++ wl_registry_add_listener(registry, ®istry_listener, this); ++ ++ // We need two roundtrips here to get the registry info ++ wl_display_dispatch_queue(mDisplay, mEventQueue); ++ wl_display_roundtrip_queue(mDisplay, mEventQueue); ++ wl_display_roundtrip_queue(mDisplay, mEventQueue); ++ ++ // We must have a valid pixel format ++ MOZ_RELEASE_ASSERT(mFormat != gfx::SurfaceFormat::UNKNOWN, ++ "We don't have any pixel format!"); ++ ++ // TODO - is that correct way how to run wayland event pump? ++ MessageLoop::current()->PostTask(NewRunnableFunction(&WaylandDisplayLoop, nullptr)); ++} ++ ++nsWaylandDisplay::~nsWaylandDisplay() ++{ ++ MOZ_ASSERT(!NS_IsMainThread()); ++ wl_event_queue_destroy(mEventQueue); ++ mEventQueue = nullptr; ++ mDisplay = nullptr; ++} ++ ++int ++WaylandShmPool::CreateTemporaryFile(int aSize) ++{ ++ const char* tmppath = getenv("XDG_RUNTIME_DIR"); ++ MOZ_RELEASE_ASSERT(tmppath, "Missing XDG_RUNTIME_DIR env variable."); ++ ++ nsPrintfCString tmpname("%s/weston-shared-XXXXXX", tmppath); ++ ++ char* filename; ++ int fd = -1; ++ ++ if (tmpname.GetMutableData(&filename)) { ++ fd = mkstemp(filename); ++ if (fd >= 0) { ++ int flags = fcntl(fd, F_GETFD); ++ if (flags >= 0) { ++ fcntl(fd, F_SETFD, flags | FD_CLOEXEC); ++ } ++ } ++ } ++ ++ if (fd >= 0) { ++ unlink(tmpname.get()); ++ } else { ++ printf_stderr("Unable to create mapping file %s\n", filename); ++ MOZ_CRASH(); ++ } ++ ++#ifdef HAVE_POSIX_FALLOCATE ++ int ret = posix_fallocate(fd, 0, aSize); ++#else ++ int ret = ftruncate(fd, aSize); ++#endif ++ MOZ_RELEASE_ASSERT(ret == 0, "Mapping file allocation failed."); ++ ++ return fd; ++} ++ ++WaylandShmPool::WaylandShmPool(bool aIsMainThread, int aSize) ++{ ++ mAllocatedSize = aSize; ++ ++ mShmPoolFd = CreateTemporaryFile(mAllocatedSize); ++ mImageData = mmap(nullptr, mAllocatedSize, ++ PROT_READ | PROT_WRITE, MAP_SHARED, mShmPoolFd, 0); ++ MOZ_RELEASE_ASSERT(mImageData != MAP_FAILED, ++ "Unable to map drawing surface!"); ++ ++ mShmPool = wl_shm_create_pool(gWaylandDisplay->GetShm(), ++ mShmPoolFd, mAllocatedSize); ++ if (!aIsMainThread) { ++ wl_proxy_set_queue((struct wl_proxy *)mShmPool, ++ gWaylandDisplay->GetEventQueue()); ++ } ++} ++ ++bool ++WaylandShmPool::Resize(int aSize) ++{ ++ // We do size increase only ++ if (aSize <= mAllocatedSize) ++ return true; ++ ++ if (ftruncate(mShmPoolFd, aSize) < 0) ++ return false; ++ ++#ifdef HAVE_POSIX_FALLOCATE ++ errno = posix_fallocate(mShmPoolFd, 0, aSize); ++ if (errno != 0) ++ return false; ++#endif ++ ++ wl_shm_pool_resize(mShmPool, aSize); ++ ++ munmap(mImageData, mAllocatedSize); ++ ++ mImageData = mmap(nullptr, aSize, ++ PROT_READ | PROT_WRITE, MAP_SHARED, mShmPoolFd, 0); ++ if (mImageData == MAP_FAILED) ++ return false; ++ ++ mAllocatedSize = aSize; ++ return true; ++} ++ ++WaylandShmPool::~WaylandShmPool() ++{ ++ munmap(mImageData, mAllocatedSize); ++ wl_shm_pool_destroy(mShmPool); ++ close(mShmPoolFd); ++} ++ ++static void ++buffer_release(void *data, wl_buffer *buffer) ++{ ++ auto surface = reinterpret_cast(data); ++ surface->Detach(); ++} ++ ++static const struct wl_buffer_listener buffer_listener = { ++ buffer_release ++}; ++ ++void WindowBackBuffer::Create(int aWidth, int aHeight) ++{ ++ MOZ_ASSERT(!IsAttached(), "We can't resize attached buffers."); ++ ++ int newBufferSize = aWidth*aHeight*BUFFER_BPP; ++ mShmPool.Resize(newBufferSize); ++ ++ mWaylandBuffer = wl_shm_pool_create_buffer(mShmPool.GetShmPool(), 0, ++ aWidth, aHeight, aWidth*BUFFER_BPP, ++ WL_SHM_FORMAT_ARGB8888); ++ if (!mIsMainThread) { ++ wl_proxy_set_queue((struct wl_proxy *)mWaylandBuffer, ++ gWaylandDisplay->GetEventQueue()); ++ } ++ wl_buffer_add_listener(mWaylandBuffer, &buffer_listener, this); ++ ++ mWidth = aWidth; ++ mHeight = aHeight; ++} ++ ++void WindowBackBuffer::Release() ++{ ++ wl_buffer_destroy(mWaylandBuffer); ++ mWidth = mHeight = 0; ++} ++ ++WindowBackBuffer::WindowBackBuffer(bool aIsMainThread, int aWidth, int aHeight) ++ : mShmPool(aIsMainThread, aWidth*aHeight*BUFFER_BPP) ++ ,mWaylandBuffer(nullptr) ++ ,mWidth(aWidth) ++ ,mHeight(aHeight) ++ ,mAttached(false) ++ ,mIsMainThread(aIsMainThread) ++{ ++ Create(aWidth, aHeight); ++} ++ ++WindowBackBuffer::~WindowBackBuffer() ++{ ++ Release(); ++} ++ ++bool ++WindowBackBuffer::Resize(int aWidth, int aHeight) ++{ ++ if (aWidth == mWidth && aHeight == mHeight) ++ return true; ++ ++ Release(); ++ Create(aWidth, aHeight); ++ ++ return (mWaylandBuffer != nullptr); ++} ++ ++void ++WindowBackBuffer::Attach(wl_surface* aSurface) ++{ ++ wl_surface_attach(aSurface, mWaylandBuffer, 0, 0); ++ wl_surface_commit(aSurface); ++ wl_display_flush(gWaylandDisplay->GetDisplay()); ++ mAttached = true; ++} ++ ++void ++WindowBackBuffer::Detach() ++{ ++ mAttached = false; ++} ++ ++bool WindowBackBuffer::Sync(class WindowBackBuffer* aSourceBuffer) ++{ ++ bool bufferSizeMatches = MatchSize(aSourceBuffer); ++ if (!bufferSizeMatches) { ++ Resize(aSourceBuffer->mWidth, aSourceBuffer->mHeight); ++ } ++ ++ memcpy(mShmPool.GetImageData(), aSourceBuffer->mShmPool.GetImageData(), ++ aSourceBuffer->mWidth * aSourceBuffer->mHeight * BUFFER_BPP); ++ return true; ++} ++ ++already_AddRefed ++WindowBackBuffer::Lock(const LayoutDeviceIntRegion& aRegion) ++{ ++ gfx::IntRect bounds = aRegion.GetBounds().ToUnknownRect(); ++ gfx::IntSize lockSize(bounds.XMost(), bounds.YMost()); ++ ++ return gfxPlatform::CreateDrawTargetForData(static_cast(mShmPool.GetImageData()), ++ lockSize, ++ BUFFER_BPP * mWidth, ++ gWaylandDisplay->GetSurfaceFormat()); ++} ++ ++static void ++frame_callback_handler(void *data, struct wl_callback *callback, uint32_t time) ++{ ++ auto surface = reinterpret_cast(data); ++ surface->FrameCallbackHandler(); ++} ++ ++static const struct wl_callback_listener frame_listener = { ++ frame_callback_handler ++}; ++ ++WindowSurfaceWayland::WindowSurfaceWayland(nsWindow *aWidget, ++ wl_display *aDisplay, ++ wl_surface *aSurface) ++ : mWidget(aWidget) ++ , mSurface(aSurface) ++ , mFrontBuffer(nullptr) ++ , mBackBuffer(nullptr) ++ , mFrameCallback(nullptr) ++ , mDelayedCommit(false) ++ , mFullScreenDamage(false) ++ , mWaylandMessageLoop(nullptr) ++ , mIsMainThread(NS_IsMainThread()) ++{ ++ MOZ_RELEASE_ASSERT(mSurface != nullptr, ++ "We can't do anything useful without valid wl_surface."); ++ ++ if (!mIsMainThread) { ++ // Register and run wayland loop when running in compositor thread. ++ mWaylandMessageLoop = MessageLoop::current(); ++ WaylandDisplayAddRef(aDisplay); ++ wl_proxy_set_queue((struct wl_proxy *)mSurface, ++ gWaylandDisplay->GetEventQueue()); ++ } ++} ++ ++WindowSurfaceWayland::~WindowSurfaceWayland() ++{ ++ delete mFrontBuffer; ++ delete mBackBuffer; ++ ++ if (mFrameCallback) { ++ wl_callback_destroy(mFrameCallback); ++ } ++ ++ if (!mIsMainThread) { ++ // Release WaylandDisplay only for surfaces created in Compositor thread. ++ mWaylandMessageLoop->PostTask( ++ NewRunnableFunction(&WaylandDisplayRelease, nullptr)); ++ } ++} ++ ++WindowBackBuffer* ++WindowSurfaceWayland::GetBufferToDraw(int aWidth, int aHeight) ++{ ++ if (!mFrontBuffer) { ++ mFrontBuffer = new WindowBackBuffer(mIsMainThread, aWidth, aHeight); ++ mBackBuffer = new WindowBackBuffer(mIsMainThread, aWidth, aHeight); ++ return mFrontBuffer; ++ } ++ ++ if (!mFrontBuffer->IsAttached()) { ++ if (!mFrontBuffer->MatchSize(aWidth, aHeight)) { ++ mFrontBuffer->Resize(aWidth, aHeight); ++ } ++ return mFrontBuffer; ++ } ++ ++ // Front buffer is used by compositor, draw to back buffer ++ if (mBackBuffer->IsAttached()) { ++ NS_WARNING("No drawing buffer available"); ++ return nullptr; ++ } ++ ++ MOZ_ASSERT(!mDelayedCommit, ++ "Uncommitted buffer switch, screen artifacts ahead."); ++ ++ WindowBackBuffer *tmp = mFrontBuffer; ++ mFrontBuffer = mBackBuffer; ++ mBackBuffer = tmp; ++ ++ if (mBackBuffer->MatchSize(aWidth, aHeight)) { ++ // Former front buffer has the same size as a requested one. ++ // Gecko may expect a content already drawn on screen so copy ++ // existing data to the new buffer. ++ mFrontBuffer->Sync(mBackBuffer); ++ // When buffer switches we need to damage whole screen ++ // (https://bugzilla.redhat.com/show_bug.cgi?id=1418260) ++ mFullScreenDamage = true; ++ } else { ++ // Former buffer has different size from the new request. Only resize ++ // the new buffer and leave geck to render new whole content. ++ mFrontBuffer->Resize(aWidth, aHeight); ++ } ++ ++ return mFrontBuffer; ++} ++ ++already_AddRefed ++WindowSurfaceWayland::Lock(const LayoutDeviceIntRegion& aRegion) ++{ ++ MOZ_ASSERT(mIsMainThread == NS_IsMainThread()); ++ ++ // We allocate back buffer to widget size but return only ++ // portion requested by aRegion. ++ LayoutDeviceIntRect rect = mWidget->GetBounds(); ++ WindowBackBuffer* buffer = GetBufferToDraw(rect.width, ++ rect.height); ++ MOZ_ASSERT(buffer, "We don't have any buffer to draw to!"); ++ if (!buffer) { ++ return nullptr; ++ } ++ ++ return buffer->Lock(aRegion); ++} ++ ++void ++WindowSurfaceWayland::Commit(const LayoutDeviceIntRegion& aInvalidRegion) ++{ ++ MOZ_ASSERT(mIsMainThread == NS_IsMainThread()); ++ ++ for (auto iter = aInvalidRegion.RectIter(); !iter.Done(); iter.Next()) { ++ const mozilla::LayoutDeviceIntRect &r = iter.Get(); ++ if (!mFullScreenDamage) ++ wl_surface_damage(mSurface, r.x, r.y, r.width, r.height); ++ } ++ ++ if (mFullScreenDamage) { ++ LayoutDeviceIntRect rect = mWidget->GetBounds(); ++ wl_surface_damage(mSurface, 0, 0, rect.width, rect.height); ++ mFullScreenDamage = false; ++ } ++ ++ if (mFrameCallback) { ++ // Do nothing here - buffer will be commited to compositor ++ // in next frame callback event. ++ mDelayedCommit = true; ++ return; ++ } else { ++ mFrameCallback = wl_surface_frame(mSurface); ++ wl_callback_add_listener(mFrameCallback, &frame_listener, this); ++ ++ // There's no pending frame callback so we can draw immediately ++ // and create frame callback for possible subsequent drawing. ++ mFrontBuffer->Attach(mSurface); ++ mDelayedCommit = false; ++ } ++} ++ ++void ++WindowSurfaceWayland::FrameCallbackHandler() ++{ ++ MOZ_ASSERT(mIsMainThread == NS_IsMainThread()); ++ ++ if (mFrameCallback) { ++ wl_callback_destroy(mFrameCallback); ++ mFrameCallback = nullptr; ++ } ++ ++ if (mDelayedCommit) { ++ // Send pending surface to compositor and register frame callback ++ // for possible subsequent drawing. ++ mFrameCallback = wl_surface_frame(mSurface); ++ wl_callback_add_listener(mFrameCallback, &frame_listener, this); ++ ++ mFrontBuffer->Attach(mSurface); ++ mDelayedCommit = false; ++ } ++} ++ ++} // namespace widget ++} // namespace mozilla +diff --git a/widget/gtk/WindowSurfaceWayland.h b/widget/gtk/WindowSurfaceWayland.h +new file mode 100644 +index 0000000..45e523a +--- /dev/null ++++ b/widget/gtk/WindowSurfaceWayland.h +@@ -0,0 +1,133 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_WAYLAND_H ++#define _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_WAYLAND_H ++ ++namespace mozilla { ++namespace widget { ++ ++// We support only 32bpp formats ++#define BUFFER_BPP 4 ++ ++// Our general connection to Wayland display server, ++// holds our display connection and runs event loop. ++class nsWaylandDisplay : public nsISupports { ++ NS_DECL_THREADSAFE_ISUPPORTS ++ ++public: ++ nsWaylandDisplay(wl_display *aDisplay); ++ ++ void SetShm(wl_shm* aShm) { mShm = aShm; }; ++ wl_shm* GetShm() { return(mShm); }; ++ wl_event_queue* GetEventQueue() { return mEventQueue; }; ++ wl_display* GetDisplay() { return mDisplay; }; ++ gfx::SurfaceFormat GetSurfaceFormat() { return mFormat; }; ++ void SetWaylandPixelFormat(uint32_t format); ++ bool DisplayLoop(); ++ ++private: ++ virtual ~nsWaylandDisplay(); ++ ++ gfx::SurfaceFormat mFormat; ++ wl_shm* mShm; ++ wl_event_queue* mEventQueue; ++ wl_display* mDisplay; ++}; ++ ++// Allocates and owns shared memory for Wayland drawing surfaces ++class WaylandShmPool { ++public: ++ WaylandShmPool(bool aIsMainThread, int aSize); ++ ~WaylandShmPool(); ++ ++ bool Resize(int aSize); ++ wl_shm_pool* GetShmPool() { return mShmPool; }; ++ void* GetImageData() { return mImageData; }; ++ ++private: ++ int CreateTemporaryFile(int aSize); ++ ++ wl_shm_pool* mShmPool; ++ int mShmPoolFd; ++ int mAllocatedSize; ++ void* mImageData; ++}; ++ ++// Holds actual graphics data for wl_surface ++class WindowBackBuffer { ++public: ++ WindowBackBuffer(bool aIsMainThread, int aWidth, int aHeight); ++ ~WindowBackBuffer(); ++ ++ already_AddRefed Lock(const LayoutDeviceIntRegion& aRegion); ++ ++ void Attach(wl_surface* aSurface); ++ void Detach(); ++ bool IsAttached() { return mAttached; } ++ ++ bool Resize(int aWidth, int aHeight); ++ bool Sync(class WindowBackBuffer* aSourceBuffer); ++ ++ bool MatchSize(int aWidth, int aHeight) ++ { ++ return aWidth == mWidth && aHeight == mHeight; ++ } ++ bool MatchSize(class WindowBackBuffer *aBuffer) ++ { ++ return aBuffer->mWidth == mWidth && aBuffer->mHeight == mHeight; ++ } ++ ++private: ++ void Create(int aWidth, int aHeight); ++ void Release(); ++ ++ // WaylandShmPool provides actual shared memory we draw into ++ WaylandShmPool mShmPool; ++ ++ // wl_buffer is a wayland object that encapsulates the shared memory ++ // and passes it to wayland compositor by wl_surface object. ++ wl_buffer* mWaylandBuffer; ++ int mWidth; ++ int mHeight; ++ bool mAttached; ++ bool mIsMainThread; ++}; ++ ++// WindowSurfaceWayland is an abstraction for wl_surface ++// and related management ++class WindowSurfaceWayland : public WindowSurface { ++public: ++ WindowSurfaceWayland(nsWindow *aWidget, wl_display *aDisplay, wl_surface *aSurface); ++ ~WindowSurfaceWayland(); ++ ++ already_AddRefed Lock(const LayoutDeviceIntRegion& aRegion) override; ++ void Commit(const LayoutDeviceIntRegion& aInvalidRegion) final; ++ void FrameCallbackHandler(); ++ ++private: ++ WindowBackBuffer* GetBufferToDraw(int aWidth, int aHeight); ++ ++ nsWindow* mWidget; ++ ++ // The surface size is dynamically allocated by Commit() call, ++ // we store the latest size request here to optimize ++ // buffer usage and our gfx operations ++ wl_surface* mSurface; ++ ++ WindowBackBuffer* mFrontBuffer; ++ WindowBackBuffer* mBackBuffer; ++ wl_callback* mFrameCallback; ++ bool mDelayedCommit; ++ bool mFullScreenDamage; ++ MessageLoop* mWaylandMessageLoop; ++ bool mIsMainThread; ++}; ++ ++} // namespace widget ++} // namespace mozilla ++ ++#endif // _MOZILLA_WIDGET_GTK_WINDOW_SURFACE_WAYLAND_H +diff --git a/widget/gtk/X11CompositorWidget.cpp b/widget/gtk/X11CompositorWidget.cpp +index 41cedd9..08e9da0 100644 +--- a/widget/gtk/X11CompositorWidget.cpp ++++ b/widget/gtk/X11CompositorWidget.cpp +@@ -44,6 +44,10 @@ X11CompositorWidget::X11CompositorWidget(const CompositorWidgetInitData& aInitDa + // depth + // ); + ++ mWaylandDisplay = aWindow->WaylandDisplay(); ++ mWaylandSurface = (wl_surface *)aInitData.XWindow(); ++ mProvider.Initialize(aWindow, mWaylandDisplay, mWaylandSurface); ++ + mClientSize = aInitData.InitialClientSize(); + } + +diff --git a/widget/gtk/X11CompositorWidget.h b/widget/gtk/X11CompositorWidget.h +index 9d09476..cf0d94c 100644 +--- a/widget/gtk/X11CompositorWidget.h ++++ b/widget/gtk/X11CompositorWidget.h +@@ -61,6 +61,8 @@ private: + + //Display* mXDisplay; + //Window mXWindow; ++ wl_display* mWaylandDisplay; ++ wl_surface* mWaylandSurface; + WindowSurfaceProvider mProvider; + }; + +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +index 299e4d8..b7d2f1c 100644 +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -19,7 +19,7 @@ EXPORTS.mozilla += [ + + UNIFIED_SOURCES += [ + 'IMContextWrapper.cpp', +- 'mozcontainer.c', ++ 'mozcontainer.cpp', + 'NativeKeyBindings.cpp', + 'nsAppShell.cpp', + 'nsBidiKeyboard.cpp', +@@ -73,13 +73,14 @@ if CONFIG['MOZ_X11']: + UNIFIED_SOURCES += [ + #'nsClipboard.cpp', + 'nsDragService.cpp', +- #'WindowSurfaceProvider.cpp', ++ 'WindowSurfaceProvider.cpp', + #'WindowSurfaceX11.cpp', + #'WindowSurfaceX11Image.cpp', + #'WindowSurfaceXRender.cpp', ++ 'WindowSurfaceWayland.cpp', + ] + EXPORTS.mozilla.widget += [ +- #'WindowSurfaceProvider.h', ++ 'WindowSurfaceProvider.h', + ] + + if CONFIG['ACCESSIBILITY']: +diff --git a/widget/gtk/mozcontainer.c b/widget/gtk/mozcontainer.cpp +similarity index 72% +rename from widget/gtk/mozcontainer.c +rename to widget/gtk/mozcontainer.cpp +index 9b596e4..0d61ee0 100644 +--- a/widget/gtk/mozcontainer.c ++++ b/widget/gtk/mozcontainer.cpp +@@ -7,7 +7,10 @@ + + #include "mozcontainer.h" + #include ++#include ++ + #include ++#include + + #ifdef ACCESSIBILITY + #include +@@ -22,6 +25,7 @@ static void moz_container_init (MozContainer *container); + static void moz_container_map (GtkWidget *widget); + static void moz_container_unmap (GtkWidget *widget); + static void moz_container_realize (GtkWidget *widget); ++static void moz_container_unrealize (GtkWidget *widget); + static void moz_container_size_allocate (GtkWidget *widget, + GtkAllocation *allocation); + +@@ -71,7 +75,8 @@ moz_container_get_type(void) + + moz_container_type = g_type_register_static (GTK_TYPE_CONTAINER, + "MozContainer", +- &moz_container_info, 0); ++ &moz_container_info, ++ static_cast(0)); + #ifdef ACCESSIBILITY + /* Set a factory to return accessible object with ROLE_REDUNDANT for + * MozContainer, so that gail won't send focus notification for it */ +@@ -89,7 +94,7 @@ moz_container_new (void) + { + MozContainer *container; + +- container = g_object_new (MOZ_CONTAINER_TYPE, NULL); ++ container = static_cast(g_object_new (MOZ_CONTAINER_TYPE, nullptr)); + + return GTK_WIDGET(container); + } +@@ -143,6 +148,65 @@ moz_container_move (MozContainer *container, GtkWidget *child_widget, + + /* static methods */ + ++/* We have to recreate our wl_surfaces when GdkWindow is shown, ++ * otherwise Gdk resources may not finished ++ * and gdk_wayland_window_get_wl_surface() fails. ++ */ ++gboolean ++moz_container_map_wl_surface(MozContainer *container) ++{ ++ if (container->subsurface) ++ return TRUE; ++ ++ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); ++ wl_surface* gtk_surface = gdk_wayland_window_get_wl_surface(window); ++ if (!gtk_surface) { ++ // We requested the underlying wl_surface too early. ++ return FALSE; ++ } ++ ++ container->subsurface = ++ wl_subcompositor_get_subsurface (container->subcompositor, ++ container->surface, ++ gtk_surface); ++ gint x, y; ++ gdk_window_get_position(window, &x, &y); ++ wl_subsurface_set_position(container->subsurface, x, y); ++ wl_subsurface_set_desync(container->subsurface); ++ ++ // Don't accept input on subsurface ++ GdkDisplay* display = gtk_widget_get_display(GTK_WIDGET (container)); ++ wl_compositor* compositor = gdk_wayland_display_get_wl_compositor(display); ++ wl_region* region = wl_compositor_create_region(compositor); ++ wl_surface_set_input_region(container->surface, region); ++ wl_region_destroy(region); ++ return TRUE; ++} ++ ++static void ++moz_container_unmap_surface(MozContainer *container) ++{ ++ g_clear_pointer(&container->subsurface, wl_subsurface_destroy); ++} ++ ++static void ++moz_container_create_surface(MozContainer *container) ++{ ++ GdkDisplay *display = gtk_widget_get_display(GTK_WIDGET(container)); ++ ++ if (!container->surface) { ++ struct wl_compositor *compositor; ++ compositor = gdk_wayland_display_get_wl_compositor(display); ++ container->surface = wl_compositor_create_surface(compositor); ++ } ++} ++ ++static void ++moz_container_delete_surface(MozContainer *container) ++{ ++ g_clear_pointer(&container->surface, wl_surface_destroy); ++} ++ + void + moz_container_class_init (MozContainerClass *klass) + { +@@ -154,6 +218,7 @@ moz_container_class_init (MozContainerClass *klass) + widget_class->map = moz_container_map; + widget_class->unmap = moz_container_unmap; + widget_class->realize = moz_container_realize; ++ widget_class->unrealize = moz_container_unrealize; + widget_class->size_allocate = moz_container_size_allocate; + + container_class->remove = moz_container_remove; +@@ -161,12 +226,48 @@ moz_container_class_init (MozContainerClass *klass) + container_class->add = moz_container_add; + } + ++static void ++registry_handle_global (void *data, ++ struct wl_registry *registry, ++ uint32_t name, ++ const char *interface, ++ uint32_t version) ++{ ++ MozContainer *container = MOZ_CONTAINER(data); ++ if(strcmp(interface, "wl_subcompositor") == 0) { ++ container->subcompositor = ++ static_cast(wl_registry_bind(registry, ++ name, ++ &wl_subcompositor_interface, ++ 1)); ++ } ++} ++ ++static void ++registry_handle_global_remove (void *data, ++ struct wl_registry *registry, ++ uint32_t name) ++{ ++} ++ ++static const struct wl_registry_listener registry_listener = { ++ registry_handle_global, ++ registry_handle_global_remove ++}; + void + moz_container_init (MozContainer *container) + { + gtk_widget_set_can_focus(GTK_WIDGET(container), TRUE); + gtk_container_set_resize_mode(GTK_CONTAINER(container), GTK_RESIZE_IMMEDIATE); + gtk_widget_set_redraw_on_allocate(GTK_WIDGET(container), FALSE); ++ { ++ GdkDisplay *gdk_display = gtk_widget_get_display(GTK_WIDGET(container)); ++ wl_display* display = gdk_wayland_display_get_wl_display(gdk_display); ++ wl_registry* registry = wl_display_get_registry(display); ++ wl_registry_add_listener(registry, ®istry_listener, container); ++ wl_display_roundtrip(display); ++ wl_display_roundtrip(display); ++ } + } + + void +@@ -207,6 +308,11 @@ moz_container_unmap (GtkWidget *widget) + if (gtk_widget_get_has_window (widget)) { + gdk_window_hide (gtk_widget_get_window(widget)); + } ++ /* Gdk/Wayland deletes underlying GdkWindow wl_surface on unmap event. ++ * Delete the wl_subsurface interface which ++ * keeps wl_surface object and it's available for reuse. ++ */ ++ moz_container_unmap_surface(MOZ_CONTAINER(widget)); + } + + void +@@ -237,6 +343,12 @@ moz_container_realize (GtkWidget *widget) + attributes_mask |= GDK_WA_COLORMAP; + #endif + ++ // Get mShell type ++ GtkWidget* parent_widget = gtk_widget_get_parent(widget); ++ if (parent_widget && ++ gtk_window_get_window_type(GTK_WINDOW(parent_widget)) == GTK_WINDOW_POPUP) { ++ //attributes.window_type = GDK_WINDOW_SUBSURFACE; ++ } + window = gdk_window_new (parent, &attributes, attributes_mask); + gdk_window_set_user_data (window, widget); + #if (MOZ_WIDGET_GTK == 2) +@@ -255,6 +367,15 @@ moz_container_realize (GtkWidget *widget) + #if (MOZ_WIDGET_GTK == 2) + widget->style = gtk_style_attach (widget->style, widget->window); + #endif ++ moz_container_create_surface(MOZ_CONTAINER(widget)); ++} ++ ++static void ++moz_container_unrealize (GtkWidget *widget) ++{ ++ MozContainer* container = MOZ_CONTAINER(widget); ++ moz_container_unmap_surface(container); ++ moz_container_delete_surface(container); + } + + void +@@ -290,7 +411,7 @@ moz_container_size_allocate (GtkWidget *widget, + tmp_list = container->children; + + while (tmp_list) { +- MozContainerChild *child = tmp_list->data; ++ MozContainerChild *child = static_cast(tmp_list->data); + + moz_container_allocate_child (container, child); + +@@ -306,6 +427,12 @@ moz_container_size_allocate (GtkWidget *widget, + allocation->width, + allocation->height); + } ++ ++ if (container->subsurface) { ++ gint x, y; ++ gdk_window_get_position(gtk_widget_get_window(widget), &x, &y); ++ wl_subsurface_set_position(container->subsurface, x, y); ++ } + } + + void +@@ -372,7 +499,7 @@ moz_container_forall (GtkContainer *container, gboolean include_internals, + tmp_list = moz_container->children; + while (tmp_list) { + MozContainerChild *child; +- child = tmp_list->data; ++ child = static_cast(tmp_list->data); + tmp_list = tmp_list->next; + (* callback) (child->widget, callback_data); + } +@@ -400,7 +527,7 @@ moz_container_get_child (MozContainer *container, GtkWidget *child_widget) + while (tmp_list) { + MozContainerChild *child; + +- child = tmp_list->data; ++ child = static_cast(tmp_list->data); + tmp_list = tmp_list->next; + + if (child->widget == child_widget) +@@ -416,3 +543,8 @@ moz_container_add(GtkContainer *container, GtkWidget *widget) + moz_container_put(MOZ_CONTAINER(container), widget, 0, 0); + } + ++struct wl_surface* ++moz_container_get_wl_surface(MozContainer *container) ++{ ++ return container->surface; ++} +diff --git a/widget/gtk/mozcontainer.h b/widget/gtk/mozcontainer.h +index 23e17f7..ee48ab9 100644 +--- a/widget/gtk/mozcontainer.h ++++ b/widget/gtk/mozcontainer.h +@@ -10,10 +10,6 @@ + + #include + +-#ifdef __cplusplus +-extern "C" { +-#endif /* __cplusplus */ +- + /* + * MozContainer + * +@@ -55,10 +51,16 @@ extern "C" { + typedef struct _MozContainer MozContainer; + typedef struct _MozContainerClass MozContainerClass; + ++struct wl_subcompositor; ++struct wl_surface; ++struct wl_subsurface; + struct _MozContainer + { + GtkContainer container; + GList *children; ++ struct wl_subcompositor *subcompositor; ++ struct wl_surface *surface; ++ struct wl_subsurface *subsurface; + }; + + struct _MozContainerClass +@@ -79,8 +81,7 @@ void moz_container_move (MozContainer *container, + gint width, + gint height); + +-#ifdef __cplusplus +-} +-#endif /* __cplusplus */ ++struct wl_surface * moz_container_get_wl_surface (MozContainer *container); ++gboolean moz_container_map_wl_surface (MozContainer *container); + + #endif /* __MOZ_CONTAINER_H__ */ +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index 4aefa28..bad6abb 100644 +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -58,6 +58,8 @@ + #include + #endif + ++#include ++ + #include "nsGkAtoms.h" + + #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION +@@ -117,12 +119,13 @@ using namespace mozilla::widget; + #include "mozilla/layers/CompositorThread.h" + + #ifdef MOZ_X11_no +-#include "X11CompositorWidget.h" + #include "gfxXlibSurface.h" + #include "WindowSurfaceX11Image.h" + #include "WindowSurfaceX11SHM.h" + #include "WindowSurfaceXRender.h" + #endif // MOZ_X11 ++#include "X11CompositorWidget.h" ++#include "WindowSurfaceWayland.h" + + #include "nsShmImage.h" + +@@ -431,6 +434,7 @@ nsWindow::nsWindow() + mXVisual = nullptr; + mXDepth = 0; + #endif /* MOZ_X11 */ ++ mWaylandSurface = nullptr; + mPluginType = PluginType_NONE; + + if (!gGlobalsInitialized) { +@@ -1698,12 +1702,13 @@ nsWindow::GetNativeData(uint32_t aDataType) + return (void*)mPluginNativeWindow->window; + + case NS_NATIVE_DISPLAY: { +-#ifdef MOZ_X11_no + GdkDisplay* gdkDisplay = gdk_display_get_default(); ++#ifdef MOZ_X11_no + if (GDK_IS_X11_DISPLAY(gdkDisplay)) { + return GDK_DISPLAY_XDISPLAY(gdkDisplay); + } + #endif /* MOZ_X11 */ ++ return gdk_wayland_display_get_wl_display(gdkDisplay); + return nullptr; + } + case NS_NATIVE_SHELLWIDGET: +@@ -1729,7 +1734,8 @@ nsWindow::GetNativeData(uint32_t aDataType) + return nullptr; + #ifdef MOZ_X11 + case NS_NATIVE_COMPOSITOR_DISPLAY: +- return gfxPlatformGtk::GetPlatform()->GetCompositorDisplay(); ++ //return gfxPlatformGtk::GetPlatform()->GetCompositorDisplay(); ++ return gfxPlatformGtk::GetPlatform()->GetWaylandCompositorDisplay(); + #endif // MOZ_X11 + default: + NS_WARNING("nsWindow::GetNativeData called with bad value"); +@@ -2095,6 +2101,9 @@ nsWindow::OnExposeEvent(cairo_t *cr) + if (!listener) + return FALSE; + ++ if (mContainer && !moz_container_map_wl_surface(mContainer)) ++ return FALSE; ++ + LayoutDeviceIntRegion exposeRegion; + #if (MOZ_WIDGET_GTK == 2) + if (!ExtractExposeRegion(exposeRegion, aEvent)) { +@@ -3725,7 +3734,7 @@ nsWindow::Create(nsIWidget* aParent, + // We can't draw directly to top-level window when client side + // decorations are enabled. We use container with GdkWindow instead. + GtkStyleContext* style = gtk_widget_get_style_context(mShell); +- shellHasCSD = gtk_style_context_has_class(style, "csd"); ++ shellHasCSD = true; + #endif + if (!shellHasCSD) { + // Use mShell's window for drawing and events. +@@ -3746,6 +3755,11 @@ nsWindow::Create(nsIWidget* aParent, + + // the drawing window + mGdkWindow = gtk_widget_get_window(eventWidget); ++ ++ wl_surface *waylandSurface = moz_container_get_wl_surface( ++ MOZ_CONTAINER(container)); ++ g_object_set_data(G_OBJECT(mGdkWindow), "WAYLAND_SURFACE", ++ waylandSurface); + + if (mWindowType == eWindowType_popup) { + // gdk does not automatically set the cursor for "temporary" +@@ -3971,6 +3985,9 @@ nsWindow::Create(nsIWidget* aParent, + mSurfaceProvider.Initialize(mXDisplay, mXWindow, mXVisual, mXDepth); + } + #endif ++ mWaylandDisplay = gdk_wayland_display_get_wl_display(gdk_display_get_default()); ++ mWaylandSurface = moz_container_get_wl_surface(MOZ_CONTAINER(mContainer)); ++ mSurfaceProvider.Initialize(this, mWaylandDisplay, mWaylandSurface); + + return NS_OK; + } +@@ -4654,14 +4671,17 @@ nsWindow::GrabPointer(guint32 aTime) + if (!mGdkWindow) + return; + ++ GdkSeat *gdkSeat = gdk_display_get_default_seat(gdk_display_get_default()); + gint retval; +- retval = gdk_pointer_grab(mGdkWindow, TRUE, +- (GdkEventMask)(GDK_BUTTON_PRESS_MASK | +- GDK_BUTTON_RELEASE_MASK | +- GDK_ENTER_NOTIFY_MASK | +- GDK_LEAVE_NOTIFY_MASK | +- GDK_POINTER_MOTION_MASK), +- (GdkWindow *)nullptr, nullptr, aTime); ++ //retval = gdk_pointer_grab(mGdkWindow, TRUE, ++ // (GdkEventMask)(GDK_BUTTON_PRESS_MASK | ++ // GDK_BUTTON_RELEASE_MASK | ++ // GDK_ENTER_NOTIFY_MASK | ++ // GDK_LEAVE_NOTIFY_MASK | ++ // GDK_POINTER_MOTION_MASK), ++ // (GdkWindow *)nullptr, nullptr, aTime); ++ retval = gdk_seat_grab(gdkSeat, mGdkWindow, GDK_SEAT_CAPABILITY_ALL_POINTING, TRUE, ++ nullptr, nullptr, nullptr, nullptr); + + if (retval == GDK_GRAB_NOT_VIEWABLE) { + LOG(("GrabPointer: window not viewable; will retry\n")); +@@ -4685,7 +4705,9 @@ nsWindow::ReleaseGrabs(void) + LOG(("ReleaseGrabs\n")); + + mRetryPointerGrab = false; +- gdk_pointer_ungrab(GDK_CURRENT_TIME); ++ //gdk_pointer_ungrab(GDK_CURRENT_TIME); ++ GdkSeat *gdkSeat = gdk_display_get_default_seat(gdk_display_get_default()); ++ gdk_seat_ungrab(gdkSeat); + } + + GtkWidget * +@@ -6407,13 +6429,14 @@ nsWindow::GetDrawTargetForGdkDrawable(GdkDrawable* aDrawable, + already_AddRefed + nsWindow::StartRemoteDrawingInRegion(LayoutDeviceIntRegion& aInvalidRegion, BufferMode* aBufferMode) + { +- return NULL; ++ return mSurfaceProvider.StartRemoteDrawingInRegion(aInvalidRegion, aBufferMode); + } + + void + nsWindow::EndRemoteDrawingInRegion(DrawTarget* aDrawTarget, + LayoutDeviceIntRegion& aInvalidRegion) + { ++ mSurfaceProvider.EndRemoteDrawingInRegion(aDrawTarget, aInvalidRegion); + } + + // Code shared begin BeginMoveDrag and BeginResizeDrag +@@ -6858,4 +6881,9 @@ void nsWindow::GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInit + nsCString(XDisplayString(mXDisplay)), + GetClientSize()); + #endif ++ *aInitData = mozilla::widget::CompositorWidgetInitData( ++ (uintptr_t)mWaylandSurface, ++ (nsCString)nullptr, ++ GetClientSize()); ++ + } +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +index ff66233..6ac6469 100644 +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -18,6 +18,7 @@ + + #include "nsBaseWidget.h" + #include ++#include + #include + + #ifdef MOZ_X11_no +@@ -25,7 +26,7 @@ + #endif /* MOZ_X11 */ + + #include "mozilla/widget/WindowSurface.h" +-//#include "mozilla/widget/WindowSurfaceProvider.h" ++#include "mozilla/widget/WindowSurfaceProvider.h" + + #ifdef ACCESSIBILITY + #include "mozilla/a11y/Accessible.h" +@@ -351,6 +352,7 @@ public: + #ifdef MOZ_X11_no + Display* XDisplay() { return mXDisplay; } + #endif ++ wl_display* WaylandDisplay() { return mWaylandDisplay; } + virtual void GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInitData* aInitData) override; + + // HiDPI scale conversion +@@ -464,8 +466,10 @@ private: + Window mXWindow; + Visual* mXVisual; + int mXDepth; +- mozilla::widget::WindowSurfaceProvider mSurfaceProvider; + #endif ++ mozilla::widget::WindowSurfaceProvider mSurfaceProvider; ++ wl_display* mWaylandDisplay; ++ wl_surface* mWaylandSurface; + + // Upper bound on pending ConfigureNotify events to be dispatched to the + // window. See bug 1225044. diff --git a/patches/www-client/firefox-9999/allow-custom-mozgl-provider.patch b/patches/www-client/firefox-9999/allow-custom-mozgl-provider.patch new file mode 100644 index 0000000..3316600 --- /dev/null +++ b/patches/www-client/firefox-9999/allow-custom-mozgl-provider.patch @@ -0,0 +1,26 @@ +diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h +index 6e096c1..ac0156a 100644 +--- a/gfx/gl/GLContextProvider.h ++++ b/gfx/gl/GLContextProvider.h +@@ -41,12 +41,11 @@ namespace gl { + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderCGL + #endif + +-#if defined(MOZ_X11) ++#if defined(MOZ_X11_no) + #define GL_CONTEXT_PROVIDER_NAME GLContextProviderGLX + #include "GLContextProviderImpl.h" + #undef GL_CONTEXT_PROVIDER_NAME + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderGLX +-#endif + + #define GL_CONTEXT_PROVIDER_NAME GLContextProviderEGL + #include "GLContextProviderImpl.h" +@@ -54,6 +53,7 @@ namespace gl { + #ifndef GL_CONTEXT_PROVIDER_DEFAULT + #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL + #endif ++#endif + + #if defined(MOZ_WIDGET_UIKIT) + #define GL_CONTEXT_PROVIDER_NAME GLContextProviderEAGL diff --git a/patches/www-client/firefox-9999/nogtk2-and-nox11-configure.patch b/patches/www-client/firefox-9999/nogtk2-and-nox11-configure.patch new file mode 100644 index 0000000..dcf01f5 --- /dev/null +++ b/patches/www-client/firefox-9999/nogtk2-and-nox11-configure.patch @@ -0,0 +1,188 @@ +diff --git a/old-configure.in b/old-configure.in +index bcc3b79..185bf75 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -2455,8 +2455,6 @@ if test "$COMPILE_ENVIRONMENT"; then + AC_DEFINE_UNQUOTED(GLIB_VERSION_MIN_REQUIRED,$GLIB_VERSION_MIN_REQUIRED) + AC_DEFINE_UNQUOTED(GLIB_VERSION_MAX_ALLOWED,$GLIB_VERSION_MAX_ALLOWED) + +- PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES) +- MOZ_GTK2_CFLAGS="-I${_topsrcdir}/widget/gtk/compat $MOZ_GTK2_CFLAGS" + fi + if test "$MOZ_WIDGET_TOOLKIT" = gtk2; then + TK_CFLAGS=$MOZ_GTK2_CFLAGS +diff --git a/widget/gtk/mozgtk/moz.build b/widget/gtk/mozgtk/moz.build +index 528e2e9..d32ee82 100644 +--- a/widget/gtk/mozgtk/moz.build ++++ b/widget/gtk/mozgtk/moz.build +@@ -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'] +diff --git a/widget/moz.build b/widget/moz.build +index ae1694f..da62f78 100644 +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -51,9 +51,6 @@ TEST_DIRS += ['tests'] + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + DIRS += ['gtk'] + +- if CONFIG['MOZ_X11']: +- DIRS += ['gtkxtbin'] +- + XPIDL_SOURCES += [ + 'nsIAppShell.idl', + 'nsIBaseWindow.idl', +diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp +index 21b2c1dbf8dc..4ab6d1d15021 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.cpp ++++ b/dom/plugins/ipc/PluginInstanceChild.cpp +@@ -52,7 +52,9 @@ using namespace mozilla::gfx; + #include + #include + #include ++#if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" ++#endif + + #elif defined(OS_WIN) + +diff --git a/dom/plugins/ipc/PluginInstanceChild.h b/dom/plugins/ipc/PluginInstanceChild.h +index 1836cec193a8..8578780d7012 100644 +--- a/dom/plugins/ipc/PluginInstanceChild.h ++++ b/dom/plugins/ipc/PluginInstanceChild.h +@@ -35,7 +35,7 @@ + + #include + +-#ifdef MOZ_WIDGET_GTK ++#if (MOZ_WIDGET_GTK == 2) + #include "gtk2xtbin.h" + #endif + +@@ -445,9 +445,9 @@ private: + PluginScriptableObjectChild* mCachedWindowActor; + PluginScriptableObjectChild* mCachedElementActor; + + #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX) + NPSetWindowCallbackStruct mWsInfo; +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK2 + XtClient mXtClient; + #endif + #elif defined(OS_WIN) +diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build +index 3244e6c..f716f0d 100644 +--- a/toolkit/library/moz.build ++++ b/toolkit/library/moz.build +@@ -253,11 +253,7 @@ if CONFIG['MOZ_ENABLE_DBUS']: + OS_LIBS += CONFIG['MOZ_DBUS_GLIB_LIBS'] + + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: +- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': +- OS_LIBS += [l for l in CONFIG['TK_LIBS'] +- if l not in ('-lgtk-3', '-lgdk-3')] +- else: +- OS_LIBS += CONFIG['TK_LIBS'] ++ OS_LIBS += CONFIG['TK_LIBS'] + OS_LIBS += CONFIG['XLDFLAGS'] + OS_LIBS += CONFIG['XLIBS'] + OS_LIBS += CONFIG['XEXT_LIBS'] +diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h +index 857b5bf..f2b5cda 100644 +--- a/dom/plugins/ipc/PluginModuleChild.h ++++ b/dom/plugins/ipc/PluginModuleChild.h +@@ -11,6 +11,7 @@ + + #include + #include ++#include + + #include "base/basictypes.h" + +@@ -240,7 +240,7 @@ private: + void HookProtectedMode(); + #endif + +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK2) + static gboolean DetectNestedEventLoop(gpointer data); + static gboolean ProcessBrowserEvents(gpointer data); + +diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build +index 5e14d18..ea8a900 100644 +--- a/dom/plugins/ipc/moz.build ++++ b/dom/plugins/ipc/moz.build +@@ -138,11 +138,7 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT': + + DEFINES['FORCE_PR_LOG'] = True + +-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gtk3': +- CXXFLAGS += CONFIG['TK_CFLAGS'] +-else: +- # Force build against gtk+2 for struct offsets and such. +- CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS'] ++CXXFLAGS += CONFIG['TK_CFLAGS'] + + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + +diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp +index 147c57a..e6d52b5 100644 +--- a/dom/plugins/ipc/PluginModuleChild.cpp ++++ b/dom/plugins/ipc/PluginModuleChild.cpp +@@ -11,7 +11,7 @@ + + #include "mozilla/ipc/MessageChannel.h" + +-#ifdef MOZ_WIDGET_GTK ++#ifdef MOZ_WIDGET_GTK2 + #include + #endif + +@@ -133,7 +133,7 @@ PluginModuleChild::PluginModuleChild(bool aIsChrome) + , mInitializeFunc(0) + #if defined(OS_WIN) || defined(OS_MACOSX) + , mGetEntryPointsFunc(0) +-#elif defined(MOZ_WIDGET_GTK) ++#elif defined(MOZ_WIDGET_GTK2) + , mNestedLoopTimerId(0) + #endif + #ifdef OS_WIN +@@ -331,7 +331,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename, + return true; + } + +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK2) + + typedef void (*GObjectDisposeFn)(GObject*); + typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*); +@@ -580,7 +580,7 @@ PluginModuleChild::ShouldContinueFromReplyTimeout() + bool + PluginModuleChild::InitGraphics() + { +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK2) + // Work around plugins that don't interact well with GDK + // client-side windows. + PR_SetEnv("GDK_NATIVE_WINDOWS=1"); +@@ -1104,7 +1104,7 @@ _getvalue(NPP aNPP, + switch (aVariable) { + // Copied from nsNPAPIPlugin.cpp + case NPNVToolkit: +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK2) + *static_cast(aValue) = NPNVGtk2; + return NPERR_NO_ERROR; + #endif +@@ -1128,7 +1128,7 @@ _getvalue(NPP aNPP, + case NPNVSupportsWindowless: + *(NPBool*)aValue = true; + return NPERR_NO_ERROR; +-#if defined(MOZ_WIDGET_GTK) ++#if defined(MOZ_WIDGET_GTK2) + case NPNVxDisplay: { + if (!aNPP) { + return NPERR_INVALID_INSTANCE_ERROR; diff --git a/profile/package.use.force b/profile/package.use.force new file mode 100644 index 0000000..2a2cde3 --- /dev/null +++ b/profile/package.use.force @@ -0,0 +1 @@ +net-libs/webkit-gtk -X diff --git a/profile/package.use.mask b/profile/package.use.mask new file mode 100644 index 0000000..162e86e --- /dev/null +++ b/profile/package.use.mask @@ -0,0 +1,4 @@ +x11-libs/cairo -gles2 +app-office/libreoffice -gtk3 +www-client/chromium -gtk3 -system-icu +www-client/firefox -system-cairo diff --git a/profile/use.mask b/profile/use.mask new file mode 100644 index 0000000..2b8b3ea --- /dev/null +++ b/profile/use.mask @@ -0,0 +1,5 @@ +-python_targets_python3_6 +-python_single_target_python3_6 +-systemd +-ruby_targets_ruby24 +-gtk3 diff --git a/repo.postsync.d/example b/repo.postsync.d/example new file mode 100644 index 0000000..533bf71 --- /dev/null +++ b/repo.postsync.d/example @@ -0,0 +1,51 @@ +#!/bin/sh +# Example /etc/portage/repo.postsync.d script. Make it executable (chmod +x) for +# Portage to process it. +# +# With portage-2.2.16 and newer, all repo.postsync.d hooks will be called multiple +# times after syncing each repository. +# +# Older versions of Portage support syncing only one repository. +# In those versions, the postsync.d hooks will be called only once, +# and they will not be passed any parameters. + +# On a repo.postsync.d hook call, positional parameters contain +# information about the just-synced repository. + +# Your hook can control it's actions depending on any of the three +# parameters passed in to it. +# +# They are as follows: +# +# The repository name. +repository_name=${1} +# The URI to which the repository was synced. +sync_uri=${2} +# The path to the repository. +repository_path=${3} + +# Portage assumes that a hook succeeded if it exits with 0 code. If no +# explicit exit is done, the exit code is the exit code of last spawned +# command. Since our script is a bit more complex, we want to control +# the exit code explicitly. +ret=0 + +if [ -n "${repository_name}" ]; then + # Repository name was provided, so we're in a post-repository hook. + echo "* In post-repository hook for ${repository_name}" + echo "** synced from remote repository ${sync_uri}" + echo "** synced into ${repository_path}" + + # Gentoo comes with pregenerated cache but the other repositories + # usually don't. Generate them to improve performance. + if [ "${repository_name}" != "gentoo" ]; then + if ! egencache --update --repo="${repository_name}" --jobs=4 + then + echo "!!! egencache failed!" + ret=1 + fi + fi +fi + +# Return explicit status. +exit "${ret}" diff --git a/repo.postsync.d/q-reinit b/repo.postsync.d/q-reinit new file mode 100755 index 0000000..0833c66 --- /dev/null +++ b/repo.postsync.d/q-reinit @@ -0,0 +1,10 @@ +#!/bin/sh + +repository_name=$1 +repository_path=$3 + +if [ -n "${repository_name}" ]; then + q ${PORTAGE_QUIET:+-q} --reinitialize="${repository_path}" +fi + +: diff --git a/repos.conf/gentoo.conf b/repos.conf/gentoo.conf new file mode 100644 index 0000000..e1601f4 --- /dev/null +++ b/repos.conf/gentoo.conf @@ -0,0 +1,7 @@ +[gentoo] +location = /usr/portage +#sync-type = rsync +#sync-uri = rsync://rsync.gentoo.org/gentoo-portage +sync-type = git +sync-uri = https://github.com/gentoo-mirror/gentoo.git +auto-sync = yes diff --git a/repos.conf/local.conf b/repos.conf/local.conf new file mode 100644 index 0000000..a78b42a --- /dev/null +++ b/repos.conf/local.conf @@ -0,0 +1,3 @@ +[local] +location = /usr/local/portage +priority = 100 diff --git a/repos.conf/qt.conf b/repos.conf/qt.conf new file mode 100644 index 0000000..8256da7 --- /dev/null +++ b/repos.conf/qt.conf @@ -0,0 +1,7 @@ +[qt] +location = /usr/overlays/qt/ +#sync-type = rsync +#sync-uri = rsync://rsync.gentoo.org/gentoo-portage +sync-type = git +sync-uri = https://anongit.gentoo.org/git/proj/qt.git +auto-sync = yes diff --git a/savedconfig/sys-apps/busybox-1.25.1 b/savedconfig/sys-apps/busybox-1.25.1 new file mode 100644 index 0000000..2569c7e --- /dev/null +++ b/savedconfig/sys-apps/busybox-1.25.1 @@ -0,0 +1,1083 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.25.1 +# Fri May 12 02:41:17 2017 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +CONFIG_DESKTOP=y +CONFIG_EXTRA_COMPAT=y +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +CONFIG_FEATURE_COMPRESS_USAGE=y +CONFIG_BUSYBOX=y +CONFIG_FEATURE_INSTALLER=y +CONFIG_INSTALL_NO_USR=y +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_UNICODE_SUPPORT=y +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=63 +CONFIG_LAST_SUPPORTED_WCHAR=767 +CONFIG_UNICODE_COMBINING_WCHARS=y +CONFIG_UNICODE_WIDE_WCHARS=y +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +CONFIG_UNICODE_PRESERVE_BROKEN=y +# CONFIG_PAM is not set +CONFIG_FEATURE_USE_SENDFILE=y +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +CONFIG_FEATURE_PIDFILE=y +CONFIG_PID_FILE_PATH="/var/run" +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +CONFIG_FEATURE_PREFER_APPLETS=y +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +CONFIG_STATIC=y +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_DEBUG_SANITIZE is not set +CONFIG_UNIT_TEST=y +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_USE_BSS_TAIL is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +CONFIG_FEATURE_FAST_TOP=y +CONFIG_FEATURE_ETC_NETWORKS=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=255 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +CONFIG_FEATURE_USERNAME_COMPLETION=y +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +CONFIG_FEATURE_EDITING_ASK_TERMINAL=y +CONFIG_FEATURE_NON_POSIX_CP=y +CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +# CONFIG_MONOTONIC_SYSCALL is not set +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +CONFIG_FEATURE_SEAMLESS_XZ=y +CONFIG_FEATURE_SEAMLESS_LZMA=y +CONFIG_FEATURE_SEAMLESS_BZ2=y +CONFIG_FEATURE_SEAMLESS_GZ=y +CONFIG_FEATURE_SEAMLESS_Z=y +CONFIG_AR=y +CONFIG_FEATURE_AR_LONG_FILENAMES=y +CONFIG_FEATURE_AR_CREATE=y +CONFIG_UNCOMPRESS=y +CONFIG_GUNZIP=y +CONFIG_FEATURE_GUNZIP_LONG_OPTIONS=y +CONFIG_BUNZIP2=y +CONFIG_UNLZMA=y +CONFIG_FEATURE_LZMA_FAST=y +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZ=y +CONFIG_BZIP2=y +CONFIG_CPIO=y +CONFIG_FEATURE_CPIO_O=y +CONFIG_FEATURE_CPIO_P=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GZIP=y +CONFIG_FEATURE_GZIP_LONG_OPTIONS=y +CONFIG_GZIP_FAST=0 +CONFIG_FEATURE_GZIP_LEVELS=y +CONFIG_LZOP=y +CONFIG_LZOP_COMPR_HIGH=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_AUTODETECT=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y +CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +CONFIG_FEATURE_TAR_UNAME_GNAME=y +CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y +# CONFIG_FEATURE_TAR_SELINUX is not set +CONFIG_UNZIP=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_FEATURE_DATE_NANO=y +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_FEATURE_DD_STATUS=y +# CONFIG_HOSTID is not set +CONFIG_ID=y +CONFIG_GROUPS=y +CONFIG_SHUF=y +CONFIG_STAT=y +CONFIG_FEATURE_STAT_FORMAT=y +CONFIG_FEATURE_STAT_FILESYSTEM=y +CONFIG_SYNC=y +CONFIG_FEATURE_SYNC_FANCY=y +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +CONFIG_FEATURE_TOUCH_NODEREF=y +CONFIG_FEATURE_TOUCH_SUSV3=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_TRUNCATE=y +CONFIG_UNLINK=y +CONFIG_BASE64=y +CONFIG_WHO=y +CONFIG_USERS=y +CONFIG_CAL=y +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y +CONFIG_CHROOT=y +CONFIG_CKSUM=y +CONFIG_COMM=y +CONFIG_CP=y +CONFIG_FEATURE_CP_LONG_OPTIONS=y +CONFIG_CUT=y +CONFIG_DF=y +CONFIG_FEATURE_DF_FANCY=y +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_FEATURE_ENV_LONG_OPTIONS=y +CONFIG_EXPAND=y +CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_FSYNC=y +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +# CONFIG_OD is not set +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SHA3SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +CONFIG_SPLIT=y +CONFIG_FEATURE_SPLIT_FANCY=y +CONFIG_STTY=y +CONFIG_SUM=y +CONFIG_TAC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNAME_OSNAME="GNU/Linux" +CONFIG_UNEXPAND=y +CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WC=y +CONFIG_FEATURE_WC_LARGE=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options +# +CONFIG_FEATURE_VERBOSE=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_FGCONSOLE=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_KBD_MODE=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y +CONFIG_SETFONT=y +CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y +CONFIG_DEFAULT_SETFONT_DIR="" +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +CONFIG_SHOWKEY=y + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +# CONFIG_RUN_PARTS is not set +# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_LIBM is not set +CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y +CONFIG_CMP=y +CONFIG_DIFF=y +CONFIG_FEATURE_DIFF_LONG_OPTIONS=y +CONFIG_FEATURE_DIFF_DIR=y +CONFIG_ED=y +CONFIG_PATCH=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_REGEX_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_UNDO=y +CONFIG_FEATURE_VI_UNDO_QUEUE=y +CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256 +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_EXEC_PLUS=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +CONFIG_FEATURE_FIND_DELETE=y +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +CONFIG_FEATURE_FIND_LINKS=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y +CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_GINIT=y +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_LINUXRC=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_KILL_REMOVED=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +CONFIG_FEATURE_INIT_COREDUMPS=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_FEATURE_INIT_MODIFY_CMDLINE=y +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +CONFIG_FEATURE_SHADOWPASSWDS=y +CONFIG_USE_BB_PWD_GRP=y +CONFIG_USE_BB_SHADOW=y +CONFIG_USE_BB_CRYPT=y +CONFIG_USE_BB_CRYPT_SHA=y +CONFIG_ADDGROUP=y +CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y +CONFIG_FEATURE_ADDUSER_TO_GROUP=y +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +CONFIG_ADDUSER=y +CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y +CONFIG_FEATURE_CHECK_NAMES=y +CONFIG_LAST_ID=60000 +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +CONFIG_CHPASSWD=y +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" +CONFIG_CRYPTPW=y +CONFIG_MKPASSWD=y +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +CONFIG_FEATURE_DEL_USER_FROM_GROUP=y +CONFIG_GETTY=y +CONFIG_LOGIN=y +CONFIG_LOGIN_SESSION_AS_CHILD=y +CONFIG_LOGIN_SCRIPTS=y +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +# CONFIG_SULOGIN is not set +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +CONFIG_TUNE2FS=y + +# +# Linux Module Utilities +# +CONFIG_MODINFO=y +CONFIG_MODPROBE_SMALL=y +CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y +CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y +# CONFIG_INSMOD is not set +# CONFIG_RMMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +# CONFIG_MODPROBE is not set +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +CONFIG_FEATURE_INSMOD_TRY_MMAP=y +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set +# CONFIG_FEATURE_MODUTILS_ALIAS is not set +# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +CONFIG_BLKDISCARD=y +CONFIG_BLOCKDEV=y +CONFIG_FATATTR=y +CONFIG_FSTRIM=y +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_RENAME=y +CONFIG_FEATURE_MDEV_RENAME_REGEXP=y +CONFIG_FEATURE_MDEV_EXEC=y +CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y +CONFIG_MOUNT=y +CONFIG_FEATURE_MOUNT_FAKE=y +CONFIG_FEATURE_MOUNT_VERBOSE=y +CONFIG_FEATURE_MOUNT_HELPERS=y +CONFIG_FEATURE_MOUNT_LABEL=y +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_FEATURE_MOUNT_OTHERTAB=y +CONFIG_NSENTER=y +CONFIG_FEATURE_NSENTER_LONG_OPTS=y +CONFIG_REV=y +CONFIG_SETARCH=y +CONFIG_UEVENT=y +CONFIG_UNSHARE=y +CONFIG_ACPID=y +CONFIG_FEATURE_ACPID_COMPAT=y +CONFIG_BLKID=y +CONFIG_FEATURE_BLKID_TYPE=y +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +CONFIG_FDFLUSH=y +CONFIG_FDFORMAT=y +CONFIG_FDISK=y +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +CONFIG_FEATURE_FDISK_WRITABLE=y +CONFIG_FEATURE_AIX_LABEL=y +CONFIG_FEATURE_SGI_LABEL=y +CONFIG_FEATURE_SUN_LABEL=y +CONFIG_FEATURE_OSF_LABEL=y +CONFIG_FEATURE_GPT_LABEL=y +CONFIG_FEATURE_FDISK_ADVANCED=y +CONFIG_FINDFS=y +CONFIG_FLOCK=y +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +CONFIG_MKFS_EXT2=y +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +CONFIG_MKFS_REISER=y +CONFIG_MKFS_VFAT=y +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +CONFIG_FEATURE_HEXDUMP_REVERSE=y +CONFIG_HD=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +CONFIG_MKSWAP=y +CONFIG_FEATURE_MKSWAP_UUID=y +CONFIG_MORE=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_RDEV is not set +# CONFIG_READPROFILE is not set +CONFIG_RTCWAKE=y +CONFIG_SCRIPT=y +CONFIG_SCRIPTREPLAY=y +CONFIG_SWAPONOFF=y +CONFIG_FEATURE_SWAPON_DISCARD=y +CONFIG_FEATURE_SWAPON_PRI=y +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +CONFIG_FEATURE_MTAB_SUPPORT=y +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +CONFIG_FEATURE_VOLUMEID_BCACHE=y +CONFIG_FEATURE_VOLUMEID_BTRFS=y +CONFIG_FEATURE_VOLUMEID_CRAMFS=y +CONFIG_FEATURE_VOLUMEID_EXFAT=y +CONFIG_FEATURE_VOLUMEID_EXT=y +CONFIG_FEATURE_VOLUMEID_F2FS=y +CONFIG_FEATURE_VOLUMEID_FAT=y +CONFIG_FEATURE_VOLUMEID_HFS=y +CONFIG_FEATURE_VOLUMEID_ISO9660=y +CONFIG_FEATURE_VOLUMEID_JFS=y +CONFIG_FEATURE_VOLUMEID_LINUXRAID=y +CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y +CONFIG_FEATURE_VOLUMEID_LUKS=y +CONFIG_FEATURE_VOLUMEID_NILFS=y +CONFIG_FEATURE_VOLUMEID_NTFS=y +CONFIG_FEATURE_VOLUMEID_OCFS2=y +CONFIG_FEATURE_VOLUMEID_REISERFS=y +CONFIG_FEATURE_VOLUMEID_ROMFS=y +CONFIG_FEATURE_VOLUMEID_SQUASHFS=y +CONFIG_FEATURE_VOLUMEID_SYSV=y +CONFIG_FEATURE_VOLUMEID_UDF=y +CONFIG_FEATURE_VOLUMEID_XFS=y + +# +# Miscellaneous Utilities +# +CONFIG_CONSPY=y +CONFIG_CROND=y +CONFIG_FEATURE_CROND_D=y +CONFIG_FEATURE_CROND_CALL_SENDMAIL=y +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_I2CGET=y +CONFIG_I2CSET=y +CONFIG_I2CDUMP=y +CONFIG_I2CDETECT=y +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +CONFIG_FEATURE_LESS_TRUNCATE=y +CONFIG_FEATURE_LESS_MARKS=y +CONFIG_FEATURE_LESS_REGEXP=y +CONFIG_FEATURE_LESS_WINCH=y +CONFIG_FEATURE_LESS_ASK_TERMINAL=y +CONFIG_FEATURE_LESS_DASHCMD=y +CONFIG_FEATURE_LESS_LINENUMS=y +CONFIG_NANDWRITE=y +CONFIG_NANDDUMP=y +# CONFIG_RFKILL is not set +CONFIG_SETSERIAL=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_UBIRENAME=y +CONFIG_UBIATTACH=y +CONFIG_UBIDETACH=y +CONFIG_UBIMKVOL=y +CONFIG_UBIRMVOL=y +CONFIG_UBIRSVOL=y +CONFIG_UBIUPDATEVOL=y +CONFIG_WALL=y +CONFIG_ADJTIMEX=y +CONFIG_BBCONFIG=y +CONFIG_FEATURE_COMPRESS_BBCONFIG=y +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +CONFIG_CHAT=y +CONFIG_FEATURE_CHAT_NOFAIL=y +CONFIG_FEATURE_CHAT_TTY_HIFI=y +CONFIG_FEATURE_CHAT_IMPLICIT_CR=y +CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y +CONFIG_FEATURE_CHAT_SEND_ESCAPES=y +CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y +CONFIG_FEATURE_CHAT_CLR_ABORT=y +CONFIG_CHRT=y +# CONFIG_CRONTAB is not set +# CONFIG_DC is not set +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_DEVMEM=y +CONFIG_EJECT=y +CONFIG_FEATURE_EJECT_SCSI=y +# CONFIG_FBSPLASH is not set +CONFIG_FLASHCP=y +CONFIG_FLASH_LOCK=y +CONFIG_FLASH_UNLOCK=y +CONFIG_FLASH_ERASEALL=y +CONFIG_IONICE=y +# CONFIG_INOTIFYD is not set +CONFIG_LAST=y +CONFIG_FEATURE_LAST_FANCY=y +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y +CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +CONFIG_MAN=y +CONFIG_MICROCOM=y +CONFIG_MOUNTPOINT=y +CONFIG_MT=y +CONFIG_RAIDAUTORUN=y +CONFIG_READAHEAD=y +CONFIG_RUNLEVEL=y +CONFIG_RX=y +CONFIG_SETSID=y +CONFIG_STRINGS=y +CONFIG_TIME=y +CONFIG_TIMEOUT=y +CONFIG_TTYSIZE=y +CONFIG_VOLNAME=y +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NAMEIF=y +CONFIG_FEATURE_NAMEIF_EXTENDED=y +CONFIG_NBDCLIENT=y +CONFIG_NC=y +CONFIG_NC_SERVER=y +CONFIG_NC_EXTRA=y +CONFIG_NC_110_COMPAT=y +CONFIG_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y +CONFIG_FEATURE_WGET_OPENSSL=y +CONFIG_FEATURE_WGET_SSL_HELPER=y +CONFIG_WHOIS=y +CONFIG_FEATURE_IPV6=y +CONFIG_FEATURE_UNIX_LOCAL=y +CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y +CONFIG_VERBOSE_RESOLUTION_ERRORS=y +CONFIG_ARP=y +CONFIG_ARPING=y +CONFIG_BRCTL=y +CONFIG_FEATURE_BRCTL_FANCY=y +CONFIG_FEATURE_BRCTL_SHOW=y +# CONFIG_DNSD is not set +CONFIG_ETHER_WAKE=y +# CONFIG_FAKEIDENTD is not set +CONFIG_FTPD=y +CONFIG_FEATURE_FTP_WRITE=y +CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y +CONFIG_FEATURE_FTP_AUTHENTICATION=y +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +CONFIG_HTTPD=y +CONFIG_FEATURE_HTTPD_RANGES=y +CONFIG_FEATURE_HTTPD_SETUID=y +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_FEATURE_HTTPD_ERROR_PAGES=y +CONFIG_FEATURE_HTTPD_PROXY=y +CONFIG_FEATURE_HTTPD_GZIP=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFENSLAVE=y +CONFIG_IFPLUGD=y +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +CONFIG_FEATURE_IFUPDOWN_IP=y +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2" +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_NEIGH=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +CONFIG_FEATURE_IP_RARE_PROTOCOLS=y +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +CONFIG_IPNEIGH=y +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +CONFIG_NETSTAT=y +CONFIG_FEATURE_NETSTAT_WIDE=y +CONFIG_FEATURE_NETSTAT_PRG=y +CONFIG_NSLOOKUP=y +CONFIG_NTPD=y +CONFIG_FEATURE_NTPD_SERVER=y +CONFIG_FEATURE_NTPD_CONF=y +CONFIG_PSCAN=y +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +CONFIG_TELNETD=y +CONFIG_FEATURE_TELNETD_STANDALONE=y +CONFIG_FEATURE_TELNETD_INETD_WAIT=y +CONFIG_TFTP=y +CONFIG_TFTPD=y + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +CONFIG_FEATURE_TFTP_PROGRESS_BAR=y +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +CONFIG_TRACEROUTE6=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y +CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y +CONFIG_TUNCTL=y +CONFIG_FEATURE_TUNCTL_UG=y +CONFIG_UDHCPC6=y +CONFIG_UDHCPD=y +CONFIG_DHCPRELAY=y +CONFIG_DUMPLEASES=y +CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y +CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC=y +CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y +CONFIG_FEATURE_UDHCP_PORT=y +CONFIG_UDHCP_DEBUG=9 +CONFIG_FEATURE_UDHCP_RFC3397=y +CONFIG_FEATURE_UDHCP_8021Q=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +# CONFIG_UDPSVD is not set +CONFIG_VCONFIG=y +CONFIG_ZCIP=y + +# +# Print Utilities +# +# CONFIG_LPD is not set +CONFIG_LPR=y +CONFIG_LPQ=y + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="us-ascii" +CONFIG_POPMAILDIR=y +CONFIG_FEATURE_POPMAILDIR_DELIVERY=y +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +CONFIG_SENDMAIL=y + +# +# Process Utilities +# +CONFIG_IOSTAT=y +CONFIG_LSOF=y +CONFIG_MPSTAT=y +CONFIG_NMETER=y +CONFIG_PMAP=y +CONFIG_POWERTOP=y +CONFIG_PSTREE=y +CONFIG_PWDX=y +# CONFIG_SMEMCAP is not set +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +CONFIG_FEATURE_TOP_SMP_CPU=y +CONFIG_FEATURE_TOP_DECIMALS=y +CONFIG_FEATURE_TOP_SMP_PROCESS=y +CONFIG_FEATURE_TOPMEM=y +CONFIG_UPTIME=y +CONFIG_FEATURE_UPTIME_UTMP_SUPPORT=y +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +CONFIG_PGREP=y +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +CONFIG_PKILL=y +CONFIG_PS=y +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +CONFIG_FEATURE_PS_TIME=y +CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y +CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS=y +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_FEATURE_SHOW_THREADS=y +CONFIG_WATCH=y + +# +# Runit Utilities +# +CONFIG_CHPST=y +CONFIG_SETUIDGID=y +CONFIG_ENVUIDGID=y +CONFIG_ENVDIR=y +CONFIG_SOFTLIMIT=y +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +# CONFIG_ASH_IDLE_TIMEOUT is not set +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +CONFIG_ASH_HELP=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +CONFIG_CTTYHACK=y +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +CONFIG_SH_MATH_SUPPORT_64=y +CONFIG_FEATURE_SH_EXTRA_QUIET=y +CONFIG_FEATURE_SH_STANDALONE=y +CONFIG_FEATURE_SH_NOFORK=y +CONFIG_FEATURE_SH_HISTFILESIZE=y + +# +# System Logging Utilities +# +# CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +# CONFIG_LOGGER is not set +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_SYSLOGD is not set +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_FEATURE_KMSG_SYSLOG is not set diff --git a/savedconfig/sys-firmware/ipxe-1.0.0_p20160620 b/savedconfig/sys-firmware/ipxe-1.0.0_p20160620 new file mode 100644 index 0000000..6bd4e88 --- /dev/null +++ b/savedconfig/sys-firmware/ipxe-1.0.0_p20160620 @@ -0,0 +1,3 @@ +#undef BANNER_TIMEOUT +#define BANNER_TIMEOUT 0 +#define NET_PROTO_IPV6 diff --git a/savedconfig/sys-kernel/linux-firmware-20160331 b/savedconfig/sys-kernel/linux-firmware-20160331 new file mode 100644 index 0000000..38b39be --- /dev/null +++ b/savedconfig/sys-kernel/linux-firmware-20160331 @@ -0,0 +1,1319 @@ +# Remove files that shall not be installed from this list. +3com/3C359.bin +3com/typhoon.bin +acenic/tg1.bin +acenic/tg2.bin +adaptec/starfire_rx.bin +adaptec/starfire_tx.bin +advansys/mcode.bin +advansys/3550.bin +advansys/38C1600.bin +advansys/38C0800.bin +agere_ap_fw.bin +agere_sta_fw.bin +amdgpu/tonga_vce.bin +amdgpu/stoney_sdma.bin +amdgpu/polaris10_uvd.bin +amdgpu/fiji_mec2.bin +amdgpu/fiji_mc.bin +amdgpu/polaris10_mec2.bin +amdgpu/carrizo_uvd.bin +amdgpu/stoney_vce.bin +amdgpu/carrizo_sdma.bin +amdgpu/polaris10_mc.bin +amdgpu/polaris11_vce.bin +amdgpu/stoney_mec.bin +amdgpu/fiji_sdma.bin +amdgpu/topaz_ce.bin +amdgpu/polaris10_sdma.bin +amdgpu/polaris10_sdma1.bin +amdgpu/fiji_mec.bin +amdgpu/stoney_uvd.bin +amdgpu/polaris11_sdma1.bin +amdgpu/tonga_ce.bin +amdgpu/carrizo_sdma1.bin +amdgpu/stoney_pfp.bin +amdgpu/polaris10_smc_sk.bin +amdgpu/tonga_uvd.bin +amdgpu/topaz_mec.bin +amdgpu/polaris10_pfp.bin +amdgpu/carrizo_mec.bin +amdgpu/fiji_rlc.bin +amdgpu/polaris11_sdma.bin +amdgpu/fiji_uvd.bin +amdgpu/stoney_rlc.bin +amdgpu/topaz_sdma1.bin +amdgpu/topaz_mec2.bin +amdgpu/fiji_me.bin +amdgpu/tonga_sdma1.bin +amdgpu/tonga_rlc.bin +amdgpu/topaz_mc.bin +amdgpu/fiji_vce.bin +amdgpu/fiji_sdma1.bin +amdgpu/tonga_me.bin +amdgpu/carrizo_me.bin +amdgpu/polaris10_vce.bin +amdgpu/carrizo_mec2.bin +amdgpu/polaris10_me.bin +amdgpu/polaris11_mec.bin +amdgpu/carrizo_ce.bin +amdgpu/topaz_rlc.bin +amdgpu/polaris11_me.bin +amdgpu/topaz_pfp.bin +amdgpu/fiji_ce.bin +amdgpu/stoney_me.bin +amdgpu/fiji_smc.bin +amdgpu/polaris10_ce.bin +amdgpu/topaz_smc.bin +amdgpu/tonga_mec.bin +amdgpu/stoney_ce.bin +amdgpu/polaris11_mec2.bin +amdgpu/polaris10_smc.bin +amdgpu/polaris10_rlc.bin +amdgpu/tonga_mc.bin +amdgpu/fiji_pfp.bin +amdgpu/polaris11_rlc.bin +amdgpu/topaz_sdma.bin +amdgpu/topaz_me.bin +amdgpu/tonga_pfp.bin +amdgpu/carrizo_vce.bin +amdgpu/polaris10_mec.bin +amdgpu/polaris11_smc_sk.bin +amdgpu/polaris11_uvd.bin +amdgpu/polaris11_mc.bin +amdgpu/tonga_mec2.bin +amdgpu/carrizo_pfp.bin +amdgpu/polaris11_smc.bin +amdgpu/tonga_sdma.bin +amdgpu/carrizo_rlc.bin +amdgpu/tonga_smc.bin +amdgpu/polaris11_pfp.bin +amdgpu/polaris11_ce.bin +amd-ucode/microcode_amd_fam16h.bin.asc +amd-ucode/microcode_amd_fam15h.bin.asc +amd-ucode/microcode_amd_fam15h.bin +amd-ucode/microcode_amd.bin.asc +amd-ucode/microcode_amd.bin +amd-ucode/microcode_amd_fam16h.bin +ar3k/ramps_0x01020200_40.dfu +ar3k/ramps_0x31010100_40.dfu +ar3k/AthrBT_0x41020000.dfu +ar3k/ramps_0x01020001_26.dfu +ar3k/ramps_0x31010000_40.dfu +ar3k/1020201/PS_ASIC.pst +ar3k/1020201/RamPatch.txt +ar3k/1020200/PS_ASIC.pst +ar3k/1020200/RamPatch.txt +ar3k/1020200/ar3kbdaddr.pst +ar3k/AthrBT_0x11020100.dfu +ar3k/AthrBT_0x01020201.dfu +ar3k/AthrBT_0x31010000.dfu +ar3k/ramps_0x11020100_40.dfu +ar3k/ramps_0x01020201_40.dfu +ar3k/AthrBT_0x11020000.dfu +ar3k/ramps_0x11020000_40.dfu +ar3k/30101/PS_ASIC.pst +ar3k/30101/RamPatch.txt +ar3k/30101/ar3kbdaddr.pst +ar3k/AthrBT_0x01020200.dfu +ar3k/AthrBT_0x01020001.dfu +ar3k/AthrBT_0x31010100.dfu +ar3k/1020201coex/ramps_0x01020201_26_HighPriority.dfu +ar3k/ramps_0x01020200_26.dfu +ar3k/30101coex/PS_ASIC.pst +ar3k/30101coex/RamPatch.txt +ar3k/30101coex/ar3kbdaddr.pst +ar3k/30101coex/PS_ASIC_aclHighPri.pst +ar3k/30101coex/PS_ASIC_aclLowPri.pst +ar3k/ramps_0x41020000_40.dfu +ar3k/30000/PS_ASIC.pst +ar3k/30000/RamPatch.txt +ar3k/30000/ar3kbdaddr.pst +ar3k/ramps_0x01020201_26.dfu +ar5523.bin +ar7010_1_1.fw +ar7010.fw +ar9170-1.fw +ar9170-2.fw +ar9271.fw +as102_data1_st.hex +as102_data2_st.hex +ath10k/QCA99X0/hw2.0/firmware-5.bin +ath10k/QCA99X0/hw2.0/notice_ath10k_firmware-5.txt +ath10k/QCA99X0/hw2.0/board.bin +ath10k/QCA988X/hw2.0/notice_ath10k_firmware-4.txt +ath10k/QCA988X/hw2.0/firmware-4.bin +ath10k/QCA988X/hw2.0/firmware-5.bin +ath10k/QCA988X/hw2.0/notice_ath10k_firmware-5.txt +ath10k/QCA988X/hw2.0/board.bin +ath10k/QCA6174/hw2.1/firmware-5.bin +ath10k/QCA6174/hw2.1/notice_ath10k_firmware-5.txt +ath10k/QCA6174/hw2.1/board.bin +ath10k/QCA6174/hw3.0/notice_ath10k_firmware-4.txt +ath10k/QCA6174/hw3.0/firmware-4.bin +ath10k/QCA6174/hw3.0/board.bin +ath3k-1.fw +ath6k/AR6003.1/hw2.1.1/athwlan.bin +ath6k/AR6003.1/hw2.1.1/data.patch.bin +ath6k/AR6003.1/hw2.1.1/otp.bin +ath6k/AR6003.1/hw2.1.1/bdata.WB31.bin +ath6k/AR6003.1/hw2.1.1/bdata.SD31.bin +ath6k/AR6003.1/hw2.1.1/endpointping.bin +ath6k/AR6003.1/hw2.1.1/bdata.SD32.bin +ath6k/AR6004/hw1.3/fw-3.bin +ath6k/AR6004/hw1.3/bdata.bin +ath6k/AR6004/hw1.2/fw-2.bin +ath6k/AR6004/hw1.2/bdata.bin +ath6k/AR6002/eeprom.data +ath6k/AR6002/athwlan.bin.z77 +ath6k/AR6002/data.patch.hw2_0.bin +ath6k/AR6002/eeprom.bin +ath6k/AR6003/hw2.1.1/athwlan.bin +ath6k/AR6003/hw2.1.1/data.patch.bin +ath6k/AR6003/hw2.1.1/fw-2.bin +ath6k/AR6003/hw2.1.1/otp.bin +ath6k/AR6003/hw2.1.1/bdata.WB31.bin +ath6k/AR6003/hw2.1.1/bdata.SD31.bin +ath6k/AR6003/hw2.1.1/fw-3.bin +ath6k/AR6003/hw2.1.1/endpointping.bin +ath6k/AR6003/hw2.1.1/bdata.SD32.bin +ath6k/AR6003/hw2.0/data.patch.bin +ath6k/AR6003/hw2.0/bdata.WB31.bin +ath6k/AR6003/hw2.0/athwlan.bin.z77 +ath6k/AR6003/hw2.0/bdata.SD31.bin +ath6k/AR6003/hw2.0/otp.bin.z77 +ath6k/AR6003/hw2.0/bdata.SD32.bin +ath6k/AR6003/hw1.0/data.patch.bin +ath6k/AR6003/hw1.0/bdata.WB31.bin +ath6k/AR6003/hw1.0/athwlan.bin.z77 +ath6k/AR6003/hw1.0/bdata.SD31.bin +ath6k/AR6003/hw1.0/otp.bin.z77 +ath6k/AR6003/hw1.0/bdata.SD32.bin +ath9k_htc/htc_7010-1.4.0.fw +ath9k_htc/htc_9271-1.4.0.fw +atmel/wilc1000_ap_fw.bin +atmel/wilc1000_p2p_fw.bin +atmel/wilc1000_fw.bin +atmsar11.fw +atusb/ChangeLog +atusb/atusb-0.2.dfu +av7110/bootcode.bin +av7110/Makefile +av7110/Boot.S +bnx2/bnx2-rv2p-09ax-6.0.17.fw +bnx2/bnx2-mips-09-6.2.1.fw +bnx2/bnx2-mips-09-5.0.0.j3.fw +bnx2/bnx2-rv2p-09-6.0.17.fw +bnx2/bnx2-rv2p-09ax-5.0.0.j10.fw +bnx2/bnx2-rv2p-09-5.0.0.j10.fw +bnx2/bnx2-rv2p-09-4.6.15.fw +bnx2/bnx2-mips-09-5.0.0.j15.fw +bnx2/bnx2-rv2p-06-4.6.16.fw +bnx2/bnx2-rv2p-09-5.0.0.j3.fw +bnx2/bnx2-mips-06-6.2.3.fw +bnx2/bnx2-mips-06-6.2.1.fw +bnx2/bnx2-mips-09-5.0.0.j9.fw +bnx2/bnx2-mips-06-5.0.0.j6.fw +bnx2/bnx2-mips-06-6.0.15.fw +bnx2/bnx2-mips-09-6.0.17.fw +bnx2/bnx2-mips-09-6.2.1b.fw +bnx2/bnx2-mips-06-4.6.16.fw +bnx2/bnx2-mips-06-5.0.0.j3.fw +bnx2/bnx2-mips-09-4.6.17.fw +bnx2/bnx2-rv2p-06-5.0.0.j3.fw +bnx2/bnx2-rv2p-06-6.0.15.fw +bnx2/bnx2-mips-09-6.2.1a.fw +bnx2/bnx2-rv2p-09ax-5.0.0.j3.fw +bnx2x/bnx2x-e1h-7.8.2.0.fw +bnx2x/bnx2x-e2-6.0.34.0.fw +bnx2x/bnx2x-e1-7.2.51.0.fw +bnx2x/bnx2x-e1h-6.0.34.0.fw +bnx2x/bnx2x-e1-7.8.17.0.fw +bnx2x/bnx2x-e1h-7.10.51.0.fw +bnx2x/bnx2x-e2-7.0.29.0.fw +bnx2x/bnx2x-e1-7.0.23.0.fw +bnx2x/bnx2x-e1-7.10.51.0.fw +bnx2x/bnx2x-e1-6.2.9.0.fw +bnx2x/bnx2x-e1-7.2.16.0.fw +bnx2x/bnx2x-e2-7.2.16.0.fw +bnx2x/bnx2x-e2-6.2.9.0.fw +bnx2x/bnx2x-e1h-7.2.16.0.fw +bnx2x/bnx2x-e1h-7.2.51.0.fw +bnx2x/bnx2x-e2-7.2.51.0.fw +bnx2x/bnx2x-e2-7.0.23.0.fw +bnx2x/bnx2x-e2-7.12.30.0.fw +bnx2x/bnx2x-e2-7.10.51.0.fw +bnx2x/bnx2x-e2-6.2.5.0.fw +bnx2x/bnx2x-e1h-6.2.5.0.fw +bnx2x/bnx2x-e1h-7.0.29.0.fw +bnx2x/bnx2x-e1h-6.2.9.0.fw +bnx2x/bnx2x-e1-7.8.2.0.fw +bnx2x/bnx2x-e1-7.0.29.0.fw +bnx2x/bnx2x-e1h-7.8.19.0.fw +bnx2x/bnx2x-e2-7.8.2.0.fw +bnx2x/bnx2x-e1-6.2.5.0.fw +bnx2x/bnx2x-e2-7.0.20.0.fw +bnx2x/bnx2x-e2-7.8.17.0.fw +bnx2x/bnx2x-e2-7.8.19.0.fw +bnx2x/bnx2x-e1h-7.0.23.0.fw +bnx2x/bnx2x-e1h-7.8.17.0.fw +bnx2x/bnx2x-e2-7.13.1.0.fw +bnx2x/bnx2x-e1h-7.13.1.0.fw +bnx2x/bnx2x-e1h-7.0.20.0.fw +bnx2x/bnx2x-e1h-7.12.30.0.fw +bnx2x/bnx2x-e1-7.12.30.0.fw +bnx2x/bnx2x-e1-7.13.1.0.fw +bnx2x/bnx2x-e1-7.0.20.0.fw +bnx2x/bnx2x-e1-6.0.34.0.fw +bnx2x/bnx2x-e1-7.8.19.0.fw +bnx2x-e1-4.8.53.0.fw +bnx2x-e1-5.2.13.0.fw +bnx2x-e1-5.2.7.0.fw +bnx2x-e1h-4.8.53.0.fw +bnx2x-e1h-5.2.13.0.fw +bnx2x-e1h-5.2.7.0.fw +brcm/brcmfmac43143-sdio.bin +brcm/bcm43xx_hdr-0.fw +brcm/brcmfmac4334-sdio.bin +brcm/brcmfmac43602-pcie.bin +brcm/brcmfmac43362-sdio.bin +brcm/brcmfmac4350-pcie.bin +brcm/brcmfmac43340-sdio.bin +brcm/brcmfmac43241b0-sdio.bin +brcm/brcmfmac43236b.bin +brcm/brcmfmac43602-pcie.ap.bin +brcm/brcmfmac4356-pcie.bin +brcm/brcmfmac43242a.bin +brcm/brcmfmac4329-sdio.bin +brcm/brcmfmac43143.bin +brcm/bcm43xx-0.fw +brcm/brcmfmac43570-pcie.bin +brcm/brcmfmac4366b-pcie.bin +brcm/brcmfmac4371-pcie.bin +brcm/brcmfmac4330-sdio.bin +brcm/brcmfmac43455-sdio.bin +brcm/brcmfmac4335-sdio.bin +brcm/brcmfmac4339-sdio.bin +brcm/bcm4329-fullmac-4.bin +brcm/brcmfmac43241b4-sdio.bin +brcm/brcmfmac4354-sdio.bin +brcm/brcmfmac43241b5-sdio.bin +brcm/brcmfmac43569.bin +brcm/brcmfmac4350c2-pcie.bin +carl9170-1.fw +carl9170fw/README +carl9170fw/config/symbol.c +carl9170fw/config/zconf.y +carl9170fw/config/CMakeLists.txt +carl9170fw/config/expr.c +carl9170fw/config/menu.c +carl9170fw/config/util.c +carl9170fw/config/zconf.gperf +carl9170fw/config/lkc_proto.h +carl9170fw/config/conf.c +carl9170fw/config/expr.h +carl9170fw/config/confdata.c +carl9170fw/config/zconf.l +carl9170fw/config/lkc.h +carl9170fw/CMakeLists.txt +carl9170fw/genapi.sh +carl9170fw/Kconfig +carl9170fw/carlfw/CMakeLists.txt +carl9170fw/carlfw/Kconfig +carl9170fw/carlfw/carl9170.lds +carl9170fw/carlfw/usb/Kconfig +carl9170fw/carlfw/usb/main.c +carl9170fw/carlfw/usb/usb.c +carl9170fw/carlfw/usb/fifo.c +carl9170fw/carlfw/include/printf.h +carl9170fw/carlfw/include/usb_fifo.h +carl9170fw/carlfw/include/io.h +carl9170fw/carlfw/include/hostif.h +carl9170fw/carlfw/include/config.h +carl9170fw/carlfw/include/usb.h +carl9170fw/carlfw/include/carl9170.h +carl9170fw/carlfw/include/cam.h +carl9170fw/carlfw/include/gpio.h +carl9170fw/carlfw/include/wl.h +carl9170fw/carlfw/include/timer.h +carl9170fw/carlfw/include/rom.h +carl9170fw/carlfw/include/dma.h +carl9170fw/carlfw/include/fwdsc.h +carl9170fw/carlfw/include/wol.h +carl9170fw/carlfw/include/uart.h +carl9170fw/carlfw/include/cmd.h +carl9170fw/carlfw/include/rf.h +carl9170fw/carlfw/src/wlan.c +carl9170fw/carlfw/src/gpio.c +carl9170fw/carlfw/src/hostif.c +carl9170fw/carlfw/src/dma.c +carl9170fw/carlfw/src/memset.S +carl9170fw/carlfw/src/main.c +carl9170fw/carlfw/src/ashlsi3.S +carl9170fw/carlfw/src/reboot.S +carl9170fw/carlfw/src/fw.c +carl9170fw/carlfw/src/udivsi3_i4i-Os.S +carl9170fw/carlfw/src/uart.c +carl9170fw/carlfw/src/wol.c +carl9170fw/carlfw/src/memcpy.S +carl9170fw/carlfw/src/cam.c +carl9170fw/carlfw/src/cmd.c +carl9170fw/carlfw/src/printf.c +carl9170fw/carlfw/src/rf.c +carl9170fw/minifw/miniboot.S +carl9170fw/minifw/CMakeLists.txt +carl9170fw/minifw/Kconfig +carl9170fw/minifw/miniboot.lds +carl9170fw/COPYRIGHT +carl9170fw/include/shared/hw.h +carl9170fw/include/shared/version.h +carl9170fw/include/shared/fwdesc.h +carl9170fw/include/shared/phy.h +carl9170fw/include/shared/eeprom.h +carl9170fw/include/shared/wlan.h +carl9170fw/include/shared/fwcmd.h +carl9170fw/include/linux/compiler.h +carl9170fw/include/linux/ieee80211.h +carl9170fw/include/linux/types.h +carl9170fw/include/linux/ch9.h +carl9170fw/GPL +carl9170fw/tools/CMakeLists.txt +carl9170fw/tools/Kconfig +carl9170fw/tools/carlu/CMakeLists.txt +carl9170fw/tools/carlu/src/debug.c +carl9170fw/tools/carlu/src/rx.c +carl9170fw/tools/carlu/src/usb.h +carl9170fw/tools/carlu/src/main.c +carl9170fw/tools/carlu/src/fw.c +carl9170fw/tools/carlu/src/tx.c +carl9170fw/tools/carlu/src/test.c +carl9170fw/tools/carlu/src/usb.c +carl9170fw/tools/carlu/src/cmd.c +carl9170fw/tools/carlu/src/cmd.h +carl9170fw/tools/carlu/src/test.h +carl9170fw/tools/carlu/src/carlu.h +carl9170fw/tools/carlu/src/debug.h +carl9170fw/tools/include/list.h +carl9170fw/tools/include/frame.h +carl9170fw/tools/src/CMakeLists.txt +carl9170fw/tools/src/wol.c +carl9170fw/tools/src/checksum.c +carl9170fw/tools/src/miniboot.c +carl9170fw/tools/src/fwinfo.c +carl9170fw/tools/src/eeprom_fix.c +carl9170fw/tools/lib/CMakeLists.txt +carl9170fw/tools/lib/carlfw.c +carl9170fw/tools/lib/carlfw.h +carl9170fw/toolchain/SHA256SUMS +carl9170fw/toolchain/Makefile +carl9170fw/autogen.sh +carl9170fw/extra/FindUSB-1.0.cmake +carl9170fw/extra/FindGPERF.cmake +carl9170fw/extra/sh-elf-linux.cmake +carl9170fw/extra/GCCVersion.cmake +carl9170fw/extra/libusb-zeropacket.diff +carl9170fw/extra/FindPackageHandleStandardArgs.cmake +cbfw-3.2.1.1.bin +cbfw-3.2.3.0.bin +cbfw-3.2.5.1.bin +cis/SW_7xx_SER.cis +cis/tamarack.cis +cis/PCMLM28.cis +cis/PE520.cis +cis/3CXEM556.cis +cis/DP83903.cis +cis/SW_8xx_SER.cis +cis/Makefile +cis/3CCFEM556.cis +cis/NE2K.cis +cis/PE-200.cis +cis/SW_555_SER.cis +cis/COMpad2.cis +cis/RS-COM-2P.cis +cis/COMpad4.cis +cis/LA-PCM.cis +cis/src/tamarack.cis +cis/src/PCMLM28.cis +cis/src/PE520.cis +cis/src/3CXEM556.cis +cis/src/DP83903.cis +cis/src/3CCFEM556.cis +cis/src/NE2K.cis +cis/src/PE-200.cis +cis/src/COMpad2.cis +cis/src/RS-COM-2P.cis +cis/src/COMpad4.cis +cis/src/LA-PCM.cis +cis/src/MT5634ZLX.cis +cis/MT5634ZLX.cis +cmmb_vega_12mhz.inp +cmmb_venice_12mhz.inp +configure +cpia2/stv0672_vp4.bin +ct2fw-3.2.1.1.bin +ct2fw-3.2.3.0.bin +ct2fw-3.2.5.1.bin +ctefx.bin +ctfw-3.2.1.1.bin +ctfw-3.2.3.0.bin +ctfw-3.2.5.1.bin +ctspeq.bin +cxgb3/t3fw-7.0.0.bin +cxgb3/t3b_psram-1.1.0.bin +cxgb3/t3c_psram-1.1.0.bin +cxgb3/t3fw-7.12.0.bin +cxgb3/t3fw-7.4.0.bin +cxgb3/ael2020_twx_edc.bin +cxgb3/t3fw-7.10.0.bin +cxgb3/ael2005_opt_edc.bin +cxgb3/t3fw-7.1.0.bin +cxgb3/ael2005_twx_edc.bin +cxgb4/bcm8483.bin +cxgb4/t5fw-1.14.4.0.bin +cxgb4/aq1202_fw.cld +cxgb4/t5fw.bin +cxgb4/t4fw-1.14.4.0.bin +cxgb4/t4fw.bin +dabusb/firmware.fw +dabusb/bitstream.bin +dsp56k/Makefile +dsp56k/bootstrap.asm +dsp56k/bootstrap.bin +dsp56k/concat-bootstrap.pl +dvb-fe-xc4000-1.4.1.fw +dvb-fe-xc5000-1.6.114.fw +dvb-fe-xc5000c-4.1.30.7.fw +dvb_nova_12mhz_b0.inp +dvb_nova_12mhz.inp +dvb-usb-dib0700-1.20.fw +dvb-usb-it9135-01.fw +dvb-usb-it9135-02.fw +dvb-usb-terratec-h5-drxk.fw +e100/d102e_ucode.bin +e100/d101m_ucode.bin +e100/d101s_ucode.bin +edgeport/boot2.fw +edgeport/down2.fw +edgeport/down3.bin +edgeport/down.fw +edgeport/boot.fw +emi26/loader.fw +emi26/firmware.fw +emi26/bitstream.fw +emi62/loader.fw +emi62/spdif.fw +emi62/bitstream.fw +emi62/midi.fw +ene-ub6250/sd_init2.bin +ene-ub6250/msp_rdwr.bin +ene-ub6250/sd_rdwr.bin +ene-ub6250/ms_init.bin +ene-ub6250/sd_init1.bin +ene-ub6250/ms_rdwr.bin +ess/maestro3_assp_minisrc.fw +ess/maestro3_assp_kernel.fw +f2255usb.bin +go7007/lr192.fw +go7007/px-m402u.fw +go7007/s2250-1.fw +go7007/wis-startrek.fw +go7007/s2250-2.fw +go7007/go7007tv.bin +go7007/px-tv402u.fw +go7007/go7007fw.bin +GPL-3 +hfi1_dc8051.fw +hfi1_fabric.fw +hfi1_pcie.fw +hfi1_sbus.fw +htc_7010.fw +htc_9271.fw +i2400m-fw-usb-1.4.sbcf +i2400m-fw-usb-1.5.sbcf +i6050-fw-usb-1.5.sbcf +i915/skl_guc_ver1.bin +i915/skl_guc_ver6_1.bin +i915/bxt_dmc_ver1_05.bin +i915/bxt_dmc_ver1_04.bin +i915/skl_guc_ver6.bin +i915/skl_guc_ver4.bin +i915/skl_dmc_ver1_23.bin +i915/bxt_dmc_ver1_06.bin +i915/skl_guc_ver1_1059.bin +i915/skl_dmc_ver1.bin +i915/bxt_dmc_ver1.bin +i915/skl_dmc_ver1_26.bin +i915/skl_guc_ver4_3.bin +intel/ibt-hw-37.8.10-fw-1.10.2.27.d.bseq +intel/ibt-11-5.ddc +intel/dsp_fw_release.bin +intel/dsp_fw_release_v827.bin +intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq +intel/dsp_fw_release_v869.bin +intel/ibt-11-5.sfi +intel/fw_sst_0f28.bin-48kHz_i2s_master +intel/ibt-hw-37.7.10-fw-1.80.1.2d.d.bseq +intel/ibt-hw-37.7.bseq +intel/fw_sst_22a8.bin +intel/ibt-hw-37.8.bseq +intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq +intel/IntcSST2.bin +intel/fw_sst_0f28.bin +intel/ibt-hw-37.8.10-fw-1.10.3.11.e.bseq +intel/dsp_fw_release_v896.bin +intel/ibt-hw-37.7.10-fw-1.0.1.2d.d.bseq +intel/ibt-hw-37.7.10-fw-1.0.2.3.d.bseq +intelliport2.bin +isci/README +isci/create_fw.c +isci/create_fw.h +isci/Makefile +isci/probe_roms.h +isci/isci_firmware.bin +isdbt_nova_12mhz_b0.inp +isdbt_nova_12mhz.inp +isdbt_rio.inp +iwlwifi-1000-3.ucode +iwlwifi-1000-5.ucode +iwlwifi-100-5.ucode +iwlwifi-105-6.ucode +iwlwifi-135-6.ucode +iwlwifi-2000-6.ucode +iwlwifi-2030-6.ucode +iwlwifi-3160-10.ucode +iwlwifi-3160-12.ucode +iwlwifi-3160-13.ucode +iwlwifi-3160-16.ucode +iwlwifi-3160-7.ucode +iwlwifi-3160-8.ucode +iwlwifi-3160-9.ucode +iwlwifi-3168-21.ucode +iwlwifi-3945-2.ucode +iwlwifi-4965-2.ucode +iwlwifi-5000-1.ucode +iwlwifi-5000-2.ucode +iwlwifi-5000-5.ucode +iwlwifi-5150-2.ucode +iwlwifi-6000-4.ucode +iwlwifi-6000g2a-5.ucode +iwlwifi-6000g2a-6.ucode +iwlwifi-6000g2b-5.ucode +iwlwifi-6000g2b-6.ucode +iwlwifi-6050-4.ucode +iwlwifi-6050-5.ucode +iwlwifi-7260-10.ucode +iwlwifi-7260-12.ucode +iwlwifi-7260-13.ucode +iwlwifi-7260-16.ucode +iwlwifi-7260-7.ucode +iwlwifi-7260-8.ucode +iwlwifi-7260-9.ucode +iwlwifi-7265-10.ucode +iwlwifi-7265-12.ucode +iwlwifi-7265-13.ucode +iwlwifi-7265-16.ucode +iwlwifi-7265-8.ucode +iwlwifi-7265-9.ucode +iwlwifi-7265D-10.ucode +iwlwifi-7265D-12.ucode +iwlwifi-7265D-13.ucode +iwlwifi-7265D-16.ucode +iwlwifi-7265D-21.ucode +iwlwifi-8265-21.ucode +kaweth/trigger_code_fix.bin +kaweth/new_code_fix.bin +kaweth/new_code.bin +kaweth/trigger_code.bin +keyspan/usa19w.fw +keyspan/mpr.fw +keyspan/usa28xb.fw +keyspan/usa28x.fw +keyspan/usa28.fw +keyspan/usa18x.fw +keyspan/usa49w.fw +keyspan/usa19qi.fw +keyspan/usa19qw.fw +keyspan/usa28xa.fw +keyspan/usa49wlc.fw +keyspan/usa19.fw +keyspan_pda/Makefile +keyspan_pda/keyspan_pda.fw +keyspan_pda/xircom_pgs.fw +keyspan_pda/keyspan_pda.S +keyspan_pda/xircom_pgs.S +korg/k1212.dsp +lbtf_usb.bin +lgs8g75.fw +libertas/gspi8686_v9_helper.bin +libertas/sd8688_helper.bin +libertas/gspi8688_helper.bin +libertas/gspi8682.bin +libertas/gspi8682_helper.bin +libertas/sd8686_v8.bin +libertas/usb8388_olpc.bin +libertas/cf8381.bin +libertas/sd8385_helper.bin +libertas/gspi8688.bin +libertas/sd8682_helper.bin +libertas/gspi8686_v9.bin +libertas/sd8686_v8_helper.bin +libertas/cf8385_helper.bin +libertas/usb8388_v5.bin +libertas/cf8381_helper.bin +libertas/usb8388_v9.bin +libertas/sd8682.bin +libertas/cf8385.bin +libertas/sd8385.bin +libertas/lbtf_sdio.bin +libertas/sd8686_v9.bin +libertas/usb8682.bin +libertas/sd8686_v9_helper.bin +libertas/sd8688.bin +LICENCE.Abilis +LICENCE.adsp_sst +LICENCE.agere +LICENCE.atheros_firmware +LICENCE.broadcom_bcm43xx +LICENCE.ca0132 +LICENCE.cavium +LICENCE.chelsio_firmware +LICENCE.cw1200 +LICENCE.e100 +LICENCE.ene_firmware +LICENCE.fw_sst_0f28 +LICENCE.go7007 +LICENCE.i2400m +LICENCE.ibt_firmware +LICENCE.IntcSST2 +LICENCE.it913x +LICENCE.iwlwifi_firmware +LICENCE.kaweth +LICENCE.Marvell +LICENCE.moxa +LICENCE.mwl8335 +LICENCE.myri10ge_firmware +LICENCE.nvidia +LICENCE.OLPC +LICENCE.open-ath9k-htc-firmware +LICENCE.phanfw +LICENCE.qat_firmware +LICENCE.qla1280 +LICENCE.qla2xxx +LICENCE.r8a779x_usb3 +LICENCE.ralink_a_mediatek_company_firmware +LICENCE.ralink-firmware.txt +LICENCE.rtlwifi_firmware.txt +LICENCE.siano +LICENCE.tda7706-firmware.txt +LICENCE.ti-connectivity +LICENCE.ti-keystone +LICENCE.ueagle-atm4-firmware +LICENCE.via_vt6656 +LICENCE.wl1251 +LICENCE.xc4000 +LICENCE.xc5000 +LICENCE.xc5000c +LICENSE.amdgpu +LICENSE.amd-ucode +LICENSE.atmel +LICENSE.dib0700 +LICENSE.hfi1_firmware +LICENSE.i915 +LICENSE.QualcommAtheros_ar3k +LICENSE.QualcommAtheros_ath10k +LICENSE.radeon +liquidio/lio_210sv_nic.bin +liquidio/lio_410nv_nic.bin +liquidio/lio_210nv_nic.bin +Makefile +matrox/g400_warp.fw +matrox/g200_warp.fw +moxa/moxa-1150.fw +moxa/moxa-1251.fw +moxa/moxa-1250.fw +moxa/moxa-1410.fw +moxa/moxa-1131.fw +moxa/moxa-1653.fw +moxa/moxa-1451.fw +moxa/moxa-1130.fw +moxa/moxa-1613.fw +moxa/moxa-1658.fw +moxa/moxa-1450.fw +moxa/moxa-1151.fw +moxa/moxa-1618.fw +moxa/moxa-1110.fw +mrvl/sd8688_helper.bin +mrvl/pcie8897_uapsta.bin +mrvl/sd8787_uapsta.bin +mrvl/sd8801_uapsta.bin +mrvl/usb8797_uapsta.bin +mrvl/usb8801_uapsta.bin +mrvl/sd8797_uapsta.bin +mrvl/sd8897_uapsta.bin +mrvl/usb8766_uapsta.bin +mrvl/sd8887_uapsta.bin +mrvl/usb8897_uapsta.bin +mrvl/sd8688.bin +mt7601u.bin +mt7650.bin +mts_cdma.fw +mts_edge.fw +mts_gsm.fw +mts_mt9234mu.fw +mts_mt9234zba.fw +mwl8k/fmimage_8687.fw +mwl8k/fmimage_8764_ap-1.fw +mwl8k/fmimage_8366_ap-1.fw +mwl8k/fmimage_8366.fw +mwl8k/helper_8366.fw +mwl8k/fmimage_8366_ap-3.fw +mwl8k/helper_8687.fw +mwl8k/fmimage_8366_ap-2.fw +mwlwifi/88W8864.bin +mwlwifi/88W8897.bin +myri10ge_eth_big_z8e.dat +myri10ge_ethp_big_z8e.dat +myri10ge_ethp_z8e.dat +myri10ge_eth_z8e.dat +myri10ge_rss_eth_big_z8e.dat +myri10ge_rss_ethp_big_z8e.dat +myri10ge_rss_ethp_z8e.dat +myri10ge_rss_eth_z8e.dat +myricom/lanai.bin +nvidia/gm204/acr/ucode_load.bin +nvidia/gm204/acr/bl.bin +nvidia/gm204/acr/ucode_unload.bin +nvidia/gm204/gr/sw_nonctx.bin +nvidia/gm204/gr/gpccs_sig.bin +nvidia/gm204/gr/sw_method_init.bin +nvidia/gm204/gr/fecs_data.bin +nvidia/gm204/gr/gpccs_data.bin +nvidia/gm204/gr/gpccs_inst.bin +nvidia/gm204/gr/sw_bundle_init.bin +nvidia/gm204/gr/sw_ctx.bin +nvidia/gm204/gr/fecs_bl.bin +nvidia/gm204/gr/fecs_inst.bin +nvidia/gm204/gr/gpccs_bl.bin +nvidia/gm204/gr/fecs_sig.bin +nvidia/gm20b/acr/ucode_load.bin +nvidia/gm20b/acr/bl.bin +nvidia/gm20b/gr/sw_nonctx.bin +nvidia/gm20b/gr/sw_method_init.bin +nvidia/gm20b/gr/fecs_data.bin +nvidia/gm20b/gr/gpccs_data.bin +nvidia/gm20b/gr/gpccs_inst.bin +nvidia/gm20b/gr/sw_bundle_init.bin +nvidia/gm20b/gr/sw_ctx.bin +nvidia/gm20b/gr/fecs_bl.bin +nvidia/gm20b/gr/fecs_inst.bin +nvidia/gm20b/gr/fecs_sig.bin +nvidia/tegra210/xusb.bin +nvidia/gm200/acr/ucode_load.bin +nvidia/gm200/acr/bl.bin +nvidia/gm200/acr/ucode_unload.bin +nvidia/gm200/gr/sw_nonctx.bin +nvidia/gm200/gr/gpccs_sig.bin +nvidia/gm200/gr/sw_method_init.bin +nvidia/gm200/gr/fecs_data.bin +nvidia/gm200/gr/gpccs_data.bin +nvidia/gm200/gr/gpccs_inst.bin +nvidia/gm200/gr/sw_bundle_init.bin +nvidia/gm200/gr/sw_ctx.bin +nvidia/gm200/gr/fecs_bl.bin +nvidia/gm200/gr/fecs_inst.bin +nvidia/gm200/gr/gpccs_bl.bin +nvidia/gm200/gr/fecs_sig.bin +nvidia/gk20a/sw_nonctx.bin +nvidia/gk20a/sw_method_init.bin +nvidia/gk20a/fecs_data.bin +nvidia/gk20a/gpccs_data.bin +nvidia/gk20a/gpccs_inst.bin +nvidia/gk20a/sw_bundle_init.bin +nvidia/gk20a/sw_ctx.bin +nvidia/gk20a/fecs_inst.bin +nvidia/tegra124/xusb.bin +nvidia/gm206/acr/ucode_load.bin +nvidia/gm206/acr/bl.bin +nvidia/gm206/acr/ucode_unload.bin +nvidia/gm206/gr/sw_nonctx.bin +nvidia/gm206/gr/gpccs_sig.bin +nvidia/gm206/gr/sw_method_init.bin +nvidia/gm206/gr/fecs_data.bin +nvidia/gm206/gr/gpccs_data.bin +nvidia/gm206/gr/gpccs_inst.bin +nvidia/gm206/gr/sw_bundle_init.bin +nvidia/gm206/gr/sw_ctx.bin +nvidia/gm206/gr/fecs_bl.bin +nvidia/gm206/gr/fecs_inst.bin +nvidia/gm206/gr/gpccs_bl.bin +nvidia/gm206/gr/fecs_sig.bin +ositech/Xilinx7OD.bin +phanfw.bin +qat_895xcc.bin +qat_895xcc_mmp.bin +qat_c3xxx.bin +qat_c3xxx_mmp.bin +qat_c62x.bin +qat_c62x_mmp.bin +qat_mmp.bin +qca/rampatch_usb_00000200.bin +qca/NOTICE.txt +qca/rampatch_00130300.bin +qca/nvm_usb_00000200.bin +qca/rampatch_00130302.bin +qca/nvm_00130302.bin +qca/nvm_00130300.bin +qca/rampatch_usb_00000201.bin +qca/nvm_usb_00000201.bin +qca/rampatch_usb_00000302.bin +qca/rampatch_usb_00000300.bin +qca/nvm_usb_00000302.bin +qca/nvm_usb_00000300.bin +qed/qed_init_values_zipped-8.4.2.0.bin +qed/qed_init_values_zipped-8.7.3.0.bin +ql2100_fw.bin +ql2200_fw.bin +ql2300_fw.bin +ql2322_fw.bin +ql2400_fw.bin +ql2500_fw.bin +qlogic/sd7220.fw +qlogic/12160.bin +qlogic/1040.bin +qlogic/1280.bin +qlogic/isp1000.bin +r128/r128_cce.bin +r8a779x_usb3_v1.dlmem +r8a779x_usb3_v2.dlmem +radeon/pitcairn_me.bin +radeon/BONAIRE_mc2.bin +radeon/VERDE_me.bin +radeon/hainan_mc.bin +radeon/BONAIRE_uvd.bin +radeon/RS600_cp.bin +radeon/R700_rlc.bin +radeon/CAICOS_smc.bin +radeon/kabini_vce.bin +radeon/TURKS_me.bin +radeon/RV630_pfp.bin +radeon/TAHITI_rlc.bin +radeon/HAWAII_mec.bin +radeon/KABINI_me.bin +radeon/PALM_pfp.bin +radeon/CEDAR_smc.bin +radeon/tahiti_ce.bin +radeon/bonaire_ce.bin +radeon/KABINI_rlc.bin +radeon/JUNIPER_smc.bin +radeon/BONAIRE_ce.bin +radeon/mullins_vce.bin +radeon/CAICOS_me.bin +radeon/VERDE_smc.bin +radeon/TAHITI_ce.bin +radeon/REDWOOD_smc.bin +radeon/JUNIPER_rlc.bin +radeon/RV620_me.bin +radeon/R600_rlc.bin +radeon/oland_pfp.bin +radeon/RV770_me.bin +radeon/bonaire_pfp.bin +radeon/CAYMAN_rlc.bin +radeon/RV730_pfp.bin +radeon/BTC_rlc.bin +radeon/TAHITI_smc.bin +radeon/KAVERI_me.bin +radeon/hawaii_uvd.bin +radeon/RV630_me.bin +radeon/BARTS_pfp.bin +radeon/pitcairn_smc.bin +radeon/JUNIPER_pfp.bin +radeon/KAVERI_sdma.bin +radeon/REDWOOD_rlc.bin +radeon/hainan_ce.bin +radeon/kaveri_mec2.bin +radeon/CAYMAN_pfp.bin +radeon/bonaire_sdma.bin +radeon/CEDAR_me.bin +radeon/R600_uvd.bin +radeon/VERDE_rlc.bin +radeon/bonaire_mec.bin +radeon/bonaire_me.bin +radeon/CAICOS_mc.bin +radeon/KAVERI_pfp.bin +radeon/hawaii_vce.bin +radeon/RV635_pfp.bin +radeon/CEDAR_rlc.bin +radeon/mullins_pfp.bin +radeon/RS780_pfp.bin +radeon/bonaire_mc.bin +radeon/verde_ce.bin +radeon/HAWAII_smc.bin +radeon/RV670_pfp.bin +radeon/MULLINS_me.bin +radeon/kabini_mec.bin +radeon/mullins_uvd.bin +radeon/TURKS_smc.bin +radeon/HAINAN_mc2.bin +radeon/TAHITI_vce.bin +radeon/BONAIRE_smc.bin +radeon/kabini_sdma1.bin +radeon/RV730_me.bin +radeon/bonaire_rlc.bin +radeon/PITCAIRN_mc.bin +radeon/oland_ce.bin +radeon/SUMO_me.bin +radeon/KABINI_sdma.bin +radeon/PALM_me.bin +radeon/oland_smc.bin +radeon/ARUBA_me.bin +radeon/CYPRESS_uvd.bin +radeon/RV730_smc.bin +radeon/HAWAII_ce.bin +radeon/R300_cp.bin +radeon/PITCAIRN_smc.bin +radeon/HAINAN_me.bin +radeon/SUMO_pfp.bin +radeon/kabini_pfp.bin +radeon/MULLINS_sdma.bin +radeon/VERDE_ce.bin +radeon/mullins_sdma1.bin +radeon/RV635_me.bin +radeon/CAICOS_pfp.bin +radeon/RV770_uvd.bin +radeon/TAHITI_mc.bin +radeon/RV740_smc.bin +radeon/mullins_me.bin +radeon/RV670_me.bin +radeon/hawaii_ce.bin +radeon/PITCAIRN_ce.bin +radeon/BONAIRE_mc.bin +radeon/RS780_me.bin +radeon/kaveri_ce.bin +radeon/R200_cp.bin +radeon/CAYMAN_me.bin +radeon/SUMO2_me.bin +radeon/kaveri_mec.bin +radeon/kaveri_rlc.bin +radeon/mullins_ce.bin +radeon/hainan_me.bin +radeon/HAINAN_mc.bin +radeon/PITCAIRN_rlc.bin +radeon/bonaire_smc.bin +radeon/hawaii_me.bin +radeon/hainan_smc.bin +radeon/HAWAII_sdma.bin +radeon/RV770_pfp.bin +radeon/HAWAII_pfp.bin +radeon/SUMO_uvd.bin +radeon/hawaii_pfp.bin +radeon/tahiti_pfp.bin +radeon/mullins_mec.bin +radeon/SUMO_rlc.bin +radeon/JUNIPER_me.bin +radeon/bonaire_sdma1.bin +radeon/TAHITI_uvd.bin +radeon/verde_rlc.bin +radeon/HAWAII_rlc.bin +radeon/hawaii_rlc.bin +radeon/MULLINS_mec.bin +radeon/KABINI_pfp.bin +radeon/SUMO2_pfp.bin +radeon/RV770_smc.bin +radeon/pitcairn_ce.bin +radeon/kaveri_sdma1.bin +radeon/REDWOOD_me.bin +radeon/OLAND_rlc.bin +radeon/HAWAII_me.bin +radeon/mullins_rlc.bin +radeon/BARTS_smc.bin +radeon/OLAND_me.bin +radeon/KAVERI_rlc.bin +radeon/verde_pfp.bin +radeon/RV610_me.bin +radeon/BONAIRE_sdma.bin +radeon/TURKS_pfp.bin +radeon/RV710_me.bin +radeon/OLAND_pfp.bin +radeon/kabini_me.bin +radeon/kaveri_sdma.bin +radeon/R420_cp.bin +radeon/HAWAII_mc.bin +radeon/tahiti_me.bin +radeon/KAVERI_ce.bin +radeon/verde_me.bin +radeon/CAYMAN_smc.bin +radeon/hainan_rlc.bin +radeon/CAYMAN_mc.bin +radeon/REDWOOD_pfp.bin +radeon/tahiti_mc.bin +radeon/KABINI_ce.bin +radeon/CYPRESS_me.bin +radeon/BONAIRE_vce.bin +radeon/hawaii_sdma1.bin +radeon/ARUBA_pfp.bin +radeon/HAINAN_rlc.bin +radeon/verde_mc.bin +radeon/verde_smc.bin +radeon/HAINAN_smc.bin +radeon/OLAND_smc.bin +radeon/bonaire_uvd.bin +radeon/kaveri_me.bin +radeon/ARUBA_rlc.bin +radeon/RS690_cp.bin +radeon/hawaii_mc.bin +radeon/R520_cp.bin +radeon/MULLINS_rlc.bin +radeon/OLAND_mc.bin +radeon/PITCAIRN_pfp.bin +radeon/oland_rlc.bin +radeon/R600_me.bin +radeon/OLAND_mc2.bin +radeon/BARTS_me.bin +radeon/RV710_smc.bin +radeon/VERDE_mc2.bin +radeon/BONAIRE_pfp.bin +radeon/pitcairn_rlc.bin +radeon/kaveri_uvd.bin +radeon/VERDE_mc.bin +radeon/RS780_uvd.bin +radeon/PITCAIRN_me.bin +radeon/kaveri_pfp.bin +radeon/PITCAIRN_mc2.bin +radeon/pitcairn_pfp.bin +radeon/TAHITI_pfp.bin +radeon/kabini_ce.bin +radeon/TURKS_mc.bin +radeon/BONAIRE_mec.bin +radeon/R600_pfp.bin +radeon/CYPRESS_smc.bin +radeon/KABINI_mec.bin +radeon/HAINAN_ce.bin +radeon/kabini_uvd.bin +radeon/tahiti_smc.bin +radeon/R100_cp.bin +radeon/oland_me.bin +radeon/TAHITI_me.bin +radeon/RV710_uvd.bin +radeon/oland_mc.bin +radeon/HAWAII_mc2.bin +radeon/KAVERI_mec.bin +radeon/MULLINS_pfp.bin +radeon/BARTS_mc.bin +radeon/pitcairn_mc.bin +radeon/hawaii_mec.bin +radeon/kabini_rlc.bin +radeon/MULLINS_ce.bin +radeon/hawaii_smc.bin +radeon/TAHITI_mc2.bin +radeon/kaveri_vce.bin +radeon/RV610_pfp.bin +radeon/mullins_sdma.bin +radeon/CEDAR_pfp.bin +radeon/RV620_pfp.bin +radeon/BONAIRE_rlc.bin +radeon/hainan_pfp.bin +radeon/bonaire_vce.bin +radeon/CYPRESS_pfp.bin +radeon/VERDE_pfp.bin +radeon/RV710_pfp.bin +radeon/kabini_sdma.bin +radeon/CYPRESS_rlc.bin +radeon/BONAIRE_me.bin +radeon/HAINAN_pfp.bin +radeon/hawaii_sdma.bin +radeon/tahiti_rlc.bin +radeon/OLAND_ce.bin +README +rp2.fw +rsi_91x.fw +rt2561.bin +rt2561s.bin +rt2661.bin +rt2860.bin +rt2870.bin +rt3070.bin +rt3071.bin +rt3090.bin +rt3290.bin +rt73.bin +RTL8192E/main.img +RTL8192E/boot.img +RTL8192E/data.img +rtl_bt/rtl8723b_fw.bin +rtl_bt/rtl8821a_fw.bin +rtl_bt/rtl8192ee_fw.bin +rtl_bt/rtl8192eu_fw.bin +rtl_bt/rtl8812ae_fw.bin +rtl_bt/rtl8761a_fw.bin +rtl_bt/rtl8723a_fw.bin +rtl_nic/rtl8106e-1.fw +rtl_nic/rtl8411-1.fw +rtl_nic/rtl8168f-1.fw +rtl_nic/rtl8168h-2.fw +rtl_nic/rtl8168h-1.fw +rtl_nic/rtl8411-2.fw +rtl_nic/rtl8168g-2.fw +rtl_nic/rtl8105e-1.fw +rtl_nic/rtl8402-1.fw +rtl_nic/rtl8168g-1.fw +rtl_nic/rtl8107e-2.fw +rtl_nic/rtl8168e-3.fw +rtl_nic/rtl8168f-2.fw +rtl_nic/rtl8168d-1.fw +rtl_nic/rtl8168e-2.fw +rtl_nic/rtl8168g-3.fw +rtl_nic/rtl8168e-1.fw +rtl_nic/rtl8107e-1.fw +rtl_nic/rtl8168d-2.fw +rtl_nic/rtl8106e-2.fw +rtlwifi/rtl8192cfwU_B.bin +rtlwifi/rtl8821aefw.bin +rtlwifi/rtl8723fw_B.bin +rtlwifi/rtl8192cufw.bin +rtlwifi/rtl8192eefw.bin +rtlwifi/rtl8723bu_wowlan.bin +rtlwifi/rtl8192eu_nic.bin +rtlwifi/rtl8192eu_wowlan.bin +rtlwifi/rtl8192sefw.bin +rtlwifi/rtl8723bu_ap_wowlan.bin +rtlwifi/rtl8188eufw.bin +rtlwifi/rtl8192eu_ap_wowlan.bin +rtlwifi/rtl8712u.bin +rtlwifi/rtl8723befw.bin +rtlwifi/rtl8192cufw_TMSC.bin +rtlwifi/rtl8723aufw_A.bin +rtlwifi/rtl8821aefw_wowlan.bin +rtlwifi/rtl8723aufw_B_NoBT.bin +rtlwifi/rtl8192defw.bin +rtlwifi/rtl8723fw.bin +rtlwifi/rtl8192cufw_B.bin +rtlwifi/rtl8192cfw.bin +rtlwifi/rtl8723bu_nic.bin +rtlwifi/rtl8723aufw_B.bin +rtlwifi/rtl8192cufw_A.bin +rtlwifi/rtl8188efw.bin +rtlwifi/rtl8192cfwU.bin +s2250.fw +s2250_loader.fw +s5p-mfc.fw +s5p-mfc-v6.fw +s5p-mfc-v6-v2.fw +s5p-mfc-v7.fw +s5p-mfc-v8.fw +sb16/alaw_main.csp +sb16/mulaw_main.csp +sb16/ima_adpcm_playback.csp +sb16/ima_adpcm_capture.csp +sb16/ima_adpcm_init.csp +sdd_sagrad_1091_1098.bin +slicoss/oasisrcvucode.sys +slicoss/gbdownload.sys +slicoss/gbrcvucode.sys +slicoss/oasisdbgdownload.sys +slicoss/oasisdownload.sys +sms1xxx-hcw-55xxx-dvbt-02.fw +sms1xxx-hcw-55xxx-isdbt-02.fw +sms1xxx-nova-a-dvbt-01.fw +sms1xxx-nova-b-dvbt-01.fw +sms1xxx-stellar-dvbt-01.fw +sun/cassini.bin +sxg/saharadbgdownloadB.sys +sxg/saharadownloadB.sys +TDA7706_OM_v2.5.1_boot.txt +TDA7706_OM_v3.0.2_boot.txt +tdmb_nova_12mhz.inp +tehuti/bdx.bin +ti_3410.fw +ti_5052.fw +ti-connectivity/wl18xx-fw.bin +ti-connectivity/wl127x-fw-3.bin +ti-connectivity/wl1271-fw.bin +ti-connectivity/wl1271-fw-2.bin +ti-connectivity/wl18xx-fw-4.bin +ti-connectivity/wl18xx-fw-2.bin +ti-connectivity/wl127x-fw-5-mr.bin +ti-connectivity/wl1271-nvs.bin +ti-connectivity/wl127x-fw-4-sr.bin +ti-connectivity/wl1251-nvs.bin +ti-connectivity/wl12xx-nvs.bin +ti-connectivity/wl127x-fw-plt-3.bin +ti-connectivity/wl128x-fw-5-plt.bin +ti-connectivity/wl128x-fw-5-sr.bin +ti-connectivity/wl1271-fw-ap.bin +ti-connectivity/wl128x-fw-4-mr.bin +ti-connectivity/TIInit_7.2.31.bts +ti-connectivity/wl128x-fw.bin +ti-connectivity/wl127x-fw-5-sr.bin +ti-connectivity/wl128x-fw-ap.bin +ti-connectivity/wl128x-fw-4-sr.bin +ti-connectivity/wl127x-fw-4-mr.bin +ti-connectivity/wl128x-fw-plt-3.bin +ti-connectivity/wl127x-fw-5-plt.bin +ti-connectivity/wl128x-fw-4-plt.bin +ti-connectivity/wl128x-nvs.bin +ti-connectivity/wl128x-fw-3.bin +ti-connectivity/wl127x-nvs.bin +ti-connectivity/wl18xx-fw-3.bin +ti-connectivity/wl128x-fw-5-mr.bin +ti-connectivity/wl127x-fw-4-plt.bin +ti-connectivity/wl1251-fw.bin +tigon/tg3.bin +tigon/tg3_tso5.bin +tigon/tg3_tso.bin +tigon/tg357766.bin +ti-keystone/ks2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin +tlg2300_firmware.bin +tr_smctr.bin +ttusb-budget/dspbootcode.bin +ueagle-atm/CMV9p.bin +ueagle-atm/DSP9p.bin +ueagle-atm/CMVep.bin +ueagle-atm/CMVepES.bin +ueagle-atm/DSP4p.bin +ueagle-atm/eagleIV.fw +ueagle-atm/CMVepFR04.bin +ueagle-atm/adi930.fw +ueagle-atm/CMVepIT.bin +ueagle-atm/CMVepFR.bin +ueagle-atm/eagleII.fw +ueagle-atm/CMV9i.bin +ueagle-atm/CMVepWO.bin +ueagle-atm/DSPep.bin +ueagle-atm/CMVeiWO.bin +ueagle-atm/CMVepFR10.bin +ueagle-atm/CMVepES03.bin +ueagle-atm/eagleIII.fw +ueagle-atm/CMVei.bin +ueagle-atm/eagleI.fw +ueagle-atm/DSPei.bin +ueagle-atm/CMV4p.bin.v2 +ueagle-atm/DSP9i.bin +ueagle-atm/930-fpga.bin +usbdux/usbdux_firmware.asm +usbdux/fx2-include.asm +usbdux/usbduxsigma_firmware.asm +usbdux/usbduxfast_firmware.asm +usbdux/Makefile_dux +usbduxfast_firmware.bin +usbdux_firmware.bin +usbduxsigma_firmware.bin +v4l-cx231xx-avcore-01.fw +v4l-cx23418-apu.fw +v4l-cx23418-cpu.fw +v4l-cx23418-dig.fw +v4l-cx23885-avcore-01.fw +v4l-cx25840.fw +vicam/firmware.fw +vntwusb.fw +vxge/X3fw.ncf +vxge/X3fw-pxe.ncf +WHENCE +whiteheat.fw +whiteheat_loader.fw +wsm_22.bin +yam/1200.bin +yam/9600.bin +yamaha/ds1e_ctrl.fw +yamaha/ds1_dsp.fw +yamaha/yss225_registers.bin +yamaha/ds1_ctrl.fw diff --git a/sets/keep b/sets/keep new file mode 100644 index 0000000..dbe9de5 --- /dev/null +++ b/sets/keep @@ -0,0 +1,4 @@ +# test +#media-libs/glu +#media-libs/glew +net-news/rssguard