From dfbf94f9f60d66f64a9c97c77d46af7759e0d895 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 2 Jan 2015 15:38:35 +0100 Subject: [PATCH] Updated ATK patch for gtk3 --- firefox-gtk3-atk.patch | 14 ------- firefox.spec | 9 ++-- mozilla-1110211.patch | 95 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 17 deletions(-) delete mode 100644 firefox-gtk3-atk.patch create mode 100644 mozilla-1110211.patch diff --git a/firefox-gtk3-atk.patch b/firefox-gtk3-atk.patch deleted file mode 100644 index e5e33b5..0000000 --- a/firefox-gtk3-atk.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-34.0/mozilla-release/accessible/atk/Platform.cpp.old firefox-34.0/mozilla-release/accessible/atk/Platform.cpp ---- firefox-34.0/mozilla-release/accessible/atk/Platform.cpp.old 2014-11-26 03:17:05.000000000 +0100 -+++ firefox-34.0/mozilla-release/accessible/atk/Platform.cpp 2014-12-13 17:40:29.414539391 +0100 -@@ -276,6 +276,9 @@ dbus_done: - bool - a11y::ShouldA11yBeEnabled() - { -+ // Temporary disable for Gtk3 -+ return false; -+ - static bool sChecked = false, sShouldEnable = false; - if (sChecked) - return sShouldEnable; -diff -up firefox-34.0/mozilla-release/media/webrtc/trunk/Makefile.old firefox-34.0/mozilla-release/media/webrtc/trunk/Makefile diff --git a/firefox.spec b/firefox.spec index 58b4af2..5c25334 100644 --- a/firefox.spec +++ b/firefox.spec @@ -113,7 +113,7 @@ Summary: Mozilla Firefox Web browser Name: firefox Version: 34.0 -Release: 9%{?pre_tag}%{?dist} +Release: 10%{?pre_tag}%{?dist} URL: http://www.mozilla.org/projects/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -160,7 +160,7 @@ Patch404: mozilla-1101582.patch Patch405: mozilla-1073117-check.patch Patch406: mozilla-1073117-color.patch Patch407: mozilla-1097592.patch -Patch408: firefox-gtk3-atk.patch +Patch408: mozilla-1110211.patch %if %{official_branding} # Required by Mozilla Corporation @@ -317,7 +317,7 @@ cd %{tarballdir} %patch405 -p1 -b .1073117-check %patch406 -p1 -b .1073117-color %patch407 -p1 -b .1097592 -%patch408 -p2 -b .gtk3 +%patch408 -p2 -b .1110211 %endif %if %{official_branding} @@ -781,6 +781,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Fri Jan 2 2014 Martin Stransky - 34.0-10 +- Updated ATK patch for gtk3 + * Tue Dec 23 2014 Martin Stransky - 34.0-9 - Added fix for rhbz#1173156 - Native NTLM authentication on Linux unsupported diff --git a/mozilla-1110211.patch b/mozilla-1110211.patch new file mode 100644 index 0000000..1a25634 --- /dev/null +++ b/mozilla-1110211.patch @@ -0,0 +1,95 @@ +diff -up firefox-34.0/mozilla-release/accessible/atk/Platform.cpp.gtk3 firefox-34.0/mozilla-release/accessible/atk/Platform.cpp +--- firefox-34.0/mozilla-release/accessible/atk/Platform.cpp.gtk3 2014-11-26 03:17:05.000000000 +0100 ++++ firefox-34.0/mozilla-release/accessible/atk/Platform.cpp 2015-01-02 15:28:48.948346742 +0100 +@@ -18,6 +18,9 @@ + #include + #endif + #include ++#if (MOZ_WIDGET_GTK == 3) ++#include ++#endif + + using namespace mozilla; + using namespace mozilla::a11y; +@@ -43,6 +46,7 @@ static gulong sToplevel_hide_hook = 0; + + GType g_atk_hyperlink_impl_type = G_TYPE_INVALID; + ++#if (MOZ_WIDGET_GTK == 2) + struct GnomeAccessibilityModule + { + const char *libName; +@@ -119,6 +123,7 @@ LoadGtkModule(GnomeAccessibilityModule& + } + return NS_OK; + } ++#endif // (MOZ_WIDGET_GTK == 2) + + void + a11y::PlatformInit() +@@ -158,20 +163,26 @@ a11y::PlatformInit() + } + } + ++#if (MOZ_WIDGET_GTK == 2) + // Load and initialize gail library. + nsresult rv = LoadGtkModule(sGail); + if (NS_SUCCEEDED(rv)) + (*sGail.init)(); ++#endif + + // Initialize the MAI Utility class, it will overwrite gail_util. + g_type_class_unref(g_type_class_ref(mai_util_get_type())); + + // Init atk-bridge now + PR_SetEnv("NO_AT_BRIDGE=0"); ++#if (MOZ_WIDGET_GTK == 2) + rv = LoadGtkModule(sAtkBridge); + if (NS_SUCCEEDED(rv)) { + (*sAtkBridge.init)(); + } ++#else ++ atk_bridge_adaptor_init(nullptr, nullptr); ++#endif + + if (!sToplevel_event_hook_added) { + sToplevel_event_hook_added = true; +@@ -199,6 +210,7 @@ a11y::PlatformShutdown() + sToplevel_hide_hook); + } + ++#if (MOZ_WIDGET_GTK == 2) + if (sAtkBridge.lib) { + // Do not shutdown/unload atk-bridge, + // an exit function registered will take care of it +@@ -220,6 +232,7 @@ a11y::PlatformShutdown() + sGail.init = nullptr; + sGail.shutdown = nullptr; + } ++#endif + // if (sATKLib) { + // PR_UnloadLibrary(sATKLib); + // sATKLib = nullptr; +diff -up firefox-34.0/mozilla-release/config/system-headers.gtk3 firefox-34.0/mozilla-release/config/system-headers +--- firefox-34.0/mozilla-release/config/system-headers.gtk3 2014-11-26 03:17:09.000000000 +0100 ++++ firefox-34.0/mozilla-release/config/system-headers 2015-01-02 15:28:48.948346742 +0100 +@@ -189,6 +189,7 @@ asm/signal.h + ASRegistry.h + assert.h + atk/atk.h ++atk-bridge.h + atlcom.h + atlconv.h + atlctl.cpp +diff -up firefox-34.0/mozilla-release/configure.in.gtk3 firefox-34.0/mozilla-release/configure.in +--- firefox-34.0/mozilla-release/configure.in.gtk3 2015-01-02 15:28:48.950346747 +0100 ++++ firefox-34.0/mozilla-release/configure.in 2015-01-02 15:30:42.253625279 +0100 +@@ -4282,7 +4282,7 @@ fi + + if test "$COMPILE_ENVIRONMENT"; then + if test "$MOZ_ENABLE_GTK3"; then +- PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES) ++ PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 atk-bridge-2.0 $GDK_PACKAGES) + MOZ_GTK3_CFLAGS="-I${_topsrcdir}/widget/gtk/compat-gtk3 $MOZ_GTK3_CFLAGS" + TK_LIBS=$MOZ_GTK3_LIBS + fi