From 6003c7b9952bc70dcf425ca4a2e089e09acb8cae Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 29 Sep 2009 07:26:55 +0000 Subject: [PATCH 001/486] Initialize branch F-12 for xulrunner --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..06de2d2 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-12 From f107f7234e447c6713ab81b873f03687f8ad9ce2 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 27 Oct 2009 08:19:56 +0000 Subject: [PATCH 002/486] Update to 1.9.1.4 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 134fba9..23368be 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ xulrunner-1.9.1.1-source.tar.bz2 xulrunner-1.9.1.2-source.tar.bz2 xulrunner-1.9.1.3-source.tar.bz2 +xulrunner-1.9.1.4-source.tar.bz2 diff --git a/sources b/sources index cb631af..dfb248b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ca167e69180ab1230aea0763da270a95 xulrunner-1.9.1.3-source.tar.bz2 +0b6ccb1e50d96b7127a18a69399fcf05 xulrunner-1.9.1.4-source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 91e525e..ad8d7b2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,7 +11,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.3 +Version: 1.9.1.4 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -455,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 26 2009 Jan Horak - 1.9.1.4-1 +- Update to 1.9.1.4 + * Mon Sep 7 2009 Jan Horak - 1.9.1.3-1 - Update to 1.9.1.3 From 3aa62530b19dda9337e178478e74b95aa8381976 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 27 Oct 2009 08:42:30 +0000 Subject: [PATCH 003/486] Fixed patch --- mozilla-libnotify.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla-libnotify.patch b/mozilla-libnotify.patch index 5155ef9..a090ef7 100644 --- a/mozilla-libnotify.patch +++ b/mozilla-libnotify.patch @@ -29,7 +29,7 @@ diff -up mozilla-1.9.1/configure.in.libnotify mozilla-1.9.1/configure.in @@ -132,6 +132,7 @@ LIBGNOME_VERSION=2.0 STARTUP_NOTIFICATION_VERSION=0.8 DBUS_VERSION=0.60 - SQLITE_VERSION=3.6.10 + SQLITE_VERSION=3.6.16 +LIBNOTIFY_VERSION=0.4 MSMANIFEST_TOOL= From eae90c4ed42f303baa7cda8de039f28cff9d9933 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 27 Oct 2009 10:07:34 +0000 Subject: [PATCH 004/486] Update to 1.9.1.4 --- .cvsignore | 1 + mozilla-libnotify.patch | 2 +- sources | 2 +- xulrunner.spec | 5 ++++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 134fba9..23368be 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ xulrunner-1.9.1.1-source.tar.bz2 xulrunner-1.9.1.2-source.tar.bz2 xulrunner-1.9.1.3-source.tar.bz2 +xulrunner-1.9.1.4-source.tar.bz2 diff --git a/mozilla-libnotify.patch b/mozilla-libnotify.patch index 5155ef9..a090ef7 100644 --- a/mozilla-libnotify.patch +++ b/mozilla-libnotify.patch @@ -29,7 +29,7 @@ diff -up mozilla-1.9.1/configure.in.libnotify mozilla-1.9.1/configure.in @@ -132,6 +132,7 @@ LIBGNOME_VERSION=2.0 STARTUP_NOTIFICATION_VERSION=0.8 DBUS_VERSION=0.60 - SQLITE_VERSION=3.6.10 + SQLITE_VERSION=3.6.16 +LIBNOTIFY_VERSION=0.4 MSMANIFEST_TOOL= diff --git a/sources b/sources index cb631af..dfb248b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ca167e69180ab1230aea0763da270a95 xulrunner-1.9.1.3-source.tar.bz2 +0b6ccb1e50d96b7127a18a69399fcf05 xulrunner-1.9.1.4-source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 91e525e..ad8d7b2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,7 +11,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.3 +Version: 1.9.1.4 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -455,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 26 2009 Jan Horak - 1.9.1.4-1 +- Update to 1.9.1.4 + * Mon Sep 7 2009 Jan Horak - 1.9.1.3-1 - Update to 1.9.1.3 From 1de2d0d7e5147801d063d2b907f479186c6a5cc4 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 5 Nov 2009 09:13:43 +0000 Subject: [PATCH 005/486] Update to 1.9.1.5 --- .cvsignore | 1 + sources | 1 + xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index 23368be..56e6814 100644 --- a/.cvsignore +++ b/.cvsignore @@ -2,3 +2,4 @@ xulrunner-1.9.1.1-source.tar.bz2 xulrunner-1.9.1.2-source.tar.bz2 xulrunner-1.9.1.3-source.tar.bz2 xulrunner-1.9.1.4-source.tar.bz2 +xulrunner-1.9.1.5-source.tar.bz2 diff --git a/sources b/sources index dfb248b..d831ba0 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 0b6ccb1e50d96b7127a18a69399fcf05 xulrunner-1.9.1.4-source.tar.bz2 +b3d92dfb40584141dc1068efc9bdfccc xulrunner-1.9.1.5-source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index ad8d7b2..115d584 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,7 +11,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.4 +Version: 1.9.1.5 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -455,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 5 2009 Jan Horak - 1.9.1.5-1 +- Update to 1.9.1.5 + * Mon Oct 26 2009 Jan Horak - 1.9.1.4-1 - Update to 1.9.1.4 From 68e0149daa814bb4f41f4e02c6bbd663b6296630 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 5 Nov 2009 09:21:48 +0000 Subject: [PATCH 006/486] Update to 1.9.1.5 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 23368be..56e6814 100644 --- a/.cvsignore +++ b/.cvsignore @@ -2,3 +2,4 @@ xulrunner-1.9.1.1-source.tar.bz2 xulrunner-1.9.1.2-source.tar.bz2 xulrunner-1.9.1.3-source.tar.bz2 xulrunner-1.9.1.4-source.tar.bz2 +xulrunner-1.9.1.5-source.tar.bz2 diff --git a/sources b/sources index dfb248b..759a7de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0b6ccb1e50d96b7127a18a69399fcf05 xulrunner-1.9.1.4-source.tar.bz2 +b3d92dfb40584141dc1068efc9bdfccc xulrunner-1.9.1.5-source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index ad8d7b2..115d584 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,7 +11,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.4 +Version: 1.9.1.5 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -455,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 5 2009 Jan Horak - 1.9.1.5-1 +- Update to 1.9.1.5 + * Mon Oct 26 2009 Jan Horak - 1.9.1.4-1 - Update to 1.9.1.4 From 68ef659be77bf7ba356d2d3dff03443c6a3922bb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Nov 2009 09:10:19 +0000 Subject: [PATCH 007/486] Rebase to 1.9.2.1 Beta 2 --- mozilla-191-path.patch | 162 -------- mozilla-libnotify.patch | 805 ------------------------------------ xulrunner-gtk-include.patch | 12 - xulrunner-mozconfig | 2 +- xulrunner.spec | 129 ++---- 5 files changed, 33 insertions(+), 1077 deletions(-) delete mode 100644 mozilla-191-path.patch delete mode 100644 mozilla-libnotify.patch delete mode 100644 xulrunner-gtk-include.patch diff --git a/mozilla-191-path.patch b/mozilla-191-path.patch deleted file mode 100644 index a49ffd6..0000000 --- a/mozilla-191-path.patch +++ /dev/null @@ -1,162 +0,0 @@ ---- mozilla/toolkit/xre/nsAppRunner.h.old 2007-09-25 18:01:56.000000000 +0200 -+++ mozilla/toolkit/xre/nsAppRunner.h 2007-09-25 18:02:23.000000000 +0200 -@@ -48,7 +48,8 @@ - #elif defined(CCHMAXPATH) - #define MAXPATHLEN CCHMAXPATH - #else --#define MAXPATHLEN 1024 -+#include -+#define MAXPATHLEN PATH_MAX - #endif - #endif - -diff -up mozilla/toolkit/mozapps/update/src/updater/updater.cpp.old mozilla/toolkit/mozapps/update/src/updater/updater.cpp ---- mozilla/toolkit/mozapps/update/src/updater/updater.cpp.old 2007-09-25 18:00:26.000000000 +0200 -+++ mozilla/toolkit/mozapps/update/src/updater/updater.cpp 2007-09-25 18:00:53.000000000 +0200 -@@ -107,7 +107,8 @@ void LaunchChild(int argc, char **argv); - # elif defined(CCHMAXPATH) - # define MAXPATHLEN CCHMAXPATH - # else --# define MAXPATHLEN 1024 -+# include -+# define MAXPATHLEN PATH_MAX - # endif - #endif - -diff -up mozilla/xpcom/io/SpecialSystemDirectory.cpp.old mozilla/xpcom/io/SpecialSystemDirectory.cpp ---- mozilla/xpcom/io/SpecialSystemDirectory.cpp.old 2007-09-25 18:04:25.000000000 +0200 -+++ mozilla/xpcom/io/SpecialSystemDirectory.cpp 2007-09-25 18:04:48.000000000 +0200 -@@ -109,7 +109,8 @@ - #elif defined(CCHMAXPATH) - #define MAXPATHLEN CCHMAXPATH - #else --#define MAXPATHLEN 1024 -+#include -+#define MAXPATHLEN PATH_MAX - #endif - #endif - -diff -up mozilla/xpcom/obsolete/nsFileSpecUnix.cpp.old mozilla/xpcom/obsolete/nsFileSpecUnix.cpp ---- mozilla/xpcom/obsolete/nsFileSpecUnix.cpp.old 2006-11-28 01:18:37.000000000 +0100 -+++ mozilla/xpcom/obsolete/nsFileSpecUnix.cpp 2007-09-25 18:05:49.000000000 +0200 -@@ -79,7 +79,8 @@ - #endif - - #ifndef MAXPATHLEN --#define MAXPATHLEN 1024 /* Guessing this is okay. Works for SCO. */ -+#include -+#define MAXPATHLEN PATH_MAX /* Guessing this is okay. Works for SCO. */ - #endif - - #if defined(__QNX__) -diff -up mozilla/xpcom/build/nsXPCOMPrivate.h.old mozilla/xpcom/build/nsXPCOMPrivate.h ---- mozilla/xpcom/build/nsXPCOMPrivate.h.old 2007-09-25 18:02:58.000000000 +0200 -+++ mozilla/xpcom/build/nsXPCOMPrivate.h 2007-09-25 18:03:15.000000000 +0200 -@@ -252,7 +252,8 @@ NS_GetFrozenFunctions(XPCOMFunctions *en - #elif defined(CCHMAXPATH) - #define MAXPATHLEN CCHMAXPATH - #else --#define MAXPATHLEN 1024 -+#include -+#define MAXPATHLEN PATH_MAX - #endif - #endif - -diff -up mozilla/dbm/include/mcom_db.h.old mozilla/dbm/include/mcom_db.h ---- mozilla/dbm/include/mcom_db.h.old 2007-09-25 17:57:09.000000000 +0200 -+++ mozilla/dbm/include/mcom_db.h 2007-09-25 17:57:49.000000000 +0200 -@@ -214,7 +214,8 @@ - #endif /* __DBINTERFACE_PRIVATE */ - - #ifdef SCO --#define MAXPATHLEN 1024 -+#include -+#define MAXPATHLEN PATH_MAX - #endif - - #include -diff -up mozilla/xpcom/typelib/xpidl/xpidl_java.c.old mozilla/xpcom/typelib/xpidl/xpidl_java.c ---- mozilla/xpcom/typelib/xpidl/xpidl_java.c.old 2007-09-25 18:38:52.000000000 +0200 -+++ mozilla/xpcom/typelib/xpidl/xpidl_java.c 2007-09-25 18:39:17.000000000 +0200 -@@ -44,6 +44,7 @@ - #include "xpidl.h" - #include - #include -+#include - - #ifdef XP_WIN - #include -diff -up mozilla/widget/src/xremoteclient/XRemoteClient.cpp.old mozilla/widget/src/xremoteclient/XRemoteClient.cpp ---- mozilla/widget/src/xremoteclient/XRemoteClient.cpp.old 2007-09-25 18:14:08.000000000 +0200 -+++ mozilla/widget/src/xremoteclient/XRemoteClient.cpp 2007-09-25 18:36:55.000000000 +0200 -@@ -76,7 +76,8 @@ - #endif - - #ifndef MAX_PATH --#define MAX_PATH 1024 -+#include -+#define MAX_PATH PATH_MAX - #endif - - #define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0])) -diff -up mozilla/modules/libreg/src/reg.c.old mozilla/modules/libreg/src/reg.c ---- mozilla/modules/libreg/src/reg.c.old 2007-09-25 18:25:02.000000000 +0200 -+++ mozilla/modules/libreg/src/reg.c 2007-09-25 18:27:46.000000000 +0200 -@@ -96,7 +96,8 @@ - #define MAX_PATH PATH_MAX - #elif defined(XP_UNIX) - #ifndef MAX_PATH --#define MAX_PATH 1024 -+#include -+#define MAX_PATH PATH_MAX - #endif - #elif defined(XP_OS2) - #ifndef MAX_PATH -diff -up mozilla/config/pathsub.h.old mozilla/config/pathsub.h ---- mozilla/config/pathsub.h.old 2004-04-18 16:17:25.000000000 +0200 -+++ mozilla/config/pathsub.h 2007-09-25 18:48:13.000000000 +0200 -@@ -46,7 +46,7 @@ - #include - - #ifndef PATH_MAX --#define PATH_MAX 1024 -+#error "PATH_MAX is not defined!" - #endif - - /* -diff -up mozilla/modules/libjar/nsZipArchive.cpp.old mozilla/modules/libjar/nsZipArchive.cpp ---- mozilla/modules/libjar/nsZipArchive.cpp.old 2006-09-13 20:32:37.000000000 +0200 -+++ mozilla/modules/libjar/nsZipArchive.cpp 2007-09-25 18:51:00.000000000 +0200 -@@ -121,7 +121,7 @@ char * strdup(const char *src) - # define S_IFLNK 0120000 - # endif - # ifndef PATH_MAX --# define PATH_MAX 1024 -+# include - # endif - #endif /* XP_UNIX */ - -diff -up mozilla/nsprpub/config/pathsub.h.old mozilla/nsprpub/config/pathsub.h ---- mozilla/nsprpub/config/pathsub.h.old 2004-04-25 17:00:34.000000000 +0200 -+++ mozilla/nsprpub/config/pathsub.h 2007-09-25 18:57:51.000000000 +0200 -@@ -50,7 +50,7 @@ - #endif - - #ifndef PATH_MAX --#define PATH_MAX 1024 -+#error "PATH_MAX is not defined!" - #endif - - /* -diff -up mozilla/security/coreconf/nsinstall/pathsub.h.old mozilla/security/coreconf/nsinstall/pathsub.h ---- mozilla/security/coreconf/nsinstall/pathsub.h.old 2004-04-25 17:02:18.000000000 +0200 -+++ mozilla/security/coreconf/nsinstall/pathsub.h 2007-09-25 19:00:35.000000000 +0200 -@@ -49,7 +49,7 @@ - #endif - - #ifndef PATH_MAX --#define PATH_MAX 1024 -+#error "PATH_MAX is not defined!" - #endif - - /* diff --git a/mozilla-libnotify.patch b/mozilla-libnotify.patch deleted file mode 100644 index a090ef7..0000000 --- a/mozilla-libnotify.patch +++ /dev/null @@ -1,805 +0,0 @@ -diff -up mozilla-1.9.1/config/autoconf.mk.in.libnotify mozilla-1.9.1/config/autoconf.mk.in ---- mozilla-1.9.1/config/autoconf.mk.in.libnotify 2009-07-30 17:30:11.000000000 +0200 -+++ mozilla-1.9.1/config/autoconf.mk.in 2009-08-21 15:31:20.000000000 +0200 -@@ -528,6 +528,10 @@ MOZ_PANGO_LIBS = @MOZ_PANGO_LIB - MOZ_XIE_LIBS = @MOZ_XIE_LIBS@ - XT_LIBS = @XT_LIBS@ - -+MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CFLAGS@ -+MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@ -+MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@ -+ - GLIB_CFLAGS = @GLIB_CFLAGS@ - GLIB_LIBS = @GLIB_LIBS@ - GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@ -diff -up mozilla-1.9.1/config/system-headers.libnotify mozilla-1.9.1/config/system-headers ---- mozilla-1.9.1/config/system-headers.libnotify 2009-07-30 17:30:11.000000000 +0200 -+++ mozilla-1.9.1/config/system-headers 2009-08-21 15:31:20.000000000 +0200 -@@ -432,6 +432,7 @@ libgnomevfs/gnome-vfs-ops.h - libgnomevfs/gnome-vfs-standard-callbacks.h - libIDL/IDL.h - lib$routines.h -+libnotify/notify.h - limits - limits.h - link.h -diff -up mozilla-1.9.1/configure.in.libnotify mozilla-1.9.1/configure.in ---- mozilla-1.9.1/configure.in.libnotify 2009-07-30 17:30:11.000000000 +0200 -+++ mozilla-1.9.1/configure.in 2009-08-21 15:31:20.000000000 +0200 -@@ -132,6 +132,7 @@ LIBGNOME_VERSION=2.0 - STARTUP_NOTIFICATION_VERSION=0.8 - DBUS_VERSION=0.60 - SQLITE_VERSION=3.6.16 -+LIBNOTIFY_VERSION=0.4 - - MSMANIFEST_TOOL= - -@@ -5186,6 +5187,39 @@ AC_SUBST(MOZ_DBUS_GLIB_CFLAGS) - AC_SUBST(MOZ_DBUS_GLIB_LIBS) - - dnl ======================================================== -+dnl = libnotify support -+dnl ======================================================== -+ -+if test "$MOZ_ENABLE_GTK2" -+then -+ MOZ_ENABLE_LIBNOTIFY=1 -+ -+ MOZ_ARG_DISABLE_BOOL(libnotify, -+ [ --disable-libnotify Disable libnotify support ], -+ MOZ_ENABLE_LIBNOTIFY=, -+ MOZ_ENABLE_LIBNOTIFY=1) -+ -+ if test "$MOZ_ENABLE_LIBNOTIFY" -+ then -+ AC_DEFINE(MOZ_ENABLE_LIBNOTIFY) -+ fi -+fi -+ -+if test -z "$SKIP_LIBRARY_CHECKS" -+then -+ if test "$MOZ_ENABLE_GTK2" -+ then -+ if test "$MOZ_ENABLE_LIBNOTIFY" -+ then -+ PKG_CHECK_MODULES(MOZ_LIBNOTIFY, libnotify >= $LIBNOTIFY_VERSION) -+ fi -+ fi -+fi -+AC_SUBST(MOZ_ENABLE_LIBNOTIFY) -+AC_SUBST(MOZ_LIBNOTIFY_CFLAGS) -+AC_SUBST(MOZ_LIBNOTIFY_LIBS) -+ -+dnl ======================================================== - dnl = Build Personal Security Manager - dnl ======================================================== - MOZ_ARG_DISABLE_BOOL(crypto, -diff -up mozilla-1.9.1/js/src/config/system-headers.libnotify mozilla-1.9.1/js/src/config/system-headers ---- mozilla-1.9.1/js/src/config/system-headers.libnotify 2009-07-30 17:30:17.000000000 +0200 -+++ mozilla-1.9.1/js/src/config/system-headers 2009-08-21 15:31:20.000000000 +0200 -@@ -432,6 +432,7 @@ libgnomevfs/gnome-vfs-ops.h - libgnomevfs/gnome-vfs-standard-callbacks.h - libIDL/IDL.h - lib$routines.h -+libnotify/notify.h - limits - limits.h - link.h -diff -up mozilla-1.9.1/toolkit/components/alerts/src/Makefile.in.libnotify mozilla-1.9.1/toolkit/components/alerts/src/Makefile.in ---- mozilla-1.9.1/toolkit/components/alerts/src/Makefile.in.libnotify 2009-07-30 17:30:31.000000000 +0200 -+++ mozilla-1.9.1/toolkit/components/alerts/src/Makefile.in 2009-08-21 15:31:20.000000000 +0200 -@@ -60,6 +60,8 @@ CPPSRCS = \ - nsAlertsService.cpp \ - $(NULL) - -+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/build/ -+ - include $(topsrcdir)/config/rules.mk - - EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) -diff -up mozilla-1.9.1/toolkit/components/alerts/src/nsAlertsService.cpp.libnotify mozilla-1.9.1/toolkit/components/alerts/src/nsAlertsService.cpp ---- mozilla-1.9.1/toolkit/components/alerts/src/nsAlertsService.cpp.libnotify 2009-07-30 17:30:31.000000000 +0200 -+++ mozilla-1.9.1/toolkit/components/alerts/src/nsAlertsService.cpp 2009-08-21 15:31:20.000000000 +0200 -@@ -47,6 +47,7 @@ - #include "nsDependentString.h" - #include "nsWidgetsCID.h" - #include "nsILookAndFeel.h" -+#include "nsToolkitCompsCID.h" - - static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID); - -@@ -73,9 +74,18 @@ NS_IMETHODIMP nsAlertsService::ShowAlert - nsIObserver * aAlertListener, - const nsAString & aAlertName) - { -+ // Check if there is an optional service that handles system-level notifications -+ nsCOMPtr sysAlerts(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID)); -+ nsresult rv; -+ if (sysAlerts) { -+ rv = sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable, -+ aAlertCookie, aAlertListener, aAlertName); -+ if (NS_SUCCEEDED(rv)) -+ return rv; -+ } -+ - nsCOMPtr wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); - nsCOMPtr newWindow; -- nsresult rv; - - nsCOMPtr argsArray; - rv = NS_NewISupportsArray(getter_AddRefs(argsArray)); -diff -up mozilla-1.9.1/toolkit/components/build/nsToolkitCompsCID.h.libnotify mozilla-1.9.1/toolkit/components/build/nsToolkitCompsCID.h ---- mozilla-1.9.1/toolkit/components/build/nsToolkitCompsCID.h.libnotify 2009-07-30 17:30:31.000000000 +0200 -+++ mozilla-1.9.1/toolkit/components/build/nsToolkitCompsCID.h 2009-08-21 15:31:20.000000000 +0200 -@@ -38,6 +38,13 @@ - #define NS_ALERTSERVICE_CONTRACTID \ - "@mozilla.org/alerts-service;1" - -+// This separate service uses the same nsIAlertsService interface, -+// but instead sends a notification to a platform alerts API -+// if available. Using a separate CID allows us to overwrite the XUL -+// alerts service at runtime. -+#define NS_SYSTEMALERTSERVICE_CONTRACTID \ -+ "@mozilla.org/system-alerts-service;1" -+ - #define NS_AUTOCOMPLETECONTROLLER_CONTRACTID \ - "@mozilla.org/autocomplete/controller;1" - -@@ -115,6 +122,10 @@ - #define NS_ALERTSSERVICE_CID \ - { 0xa0ccaaf8, 0x9da, 0x44d8, { 0xb2, 0x50, 0x9a, 0xc3, 0xe9, 0x3c, 0x81, 0x17 } } - -+// {84E11F80-CA55-11DD-AD8B-0800200C9A66} -+#define NS_SYSTEMALERTSSERVICE_CID \ -+{ 0x84e11f80, 0xca55, 0x11dd, { 0xad, 0x8b, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 } } -+ - // {F6D5EBBD-34F4-487d-9D10-3D34123E3EB9} - #define NS_AUTOCOMPLETECONTROLLER_CID \ - { 0xf6d5ebbd, 0x34f4, 0x487d, { 0x9d, 0x10, 0x3d, 0x34, 0x12, 0x3e, 0x3e, 0xb9 } } -diff -up mozilla-1.9.1/toolkit/system/gnome/Makefile.in.libnotify mozilla-1.9.1/toolkit/system/gnome/Makefile.in ---- mozilla-1.9.1/toolkit/system/gnome/Makefile.in.libnotify 2009-07-30 17:30:33.000000000 +0200 -+++ mozilla-1.9.1/toolkit/system/gnome/Makefile.in 2009-08-21 15:31:20.000000000 +0200 -@@ -51,6 +51,13 @@ REQUIRES = \ - xpcom \ - string \ - necko \ -+ alerts \ -+ gfx \ -+ imglib2 \ -+ intl \ -+ widget \ -+ thebes \ -+ cairo \ - $(NULL) - - CPPSRCS = \ -@@ -59,6 +66,13 @@ CPPSRCS = \ - nsGnomeModule.cpp \ - $(NULL) - -+ifdef MOZ_ENABLE_LIBNOTIFY -+CPPSRCS += \ -+ nsAlertsService.cpp \ -+ nsAlertsIconListener.cpp \ -+ $(NULL) -+endif -+ - EXTRA_DSO_LDOPTS += \ - $(XPCOM_GLUE_LDOPTS) \ - $(XPCOM_FROZEN_LDOPTS) \ -@@ -67,8 +81,11 @@ EXTRA_DSO_LDOPTS += \ - $(MOZ_GNOMEVFS_LIBS) \ - $(MOZ_LIBGNOME_LIBS) \ - $(GLIB_LIBS) \ -+ $(MOZ_LIBNOTIFY_LIBS) \ - $(NULL) - -+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/build/ -+ - include $(topsrcdir)/config/rules.mk - - CXXFLAGS += \ -@@ -76,4 +93,5 @@ CXXFLAGS += \ - $(MOZ_GNOMEVFS_CFLAGS) \ - $(MOZ_LIBGNOME_CFLAGS) \ - $(GLIB_CFLAGS) \ -+ $(MOZ_LIBNOTIFY_CFLAGS) \ - $(NULL) -diff -up /dev/null mozilla-1.9.1/toolkit/system/gnome/nsAlertsIconListener.cpp ---- /dev/null 2009-08-21 10:27:01.489538501 +0200 -+++ mozilla-1.9.1/toolkit/system/gnome/nsAlertsIconListener.cpp 2009-08-21 15:31:20.000000000 +0200 -@@ -0,0 +1,326 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Mozilla Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2008 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsAlertsIconListener.h" -+#include "imgILoader.h" -+#include "imgIRequest.h" -+#include "gfxIImageFrame.h" -+#include "nsIImage.h" -+#include "nsNetUtil.h" -+#include "nsIImageToPixbuf.h" -+#include "nsIStringBundle.h" -+ -+#include -+#include -+#include -+ -+static PRBool gHasActions = PR_FALSE; -+ -+static void notify_action_cb(NotifyNotification *notification, -+ gchar *action, gpointer user_data) -+{ -+ nsAlertsIconListener* alert = static_cast (user_data); -+ alert->SendCallback(); -+} -+ -+static void notify_closed_cb(NotifyNotification *notification, -+ gpointer user_data) -+{ -+ g_object_unref(notification); -+ -+ nsAlertsIconListener* alert = static_cast (user_data); -+ alert->SendClosed(); -+ NS_RELEASE(alert); -+} -+ -+NS_IMPL_ISUPPORTS2(nsAlertsIconListener, imgIContainerObserver, imgIDecoderObserver) -+ -+nsAlertsIconListener::nsAlertsIconListener() -+: mLoadedFrame(PR_FALSE) -+{ -+ MOZ_COUNT_CTOR(nsAlertsIconListener); -+} -+ -+nsAlertsIconListener::~nsAlertsIconListener() -+{ -+ MOZ_COUNT_DTOR(nsAlertsIconListener); -+ -+ if (mIconRequest) -+ mIconRequest->CancelAndForgetObserver(NS_BINDING_ABORTED); -+} -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnStartRequest(imgIRequest* aRequest) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnStartDecode(imgIRequest* aRequest) -+{ -+ return NS_OK; -+} -+ -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnStartContainer(imgIRequest* aRequest, -+ imgIContainer* aContainer) -+{ -+ return NS_OK; -+} -+ -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnStartFrame(imgIRequest* aRequest, -+ gfxIImageFrame* aFrame) -+{ -+ return NS_OK; -+} -+ -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnDataAvailable(imgIRequest* aRequest, -+ gfxIImageFrame* aFrame, -+ const nsIntRect* aRect) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnStopContainer(imgIRequest* aRequest, -+ imgIContainer* aContainer) -+{ -+ return NS_OK; -+} -+ -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnStopDecode(imgIRequest* aRequest, -+ nsresult status, -+ const PRUnichar* statusArg) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsAlertsIconListener::FrameChanged(imgIContainer* aContainer, -+ gfxIImageFrame* aFrame, -+ nsIntRect* aDirtyRect) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnStopRequest(imgIRequest* aRequest, -+ PRBool aIsLastPart) -+{ -+ PRUint32 imgStatus = imgIRequest::STATUS_ERROR; -+ nsresult rv = aRequest->GetImageStatus(&imgStatus); -+ NS_ENSURE_SUCCESS(rv, rv); -+ if (imgStatus == imgIRequest::STATUS_ERROR && !mLoadedFrame) { -+ // We have an error getting the image. Display the notification with no icon. -+ ShowAlert(NULL); -+ } -+ -+ if (mIconRequest) { -+ mIconRequest->Cancel(NS_BINDING_ABORTED); -+ mIconRequest = nsnull; -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsAlertsIconListener::OnStopFrame(imgIRequest* aRequest, -+ gfxIImageFrame* aFrame) -+{ -+ if (aRequest != mIconRequest) -+ return NS_ERROR_FAILURE; -+ -+ if (mLoadedFrame) -+ return NS_OK; // only use one frame -+ -+ nsCOMPtr frame = aFrame; -+ nsCOMPtr image = do_GetInterface(frame); -+ if (!image) -+ return NS_ERROR_FAILURE; -+ -+ nsresult rv = image->LockImagePixels(PR_FALSE); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ nsCOMPtr imgToPixbuf = -+ do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1"); -+ -+ GdkPixbuf* imagePixbuf = imgToPixbuf->ConvertImageToPixbuf(image); -+ if (!imagePixbuf) -+ return NS_ERROR_FAILURE; -+ -+ rv = image->UnlockImagePixels(PR_FALSE); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ ShowAlert(imagePixbuf); -+ -+ g_object_unref(imagePixbuf); -+ -+ mLoadedFrame = PR_TRUE; -+ return NS_OK; -+} -+ -+nsresult -+nsAlertsIconListener::ShowAlert(GdkPixbuf* aPixbuf) -+{ -+ NotifyNotification* notify = notify_notification_new(mAlertTitle.get(), -+ mAlertText.get(), -+ NULL, NULL); -+ if (!notify) -+ return NS_ERROR_OUT_OF_MEMORY; -+ -+ if (aPixbuf) -+ notify_notification_set_icon_from_pixbuf(notify, aPixbuf); -+ -+ NS_ADDREF(this); -+ if (mAlertHasAction) { -+ // What we put as the label doesn't matter here, if the action -+ // string is "default" then that makes the entire bubble clickable -+ // rather than creating a button. -+ notify_notification_add_action(notify, "default", "Activate", -+ notify_action_cb, this, NULL); -+ } -+ -+ g_signal_connect(notify, "closed", G_CALLBACK(notify_closed_cb), this); -+ gboolean result = notify_notification_show(notify, NULL); -+ -+ return result ? NS_OK : NS_ERROR_FAILURE; -+} -+ -+nsresult -+nsAlertsIconListener::StartRequest(const nsAString & aImageUrl) -+{ -+ if (mIconRequest) { -+ // Another icon request is already in flight. Kill it. -+ mIconRequest->Cancel(NS_BINDING_ABORTED); -+ mIconRequest = nsnull; -+ } -+ -+ nsCOMPtr imageUri; -+ NS_NewURI(getter_AddRefs(imageUri), aImageUrl); -+ if (!imageUri) -+ return ShowAlert(NULL); -+ -+ nsCOMPtr il(do_GetService("@mozilla.org/image/loader;1")); -+ if (!il) -+ return ShowAlert(NULL); -+ -+ return il->LoadImage(imageUri, nsnull, nsnull, nsnull, this, -+ nsnull, nsIRequest::LOAD_NORMAL, nsnull, nsnull, -+ getter_AddRefs(mIconRequest)); -+} -+ -+void -+nsAlertsIconListener::SendCallback() -+{ -+ mAlertListener->Observe(NULL, "alertclickcallback", mAlertCookie.get()); -+} -+ -+void -+nsAlertsIconListener::SendClosed() -+{ -+ mAlertListener->Observe(NULL, "alertfinished", mAlertCookie.get()); -+} -+ -+nsresult -+nsAlertsIconListener::InitAlertAsync(const nsAString & aImageUrl, -+ const nsAString & aAlertTitle, -+ const nsAString & aAlertText, -+ PRBool aAlertTextClickable, -+ const nsAString & aAlertCookie, -+ nsIObserver * aAlertListener) -+{ -+ if (!notify_is_initted()) { -+ // Give the name of this application to libnotify -+ nsCOMPtr bundleService = -+ do_GetService(NS_STRINGBUNDLE_CONTRACTID); -+ -+ nsCAutoString appShortName; -+ if (bundleService) { -+ nsCOMPtr bundle; -+ bundleService->CreateBundle("chrome://branding/locale/brand.properties", -+ getter_AddRefs(bundle)); -+ nsAutoString appName; -+ -+ if (bundle) { -+ bundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), -+ getter_Copies(appName)); -+ appShortName = NS_ConvertUTF16toUTF8(appName); -+ } else { -+ NS_WARNING("brand.properties not present, using default application name"); -+ appShortName.AssignLiteral("Mozilla"); -+ } -+ } else { -+ appShortName.AssignLiteral("Mozilla"); -+ } -+ -+ if (!notify_init(appShortName.get())) -+ return NS_ERROR_FAILURE; -+ -+ GList *server_caps = notify_get_server_caps(); -+ if (server_caps) { -+ for (GList* cap = server_caps; cap != NULL; cap = cap->next) { -+ if (!strcmp((char*) cap->data, "actions")) { -+ gHasActions = PR_TRUE; -+ break; -+ } -+ } -+ g_list_foreach(server_caps, (GFunc)g_free, NULL); -+ g_list_free(server_caps); -+ } -+ } -+ -+ if (!gHasActions && aAlertTextClickable) -+ return NS_ERROR_FAILURE; // No good, fallback to XUL -+ -+ mAlertTitle = NS_ConvertUTF16toUTF8(aAlertTitle); -+ mAlertText = NS_ConvertUTF16toUTF8(aAlertText); -+ -+ mAlertHasAction = aAlertTextClickable; -+ -+ mAlertListener = aAlertListener; -+ mAlertCookie = aAlertCookie; -+ -+ return StartRequest(aImageUrl); -+} -diff -up /dev/null mozilla-1.9.1/toolkit/system/gnome/nsAlertsIconListener.h ---- /dev/null 2009-08-21 10:27:01.489538501 +0200 -+++ mozilla-1.9.1/toolkit/system/gnome/nsAlertsIconListener.h 2009-08-21 15:31:20.000000000 +0200 -@@ -0,0 +1,85 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Mozilla Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2008 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef nsAlertsIconListener_h__ -+#define nsAlertsIconListener_h__ -+ -+#include "nsCOMPtr.h" -+#include "imgIDecoderObserver.h" -+#include "nsStringAPI.h" -+#include "nsIObserver.h" -+ -+#include -+ -+class imgIRequest; -+ -+class nsAlertsIconListener : public imgIDecoderObserver -+{ -+public: -+ NS_DECL_ISUPPORTS -+ NS_DECL_IMGICONTAINEROBSERVER -+ NS_DECL_IMGIDECODEROBSERVER -+ -+ nsAlertsIconListener(); -+ virtual ~nsAlertsIconListener(); -+ -+ nsresult InitAlertAsync(const nsAString & aImageUrl, -+ const nsAString & aAlertTitle, -+ const nsAString & aAlertText, -+ PRBool aAlertTextClickable, -+ const nsAString & aAlertCookie, -+ nsIObserver * aAlertListener); -+ -+ void SendCallback(); -+ void SendClosed(); -+ -+protected: -+ nsCOMPtr mIconRequest; -+ nsCString mAlertTitle; -+ nsCString mAlertText; -+ -+ nsCOMPtr mAlertListener; -+ nsString mAlertCookie; -+ -+ PRPackedBool mLoadedFrame; -+ PRPackedBool mAlertHasAction; -+ -+ nsresult StartRequest(const nsAString & aImageUrl); -+ nsresult ShowAlert(GdkPixbuf* aPixbuf); -+}; -+ -+#endif -diff -up /dev/null mozilla-1.9.1/toolkit/system/gnome/nsAlertsService.cpp ---- /dev/null 2009-08-21 10:27:01.489538501 +0200 -+++ mozilla-1.9.1/toolkit/system/gnome/nsAlertsService.cpp 2009-08-21 15:31:20.000000000 +0200 -@@ -0,0 +1,73 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Mozilla Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2008 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsAlertsService.h" -+#include "nsAlertsIconListener.h" -+ -+NS_IMPL_THREADSAFE_ADDREF(nsAlertsService) -+NS_IMPL_THREADSAFE_RELEASE(nsAlertsService) -+ -+NS_INTERFACE_MAP_BEGIN(nsAlertsService) -+ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAlertsService) -+ NS_INTERFACE_MAP_ENTRY(nsIAlertsService) -+NS_INTERFACE_MAP_END_THREADSAFE -+ -+nsAlertsService::nsAlertsService() -+{} -+ -+nsAlertsService::~nsAlertsService() -+{} -+ -+nsresult -+nsAlertsService::Init() -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle, -+ const nsAString & aAlertText, PRBool aAlertTextClickable, -+ const nsAString & aAlertCookie, -+ nsIObserver * aAlertListener, -+ const nsAString & aAlertName) -+{ -+ nsCOMPtr alertListener = new nsAlertsIconListener(); -+ if (!alertListener) -+ return NS_ERROR_OUT_OF_MEMORY; -+ -+ return alertListener->InitAlertAsync(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable, -+ aAlertCookie, aAlertListener); -+} -diff -up /dev/null mozilla-1.9.1/toolkit/system/gnome/nsAlertsService.h ---- /dev/null 2009-08-21 10:27:01.489538501 +0200 -+++ mozilla-1.9.1/toolkit/system/gnome/nsAlertsService.h 2009-08-21 15:31:20.000000000 +0200 -@@ -0,0 +1,59 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Mozilla Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2008 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef nsAlertsService_h__ -+#define nsAlertsService_h__ -+ -+#include "nsIAlertsService.h" -+#include "nsCOMPtr.h" -+ -+class nsAlertsService : public nsIAlertsService -+{ -+public: -+ NS_DECL_NSIALERTSSERVICE -+ NS_DECL_ISUPPORTS -+ -+ nsAlertsService(); -+ virtual ~nsAlertsService(); -+ -+ nsresult Init(); -+ -+protected: -+ -+}; -+ -+#endif /* nsAlertsService_h__ */ -diff -up mozilla-1.9.1/toolkit/system/gnome/nsGnomeModule.cpp.libnotify mozilla-1.9.1/toolkit/system/gnome/nsGnomeModule.cpp ---- mozilla-1.9.1/toolkit/system/gnome/nsGnomeModule.cpp.libnotify 2009-07-30 17:30:33.000000000 +0200 -+++ mozilla-1.9.1/toolkit/system/gnome/nsGnomeModule.cpp 2009-08-21 15:31:20.000000000 +0200 -@@ -38,11 +38,20 @@ - - #include "nsGConfService.h" - #include "nsGnomeVFSService.h" -+#include "nsToolkitCompsCID.h" - #include "nsIGenericFactory.h" - -+#ifdef MOZ_ENABLE_LIBNOTIFY -+#include "nsAlertsService.h" -+#endif -+ - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGConfService, Init) - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init) - -+#ifdef MOZ_ENABLE_LIBNOTIFY -+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAlertsService, Init) -+#endif -+ - static const nsModuleComponentInfo components[] = { - { "GConf Service", - NS_GCONFSERVICE_CID, -@@ -51,7 +60,13 @@ static const nsModuleComponentInfo compo - { "GnomeVFS Service", - NS_GNOMEVFSSERVICE_CID, - NS_GNOMEVFSSERVICE_CONTRACTID, -- nsGnomeVFSServiceConstructor } -+ nsGnomeVFSServiceConstructor }, -+#ifdef MOZ_ENABLE_LIBNOTIFY -+ { "Gnome Alerts Service", -+ NS_SYSTEMALERTSSERVICE_CID, -+ NS_SYSTEMALERTSERVICE_CONTRACTID, -+ nsAlertsServiceConstructor }, -+#endif - }; - - NS_IMPL_NSGETMODULE(mozgnome, components) diff --git a/xulrunner-gtk-include.patch b/xulrunner-gtk-include.patch deleted file mode 100644 index 07f0066..0000000 --- a/xulrunner-gtk-include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-1.9.1/widget/src/gtk2/nsNativeKeyBindings.cpp.gtk mozilla-1.9.1/widget/src/gtk2/nsNativeKeyBindings.cpp ---- mozilla-1.9.1/widget/src/gtk2/nsNativeKeyBindings.cpp.gtk 2009-07-15 14:23:24.000000000 +0200 -+++ mozilla-1.9.1/widget/src/gtk2/nsNativeKeyBindings.cpp 2009-07-15 14:23:29.000000000 +0200 -@@ -42,7 +42,7 @@ - #include "nsGtkKeyUtils.h" - #include "nsGUIEvent.h" - --#include -+#include - #include - #include - #include diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index aeab2c2..77a9d3e 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -27,7 +27,7 @@ ac_add_options --enable-canvas ac_add_options --disable-javaxpcom ac_add_options --disable-crashreporter ac_add_options --enable-safe-browsing -ac_add_options --enable-extensions=default,python/xpcom +ac_add_options --enable-extensions=default ac_add_options --enable-libnotify export BUILD_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index 115d584..08e7eb1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -3,20 +3,21 @@ %define nss_version 3.12.3.99 %define cairo_version 1.6.0 %define freetype_version 2.1.9 -%define sqlite_version 3.6.14 -%define tarballdir mozilla-1.9.1 +%define sqlite_version 3.6.16 +%define tarballdir mozilla-1.9.2 -%define version_internal 1.9.1 +%define version_internal 1.9.2 %define mozappdir %{_libdir}/%{name}-%{version_internal} +%define pretag b2 Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.5 -Release: 1%{?dist} +Version: 1.9.2.1 +Release: 0.1.b2%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -Source0: %{name}-%{version}-source.tar.bz2 +Source0: %{name}-%{version}%{?pretag}.source.tar.bz2 Source10: %{name}-mozconfig Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in @@ -25,14 +26,12 @@ Source23: %{name}.1 # build patches Patch0: xulrunner-version.patch Patch1: mozilla-build.patch -Patch2: mozilla-191-path.patch Patch3: mozilla-jemalloc.patch Patch4: mozilla-about-firefox-version.patch -Patch5: xulrunner-gtk-include.patch -Patch6: mozilla-libnotify.patch +Patch7: xulrunner-1.9.2.1-build.patch # Fedora specific patches -Patch10: mozilla-191-pkgconfig.patch +Patch10: mozilla-192-pkgconfig.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch @@ -64,6 +63,7 @@ BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel BuildRequires: autoconf213 +BuildRequires: wireless-tools-devel Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} @@ -80,6 +80,7 @@ Group: Development/Libraries Obsoletes: mozilla-devel < 1.9 Obsoletes: firefox-devel < 2.1 Provides: gecko-devel = %{version} +Provides: gecko-devel-unstable = %{version} Requires: xulrunner = %{version}-%{release} Requires: nspr-devel >= %{nspr_version} @@ -108,37 +109,6 @@ Requires: libnotify-devel %description devel Gecko development files. -%package devel-unstable -Summary: Development files for Gecko, which are not considered stable -Group: Development/Libraries -Requires: xulrunner-devel = %{version}-%{release} -Provides: gecko-devel-unstable = %{version} - -%description devel-unstable -Unstable files for use with development of Gecko applications. These headers -are not frozen and APIs can change at any time, so should not be relied on. - -%package python -Summary: Files needed to run Gecko applications written in python. -Group: Applications/Internet -BuildRequires: python-devel -Requires: gecko-libs = %{version}-%{release} -Provides: pyxpcom = %{version}-%{release} -Provides: gecko-python = %{version}-%{release} - -%description python -Files needed to run Gecko applications written in python. - -%package python-devel -Summary: Development files for building Gecko applications written in python. -Group: Development/Libraries -Requires: gecko-devel = %{version}-%{release} -Provides: pyxpcom-devel = %{version}-%{release} -Provides: gecko-python-devel = %{version}-%{release} - -%description python-devel -Development files for building Gecko applications written in python. - #--------------------------------------------------------------------- %prep @@ -149,13 +119,10 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ > version.patch %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch - %patch1 -p1 -b .build -%patch2 -p1 -b .path %patch3 -p1 -b .jemalloc %patch4 -p1 -b .about-firefox-version -%patch5 -p1 -b .gtk-include -%patch6 -p1 -b .libnotify +%patch7 -p2 -b .del %patch10 -p1 -b .pk @@ -241,8 +208,10 @@ cd - $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} # Copy mozilla-config to stable include dir -%{__cp} dist/include/mozilla-config.h \ - $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/stable +#%{__cp} dist/include/mozilla-config.h \ +# $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/stable +#%{__cp} dist/include/mozilla-config.h \ +# $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} # Fix multilib devel conflicts... %ifarch x86_64 ia64 s390x ppc64 @@ -268,19 +237,7 @@ pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} install_file "mozilla-config" popd -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/stable -install_file "mozilla-config" -popd - -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/unstable -install_file "mozilla-config" -popd - -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/js -install_file "jsautocfg" -popd - -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/unstable +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} install_file "jsautocfg" popd @@ -294,17 +251,19 @@ popd %{__rm} -rf $RPM_BUILD_ROOT/%{_datadir}/idl/${INTERNAL_APP_NAME} %{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/include -ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME}/unstable \ +ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME} \ $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/include + %{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/idl -ln -s %{_datadir}/idl/${INTERNAL_APP_SDK_NAME}/unstable \ +ln -s %{_datadir}/idl/${INTERNAL_APP_SDK_NAME} \ $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/idl %{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/include -ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME}/stable \ +ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME} \ $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/include + %{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/idl -ln -s %{_datadir}/idl/${INTERNAL_APP_SDK_NAME}/stable \ +ln -s %{_datadir}/idl/${INTERNAL_APP_SDK_NAME} \ $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/idl find $RPM_BUILD_ROOT/%{_includedir} -type f -name "*.h" | xargs chmod 644 @@ -387,7 +346,6 @@ fi %ghost %{mozappdir}/components/xpti.dat %{mozappdir}/components/*.so %{mozappdir}/components/*.xpt -%exclude %{mozappdir}/components/libpyloader.so %attr(644, root, root) %{mozappdir}/components/*.js %{mozappdir}/defaults %{mozappdir}/greprefs @@ -409,52 +367,29 @@ fi # XXX See if these are needed still %{mozappdir}/updater* - %exclude %{mozappdir}/update.locale %files devel %defattr(-,root,root,-) -%dir %{_datadir}/idl/%{name}*%{version_internal} -%{_datadir}/idl/%{name}*%{version_internal}/stable -%{_includedir}/%{name}*%{version_internal} -%exclude %{_includedir}/%{name}*%{version_internal}/unstable -%exclude %{_includedir}/%{name}*%{version_internal}/pyxpcom %dir %{_libdir}/%{name}-sdk-* %dir %{_libdir}/%{name}-sdk-*/sdk +%dir %{_datadir}/idl/%{name}*%{version_internal} +%{_datadir}/idl/%{name}*%{version_internal} +%{_includedir}/%{name}*%{version_internal} +%{_libdir}/%{name}-sdk-*/* +%{_libdir}/%{name}-sdk-*/sdk/* +%{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell %{mozappdir}/xpidl %{mozappdir}/xpt_dump %{mozappdir}/xpt_link -%{_libdir}/%{name}-sdk-*/*.h -%{_libdir}/%{name}-sdk-*/sdk/* -%exclude %{_libdir}/%{name}-sdk-%{version_internal}/sdk/lib/libpyxpcom.so -%exclude %{_libdir}/pkgconfig/*unstable*.pc -%exclude %{_libdir}/pkgconfig/*gtkmozembed*.pc -%{_libdir}/pkgconfig/*.pc - -%files devel-unstable -%defattr(-,root,root,-) -%{_datadir}/idl/%{name}*%{version_internal}/unstable -%{_includedir}/%{name}*%{version_internal}/unstable -%dir %{_libdir}/%{name}-sdk-* -%{_libdir}/%{name}-sdk-*/* -%exclude %{_libdir}/%{name}-sdk-*/*.h -%exclude %{_libdir}/%{name}-sdk-*/sdk -%{_libdir}/pkgconfig/*unstable*.pc -%{_libdir}/pkgconfig/*gtkmozembed*.pc - -%files python -%{mozappdir}/components/pyabout.py* -%{mozappdir}/components/libpyloader.so -%{mozappdir}/python - -%files python-devel -%{_includedir}/%{name}*%{version_internal}/pyxpcom -%{_libdir}/%{name}-sdk-%{version_internal}/sdk/lib/libpyxpcom.so #--------------------------------------------------------------------- %changelog +* Fri Nov 13 2009 Martin Stransky 1.9.2.1-0.1.beta2 +- Rebase to 1.9.2.1 Beta 2 + * Thu Nov 5 2009 Jan Horak - 1.9.1.5-1 - Update to 1.9.1.5 From 07fe24aaf985d3e44420ff0d5abb246b774bb693 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Nov 2009 09:21:16 +0000 Subject: [PATCH 008/486] Fix for #480989 --- xulrunner.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 08e7eb1..60100ee 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -6,10 +6,14 @@ %define sqlite_version 3.6.16 %define tarballdir mozilla-1.9.2 +# The actual sqlite version (see #480989): +%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) + %define version_internal 1.9.2 %define mozappdir %{_libdir}/%{name}-%{version_internal} %define pretag b2 + Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 @@ -68,7 +72,7 @@ BuildRequires: wireless-tools-devel Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} -Requires: sqlite >= %{sqlite_version} +Requires: sqlite >= %{sqlite_build_version} Provides: gecko-libs = %{version} %description @@ -135,6 +139,15 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ #--------------------------------------------------------------------- %build +# Do not proceed with build if the sqlite require would be broken: +# make sure the minimum requirement is non-empty, ... +sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 +# ... and that major number of the computed build-time version matches: +case "%{sqlite_build_version}" in + "$sqlite_version"*) ;; + *) exit 1 ;; +esac + cd %{tarballdir} INTERNAL_GECKO=%{version_internal} @@ -389,6 +402,8 @@ fi %changelog * Fri Nov 13 2009 Martin Stransky 1.9.2.1-0.1.beta2 - Rebase to 1.9.2.1 Beta 2 +- fix the sqlite runtime requires again (#480989), add a check + that the sqlite requires is sane (by Stepan Kasal) * Thu Nov 5 2009 Jan Horak - 1.9.1.5-1 - Update to 1.9.1.5 From 7f0028250816cab3b38878e224a3cf27e653eefa Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Nov 2009 09:22:56 +0000 Subject: [PATCH 009/486] Build patches --- mozilla-192-pkgconfig.patch | 73 +++++++++++++++++++++++++++++++++++ xulrunner-1.9.2.1-build.patch | 12 ++++++ 2 files changed, 85 insertions(+) create mode 100644 mozilla-192-pkgconfig.patch create mode 100644 xulrunner-1.9.2.1-build.patch diff --git a/mozilla-192-pkgconfig.patch b/mozilla-192-pkgconfig.patch new file mode 100644 index 0000000..1f234a7 --- /dev/null +++ b/mozilla-192-pkgconfig.patch @@ -0,0 +1,73 @@ +diff -up mozilla-1.9.2/config/autoconf.mk.in.pk mozilla-1.9.2/config/autoconf.mk.in +--- mozilla-1.9.2/config/autoconf.mk.in.pk 2009-11-09 01:33:58.000000000 +0100 ++++ mozilla-1.9.2/config/autoconf.mk.in 2009-11-12 12:49:28.000000000 +0100 +@@ -58,14 +58,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ +-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++includedir = @includedir@/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) + libdir = @libdir@ + datadir = @datadir@ + mandir = @mandir@ +-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++idldir = $(datadir)/idl/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) + + installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) ++sdkdir = $(libdir)/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) + + DIST = $(DEPTH)/dist + LIBXUL_SDK = @LIBXUL_SDK@ +diff -up mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in.pk mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in +--- mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in.pk 2009-11-09 01:34:25.000000000 +0100 ++++ mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in 2009-11-12 13:09:18.000000000 +0100 +@@ -6,5 +6,6 @@ idldir=%idldir% + Name: libxul-embedding + Description: Static library for version-independent embedding of the Mozilla runtime + Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% + Libs: -L${sdkdir}/lib -lxpcomglue + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +diff -up mozilla-1.9.2/xulrunner/installer/libxul.pc.in.pk mozilla-1.9.2/xulrunner/installer/libxul.pc.in +--- mozilla-1.9.2/xulrunner/installer/libxul.pc.in.pk 2009-11-09 01:34:25.000000000 +0100 ++++ mozilla-1.9.2/xulrunner/installer/libxul.pc.in 2009-11-12 13:10:03.000000000 +0100 +@@ -2,6 +2,7 @@ prefix=%prefix% + sdkdir=%sdkdir% + includedir=%includedir% + idldir=%idldir% ++libdir=%libdir% + + Name: libxul + Description: The Mozilla Runtime and Embedding Engine +diff -up mozilla-1.9.2/xulrunner/installer/Makefile.in.pk mozilla-1.9.2/xulrunner/installer/Makefile.in +--- mozilla-1.9.2/xulrunner/installer/Makefile.in.pk 2009-11-12 12:49:28.000000000 +0100 ++++ mozilla-1.9.2/xulrunner/installer/Makefile.in 2009-11-12 12:49:28.000000000 +0100 +@@ -123,6 +123,7 @@ endif + -e "s|%includedir%|$(includedir)|" \ + -e "s|%idldir%|$(idldir)|" \ + -e "s|%sdkdir%|$(sdkdir)|" \ ++ -e "s|%libdir%|$(installdir)|" \ + -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ + -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ +diff -up mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.pk mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in +--- mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.pk 2009-11-09 01:34:25.000000000 +0100 ++++ mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2009-11-12 12:49:28.000000000 +0100 +@@ -1,5 +1,6 @@ + prefix=%prefix% + sdkdir=%sdkdir% ++libdir=%libdir% + includedir=%includedir% + + Name: mozilla-gtkembedmoz +diff -up mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in.pk mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in +--- mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in.pk 2009-11-09 01:34:25.000000000 +0100 ++++ mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in 2009-11-12 12:49:28.000000000 +0100 +@@ -1,5 +1,6 @@ + prefix=%prefix% + sdkdir=%sdkdir% ++libdir=%libdir% + includedir=%includedir% + + Name: mozilla-gtkembedmoz diff --git a/xulrunner-1.9.2.1-build.patch b/xulrunner-1.9.2.1-build.patch new file mode 100644 index 0000000..12f966b --- /dev/null +++ b/xulrunner-1.9.2.1-build.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-1.9.2.1/mozilla-1.9.2/layout/generic/nsFrame.h.old xulrunner-1.9.2.1/mozilla-1.9.2/layout/generic/nsFrame.h +--- xulrunner-1.9.2.1/mozilla-1.9.2/layout/generic/nsFrame.h.old 2009-11-11 15:34:51.000000000 +0100 ++++ xulrunner-1.9.2.1/mozilla-1.9.2/layout/generic/nsFrame.h 2009-11-11 15:33:09.000000000 +0100 +@@ -157,7 +157,7 @@ private: + // Left undefined; nsFrame objects are never allocated from the heap. + void* operator new(size_t sz) CPP_THROW_NEW; + +-protected: ++public: + // Overridden to prevent the global delete from being called, since + // the memory came out of an arena instead of the heap. + // From ffc09991ab82489330f24ceeab64df6d33e64339 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Nov 2009 09:34:30 +0000 Subject: [PATCH 010/486] added sources --- .cvsignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index 56e6814..3a9df44 100644 --- a/.cvsignore +++ b/.cvsignore @@ -3,3 +3,4 @@ xulrunner-1.9.1.2-source.tar.bz2 xulrunner-1.9.1.3-source.tar.bz2 xulrunner-1.9.1.4-source.tar.bz2 xulrunner-1.9.1.5-source.tar.bz2 +xulrunner-1.9.2.1b2.source.tar.bz2 diff --git a/sources b/sources index 759a7de..f80d209 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b3d92dfb40584141dc1068efc9bdfccc xulrunner-1.9.1.5-source.tar.bz2 +639cb790cecae3bde47ec650ab03c9a1 xulrunner-1.9.2.1b2.source.tar.bz2 From 720d321fcdb8c9503fec0904e979923e216c9dd5 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Nov 2009 20:04:00 +0000 Subject: [PATCH 011/486] Rebase to 1.9.2.1 Beta 3 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3a9df44..f04c9c7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -4,3 +4,4 @@ xulrunner-1.9.1.3-source.tar.bz2 xulrunner-1.9.1.4-source.tar.bz2 xulrunner-1.9.1.5-source.tar.bz2 xulrunner-1.9.2.1b2.source.tar.bz2 +xulrunner-1.9.2.1b3.source.tar.bz2 diff --git a/sources b/sources index f80d209..ed1e067 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -639cb790cecae3bde47ec650ab03c9a1 xulrunner-1.9.2.1b2.source.tar.bz2 +f58d25b80c5fc0bad39b65359ce60abf xulrunner-1.9.2.1b3.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 60100ee..6780d01 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,13 +11,13 @@ %define version_internal 1.9.2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b2 +%define pretag b3 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.1.b2%{?dist} +Release: 0.2.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -400,6 +400,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Nov 18 2009 Martin Stransky 1.9.2.1-0.1.b3 +- Rebase to 1.9.2.1 Beta 3 + * Fri Nov 13 2009 Martin Stransky 1.9.2.1-0.1.beta2 - Rebase to 1.9.2.1 Beta 2 - fix the sqlite runtime requires again (#480989), add a check From 1ea646522a2f305d0748db51383f553e74b9d4c8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Nov 2009 20:49:38 +0000 Subject: [PATCH 012/486] build fix --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 6780d01..eb54a77 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -381,6 +381,7 @@ fi # XXX See if these are needed still %{mozappdir}/updater* %exclude %{mozappdir}/update.locale +%exclude %{mozappdir}/components/components.list %files devel %defattr(-,root,root,-) From 6f70efad6b332ca30aef81f191fc35246c4eaafc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 19 Nov 2009 13:58:43 +0000 Subject: [PATCH 013/486] Removed old sources --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index d831ba0..759a7de 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -0b6ccb1e50d96b7127a18a69399fcf05 xulrunner-1.9.1.4-source.tar.bz2 b3d92dfb40584141dc1068efc9bdfccc xulrunner-1.9.1.5-source.tar.bz2 From c5b53732666c79506ef679cd6075b1dd7ee0c15a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Nov 2009 07:23:43 +0000 Subject: [PATCH 014/486] - Necko wifi monitor disabled - fixed a dependency (#539261) - added source URL (#521704) --- xulrunner-mozconfig | 1 + xulrunner.spec | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 77a9d3e..94c224b 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -29,6 +29,7 @@ ac_add_options --disable-crashreporter ac_add_options --enable-safe-browsing ac_add_options --enable-extensions=default ac_add_options --enable-libnotify +ac_add_options --disable-necko-wifi export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index eb54a77..2ace5d6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -17,10 +17,11 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.2.%{?pretag}%{?dist} +Release: 0.3.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet +# You can get sources at ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pretag}/source Source0: %{name}-%{version}%{?pretag}.source.tar.bz2 Source10: %{name}-mozconfig Source12: %{name}-redhat-default-prefs.js @@ -67,7 +68,6 @@ BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel BuildRequires: autoconf213 -BuildRequires: wireless-tools-devel Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} @@ -83,6 +83,7 @@ Summary: Development files for Gecko Group: Development/Libraries Obsoletes: mozilla-devel < 1.9 Obsoletes: firefox-devel < 2.1 +Obsoletes: xulrunner-devel-unstable Provides: gecko-devel = %{version} Provides: gecko-devel-unstable = %{version} @@ -401,7 +402,12 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Nov 18 2009 Martin Stransky 1.9.2.1-0.1.b3 +* Fri Nov 20 2009 Martin Stransky 1.9.2.1-0.3.b3 +- Necko wifi monitor disabled +- fixed a dependency (#539261) +- added source URL (#521704) + +* Wed Nov 18 2009 Martin Stransky 1.9.2.1-0.2.b3 - Rebase to 1.9.2.1 Beta 3 * Fri Nov 13 2009 Martin Stransky 1.9.2.1-0.1.beta2 From 0db4ec9eac43a5b5a4851560626556617f864a87 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 23 Nov 2009 11:48:26 +0000 Subject: [PATCH 015/486] - added -unstable.pc files for compatibility with 1.9.1 --- xulrunner.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2ace5d6..b16d147 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -17,7 +17,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.3.%{?pretag}%{?dist} +Release: 0.4.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -221,11 +221,11 @@ cd - %{__cp} -rL dist/include/* \ $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} -# Copy mozilla-config to stable include dir -#%{__cp} dist/include/mozilla-config.h \ -# $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/stable -#%{__cp} dist/include/mozilla-config.h \ -# $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} +# Copy pc files (for compatibility with 1.9.1) +%{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul.pc \ + $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-unstable.pc +%{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding.pc \ + $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding-unstable.pc # Fix multilib devel conflicts... %ifarch x86_64 ia64 s390x ppc64 @@ -402,6 +402,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 23 2009 Martin Stransky 1.9.2.1-0.4.b3 +- added -unstable.pc files for compatibility with 1.9.1 + * Fri Nov 20 2009 Martin Stransky 1.9.2.1-0.3.b3 - Necko wifi monitor disabled - fixed a dependency (#539261) From cf73d0454383e2be48cd7bd970fe481a05d1bac1 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:41:07 +0000 Subject: [PATCH 016/486] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e25ce9e..513ebfd 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: xulrunner -# $Id$ +# $Id: Makefile,v 1.1 2007/06/22 02:18:59 kevin Exp $ NAME := xulrunner SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From ade4fea2660806f81fb6da3df6d8fa3855552ea2 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:39:38 +0000 Subject: [PATCH 017/486] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e25ce9e..513ebfd 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: xulrunner -# $Id$ +# $Id: Makefile,v 1.1 2007/06/22 02:18:59 kevin Exp $ NAME := xulrunner SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From acc47461a01b0edba0be5b9c396b3515eb11bb25 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 27 Nov 2009 09:39:34 +0000 Subject: [PATCH 018/486] Update to 1.9.2.1 Beta 4 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index f04c9c7..9d2abfa 100644 --- a/.cvsignore +++ b/.cvsignore @@ -5,3 +5,4 @@ xulrunner-1.9.1.4-source.tar.bz2 xulrunner-1.9.1.5-source.tar.bz2 xulrunner-1.9.2.1b2.source.tar.bz2 xulrunner-1.9.2.1b3.source.tar.bz2 +xulrunner-1.9.2.1b4.source.tar.bz2 diff --git a/sources b/sources index ed1e067..0cceb64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f58d25b80c5fc0bad39b65359ce60abf xulrunner-1.9.2.1b3.source.tar.bz2 +770d0a33e4e2ceb52017c59d98c4d28c xulrunner-1.9.2.1b4.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index b16d147..0a567da 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,13 +11,13 @@ %define version_internal 1.9.2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b3 +%define pretag b4 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.4.%{?pretag}%{?dist} +Release: 0.5.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -402,6 +402,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Nov 27 2009 Martin Stransky 1.9.2.1-0.5.b4 +- Update to 1.9.2.1 Beta 4 + * Mon Nov 23 2009 Martin Stransky 1.9.2.1-0.4.b3 - added -unstable.pc files for compatibility with 1.9.1 From 39a5fec474eadf9a49cb3fb1761c0a97135d1634 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 3 Dec 2009 09:22:40 +0000 Subject: [PATCH 019/486] Added fix for #543585 - mozilla-plugin.pc contains incorrect CFLAGS --- xulrunner.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 0a567da..fdf900b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -17,7 +17,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.5.%{?pretag}%{?dist} +Release: 0.6.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -34,6 +34,7 @@ Patch1: mozilla-build.patch Patch3: mozilla-jemalloc.patch Patch4: mozilla-about-firefox-version.patch Patch7: xulrunner-1.9.2.1-build.patch +Patch8: mozilla-plugin.patch # Fedora specific patches Patch10: mozilla-192-pkgconfig.patch @@ -128,6 +129,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch3 -p1 -b .jemalloc %patch4 -p1 -b .about-firefox-version %patch7 -p2 -b .del +%patch8 -p1 -b .plugin %patch10 -p1 -b .pk @@ -402,6 +404,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 3 2009 Martin Stransky 1.9.2.1-0.6.b4 +- Added fix for #543585 - mozilla-plugin.pc contains incorrect CFLAGS + * Fri Nov 27 2009 Martin Stransky 1.9.2.1-0.5.b4 - Update to 1.9.2.1 Beta 4 From c776dbb608debabd27b35ba9df49ccbfb193afc6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 3 Dec 2009 09:24:40 +0000 Subject: [PATCH 020/486] added patch --- mozilla-plugin.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 mozilla-plugin.patch diff --git a/mozilla-plugin.patch b/mozilla-plugin.patch new file mode 100644 index 0000000..75eac7e --- /dev/null +++ b/mozilla-plugin.patch @@ -0,0 +1,10 @@ +diff -up mozilla-1.9.2/xulrunner/installer/mozilla-plugin.pc.in.old mozilla-1.9.2/xulrunner/installer/mozilla-plugin.pc.in +--- mozilla-1.9.2/xulrunner/installer/mozilla-plugin.pc.in.old 2009-11-25 05:13:11.000000000 +0100 ++++ mozilla-1.9.2/xulrunner/installer/mozilla-plugin.pc.in 2009-12-03 10:14:41.000000000 +0100 +@@ -5,5 +5,5 @@ includedir=%includedir% + Name: Mozilla Plug-In API + Description: Mozilla Plug-In API + Version: %MOZILLA_VERSION% +-Cflags: -I${includedir}/stable -DXP_UNIX %ojidef% ++Cflags: -I${includedir} -DXP_UNIX %ojidef% + From 9745e44efc9b6ad976a2f3e01503a8db2d3e21c7 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 16 Dec 2009 12:32:24 +0000 Subject: [PATCH 021/486] Update to 1.9.1.6 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 56e6814..796e5a9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -3,3 +3,4 @@ xulrunner-1.9.1.2-source.tar.bz2 xulrunner-1.9.1.3-source.tar.bz2 xulrunner-1.9.1.4-source.tar.bz2 xulrunner-1.9.1.5-source.tar.bz2 +xulrunner-1.9.1.6.source.tar.bz2 diff --git a/sources b/sources index 759a7de..d5daf23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b3d92dfb40584141dc1068efc9bdfccc xulrunner-1.9.1.5-source.tar.bz2 +54d73156dfedc6e4981f2a3c46817f9a xulrunner-1.9.1.6.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 115d584..93a8778 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -3,7 +3,7 @@ %define nss_version 3.12.3.99 %define cairo_version 1.6.0 %define freetype_version 2.1.9 -%define sqlite_version 3.6.14 +%define sqlite_version 3.6.16 %define tarballdir mozilla-1.9.1 %define version_internal 1.9.1 @@ -11,7 +11,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.5 +Version: 1.9.1.6 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -455,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Dec 16 2009 Jan Horak - 1.9.1.6-1 +- Update to 1.9.1.6 + * Thu Nov 5 2009 Jan Horak - 1.9.1.5-1 - Update to 1.9.1.5 From d930e36fe25770c7db897552bb71baea6357e3cf Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 16 Dec 2009 13:05:42 +0000 Subject: [PATCH 022/486] Fix source filename --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 93a8778..095f21d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -16,7 +16,7 @@ Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -Source0: %{name}-%{version}-source.tar.bz2 +Source0: %{name}-%{version}.source.tar.bz2 Source10: %{name}-mozconfig Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in From dc32ddcb77e84719ffc66cda58acf5b36ef21dbd Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 16 Dec 2009 14:04:41 +0000 Subject: [PATCH 023/486] Fixed libnotify patch --- mozilla-libnotify.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla-libnotify.patch b/mozilla-libnotify.patch index a090ef7..af76c47 100644 --- a/mozilla-libnotify.patch +++ b/mozilla-libnotify.patch @@ -29,7 +29,7 @@ diff -up mozilla-1.9.1/configure.in.libnotify mozilla-1.9.1/configure.in @@ -132,6 +132,7 @@ LIBGNOME_VERSION=2.0 STARTUP_NOTIFICATION_VERSION=0.8 DBUS_VERSION=0.60 - SQLITE_VERSION=3.6.16 + SQLITE_VERSION=3.6.16.1 +LIBNOTIFY_VERSION=0.4 MSMANIFEST_TOOL= From 26bbde2f1bae477f3737051801387820eedbc7a0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 17 Dec 2009 08:47:08 +0000 Subject: [PATCH 024/486] fix for mozbz#526152 --- mozilla-jemalloc-526152.patch | 32 ++++++++++++++++++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 mozilla-jemalloc-526152.patch diff --git a/mozilla-jemalloc-526152.patch b/mozilla-jemalloc-526152.patch new file mode 100644 index 0000000..5f60485 --- /dev/null +++ b/mozilla-jemalloc-526152.patch @@ -0,0 +1,32 @@ +From: David Mandelin + +diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c +--- a/memory/jemalloc/jemalloc.c ++++ b/memory/jemalloc/jemalloc.c +@@ -5792,24 +5792,24 @@ __attribute__((noinline)) + #else + inline + #endif + void * + memalign(size_t alignment, size_t size) + { + void *ret; + +- assert(((alignment - 1) & alignment) == 0 && alignment >= +- sizeof(void *)); ++ assert(((alignment - 1) & alignment) == 0); + + if (malloc_init()) { + ret = NULL; + goto RETURN; + } + ++ alignment = alignment < sizeof(void*) ? sizeof(void*) : alignment; + ret = ipalloc(alignment, size); + + RETURN: + #ifdef MALLOC_XMALLOC + if (opt_xmalloc && ret == NULL) { + _malloc_message(_getprogname(), + ": (malloc) Error in memalign(): out of memory\n", "", ""); + abort(); diff --git a/xulrunner.spec b/xulrunner.spec index fdf900b..1b37e99 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -17,7 +17,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.6.%{?pretag}%{?dist} +Release: 0.7.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -33,6 +33,7 @@ Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch3: mozilla-jemalloc.patch Patch4: mozilla-about-firefox-version.patch +Patch5: mozilla-jemalloc-526152.patch Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch @@ -128,6 +129,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch1 -p1 -b .build %patch3 -p1 -b .jemalloc %patch4 -p1 -b .about-firefox-version +%patch5 -p1 -b .jemalloc-526152 %patch7 -p2 -b .del %patch8 -p1 -b .plugin @@ -404,6 +406,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 17 2009 Martin Stransky 1.9.2.1-0.7.b4 +- Added fix for mozbz#543585 - jemalloc alignment assertion + and abort on Linux + * Thu Dec 3 2009 Martin Stransky 1.9.2.1-0.6.b4 - Added fix for #543585 - mozilla-plugin.pc contains incorrect CFLAGS From 4a6e5d671e6efe765a97d8d7a62a98aba8161c08 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 21 Dec 2009 09:13:47 +0000 Subject: [PATCH 025/486] Update to 1.9.2.1 Beta 5 --- .cvsignore | 1 + sources | 1 + xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9d2abfa..c3d3e85 100644 --- a/.cvsignore +++ b/.cvsignore @@ -6,3 +6,4 @@ xulrunner-1.9.1.5-source.tar.bz2 xulrunner-1.9.2.1b2.source.tar.bz2 xulrunner-1.9.2.1b3.source.tar.bz2 xulrunner-1.9.2.1b4.source.tar.bz2 +xulrunner-1.9.2.1b5.source.tar.bz2 diff --git a/sources b/sources index 0cceb64..2927a5b 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 770d0a33e4e2ceb52017c59d98c4d28c xulrunner-1.9.2.1b4.source.tar.bz2 +381a897e16579a47250dee9342353f37 xulrunner-1.9.2.1b5.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 1b37e99..0f852ba 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,13 +11,13 @@ %define version_internal 1.9.2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b4 +%define pretag b5 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.7.%{?pretag}%{?dist} +Release: 0.8.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -406,6 +406,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Dec 21 2009 Martin Stransky 1.9.2.1-0.8.b5 +- Update to 1.9.2.1 Beta 5 + * Thu Dec 17 2009 Martin Stransky 1.9.2.1-0.7.b4 - Added fix for mozbz#543585 - jemalloc alignment assertion and abort on Linux From 101ec51f01ee5a46395df8d2a56546960e621f1f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 21 Dec 2009 09:54:19 +0000 Subject: [PATCH 026/486] removed old sources --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index 2927a5b..22126fb 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -770d0a33e4e2ceb52017c59d98c4d28c xulrunner-1.9.2.1b4.source.tar.bz2 381a897e16579a47250dee9342353f37 xulrunner-1.9.2.1b5.source.tar.bz2 From 71d0b224ab7d25bc59af2008b45bd51a320e5e9c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 Jan 2010 10:54:26 +0000 Subject: [PATCH 027/486] Added fix for #480989 --- xulrunner.spec | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 095f21d..3ebcd86 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -9,10 +9,13 @@ %define version_internal 1.9.1 %define mozappdir %{_libdir}/%{name}-%{version_internal} +# The actual sqlite version (see #480989): +%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) + Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.1.6 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -68,7 +71,7 @@ BuildRequires: autoconf213 Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} -Requires: sqlite >= %{sqlite_version} +Requires: sqlite >= %{sqlite_build_version} Provides: gecko-libs = %{version} %description @@ -168,6 +171,15 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ #--------------------------------------------------------------------- %build +# Do not proceed with build if the sqlite require would be broken: +# make sure the minimum requirement is non-empty, ... +sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 +# ... and that major number of the computed build-time version matches: +case "%{sqlite_build_version}" in + "$sqlite_version"*) ;; + *) exit 1 ;; +esac + cd %{tarballdir} INTERNAL_GECKO=%{version_internal} @@ -455,6 +467,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 7 2010 Martin Stransky - 1.9.1.6-2 +- Added fix for #480989 + * Wed Dec 16 2009 Jan Horak - 1.9.1.6-1 - Update to 1.9.1.6 From e4f340357d0ed38b0080bc31a9e35010f119483f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 13 Jan 2010 11:53:35 +0000 Subject: [PATCH 028/486] Update to 1.9.2.1 RC1 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index c3d3e85..c82ea06 100644 --- a/.cvsignore +++ b/.cvsignore @@ -7,3 +7,4 @@ xulrunner-1.9.2.1b2.source.tar.bz2 xulrunner-1.9.2.1b3.source.tar.bz2 xulrunner-1.9.2.1b4.source.tar.bz2 xulrunner-1.9.2.1b5.source.tar.bz2 +xulrunner-1.9.2.1rc1.source.tar.bz2 diff --git a/sources b/sources index 22126fb..d1ee443 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -381a897e16579a47250dee9342353f37 xulrunner-1.9.2.1b5.source.tar.bz2 +f4b885c33ccacba27df11e745cf350d3 xulrunner-1.9.2.1rc1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 0f852ba..b34562a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,13 +11,13 @@ %define version_internal 1.9.2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b5 +%define pretag rc1 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.8.%{?pretag}%{?dist} +Release: 0.9.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -406,6 +406,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 13 2010 Martin Stransky 1.9.2.1-0.9.rc1 +- Update to 1.9.2.1 RC1 + * Mon Dec 21 2009 Martin Stransky 1.9.2.1-0.8.b5 - Update to 1.9.2.1 Beta 5 From 1f020ebc86ac531dd812141096bc2dbd6e903185 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 13 Jan 2010 12:21:01 +0000 Subject: [PATCH 029/486] Build patch --- mozilla-build-sbrk.patch | 10 ++++++++++ xulrunner.spec | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 mozilla-build-sbrk.patch diff --git a/mozilla-build-sbrk.patch b/mozilla-build-sbrk.patch new file mode 100644 index 0000000..e94b9ea --- /dev/null +++ b/mozilla-build-sbrk.patch @@ -0,0 +1,10 @@ +--- mozilla-1.9.2/js/src/shell/js.cpp.old 2010-01-06 04:35:17.000000000 +0100 ++++ mozilla-1.9.2/js/src/shell/js.cpp 2010-01-13 13:12:02.000000000 +0100 +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + #include "jstypes.h" + #include "jsarena.h" + #include "jsutil.h" diff --git a/xulrunner.spec b/xulrunner.spec index b34562a..2a5e1f5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -36,6 +36,7 @@ Patch4: mozilla-about-firefox-version.patch Patch5: mozilla-jemalloc-526152.patch Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch +Patch9: mozilla-build-sbrk.patch # Fedora specific patches Patch10: mozilla-192-pkgconfig.patch @@ -132,6 +133,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch5 -p1 -b .jemalloc-526152 %patch7 -p2 -b .del %patch8 -p1 -b .plugin +%patch9 -p1 -b .sbrk %patch10 -p1 -b .pk From 3867c6a07a86ca9a7245c48a531c9362114013a4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 13 Jan 2010 20:56:51 +0000 Subject: [PATCH 030/486] Build fix --- mozilla-build-sbrk.patch | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/mozilla-build-sbrk.patch b/mozilla-build-sbrk.patch index e94b9ea..eeaf110 100644 --- a/mozilla-build-sbrk.patch +++ b/mozilla-build-sbrk.patch @@ -1,10 +1,11 @@ ---- mozilla-1.9.2/js/src/shell/js.cpp.old 2010-01-06 04:35:17.000000000 +0100 -+++ mozilla-1.9.2/js/src/shell/js.cpp 2010-01-13 13:12:02.000000000 +0100 -@@ -48,6 +48,7 @@ - #include - #include - #include -+#include - #include "jstypes.h" - #include "jsarena.h" - #include "jsutil.h" +--- mozilla-1.9.2/js/src/shell/js.cpp.sbrk 2010-01-06 04:35:17.000000000 +0100 ++++ mozilla-1.9.2/js/src/shell/js.cpp 2010-01-13 21:47:40.000000000 +0100 +@@ -1119,7 +1119,7 @@ GC(JSContext *cx, uintN argc, jsval *vp) + char buf[256]; + JS_snprintf(buf, sizeof(buf), "before %lu, after %lu, break %08lx\n", + (unsigned long)preBytes, (unsigned long)rt->gcBytes, +-#ifdef HAVE_SBRK ++#if 0 + (unsigned long)sbrk(0) + #else + 0 From 254cdd0ee6831f4c5b0e09ad762c9dae62223549 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 13 Jan 2010 21:35:10 +0000 Subject: [PATCH 031/486] Build fix --- mozilla-build-sbrk.patch | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/mozilla-build-sbrk.patch b/mozilla-build-sbrk.patch index eeaf110..e7e8773 100644 --- a/mozilla-build-sbrk.patch +++ b/mozilla-build-sbrk.patch @@ -1,5 +1,6 @@ ---- mozilla-1.9.2/js/src/shell/js.cpp.sbrk 2010-01-06 04:35:17.000000000 +0100 -+++ mozilla-1.9.2/js/src/shell/js.cpp 2010-01-13 21:47:40.000000000 +0100 +diff -up xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp.sbrk xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp +--- xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp.sbrk 2010-01-06 04:35:17.000000000 +0100 ++++ xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp 2010-01-13 21:49:33.000000000 +0100 @@ -1119,7 +1119,7 @@ GC(JSContext *cx, uintN argc, jsval *vp) char buf[256]; JS_snprintf(buf, sizeof(buf), "before %lu, after %lu, break %08lx\n", @@ -9,3 +10,15 @@ (unsigned long)sbrk(0) #else 0 +diff -up xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp.sbrk xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp +--- xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp.sbrk 2010-01-06 04:35:19.000000000 +0100 ++++ xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp 2010-01-13 22:32:46.000000000 +0100 +@@ -543,7 +543,7 @@ GC(JSContext *cx, JSObject *obj, uintN a + JS_GC(cx); + fprintf(gOutFile, "before %lu, after %lu, break %08lx\n", + (unsigned long)preBytes, (unsigned long)rt->gcBytes, +-#if defined(XP_UNIX) && !defined(__SYMBIAN32__) ++#if 0 //defined(XP_UNIX) && !defined(__SYMBIAN32__) + (unsigned long)sbrk(0) + #else + 0 From 809d80fa4521ebb85512652f0601b24827dfca87 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 14 Jan 2010 09:54:42 +0000 Subject: [PATCH 032/486] Build fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2a5e1f5..4606304 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -133,7 +133,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch5 -p1 -b .jemalloc-526152 %patch7 -p2 -b .del %patch8 -p1 -b .plugin -%patch9 -p1 -b .sbrk +%patch9 -p2 -b .sbrk %patch10 -p1 -b .pk From 8a2c99af27b5cbedd7b9dccf466a95301421ced3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 14 Jan 2010 10:16:47 +0000 Subject: [PATCH 033/486] Removed unused patch --- mozilla-191-pkgconfig.patch | 142 ------------------------------------ 1 file changed, 142 deletions(-) delete mode 100644 mozilla-191-pkgconfig.patch diff --git a/mozilla-191-pkgconfig.patch b/mozilla-191-pkgconfig.patch deleted file mode 100644 index d894533..0000000 --- a/mozilla-191-pkgconfig.patch +++ /dev/null @@ -1,142 +0,0 @@ -diff -r f1af606531f5 config/autoconf.mk.in ---- a/config/autoconf.mk.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/config/autoconf.mk.in Mon Dec 01 22:30:12 2008 -0500 -@@ -57,14 +57,14 @@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ - bindir = @bindir@ --includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+includedir = @includedir@/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - libdir = @libdir@ - datadir = @datadir@ - mandir = @mandir@ --idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+idldir = $(datadir)/idl/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - - installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) -+sdkdir = $(libdir)/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - - DIST = $(DEPTH)/dist - LIBXUL_SDK = @LIBXUL_SDK@ -diff -r f1af606531f5 xulrunner/installer/Makefile.in ---- a/xulrunner/installer/Makefile.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/Makefile.in Mon Dec 01 22:30:12 2008 -0500 -@@ -116,6 +118,7 @@ - -e "s|%includedir%|$(includedir)|" \ - -e "s|%idldir%|$(idldir)|" \ - -e "s|%sdkdir%|$(sdkdir)|" \ -+ -e "s|%libdir%|$(installdir)|" \ - -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ - -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ - -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ -diff -r f1af606531f5 xulrunner/installer/libxul-embedding-unstable.pc.in ---- a/xulrunner/installer/libxul-embedding-unstable.pc.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/libxul-embedding-unstable.pc.in Mon Dec 01 22:30:12 2008 -0500 -@@ -1,11 +1,12 @@ - prefix=%prefix% - sdkdir=%sdkdir% - includedir=%includedir% --idldir=%idldir% -+idldir=%idldir%/unstable - includetype=unstable - - Name: libxul-embedding-unstable - Description: Static library for version-independent embedding of the Mozilla runtime (unstable API) - Version: %MOZILLA_VERSION% -+Requires: %NSPR_NAME% >= %NSPR_VERSION% - Libs: -L${sdkdir}/lib -lxpcomglue - Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} %WCHAR_CFLAGS% -diff -r f1af606531f5 xulrunner/installer/libxul-embedding.pc.in ---- a/xulrunner/installer/libxul-embedding.pc.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/libxul-embedding.pc.in Mon Dec 01 22:30:12 2008 -0500 -@@ -1,7 +1,7 @@ - prefix=%prefix% - sdkdir=%sdkdir% - includedir=%includedir% --idldir=%idldir% -+idldir=%idldir%/stable - includetype=stable - - # Note: the default pkg-config cflags will only list include directories -@@ -11,5 +11,6 @@ - Name: libxul-embedding - Description: Static library for version-independent embedding of the Mozilla runtime - Version: %MOZILLA_VERSION% --Libs: -L${sdkdir}/lib -lxpcomglue -+Requires: %NSPR_NAME% >= %NSPR_VERSION% -+Libs: -L${sdkdir}/sdk/lib -lxpcomglue - Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} %WCHAR_CFLAGS% -diff -r f1af606531f5 xulrunner/installer/libxul-unstable.pc.in ---- a/xulrunner/installer/libxul-unstable.pc.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/libxul-unstable.pc.in Mon Dec 01 22:30:12 2008 -0500 -@@ -1,7 +1,8 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% --idldir=%idldir% -+idldir=%idldir%/unstable - includetype=unstable - - Name: libxul -diff -r f1af606531f5 xulrunner/installer/libxul.pc.in ---- a/xulrunner/installer/libxul.pc.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/libxul.pc.in Mon Dec 01 22:30:12 2008 -0500 -@@ -1,7 +1,8 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% --idldir=%idldir% -+idldir=%idldir%/stable - includetype=stable - - # Note: the default pkg-config includes will only list include directories -@@ -12,5 +13,5 @@ - Description: The Mozilla Runtime and Embedding Engine - Version: %MOZILLA_VERSION% - Requires: %NSPR_NAME% >= %NSPR_VERSION% --Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom -+Libs: -L${sdkdir}/sdk/lib -lxpcomglue_s -lxul -lxpcom - Cflags: -I${includedir}/${includetype} %WCHAR_CFLAGS% -diff -r f1af606531f5 xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- a/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in Mon Dec 01 22:30:12 2008 -0500 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - - Name: mozilla-gtkembedmoz -diff -r f1af606531f5 xulrunner/installer/mozilla-gtkmozembed.pc.in ---- a/xulrunner/installer/mozilla-gtkmozembed.pc.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/mozilla-gtkmozembed.pc.in Mon Dec 01 22:30:12 2008 -0500 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - - Name: mozilla-gtkembedmoz -diff -r f1af606531f5 xulrunner/installer/mozilla-js.pc.in ---- a/xulrunner/installer/mozilla-js.pc.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/mozilla-js.pc.in Mon Dec 01 22:30:12 2008 -0500 -@@ -6,5 +6,5 @@ - Description: The Mozilla JavaScript Library - Version: %MOZILLA_VERSION% - Requires: %NSPR_NAME% >= %NSPR_VERSION% --Libs: -L${sdkdir}/lib -lmozjs --Cflags: -I${includedir}/stable -DXP_UNIX -DJS_THREADSAFE -+Libs: -L${sdkdir}/sdk/lib -lmozjs -+Cflags: -I${includedir}/stable -I${includedir}/js -DXP_UNIX -DJS_THREADSAFE -diff -r f1af606531f5 xulrunner/installer/mozilla-plugin.pc.in ---- a/xulrunner/installer/mozilla-plugin.pc.in Sat Nov 22 20:22:22 2008 +0100 -+++ b/xulrunner/installer/mozilla-plugin.pc.in Mon Dec 01 22:30:12 2008 -0500 -@@ -6,4 +6,4 @@ - Description: Mozilla Plug-In API - Version: %MOZILLA_VERSION% - Requires: %NSPR_NAME% >= %NSPR_VERSION% --Cflags: -I${includedir}/stable -DXP_UNIX %ojidef% -+Cflags: -I${includedir}/stable -DXP_UNIX %ojidef% -I${includedir}/java -I${includedir}/plugin From 6314ba0b37b5f04b20aafbad76fe78cf675b2401 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Jan 2010 11:38:07 +0000 Subject: [PATCH 034/486] Update to 1.9.2.1 RC2 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index c82ea06..b4d1e9c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -8,3 +8,4 @@ xulrunner-1.9.2.1b3.source.tar.bz2 xulrunner-1.9.2.1b4.source.tar.bz2 xulrunner-1.9.2.1b5.source.tar.bz2 xulrunner-1.9.2.1rc1.source.tar.bz2 +xulrunner-1.9.2.1rc2.source.tar.bz2 diff --git a/sources b/sources index d1ee443..b3343da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f4b885c33ccacba27df11e745cf350d3 xulrunner-1.9.2.1rc1.source.tar.bz2 +6d850ce9c8a360d8a51205cc7b485150 xulrunner-1.9.2.1rc2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 4606304..9ad0c9d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,13 +11,13 @@ %define version_internal 1.9.2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag rc1 +%define pretag rc2 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.9.%{?pretag}%{?dist} +Release: 0.10.%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -408,6 +408,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 18 2010 Martin Stransky 1.9.2.1-0.10.rc1 +- Update to 1.9.2.1 RC2 + * Wed Jan 13 2010 Martin Stransky 1.9.2.1-0.9.rc1 - Update to 1.9.2.1 RC1 From 1c480765bc3d94e069f59266cff18d7eabd55572 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 22 Jan 2010 09:38:00 +0000 Subject: [PATCH 035/486] Update to 1.9.2.1 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index b4d1e9c..8dd7b08 100644 --- a/.cvsignore +++ b/.cvsignore @@ -9,3 +9,4 @@ xulrunner-1.9.2.1b4.source.tar.bz2 xulrunner-1.9.2.1b5.source.tar.bz2 xulrunner-1.9.2.1rc1.source.tar.bz2 xulrunner-1.9.2.1rc2.source.tar.bz2 +xulrunner-1.9.2.1.source.tar.bz2 diff --git a/sources b/sources index b3343da..7207423 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6d850ce9c8a360d8a51205cc7b485150 xulrunner-1.9.2.1rc2.source.tar.bz2 +458051557ff49e6a352c1d56eee5782a xulrunner-1.9.2.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 9ad0c9d..c45e1b9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,13 +11,11 @@ %define version_internal 1.9.2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag rc2 - Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 0.10.%{?pretag}%{?dist} +Release: 1%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -408,6 +406,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 22 2010 Martin Stransky 1.9.2.1-1 +- Update to 1.9.2.1 + * Wed Jan 18 2010 Martin Stransky 1.9.2.1-0.10.rc1 - Update to 1.9.2.1 RC2 From ad25e8ed1677c96415dc8d978c0ed66772d40698 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 16 Feb 2010 10:42:29 +0000 Subject: [PATCH 036/486] Update to 1.9.1.8 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 796e5a9..c129263 100644 --- a/.cvsignore +++ b/.cvsignore @@ -4,3 +4,4 @@ xulrunner-1.9.1.3-source.tar.bz2 xulrunner-1.9.1.4-source.tar.bz2 xulrunner-1.9.1.5-source.tar.bz2 xulrunner-1.9.1.6.source.tar.bz2 +xulrunner-1.9.1.8.source.tar.bz2 diff --git a/sources b/sources index d5daf23..270b542 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -54d73156dfedc6e4981f2a3c46817f9a xulrunner-1.9.1.6.source.tar.bz2 +f20fdadf6114e84456775cd4f0f39492 xulrunner-1.9.1.8.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 3ebcd86..8dd0256 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -14,8 +14,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.6 -Release: 2%{?dist} +Version: 1.9.1.8 +Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -467,6 +467,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 16 2010 Jan Horak - 1.9.1.8-1 +- Update to 1.9.1.8 + * Thu Jan 7 2010 Martin Stransky - 1.9.1.6-2 - Added fix for #480989 From 3e3a9b6b3ac68ace700c55326ab572957055fd65 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 17 Feb 2010 14:30:57 +0000 Subject: [PATCH 037/486] Added fix for #564184 - xulrunner-devel multilib conflict --- xulrunner.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 8dd0256..cac9ecf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.1.8 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -296,6 +296,10 @@ pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/unstable install_file "jsautocfg" popd +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/js +install_file "js-config" +popd + %{__install} -p -c -m 755 dist/bin/xpcshell \ dist/bin/xpidl \ dist/bin/xpt_dump \ @@ -467,6 +471,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 17 2010 Martin Stransky - 1.9.1.8-2 +- Added fix for #564184 - xulrunner-devel multilib conflict + * Tue Feb 16 2010 Jan Horak - 1.9.1.8-1 - Update to 1.9.1.8 From 0d1d9ba072d5280cb3a8237752f89e7485a9522b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 17 Feb 2010 14:39:52 +0000 Subject: [PATCH 038/486] Added fix for #564184 - xulrunner-devel multilib conflict --- xulrunner.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index c45e1b9..8b77ef0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 1%{?pretag}%{?dist} +Release: 2%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -259,6 +259,10 @@ pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} install_file "jsautocfg" popd +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} +install_file "js-config" +popd + %{__install} -p -c -m 755 dist/bin/xpcshell \ dist/bin/xpidl \ dist/bin/xpt_dump \ @@ -406,6 +410,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 17 2010 Martin Stransky 1.9.2.1-2 +- Added fix for #564184 - xulrunner-devel multilib conflict + * Fri Jan 22 2010 Martin Stransky 1.9.2.1-1 - Update to 1.9.2.1 From 92ec5b658181889e6d612c27f8f34d1afc04d4c8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 18 Feb 2010 15:31:39 +0000 Subject: [PATCH 039/486] Fixed mozbz#462919 --- xulrunner.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 8b77ef0..ecb5d89 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -41,6 +41,7 @@ Patch10: mozilla-192-pkgconfig.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch +Patch101: mozilla-462919.patch # --------------------------------------------------- @@ -136,6 +137,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch10 -p1 -b .pk %patch100 -p1 -b .ps-pdf-simplify-operators +%patch101 -p1 -b .462919 %{__rm} -f .mozconfig @@ -410,6 +412,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Feb 18 2010 Jan Horak - 1.9.2.1-3 +- Added fix for mozbz#462919 - Override NSS database path + for xulrunner application + * Wed Feb 17 2010 Martin Stransky 1.9.2.1-2 - Added fix for #564184 - xulrunner-devel multilib conflict From 43443f345a5bac89b398d1f10aa7e40ac9646ae5 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 18 Feb 2010 15:40:16 +0000 Subject: [PATCH 040/486] Fixed mozbz#462919 --- .cvsignore | 1 + mozilla-462919.patch | 26 ++++++++++++++++++++++++++ xulrunner.spec | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 mozilla-462919.patch diff --git a/.cvsignore b/.cvsignore index 8dd7b08..45feed4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -10,3 +10,4 @@ xulrunner-1.9.2.1b5.source.tar.bz2 xulrunner-1.9.2.1rc1.source.tar.bz2 xulrunner-1.9.2.1rc2.source.tar.bz2 xulrunner-1.9.2.1.source.tar.bz2 +xulrunner-1.9.1.8.source.tar.bz2 diff --git a/mozilla-462919.patch b/mozilla-462919.patch new file mode 100644 index 0000000..3085372 --- /dev/null +++ b/mozilla-462919.patch @@ -0,0 +1,26 @@ +Index: mozilla/security/manager/ssl/src/nsNSSComponent.cpp +=================================================================== +RCS file: /cvsroot/mozilla/security/manager/ssl/src/nsNSSComponent.cpp,v +retrieving revision 1.167 +diff -u -u -r1.167 nsNSSComponent.cpp +--- mozilla/security/manager/ssl/src/nsNSSComponent.cpp 16 Sep 2008 20:44:53 -0000 1.167 ++++ mozilla/security/manager/ssl/src/nsNSSComponent.cpp 29 Oct 2008 06:11:27 -0000 +@@ -1516,9 +1516,15 @@ + return rv; + #endif + +- rv = profilePath->GetNativePath(profileStr); +- if (NS_FAILED(rv)) +- return rv; ++ const char *dbdir_override = getenv("MOZPSM_NSSDBDIR_OVERRIDE"); ++ if (dbdir_override && strlen(dbdir_override)) { ++ profileStr = dbdir_override; ++ } ++ else { ++ rv = profilePath->GetNativePath(profileStr); ++ if (NS_FAILED(rv)) ++ return rv; ++ } + + #if defined(XP_MACOSX) + // function may modify the parameters diff --git a/xulrunner.spec b/xulrunner.spec index ecb5d89..2fd14e7 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 2%{?pretag}%{?dist} +Release: 3%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet From 106417ecb290fe187786284b1a19929d1259691e Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 18 Feb 2010 16:01:26 +0000 Subject: [PATCH 041/486] Fixed mozilla-462919.patch --- mozilla-462919.patch | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mozilla-462919.patch b/mozilla-462919.patch index 3085372..4144d29 100644 --- a/mozilla-462919.patch +++ b/mozilla-462919.patch @@ -1,11 +1,7 @@ -Index: mozilla/security/manager/ssl/src/nsNSSComponent.cpp -=================================================================== -RCS file: /cvsroot/mozilla/security/manager/ssl/src/nsNSSComponent.cpp,v -retrieving revision 1.167 -diff -u -u -r1.167 nsNSSComponent.cpp ---- mozilla/security/manager/ssl/src/nsNSSComponent.cpp 16 Sep 2008 20:44:53 -0000 1.167 -+++ mozilla/security/manager/ssl/src/nsNSSComponent.cpp 29 Oct 2008 06:11:27 -0000 -@@ -1516,9 +1516,15 @@ +diff -up mozilla-1.9.2/security/manager/ssl/src/nsNSSComponent.cpp.462919 mozilla-1.9.2/security/manager/ssl/src/nsNSSComponent.cpp +--- mozilla-1.9.2/security/manager/ssl/src/nsNSSComponent.cpp.462919 2010-01-21 04:31:05.000000000 +0100 ++++ mozilla-1.9.2/security/manager/ssl/src/nsNSSComponent.cpp 2010-02-18 16:24:49.000000000 +0100 +@@ -1573,9 +1573,15 @@ nsNSSComponent::InitializeNSS(PRBool sho return rv; #endif @@ -22,5 +18,5 @@ diff -u -u -r1.167 nsNSSComponent.cpp + return rv; + } - #if defined(XP_MACOSX) - // function may modify the parameters + hashTableCerts = PL_NewHashTable( 0, certHashtable_keyHash, certHashtable_keyCompare, + certHashtable_valueCompare, 0, 0 ); From 5ad40288bdf1a0b43cd3137a0ab4e27cf677635b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 16 Mar 2010 02:50:29 +0000 Subject: [PATCH 042/486] - Enable startup notification, closes #445543 --- xulrunner-mozconfig | 1 + xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 94c224b..8c42114 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -30,6 +30,7 @@ ac_add_options --enable-safe-browsing ac_add_options --enable-extensions=default ac_add_options --enable-libnotify ac_add_options --disable-necko-wifi +ac_add_options --enable-startup-notification export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index 2fd14e7..7e6ea61 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.1 -Release: 3%{?pretag}%{?dist} +Release: 4%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -412,6 +412,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Mar 15 2010 Colin Walters - 1.9.2.1-4 +- Enable startup notification, closes #445543 + * Thu Feb 18 2010 Jan Horak - 1.9.2.1-3 - Added fix for mozbz#462919 - Override NSS database path for xulrunner application From 0a1a080fd36fae00d9225bfaec226d42054f8444 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 23 Mar 2010 09:42:24 +0000 Subject: [PATCH 043/486] Update to 1.9.2.2 --- .cvsignore | 14 +------------- mozilla-462919.patch | 22 ---------------------- sources | 2 +- xulrunner.spec | 9 +++++---- 4 files changed, 7 insertions(+), 40 deletions(-) delete mode 100644 mozilla-462919.patch diff --git a/.cvsignore b/.cvsignore index 45feed4..4a83752 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,13 +1 @@ -xulrunner-1.9.1.1-source.tar.bz2 -xulrunner-1.9.1.2-source.tar.bz2 -xulrunner-1.9.1.3-source.tar.bz2 -xulrunner-1.9.1.4-source.tar.bz2 -xulrunner-1.9.1.5-source.tar.bz2 -xulrunner-1.9.2.1b2.source.tar.bz2 -xulrunner-1.9.2.1b3.source.tar.bz2 -xulrunner-1.9.2.1b4.source.tar.bz2 -xulrunner-1.9.2.1b5.source.tar.bz2 -xulrunner-1.9.2.1rc1.source.tar.bz2 -xulrunner-1.9.2.1rc2.source.tar.bz2 -xulrunner-1.9.2.1.source.tar.bz2 -xulrunner-1.9.1.8.source.tar.bz2 +xulrunner-1.9.2.2.source.tar.bz2 diff --git a/mozilla-462919.patch b/mozilla-462919.patch deleted file mode 100644 index 4144d29..0000000 --- a/mozilla-462919.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up mozilla-1.9.2/security/manager/ssl/src/nsNSSComponent.cpp.462919 mozilla-1.9.2/security/manager/ssl/src/nsNSSComponent.cpp ---- mozilla-1.9.2/security/manager/ssl/src/nsNSSComponent.cpp.462919 2010-01-21 04:31:05.000000000 +0100 -+++ mozilla-1.9.2/security/manager/ssl/src/nsNSSComponent.cpp 2010-02-18 16:24:49.000000000 +0100 -@@ -1573,9 +1573,15 @@ nsNSSComponent::InitializeNSS(PRBool sho - return rv; - #endif - -- rv = profilePath->GetNativePath(profileStr); -- if (NS_FAILED(rv)) -- return rv; -+ const char *dbdir_override = getenv("MOZPSM_NSSDBDIR_OVERRIDE"); -+ if (dbdir_override && strlen(dbdir_override)) { -+ profileStr = dbdir_override; -+ } -+ else { -+ rv = profilePath->GetNativePath(profileStr); -+ if (NS_FAILED(rv)) -+ return rv; -+ } - - hashTableCerts = PL_NewHashTable( 0, certHashtable_keyHash, certHashtable_keyCompare, - certHashtable_valueCompare, 0, 0 ); diff --git a/sources b/sources index 7207423..0bcc758 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -458051557ff49e6a352c1d56eee5782a xulrunner-1.9.2.1.source.tar.bz2 +a1972a2216ac7139b92b7378a328ec93 xulrunner-1.9.2.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 7e6ea61..8e24f72 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -14,8 +14,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.2.1 -Release: 4%{?pretag}%{?dist} +Version: 1.9.2.2 +Release: 1%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -41,7 +41,6 @@ Patch10: mozilla-192-pkgconfig.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch -Patch101: mozilla-462919.patch # --------------------------------------------------- @@ -137,7 +136,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch10 -p1 -b .pk %patch100 -p1 -b .ps-pdf-simplify-operators -%patch101 -p1 -b .462919 %{__rm} -f .mozconfig @@ -412,6 +410,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 23 2010 Jan Horak - 1.9.2.2-1 +- Update to 1.9.2.2 + * Mon Mar 15 2010 Colin Walters - 1.9.2.1-4 - Enable startup notification, closes #445543 From c40e556a702977519ac5807000d6462d9645f56b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 24 Mar 2010 14:16:08 +0000 Subject: [PATCH 044/486] - fix sparc arch multilib - dont try and build nanojit on sparc64 --- xulrunner.spec | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index cac9ecf..ccbbc5f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.1.8 -Release: 2%{?dist} +Release: 2%{?dist}.1 URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -168,6 +168,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig +# Upstream bug filed without resolution +# for now make sure jit is not enabled on sparc64 +%ifarch sparc64 +echo "ac_add_options --disable-jit" >> .mozconfig +%endif + #--------------------------------------------------------------------- %build @@ -257,7 +263,7 @@ cd - $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME}/stable # Fix multilib devel conflicts... -%ifarch x86_64 ia64 s390x ppc64 +%ifarch x86_64 ia64 s390x ppc64 sparc64 %define mozbits 64 %else %define mozbits 32 @@ -268,7 +274,7 @@ genheader=$* mv ${genheader}.h ${genheader}%{mozbits}.h cat > ${genheader}.h << EOF /* This file exists to fix multilib conflicts */ -#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) +#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) #include "${genheader}64.h" #else #include "${genheader}32.h" @@ -334,7 +340,7 @@ done popd # GRE stuff -%ifarch x86_64 ia64 ppc64 s390x +%ifarch x86_64 ia64 ppc64 s390x sparc64 %define gre_conf_file gre64.conf %else %define gre_conf_file gre.conf @@ -346,7 +352,7 @@ MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` chmod 644 $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} # Library path -%ifarch x86_64 ia64 ppc64 s390x +%ifarch x86_64 ia64 ppc64 s390x sparc64 %define ld_conf_file xulrunner-64.conf %else %define ld_conf_file xulrunner-32.conf @@ -471,6 +477,10 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 24 2010 Dennis Gilmore - 1.9.1.8-2.1 +- fix sparc arch multilib +- dont try and build nanojit on sparc64 + * Wed Feb 17 2010 Martin Stransky - 1.9.1.8-2 - Added fix for #564184 - xulrunner-devel multilib conflict From e54f4ed8e716123cdd8278ba9cc91d52cc4f9710 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 24 Mar 2010 15:41:22 +0000 Subject: [PATCH 045/486] add upstreamed patch thats approved but not applied --- ...-sparc-linux-sync_instruction_memory.patch | 24 +++++++++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 xulrunner-1.9.1-sparc-linux-sync_instruction_memory.patch diff --git a/xulrunner-1.9.1-sparc-linux-sync_instruction_memory.patch b/xulrunner-1.9.1-sparc-linux-sync_instruction_memory.patch new file mode 100644 index 0000000..99f5689 --- /dev/null +++ b/xulrunner-1.9.1-sparc-linux-sync_instruction_memory.patch @@ -0,0 +1,24 @@ +diff -up xulrunner-1.9.1/mozilla-1.9.1/js/src/nanojit/Assembler.cpp.BAD xulrunner-1.9.1/mozilla-1.9.1/js/src/nanojit/Assembler.cpp +--- xulrunner-1.9.1/mozilla-1.9.1/js/src/nanojit/Assembler.cpp.BAD 2009-07-01 15:22:47.534707233 -0400 ++++ xulrunner-1.9.1/mozilla-1.9.1/js/src/nanojit/Assembler.cpp 2009-07-02 13:18:40.509279263 -0400 +@@ -50,8 +50,20 @@ extern "C" void __clear_cache(char *BEG, + #endif + + #ifdef AVMPLUS_SPARC ++#ifdef __linux__ ++void sync_instruction_memory(caddr_t v, u_int len) ++{ ++ caddr_t end = v + len; ++ caddr_t p = v; ++ while (p < end) { ++ asm("flush %0" : : "r" (p)); ++ p += 32; ++ } ++} ++#else + extern "C" void sync_instruction_memory(caddr_t v, u_int len); + #endif ++#endif + + namespace nanojit + { diff --git a/xulrunner.spec b/xulrunner.spec index ccbbc5f..d34af1b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -39,6 +39,7 @@ Patch10: mozilla-191-pkgconfig.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch +Patch101: xulrunner-1.9.1-sparc-linux-sync_instruction_memory.patch # --------------------------------------------------- @@ -163,6 +164,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch10 -p1 -b .pk %patch100 -p1 -b .ps-pdf-simplify-operators +%patch101 -p1 -b .sparc-linux-sync_instruction_memory %{__rm} -f .mozconfig From d4796c31b8e99b4e2b061f0385bd52c99f33025e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 24 Mar 2010 16:42:29 +0000 Subject: [PATCH 046/486] sparc patch needs to be applied -p2 --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index d34af1b..09d2233 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -164,7 +164,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch10 -p1 -b .pk %patch100 -p1 -b .ps-pdf-simplify-operators -%patch101 -p1 -b .sparc-linux-sync_instruction_memory +%patch101 -p2 -b .sparc-linux-sync_instruction_memory %{__rm} -f .mozconfig From 3832d4344c4f3e5f997316c42c0f6e52eeceddc1 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 30 Mar 2010 07:11:45 +0000 Subject: [PATCH 047/486] Update to 1.9.1.9 --- .cvsignore | 8 +------- sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.cvsignore b/.cvsignore index c129263..81c9cfb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,7 +1 @@ -xulrunner-1.9.1.1-source.tar.bz2 -xulrunner-1.9.1.2-source.tar.bz2 -xulrunner-1.9.1.3-source.tar.bz2 -xulrunner-1.9.1.4-source.tar.bz2 -xulrunner-1.9.1.5-source.tar.bz2 -xulrunner-1.9.1.6.source.tar.bz2 -xulrunner-1.9.1.8.source.tar.bz2 +xulrunner-1.9.1.9.source.tar.bz2 diff --git a/sources b/sources index 270b542..58852da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f20fdadf6114e84456775cd4f0f39492 xulrunner-1.9.1.8.source.tar.bz2 +e88edeff88efe2eeb718b184fe5295f8 xulrunner-1.9.1.9.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 09d2233..950617c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -14,8 +14,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.8 -Release: 2%{?dist}.1 +Version: 1.9.1.9 +Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -479,6 +479,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 30 2010 Jan Horak - 1.9.1.9-1 +- Update to 1.9.1.9 + * Wed Mar 24 2010 Dennis Gilmore - 1.9.1.8-2.1 - fix sparc arch multilib - dont try and build nanojit on sparc64 From a900183d0f79fc2c49eee2d3d947d6f2101a6144 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 2 Apr 2010 19:35:03 +0000 Subject: [PATCH 048/486] Update to 1.9.2.3 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4a83752..991858b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ xulrunner-1.9.2.2.source.tar.bz2 +xulrunner-1.9.2.3.source.tar.bz2 diff --git a/sources b/sources index 0bcc758..693817a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a1972a2216ac7139b92b7378a328ec93 xulrunner-1.9.2.2.source.tar.bz2 +5e4541ab23084b7b14ba228291ce2688 xulrunner-1.9.2.3.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 8e24f72..2f1ef81 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,6 +1,6 @@ # Minimal required versions %define nspr_version 4.8 -%define nss_version 3.12.3.99 +%define nss_version 3.12.6 %define cairo_version 1.6.0 %define freetype_version 2.1.9 %define sqlite_version 3.6.16 @@ -14,7 +14,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.2.2 +Version: 1.9.2.3 Release: 1%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -410,6 +410,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Apr 2 2010 Martin Stransky 1.9.2.3-1 +- Update to 1.9.2.3 + * Tue Mar 23 2010 Jan Horak - 1.9.2.2-1 - Update to 1.9.2.2 From 4d4b586c1a907e9e71a293dbdee1482f32764656 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 10 May 2010 09:33:50 +0000 Subject: [PATCH 049/486] Added fix for mozbz#516124 --- mozilla-516124.patch | 30 ++++++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 mozilla-516124.patch diff --git a/mozilla-516124.patch b/mozilla-516124.patch new file mode 100644 index 0000000..85d180c --- /dev/null +++ b/mozilla-516124.patch @@ -0,0 +1,30 @@ +--- a/toolkit/system/gnome/nsAlertsIconListener.cpp ++++ b/toolkit/system/gnome/nsAlertsIconListener.cpp +@@ -245,23 +245,25 @@ nsAlertsIconListener::StartRequest(const + return il->LoadImage(imageUri, nsnull, nsnull, nsnull, this, + nsnull, nsIRequest::LOAD_NORMAL, nsnull, nsnull, + getter_AddRefs(mIconRequest)); + } + + void + nsAlertsIconListener::SendCallback() + { +- mAlertListener->Observe(NULL, "alertclickcallback", mAlertCookie.get()); ++ if (mAlertListener) ++ mAlertListener->Observe(NULL, "alertclickcallback", mAlertCookie.get()); + } + + void + nsAlertsIconListener::SendClosed() + { +- mAlertListener->Observe(NULL, "alertfinished", mAlertCookie.get()); ++ if (mAlertListener) ++ mAlertListener->Observe(NULL, "alertfinished", mAlertCookie.get()); + } + + nsresult + nsAlertsIconListener::InitAlertAsync(const nsAString & aImageUrl, + const nsAString & aAlertTitle, + const nsAString & aAlertText, + PRBool aAlertTextClickable, + const nsAString & aAlertCookie, diff --git a/xulrunner.spec b/xulrunner.spec index 950617c..2fb3d81 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.1.9 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -33,6 +33,7 @@ Patch3: mozilla-jemalloc.patch Patch4: mozilla-about-firefox-version.patch Patch5: xulrunner-gtk-include.patch Patch6: mozilla-libnotify.patch +Patch7: mozilla-516124.patch # Fedora specific patches Patch10: mozilla-191-pkgconfig.patch @@ -160,6 +161,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch4 -p1 -b .about-firefox-version %patch5 -p1 -b .gtk-include %patch6 -p1 -b .libnotify +%patch7 -p1 -b .516124 %patch10 -p1 -b .pk @@ -479,6 +481,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 10 2010 Martin Stransky - 1.9.1.9-2 +- Added fix for mozbz#516124 + * Tue Mar 30 2010 Jan Horak - 1.9.1.9-1 - Update to 1.9.1.9 From 3dd0807575feceb7ba5e315c41fbae9e69a3939d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 17 May 2010 12:08:01 +0000 Subject: [PATCH 050/486] Added fix for mozbz#499295 --- mozilla-499295.patch | 20 ++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 mozilla-499295.patch diff --git a/mozilla-499295.patch b/mozilla-499295.patch new file mode 100644 index 0000000..d95b234 --- /dev/null +++ b/mozilla-499295.patch @@ -0,0 +1,20 @@ +From: timeless@mozdev.org + +Bug 499295 NULL crash [@ nsPluginInstancePeerImpl::GetJSContext] +r=jst sr=jst + +diff --git a/modules/plugin/base/src/nsPluginInstancePeer.cpp b/modules/plugin/base/src/nsPluginInstancePeer.cpp +--- a/modules/plugin/base/src/nsPluginInstancePeer.cpp ++++ b/modules/plugin/base/src/nsPluginInstancePeer.cpp +@@ -689,8 +689,10 @@ nsPluginInstancePeerImpl::GetJSContext(J + { + *outContext = NULL; + nsresult rv = NS_ERROR_FAILURE; ++ if (!mOwner) ++ return rv; ++ + nsCOMPtr document; +- + rv = mOwner->GetDocument(getter_AddRefs(document)); + + if (NS_SUCCEEDED(rv) && document) { diff --git a/xulrunner.spec b/xulrunner.spec index 2fb3d81..d4e10c2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.1.9 -Release: 2%{?dist} +Release: 3%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -34,6 +34,7 @@ Patch4: mozilla-about-firefox-version.patch Patch5: xulrunner-gtk-include.patch Patch6: mozilla-libnotify.patch Patch7: mozilla-516124.patch +Patch8: mozilla-499295.patch # Fedora specific patches Patch10: mozilla-191-pkgconfig.patch @@ -162,6 +163,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch5 -p1 -b .gtk-include %patch6 -p1 -b .libnotify %patch7 -p1 -b .516124 +%patch8 -p1 -b .499295 %patch10 -p1 -b .pk @@ -481,6 +483,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 17 2010 Martin Stransky - 1.9.1.9-3 +- Added fix for mozbz#499295 + * Mon May 10 2010 Martin Stransky - 1.9.1.9-2 - Added fix for mozbz#516124 From 6f62dd296427fe65461b2589fbf0016ba3163698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 15 Jun 2010 13:02:38 +0000 Subject: [PATCH 051/486] - Fixed build on s390 --- mozilla-build-s390.patch | 11 +++++++++++ xulrunner.spec | 13 ++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 mozilla-build-s390.patch diff --git a/mozilla-build-s390.patch b/mozilla-build-s390.patch new file mode 100644 index 0000000..92f5cbb --- /dev/null +++ b/mozilla-build-s390.patch @@ -0,0 +1,11 @@ +diff -up mozilla-1.9.2/js/src/jstl.h.old mozilla-1.9.2/js/src/jstl.h +--- mozilla-1.9.2/js/src/jstl.h.old 2010-03-10 10:01:51.000000000 +0100 ++++ mozilla-1.9.2/js/src/jstl.h 2010-03-10 12:24:55.000000000 +0100 +@@ -195,7 +195,6 @@ class ReentrancyGuard + static JS_ALWAYS_INLINE size_t + RoundUpPow2(size_t x) + { +- typedef tl::StaticAssert::result>::result _; + size_t log2 = JS_CEILING_LOG2W(x); + JS_ASSERT(log2 < tl::BitSize::result); + size_t result = size_t(1) << log2; diff --git a/xulrunner.spec b/xulrunner.spec index 2f1ef81..f36ba94 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.3 -Release: 1%{?pretag}%{?dist} +Release: 2%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -35,9 +35,10 @@ Patch5: mozilla-jemalloc-526152.patch Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch Patch9: mozilla-build-sbrk.patch +Patch10: mozilla-build-s390.patch # Fedora specific patches -Patch10: mozilla-192-pkgconfig.patch +Patch20: mozilla-192-pkgconfig.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch @@ -132,8 +133,11 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch7 -p2 -b .del %patch8 -p1 -b .plugin %patch9 -p2 -b .sbrk +%ifarch s390 +%patch10 -p1 -b .s390 +%endif -%patch10 -p1 -b .pk +%patch20 -p1 -b .pk %patch100 -p1 -b .ps-pdf-simplify-operators @@ -410,6 +414,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 15 2010 Dan Horák 1.9.2.3-2 +- Fixed build on s390 + * Fri Apr 2 2010 Martin Stransky 1.9.2.3-1 - Update to 1.9.2.3 From 81c8395eab9016946a7ebd308d00233f1b64d8b8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 22 Jun 2010 15:36:32 +0000 Subject: [PATCH 052/486] Update to 1.9.2.4 --- .cvsignore | 1 + sources | 2 +- xulrunner-mozconfig-debuginfo | 5 +++++ xulrunner.spec | 32 ++++++++++++++++++++++++++++++-- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 xulrunner-mozconfig-debuginfo diff --git a/.cvsignore b/.cvsignore index 991858b..90ada15 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ xulrunner-1.9.2.2.source.tar.bz2 xulrunner-1.9.2.3.source.tar.bz2 +xulrunner-1.9.2.4.source.tar.bz2 diff --git a/sources b/sources index 693817a..0af57e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5e4541ab23084b7b14ba228291ce2688 xulrunner-1.9.2.3.source.tar.bz2 +66b1610362ed6009d66fe762645679a0 xulrunner-1.9.2.4.source.tar.bz2 diff --git a/xulrunner-mozconfig-debuginfo b/xulrunner-mozconfig-debuginfo new file mode 100644 index 0000000..a0ef07a --- /dev/null +++ b/xulrunner-mozconfig-debuginfo @@ -0,0 +1,5 @@ +# For mozilla's debuginfo: +export CFLAGS="-gstabs+" +export CXXFLAGS="-gstabs+" +export MOZ_DEBUG_SYMBOLS=1 +ac_add_options --enable-crashreporter diff --git a/xulrunner.spec b/xulrunner.spec index f36ba94..409ff7b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -5,6 +5,7 @@ %define freetype_version 2.1.9 %define sqlite_version 3.6.16 %define tarballdir mozilla-1.9.2 +%define include_debuginfo 0 # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -14,14 +15,15 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.2.3 -Release: 2%{?pretag}%{?dist} +Version: 1.9.2.4 +Release: 1%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet # You can get sources at ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pretag}/source Source0: %{name}-%{version}%{?pretag}.source.tar.bz2 Source10: %{name}-mozconfig +Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in Source23: %{name}.1 @@ -144,6 +146,9 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig +%if %{include_debuginfo} +%{__cat} %{SOURCE11} >> .mozconfig +%endif #--------------------------------------------------------------------- @@ -181,6 +186,12 @@ MOZ_SMP_FLAGS=-j1 export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}" make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" +# create debuginfo for crash-stats.mozilla.com +%if %{include_debuginfo} +#cd %{moz_objdir} +make buildsymbols +%endif + #--------------------------------------------------------------------- %install @@ -338,6 +349,13 @@ ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}${MOZ_APP_DIR}/dictionaries touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/compreg.dat touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/xpti.dat +# Add debuginfo for crash-stats.mozilla.com +%if %{include_debuginfo} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} +cp dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT/%{_libdir}/debug%{mozappdir} +#cp %{moz_objdir}/mozilla/dist/firefox-%{version}.en-US.linux-i686.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} +%endif + #--------------------------------------------------------------------- %clean @@ -396,6 +414,13 @@ fi %exclude %{mozappdir}/update.locale %exclude %{mozappdir}/components/components.list +%if %{include_debuginfo} +%{mozappdir}/crashreporter +%{mozappdir}/crashreporter.ini +%{mozappdir}/Throbber-small.gif +%{mozappdir}/plugin-container +%endif + %files devel %defattr(-,root,root,-) %dir %{_libdir}/%{name}-sdk-* @@ -414,6 +439,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 22 2010 Jan Horak - 1.9.2.4-1 +- Update to 1.9.2.4 + * Tue Jun 15 2010 Dan Horák 1.9.2.3-2 - Fixed build on s390 From dde269bd460d05c4b75b549aea6899322f9a7fe9 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 22 Jun 2010 16:51:14 +0000 Subject: [PATCH 053/486] Fix build --- nspr-build.patch | 35 +++++++++++++++++++++++++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 nspr-build.patch diff --git a/nspr-build.patch b/nspr-build.patch new file mode 100644 index 0000000..fe7cc1b --- /dev/null +++ b/nspr-build.patch @@ -0,0 +1,35 @@ +diff --git a/ipc/chromium/src/base/basictypes.h b/ipc/chromium/src/base/basictypes.h +--- a/ipc/chromium/src/base/basictypes.h ++++ b/ipc/chromium/src/base/basictypes.h +@@ -14,29 +14,29 @@ + #error You_must_include_basictypes.h_before_prtypes.h! + #endif + + #ifndef NO_NSPR_10_SUPPORT + #define NO_NSPR_10_SUPPORT + #define NO_NSPR_10_SUPPORT_SAVE + #endif + +-#include "nspr/prtypes.h" ++#include "prtypes.h" + + #ifdef NO_NSPR_10_SUPPORT_SAVE + #undef NO_NSPR_10_SUPPORT_SAVE + #undef NO_NSPR_10_SUPPORT + #endif + + #ifdef _WIN32 + #undef _WIN32 + #define _WIN32_SAVE + #endif + +-#include "nspr/obsolete/protypes.h" ++#include "obsolete/protypes.h" + + #define _INT32 + #define _UINT32 + + #ifdef _WIN32_SAVE + #undef _WIN32_SAVE + #define _WIN32 + #endif diff --git a/xulrunner.spec b/xulrunner.spec index 409ff7b..bbcc194 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -38,6 +38,7 @@ Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch Patch9: mozilla-build-sbrk.patch Patch10: mozilla-build-s390.patch +Patch11: nspr-build.patch # Fedora specific patches Patch20: mozilla-192-pkgconfig.patch @@ -138,6 +139,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %ifarch s390 %patch10 -p1 -b .s390 %endif +%patch11 -p1 -b .nspr %patch20 -p1 -b .pk From dd606e5290189cc88d65b5113e8e2ec623c93fd2 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 22 Jun 2010 20:32:23 +0000 Subject: [PATCH 054/486] added missing plugin-container --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index bbcc194..352f878 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -410,6 +410,7 @@ fi %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf +%{mozappdir}/plugin-container # XXX See if these are needed still %{mozappdir}/updater* From 2e4996010e3ba012b7564e4e0a0085521eb59f31 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 22 Jun 2010 20:41:22 +0000 Subject: [PATCH 055/486] Update to 1.9.1.10 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 81c9cfb..3154cde 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ xulrunner-1.9.1.9.source.tar.bz2 +xulrunner-1.9.1.10.source.tar.bz2 diff --git a/sources b/sources index 58852da..1f73516 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e88edeff88efe2eeb718b184fe5295f8 xulrunner-1.9.1.9.source.tar.bz2 +38527ad16be09eb932b659df9ab3fb82 xulrunner-1.9.1.10.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index d4e10c2..a959a56 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -14,8 +14,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.9 -Release: 3%{?dist} +Version: 1.9.1.10 +Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -483,6 +483,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 22 2010 Jan Horak - 1.9.1.10-1 +- Update to 1.9.1.10 + * Mon May 17 2010 Martin Stransky - 1.9.1.9-3 - Added fix for mozbz#499295 From fea01e39baf40edae6ad981e5c90a758043d0397 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 30 Jun 2010 14:01:16 +0000 Subject: [PATCH 056/486] Update to 1.9.2.6 --- .cvsignore | 4 +--- sources | 2 +- xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 90ada15..7413fd0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1 @@ -xulrunner-1.9.2.2.source.tar.bz2 -xulrunner-1.9.2.3.source.tar.bz2 -xulrunner-1.9.2.4.source.tar.bz2 +xulrunner-1.9.2.6.source.tar.bz2 diff --git a/sources b/sources index 0af57e7..8681f0d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -66b1610362ed6009d66fe762645679a0 xulrunner-1.9.2.4.source.tar.bz2 +c9a071b31bb90d05edfb93117d0a7537 xulrunner-1.9.2.6.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 352f878..b9cc6c1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.2.4 +Version: 1.9.2.6 Release: 1%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -442,6 +442,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 30 2010 Jan Horak - 1.9.2.6-1 +- Update to 1.9.2.6 + * Tue Jun 22 2010 Jan Horak - 1.9.2.4-1 - Update to 1.9.2.4 From 0405a154def3d74adf69877bf095c53bc7b8f604 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Jul 2010 09:45:36 +0000 Subject: [PATCH 057/486] Disabled oopp on unsupported arches (rhbz#614363) --- xulrunner.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index b9cc6c1..b643115 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,3 +1,10 @@ +# Separated plugins are supported on x86(64) only +%ifarch i386 x86_64 +%define separated_plugins 1 +%else +%define separated_plugins 0 +%endif + # Minimal required versions %define nspr_version 4.8 %define nss_version 3.12.6 @@ -16,7 +23,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.2.6 -Release: 1%{?pretag}%{?dist} +Release: 2%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -152,6 +159,10 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %{__cat} %{SOURCE11} >> .mozconfig %endif +%if !%{?separated_plugins} +echo "ac_add_options --disable-ipc" >> .mozconfig +%endif + #--------------------------------------------------------------------- %build @@ -411,6 +422,9 @@ fi %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %{mozappdir}/plugin-container +%if %{?separated_plugins} +%{mozappdir}/plugin-container +%endif # XXX See if these are needed still %{mozappdir}/updater* @@ -442,6 +456,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 1 2010 Martin Stransky 1.9.2.6-2 +- Disabled oopp on unsupported arches (rhbz#614363) + * Wed Jun 30 2010 Jan Horak - 1.9.2.6-1 - Update to 1.9.2.6 From 8e6ccb07c31739e8afb8c92d0c221aab66c3e599 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Jul 2010 09:46:19 +0000 Subject: [PATCH 058/486] Disabled oopp on unsupported arches (rhbz#614363) --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index b643115..46bd65a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -456,7 +456,7 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Jun 1 2010 Martin Stransky 1.9.2.6-2 +* Wed Jul 1 2010 Martin Stransky 1.9.2.6-2 - Disabled oopp on unsupported arches (rhbz#614363) * Wed Jun 30 2010 Jan Horak - 1.9.2.6-1 From a6a827cee239210dfe90de02de86c630cef171c5 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Jul 2010 11:34:13 +0000 Subject: [PATCH 059/486] removed plugin-container from default file list --- xulrunner.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 46bd65a..d630389 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -421,7 +421,6 @@ fi %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf -%{mozappdir}/plugin-container %if %{?separated_plugins} %{mozappdir}/plugin-container %endif From de30b8278b87519b99d7abed1b4132211c805284 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Jul 2010 11:43:52 +0000 Subject: [PATCH 060/486] removed plugin-container from mozilla debug info packages --- xulrunner.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index d630389..bd3f1db 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -434,7 +434,6 @@ fi %{mozappdir}/crashreporter %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif -%{mozappdir}/plugin-container %endif %files devel From a77749b4663b9b75d269eab3728585c412c34940 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 14 Jul 2010 11:56:35 +0000 Subject: [PATCH 061/486] Rename of confusing include_debuginfo variable to enable_mozilla_crashreporter --- xulrunner.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index bd3f1db..9dbd29d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -12,7 +12,7 @@ %define freetype_version 2.1.9 %define sqlite_version 3.6.16 %define tarballdir mozilla-1.9.2 -%define include_debuginfo 0 +%define enable_mozilla_crashreporter 0 # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -155,7 +155,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig -%if %{include_debuginfo} +%if %{enable_mozilla_crashreporter} %{__cat} %{SOURCE11} >> .mozconfig %endif @@ -200,7 +200,7 @@ export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}" make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" # create debuginfo for crash-stats.mozilla.com -%if %{include_debuginfo} +%if %{enable_mozilla_crashreporter} #cd %{moz_objdir} make buildsymbols %endif @@ -363,7 +363,7 @@ touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/compreg.dat touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/xpti.dat # Add debuginfo for crash-stats.mozilla.com -%if %{include_debuginfo} +%if %{enable_mozilla_crashreporter} mkdir -p $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} cp dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT/%{_libdir}/debug%{mozappdir} #cp %{moz_objdir}/mozilla/dist/firefox-%{version}.en-US.linux-i686.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} @@ -430,7 +430,7 @@ fi %exclude %{mozappdir}/update.locale %exclude %{mozappdir}/components/components.list -%if %{include_debuginfo} +%if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif From 89e2bece8d57aa5a170762adc76c736f88dbe7d9 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 20 Jul 2010 10:38:20 +0000 Subject: [PATCH 062/486] Update to 1.9.1.11 --- .cvsignore | 1 + sources | 2 +- xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3154cde..020fc01 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ xulrunner-1.9.1.9.source.tar.bz2 xulrunner-1.9.1.10.source.tar.bz2 +xulrunner-1.9.1.11.source.tar.bz2 diff --git a/sources b/sources index 1f73516..f80c8c6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -38527ad16be09eb932b659df9ab3fb82 xulrunner-1.9.1.10.source.tar.bz2 +be1b607d3f610d6c07322859b65ed494 xulrunner-1.9.1.11.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index a959a56..4d70fae 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -14,7 +14,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.10 +Version: 1.9.1.11 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -483,6 +483,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 20 2010 Jan Horak - 1.9.1.11-1 +- Update to 1.9.1.11 + * Tue Jun 22 2010 Jan Horak - 1.9.1.10-1 - Update to 1.9.1.10 From 37235a9b02be18fb359fb8ddafa8fc4e6c13f6f5 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 20 Jul 2010 10:49:26 +0000 Subject: [PATCH 063/486] Removed already included patch --- mozilla-499295.patch | 20 -------------------- xulrunner.spec | 2 -- 2 files changed, 22 deletions(-) delete mode 100644 mozilla-499295.patch diff --git a/mozilla-499295.patch b/mozilla-499295.patch deleted file mode 100644 index d95b234..0000000 --- a/mozilla-499295.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: timeless@mozdev.org - -Bug 499295 NULL crash [@ nsPluginInstancePeerImpl::GetJSContext] -r=jst sr=jst - -diff --git a/modules/plugin/base/src/nsPluginInstancePeer.cpp b/modules/plugin/base/src/nsPluginInstancePeer.cpp ---- a/modules/plugin/base/src/nsPluginInstancePeer.cpp -+++ b/modules/plugin/base/src/nsPluginInstancePeer.cpp -@@ -689,8 +689,10 @@ nsPluginInstancePeerImpl::GetJSContext(J - { - *outContext = NULL; - nsresult rv = NS_ERROR_FAILURE; -+ if (!mOwner) -+ return rv; -+ - nsCOMPtr document; -- - rv = mOwner->GetDocument(getter_AddRefs(document)); - - if (NS_SUCCEEDED(rv) && document) { diff --git a/xulrunner.spec b/xulrunner.spec index 4d70fae..47d1e5b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -34,7 +34,6 @@ Patch4: mozilla-about-firefox-version.patch Patch5: xulrunner-gtk-include.patch Patch6: mozilla-libnotify.patch Patch7: mozilla-516124.patch -Patch8: mozilla-499295.patch # Fedora specific patches Patch10: mozilla-191-pkgconfig.patch @@ -163,7 +162,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch5 -p1 -b .gtk-include %patch6 -p1 -b .libnotify %patch7 -p1 -b .516124 -%patch8 -p1 -b .499295 %patch10 -p1 -b .pk From 5de954de807f590594f5a66a68564afd7b7e3e1b Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 20 Jul 2010 10:50:31 +0000 Subject: [PATCH 064/486] Update to 1.9.2.7 --- .cvsignore | 2 +- nspr-build.patch | 35 ----------------------------------- sources | 2 +- xulrunner.spec | 11 +++++------ 4 files changed, 7 insertions(+), 43 deletions(-) delete mode 100644 nspr-build.patch diff --git a/.cvsignore b/.cvsignore index 7413fd0..04e5933 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -xulrunner-1.9.2.6.source.tar.bz2 +xulrunner-1.9.2.7.source.tar.bz2 diff --git a/nspr-build.patch b/nspr-build.patch deleted file mode 100644 index fe7cc1b..0000000 --- a/nspr-build.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/ipc/chromium/src/base/basictypes.h b/ipc/chromium/src/base/basictypes.h ---- a/ipc/chromium/src/base/basictypes.h -+++ b/ipc/chromium/src/base/basictypes.h -@@ -14,29 +14,29 @@ - #error You_must_include_basictypes.h_before_prtypes.h! - #endif - - #ifndef NO_NSPR_10_SUPPORT - #define NO_NSPR_10_SUPPORT - #define NO_NSPR_10_SUPPORT_SAVE - #endif - --#include "nspr/prtypes.h" -+#include "prtypes.h" - - #ifdef NO_NSPR_10_SUPPORT_SAVE - #undef NO_NSPR_10_SUPPORT_SAVE - #undef NO_NSPR_10_SUPPORT - #endif - - #ifdef _WIN32 - #undef _WIN32 - #define _WIN32_SAVE - #endif - --#include "nspr/obsolete/protypes.h" -+#include "obsolete/protypes.h" - - #define _INT32 - #define _UINT32 - - #ifdef _WIN32_SAVE - #undef _WIN32_SAVE - #define _WIN32 - #endif diff --git a/sources b/sources index 8681f0d..9322d49 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c9a071b31bb90d05edfb93117d0a7537 xulrunner-1.9.2.6.source.tar.bz2 +e240541898766e44a407e543c70d4949 xulrunner-1.9.2.7.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 9dbd29d..ea38831 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -22,8 +22,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.2.6 -Release: 2%{?pretag}%{?dist} +Version: 1.9.2.7 +Release: 1%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -40,12 +40,10 @@ Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch3: mozilla-jemalloc.patch Patch4: mozilla-about-firefox-version.patch -Patch5: mozilla-jemalloc-526152.patch Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch Patch9: mozilla-build-sbrk.patch Patch10: mozilla-build-s390.patch -Patch11: nspr-build.patch # Fedora specific patches Patch20: mozilla-192-pkgconfig.patch @@ -139,14 +137,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch1 -p1 -b .build %patch3 -p1 -b .jemalloc %patch4 -p1 -b .about-firefox-version -%patch5 -p1 -b .jemalloc-526152 %patch7 -p2 -b .del %patch8 -p1 -b .plugin %patch9 -p2 -b .sbrk %ifarch s390 %patch10 -p1 -b .s390 %endif -%patch11 -p1 -b .nspr %patch20 -p1 -b .pk @@ -454,6 +450,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 20 2010 Jan Horak - 1.9.2.7-1 +- Update to 1.9.2.7 + * Wed Jul 1 2010 Martin Stransky 1.9.2.6-2 - Disabled oopp on unsupported arches (rhbz#614363) From 4a082d36fb2c5e296c2655c6eea5a9ad40f3645b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 22 Jul 2010 10:50:26 +0000 Subject: [PATCH 065/486] Added build fix for libjpeg-turbo, enabled oopp for i686 --- mozilla-libjpeg-turbo.patch | 54 +++++++++++++++++++++++++++++++++++++ xulrunner.spec | 4 ++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 mozilla-libjpeg-turbo.patch diff --git a/mozilla-libjpeg-turbo.patch b/mozilla-libjpeg-turbo.patch new file mode 100644 index 0000000..0016a51 --- /dev/null +++ b/mozilla-libjpeg-turbo.patch @@ -0,0 +1,54 @@ +diff -up xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.old xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp +--- xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.old 2010-07-13 21:10:28.000000000 +0200 ++++ xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp 2010-07-22 12:33:21.000000000 +0200 +@@ -57,19 +57,6 @@ + + extern "C" { + #include "iccjpeg.h" +- +-/* Colorspace conversion (copied from jpegint.h) */ +-struct jpeg_color_deconverter { +- JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); +- JMETHOD(void, color_convert, (j_decompress_ptr cinfo, +- JSAMPIMAGE input_buf, JDIMENSION input_row, +- JSAMPARRAY output_buf, int num_rows)); +-}; +- +-METHODDEF(void) +-ycc_rgb_convert_argb (j_decompress_ptr cinfo, +- JSAMPIMAGE input_buf, JDIMENSION input_row, +- JSAMPARRAY output_buf, int num_rows); + } + + NS_IMPL_ISUPPORTS1(nsJPEGDecoder, imgIDecoder) +@@ -514,14 +501,6 @@ nsresult nsJPEGDecoder::ProcessData(cons + return NS_OK; /* I/O suspension */ + } + +- /* Force to use our YCbCr to Packed RGB converter when possible */ +- if (!mTransform && (gfxPlatform::GetCMSMode() == eCMSMode_Off) && +- mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) { +- /* Special case for the most common case: transform from YCbCr direct into packed ARGB */ +- mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/ +- mInfo.cconvert->color_convert = ycc_rgb_convert_argb; +- } +- + /* If this is a progressive JPEG ... */ + mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; + } +@@ -678,15 +657,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s + PRUint32 *imageRow = ((PRUint32*)mImageData) + + (mInfo.output_scanline * mInfo.output_width); + +- if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) { +- /* Special case: scanline will be directly converted into packed ARGB */ +- if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) { +- *suspend = PR_TRUE; /* suspend */ +- break; +- } +- continue; /* all done for this row! */ +- } +- + JSAMPROW sampleRow = (JSAMPROW)imageRow; + if (mInfo.output_components == 3) { + /* Put the pixels at end of row to enable in-place expansion */ diff --git a/xulrunner.spec b/xulrunner.spec index ea38831..8abc8f4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,5 +1,5 @@ # Separated plugins are supported on x86(64) only -%ifarch i386 x86_64 +%ifarch i386 i686 x86_64 %define separated_plugins 1 %else %define separated_plugins 0 @@ -47,6 +47,7 @@ Patch10: mozilla-build-s390.patch # Fedora specific patches Patch20: mozilla-192-pkgconfig.patch +Patch21: mozilla-libjpeg-turbo.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch @@ -145,6 +146,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %endif %patch20 -p1 -b .pk +%patch21 -p2 -b .jpeg-turbo %patch100 -p1 -b .ps-pdf-simplify-operators From a580f0b2e09ad14b670c7dde12c84f5e8f6d92ca Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Fri, 23 Jul 2010 20:30:39 +0000 Subject: [PATCH 066/486] - Add patch for mozbz#575836 (1.9.1.12) --- mozilla-575836.patch | 35 +++++++++++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 mozilla-575836.patch diff --git a/mozilla-575836.patch b/mozilla-575836.patch new file mode 100644 index 0000000..5f21e7b --- /dev/null +++ b/mozilla-575836.patch @@ -0,0 +1,35 @@ +# HG changeset patch +# User Chris Jones +# Date 1279837785 14400 +# Node ID 2f748ad22bbbf50c47fb0783e8f948917f3e8990 +# Parent 3e8356d36728e61162b9d02b54676aef7b07f178 +Bug 575836: Fix logic here. r=jst r=josh a=beltzner + +diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp +--- a/layout/generic/nsObjectFrame.cpp ++++ b/layout/generic/nsObjectFrame.cpp +@@ -3144,9 +3144,10 @@ nsresult nsPluginInstanceOwner::EnsureCa + // to the bottom of the array if there isn't already a "src" specified. + PRUint16 numRealAttrs = mNumCachedAttrs; + nsAutoString data; +- if (mContent->Tag() == nsGkAtoms::object +- && !mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src) +- && mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data)) { ++ if (mContent->Tag() == nsGkAtoms::object && ++ !mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src) && ++ mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data) && ++ !data.IsEmpty()) { + mNumCachedAttrs++; + } + +@@ -3194,7 +3195,7 @@ nsresult nsPluginInstanceOwner::EnsureCa + } + + // if the conditions above were met, copy the "data" attribute to a "src" array entry +- if (data.Length()) { ++ if (!data.IsEmpty()) { + mCachedAttrParamNames [nextAttrParamIndex] = ToNewUTF8String(NS_LITERAL_STRING("SRC")); + mCachedAttrParamValues[nextAttrParamIndex] = ToNewUTF8String(data); + nextAttrParamIndex++; + + diff --git a/xulrunner.spec b/xulrunner.spec index 47d1e5b..76a3443 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -15,7 +15,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.1.11 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -41,6 +41,7 @@ Patch10: mozilla-191-pkgconfig.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch Patch101: xulrunner-1.9.1-sparc-linux-sync_instruction_memory.patch +Patch102: mozilla-575836.patch # --------------------------------------------------- @@ -167,6 +168,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch100 -p1 -b .ps-pdf-simplify-operators %patch101 -p2 -b .sparc-linux-sync_instruction_memory +%patch102 -p1 -b .575837 %{__rm} -f .mozconfig @@ -481,6 +483,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 23 2010 Christopher Aillon - 1.9.1.11-2 +- Add patch for mozbz#575836 (1.9.1.12) + * Tue Jul 20 2010 Jan Horak - 1.9.1.11-1 - Update to 1.9.1.11 From ec1deb2241c34ec86885236add6942a8986bc293 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 16:15:37 +0000 Subject: [PATCH 067/486] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 513ebfd..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: xulrunner -# $Id: Makefile,v 1.1 2007/06/22 02:18:59 kevin Exp $ -NAME := xulrunner -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 06de2d2..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-12 From 23a7da5a28f8ea1e4c3f51a82761618ab27f317e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 16:15:53 +0000 Subject: [PATCH 068/486] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 513ebfd..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: xulrunner -# $Id: Makefile,v 1.1 2007/06/22 02:18:59 kevin Exp $ -NAME := xulrunner -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From ddf59ad53903504f7b76cfba88c3494e7640c7e9 Mon Sep 17 00:00:00 2001 From: komat Date: Mon, 16 Aug 2010 12:19:31 +0200 Subject: [PATCH 069/486] Update to 1.9.3.1 beta 3 --- .gitignore | 1 + mozilla-193-pkgconfig.patch | 73 +++++++++++++++++++++++++++++++++++++ mozilla-build.patch | 22 +++++------ mozilla-libjpeg-turbo.patch | 14 +++---- sources | 2 +- xulrunner.spec | 27 ++++++++------ 6 files changed, 108 insertions(+), 31 deletions(-) create mode 100644 mozilla-193-pkgconfig.patch diff --git a/.gitignore b/.gitignore index 04e5933..a6e78cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ xulrunner-1.9.2.7.source.tar.bz2 +xulrunner-1.9.3.0b3.source.tar.bz2 diff --git a/mozilla-193-pkgconfig.patch b/mozilla-193-pkgconfig.patch new file mode 100644 index 0000000..c17c89b --- /dev/null +++ b/mozilla-193-pkgconfig.patch @@ -0,0 +1,73 @@ +diff -up xulrunner-1.9.3.0/mozilla-central/config/autoconf.mk.in.pk xulrunner-1.9.3.0/mozilla-central/config/autoconf.mk.in +--- xulrunner-1.9.3.0/mozilla-central/config/autoconf.mk.in.pk 2010-08-06 03:09:27.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/config/autoconf.mk.in 2010-08-16 11:07:52.000000000 +0200 +@@ -58,14 +58,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ +-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++includedir = @includedir@/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) + libdir = @libdir@ + datadir = @datadir@ + mandir = @mandir@ +-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++idldir = $(datadir)/idl/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) + + installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) ++sdkdir = $(libdir)/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) + + DIST = $(DEPTH)/dist + LIBXUL_SDK = @LIBXUL_SDK@ +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in 2010-08-16 11:12:32.000000000 +0200 +@@ -6,5 +6,6 @@ idldir=%idldir% + Name: libxul-embedding + Description: Static library for version-independent embedding of the Mozilla runtime + Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% + Libs: -L${sdkdir}/lib -lxpcomglue -ldl + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in 2010-08-16 11:07:52.000000000 +0200 +@@ -2,6 +2,7 @@ prefix=%prefix% + sdkdir=%sdkdir% + includedir=%includedir% + idldir=%idldir% ++libdir=%libdir% + + Name: libxul + Description: The Mozilla Runtime and Embedding Engine +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk 2010-08-16 11:07:52.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in 2010-08-16 11:07:52.000000000 +0200 +@@ -116,6 +116,7 @@ endif + -e "s|%includedir%|$(includedir)|" \ + -e "s|%idldir%|$(idldir)|" \ + -e "s|%sdkdir%|$(sdkdir)|" \ ++ -e "s|%libdir%|$(installdir)|" \ + -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ + -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2010-08-16 11:07:52.000000000 +0200 +@@ -1,5 +1,6 @@ + prefix=%prefix% + sdkdir=%sdkdir% ++libdir=%libdir% + includedir=%includedir% + + Name: mozilla-gtkembedmoz +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed.pc.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed.pc.in 2010-08-16 11:07:52.000000000 +0200 +@@ -1,5 +1,6 @@ + prefix=%prefix% + sdkdir=%sdkdir% ++libdir=%libdir% + includedir=%includedir% + + Name: mozilla-gtkembedmoz diff --git a/mozilla-build.patch b/mozilla-build.patch index a956e5f..065ca9f 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,18 +1,18 @@ -diff -up mozilla/security/manager/Makefile.in.old mozilla/security/manager/Makefile.in ---- mozilla/security/manager/Makefile.in.old 2007-10-25 00:25:30.000000000 +0200 -+++ mozilla/security/manager/Makefile.in 2007-11-06 10:57:39.000000000 +0100 -@@ -153,7 +153,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in +--- xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build 2010-08-06 03:09:27.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in 2010-08-16 10:49:10.000000000 +0200 +@@ -181,7 +181,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 -DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1 - ifdef NSS_DISABLE_DBM - DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1 - endif -diff -up mozilla/security/manager/ssl/src/Makefile.in.old mozilla/security/manager/ssl/src/Makefile.in ---- mozilla/security/manager/ssl/src/Makefile.in.old 2007-10-19 21:16:36.000000000 +0200 -+++ mozilla/security/manager/ssl/src/Makefile.in 2007-11-06 10:57:52.000000000 +0100 -@@ -134,8 +134,6 @@ REQUIRES = nspr \ + DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" + ifndef MOZ_NATIVE_SQLITE + DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3 +diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in.build xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in +--- xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in.build 2010-08-06 03:09:17.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in 2010-08-16 10:46:22.000000000 +0200 +@@ -113,8 +113,6 @@ CSRCS += md4.c EXTRA_DEPS = $(NSS_DEP_LIBS) diff --git a/mozilla-libjpeg-turbo.patch b/mozilla-libjpeg-turbo.patch index 0016a51..9abd0e9 100644 --- a/mozilla-libjpeg-turbo.patch +++ b/mozilla-libjpeg-turbo.patch @@ -1,7 +1,7 @@ -diff -up xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.old xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp ---- xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.old 2010-07-13 21:10:28.000000000 +0200 -+++ xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp 2010-07-22 12:33:21.000000000 +0200 -@@ -57,19 +57,6 @@ +diff -up xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.jpeg-turbo xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp +--- xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.jpeg-turbo 2010-08-06 03:09:15.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp 2010-08-16 11:19:17.000000000 +0200 +@@ -58,19 +58,6 @@ extern "C" { #include "iccjpeg.h" @@ -21,12 +21,12 @@ diff -up xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDec } NS_IMPL_ISUPPORTS1(nsJPEGDecoder, imgIDecoder) -@@ -514,14 +501,6 @@ nsresult nsJPEGDecoder::ProcessData(cons +@@ -443,14 +430,6 @@ nsresult nsJPEGDecoder::Write(const char return NS_OK; /* I/O suspension */ } - /* Force to use our YCbCr to Packed RGB converter when possible */ -- if (!mTransform && (gfxPlatform::GetCMSMode() == eCMSMode_Off) && +- if (!mTransform && (gfxPlatform::GetCMSMode() != eCMSMode_All) && - mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) { - /* Special case for the most common case: transform from YCbCr direct into packed ARGB */ - mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/ @@ -36,7 +36,7 @@ diff -up xulrunner-1.9.2.7/mozilla-1.9.2/modules/libpr0n/decoders/jpeg/nsJPEGDec /* If this is a progressive JPEG ... */ mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; } -@@ -678,15 +657,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s +@@ -616,15 +595,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s PRUint32 *imageRow = ((PRUint32*)mImageData) + (mInfo.output_scanline * mInfo.output_width); diff --git a/sources b/sources index 9322d49..d4c1f5b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e240541898766e44a407e543c70d4949 xulrunner-1.9.2.7.source.tar.bz2 +e891608090dd32fd0944f6b363f62d87 xulrunner-1.9.3.0b3.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 8abc8f4..e71f380 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,19 +11,20 @@ %define cairo_version 1.6.0 %define freetype_version 2.1.9 %define sqlite_version 3.6.16 -%define tarballdir mozilla-1.9.2 +%define tarballdir mozilla-central %define enable_mozilla_crashreporter 0 # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) -%define version_internal 1.9.2 +%define version_internal 1.9.3 %define mozappdir %{_libdir}/%{name}-%{version_internal} +%define pretag b3 Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.2.7 -Release: 1%{?pretag}%{?dist} +Version: 1.9.3.0 +Release: 0%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -46,7 +47,7 @@ Patch9: mozilla-build-sbrk.patch Patch10: mozilla-build-s390.patch # Fedora specific patches -Patch20: mozilla-192-pkgconfig.patch +Patch20: mozilla-193-pkgconfig.patch Patch21: mozilla-libjpeg-turbo.patch # Upstream patches @@ -135,21 +136,20 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ > version.patch %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch -%patch1 -p1 -b .build -%patch3 -p1 -b .jemalloc +%patch1 -p2 -b .build +#%patch3 -p1 -b .jemalloc %patch4 -p1 -b .about-firefox-version %patch7 -p2 -b .del -%patch8 -p1 -b .plugin -%patch9 -p2 -b .sbrk +#%patch8 -p1 -b .plugin +#%patch9 -p2 -b .sbrk %ifarch s390 %patch10 -p1 -b .s390 %endif -%patch20 -p1 -b .pk +%patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo -%patch100 -p1 -b .ps-pdf-simplify-operators - +#%patch100 -p1 -b .ps-pdf-simplify-operators %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -452,6 +452,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 16 2010 Martin Stransky 1.9.3.0-0.b3 +- Update to 1.9.3.1 beta 3 + * Tue Jul 20 2010 Jan Horak - 1.9.2.7-1 - Update to 1.9.2.7 From fb715a2d34c975c6288913b5b8bf0785e631090f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Aug 2010 10:20:07 +0200 Subject: [PATCH 070/486] disabled system sqlite --- xulrunner-mozconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 8c42114..36bebb0 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -11,7 +11,7 @@ ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --enable-system-hunspell -ac_add_options --enable-system-sqlite +ac_add_options --disable-system-sqlite ac_add_options --enable-system-cairo ac_add_options --with-pthreads ac_add_options --disable-strip From f09aaf443c40f005f851becddc71d38c9a3fd949 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Aug 2010 10:51:04 +0200 Subject: [PATCH 071/486] added requires --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index e71f380..0a61c9d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -80,6 +80,7 @@ BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel BuildRequires: autoconf213 +BuildRequires: mesa-libGL-devel Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} From 75d7c0abb879d4c98ade300df2c096e69616cd0c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Aug 2010 11:20:15 +0200 Subject: [PATCH 072/486] added patch --- mozilla-malloc.patch | 12 ++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 mozilla-malloc.patch diff --git a/mozilla-malloc.patch b/mozilla-malloc.patch new file mode 100644 index 0000000..fd71e95 --- /dev/null +++ b/mozilla-malloc.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h.old xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h +--- xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h.old 2010-08-06 03:09:14.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h 2010-08-17 11:15:40.000000000 +0200 +@@ -214,7 +214,7 @@ MOZALLOC_EXPORT void* moz_valloc(size_t + #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw() + #endif + +-#ifdef MOZ_CPP_EXCEPTIONS ++#ifdef 1 + #define MOZALLOC_THROW_BAD_ALLOC throw(std::bad_alloc) + #else + #define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_IF_HAS_EXCEPTIONS diff --git a/xulrunner.spec b/xulrunner.spec index 0a61c9d..f5fecc3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -45,6 +45,7 @@ Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch Patch9: mozilla-build-sbrk.patch Patch10: mozilla-build-s390.patch +Patch11: mozilla-malloc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -146,6 +147,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %ifarch s390 %patch10 -p1 -b .s390 %endif +%patch11 -p2 -b .malloc %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo From 834d19266d0d47c81b30a0d20b2cf11d43819a14 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Aug 2010 11:42:58 +0200 Subject: [PATCH 073/486] build fix --- mozilla-malloc.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla-malloc.patch b/mozilla-malloc.patch index fd71e95..ffb4e53 100644 --- a/mozilla-malloc.patch +++ b/mozilla-malloc.patch @@ -6,7 +6,7 @@ diff -up xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h.old xulrun #endif -#ifdef MOZ_CPP_EXCEPTIONS -+#ifdef 1 ++#if 1 #define MOZALLOC_THROW_BAD_ALLOC throw(std::bad_alloc) #else #define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_IF_HAS_EXCEPTIONS From 33fcc16fa7be4126ab8671fd505242f9513766ae Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Aug 2010 15:20:12 +0200 Subject: [PATCH 074/486] disable C++ exceptions --- xulrunner-mozconfig | 1 + xulrunner.spec | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 36bebb0..f7e97ed 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -31,6 +31,7 @@ ac_add_options --enable-extensions=default ac_add_options --enable-libnotify ac_add_options --disable-necko-wifi ac_add_options --enable-startup-notification +ac_add_options --disable-cpp-exceptions export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index f5fecc3..efee30d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -183,7 +183,8 @@ MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} # Mozilla builds with -Wall with exception of a few warnings which show up # everywhere in the code; so, don't override that. -MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//') +# and disable C++ exceptions +MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions//') export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS From 57a669ab9d737acc2dba0e679ceb32e74c6d1281 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 27 Aug 2010 14:18:27 +0200 Subject: [PATCH 075/486] Update nss version --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index efee30d..f013cb0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -7,7 +7,7 @@ # Minimal required versions %define nspr_version 4.8 -%define nss_version 3.12.6 +%define nss_version 3.12.7 %define cairo_version 1.6.0 %define freetype_version 2.1.9 %define sqlite_version 3.6.16 From 626dcddfafb062779fd66275bb8c2db6b82e7190 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 27 Aug 2010 16:40:37 +0200 Subject: [PATCH 076/486] Update to 1.9.3.1 beta 4 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a6e78cd..e5c1826 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ xulrunner-1.9.2.7.source.tar.bz2 xulrunner-1.9.3.0b3.source.tar.bz2 +/xulrunner-1.9.3.0b4.source.tar.bz2 diff --git a/sources b/sources index d4c1f5b..ad232cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e891608090dd32fd0944f6b363f62d87 xulrunner-1.9.3.0b3.source.tar.bz2 +8084d2b273e8c9fb444acd99e51ea904 xulrunner-1.9.3.0b4.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index f013cb0..942990f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -19,12 +19,12 @@ %define version_internal 1.9.3 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b3 +%define pretag b4 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.3.0 -Release: 0%{?pretag}%{?dist} +Release: 0.1%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -456,6 +456,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Aug 27 2010 Martin Stransky 1.9.3.0-0.1.b4 +- Update to 1.9.3.1 beta 4 + * Mon Aug 16 2010 Martin Stransky 1.9.3.0-0.b3 - Update to 1.9.3.1 beta 3 From 017823b903a786e1f8ca4c5e60a464f28f042f23 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 27 Aug 2010 16:55:16 +0200 Subject: [PATCH 077/486] Update to 1.9.3.1 beta 4 --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 942990f..8559c6e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -82,6 +82,7 @@ BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel BuildRequires: autoconf213 BuildRequires: mesa-libGL-devel +BuildRequires: yasm Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} From 4005251e1680634456345adbf801318cd8062738 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 30 Aug 2010 10:33:09 +0200 Subject: [PATCH 078/486] spec fix --- xulrunner.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 8559c6e..af1f7f9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -227,8 +227,6 @@ DESTDIR=$RPM_BUILD_ROOT make install %{__mkdir_p} $RPM_BUILD_ROOT/${MOZ_APP_DIR} \ $RPM_BUILD_ROOT%{_datadir}/idl/${INTERNAL_APP_SDK_NAME} \ $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_SDK_NAME} -%{__install} -p dist/sdk/bin/regxpcom $RPM_BUILD_ROOT/$MOZ_APP_DIR - %{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications} # set up our default preferences @@ -417,7 +415,6 @@ fi %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh -%{mozappdir}/regxpcom %{mozappdir}/xulrunner %{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub From fcf3da7301e0d37fa1887405a1237313e9ef6839 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 30 Aug 2010 11:18:07 +0200 Subject: [PATCH 079/486] spec fix --- xulrunner.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index af1f7f9..c80b1f0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -406,7 +406,6 @@ fi %{mozappdir}/components/*.xpt %attr(644, root, root) %{mozappdir}/components/*.js %{mozappdir}/defaults -%{mozappdir}/greprefs %dir %{mozappdir}/icons %attr(644, root, root) %{mozappdir}/icons/* %{mozappdir}/modules @@ -428,7 +427,6 @@ fi # XXX See if these are needed still %{mozappdir}/updater* %exclude %{mozappdir}/update.locale -%exclude %{mozappdir}/components/components.list %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter From b15b5c462cec93b06ffb17f2c5196b86b5af54a8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 30 Aug 2010 11:50:33 +0200 Subject: [PATCH 080/486] spec fix --- xulrunner.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index c80b1f0..984eb1c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -398,12 +398,14 @@ fi %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.txt %{mozappdir}/chrome +%{mozappdir}/chrome.manifest %{mozappdir}/dictionaries %dir %{mozappdir}/components %ghost %{mozappdir}/components/compreg.dat %ghost %{mozappdir}/components/xpti.dat %{mozappdir}/components/*.so %{mozappdir}/components/*.xpt +%{mozappdir}/components/*.manifest %attr(644, root, root) %{mozappdir}/components/*.js %{mozappdir}/defaults %dir %{mozappdir}/icons @@ -419,6 +421,7 @@ fi %{mozappdir}/xulrunner-stub %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list +%{mozappdir}/greprefs.js %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %if %{?separated_plugins} %{mozappdir}/plugin-container From 44c07e074a042e59fb97be880cf022901a59e7d9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 1 Sep 2010 11:14:08 +0200 Subject: [PATCH 081/486] temporary gcc flags fix --- xulrunner.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 984eb1c..387c904 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -186,8 +186,10 @@ MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} # everywhere in the code; so, don't override that. # and disable C++ exceptions MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions//') -export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS=$MOZ_OPT_FLAGS +# TODO - mozilla seems to use its own optimize config in Firefox 4, +# we need to figure how set our gcc flags properly. +#export CFLAGS=$MOZ_OPT_FLAGS +#export CXXFLAGS=$MOZ_OPT_FLAGS export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' From ec0aa7d4aa86ffd63c848df3b097d39b5ee3d005 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 7 Sep 2010 09:50:47 +0200 Subject: [PATCH 082/486] Update to 3.5.12 --- .gitignore | 2 ++ mozilla-575836.patch | 35 ----------------------------------- sources | 2 +- xulrunner.spec | 10 +++++----- 4 files changed, 8 insertions(+), 41 deletions(-) delete mode 100644 mozilla-575836.patch diff --git a/.gitignore b/.gitignore index 020fc01..f875a80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ xulrunner-1.9.1.9.source.tar.bz2 xulrunner-1.9.1.10.source.tar.bz2 xulrunner-1.9.1.11.source.tar.bz2 +/xulrunner-1.9.1.12.source.tag.bz2 +/xulrunner-1.9.1.12.source.tar.bz2 diff --git a/mozilla-575836.patch b/mozilla-575836.patch deleted file mode 100644 index 5f21e7b..0000000 --- a/mozilla-575836.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User Chris Jones -# Date 1279837785 14400 -# Node ID 2f748ad22bbbf50c47fb0783e8f948917f3e8990 -# Parent 3e8356d36728e61162b9d02b54676aef7b07f178 -Bug 575836: Fix logic here. r=jst r=josh a=beltzner - -diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp ---- a/layout/generic/nsObjectFrame.cpp -+++ b/layout/generic/nsObjectFrame.cpp -@@ -3144,9 +3144,10 @@ nsresult nsPluginInstanceOwner::EnsureCa - // to the bottom of the array if there isn't already a "src" specified. - PRUint16 numRealAttrs = mNumCachedAttrs; - nsAutoString data; -- if (mContent->Tag() == nsGkAtoms::object -- && !mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src) -- && mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data)) { -+ if (mContent->Tag() == nsGkAtoms::object && -+ !mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src) && -+ mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, data) && -+ !data.IsEmpty()) { - mNumCachedAttrs++; - } - -@@ -3194,7 +3195,7 @@ nsresult nsPluginInstanceOwner::EnsureCa - } - - // if the conditions above were met, copy the "data" attribute to a "src" array entry -- if (data.Length()) { -+ if (!data.IsEmpty()) { - mCachedAttrParamNames [nextAttrParamIndex] = ToNewUTF8String(NS_LITERAL_STRING("SRC")); - mCachedAttrParamValues[nextAttrParamIndex] = ToNewUTF8String(data); - nextAttrParamIndex++; - - diff --git a/sources b/sources index f80c8c6..6c2a41c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -be1b607d3f610d6c07322859b65ed494 xulrunner-1.9.1.11.source.tar.bz2 +bd1e27ef2494954dd920dede9165e9db xulrunner-1.9.1.12.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 76a3443..97a6715 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -14,8 +14,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.11 -Release: 2%{?dist} +Version: 1.9.1.12 +Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -41,7 +41,6 @@ Patch10: mozilla-191-pkgconfig.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch Patch101: xulrunner-1.9.1-sparc-linux-sync_instruction_memory.patch -Patch102: mozilla-575836.patch # --------------------------------------------------- @@ -168,8 +167,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch100 -p1 -b .ps-pdf-simplify-operators %patch101 -p2 -b .sparc-linux-sync_instruction_memory -%patch102 -p1 -b .575837 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -483,6 +480,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 6 2010 Jan Horak - 1.9.1.12-1 +- Update to 1.9.1.12 + * Fri Jul 23 2010 Christopher Aillon - 1.9.1.11-2 - Add patch for mozbz#575836 (1.9.1.12) From 1be133d4c7d1badce0d388e997fea9c0a376ae16 Mon Sep 17 00:00:00 2001 From: "Tom \"spot\" Callaway" Date: Tue, 7 Sep 2010 12:13:47 -0400 Subject: [PATCH 083/486] spec cleanups --- firefox4-jemalloc.patch | 22 ++++++++++++++++++++++ mozilla-build-sbrk.patch | 18 +++++++++--------- xulrunner-mozconfig | 3 ++- xulrunner.spec | 28 +++++++++++++--------------- 4 files changed, 46 insertions(+), 25 deletions(-) create mode 100644 firefox4-jemalloc.patch diff --git a/firefox4-jemalloc.patch b/firefox4-jemalloc.patch new file mode 100644 index 0000000..982483f --- /dev/null +++ b/firefox4-jemalloc.patch @@ -0,0 +1,22 @@ +diff -up mozilla-central/memory/jemalloc/jemalloc.h.jemalloc mozilla-central/memory/jemalloc/jemalloc.h +--- mozilla-central/memory/jemalloc/jemalloc.h.jemalloc 2010-08-18 15:21:10.000000000 -0400 ++++ mozilla-central/memory/jemalloc/jemalloc.h 2010-09-01 16:50:38.615946834 -0400 +@@ -42,12 +42,12 @@ extern const char *_malloc_options; + + /* Darwin and Linux already have memory allocation functions */ + #if (!defined(MOZ_MEMORY_DARWIN) && !defined(MOZ_MEMORY_LINUX)) +-void *malloc(size_t size); +-void *valloc(size_t size); +-void *calloc(size_t num, size_t size); +-void *realloc(void *ptr, size_t size); +-void free(void *ptr); +-int posix_memalign(void **memptr, size_t alignment, size_t size); ++void *malloc(size_t size) __THROW __attribute_malloc__ __wur; ++void *valloc(size_t size) __THROW __attribute_malloc__ __wur; ++void *calloc(size_t num, size_t size) __THROW __attribute_malloc__ __wur; ++void *realloc(void *ptr, size_t size) __THROW __attribute_malloc__ __wur; ++void free(void *ptr) __THROW __attribute_malloc__ __wur; ++int posix_memalign(void **memptr, size_t alignment, size_t size) __THROW __attribute_malloc__ __wur; + #endif /* MOZ_MEMORY_DARWIN, MOZ_MEMORY_LINUX */ + + #if defined(MOZ_MEMORY_ANDROID) || defined(WRAP_MALLOC) diff --git a/mozilla-build-sbrk.patch b/mozilla-build-sbrk.patch index e7e8773..7e8f8c9 100644 --- a/mozilla-build-sbrk.patch +++ b/mozilla-build-sbrk.patch @@ -1,19 +1,19 @@ -diff -up xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp.sbrk xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp ---- xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp.sbrk 2010-01-06 04:35:17.000000000 +0100 -+++ xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp 2010-01-13 21:49:33.000000000 +0100 -@@ -1119,7 +1119,7 @@ GC(JSContext *cx, uintN argc, jsval *vp) +diff -up xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp.sbrk xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp +--- xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp.sbrk 2010-07-20 20:52:15.000000000 -0400 ++++ xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp 2010-07-28 10:21:51.905606001 -0400 +@@ -1118,7 +1118,7 @@ GC(JSContext *cx, uintN argc, jsval *vp) char buf[256]; JS_snprintf(buf, sizeof(buf), "before %lu, after %lu, break %08lx\n", - (unsigned long)preBytes, (unsigned long)rt->gcBytes, + (unsigned long)preBytes, (unsigned long)cx->runtime->gcBytes, -#ifdef HAVE_SBRK +#if 0 (unsigned long)sbrk(0) #else 0 -diff -up xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp.sbrk xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp ---- xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp.sbrk 2010-01-06 04:35:19.000000000 +0100 -+++ xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp 2010-01-13 22:32:46.000000000 +0100 -@@ -543,7 +543,7 @@ GC(JSContext *cx, JSObject *obj, uintN a +diff -up xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp.sbrk xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp +--- xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp.sbrk 2010-07-20 20:52:20.000000000 -0400 ++++ xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp 2010-07-28 10:20:36.878606001 -0400 +@@ -540,7 +540,7 @@ GC(JSContext *cx, JSObject *obj, uintN a JS_GC(cx); fprintf(gOutFile, "before %lu, after %lu, break %08lx\n", (unsigned long)preBytes, (unsigned long)rt->gcBytes, diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index f7e97ed..fa47503 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -11,7 +11,7 @@ ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --enable-system-hunspell -ac_add_options --disable-system-sqlite +ac_add_options --enable-system-sqlite ac_add_options --enable-system-cairo ac_add_options --with-pthreads ac_add_options --disable-strip @@ -20,6 +20,7 @@ ac_add_options --disable-mochitest ac_add_options --disable-installer ac_add_options --disable-debug ac_add_options --enable-optimize +ac_add_options --enable-xinerama ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-pango ac_add_options --enable-svg diff --git a/xulrunner.spec b/xulrunner.spec index 387c904..4c64456 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -24,7 +24,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.3.0 -Release: 0.1%{?pretag}%{?dist} +Release: 0.2%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -39,7 +39,7 @@ Source23: %{name}.1 # build patches Patch0: xulrunner-version.patch Patch1: mozilla-build.patch -Patch3: mozilla-jemalloc.patch +Patch3: firefox4-jemalloc.patch Patch4: mozilla-about-firefox-version.patch Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch @@ -125,6 +125,7 @@ Requires: sqlite-devel Requires: startup-notification-devel Requires: alsa-lib-devel Requires: libnotify-devel +Requires: mesa-libGL-devel %description devel Gecko development files. @@ -140,11 +141,11 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch %patch1 -p2 -b .build -#%patch3 -p1 -b .jemalloc +%patch3 -p1 -b .jemalloc %patch4 -p1 -b .about-firefox-version %patch7 -p2 -b .del #%patch8 -p1 -b .plugin -#%patch9 -p2 -b .sbrk +%patch9 -p2 -b .sbrk %ifarch s390 %patch10 -p1 -b .s390 %endif @@ -185,11 +186,9 @@ MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} # Mozilla builds with -Wall with exception of a few warnings which show up # everywhere in the code; so, don't override that. # and disable C++ exceptions -MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions//') -# TODO - mozilla seems to use its own optimize config in Firefox 4, -# we need to figure how set our gcc flags properly. -#export CFLAGS=$MOZ_OPT_FLAGS -#export CXXFLAGS=$MOZ_OPT_FLAGS +MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions/-fno-exceptions/') +export CFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS=$MOZ_OPT_FLAGS export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' @@ -202,7 +201,7 @@ MOZ_SMP_FLAGS=-j1 %endif export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}" -make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" +make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" # create debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} @@ -441,13 +440,9 @@ fi %files devel %defattr(-,root,root,-) -%dir %{_libdir}/%{name}-sdk-* -%dir %{_libdir}/%{name}-sdk-*/sdk -%dir %{_datadir}/idl/%{name}*%{version_internal} %{_datadir}/idl/%{name}*%{version_internal} %{_includedir}/%{name}*%{version_internal} -%{_libdir}/%{name}-sdk-*/* -%{_libdir}/%{name}-sdk-*/sdk/* +%{_libdir}/%{name}-sdk-*/ %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell %{mozappdir}/xpidl @@ -457,6 +452,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Sep 7 2010 Tom "spot" Callaway 1.9.3.0-0.2.b4 +- spec file cleanup + * Fri Aug 27 2010 Martin Stransky 1.9.3.0-0.1.b4 - Update to 1.9.3.1 beta 4 From d930933b8f803a3809ab99bd3e9a5de3e4d872cc Mon Sep 17 00:00:00 2001 From: "Tom \"spot\" Callaway" Date: Tue, 7 Sep 2010 12:16:09 -0400 Subject: [PATCH 084/486] optimize --- xulrunner-mozconfig | 2 +- xulrunner.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index fa47503..479b147 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -19,7 +19,7 @@ ac_add_options --disable-tests ac_add_options --disable-mochitest ac_add_options --disable-installer ac_add_options --disable-debug -ac_add_options --enable-optimize +ac_add_options --enable-optimize="$MOZ_OPT_FLAGS" ac_add_options --enable-xinerama ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-pango diff --git a/xulrunner.spec b/xulrunner.spec index 4c64456..4937c3d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -186,7 +186,7 @@ MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} # Mozilla builds with -Wall with exception of a few warnings which show up # everywhere in the code; so, don't override that. # and disable C++ exceptions -MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions/-fno-exceptions/') +export MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions/-fno-exceptions/g') export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS From 5411179aa6cf11e922d595169101f30d08ed8767 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Sep 2010 16:26:02 +0200 Subject: [PATCH 085/486] Update to 2.0b6 --- mozilla-libjpeg-turbo.patch | 30 +++++------------------------- xulrunner-mozconfig | 3 ++- xulrunner.spec | 11 +++++++---- 3 files changed, 14 insertions(+), 30 deletions(-) diff --git a/mozilla-libjpeg-turbo.patch b/mozilla-libjpeg-turbo.patch index 9abd0e9..6ddb090 100644 --- a/mozilla-libjpeg-turbo.patch +++ b/mozilla-libjpeg-turbo.patch @@ -1,27 +1,7 @@ -diff -up xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.jpeg-turbo xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp ---- xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.jpeg-turbo 2010-08-06 03:09:15.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp 2010-08-16 11:19:17.000000000 +0200 -@@ -58,19 +58,6 @@ - - extern "C" { - #include "iccjpeg.h" -- --/* Colorspace conversion (copied from jpegint.h) */ --struct jpeg_color_deconverter { -- JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); -- JMETHOD(void, color_convert, (j_decompress_ptr cinfo, -- JSAMPIMAGE input_buf, JDIMENSION input_row, -- JSAMPARRAY output_buf, int num_rows)); --}; -- --METHODDEF(void) --ycc_rgb_convert_argb (j_decompress_ptr cinfo, -- JSAMPIMAGE input_buf, JDIMENSION input_row, -- JSAMPARRAY output_buf, int num_rows); - } - - NS_IMPL_ISUPPORTS1(nsJPEGDecoder, imgIDecoder) -@@ -443,14 +430,6 @@ nsresult nsJPEGDecoder::Write(const char +diff -up xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp +--- xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo 2010-09-14 16:15:14.000000000 +0200 ++++ xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp 2010-09-21 10:28:59.000000000 +0200 +@@ -422,14 +422,6 @@ nsJPEGDecoder::WriteInternal(const char return NS_OK; /* I/O suspension */ } @@ -36,7 +16,7 @@ diff -up xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGD /* If this is a progressive JPEG ... */ mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; } -@@ -616,15 +595,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s +@@ -594,15 +586,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s PRUint32 *imageRow = ((PRUint32*)mImageData) + (mInfo.output_scanline * mInfo.output_width); diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 479b147..ffbb0fe 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -1,5 +1,4 @@ . $topsrcdir/xulrunner/config/mozconfig - # --with-system-png is disabled because Mozilla requires APNG support in libpng #ac_add_options --with-system-png @@ -33,9 +32,11 @@ ac_add_options --enable-libnotify ac_add_options --disable-necko-wifi ac_add_options --enable-startup-notification ac_add_options --disable-cpp-exceptions +ac_add_options --enable-shared-js export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@ diff --git a/xulrunner.spec b/xulrunner.spec index 4937c3d..c138ad3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -17,14 +17,14 @@ # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) -%define version_internal 1.9.3 +%define version_internal 2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b4 +%define pretag b6 Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.3.0 -Release: 0.2%{?pretag}%{?dist} +Version: 2.0 +Release: 0.1%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -452,6 +452,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Sep 21 2010 Martin Stransky 2.0-0.1.b6 +- Update to 2.0b6 + * Tue Sep 7 2010 Tom "spot" Callaway 1.9.3.0-0.2.b4 - spec file cleanup From 040bf449e4fc655b0f305074b77f304048599d19 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Sep 2010 16:38:20 +0200 Subject: [PATCH 086/486] Upload sources --- .gitignore | 1 + sources | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e5c1826..d931b4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ xulrunner-1.9.2.7.source.tar.bz2 xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-1.9.3.0b4.source.tar.bz2 +/xulrunner-2.0b6.source.tar.bz2 diff --git a/sources b/sources index ad232cf..ddb43dd 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 8084d2b273e8c9fb444acd99e51ea904 xulrunner-1.9.3.0b4.source.tar.bz2 +444176a2fd04f20512da121d1afa8abb xulrunner-2.0b6.source.tar.bz2 From 9d46d40c5b6d54f1b4092c92769d69db7ff4dbaf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Sep 2010 16:41:16 +0200 Subject: [PATCH 087/486] Upload sources --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index ddb43dd..222c733 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -8084d2b273e8c9fb444acd99e51ea904 xulrunner-1.9.3.0b4.source.tar.bz2 444176a2fd04f20512da121d1afa8abb xulrunner-2.0b6.source.tar.bz2 From e2d753bb18693e961ca4916110ddd211a62784b7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Sep 2010 16:52:18 +0200 Subject: [PATCH 088/486] disable system sqlite for now --- xulrunner-mozconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index ffbb0fe..7076e21 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -10,7 +10,7 @@ ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --enable-system-hunspell -ac_add_options --enable-system-sqlite +ac_add_options --disable-system-sqlite ac_add_options --enable-system-cairo ac_add_options --with-pthreads ac_add_options --disable-strip From 91fc7ff0d253f2d116c6f9456747763a65f49c2f Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 29 Sep 2010 17:56:44 -0700 Subject: [PATCH 089/486] - Rebuilt for gcc bug 634757 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index c138ad3..2ac0fab 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -24,7 +24,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.1%{?pretag}%{?dist} +Release: 0.2%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -452,6 +452,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 29 2010 jkeating - 2.0-0.2b6 +- Rebuilt for gcc bug 634757 + * Tue Sep 21 2010 Martin Stransky 2.0-0.1.b6 - Update to 2.0b6 From 105a3160872fa57c62fc61658df65d0ca88b8631 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 19 Oct 2010 12:20:15 +0200 Subject: [PATCH 090/486] Update to 1.9.1.14 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f875a80..cb644de 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ xulrunner-1.9.1.10.source.tar.bz2 xulrunner-1.9.1.11.source.tar.bz2 /xulrunner-1.9.1.12.source.tag.bz2 /xulrunner-1.9.1.12.source.tar.bz2 +/xulrunner-1.9.1.14.source.tar.bz2 diff --git a/sources b/sources index 6c2a41c..22e641f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bd1e27ef2494954dd920dede9165e9db xulrunner-1.9.1.12.source.tar.bz2 +547b36fda36b9de89ce8c2d8336deabc xulrunner-1.9.1.14.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 97a6715..25aaf62 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -14,7 +14,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.12 +Version: 1.9.1.14 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -480,6 +480,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 19 2010 Jan Horak - 1.9.1.14-1 +- Update to 1.9.1.14 + * Mon Sep 6 2010 Jan Horak - 1.9.1.12-1 - Update to 1.9.1.12 From 481ddc4b5a278559802885669463cb8202a9b974 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 19 Oct 2010 17:58:58 +0200 Subject: [PATCH 091/486] Removed unrequired patch --- mozilla-build.patch | 23 ----------------------- xulrunner.spec | 2 -- 2 files changed, 25 deletions(-) delete mode 100644 mozilla-build.patch diff --git a/mozilla-build.patch b/mozilla-build.patch deleted file mode 100644 index a956e5f..0000000 --- a/mozilla-build.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up mozilla/security/manager/Makefile.in.old mozilla/security/manager/Makefile.in ---- mozilla/security/manager/Makefile.in.old 2007-10-25 00:25:30.000000000 +0200 -+++ mozilla/security/manager/Makefile.in 2007-11-06 10:57:39.000000000 +0100 -@@ -153,7 +153,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= - DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) - DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 - DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 --DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1 - ifdef NSS_DISABLE_DBM - DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1 - endif -diff -up mozilla/security/manager/ssl/src/Makefile.in.old mozilla/security/manager/ssl/src/Makefile.in ---- mozilla/security/manager/ssl/src/Makefile.in.old 2007-10-19 21:16:36.000000000 +0200 -+++ mozilla/security/manager/ssl/src/Makefile.in 2007-11-06 10:57:52.000000000 +0100 -@@ -134,8 +134,6 @@ REQUIRES = nspr \ - - EXTRA_DEPS = $(NSS_DEP_LIBS) - --DEFINES += -DNSS_ENABLE_ECC -- - # Use local includes because they are inserted before INCLUDES - # so that Mozilla's nss.h is used, not glibc's - LOCAL_INCLUDES += $(NSS_CFLAGS) diff --git a/xulrunner.spec b/xulrunner.spec index 25aaf62..de9f7c2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -27,7 +27,6 @@ Source23: %{name}.1 # build patches Patch0: xulrunner-version.patch -Patch1: mozilla-build.patch Patch2: mozilla-191-path.patch Patch3: mozilla-jemalloc.patch Patch4: mozilla-about-firefox-version.patch @@ -155,7 +154,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch -%patch1 -p1 -b .build %patch2 -p1 -b .path %patch3 -p1 -b .jemalloc %patch4 -p1 -b .about-firefox-version From 953ca3face80247ed285b28e8d4a1f8a7d7b44b1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 27 Oct 2010 17:44:44 +0200 Subject: [PATCH 092/486] Update to 1.9.1.15 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cb644de..405930f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ xulrunner-1.9.1.11.source.tar.bz2 /xulrunner-1.9.1.12.source.tag.bz2 /xulrunner-1.9.1.12.source.tar.bz2 /xulrunner-1.9.1.14.source.tar.bz2 +/xulrunner-1.9.1.15.source.tar.bz2 diff --git a/sources b/sources index 22e641f..d2ad1e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -547b36fda36b9de89ce8c2d8336deabc xulrunner-1.9.1.14.source.tar.bz2 +876699d59db7419bacc03cae9576f5a1 xulrunner-1.9.1.15.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index de9f7c2..ffa215b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -14,7 +14,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 1.9.1.14 +Version: 1.9.1.15 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -478,6 +478,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 27 2010 Martin Stransky - 1.9.1.15-1 +- Update to 1.9.1.15 + * Tue Oct 19 2010 Jan Horak - 1.9.1.14-1 - Update to 1.9.1.14 From 58400e6aa3cd8360a51e9cbc8fc9dedcc2c172f6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Nov 2010 12:58:12 +0100 Subject: [PATCH 093/486] Libnotify rebuild (rhbz#649071) --- mozilla-notify.patch | 13 +++++++++++++ xulrunner.spec | 10 ++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 mozilla-notify.patch diff --git a/mozilla-notify.patch b/mozilla-notify.patch new file mode 100644 index 0000000..54a1c59 --- /dev/null +++ b/mozilla-notify.patch @@ -0,0 +1,13 @@ +diff -up xulrunner-2.0/mozilla-central/toolkit/system/gnome/nsAlertsIconListener.cpp.notify xulrunner-2.0/mozilla-central/toolkit/system/gnome/nsAlertsIconListener.cpp +--- xulrunner-2.0/mozilla-central/toolkit/system/gnome/nsAlertsIconListener.cpp.notify 2010-11-02 17:02:18.266180000 -0400 ++++ xulrunner-2.0/mozilla-central/toolkit/system/gnome/nsAlertsIconListener.cpp 2010-11-02 17:02:37.699180028 -0400 +@@ -218,7 +218,7 @@ nsAlertsIconListener::ShowAlert(GdkPixbu + { + mNotification = notify_notification_new(mAlertTitle.get(), + mAlertText.get(), +- NULL, NULL); ++ NULL); + if (!mNotification) + return NS_ERROR_OUT_OF_MEMORY; + + diff --git a/xulrunner.spec b/xulrunner.spec index 2ac0fab..2c4e6c8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,6 +11,7 @@ %define cairo_version 1.6.0 %define freetype_version 2.1.9 %define sqlite_version 3.6.16 +%define notify_version 0.7.0 %define tarballdir mozilla-central %define enable_mozilla_crashreporter 0 @@ -24,7 +25,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.2%{?pretag}%{?dist} +Release: 0.3%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -50,6 +51,7 @@ Patch11: mozilla-malloc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: mozilla-libjpeg-turbo.patch +Patch22: mozilla-notify.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch @@ -79,7 +81,7 @@ BuildRequires: hunspell-devel BuildRequires: sqlite-devel >= %{sqlite_version} BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel -BuildRequires: libnotify-devel +BuildRequires: libnotify-devel >= %{notify_version} BuildRequires: autoconf213 BuildRequires: mesa-libGL-devel BuildRequires: yasm @@ -153,6 +155,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo +%patch22 -p2 -b .notify #%patch100 -p1 -b .ps-pdf-simplify-operators @@ -452,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Nov 3 2010 Martin Stransky 2.0-0.3.b6 +- Libnotify rebuild (rhbz#649071) + * Wed Sep 29 2010 jkeating - 2.0-0.2b6 - Rebuilt for gcc bug 634757 From b05bc68a7481b8bf24a99a0ddbd8aa0f0a7c9cdf Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 4 Nov 2010 11:32:46 -0700 Subject: [PATCH 094/486] - Ensure that WM_CLASS matches the desktop file --- wmclass.patch | 29 +++++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 wmclass.patch diff --git a/wmclass.patch b/wmclass.patch new file mode 100644 index 0000000..5fe76ac --- /dev/null +++ b/wmclass.patch @@ -0,0 +1,29 @@ +# +# Online Desktop expects WMCLASS to match the .desktop file +# Since renaming the .desktop file is bad, work around this here +# + +diff -up ./widget/src/gtk2/nsWindow.cpp.wmclass ./widget/src/gtk2/nsWindow.cpp +--- ./widget/src/gtk2/nsWindow.cpp.wmclass 2010-10-25 11:33:21.649433261 -0700 ++++ ./widget/src/gtk2/nsWindow.cpp 2010-10-25 11:36:19.864431870 -0700 +@@ -3738,6 +3738,10 @@ nsWindow::Create(nsIWidget *aPare + GetBrandName(brandName); + NS_ConvertUTF16toUTF8 cBrand(brandName); + ++ if (brandName.EqualsLiteral("Minefield")) { ++ cBrand.Assign("Firefox"); ++ } ++ + if (mWindowType == eWindowType_dialog) { + mShell = gtk_window_new(GTK_WINDOW_TOPLEVEL); + SetDefaultIcon(); +@@ -4109,6 +4113,9 @@ nsWindow::SetWindowClass(const nsAString + #ifdef MOZ_X11 + nsXPIDLString brandName; + GetBrandName(brandName); ++ if (brandName.EqualsLiteral("Minefield")) { ++ brandName.AssignLiteral("Firefox"); ++ } + + XClassHint *class_hint = XAllocClassHint(); + if (!class_hint) diff --git a/xulrunner.spec b/xulrunner.spec index 2c4e6c8..db55bfe 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.3%{?pretag}%{?dist} +Release: 0.4%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -52,6 +52,7 @@ Patch11: mozilla-malloc.patch Patch20: mozilla-193-pkgconfig.patch Patch21: mozilla-libjpeg-turbo.patch Patch22: mozilla-notify.patch +Patch23: wmclass.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch @@ -156,6 +157,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo %patch22 -p2 -b .notify +%patch23 -p1 -b .wmclass #%patch100 -p1 -b .ps-pdf-simplify-operators @@ -455,6 +457,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 4 2010 Christopher Aillon 2.0-0.4.b6 +- Ensure that WM_CLASS matches the desktop file + * Wed Nov 3 2010 Martin Stransky 2.0-0.3.b6 - Libnotify rebuild (rhbz#649071) From 7ad8147c58f8f78f20a5a65efcc5919bfb51e756 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 11 Nov 2010 15:58:07 +0100 Subject: [PATCH 095/486] Update to 4.0b7 --- .gitignore | 2 ++ sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d931b4c..f9ee673 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ xulrunner-1.9.2.7.source.tar.bz2 xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-1.9.3.0b4.source.tar.bz2 /xulrunner-2.0b6.source.tar.bz2 +/xulrunner-4.0b7.source.tar.bz2 +/xulrunner-2.0b7.source.tar.bz2 diff --git a/sources b/sources index 222c733..a232ab1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -444176a2fd04f20512da121d1afa8abb xulrunner-2.0b6.source.tar.bz2 +d2ab9b7eefcbbaedf45189b8662b3e3c xulrunner-2.0b7.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index db55bfe..71aa091 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -20,12 +20,12 @@ %define version_internal 2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b6 +%define pretag b7 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.4%{?pretag}%{?dist} +Release: 0.5%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -457,6 +457,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 11 2010 Jan Horak - 2.0-0.5.b7 +- Update to 2.0b7 + * Thu Nov 4 2010 Christopher Aillon 2.0-0.4.b6 - Ensure that WM_CLASS matches the desktop file From baeacb74dd114d764ebf5d2b86c649001809ddfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 11 Nov 2010 18:15:17 +0100 Subject: [PATCH 096/486] - The s390 patch is not needed anymore --- mozilla-build-s390.patch | 11 ----------- xulrunner.spec | 9 ++++----- 2 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 mozilla-build-s390.patch diff --git a/mozilla-build-s390.patch b/mozilla-build-s390.patch deleted file mode 100644 index 92f5cbb..0000000 --- a/mozilla-build-s390.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up mozilla-1.9.2/js/src/jstl.h.old mozilla-1.9.2/js/src/jstl.h ---- mozilla-1.9.2/js/src/jstl.h.old 2010-03-10 10:01:51.000000000 +0100 -+++ mozilla-1.9.2/js/src/jstl.h 2010-03-10 12:24:55.000000000 +0100 -@@ -195,7 +195,6 @@ class ReentrancyGuard - static JS_ALWAYS_INLINE size_t - RoundUpPow2(size_t x) - { -- typedef tl::StaticAssert::result>::result _; - size_t log2 = JS_CEILING_LOG2W(x); - JS_ASSERT(log2 < tl::BitSize::result); - size_t result = size_t(1) << log2; diff --git a/xulrunner.spec b/xulrunner.spec index 71aa091..5b7d813 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.5%{?pretag}%{?dist} +Release: 0.6%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -45,7 +45,6 @@ Patch4: mozilla-about-firefox-version.patch Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch Patch9: mozilla-build-sbrk.patch -Patch10: mozilla-build-s390.patch Patch11: mozilla-malloc.patch # Fedora specific patches @@ -149,9 +148,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch7 -p2 -b .del #%patch8 -p1 -b .plugin %patch9 -p2 -b .sbrk -%ifarch s390 -%patch10 -p1 -b .s390 -%endif %patch11 -p2 -b .malloc %patch20 -p2 -b .pk @@ -457,6 +453,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 11 2010 Dan Horák - 2.0-0.6.b7 +- The s390 patch is not needed anymore + * Thu Nov 11 2010 Jan Horak - 2.0-0.5.b7 - Update to 2.0b7 From a09e3ff1c07c2e22cbce36299fe04eae7c3a49dd Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 12 Nov 2010 08:56:35 +0100 Subject: [PATCH 097/486] Removed mozilla-about-version patch --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 71aa091..7cde018 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -145,7 +145,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch1 -p2 -b .build %patch3 -p1 -b .jemalloc -%patch4 -p1 -b .about-firefox-version +#%patch4 -p1 -b .about-firefox-version %patch7 -p2 -b .del #%patch8 -p1 -b .plugin %patch9 -p2 -b .sbrk From 026ced668bf558137dc07c0a7c7d5510ed1edf90 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 12 Nov 2010 12:12:41 +0100 Subject: [PATCH 098/486] Removed mozilla-about-firefox-version.patch --- mozilla-about-firefox-version.patch | 12 ------------ xulrunner.spec | 2 -- 2 files changed, 14 deletions(-) delete mode 100644 mozilla-about-firefox-version.patch diff --git a/mozilla-about-firefox-version.patch b/mozilla-about-firefox-version.patch deleted file mode 100644 index 115664c..0000000 --- a/mozilla-about-firefox-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-1.9.1/toolkit/content/Makefile.in.about-firefox-version mozilla-1.9.1/toolkit/content/Makefile.in ---- mozilla-1.9.1/toolkit/content/Makefile.in.about-firefox-version 2009-06-29 18:15:23.000000000 +0200 -+++ mozilla-1.9.1/toolkit/content/Makefile.in 2009-07-07 13:43:54.000000000 +0200 -@@ -46,7 +46,7 @@ CHROME_DEPS = buildconfig.html - include $(DEPTH)/config/autoconf.mk - - DEFINES += \ -- -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \ -+ -DMOZ_APP_VERSION=$(FIREFOX_VERSION) \ - -Dtarget="$(target)" \ - -Dac_configure_args="$(ac_configure_args)" \ - -DCC="$(CC)" \ diff --git a/xulrunner.spec b/xulrunner.spec index 389e25d..fe473d8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -41,7 +41,6 @@ Source23: %{name}.1 Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch3: firefox4-jemalloc.patch -Patch4: mozilla-about-firefox-version.patch Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch Patch9: mozilla-build-sbrk.patch @@ -144,7 +143,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch1 -p2 -b .build %patch3 -p1 -b .jemalloc -#%patch4 -p1 -b .about-firefox-version %patch7 -p2 -b .del #%patch8 -p1 -b .plugin %patch9 -p2 -b .sbrk From 8bfe96b983954814f2617f6fbd01e33d2b55a133 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 12 Nov 2010 12:53:07 +0100 Subject: [PATCH 099/486] Fixed mozilla-libjpeg-turbo.patch --- mozilla-libjpeg-turbo.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mozilla-libjpeg-turbo.patch b/mozilla-libjpeg-turbo.patch index 6ddb090..3360012 100644 --- a/mozilla-libjpeg-turbo.patch +++ b/mozilla-libjpeg-turbo.patch @@ -1,8 +1,8 @@ diff -up xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp ---- xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo 2010-09-14 16:15:14.000000000 +0200 -+++ xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp 2010-09-21 10:28:59.000000000 +0200 -@@ -422,14 +422,6 @@ nsJPEGDecoder::WriteInternal(const char - return NS_OK; /* I/O suspension */ +--- xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo 2010-11-04 21:06:43.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp 2010-11-12 12:39:08.047171412 +0100 +@@ -411,14 +411,6 @@ nsJPEGDecoder::WriteInternal(const char + return; /* I/O suspension */ } - /* Force to use our YCbCr to Packed RGB converter when possible */ @@ -16,7 +16,7 @@ diff -up xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cp /* If this is a progressive JPEG ... */ mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; } -@@ -594,15 +586,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s +@@ -563,15 +555,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s PRUint32 *imageRow = ((PRUint32*)mImageData) + (mInfo.output_scanline * mInfo.output_width); From 8b62b3199bea684f2917d375e53d5bbd8596f739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 15 Nov 2010 15:01:34 +0100 Subject: [PATCH 100/486] add s390/ppc/sparc build fixes --- xulrunner-2.0-64bit-big-endian.patch | 31 ++++++++++++++++++++++++++++ xulrunner-2.0-chromium-types.patch | 29 ++++++++++++++++++++++++++ xulrunner-2.0-secondary-jit.patch | 12 +++++++++++ xulrunner.spec | 6 ++++++ 4 files changed, 78 insertions(+) create mode 100644 xulrunner-2.0-64bit-big-endian.patch create mode 100644 xulrunner-2.0-chromium-types.patch create mode 100644 xulrunner-2.0-secondary-jit.patch diff --git a/xulrunner-2.0-64bit-big-endian.patch b/xulrunner-2.0-64bit-big-endian.patch new file mode 100644 index 0000000..d1d63e8 --- /dev/null +++ b/xulrunner-2.0-64bit-big-endian.patch @@ -0,0 +1,31 @@ +diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.s390 xulrunner-2.0/mozilla-central/js/src/jsval.h +--- xulrunner-2.0/mozilla-central/js/src/jsval.h.s390 2010-11-15 10:43:49.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2010-11-15 10:45:41.000000000 +0100 +@@ -331,6 +331,27 @@ typedef union jsval_layout + double asDouble; + void *asPtr; + } jsval_layout; ++# elif JS_BITS_PER_WORD == 64 ++typedef union jsval_layout ++{ ++ uint64 asBits; ++#ifndef _WIN64 ++ /* MSVC does not pack these correctly :-( */ ++ struct { ++ uint64 payload47 : 47; ++ JSValueTag tag : 17; ++ } debugView; ++#endif ++ struct { ++ union { ++ int32 i32; ++ uint32 u32; ++ JSWhyMagic why; ++ } payload; ++ } s; ++ double asDouble; ++ void *asPtr; ++} jsval_layout; + # endif /* JS_BITS_PER_WORD */ + #endif /* defined(IS_LITTLE_ENDIAN) */ + diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch new file mode 100644 index 0000000..0ac65d6 --- /dev/null +++ b/xulrunner-2.0-chromium-types.patch @@ -0,0 +1,29 @@ +diff -up xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h +--- xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h.chromium-types 2010-11-04 21:05:47.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h 2010-11-15 14:20:12.000000000 +0100 +@@ -64,6 +64,10 @@ typedef PRInt16 int16; + #define ARCH_CPU_PPC_FAMILY 1 + #define ARCH_CPU_PPC 1 + #define ARCH_CPU_32_BITS 1 ++#elif defined(__ppc64__) ++#define ARCH_CPU_PPC_FAMILY 1 ++#define ARCH_CPU_PPC 1 ++#define ARCH_CPU_64_BITS 1 + #elif defined(__sparc) + #define ARCH_CPU_SPARC_FAMILY 1 + #define ARCH_CPU_SPARC 1 +@@ -72,6 +76,14 @@ typedef PRInt16 int16; + #define ARCH_CPU_SPARC_FAMILY 1 + #define ARCH_CPU_SPARC 1 + #define ARCH_CPU_64_BITS 1 ++#elif defined(__s390__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_32_BITS 1 ++#elif defined(__s390x__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_64_BITS 1 + #else + #warning Please add support for your architecture in chromium_types.h + #endif diff --git a/xulrunner-2.0-secondary-jit.patch b/xulrunner-2.0-secondary-jit.patch new file mode 100644 index 0000000..54ab913 --- /dev/null +++ b/xulrunner-2.0-secondary-jit.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit xulrunner-2.0/mozilla-central/js/src/Makefile.in +--- xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit 2010-11-04 21:05:48.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/js/src/Makefile.in 2010-11-15 14:17:39.000000000 +0100 +@@ -371,7 +371,7 @@ CPPSRCS += checks.cc \ + # END enclude sources for V8 dtoa + ############################################# + +-ifeq (,$(filter-out powerpc sparc,$(TARGET_CPU))) ++ifeq (,$(filter-out powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU))) + + VPATH += $(srcdir)/assembler \ + $(srcdir)/assembler/wtf \ diff --git a/xulrunner.spec b/xulrunner.spec index fe473d8..15ef9c2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -45,6 +45,9 @@ Patch7: xulrunner-1.9.2.1-build.patch Patch8: mozilla-plugin.patch Patch9: mozilla-build-sbrk.patch Patch11: mozilla-malloc.patch +Patch12: xulrunner-2.0-64bit-big-endian.patch +Patch13: xulrunner-2.0-secondary-jit.patch +Patch14: xulrunner-2.0-chromium-types.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -147,6 +150,9 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ #%patch8 -p1 -b .plugin %patch9 -p2 -b .sbrk %patch11 -p2 -b .malloc +%patch12 -p2 -b .64bit-big-endian +%patch13 -p2 -b .secondary-jit +%patch14 -p2 -b .chromium-types %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo From 7b0d82a165307e6f66ef41add4bff85ac4bfac8f Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 15 Dec 2010 11:24:17 +0100 Subject: [PATCH 101/486] Enable mozilla's crash reporter --- xulrunner-mozconfig-debuginfo | 4 ++-- xulrunner.spec | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/xulrunner-mozconfig-debuginfo b/xulrunner-mozconfig-debuginfo index a0ef07a..5fb7e30 100644 --- a/xulrunner-mozconfig-debuginfo +++ b/xulrunner-mozconfig-debuginfo @@ -1,5 +1,5 @@ # For mozilla's debuginfo: -export CFLAGS="-gstabs+" -export CXXFLAGS="-gstabs+" +export CFLAGS="-gdwarf-2" +export CXXFLAGS="-gdwarf-2" export MOZ_DEBUG_SYMBOLS=1 ac_add_options --enable-crashreporter diff --git a/xulrunner.spec b/xulrunner.spec index 15ef9c2..044dc02 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -7,13 +7,13 @@ # Minimal required versions %define nspr_version 4.8 -%define nss_version 3.12.7 +%define nss_version 3.12.8 %define cairo_version 1.6.0 %define freetype_version 2.1.9 %define sqlite_version 3.6.16 %define notify_version 0.7.0 %define tarballdir mozilla-central -%define enable_mozilla_crashreporter 0 +%define enable_mozilla_crashreporter 1 # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -25,7 +25,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.6%{?pretag}%{?dist} +Release: 0.7%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -457,6 +457,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 14 2010 Jan Horak - 2.0-0.7.b7 +- Enable mozilla crash reporter + * Thu Nov 11 2010 Dan Horák - 2.0-0.6.b7 - The s390 patch is not needed anymore From 6d6b4295266bcb0195fb75366c957d597b4d7083 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 15 Dec 2010 11:42:29 +0100 Subject: [PATCH 102/486] Added build require libcurl-devel, needed for crash reporter --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 044dc02..cd9ad26 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -87,6 +87,7 @@ BuildRequires: libnotify-devel >= %{notify_version} BuildRequires: autoconf213 BuildRequires: mesa-libGL-devel BuildRequires: yasm +BuildRequires: libcurl-devel Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} From add23b38a29e85f6124b73e6b8efc0e6188b06a1 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 15 Dec 2010 12:25:29 +0100 Subject: [PATCH 103/486] Crash reporter static patch added --- crashreporter-remove-static.patch | 11 +++++++++++ xulrunner.spec | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 crashreporter-remove-static.patch diff --git a/crashreporter-remove-static.patch b/crashreporter-remove-static.patch new file mode 100644 index 0000000..b94d165 --- /dev/null +++ b/crashreporter-remove-static.patch @@ -0,0 +1,11 @@ +diff -up comm-1.9.2/mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in.static comm-1.9.2/mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in +--- mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in.static 2010-06-23 19:47:11.000000000 +0200 ++++ mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in 2010-07-12 15:51:41.000000000 +0200 +@@ -64,6 +64,6 @@ FORCE_USE_PIC = 1 + + #XXX: bug 554854 causes us to be unable to run binaries on the build slaves + # due to them having an older libstdc++ +-HOST_LDFLAGS += -static ++#HOST_LDFLAGS += -static + + include $(topsrcdir)/config/rules.mk diff --git a/xulrunner.spec b/xulrunner.spec index cd9ad26..5b40625 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -54,6 +54,7 @@ Patch20: mozilla-193-pkgconfig.patch Patch21: mozilla-libjpeg-turbo.patch Patch22: mozilla-notify.patch Patch23: wmclass.patch +Patch24: crashreporter-remove-static.patch # Upstream patches Patch100: mozilla-ps-pdf-simplify-operators.patch @@ -159,6 +160,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch21 -p2 -b .jpeg-turbo %patch22 -p2 -b .notify %patch23 -p1 -b .wmclass +%patch24 -p1 -b .static #%patch100 -p1 -b .ps-pdf-simplify-operators From b9b74f2f29c851bdf97f7c500bfccbae0fefc073 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 15 Dec 2010 13:52:46 +0100 Subject: [PATCH 104/486] Fixed crashreporter symbols filename --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 5b40625..283772d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,7 +11,7 @@ %define cairo_version 1.6.0 %define freetype_version 2.1.9 %define sqlite_version 3.6.16 -%define notify_version 0.7.0 +%define notify_version 0.5.0 %define tarballdir mozilla-central %define enable_mozilla_crashreporter 1 @@ -375,7 +375,7 @@ touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/xpti.dat # Add debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} mkdir -p $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} -cp dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT/%{_libdir}/debug%{mozappdir} +cp dist/%{name}-%{version}*.crashreporter-symbols.zip $RPM_BUILD_ROOT/%{_libdir}/debug%{mozappdir} #cp %{moz_objdir}/mozilla/dist/firefox-%{version}.en-US.linux-i686.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} %endif From f024bbe4ef0944342e18026fd61e2e25957c7c31 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 15 Dec 2010 15:11:51 +0100 Subject: [PATCH 105/486] Fixed mozilla debug symbols install directory --- xulrunner.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 283772d..65386b0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -375,7 +375,9 @@ touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/xpti.dat # Add debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} mkdir -p $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} -cp dist/%{name}-%{version}*.crashreporter-symbols.zip $RPM_BUILD_ROOT/%{_libdir}/debug%{mozappdir} +# Debug symbols are stored in /usr/lib even in x86_64 arch +DEBUG_LIB_DIR=`echo $RPM_BUILD_ROOT|sed -e "s/lib64/lib/"` +cp dist/%{name}-%{version}*.crashreporter-symbols.zip $DEBUG_LIB_DIR/%{_libdir}/debug%{mozappdir} #cp %{moz_objdir}/mozilla/dist/firefox-%{version}.en-US.linux-i686.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} %endif From 81cdf4611090fdfe961def64d2452bb679349afe Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 15 Dec 2010 15:12:46 +0100 Subject: [PATCH 106/486] Libnotify required version put back to 0.7 --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 65386b0..14c5dab 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,7 +11,7 @@ %define cairo_version 1.6.0 %define freetype_version 2.1.9 %define sqlite_version 3.6.16 -%define notify_version 0.5.0 +%define notify_version 0.7.0 %define tarballdir mozilla-central %define enable_mozilla_crashreporter 1 From ac6c1badd7f4fa80b712088bb5c4174573414c8a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 17 Dec 2010 13:05:59 +0100 Subject: [PATCH 107/486] Fixed symbols installation location --- xulrunner.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 14c5dab..54693b1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -374,11 +374,10 @@ touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/xpti.dat # Add debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} -mkdir -p $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} # Debug symbols are stored in /usr/lib even in x86_64 arch -DEBUG_LIB_DIR=`echo $RPM_BUILD_ROOT|sed -e "s/lib64/lib/"` -cp dist/%{name}-%{version}*.crashreporter-symbols.zip $DEBUG_LIB_DIR/%{_libdir}/debug%{mozappdir} -#cp %{moz_objdir}/mozilla/dist/firefox-%{version}.en-US.linux-i686.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_libdir}/debug%{mozappdir} +DEBUG_LIB_DIR=`echo %{_libdir}|sed -e "s/lib64/lib/"` +mkdir -p $RPM_BUILD_ROOT$DEBUG_LIB_DIR/debug%{mozappdir} +cp dist/%{name}-%{version}*.crashreporter-symbols.zip $RPM_BUILD_ROOT$DEBUG_LIB_DIR/debug%{mozappdir} %endif #--------------------------------------------------------------------- From db37aec195124cd591bfff290937756c9af9a6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 17 Dec 2010 23:35:53 +0100 Subject: [PATCH 108/486] - disable the crash reporter on non-x86 arches - add sparc64 as 64-bit arch --- xulrunner.spec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 54693b1..1b3d756 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -13,7 +13,12 @@ %define sqlite_version 3.6.16 %define notify_version 0.7.0 %define tarballdir mozilla-central +# build crash reporter only on x86/x86_64 for now +%ifarch %{ix86} x86_64 %define enable_mozilla_crashreporter 1 +%else +%define enable_mozilla_crashreporter 0 +%endif # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -25,7 +30,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.7%{?pretag}%{?dist} +Release: 0.8%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -270,7 +275,7 @@ cd - $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding-unstable.pc # Fix multilib devel conflicts... -%ifarch x86_64 ia64 s390x ppc64 +%ifarch x86_64 ia64 s390x ppc64 sparc64 %define mozbits 64 %else %define mozbits 32 @@ -281,7 +286,7 @@ genheader=$* mv ${genheader}.h ${genheader}%{mozbits}.h cat > ${genheader}.h << EOF /* This file exists to fix multilib conflicts */ -#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) +#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) #include "${genheader}64.h" #else #include "${genheader}32.h" @@ -337,7 +342,7 @@ done popd # GRE stuff -%ifarch x86_64 ia64 ppc64 s390x +%ifarch x86_64 ia64 ppc64 s390x sparc64 %define gre_conf_file gre64.conf %else %define gre_conf_file gre.conf @@ -349,7 +354,7 @@ MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` chmod 644 $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} # Library path -%ifarch x86_64 ia64 ppc64 s390x +%ifarch x86_64 ia64 ppc64 s390x sparc64 %define ld_conf_file xulrunner-64.conf %else %define ld_conf_file xulrunner-32.conf @@ -461,6 +466,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 17 2010 Dan Horák - 2.0-0.8.b7 +- disable the crash reporter on non-x86 arches +- add sparc64 as 64-bit arch + * Tue Dec 14 2010 Jan Horak - 2.0-0.7.b7 - Enable mozilla crash reporter From 8ca91bd018d6f0f40c386ab5fd191e70baa9d68b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 20 Dec 2010 12:17:23 +0100 Subject: [PATCH 109/486] removed unused library path (rhbz#658471) --- xulrunner.spec | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 1b3d756..a5aff58 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -30,7 +30,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.8%{?pretag}%{?dist} +Release: 0.9%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -353,18 +353,6 @@ MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} chmod 644 $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} -# Library path -%ifarch x86_64 ia64 ppc64 s390x sparc64 -%define ld_conf_file xulrunner-64.conf -%else -%define ld_conf_file xulrunner-32.conf -%endif - -%{__mkdir_p} $RPM_BUILD_ROOT/etc/ld.so.conf.d -%{__cat} > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{ld_conf_file} << EOF -${MOZ_APP_DIR} -EOF - # Copy over the LICENSE %{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT${MOZ_APP_DIR} @@ -437,7 +425,6 @@ fi %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list %{mozappdir}/greprefs.js -%{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %if %{?separated_plugins} %{mozappdir}/plugin-container %endif @@ -466,6 +453,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Dec 20 2010 Martin Stransky 2.0-0.9.b8 +- removed unused library path (rhbz#658471) + * Fri Dec 17 2010 Dan Horák - 2.0-0.8.b7 - disable the crash reporter on non-x86 arches - add sparc64 as 64-bit arch From cebfca18ff63e0c8b691d47eac43cdd0875b4b2c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Dec 2010 13:15:45 +0100 Subject: [PATCH 110/486] Update to beta8 --- .gitignore | 1 + mozilla-plugin.patch | 10 ---------- sources | 1 + xulrunner-1.9.2.1-build.patch | 12 ------------ xulrunner.spec | 11 +++++------ 5 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 mozilla-plugin.patch delete mode 100644 xulrunner-1.9.2.1-build.patch diff --git a/.gitignore b/.gitignore index f9ee673..5b840bb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0b6.source.tar.bz2 /xulrunner-4.0b7.source.tar.bz2 /xulrunner-2.0b7.source.tar.bz2 +/xulrunner-2.0b8.source.tar.bz2 diff --git a/mozilla-plugin.patch b/mozilla-plugin.patch deleted file mode 100644 index 75eac7e..0000000 --- a/mozilla-plugin.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -up mozilla-1.9.2/xulrunner/installer/mozilla-plugin.pc.in.old mozilla-1.9.2/xulrunner/installer/mozilla-plugin.pc.in ---- mozilla-1.9.2/xulrunner/installer/mozilla-plugin.pc.in.old 2009-11-25 05:13:11.000000000 +0100 -+++ mozilla-1.9.2/xulrunner/installer/mozilla-plugin.pc.in 2009-12-03 10:14:41.000000000 +0100 -@@ -5,5 +5,5 @@ includedir=%includedir% - Name: Mozilla Plug-In API - Description: Mozilla Plug-In API - Version: %MOZILLA_VERSION% --Cflags: -I${includedir}/stable -DXP_UNIX %ojidef% -+Cflags: -I${includedir} -DXP_UNIX %ojidef% - diff --git a/sources b/sources index a232ab1..f4eba25 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ d2ab9b7eefcbbaedf45189b8662b3e3c xulrunner-2.0b7.source.tar.bz2 +665ffbf8571e713d5da8f98e3d971e9d xulrunner-2.0b8.source.tar.bz2 diff --git a/xulrunner-1.9.2.1-build.patch b/xulrunner-1.9.2.1-build.patch deleted file mode 100644 index 12f966b..0000000 --- a/xulrunner-1.9.2.1-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-1.9.2.1/mozilla-1.9.2/layout/generic/nsFrame.h.old xulrunner-1.9.2.1/mozilla-1.9.2/layout/generic/nsFrame.h ---- xulrunner-1.9.2.1/mozilla-1.9.2/layout/generic/nsFrame.h.old 2009-11-11 15:34:51.000000000 +0100 -+++ xulrunner-1.9.2.1/mozilla-1.9.2/layout/generic/nsFrame.h 2009-11-11 15:33:09.000000000 +0100 -@@ -157,7 +157,7 @@ private: - // Left undefined; nsFrame objects are never allocated from the heap. - void* operator new(size_t sz) CPP_THROW_NEW; - --protected: -+public: - // Overridden to prevent the global delete from being called, since - // the memory came out of an arena instead of the heap. - // diff --git a/xulrunner.spec b/xulrunner.spec index a5aff58..a2be97d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,12 +25,12 @@ %define version_internal 2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b7 +%define pretag b8 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.9%{?pretag}%{?dist} +Release: 0.10%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -46,8 +46,6 @@ Source23: %{name}.1 Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch3: firefox4-jemalloc.patch -Patch7: xulrunner-1.9.2.1-build.patch -Patch8: mozilla-plugin.patch Patch9: mozilla-build-sbrk.patch Patch11: mozilla-malloc.patch Patch12: xulrunner-2.0-64bit-big-endian.patch @@ -153,8 +151,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch1 -p2 -b .build %patch3 -p1 -b .jemalloc -%patch7 -p2 -b .del -#%patch8 -p1 -b .plugin %patch9 -p2 -b .sbrk %patch11 -p2 -b .malloc %patch12 -p2 -b .64bit-big-endian @@ -453,6 +449,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 21 2010 Martin Stransky 2.0-0.10.b8 +- Update to 2.0b8 + * Mon Dec 20 2010 Martin Stransky 2.0-0.9.b8 - removed unused library path (rhbz#658471) From c83802c2236d06565e4fb11ab5c656eb2fd33631 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Dec 2010 13:41:57 +0100 Subject: [PATCH 111/486] Removed old sources --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index f4eba25..c923253 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -d2ab9b7eefcbbaedf45189b8662b3e3c xulrunner-2.0b7.source.tar.bz2 665ffbf8571e713d5da8f98e3d971e9d xulrunner-2.0b8.source.tar.bz2 From a6d3acebb2e6046aa840124d99d3471cc881f3d9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Dec 2010 17:39:19 +0100 Subject: [PATCH 112/486] enable url-classifier and jar format for chrome files --- xulrunner-mozconfig | 2 ++ xulrunner.spec | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 7076e21..d6759f3 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -33,6 +33,8 @@ ac_add_options --disable-necko-wifi ac_add_options --enable-startup-notification ac_add_options --disable-cpp-exceptions ac_add_options --enable-shared-js +ac_add_options --enable-chrome-format=jar +ac_add_options --enable-url-classifier export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index a2be97d..439a276 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -30,7 +30,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.10%{?pretag}%{?dist} +Release: 0.11%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -449,6 +449,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 21 2010 Martin Stransky 2.0-0.11.b8 +- enable url-classifier and jar format for chrome files + * Tue Dec 21 2010 Martin Stransky 2.0-0.10.b8 - Update to 2.0b8 From ea7512ecdb1e083ca7b96bf7e6be89c4d17cecb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 22 Dec 2010 13:15:50 +0100 Subject: [PATCH 113/486] - updated the 64bit-big-endian patch --- xulrunner-2.0-64bit-big-endian.patch | 13 +++++++++---- xulrunner.spec | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/xulrunner-2.0-64bit-big-endian.patch b/xulrunner-2.0-64bit-big-endian.patch index d1d63e8..8b70ba9 100644 --- a/xulrunner-2.0-64bit-big-endian.patch +++ b/xulrunner-2.0-64bit-big-endian.patch @@ -1,7 +1,7 @@ -diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.s390 xulrunner-2.0/mozilla-central/js/src/jsval.h ---- xulrunner-2.0/mozilla-central/js/src/jsval.h.s390 2010-11-15 10:43:49.000000000 +0100 -+++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2010-11-15 10:45:41.000000000 +0100 -@@ -331,6 +331,27 @@ typedef union jsval_layout +diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian xulrunner-2.0/mozilla-central/js/src/jsval.h +--- xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian 2010-12-15 02:03:06.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2010-12-22 12:00:57.000000000 +0100 +@@ -334,6 +334,32 @@ typedef union jsval_layout double asDouble; void *asPtr; } jsval_layout; @@ -20,7 +20,12 @@ diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.s390 xulrunner-2.0/mozilla + union { + int32 i32; + uint32 u32; ++ JSBool boo; ++ JSString *str; ++ JSObject *obj; ++ void *ptr; + JSWhyMagic why; ++ jsuword word; + } payload; + } s; + double asDouble; diff --git a/xulrunner.spec b/xulrunner.spec index 439a276..ee2b619 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -30,7 +30,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.11%{?pretag}%{?dist} +Release: 0.12%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -449,6 +449,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Dec 22 2010 Dan Horák - 2.0-0.11.b8 +- updated the 64bit-big-endian patch + * Tue Dec 21 2010 Martin Stransky 2.0-0.11.b8 - enable url-classifier and jar format for chrome files From 1cf7e3b08111c78110275290ad59999ba74c5ba6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 23 Dec 2010 08:59:10 +0100 Subject: [PATCH 114/486] reverted fix for rhbz#658471 --- xulrunner.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ee2b619..693d0e3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -30,7 +30,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.12%{?pretag}%{?dist} +Release: 0.13%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -349,6 +349,18 @@ MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} chmod 644 $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} +# Library path +%ifarch x86_64 ia64 ppc64 s390x sparc64 +%define ld_conf_file xulrunner-64.conf +%else +%define ld_conf_file xulrunner-32.conf +%endif + +%{__mkdir_p} $RPM_BUILD_ROOT/etc/ld.so.conf.d +%{__cat} > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{ld_conf_file} << EOF +${MOZ_APP_DIR} +EOF + # Copy over the LICENSE %{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT${MOZ_APP_DIR} @@ -421,6 +433,7 @@ fi %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list %{mozappdir}/greprefs.js +%{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %if %{?separated_plugins} %{mozappdir}/plugin-container %endif @@ -449,6 +462,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 23 2010 Martin Stransky 2.0-0.13.b8 +- reverted fix for rhbz#658471 + * Wed Dec 22 2010 Dan Horák - 2.0-0.11.b8 - updated the 64bit-big-endian patch From 654d4ce2eb09b3060821a59df6c59c3b6115c677 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 12 Jan 2011 15:03:13 -0800 Subject: [PATCH 115/486] Ignore the GLX blacklist Upstream is seeing a bunch of crashes, but most likely on older hardware so they are blocking all drivers until they figure out which ones are the culprits. Enabling it in rawhide to see if we can track down any of these (though I suspect they are mostly older drivers). --- xulrunner.sh.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xulrunner.sh.in b/xulrunner.sh.in index b776138..8f76b27 100644 --- a/xulrunner.sh.in +++ b/xulrunner.sh.in @@ -59,4 +59,11 @@ fi XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION" XUL_PROGRAM="$XUL_DIST_BIN/xulrunner" +## +## Enable WebGL +## +MOZ_GLX_IGNORE_BLACKLIST=1 +export MOZ_GLX_IGNORE_BLACKLIST + + exec $XUL_PROGRAM "$@" From ce3ab78cbc383f3dd6fe20bb35fdb07588d5cd90 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 12 Jan 2011 15:44:35 -0800 Subject: [PATCH 116/486] Remove browser-only prefs Remove browser-only prefs. Plus, these prefs already exist in the browser (Firefox) package's prefs file. --- xulrunner-redhat-default-prefs.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner-redhat-default-prefs.js b/xulrunner-redhat-default-prefs.js index 425be0a..b407f0f 100644 --- a/xulrunner-redhat-default-prefs.js +++ b/xulrunner-redhat-default-prefs.js @@ -1,7 +1,5 @@ pref("app.update.enabled", false); pref("app.update.autoInstallEnabled", false); -pref("browser.display.use_system_colors", true); -pref("browser.link.open_external", 3); pref("general.smoothScroll", true); pref("general.useragent.vendor", "Fedora"); pref("general.useragent.vendorSub", "RPM_VERREL"); From dfcc365618bdf71081024b1223c8c769674d506b Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 12 Jan 2011 16:16:07 -0800 Subject: [PATCH 117/486] housekeeping: remove upstreamed patch Pushed upstream as http://hg.mozilla.org/mozilla-central/rev/e0cb183375dd --- mozilla-ps-pdf-simplify-operators.patch | 42 ------------------------- xulrunner.spec | 2 -- 2 files changed, 44 deletions(-) delete mode 100644 mozilla-ps-pdf-simplify-operators.patch diff --git a/mozilla-ps-pdf-simplify-operators.patch b/mozilla-ps-pdf-simplify-operators.patch deleted file mode 100644 index cab1341..0000000 --- a/mozilla-ps-pdf-simplify-operators.patch +++ /dev/null @@ -1,42 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=435313 - -Index: mozilla/gfx/thebes/public/gfxPDFSurface.h -=================================================================== -RCS file: /cvsroot/mozilla/gfx/thebes/public/gfxPDFSurface.h,v -retrieving revision 1.13 -diff -d -u -p -r1.13 gfxPDFSurface.h ---- mozilla/gfx/thebes/public/gfxPDFSurface.h 19 Mar 2008 20:51:42 -0000 1.13 -+++ mozilla/gfx/thebes/public/gfxPDFSurface.h 23 May 2008 00:50:31 -0000 -@@ -63,7 +63,11 @@ public: - // this is in points! - const gfxSize& GetSize() const { return mSize; } - -- virtual PRInt32 GetDefaultContextFlags() const { return gfxContext::FLAG_DISABLE_SNAPPING; } -+ virtual PRInt32 GetDefaultContextFlags() const -+ { -+ return gfxContext::FLAG_SIMPLIFY_OPERATORS | -+ gfxContext::FLAG_DISABLE_SNAPPING; -+ } - - private: - nsCOMPtr mStream; -Index: mozilla/gfx/thebes/public/gfxPSSurface.h -=================================================================== -RCS file: /cvsroot/mozilla/gfx/thebes/public/gfxPSSurface.h,v -retrieving revision 1.13 -diff -d -u -p -r1.13 gfxPSSurface.h ---- mozilla/gfx/thebes/public/gfxPSSurface.h 19 Mar 2008 20:51:42 -0000 1.13 -+++ mozilla/gfx/thebes/public/gfxPSSurface.h 23 May 2008 00:50:31 -0000 -@@ -63,7 +63,11 @@ public: - // this is in points! - const gfxSize& GetSize() const { return mSize; } - -- virtual PRInt32 GetDefaultContextFlags() const { return gfxContext::FLAG_DISABLE_SNAPPING; } -+ virtual PRInt32 GetDefaultContextFlags() const -+ { -+ return gfxContext::FLAG_SIMPLIFY_OPERATORS | -+ gfxContext::FLAG_DISABLE_SNAPPING; -+ } - - private: - nsCOMPtr mStream; diff --git a/xulrunner.spec b/xulrunner.spec index 693d0e3..e02fbb9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,6 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches -Patch100: mozilla-ps-pdf-simplify-operators.patch # --------------------------------------------------- @@ -163,7 +162,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -#%patch100 -p1 -b .ps-pdf-simplify-operators %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 8bca27676f186db766a9c89c0738942c88d9f88a Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 12 Jan 2011 23:18:04 -0800 Subject: [PATCH 118/486] housekeeping: remove upstreamed patch Pushed upstream as http://hg.mozilla.org/releases/mozilla-1.9.2/rev/ee1f680f37a1 --- mozilla-jemalloc-526152.patch | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 mozilla-jemalloc-526152.patch diff --git a/mozilla-jemalloc-526152.patch b/mozilla-jemalloc-526152.patch deleted file mode 100644 index 5f60485..0000000 --- a/mozilla-jemalloc-526152.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: David Mandelin - -diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c ---- a/memory/jemalloc/jemalloc.c -+++ b/memory/jemalloc/jemalloc.c -@@ -5792,24 +5792,24 @@ __attribute__((noinline)) - #else - inline - #endif - void * - memalign(size_t alignment, size_t size) - { - void *ret; - -- assert(((alignment - 1) & alignment) == 0 && alignment >= -- sizeof(void *)); -+ assert(((alignment - 1) & alignment) == 0); - - if (malloc_init()) { - ret = NULL; - goto RETURN; - } - -+ alignment = alignment < sizeof(void*) ? sizeof(void*) : alignment; - ret = ipalloc(alignment, size); - - RETURN: - #ifdef MALLOC_XMALLOC - if (opt_xmalloc && ret == NULL) { - _malloc_message(_getprogname(), - ": (malloc) Error in memalign(): out of memory\n", "", ""); - abort(); From 26c49bf569857904f20b0637dc1b3ee65cffbcad Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 12 Jan 2011 23:21:51 -0800 Subject: [PATCH 119/486] housekeeping: remove unused patch Fixed upstream slightly differently as http://hg.mozilla.org/mozilla-central/rev/7a2802932585 --- mozilla-jemalloc.patch | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 mozilla-jemalloc.patch diff --git a/mozilla-jemalloc.patch b/mozilla-jemalloc.patch deleted file mode 100644 index aabd690..0000000 --- a/mozilla-jemalloc.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -r f1af606531f5 memory/jemalloc/jemalloc.h ---- a/memory/jemalloc/jemalloc.h Sat Nov 22 20:22:22 2008 +0100 -+++ b/memory/jemalloc/jemalloc.h Mon Dec 01 16:53:06 2008 -0500 -@@ -45,14 +45,14 @@ - } jemalloc_stats_t; - - #ifndef MOZ_MEMORY_DARWIN --void *malloc(size_t size); --void *valloc(size_t size); --void *calloc(size_t num, size_t size); --void *realloc(void *ptr, size_t size); --void free(void *ptr); -+void *malloc(size_t size) __THROW __attribute_malloc__ __wur; -+void *valloc(size_t size) __THROW __attribute_malloc__ __wur; -+void *calloc(size_t num, size_t size) __THROW __attribute_malloc__ __wur; -+void *realloc(void *ptr, size_t size) __THROW __attribute_malloc__ __wur; -+void free(void *ptr) __THROW __attribute_malloc__ __wur; - #endif - --int posix_memalign(void **memptr, size_t alignment, size_t size); -+int posix_memalign(void **memptr, size_t alignment, size_t size) __THROW __attribute_malloc__ __wur; - void *memalign(size_t alignment, size_t size); - size_t malloc_usable_size(const void *ptr); - void jemalloc_stats(jemalloc_stats_t *stats); From b262776cbc6dbe538ff3f1d4a0376f33ca679adb Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 12 Jan 2011 23:23:12 -0800 Subject: [PATCH 120/486] housekeeping: remove unused patch Replaced by mozilla-193-pkgconfig.patch --- mozilla-192-pkgconfig.patch | 73 ------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 mozilla-192-pkgconfig.patch diff --git a/mozilla-192-pkgconfig.patch b/mozilla-192-pkgconfig.patch deleted file mode 100644 index 1f234a7..0000000 --- a/mozilla-192-pkgconfig.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -up mozilla-1.9.2/config/autoconf.mk.in.pk mozilla-1.9.2/config/autoconf.mk.in ---- mozilla-1.9.2/config/autoconf.mk.in.pk 2009-11-09 01:33:58.000000000 +0100 -+++ mozilla-1.9.2/config/autoconf.mk.in 2009-11-12 12:49:28.000000000 +0100 -@@ -58,14 +58,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ - bindir = @bindir@ --includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+includedir = @includedir@/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - libdir = @libdir@ - datadir = @datadir@ - mandir = @mandir@ --idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+idldir = $(datadir)/idl/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - - installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) -+sdkdir = $(libdir)/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - - DIST = $(DEPTH)/dist - LIBXUL_SDK = @LIBXUL_SDK@ -diff -up mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in.pk mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in ---- mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in.pk 2009-11-09 01:34:25.000000000 +0100 -+++ mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in 2009-11-12 13:09:18.000000000 +0100 -@@ -6,5 +6,6 @@ idldir=%idldir% - Name: libxul-embedding - Description: Static library for version-independent embedding of the Mozilla runtime - Version: %MOZILLA_VERSION% -+Requires: %NSPR_NAME% >= %NSPR_VERSION% - Libs: -L${sdkdir}/lib -lxpcomglue - Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% -diff -up mozilla-1.9.2/xulrunner/installer/libxul.pc.in.pk mozilla-1.9.2/xulrunner/installer/libxul.pc.in ---- mozilla-1.9.2/xulrunner/installer/libxul.pc.in.pk 2009-11-09 01:34:25.000000000 +0100 -+++ mozilla-1.9.2/xulrunner/installer/libxul.pc.in 2009-11-12 13:10:03.000000000 +0100 -@@ -2,6 +2,7 @@ prefix=%prefix% - sdkdir=%sdkdir% - includedir=%includedir% - idldir=%idldir% -+libdir=%libdir% - - Name: libxul - Description: The Mozilla Runtime and Embedding Engine -diff -up mozilla-1.9.2/xulrunner/installer/Makefile.in.pk mozilla-1.9.2/xulrunner/installer/Makefile.in ---- mozilla-1.9.2/xulrunner/installer/Makefile.in.pk 2009-11-12 12:49:28.000000000 +0100 -+++ mozilla-1.9.2/xulrunner/installer/Makefile.in 2009-11-12 12:49:28.000000000 +0100 -@@ -123,6 +123,7 @@ endif - -e "s|%includedir%|$(includedir)|" \ - -e "s|%idldir%|$(idldir)|" \ - -e "s|%sdkdir%|$(sdkdir)|" \ -+ -e "s|%libdir%|$(installdir)|" \ - -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ - -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ - -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ -diff -up mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.pk mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.pk 2009-11-09 01:34:25.000000000 +0100 -+++ mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2009-11-12 12:49:28.000000000 +0100 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - - Name: mozilla-gtkembedmoz -diff -up mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in.pk mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in ---- mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in.pk 2009-11-09 01:34:25.000000000 +0100 -+++ mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in 2009-11-12 12:49:28.000000000 +0100 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - - Name: mozilla-gtkembedmoz From 180fa428ce6646931e8b359fadb77083147bc2ce Mon Sep 17 00:00:00 2001 From: "Tom \"spot\" Callaway" Date: Thu, 13 Jan 2011 11:56:24 -0500 Subject: [PATCH 121/486] enable system sqlite, see https://fedorahosted.org/fpc/ticket/34 --- xulrunner-mozconfig | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index d6759f3..0a3d18e 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -10,7 +10,7 @@ ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --enable-system-hunspell -ac_add_options --disable-system-sqlite +ac_add_options --enable-system-sqlite ac_add_options --enable-system-cairo ac_add_options --with-pthreads ac_add_options --disable-strip diff --git a/xulrunner.spec b/xulrunner.spec index e02fbb9..2ae1d64 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -10,7 +10,7 @@ %define nss_version 3.12.8 %define cairo_version 1.6.0 %define freetype_version 2.1.9 -%define sqlite_version 3.6.16 +%define sqlite_version 3.7.1 %define notify_version 0.7.0 %define tarballdir mozilla-central # build crash reporter only on x86/x86_64 for now @@ -30,7 +30,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.13%{?pretag}%{?dist} +Release: 0.14%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -460,6 +460,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 11 2011 Tom Callaway 2.0-0.14.b8 +- enable system sqlite (see https://fedorahosted.org/fpc/ticket/34) + * Thu Dec 23 2010 Martin Stransky 2.0-0.13.b8 - reverted fix for rhbz#658471 From 770eb68ed2c318e9022ef52149545ca5c0020be7 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Fri, 14 Jan 2011 12:15:19 -0800 Subject: [PATCH 122/486] Update to 2.0 Beta 9 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5b840bb..562f858 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-4.0b7.source.tar.bz2 /xulrunner-2.0b7.source.tar.bz2 /xulrunner-2.0b8.source.tar.bz2 +/xulrunner-2.0b9.source.tar.bz2 diff --git a/sources b/sources index c923253..294f70d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -665ffbf8571e713d5da8f98e3d971e9d xulrunner-2.0b8.source.tar.bz2 +be58ef0be58cfa3d1efda63bec41fc25 xulrunner-2.0b9.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 2ae1d64..82a25f1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,12 +25,12 @@ %define version_internal 2 %define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b8 +%define pretag b9 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.14%{?pretag}%{?dist} +Release: 0.15%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -460,6 +460,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 14 2011 Christopher Aillon 2.0-0.15.b9 +- Update to 2.0 Beta 9 + * Thu Jan 11 2011 Tom Callaway 2.0-0.14.b8 - enable system sqlite (see https://fedorahosted.org/fpc/ticket/34) From eb1423694664e1c51b34866f6276616d23eef5dd Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Fri, 14 Jan 2011 12:54:13 -0800 Subject: [PATCH 123/486] Work around new features that are not available in system cairo Patch from upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=623797 --- xulrunner-2.0-system-cairo.patch | 132 +++++++++++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 134 insertions(+) create mode 100644 xulrunner-2.0-system-cairo.patch diff --git a/xulrunner-2.0-system-cairo.patch b/xulrunner-2.0-system-cairo.patch new file mode 100644 index 0000000..0cc9b0d --- /dev/null +++ b/xulrunner-2.0-system-cairo.patch @@ -0,0 +1,132 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=623797 + +work around new features that are not avaliable in system-cairo on linux +(romaxa's patch with modification for return failure with Date: Fri, 14 Jan 2011 13:25:04 -0800 Subject: [PATCH 124/486] Avoid failing to build because of the lack kof cairo tee surface support Patch from Mike Hommey at https://bugzilla.mozilla.org/show_bug.cgi?id=624684 --- xulrunner-2.0-system-cairo-tee.patch | 68 ++++++++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 70 insertions(+) create mode 100644 xulrunner-2.0-system-cairo-tee.patch diff --git a/xulrunner-2.0-system-cairo-tee.patch b/xulrunner-2.0-system-cairo-tee.patch new file mode 100644 index 0000000..1207036 --- /dev/null +++ b/xulrunner-2.0-system-cairo-tee.patch @@ -0,0 +1,68 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=624684 + +commit c9e4f80ccf3de8f17c95c701edd14265d23db4e3 +Author: Mike Hommey +Date: Tue Jan 11 12:09:12 2011 +0100 + + Avoid failing to build because of the lack of cairo tee surface support + +diff --git a/gfx/thebes/gfxContext.cpp b/gfx/thebes/gfxContext.cpp +index f271ea2..f4606ee 100644 +--- a/gfx/thebes/gfxContext.cpp ++++ b/gfx/thebes/gfxContext.cpp +@@ -777,6 +777,7 @@ gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content) + cairo_push_group_with_content(mCairo, CAIRO_CONTENT_COLOR); + nsRefPtr d = CurrentSurface(); + ++#if CAIRO_HAS_TEE_SURFACE + if (d->GetType() == gfxASurface::SurfaceTypeTee) { + NS_ASSERTION(s->GetType() == gfxASurface::SurfaceTypeTee, "Mismatched types"); + nsAutoTArray,2> ss; +@@ -787,7 +788,9 @@ gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content) + for (PRUint32 i = 0; i < ss.Length(); ++i) { + CopySurface(ss[i], ds[i]); + } +- } else { ++ } else ++#endif ++ { + CopySurface(s, d); + } + d->SetOpaqueRect(s->GetOpaqueRect()); +diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp +index ecb2d36..dd22c81 100644 +--- a/gfx/thebes/gfxTeeSurface.cpp ++++ b/gfx/thebes/gfxTeeSurface.cpp +@@ -39,6 +39,7 @@ + #include "cairo-tee.h" + #endif + ++#if CAIRO_HAS_TEE_SURFACE + gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf) + { + Init(csurf, PR_TRUE); +@@ -75,3 +76,4 @@ gfxTeeSurface::GetSurfaces(nsTArray >* aSurfaces) + *elem = Wrap(csurf); + } + } ++#endif +diff --git a/gfx/thebes/gfxTeeSurface.h b/gfx/thebes/gfxTeeSurface.h +index cb3981f..93c3610 100644 +--- a/gfx/thebes/gfxTeeSurface.h ++++ b/gfx/thebes/gfxTeeSurface.h +@@ -41,6 +41,7 @@ + #include "gfxASurface.h" + #include "nsTArray.h" + ++#if CAIRO_HAS_TEE_SURFACE + /** + * Wraps a cairo_tee_surface. The first surface in the surface list is the + * primary surface, which answers all surface queries (including size). +@@ -55,5 +56,6 @@ public: + + void GetSurfaces(nsTArray > *aSurfaces); + }; ++#endif + + #endif /* GFX_TEESURFACE_H */ + diff --git a/xulrunner.spec b/xulrunner.spec index 4645f40..d8b86a4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -52,6 +52,7 @@ Patch12: xulrunner-2.0-64bit-big-endian.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch Patch15: xulrunner-2.0-system-cairo.patch +Patch16: xulrunner-2.0-system-cairo-tee.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -157,6 +158,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types %patch15 -p1 -b .system-cairo +%patch16 -p1 -b .system-cairo-tee %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo From 7f7dd1651be99524816a7c227eec574232b04bbf Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Fri, 14 Jan 2011 14:13:43 -0800 Subject: [PATCH 125/486] Modify the cairo patches to get them to compile xulrunner-2.0-system-cairo.patch: Drop the changes for gfx/thebes/gfxTeeSurface.cpp xulrunner-2.0-system-cairo.patch: Re-diff gfx/thebes/gfxTeeSurface.cpp per above changes --- xulrunner-2.0-system-cairo-tee.patch | 6 ++---- xulrunner-2.0-system-cairo.patch | 25 ------------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/xulrunner-2.0-system-cairo-tee.patch b/xulrunner-2.0-system-cairo-tee.patch index 1207036..1014009 100644 --- a/xulrunner-2.0-system-cairo-tee.patch +++ b/xulrunner-2.0-system-cairo-tee.patch @@ -1,5 +1,3 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=624684 - commit c9e4f80ccf3de8f17c95c701edd14265d23db4e3 Author: Mike Hommey Date: Tue Jan 11 12:09:12 2011 +0100 @@ -34,8 +32,8 @@ index ecb2d36..dd22c81 100644 --- a/gfx/thebes/gfxTeeSurface.cpp +++ b/gfx/thebes/gfxTeeSurface.cpp @@ -39,6 +39,7 @@ - #include "cairo-tee.h" - #endif + + #include "cairo.h" +#if CAIRO_HAS_TEE_SURFACE gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf) diff --git a/xulrunner-2.0-system-cairo.patch b/xulrunner-2.0-system-cairo.patch index 0cc9b0d..20f236f 100644 --- a/xulrunner-2.0-system-cairo.patch +++ b/xulrunner-2.0-system-cairo.patch @@ -82,31 +82,6 @@ diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp switch (format) { case ImageFormatARGB32: case ImageFormatRGB24: -diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp ---- a/gfx/thebes/gfxTeeSurface.cpp -+++ b/gfx/thebes/gfxTeeSurface.cpp -@@ -32,17 +32,21 @@ - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - - #include "gfxTeeSurface.h" - -+#ifdef MOZ_TREE_CAIRO - #include "cairo.h" -+#else -+#include "cairo-tee.h" -+#endif - - gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf) - { - Init(csurf, PR_TRUE); - } - - gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, PRInt32 aSurfaceCount) - { diff --git a/js/src/config/system-headers b/js/src/config/system-headers --- a/js/src/config/system-headers +++ b/js/src/config/system-headers From 7a1c63380c884137dfb7d86b48674fe5a0e9d6ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 21 Jan 2011 10:31:26 +0100 Subject: [PATCH 126/486] 64bit-big-endian patch updated --- xulrunner-2.0-64bit-big-endian.patch | 43 ++++++---------------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/xulrunner-2.0-64bit-big-endian.patch b/xulrunner-2.0-64bit-big-endian.patch index 8b70ba9..a8680ae 100644 --- a/xulrunner-2.0-64bit-big-endian.patch +++ b/xulrunner-2.0-64bit-big-endian.patch @@ -1,36 +1,11 @@ diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian xulrunner-2.0/mozilla-central/js/src/jsval.h ---- xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian 2010-12-15 02:03:06.000000000 +0100 -+++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2010-12-22 12:00:57.000000000 +0100 -@@ -334,6 +334,32 @@ typedef union jsval_layout - double asDouble; - void *asPtr; - } jsval_layout; -+# elif JS_BITS_PER_WORD == 64 -+typedef union jsval_layout -+{ -+ uint64 asBits; -+#ifndef _WIN64 -+ /* MSVC does not pack these correctly :-( */ -+ struct { -+ uint64 payload47 : 47; -+ JSValueTag tag : 17; -+ } debugView; -+#endif -+ struct { -+ union { -+ int32 i32; -+ uint32 u32; -+ JSBool boo; -+ JSString *str; -+ JSObject *obj; -+ void *ptr; -+ JSWhyMagic why; +--- xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian 2011-01-20 15:59:49.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2011-01-20 16:00:21.000000000 +0100 +@@ -347,6 +347,7 @@ typedef union jsval_layout + int32 i32; + uint32 u32; + JSWhyMagic why; + jsuword word; -+ } payload; -+ } s; -+ double asDouble; -+ void *asPtr; -+} jsval_layout; - # endif /* JS_BITS_PER_WORD */ - #endif /* defined(IS_LITTLE_ENDIAN) */ - + } payload; + } s; + double asDouble; From 17a497c319a9a51136cc3a9f911046cea53ac642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 21 Jan 2011 12:03:22 +0100 Subject: [PATCH 127/486] - updated the 64bit-big-endian patch (bmo#627664) - added fix for build with --disable-methodjit (bmo#623277) --- xulrunner-2.0-no-methodjit.patch | 103 +++++++++++++++++++++++++++++++ xulrunner.spec | 12 +++- 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 xulrunner-2.0-no-methodjit.patch diff --git a/xulrunner-2.0-no-methodjit.patch b/xulrunner-2.0-no-methodjit.patch new file mode 100644 index 0000000..061927a --- /dev/null +++ b/xulrunner-2.0-no-methodjit.patch @@ -0,0 +1,103 @@ + +# HG changeset patch +# User Cameron Kaiser +# Date 1294555320 28800 +# Node ID 7372dac81910bc5b13b841848883c1dfb505264e +# Parent e69de12efa822ac94d811506f69f9b1da66e7497 +Bug 623277 - Failed to build with --disable-methodjit r=dmandelin, a=NPOTB + +diff --git a/js/src/jsdbgapi.cpp b/js/src/jsdbgapi.cpp +--- a/js/src/jsdbgapi.cpp ++++ b/js/src/jsdbgapi.cpp +@@ -111,37 +111,37 @@ IsScriptLive(JSContext *cx, JSScript *sc + #endif + + JS_PUBLIC_API(void) + JS_SetRuntimeDebugMode(JSRuntime *rt, JSBool debug) + { + rt->debugMode = debug; + } + ++#ifdef JS_METHODJIT + static void + PurgeCallICs(JSContext *cx, JSScript *start) + { +-#ifdef JS_METHODJIT + for (JSScript *script = start; + &script->links != &cx->compartment->scripts; + script = (JSScript *)script->links.next) + { + // Debug mode does not use call ICs. + if (script->debugMode) + continue; + + JS_ASSERT(!IsScriptLive(cx, script)); + + if (script->jitNormal) + script->jitNormal->nukeScriptDependentICs(); + if (script->jitCtor) + script->jitCtor->nukeScriptDependentICs(); + } ++} + #endif +-} + + JS_FRIEND_API(JSBool) + js_SetDebugMode(JSContext *cx, JSBool debug) + { + cx->compartment->debugMode = debug; + #ifdef JS_METHODJIT + for (JSScript *script = (JSScript *)cx->compartment->scripts.next; + &script->links != &cx->compartment->scripts; +diff --git a/js/src/jsinterpinlines.h b/js/src/jsinterpinlines.h +--- a/js/src/jsinterpinlines.h ++++ b/js/src/jsinterpinlines.h +@@ -581,17 +581,21 @@ InvokeSessionGuard::invoke(JSContext *cx + { + /* N.B. Must be kept in sync with Invoke */ + + /* Refer to canonical (callee, this) for optimized() sessions. */ + formals_[-2] = savedCallee_; + formals_[-1] = savedThis_; + + void *code; ++#ifdef JS_METHODJIT + if (!optimized() || !(code = script_->getJIT(false /* !constructing */)->invokeEntry)) ++#else ++ if (!optimized()) ++#endif + return Invoke(cx, args_, 0); + + /* Clear any garbage left from the last Invoke. */ + JSStackFrame *fp = frame_.fp(); + fp->clearMissingArgs(); + fp->resetInvokeCallFrame(); + SetValueRangeToUndefined(fp->slots(), script_->nfixed); + +diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp +--- a/js/src/shell/js.cpp ++++ b/js/src/shell/js.cpp +@@ -4245,17 +4245,21 @@ Deserialize(JSContext *cx, uintN argc, j + } + JS_SET_RVAL(cx, vp, v); + return true; + } + + JSBool + MJitStats(JSContext *cx, uintN argc, jsval *vp) + { +- JS_SET_RVAL(cx, vp, INT_TO_JSVAL(cx->runtime->mjitMemoryUsed)); ++#ifdef JS_METHODJIT ++ JS_SET_RVAL(cx, vp, INT_TO_JSVAL(cx->runtime->mjitMemoryUsed)); ++#else ++ JS_SET_RVAL(cx, vp, JSVAL_VOID); ++#endif + return true; + } + + JSBool + StringStats(JSContext *cx, uintN argc, jsval *vp) + { + JS_SET_RVAL(cx, vp, INT_TO_JSVAL(cx->runtime->stringMemoryUsed)); + return true; + diff --git a/xulrunner.spec b/xulrunner.spec index d8b86a4..4775ce6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -30,7 +30,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.15%{?pretag}%{?dist} +Release: 0.16%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -48,11 +48,16 @@ Patch1: mozilla-build.patch Patch3: firefox4-jemalloc.patch Patch9: mozilla-build-sbrk.patch Patch11: mozilla-malloc.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=627664 Patch12: xulrunner-2.0-64bit-big-endian.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=627668 Patch13: xulrunner-2.0-secondary-jit.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=627669 Patch14: xulrunner-2.0-chromium-types.patch Patch15: xulrunner-2.0-system-cairo.patch Patch16: xulrunner-2.0-system-cairo-tee.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=623277 (resolved in changeset 60794) +Patch17: xulrunner-2.0-no-methodjit.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -159,6 +164,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch14 -p2 -b .chromium-types %patch15 -p1 -b .system-cairo %patch16 -p1 -b .system-cairo-tee +%patch17 -p1 -b .no-methodjit %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo @@ -464,6 +470,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 21 2011 Dan Horák - 2.0-0.16.b9 +- updated the 64bit-big-endian patch (bmo#627664) +- added fix for build with --disable-methodjit (bmo#623277) + * Fri Jan 14 2011 Christopher Aillon 2.0-0.15.b9 - Update to 2.0 Beta 9 From e8acd9ae6821ad0137b63a955e73e901b937d39e Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 25 Jan 2011 08:50:56 -0800 Subject: [PATCH 128/486] Update the parallel build flags Up to -j4 is supported on x86 arches (upstream builds with -j4) Leave the other arches out still since they are not proven to be reliable. --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 4775ce6..1df6212 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -211,10 +211,13 @@ export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 -%ifnarch ppc ppc64 s390 s390x +# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, +# however builds tend to fail on other arches when building in parallel. +%ifarch %{ix86} x86_64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" -[ "$RPM_BUILD_NCPUS" -gt 1 ] && MOZ_SMP_FLAGS=-j2 +[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 %endif export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}" From fb5ad6bfeced2ead1e944523977a4bd1504da064 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 25 Jan 2011 08:54:52 -0800 Subject: [PATCH 129/486] Fix up optimize flags Don't pass the opt flags twice to moz, as that will just cause them to be duplicated in the compile lines. Also, only need to execute sed once. --- xulrunner-mozconfig | 2 +- xulrunner.spec | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 0a3d18e..e27a116 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -18,7 +18,7 @@ ac_add_options --disable-tests ac_add_options --disable-mochitest ac_add_options --disable-installer ac_add_options --disable-debug -ac_add_options --enable-optimize="$MOZ_OPT_FLAGS" +ac_add_options --enable-optimize ac_add_options --enable-xinerama ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-pango diff --git a/xulrunner.spec b/xulrunner.spec index 1df6212..e63bdfa 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -203,7 +203,8 @@ MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} # Mozilla builds with -Wall with exception of a few warnings which show up # everywhere in the code; so, don't override that. # and disable C++ exceptions -export MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions/-fno-exceptions/g') +MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | \ + %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS From e130f22b0cc916889cbbcdb1f5cdeef4a750c87b Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 25 Jan 2011 08:58:32 -0800 Subject: [PATCH 130/486] Move bug links to the individual patch files --- xulrunner-2.0-64bit-big-endian.patch | 2 ++ xulrunner-2.0-chromium-types.patch | 2 ++ xulrunner-2.0-no-methodjit.patch | 1 + xulrunner-2.0-secondary-jit.patch | 2 ++ xulrunner.spec | 4 ---- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xulrunner-2.0-64bit-big-endian.patch b/xulrunner-2.0-64bit-big-endian.patch index a8680ae..8cf3fc9 100644 --- a/xulrunner-2.0-64bit-big-endian.patch +++ b/xulrunner-2.0-64bit-big-endian.patch @@ -1,3 +1,5 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627664 + diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian xulrunner-2.0/mozilla-central/js/src/jsval.h --- xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian 2011-01-20 15:59:49.000000000 +0100 +++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2011-01-20 16:00:21.000000000 +0100 diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch index 0ac65d6..65dbc59 100644 --- a/xulrunner-2.0-chromium-types.patch +++ b/xulrunner-2.0-chromium-types.patch @@ -1,3 +1,5 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627669 + diff -up xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h --- xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h.chromium-types 2010-11-04 21:05:47.000000000 +0100 +++ xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h 2010-11-15 14:20:12.000000000 +0100 diff --git a/xulrunner-2.0-no-methodjit.patch b/xulrunner-2.0-no-methodjit.patch index 061927a..a7febca 100644 --- a/xulrunner-2.0-no-methodjit.patch +++ b/xulrunner-2.0-no-methodjit.patch @@ -1,3 +1,4 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=623277 # HG changeset patch # User Cameron Kaiser diff --git a/xulrunner-2.0-secondary-jit.patch b/xulrunner-2.0-secondary-jit.patch index 54ab913..4656129 100644 --- a/xulrunner-2.0-secondary-jit.patch +++ b/xulrunner-2.0-secondary-jit.patch @@ -1,3 +1,5 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627668 + diff -up xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit xulrunner-2.0/mozilla-central/js/src/Makefile.in --- xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit 2010-11-04 21:05:48.000000000 +0100 +++ xulrunner-2.0/mozilla-central/js/src/Makefile.in 2010-11-15 14:17:39.000000000 +0100 diff --git a/xulrunner.spec b/xulrunner.spec index e63bdfa..21b0d87 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -48,15 +48,11 @@ Patch1: mozilla-build.patch Patch3: firefox4-jemalloc.patch Patch9: mozilla-build-sbrk.patch Patch11: mozilla-malloc.patch -# https://bugzilla.mozilla.org/show_bug.cgi?id=627664 Patch12: xulrunner-2.0-64bit-big-endian.patch -# https://bugzilla.mozilla.org/show_bug.cgi?id=627668 Patch13: xulrunner-2.0-secondary-jit.patch -# https://bugzilla.mozilla.org/show_bug.cgi?id=627669 Patch14: xulrunner-2.0-chromium-types.patch Patch15: xulrunner-2.0-system-cairo.patch Patch16: xulrunner-2.0-system-cairo-tee.patch -# https://bugzilla.mozilla.org/show_bug.cgi?id=623277 (resolved in changeset 60794) Patch17: xulrunner-2.0-no-methodjit.patch # Fedora specific patches From 361738c81f7c9e18a64b3da45b1169987da5b68a Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 25 Jan 2011 09:06:35 -0800 Subject: [PATCH 131/486] Build with -fpermissive GCC 4.6 got stricter. Enable this for now so we can build. Also, fix up the comment about exceptions. --- xulrunner.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 21b0d87..3c4294a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -196,11 +196,16 @@ cd %{tarballdir} INTERNAL_GECKO=%{version_internal} MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} + +# -fpermissive is needed to build with gcc 4.6+ which has become stricter +# # Mozilla builds with -Wall with exception of a few warnings which show up # everywhere in the code; so, don't override that. -# and disable C++ exceptions -MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | \ - %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') +# +# Disable C++ exceptions since Mozilla code is not exception-safe +# +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ + %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS From 3d313edf01b7ab0cefef7c080316436bfb28c718 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 25 Jan 2011 11:01:32 -0800 Subject: [PATCH 132/486] Update the libnotify patch to match upstream There's a patch in https://bugzilla.mozilla.org/show_bug.cgi?id=628222 which has review --- mozilla-notify.patch | 37 ++++++++++++++++++++++++++++++++----- xulrunner.spec | 2 +- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/mozilla-notify.patch b/mozilla-notify.patch index 54a1c59..7c865de 100644 --- a/mozilla-notify.patch +++ b/mozilla-notify.patch @@ -1,12 +1,39 @@ -diff -up xulrunner-2.0/mozilla-central/toolkit/system/gnome/nsAlertsIconListener.cpp.notify xulrunner-2.0/mozilla-central/toolkit/system/gnome/nsAlertsIconListener.cpp ---- xulrunner-2.0/mozilla-central/toolkit/system/gnome/nsAlertsIconListener.cpp.notify 2010-11-02 17:02:18.266180000 -0400 -+++ xulrunner-2.0/mozilla-central/toolkit/system/gnome/nsAlertsIconListener.cpp 2010-11-02 17:02:37.699180028 -0400 -@@ -218,7 +218,7 @@ nsAlertsIconListener::ShowAlert(GdkPixbu +https://bugzilla.mozilla.org/show_bug.cgi?id=628222 + +# HG changeset patch +# User Priit Laes +# Date 1295907218 -7200 +# Node ID ebfe5822e8916cce3d1811e67f6cb95ba3caeb24 +# Parent e874889e43d1b40f16c8234d53f39126a04e6621 +Add support for libnotify-0.7+ + +diff -r e874889e43d1 -r ebfe5822e891 toolkit/system/gnome/nsAlertsIconListener.cpp +--- a/toolkit/system/gnome/nsAlertsIconListener.cpp Fri Jan 21 16:45:23 2011 -0500 ++++ b/toolkit/system/gnome/nsAlertsIconListener.cpp Tue Jan 25 00:13:38 2011 +0200 +@@ -46,6 +46,11 @@ + + #include + ++// Compatibility macro for =libnotify-0.7.0 has no support for attaching to widgets ++#if !NOTIFY_CHECK_VERSION(0,7,0) ++ , NULL ++#endif ++ ); ++ if (!mNotification) return NS_ERROR_OUT_OF_MEMORY; diff --git a/xulrunner.spec b/xulrunner.spec index 3c4294a..dc9702c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -164,7 +164,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo -%patch22 -p2 -b .notify +%patch22 -p1 -b .notify %patch23 -p1 -b .wmclass %patch24 -p1 -b .static From 359e9771a56f6171e4216dc2d7704595156f96f5 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 25 Jan 2011 12:09:32 -0800 Subject: [PATCH 133/486] Update to Beta 10 Refresh patches to apply to newer tree xulrunner-2.0-no-methodjit.patch is now upstreamed Add xulrunner-2.0-os2cc.patch Require autoconf-2.13 for updated xulrunner-2.0-system-cairo-tee.patch --- .gitignore | 1 + mozilla-libjpeg-turbo.patch | 2 +- sources | 2 +- xulrunner-2.0-no-methodjit.patch | 104 --------------------------- xulrunner-2.0-os2cc.patch | 14 ++++ xulrunner-2.0-system-cairo-tee.patch | 83 ++++++--------------- xulrunner-2.0-system-cairo.patch | 36 +++++++++- xulrunner.spec | 14 ++-- 8 files changed, 83 insertions(+), 173 deletions(-) delete mode 100644 xulrunner-2.0-no-methodjit.patch create mode 100644 xulrunner-2.0-os2cc.patch diff --git a/.gitignore b/.gitignore index 562f858..e0d9e6f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0b7.source.tar.bz2 /xulrunner-2.0b8.source.tar.bz2 /xulrunner-2.0b9.source.tar.bz2 +/xulrunner-2.0b10.source.tar.bz2 diff --git a/mozilla-libjpeg-turbo.patch b/mozilla-libjpeg-turbo.patch index 3360012..54be1a1 100644 --- a/mozilla-libjpeg-turbo.patch +++ b/mozilla-libjpeg-turbo.patch @@ -6,7 +6,7 @@ diff -up xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cp } - /* Force to use our YCbCr to Packed RGB converter when possible */ -- if (!mTransform && (gfxPlatform::GetCMSMode() != eCMSMode_All) && +- if (!mTransform && (mCMSMode != eCMSMode_All) && - mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) { - /* Special case for the most common case: transform from YCbCr direct into packed ARGB */ - mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/ diff --git a/sources b/sources index 294f70d..9d1cf71 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -be58ef0be58cfa3d1efda63bec41fc25 xulrunner-2.0b9.source.tar.bz2 +cfbd4a465e5aeb5f0a67cb0b3ad92249 xulrunner-2.0b10.source.tar.bz2 diff --git a/xulrunner-2.0-no-methodjit.patch b/xulrunner-2.0-no-methodjit.patch deleted file mode 100644 index a7febca..0000000 --- a/xulrunner-2.0-no-methodjit.patch +++ /dev/null @@ -1,104 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=623277 - -# HG changeset patch -# User Cameron Kaiser -# Date 1294555320 28800 -# Node ID 7372dac81910bc5b13b841848883c1dfb505264e -# Parent e69de12efa822ac94d811506f69f9b1da66e7497 -Bug 623277 - Failed to build with --disable-methodjit r=dmandelin, a=NPOTB - -diff --git a/js/src/jsdbgapi.cpp b/js/src/jsdbgapi.cpp ---- a/js/src/jsdbgapi.cpp -+++ b/js/src/jsdbgapi.cpp -@@ -111,37 +111,37 @@ IsScriptLive(JSContext *cx, JSScript *sc - #endif - - JS_PUBLIC_API(void) - JS_SetRuntimeDebugMode(JSRuntime *rt, JSBool debug) - { - rt->debugMode = debug; - } - -+#ifdef JS_METHODJIT - static void - PurgeCallICs(JSContext *cx, JSScript *start) - { --#ifdef JS_METHODJIT - for (JSScript *script = start; - &script->links != &cx->compartment->scripts; - script = (JSScript *)script->links.next) - { - // Debug mode does not use call ICs. - if (script->debugMode) - continue; - - JS_ASSERT(!IsScriptLive(cx, script)); - - if (script->jitNormal) - script->jitNormal->nukeScriptDependentICs(); - if (script->jitCtor) - script->jitCtor->nukeScriptDependentICs(); - } -+} - #endif --} - - JS_FRIEND_API(JSBool) - js_SetDebugMode(JSContext *cx, JSBool debug) - { - cx->compartment->debugMode = debug; - #ifdef JS_METHODJIT - for (JSScript *script = (JSScript *)cx->compartment->scripts.next; - &script->links != &cx->compartment->scripts; -diff --git a/js/src/jsinterpinlines.h b/js/src/jsinterpinlines.h ---- a/js/src/jsinterpinlines.h -+++ b/js/src/jsinterpinlines.h -@@ -581,17 +581,21 @@ InvokeSessionGuard::invoke(JSContext *cx - { - /* N.B. Must be kept in sync with Invoke */ - - /* Refer to canonical (callee, this) for optimized() sessions. */ - formals_[-2] = savedCallee_; - formals_[-1] = savedThis_; - - void *code; -+#ifdef JS_METHODJIT - if (!optimized() || !(code = script_->getJIT(false /* !constructing */)->invokeEntry)) -+#else -+ if (!optimized()) -+#endif - return Invoke(cx, args_, 0); - - /* Clear any garbage left from the last Invoke. */ - JSStackFrame *fp = frame_.fp(); - fp->clearMissingArgs(); - fp->resetInvokeCallFrame(); - SetValueRangeToUndefined(fp->slots(), script_->nfixed); - -diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp ---- a/js/src/shell/js.cpp -+++ b/js/src/shell/js.cpp -@@ -4245,17 +4245,21 @@ Deserialize(JSContext *cx, uintN argc, j - } - JS_SET_RVAL(cx, vp, v); - return true; - } - - JSBool - MJitStats(JSContext *cx, uintN argc, jsval *vp) - { -- JS_SET_RVAL(cx, vp, INT_TO_JSVAL(cx->runtime->mjitMemoryUsed)); -+#ifdef JS_METHODJIT -+ JS_SET_RVAL(cx, vp, INT_TO_JSVAL(cx->runtime->mjitMemoryUsed)); -+#else -+ JS_SET_RVAL(cx, vp, JSVAL_VOID); -+#endif - return true; - } - - JSBool - StringStats(JSContext *cx, uintN argc, jsval *vp) - { - JS_SET_RVAL(cx, vp, INT_TO_JSVAL(cx->runtime->stringMemoryUsed)); - return true; - diff --git a/xulrunner-2.0-os2cc.patch b/xulrunner-2.0-os2cc.patch new file mode 100644 index 0000000..c6c32a7 --- /dev/null +++ b/xulrunner-2.0-os2cc.patch @@ -0,0 +1,14 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=628252 + +diff --git a/gfx/ots/src/os2.cc b/gfx/ots/src/os2.cc +--- a/gfx/ots/src/os2.cc ++++ b/gfx/ots/src/os2.cc +@@ -3,4 +3,6 @@ + // found in the LICENSE file. + ++#include ++ + #include "os2.h" + + + diff --git a/xulrunner-2.0-system-cairo-tee.patch b/xulrunner-2.0-system-cairo-tee.patch index 1014009..85c8447 100644 --- a/xulrunner-2.0-system-cairo-tee.patch +++ b/xulrunner-2.0-system-cairo-tee.patch @@ -1,66 +1,29 @@ -commit c9e4f80ccf3de8f17c95c701edd14265d23db4e3 -Author: Mike Hommey -Date: Tue Jan 11 12:09:12 2011 +0100 +https://bugzilla.mozilla.org/show_bug.cgi?id=623797 - Avoid failing to build because of the lack of cairo tee surface support +# HG changeset patch +# User Jory A. Pratt (anarchy@gentoo.org) +# Parent b27366868c807e07a11741a7a2eb404ebc08e5e7 +Check to ensure system cairo has tee backend support, part 2 bug #623797 -diff --git a/gfx/thebes/gfxContext.cpp b/gfx/thebes/gfxContext.cpp -index f271ea2..f4606ee 100644 ---- a/gfx/thebes/gfxContext.cpp -+++ b/gfx/thebes/gfxContext.cpp -@@ -777,6 +777,7 @@ gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content) - cairo_push_group_with_content(mCairo, CAIRO_CONTENT_COLOR); - nsRefPtr d = CurrentSurface(); +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -8714,16 +8714,17 @@ if test "$MOZ_TREE_CAIRO"; then -+#if CAIRO_HAS_TEE_SURFACE - if (d->GetType() == gfxASurface::SurfaceTypeTee) { - NS_ASSERTION(s->GetType() == gfxASurface::SurfaceTypeTee, "Mismatched types"); - nsAutoTArray,2> ss; -@@ -787,7 +788,9 @@ gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content) - for (PRUint32 i = 0; i < ss.Length(); ++i) { - CopySurface(ss[i], ds[i]); - } -- } else { -+ } else -+#endif -+ { - CopySurface(s, d); - } - d->SetOpaqueRect(s->GetOpaqueRect()); -diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp -index ecb2d36..dd22c81 100644 ---- a/gfx/thebes/gfxTeeSurface.cpp -+++ b/gfx/thebes/gfxTeeSurface.cpp -@@ -39,6 +39,7 @@ + CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h + mv -f $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig 2> /dev/null - #include "cairo.h" + else + PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION pixman-1 freetype2 fontconfig) + 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_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS" + fi + fi -+#if CAIRO_HAS_TEE_SURFACE - gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf) - { - Init(csurf, PR_TRUE); -@@ -75,3 +76,4 @@ gfxTeeSurface::GetSurfaces(nsTArray >* aSurfaces) - *elem = Wrap(csurf); - } - } -+#endif -diff --git a/gfx/thebes/gfxTeeSurface.h b/gfx/thebes/gfxTeeSurface.h -index cb3981f..93c3610 100644 ---- a/gfx/thebes/gfxTeeSurface.h -+++ b/gfx/thebes/gfxTeeSurface.h -@@ -41,6 +41,7 @@ - #include "gfxASurface.h" - #include "nsTArray.h" - -+#if CAIRO_HAS_TEE_SURFACE - /** - * Wraps a cairo_tee_surface. The first surface in the surface list is the - * primary surface, which answers all surface queries (including size). -@@ -55,5 +56,6 @@ public: - - void GetSurfaces(nsTArray > *aSurfaces); - }; -+#endif - - #endif /* GFX_TEESURFACE_H */ + AC_SUBST(MOZ_TREE_CAIRO) diff --git a/xulrunner-2.0-system-cairo.patch b/xulrunner-2.0-system-cairo.patch index 20f236f..5300f38 100644 --- a/xulrunner-2.0-system-cairo.patch +++ b/xulrunner-2.0-system-cairo.patch @@ -1,7 +1,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=623797 work around new features that are not avaliable in system-cairo on linux -(romaxa's patch with modification for return failure with - 2.0-0.17 +- Update to 2.0 Beta 10 + * Fri Jan 21 2011 Dan Horák - 2.0-0.16.b9 - updated the 64bit-big-endian patch (bmo#627664) - added fix for build with --disable-methodjit (bmo#623277) From 5b49dc5f7b621a3030db869637c8278a3afe87ee Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 25 Jan 2011 13:42:54 -0800 Subject: [PATCH 134/486] Revert part of fb5ad6b CXXFLAGS is apparently not picked up by xpcom/glue which is one of the places we need -fpermissive in order to build with GCC 4.6. --- xulrunner-mozconfig | 2 +- xulrunner.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index e27a116..0a3d18e 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -18,7 +18,7 @@ ac_add_options --disable-tests ac_add_options --disable-mochitest ac_add_options --disable-installer ac_add_options --disable-debug -ac_add_options --enable-optimize +ac_add_options --enable-optimize="$MOZ_OPT_FLAGS" ac_add_options --enable-xinerama ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-pango diff --git a/xulrunner.spec b/xulrunner.spec index db76971..e1bf46c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -207,8 +207,8 @@ MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} # # Disable C++ exceptions since Mozilla code is not exception-safe # -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ - %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') +export MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ + %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS From f56cc2e4410867cac877d60f63426a0549ebd535 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 25 Jan 2011 16:12:29 -0800 Subject: [PATCH 135/486] Kill the man page It's not installed, and besides, it's an extremely out-dated version of the firefox man page. --- xulrunner.1 | 125 ------------------------------------------------- xulrunner.spec | 1 - 2 files changed, 126 deletions(-) delete mode 100644 xulrunner.1 diff --git a/xulrunner.1 b/xulrunner.1 deleted file mode 100644 index 2086325..0000000 --- a/xulrunner.1 +++ /dev/null @@ -1,125 +0,0 @@ -.TH FIREFOX 1 "August 07, 2001" firefox "Linux User's Manual" -.SH NAME -firefox \- a Web browser for X11 derived from the Mozilla browser - -.SH SYNOPSIS -.B firefox -[\fIOPTIONS\fR] [\fIURL\fR] - -.B firefox-bin -[\fIOPTIONS\fR] [\fIURL\fR] - -.SH DESCRIPTION -\fBMozilla Firefox\fR is an open-source web browser, designed for -standards compliance, performance and portability. - -.SH USAGE -\fBfirefox\fR is a simple shell script that will set up the -environment for the actual executable, \fBfirefox-bin\fR. - -.SH OPTIONS -A summary of the options supported by \fBfirefox\fR is included below. - -.SS "GTK options" -\fB\-\-gdk-debug=\fR\fIFLAGS\fR -Gdk debugging flags to set -.TP -\fB\-\-gdk-no-debug=\fR\fIFLAGS\fR -Gdk debugging flags to unset -.TP -\fB\-\-gtk-debug=\fR\fIFLAGS\fR -Gtk+ debugging flags to set -.TP -\fB\-\-gtk-no-debug=\fR\fIFLAGS\fR -Gtk+ debugging flags to unset -.TP -\fB\-\-gtk-module=\fR\fIMODULE\fR -Load an additional Gtk module - -.SS "X11 options" -.TP -.BI \-\-display= DISPLAY -X display to use -.TP -.B \--sync -Make X calls synchronous -.TP -.B \-\-no-xshm -Don't use X shared memory extension -.TP -.BI \-\-xim-preedit= STYLE -.TP -.BI \-\-xim-status= STYLE -.TP -.B \-\-g-fatal-warnings -Make all warnings fatal - -.SS "Firefox options" -.TP -\fB\-height\fR \fIvalue\fR -Set height of startup window to \fIvalue\fR. -.TP -.B \-h, \-help -Show summary of options. -.TP -.B \-installer -Start with 4.x migration window. -.TP -\fB\-width\fR \fIvalue\fR -Set width of startup window to \fIvalue\fR. -.TP -.B \-v, \-version -Print \fB/usr/bin/firefox-bin\fR version. -.TP -\fB\-CreateProfile\fR \fIprofile\fR -Create \fIprofile\fR. -.TP -\fB\-P\fR \fIprofile\fR -Start with \fIprofile\fR. -.TP -.B \-ProfileWizard -Start with profile wizard. -.TP -.B \-ProfileManager -Start with profile manager. -.TP -.B \-SelectProfile -Start with profile selection dialog. -.TP -\fB\-lang\fR \fIlang-region\fR -Start with \fIlang-region\fR resources. -.TP -\fB\-remote\fR \fIcommand\fR -Execute \fIcommand\fR in an already running Firefox process. For more info, -see: \fIhttp://www.mozilla.org/unix/remote.html\fR -.TP -.B \-splash -Enable splash screen. -.TP -.B \-jsconsole -Start with Javascript Console -.TP -\fB\-chrome\fR \fIurl\fR -Load the specified chrome. -.TP - -.SH FILES -\fI/usr/bin/firefox\fR - shell script wrapping -\fBfirefox\fR -.br -\fI/usr/lib/mozilla/firefox-bin\fR - \fBfirefox\fR -executable - -.SH VERSION -1.0 - -.SH BUGS -To report a bug, please visit \fIhttp://bugzilla.mozilla.org/\fR - -.SH "SEE ALSO" -.BR mozilla(1) - -.SH AUTHORS -.TP -.B The Mozilla Organization -.I http://www.mozilla.org/about.html diff --git a/xulrunner.spec b/xulrunner.spec index e1bf46c..9fcdab8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -40,7 +40,6 @@ Source10: %{name}-mozconfig Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in -Source23: %{name}.1 # build patches Patch0: xulrunner-version.patch From ff1fc1adb24b2e31cd85ab0aaa6c3691988cf9aa Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 26 Jan 2011 23:17:06 -0800 Subject: [PATCH 136/486] Fix drop down window location Fixes https://bugzilla.redhat.com/show_bug.cgi?id=672718 https://bugzilla.mozilla.org/show_bug.cgi?id=628861 See https://bugzilla.mozilla.org/show_bug.cgi?id=562138#c8 --- revert-562138.patch | 290 ++++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 8 +- 2 files changed, 297 insertions(+), 1 deletion(-) create mode 100644 revert-562138.patch diff --git a/revert-562138.patch b/revert-562138.patch new file mode 100644 index 0000000..cc97d00 --- /dev/null +++ b/revert-562138.patch @@ -0,0 +1,290 @@ +See https://bugzilla.mozilla.org/show_bug.cgi?id=562138#c8 + +# HG changeset patch +# User Markus Stange +# Date 1296111298 -3600 +# Node ID 433f39574cd72d30e47e6500fad52a0398753367 +# Parent f948c56cb86f83354f0bd9d579cd51167464b4f2 +Backed out changeset f948c56cb86f (bug 562138 part 2) because it depends on changeset 44c42d8b8d08 which is going to be backed out. + +diff --git a/widget/src/cocoa/nsCocoaWindow.h b/widget/src/cocoa/nsCocoaWindow.h +--- a/widget/src/cocoa/nsCocoaWindow.h ++++ b/widget/src/cocoa/nsCocoaWindow.h +@@ -291,17 +291,16 @@ public: + NS_IMETHOD ResetInputState(); + + NS_IMETHOD BeginSecureKeyboardInput(); + NS_IMETHOD EndSecureKeyboardInput(); + + static void UnifiedShading(void* aInfo, const CGFloat* aIn, CGFloat* aOut); + + void SetPopupWindowLevel(); +- PRBool IsVisible(); + + PRBool IsChildInFailingLeftClickThrough(NSView *aChild); + PRBool ShouldFocusPlugin(); + + NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent); + protected: + + nsresult CreateNativeWindow(const NSRect &aRect, +@@ -335,14 +334,13 @@ protected: + PRInt32 mShadowStyle; + NSUInteger mWindowFilter; + + PRPackedBool mWindowMadeHere; // true if we created the window, false for embedding + PRPackedBool mSheetNeedsShow; // if this is a sheet, are we waiting to be shown? + // this is used for sibling sheet contention only + PRPackedBool mFullScreen; + PRPackedBool mModal; +- PRPackedBool mIsShowing; // PR_TRUE during a Show(PR_TRUE) call. + + PRInt32 mNumModalDescendents; + }; + + #endif // nsCocoaWindow_h_ +diff --git a/widget/src/cocoa/nsCocoaWindow.mm b/widget/src/cocoa/nsCocoaWindow.mm +--- a/widget/src/cocoa/nsCocoaWindow.mm ++++ b/widget/src/cocoa/nsCocoaWindow.mm +@@ -143,17 +143,16 @@ nsCocoaWindow::nsCocoaWindow() + , mSheetWindowParent(nil) + , mPopupContentView(nil) + , mShadowStyle(NS_STYLE_WINDOW_SHADOW_DEFAULT) + , mWindowFilter(0) + , mWindowMadeHere(PR_FALSE) + , mSheetNeedsShow(PR_FALSE) + , mFullScreen(PR_FALSE) + , mModal(PR_FALSE) +-, mIsShowing(PR_FALSE) + , mNumModalDescendents(0) + { + + } + + void nsCocoaWindow::DestroyNativeWindow() + { + NS_OBJC_BEGIN_TRY_ABORT_BLOCK; +@@ -528,30 +527,24 @@ void* nsCocoaWindow::GetNativeData(PRUin + break; + } + + return retVal; + + NS_OBJC_END_TRY_ABORT_BLOCK_NSNULL; + } + +-PRBool +-nsCocoaWindow::IsVisible() +-{ +- NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN; +- +- return [mWindow isVisible] || mSheetNeedsShow || mIsShowing; +- +- NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE); +-} +- + NS_IMETHODIMP nsCocoaWindow::IsVisible(PRBool & aState) + { +- aState = IsVisible(); ++ NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; ++ ++ aState = ([mWindow isVisible] || mSheetNeedsShow); + return NS_OK; ++ ++ NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; + } + + NS_IMETHODIMP nsCocoaWindow::SetModal(PRBool aState) + { + // This is used during startup (outside the event loop) when creating + // the add-ons compatibility checking dialog and the profile manager UI; + // therefore, it needs to provide an autorelease pool to avoid cocoa + // objects leaking. +@@ -626,42 +619,29 @@ NS_IMETHODIMP nsCocoaWindow::SetModal(PR + + // Hide or show this window + NS_IMETHODIMP nsCocoaWindow::Show(PRBool bState) + { + NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; + + // We need to re-execute sometimes in order to bring already-visible + // windows forward. +- if (!bState && !IsVisible()) ++ if (!mSheetNeedsShow && !bState && ![mWindow isVisible]) + return NS_OK; + + nsIWidget* parentWidget = mParent; + nsCOMPtr piParentWidget(do_QueryInterface(parentWidget)); + NSWindow* nativeParentWindow = (parentWidget) ? + (NSWindow*)parentWidget->GetNativeData(NS_NATIVE_WINDOW) : nil; + + if (bState && !mBounds.IsEmpty()) { +- // IsVisible can be entered from inside this method, for example through +- // synchronous painting. Unfortunately, at that point [mWindow isVisible] +- // still returns NO, so we use mIsShowing to tell us that we should return +- // true from IsVisible anyway. +- mIsShowing = PR_TRUE; +- +- if (mPopupContentView) { +- // Ensure our content view is visible. We never need to hide it. +- mPopupContentView->Show(PR_TRUE); +- } +- + if (mWindowType == eWindowType_sheet) { + // bail if no parent window (its basically what we do in Carbon) +- if (!nativeParentWindow || !piParentWidget) { +- mIsShowing = PR_FALSE; ++ if (!nativeParentWindow || !piParentWidget) + return NS_ERROR_FAILURE; +- } + + NSWindow* topNonSheetWindow = nativeParentWindow; + + // If this sheet is the child of another sheet, hide the parent so that + // this sheet can be displayed. Leave the parent mSheetNeedsShow alone, + // that is only used to handle sibling sheet contention. The parent will + // return once there are no more child sheets. + PRBool parentIsSheet = PR_FALSE; +@@ -744,17 +724,16 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool + } + else { + [mWindow setAcceptsMouseMovedEvents:YES]; + NS_OBJC_BEGIN_TRY_LOGONLY_BLOCK; + [mWindow makeKeyAndOrderFront:nil]; + NS_OBJC_END_TRY_LOGONLY_BLOCK; + SendSetZLevelEvent(); + } +- mIsShowing = PR_FALSE; + } + else { + // roll up any popups if a top-level window is going away + if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) + RollUpPopups(); + + // now get rid of the window/sheet + if (mWindowType == eWindowType_sheet) { +@@ -850,16 +829,19 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool + if ([mWindow isKindOfClass:[PopupWindow class]] && + [(PopupWindow*) mWindow isContextMenu]) { + [[NSDistributedNotificationCenter defaultCenter] + postNotificationName:@"com.apple.HIToolbox.endMenuTrackingNotification" + object:@"org.mozilla.gecko.PopupWindow"]; + } + } + } ++ ++ if (mPopupContentView) ++ mPopupContentView->Show(bState); + + return NS_OK; + + NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; + } + + struct ShadowParams { + float standardDeviation; + + +# HG changeset patch +# User Markus Stange +# Date 1296111382 -3600 +# Node ID 2cfc443d28ee87835e17b665d41be3a6fb0dca23 +# Parent 44c42d8b8d087ed22c02ffe90f7d23f84ee8abbb +Backed out changeset 44c42d8b8d08 (bug 562138 part 1) because it caused bug 627824 and bug 628861. + +diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp +--- a/view/src/nsView.cpp ++++ b/view/src/nsView.cpp +@@ -433,63 +433,51 @@ nsIntRect nsIView::CalcWidgetBounds(nsWi + void nsView::DoResetWidgetBounds(PRBool aMoveOnly, + PRBool aInvalidateChangedSize) { + // The geometry of a root view's widget is controlled externally, + // NOT by sizing or positioning the view + if (mViewManager->GetRootView() == this) { + return; + } + +- NS_PRECONDITION(mWindow, "Why was this called??"); +- + nsIntRect curBounds; + mWindow->GetBounds(curBounds); + + nsWindowType type; + mWindow->GetWindowType(type); + + if (curBounds.IsEmpty() && mDimBounds.IsEmpty() && type == eWindowType_popup) { + // Don't manipulate empty popup widgets. For example there's no point + // moving hidden comboboxes around, or doing X server roundtrips + // to compute their true screen position. This could mean that WidgetToScreen + // operations on these widgets don't return up-to-date values, but popup + // positions aren't reliable anyway because of correction to be on or off-screen. + return; + } + ++ NS_PRECONDITION(mWindow, "Why was this called??"); ++ + nsIntRect newBounds = CalcWidgetBounds(type); + + PRBool changedPos = curBounds.TopLeft() != newBounds.TopLeft(); + PRBool changedSize = curBounds.Size() != newBounds.Size(); + +- PRBool curVisibility; +- mWindow->IsVisible(curVisibility); +- PRBool newVisibility = IsEffectivelyVisible(); +- +- if (curVisibility && !newVisibility) { +- mWindow->Show(PR_FALSE); +- } +- + // Child views are never attached to top level widgets, this is safe. + if (changedPos) { + if (changedSize && !aMoveOnly) { + mWindow->Resize(newBounds.x, newBounds.y, newBounds.width, newBounds.height, + aInvalidateChangedSize); + } else { + mWindow->Move(newBounds.x, newBounds.y); + } + } else { + if (changedSize && !aMoveOnly) { + mWindow->Resize(newBounds.width, newBounds.height, aInvalidateChangedSize); + } // else do nothing! + } +- +- if (!curVisibility && newVisibility) { +- mWindow->Show(PR_TRUE); +- } + } + + void nsView::SetDimensions(const nsRect& aRect, PRBool aPaint, PRBool aResizeWidget) + { + nsRect dims = aRect; + dims.MoveBy(mPosX, mPosY); + + // Don't use nsRect's operator== here, since it returns true when +@@ -511,17 +499,23 @@ void nsView::NotifyEffectiveVisibilityCh + { + if (!aEffectivelyVisible) + { + DropMouseGrabbing(); + } + + if (nsnull != mWindow) + { +- ResetWidgetBounds(PR_FALSE, PR_TRUE, PR_FALSE); ++ if (aEffectivelyVisible) ++ { ++ DoResetWidgetBounds(PR_FALSE, PR_TRUE); ++ mWindow->Show(PR_TRUE); ++ } ++ else ++ mWindow->Show(PR_FALSE); + } + + for (nsView* child = mFirstChild; child; child = child->mNextSibling) { + if (child->mVis == nsViewVisibility_kHide) { + // It was effectively hidden and still is + continue; + } + // Our child is visible if we are + + diff --git a/xulrunner.spec b/xulrunner.spec index 9fcdab8..18e8c3c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -30,7 +30,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.17%{?pretag}%{?dist} +Release: 0.18%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -62,6 +62,7 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches +Patch30: revert-562138.patch # --------------------------------------------------- @@ -167,6 +168,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static +%patch30 -p1 -b .revert-562138 + # For xulrunner-2.0-system-cairo-tee.patch autoconf-2.13 @@ -477,6 +480,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 26 2011 Christopher Aillon - 2.0-0.18 +- Fix issue with popup windows showing in the wrong place + * Tue Jan 25 2011 Christopher Aillon - 2.0-0.17 - Update to 2.0 Beta 10 From ab389f9c9e4daccbee96f2a27737e7346df882e5 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sat, 29 Jan 2011 13:42:08 -0800 Subject: [PATCH 137/486] No longer need to define and clean up the build root In Fedora 13+ this is handled automatically. http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag http://fedoraproject.org/wiki/Packaging/Guidelines#.25clean --- xulrunner.spec | 7 ------- 1 file changed, 7 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 18e8c3c..cd18f33 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -66,7 +66,6 @@ Patch30: revert-562138.patch # --------------------------------------------------- -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} BuildRequires: cairo-devel >= %{cairo_version} @@ -240,7 +239,6 @@ make buildsymbols %install cd %{tarballdir} -%{__rm} -rf $RPM_BUILD_ROOT INTERNAL_GECKO=%{version_internal} @@ -401,11 +399,6 @@ cp dist/%{name}-%{version}*.crashreporter-symbols.zip $RPM_BUILD_ROOT$DEBUG_LIB_ #--------------------------------------------------------------------- -%clean -%{__rm} -rf $RPM_BUILD_ROOT - -#--------------------------------------------------------------------- - %post /sbin/ldconfig From 26b4be1d4c64cd709d11db498ae32e19a135e736 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sat, 29 Jan 2011 14:41:45 -0800 Subject: [PATCH 138/486] Don't overwrite CFLAGS/CXXFLAGS The -debuginfo mozconfig was stomping on our CFLAGS/CXXFLAGS. Stop passing them in via the configure flag and just pass them via their environment variables. --- xulrunner-mozconfig | 2 +- xulrunner-mozconfig-debuginfo | 4 ++-- xulrunner.spec | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 0a3d18e..e27a116 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -18,7 +18,7 @@ ac_add_options --disable-tests ac_add_options --disable-mochitest ac_add_options --disable-installer ac_add_options --disable-debug -ac_add_options --enable-optimize="$MOZ_OPT_FLAGS" +ac_add_options --enable-optimize ac_add_options --enable-xinerama ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-pango diff --git a/xulrunner-mozconfig-debuginfo b/xulrunner-mozconfig-debuginfo index 5fb7e30..4dd2427 100644 --- a/xulrunner-mozconfig-debuginfo +++ b/xulrunner-mozconfig-debuginfo @@ -1,5 +1,5 @@ # For mozilla's debuginfo: -export CFLAGS="-gdwarf-2" -export CXXFLAGS="-gdwarf-2" +export CFLAGS="$CFLAGS -gdwarf-2" +export CXXFLAGS="$CXXFLAGS -gdwarf-2" export MOZ_DEBUG_SYMBOLS=1 ac_add_options --enable-crashreporter diff --git a/xulrunner.spec b/xulrunner.spec index cd18f33..bcda226 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -208,8 +208,8 @@ MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} # # Disable C++ exceptions since Mozilla code is not exception-safe # -export MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ - %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ + %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS From a17a97c19a41069306a038fdcab16f6e69074c9f Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Mon, 31 Jan 2011 06:07:48 -0800 Subject: [PATCH 139/486] housekeeping: remove some no-longer needed patches * firefox4-jemalloc.patch: fixed differently by http://hg.mozilla.org/mozilla-central/rev/7a2802932585 * mozilla-malloc.patch: rendered obsolete by http://pkgs.fedoraproject.org/gitweb/?p=xulrunner.git;a=commit;h=33fcc16fa7be4126ab8671fd505242f9513766ae --- firefox4-jemalloc.patch | 22 ---------------------- mozilla-malloc.patch | 12 ------------ xulrunner.spec | 4 ---- 3 files changed, 38 deletions(-) delete mode 100644 firefox4-jemalloc.patch delete mode 100644 mozilla-malloc.patch diff --git a/firefox4-jemalloc.patch b/firefox4-jemalloc.patch deleted file mode 100644 index 982483f..0000000 --- a/firefox4-jemalloc.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up mozilla-central/memory/jemalloc/jemalloc.h.jemalloc mozilla-central/memory/jemalloc/jemalloc.h ---- mozilla-central/memory/jemalloc/jemalloc.h.jemalloc 2010-08-18 15:21:10.000000000 -0400 -+++ mozilla-central/memory/jemalloc/jemalloc.h 2010-09-01 16:50:38.615946834 -0400 -@@ -42,12 +42,12 @@ extern const char *_malloc_options; - - /* Darwin and Linux already have memory allocation functions */ - #if (!defined(MOZ_MEMORY_DARWIN) && !defined(MOZ_MEMORY_LINUX)) --void *malloc(size_t size); --void *valloc(size_t size); --void *calloc(size_t num, size_t size); --void *realloc(void *ptr, size_t size); --void free(void *ptr); --int posix_memalign(void **memptr, size_t alignment, size_t size); -+void *malloc(size_t size) __THROW __attribute_malloc__ __wur; -+void *valloc(size_t size) __THROW __attribute_malloc__ __wur; -+void *calloc(size_t num, size_t size) __THROW __attribute_malloc__ __wur; -+void *realloc(void *ptr, size_t size) __THROW __attribute_malloc__ __wur; -+void free(void *ptr) __THROW __attribute_malloc__ __wur; -+int posix_memalign(void **memptr, size_t alignment, size_t size) __THROW __attribute_malloc__ __wur; - #endif /* MOZ_MEMORY_DARWIN, MOZ_MEMORY_LINUX */ - - #if defined(MOZ_MEMORY_ANDROID) || defined(WRAP_MALLOC) diff --git a/mozilla-malloc.patch b/mozilla-malloc.patch deleted file mode 100644 index ffb4e53..0000000 --- a/mozilla-malloc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h.old xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h ---- xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h.old 2010-08-06 03:09:14.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h 2010-08-17 11:15:40.000000000 +0200 -@@ -214,7 +214,7 @@ MOZALLOC_EXPORT void* moz_valloc(size_t - #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw() - #endif - --#ifdef MOZ_CPP_EXCEPTIONS -+#if 1 - #define MOZALLOC_THROW_BAD_ALLOC throw(std::bad_alloc) - #else - #define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_IF_HAS_EXCEPTIONS diff --git a/xulrunner.spec b/xulrunner.spec index bcda226..9ccea3f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -44,9 +44,7 @@ Source21: %{name}.sh.in # build patches Patch0: xulrunner-version.patch Patch1: mozilla-build.patch -Patch3: firefox4-jemalloc.patch Patch9: mozilla-build-sbrk.patch -Patch11: mozilla-malloc.patch Patch12: xulrunner-2.0-64bit-big-endian.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch @@ -151,9 +149,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch %patch1 -p2 -b .build -%patch3 -p1 -b .jemalloc %patch9 -p2 -b .sbrk -%patch11 -p2 -b .malloc %patch12 -p2 -b .64bit-big-endian %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types From d0255b10f13d603b47391a015ba5df7f9ea4d1d0 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Mon, 31 Jan 2011 19:41:07 -0800 Subject: [PATCH 140/486] Clean up our macro usage a little bit - Use %global instead of %define - Move items that change less frequently further down in the specfile - Rename a few items to better reflect reality - Update a few versions (pointed out by Jory A. Pratt) --- xulrunner.spec | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 9ccea3f..7d524ea 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,32 +1,28 @@ -# Separated plugins are supported on x86(64) only -%ifarch i386 i686 x86_64 -%define separated_plugins 1 -%else -%define separated_plugins 0 -%endif - # Minimal required versions -%define nspr_version 4.8 -%define nss_version 3.12.8 -%define cairo_version 1.6.0 -%define freetype_version 2.1.9 -%define sqlite_version 3.7.1 -%define notify_version 0.7.0 -%define tarballdir mozilla-central -# build crash reporter only on x86/x86_64 for now +%global nspr_version 4.8.7 +%global nss_version 3.12.9 +%global cairo_version 1.6.0 +%global freetype_version 2.1.9 +%global sqlite_version 3.7.4 +%global libnotify_version 0.7.0 + +%global version_internal 2 +%global pretag b10 +%global mozappdir %{_libdir}/%{name}-%{version_internal} +%global tarballdir mozilla-central + +# crash reporter and out-of-process-plugins work only on x86/x86_64 %ifarch %{ix86} x86_64 -%define enable_mozilla_crashreporter 1 +%global enable_mozilla_crashreporter 1 +%global moz_out_of_process_plugins 1 %else -%define enable_mozilla_crashreporter 0 +%global enable_mozilla_crashreporter 0 +%global moz_out_of_process_plugins 0 %endif # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) -%define version_internal 2 -%define mozappdir %{_libdir}/%{name}-%{version_internal} -%define pretag b10 - Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 @@ -86,7 +82,7 @@ BuildRequires: hunspell-devel BuildRequires: sqlite-devel >= %{sqlite_version} BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel -BuildRequires: libnotify-devel >= %{notify_version} +BuildRequires: libnotify-devel >= %{libnotify_version} BuildRequires: autoconf213 BuildRequires: mesa-libGL-devel BuildRequires: yasm @@ -175,7 +171,7 @@ autoconf-2.13 %{__cat} %{SOURCE11} >> .mozconfig %endif -%if !%{?separated_plugins} +%if !%{?moz_out_of_process_plugins} echo "ac_add_options --disable-ipc" >> .mozconfig %endif @@ -441,7 +437,7 @@ fi %{mozappdir}/dependentlibs.list %{mozappdir}/greprefs.js %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf -%if %{?separated_plugins} +%if %{?moz_out_of_process_plugins} %{mozappdir}/plugin-container %endif From 80f086ce45a39eb359857a327eae76a73e6dd987 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 1 Feb 2011 18:09:54 -0800 Subject: [PATCH 141/486] Remove some spurious variables We already have global macros for the app dir, no need to redefine them. This also fixes up an issue with the postun script. --- xulrunner.spec | 47 +++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7d524ea..59de3ed 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -189,10 +189,6 @@ esac cd %{tarballdir} -INTERNAL_GECKO=%{version_internal} -MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} - - # -fpermissive is needed to build with gcc 4.6+ which has become stricter # # Mozilla builds with -Wall with exception of a few warnings which show up @@ -218,7 +214,7 @@ MOZ_SMP_FLAGS=-j1 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 %endif -export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}" +export LDFLAGS="-Wl,-rpath,%{mozappdir}" make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" # create debuginfo for crash-stats.mozilla.com @@ -232,24 +228,19 @@ make buildsymbols %install cd %{tarballdir} -INTERNAL_GECKO=%{version_internal} - -INTERNAL_APP_NAME=%{name}-${INTERNAL_GECKO} -MOZ_APP_DIR=%{_libdir}/${INTERNAL_APP_NAME} - -INTERNAL_APP_SDK_NAME=%{name}-sdk-${INTERNAL_GECKO} +INTERNAL_APP_SDK_NAME=%{name}-sdk-%{version_internal} MOZ_APP_SDK_DIR=%{_libdir}/${INTERNAL_APP_SDK_NAME} DESTDIR=$RPM_BUILD_ROOT make install -%{__mkdir_p} $RPM_BUILD_ROOT/${MOZ_APP_DIR} \ +%{__mkdir_p} $RPM_BUILD_ROOT/%{mozappdir} \ $RPM_BUILD_ROOT%{_datadir}/idl/${INTERNAL_APP_SDK_NAME} \ $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_SDK_NAME} %{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications} # set up our default preferences %{__cat} %{SOURCE12} | %{__sed} -e 's,RPM_VERREL,%{version}-%{release},g' > rh-default-prefs -%{__install} -p -D -m 644 rh-default-prefs $RPM_BUILD_ROOT/${MOZ_APP_DIR}/defaults/pref/all-redhat.js +%{__install} -p -D -m 644 rh-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-redhat.js %{__rm} rh-default-prefs # Start script install @@ -258,9 +249,9 @@ DESTDIR=$RPM_BUILD_ROOT make install $RPM_BUILD_ROOT%{_bindir}/%{name} %{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/%{name} -%{__rm} -f $RPM_BUILD_ROOT${MOZ_APP_DIR}/%{name}-config +%{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config -cd $RPM_BUILD_ROOT${MOZ_APP_DIR}/chrome +cd $RPM_BUILD_ROOT%{mozappdir}/chrome find . -name "*" -type d -maxdepth 1 -exec %{__rm} -rf {} \; cd - @@ -314,10 +305,10 @@ popd dist/bin/xpidl \ dist/bin/xpt_dump \ dist/bin/xpt_link \ - $RPM_BUILD_ROOT/${MOZ_APP_DIR} + $RPM_BUILD_ROOT/%{mozappdir} -%{__rm} -rf $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} -%{__rm} -rf $RPM_BUILD_ROOT/%{_datadir}/idl/${INTERNAL_APP_NAME} +%{__rm} -rf $RPM_BUILD_ROOT/%{_includedir}/%{name}-%{version_internal} +%{__rm} -rf $RPM_BUILD_ROOT/%{_datadir}/idl/%{name}-%{version_internal} %{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/include ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME} \ @@ -339,9 +330,9 @@ find $RPM_BUILD_ROOT/%{_includedir} -type f -name "*.h" | xargs chmod 644 find $RPM_BUILD_ROOT/%{_datadir}/idl -type f -name "*.idl" | xargs chmod 644 %{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/lib/*.so -pushd $RPM_BUILD_ROOT${MOZ_APP_DIR} +pushd $RPM_BUILD_ROOT%{mozappdir} for i in *.so; do - ln -s ${MOZ_APP_DIR}/$i $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/lib/$i + ln -s %{mozappdir}/$i $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/lib/$i done popd @@ -366,20 +357,20 @@ chmod 644 $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} %{__mkdir_p} $RPM_BUILD_ROOT/etc/ld.so.conf.d %{__cat} > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{ld_conf_file} << EOF -${MOZ_APP_DIR} +%{mozappdir} EOF # Copy over the LICENSE -%{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT${MOZ_APP_DIR} +%{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir} # Use the system hunspell dictionaries -%{__rm} -rf ${RPM_BUILD_ROOT}${MOZ_APP_DIR}/dictionaries -ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}${MOZ_APP_DIR}/dictionaries +%{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries +ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries # ghost files -%{__mkdir_p} $RPM_BUILD_ROOT${MOZ_APP_DIR}/components -touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/compreg.dat -touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/xpti.dat +%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components +touch $RPM_BUILD_ROOT%{mozappdir}/components/compreg.dat +touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat # Add debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} @@ -400,7 +391,7 @@ cp dist/%{name}-%{version}*.crashreporter-symbols.zip $RPM_BUILD_ROOT$DEBUG_LIB_ %preun # is it a final removal? if [ $1 -eq 0 ]; then - %{__rm} -rf ${MOZ_APP_DIR}/components + %{__rm} -rf %{mozappdir}/components fi %files From 713480ce2c45daf75e6150c34f434e626ff837cb Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 2 Feb 2011 21:59:20 -0800 Subject: [PATCH 142/486] Use _sysconfdir instead of /etc Also, group up various 64 vs 32 bit things together Re-use mozbits to determine the ldconf filename --- xulrunner.spec | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 59de3ed..0368847 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -10,6 +10,7 @@ %global pretag b10 %global mozappdir %{_libdir}/%{name}-%{version_internal} %global tarballdir mozilla-central +%global gre_dir %{_sysconfdir}/gre.d # crash reporter and out-of-process-plugins work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -20,6 +21,14 @@ %global moz_out_of_process_plugins 0 %endif +%ifarch x86_64 ia64 s390x ppc64 sparc64 +%global mozbits 64 +%global gre_conf_file gre64.conf +%else +%global mozbits 32 +%global gre_conf_file gre.conf +%endif + # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -270,12 +279,6 @@ cd - $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding-unstable.pc # Fix multilib devel conflicts... -%ifarch x86_64 ia64 s390x ppc64 sparc64 -%define mozbits 64 -%else -%define mozbits 32 -%endif - function install_file() { genheader=$* mv ${genheader}.h ${genheader}%{mozbits}.h @@ -337,29 +340,20 @@ done popd # GRE stuff -%ifarch x86_64 ia64 ppc64 s390x sparc64 -%define gre_conf_file gre64.conf -%else -%define gre_conf_file gre.conf -%endif - MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` -%{__mv} $RPM_BUILD_ROOT/etc/gre.d/$MOZILLA_GECKO_VERSION".system.conf" \ - $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} -chmod 644 $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} +%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ + $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} +chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} # Library path -%ifarch x86_64 ia64 ppc64 s390x sparc64 -%define ld_conf_file xulrunner-64.conf -%else -%define ld_conf_file xulrunner-32.conf -%endif +LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d +LD_CONF_FILE=xulrunner-%{mozbits}.conf -%{__mkdir_p} $RPM_BUILD_ROOT/etc/ld.so.conf.d -%{__cat} > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{ld_conf_file} << EOF +%{__mkdir_p} ${RPM_BUILD_ROOT}${LD_SO_CONF_D} +%{__cat} > ${RPM_BUILD_ROOT}${LD_SO_CONF_D}/${LD_CONF_FILE} << EOF %{mozappdir} EOF - + # Copy over the LICENSE %{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir} @@ -397,8 +391,8 @@ fi %files %defattr(-,root,root,-) %{_bindir}/xulrunner -%dir /etc/gre.d -/etc/gre.d/%{gre_conf_file} +%dir %{_sysconfdir}/gre.d +%{_sysconfdir}/gre.d/gre*.conf %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.txt From 5c323075d8918f968a7a5c9348d022e38cabd2ed Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 2 Feb 2011 22:00:50 -0800 Subject: [PATCH 143/486] Update description text Based on text from https://developer.mozilla.org/En/XULRunner --- xulrunner.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 0368847..c45795e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -104,7 +104,11 @@ Requires: sqlite >= %{sqlite_build_version} Provides: gecko-libs = %{version} %description -XULRunner provides the XUL Runtime environment for Gecko applications. +XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM +applications that are as rich as Firefox and Thunderbird. It provides mechanisms +for installing, upgrading, and uninstalling these applications. XULRunner also +provides libxul, a solution which allows the embedding of Mozilla technologies +in other projects and products. %package devel Summary: Development files for Gecko @@ -141,7 +145,8 @@ Requires: libnotify-devel Requires: mesa-libGL-devel %description devel -Gecko development files. +This package contains the libraries amd header files that are needed +for writing XUL+XPCOM applications with Mozilla XULRunner and Gecko. #--------------------------------------------------------------------- From b34d64f9bef0c647c0737789abc95c45df3bf775 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Mon, 7 Feb 2011 20:03:48 -0800 Subject: [PATCH 144/486] Update the patch to os2.cc C++ should include --- xulrunner-2.0-os2cc.patch | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/xulrunner-2.0-os2cc.patch b/xulrunner-2.0-os2cc.patch index c6c32a7..3aa5286 100644 --- a/xulrunner-2.0-os2cc.patch +++ b/xulrunner-2.0-os2cc.patch @@ -1,14 +1,21 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=628252 -diff --git a/gfx/ots/src/os2.cc b/gfx/ots/src/os2.cc ---- a/gfx/ots/src/os2.cc -+++ b/gfx/ots/src/os2.cc -@@ -3,4 +3,6 @@ +diff -r b5ee327bf536 gfx/ots/src/os2.cc +--- a/gfx/ots/src/os2.cc Fri Jan 28 19:59:59 2011 +0100 ++++ b/gfx/ots/src/os2.cc Sat Jan 29 10:56:30 2011 -0800 +@@ -1,12 +1,14 @@ + // Copyright (c) 2009 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -+#include ++#include + #include "os2.h" - + #include "head.h" + + // OS/2 - OS/2 and Windows Metrics + // http://www.microsoft.com/opentype/otspec/os2.htm + + namespace ots { From eab4fa43523ee4b1a0ea558d9eae9bd077d31f1c Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 8 Feb 2011 09:43:24 -0800 Subject: [PATCH 145/486] 2.0 Beta 11 --- .gitignore | 1 + revert-562138.patch | 290 -------------------------------------------- sources | 2 +- xulrunner.spec | 10 +- 4 files changed, 7 insertions(+), 296 deletions(-) delete mode 100644 revert-562138.patch diff --git a/.gitignore b/.gitignore index e0d9e6f..31e78ee 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0b8.source.tar.bz2 /xulrunner-2.0b9.source.tar.bz2 /xulrunner-2.0b10.source.tar.bz2 +/xulrunner-2.0b11.source.tar.bz2 diff --git a/revert-562138.patch b/revert-562138.patch deleted file mode 100644 index cc97d00..0000000 --- a/revert-562138.patch +++ /dev/null @@ -1,290 +0,0 @@ -See https://bugzilla.mozilla.org/show_bug.cgi?id=562138#c8 - -# HG changeset patch -# User Markus Stange -# Date 1296111298 -3600 -# Node ID 433f39574cd72d30e47e6500fad52a0398753367 -# Parent f948c56cb86f83354f0bd9d579cd51167464b4f2 -Backed out changeset f948c56cb86f (bug 562138 part 2) because it depends on changeset 44c42d8b8d08 which is going to be backed out. - -diff --git a/widget/src/cocoa/nsCocoaWindow.h b/widget/src/cocoa/nsCocoaWindow.h ---- a/widget/src/cocoa/nsCocoaWindow.h -+++ b/widget/src/cocoa/nsCocoaWindow.h -@@ -291,17 +291,16 @@ public: - NS_IMETHOD ResetInputState(); - - NS_IMETHOD BeginSecureKeyboardInput(); - NS_IMETHOD EndSecureKeyboardInput(); - - static void UnifiedShading(void* aInfo, const CGFloat* aIn, CGFloat* aOut); - - void SetPopupWindowLevel(); -- PRBool IsVisible(); - - PRBool IsChildInFailingLeftClickThrough(NSView *aChild); - PRBool ShouldFocusPlugin(); - - NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent); - protected: - - nsresult CreateNativeWindow(const NSRect &aRect, -@@ -335,14 +334,13 @@ protected: - PRInt32 mShadowStyle; - NSUInteger mWindowFilter; - - PRPackedBool mWindowMadeHere; // true if we created the window, false for embedding - PRPackedBool mSheetNeedsShow; // if this is a sheet, are we waiting to be shown? - // this is used for sibling sheet contention only - PRPackedBool mFullScreen; - PRPackedBool mModal; -- PRPackedBool mIsShowing; // PR_TRUE during a Show(PR_TRUE) call. - - PRInt32 mNumModalDescendents; - }; - - #endif // nsCocoaWindow_h_ -diff --git a/widget/src/cocoa/nsCocoaWindow.mm b/widget/src/cocoa/nsCocoaWindow.mm ---- a/widget/src/cocoa/nsCocoaWindow.mm -+++ b/widget/src/cocoa/nsCocoaWindow.mm -@@ -143,17 +143,16 @@ nsCocoaWindow::nsCocoaWindow() - , mSheetWindowParent(nil) - , mPopupContentView(nil) - , mShadowStyle(NS_STYLE_WINDOW_SHADOW_DEFAULT) - , mWindowFilter(0) - , mWindowMadeHere(PR_FALSE) - , mSheetNeedsShow(PR_FALSE) - , mFullScreen(PR_FALSE) - , mModal(PR_FALSE) --, mIsShowing(PR_FALSE) - , mNumModalDescendents(0) - { - - } - - void nsCocoaWindow::DestroyNativeWindow() - { - NS_OBJC_BEGIN_TRY_ABORT_BLOCK; -@@ -528,30 +527,24 @@ void* nsCocoaWindow::GetNativeData(PRUin - break; - } - - return retVal; - - NS_OBJC_END_TRY_ABORT_BLOCK_NSNULL; - } - --PRBool --nsCocoaWindow::IsVisible() --{ -- NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN; -- -- return [mWindow isVisible] || mSheetNeedsShow || mIsShowing; -- -- NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE); --} -- - NS_IMETHODIMP nsCocoaWindow::IsVisible(PRBool & aState) - { -- aState = IsVisible(); -+ NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; -+ -+ aState = ([mWindow isVisible] || mSheetNeedsShow); - return NS_OK; -+ -+ NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; - } - - NS_IMETHODIMP nsCocoaWindow::SetModal(PRBool aState) - { - // This is used during startup (outside the event loop) when creating - // the add-ons compatibility checking dialog and the profile manager UI; - // therefore, it needs to provide an autorelease pool to avoid cocoa - // objects leaking. -@@ -626,42 +619,29 @@ NS_IMETHODIMP nsCocoaWindow::SetModal(PR - - // Hide or show this window - NS_IMETHODIMP nsCocoaWindow::Show(PRBool bState) - { - NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; - - // We need to re-execute sometimes in order to bring already-visible - // windows forward. -- if (!bState && !IsVisible()) -+ if (!mSheetNeedsShow && !bState && ![mWindow isVisible]) - return NS_OK; - - nsIWidget* parentWidget = mParent; - nsCOMPtr piParentWidget(do_QueryInterface(parentWidget)); - NSWindow* nativeParentWindow = (parentWidget) ? - (NSWindow*)parentWidget->GetNativeData(NS_NATIVE_WINDOW) : nil; - - if (bState && !mBounds.IsEmpty()) { -- // IsVisible can be entered from inside this method, for example through -- // synchronous painting. Unfortunately, at that point [mWindow isVisible] -- // still returns NO, so we use mIsShowing to tell us that we should return -- // true from IsVisible anyway. -- mIsShowing = PR_TRUE; -- -- if (mPopupContentView) { -- // Ensure our content view is visible. We never need to hide it. -- mPopupContentView->Show(PR_TRUE); -- } -- - if (mWindowType == eWindowType_sheet) { - // bail if no parent window (its basically what we do in Carbon) -- if (!nativeParentWindow || !piParentWidget) { -- mIsShowing = PR_FALSE; -+ if (!nativeParentWindow || !piParentWidget) - return NS_ERROR_FAILURE; -- } - - NSWindow* topNonSheetWindow = nativeParentWindow; - - // If this sheet is the child of another sheet, hide the parent so that - // this sheet can be displayed. Leave the parent mSheetNeedsShow alone, - // that is only used to handle sibling sheet contention. The parent will - // return once there are no more child sheets. - PRBool parentIsSheet = PR_FALSE; -@@ -744,17 +724,16 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool - } - else { - [mWindow setAcceptsMouseMovedEvents:YES]; - NS_OBJC_BEGIN_TRY_LOGONLY_BLOCK; - [mWindow makeKeyAndOrderFront:nil]; - NS_OBJC_END_TRY_LOGONLY_BLOCK; - SendSetZLevelEvent(); - } -- mIsShowing = PR_FALSE; - } - else { - // roll up any popups if a top-level window is going away - if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) - RollUpPopups(); - - // now get rid of the window/sheet - if (mWindowType == eWindowType_sheet) { -@@ -850,16 +829,19 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool - if ([mWindow isKindOfClass:[PopupWindow class]] && - [(PopupWindow*) mWindow isContextMenu]) { - [[NSDistributedNotificationCenter defaultCenter] - postNotificationName:@"com.apple.HIToolbox.endMenuTrackingNotification" - object:@"org.mozilla.gecko.PopupWindow"]; - } - } - } -+ -+ if (mPopupContentView) -+ mPopupContentView->Show(bState); - - return NS_OK; - - NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; - } - - struct ShadowParams { - float standardDeviation; - - -# HG changeset patch -# User Markus Stange -# Date 1296111382 -3600 -# Node ID 2cfc443d28ee87835e17b665d41be3a6fb0dca23 -# Parent 44c42d8b8d087ed22c02ffe90f7d23f84ee8abbb -Backed out changeset 44c42d8b8d08 (bug 562138 part 1) because it caused bug 627824 and bug 628861. - -diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp ---- a/view/src/nsView.cpp -+++ b/view/src/nsView.cpp -@@ -433,63 +433,51 @@ nsIntRect nsIView::CalcWidgetBounds(nsWi - void nsView::DoResetWidgetBounds(PRBool aMoveOnly, - PRBool aInvalidateChangedSize) { - // The geometry of a root view's widget is controlled externally, - // NOT by sizing or positioning the view - if (mViewManager->GetRootView() == this) { - return; - } - -- NS_PRECONDITION(mWindow, "Why was this called??"); -- - nsIntRect curBounds; - mWindow->GetBounds(curBounds); - - nsWindowType type; - mWindow->GetWindowType(type); - - if (curBounds.IsEmpty() && mDimBounds.IsEmpty() && type == eWindowType_popup) { - // Don't manipulate empty popup widgets. For example there's no point - // moving hidden comboboxes around, or doing X server roundtrips - // to compute their true screen position. This could mean that WidgetToScreen - // operations on these widgets don't return up-to-date values, but popup - // positions aren't reliable anyway because of correction to be on or off-screen. - return; - } - -+ NS_PRECONDITION(mWindow, "Why was this called??"); -+ - nsIntRect newBounds = CalcWidgetBounds(type); - - PRBool changedPos = curBounds.TopLeft() != newBounds.TopLeft(); - PRBool changedSize = curBounds.Size() != newBounds.Size(); - -- PRBool curVisibility; -- mWindow->IsVisible(curVisibility); -- PRBool newVisibility = IsEffectivelyVisible(); -- -- if (curVisibility && !newVisibility) { -- mWindow->Show(PR_FALSE); -- } -- - // Child views are never attached to top level widgets, this is safe. - if (changedPos) { - if (changedSize && !aMoveOnly) { - mWindow->Resize(newBounds.x, newBounds.y, newBounds.width, newBounds.height, - aInvalidateChangedSize); - } else { - mWindow->Move(newBounds.x, newBounds.y); - } - } else { - if (changedSize && !aMoveOnly) { - mWindow->Resize(newBounds.width, newBounds.height, aInvalidateChangedSize); - } // else do nothing! - } -- -- if (!curVisibility && newVisibility) { -- mWindow->Show(PR_TRUE); -- } - } - - void nsView::SetDimensions(const nsRect& aRect, PRBool aPaint, PRBool aResizeWidget) - { - nsRect dims = aRect; - dims.MoveBy(mPosX, mPosY); - - // Don't use nsRect's operator== here, since it returns true when -@@ -511,17 +499,23 @@ void nsView::NotifyEffectiveVisibilityCh - { - if (!aEffectivelyVisible) - { - DropMouseGrabbing(); - } - - if (nsnull != mWindow) - { -- ResetWidgetBounds(PR_FALSE, PR_TRUE, PR_FALSE); -+ if (aEffectivelyVisible) -+ { -+ DoResetWidgetBounds(PR_FALSE, PR_TRUE); -+ mWindow->Show(PR_TRUE); -+ } -+ else -+ mWindow->Show(PR_FALSE); - } - - for (nsView* child = mFirstChild; child; child = child->mNextSibling) { - if (child->mVis == nsViewVisibility_kHide) { - // It was effectively hidden and still is - continue; - } - // Our child is visible if we are - - diff --git a/sources b/sources index 9d1cf71..11a4aa2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cfbd4a465e5aeb5f0a67cb0b3ad92249 xulrunner-2.0b10.source.tar.bz2 +a52b8f4bb98f158ef0639db59dd39bce xulrunner-2.0b11.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index c45795e..921ce48 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -7,7 +7,7 @@ %global libnotify_version 0.7.0 %global version_internal 2 -%global pretag b10 +%global pretag b11 %global mozappdir %{_libdir}/%{name}-%{version_internal} %global tarballdir mozilla-central %global gre_dir %{_sysconfdir}/gre.d @@ -35,7 +35,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.18%{?pretag}%{?dist} +Release: 0.19%{?pretag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -65,7 +65,6 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches -Patch30: revert-562138.patch # --------------------------------------------------- @@ -173,8 +172,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -%patch30 -p1 -b .revert-562138 - # For xulrunner-2.0-system-cairo-tee.patch autoconf-2.13 @@ -455,6 +452,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 8 2011 Christopher Aillon - 2.0-0.19 +- Update to 2.0 Beta 11 + * Wed Jan 26 2011 Christopher Aillon - 2.0-0.18 - Fix issue with popup windows showing in the wrong place From 5c4e15e455378464338fb2322f5bc863e6cacbc2 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 10 Feb 2011 18:56:25 -0800 Subject: [PATCH 146/486] Introduce better versioning for our gecko virtual provides Now, the gecko-libs and gecko-devel virtual provides will be pinned to an individual Gecko release, so packages can do things like Requires: gecko-libs = 2.0-beta11 BuildRequires: gecko-libs = 2.0-beta11 Final releases will be pinned to e.g. 2.0-1 regardless of %{release} Also, make sure the virtual provides are arch-specific --- xulrunner.spec | 67 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 921ce48..c242cc1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -6,9 +6,16 @@ %global sqlite_version 3.7.4 %global libnotify_version 0.7.0 -%global version_internal 2 -%global pretag b11 -%global mozappdir %{_libdir}/%{name}-%{version_internal} +# gecko_dir_ver should be set to the version in our directory names +# alpha_version should be set to the alpha number if using an alpha, 0 otherwise +# beta_version should be set to the beta number if using a beta, 0 otherwise +# rc_version should be set to the RC number if using an RC, 0 otherwise +%global gecko_dir_ver 2 +%global alpha_version 0 +%global beta_version 11 +%global rc_version 0 + +%global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} %global tarballdir mozilla-central %global gre_dir %{_sysconfdir}/gre.d @@ -32,15 +39,34 @@ # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) +%if %{alpha_version} > 0 +%global pre_version a%{alpha_version} +%global pre_name alpha%{alpha_version} +%endif +%if %{beta_version} > 0 +%global pre_version b%{beta_version} +%global pre_name beta%{beta_version} +%endif +%if %{rc_version} > 0 +%global pre_version rc%{rc_version} +%global pre_name rc%{rc_version} +%endif +%if %{defined pre_version} +%global gecko_verrel %{expand:%%{version}}-%{pre_name} +%global pre_tag .%{pre_version} +%else +%global gecko_verrel %{expand:%%{version}}-1 +%endif + Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.19%{?pretag}%{?dist} +Release: 0.20%{?pre_tag}%{?dist}_caillon5 URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -# You can get sources at ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pretag}/source -Source0: %{name}-%{version}%{?pretag}.source.tar.bz2 +# You can get sources at ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pre_ver}/source +Source0: %{name}-%{version}%{?pre_version}.source.tar.bz2 Source10: %{name}-mozconfig Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js @@ -100,7 +126,7 @@ Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} Requires: sqlite >= %{sqlite_build_version} -Provides: gecko-libs = %{version} +Provides: gecko-libs%{?_isa} = %{gecko_verrel} %description XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM @@ -115,8 +141,8 @@ Group: Development/Libraries Obsoletes: mozilla-devel < 1.9 Obsoletes: firefox-devel < 2.1 Obsoletes: xulrunner-devel-unstable -Provides: gecko-devel = %{version} -Provides: gecko-devel-unstable = %{version} +Provides: gecko-devel%{?_isa} = %{gecko_verrel} +Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} Requires: xulrunner = %{version}-%{release} Requires: nspr-devel >= %{nspr_version} @@ -153,7 +179,7 @@ for writing XUL+XPCOM applications with Mozilla XULRunner and Gecko. %setup -q -c cd %{tarballdir} -sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ +sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ > version.patch %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch @@ -239,7 +265,7 @@ make buildsymbols %install cd %{tarballdir} -INTERNAL_APP_SDK_NAME=%{name}-sdk-%{version_internal} +INTERNAL_APP_SDK_NAME=%{name}-sdk-%{gecko_dir_ver} MOZ_APP_SDK_DIR=%{_libdir}/${INTERNAL_APP_SDK_NAME} DESTDIR=$RPM_BUILD_ROOT make install @@ -256,7 +282,7 @@ DESTDIR=$RPM_BUILD_ROOT make install # Start script install %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} -%{__cat} %{SOURCE21} | %{__sed} -e 's,XULRUNNER_VERSION,%{version_internal},g' > \ +%{__cat} %{SOURCE21} | %{__sed} -e 's,XULRUNNER_VERSION,%{gecko_dir_ver},g' > \ $RPM_BUILD_ROOT%{_bindir}/%{name} %{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/%{name} @@ -312,8 +338,8 @@ popd dist/bin/xpt_link \ $RPM_BUILD_ROOT/%{mozappdir} -%{__rm} -rf $RPM_BUILD_ROOT/%{_includedir}/%{name}-%{version_internal} -%{__rm} -rf $RPM_BUILD_ROOT/%{_datadir}/idl/%{name}-%{version_internal} +%{__rm} -rf $RPM_BUILD_ROOT/%{_includedir}/%{name}-%{gecko_dir_ver} +%{__rm} -rf $RPM_BUILD_ROOT/%{_datadir}/idl/%{name}-%{gecko_dir_ver} %{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/include ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME} \ @@ -440,8 +466,8 @@ fi %files devel %defattr(-,root,root,-) -%{_datadir}/idl/%{name}*%{version_internal} -%{_includedir}/%{name}*%{version_internal} +%{_datadir}/idl/%{name}*%{gecko_dir_ver} +%{_includedir}/%{name}*%{gecko_dir_ver} %{_libdir}/%{name}-sdk-*/ %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell @@ -452,6 +478,15 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Feb 10 2011 Christopher Aillon - 2.0-0.20 +- Introduce better versioning for our gecko virtual provides +- Now, the gecko-libs and gecko-devel virtual provides will be pinned + to an individual Gecko release, so packages can do things like + Requires: gecko-libs = 2.0-beta11 + BuildRequires: gecko-libs = 2.0-beta11 +- Final releases will be pinned to e.g. 2.0-1 regardless of %%{release} +- Also, make sure those virtual provides are arch-specific + * Tue Feb 8 2011 Christopher Aillon - 2.0-0.19 - Update to 2.0 Beta 11 From a811c390644a98c6dcb318d31e91aaba2fa5387b Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 10 Feb 2011 20:41:09 -0800 Subject: [PATCH 147/486] Oops, remove my appended disttag --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index c242cc1..a514009 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.20%{?pre_tag}%{?dist}_caillon5 +Release: 0.20%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet From 516f4cb53eefc9fc26cd166818c904d2833b997f Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 10 Feb 2011 21:19:09 -0800 Subject: [PATCH 148/486] Also provide arch-agnostic versions of gecko virtual provides --- xulrunner.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index a514009..7e81c68 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.20%{?pre_tag}%{?dist} +Release: 0.21%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -126,6 +126,7 @@ Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} Requires: sqlite >= %{sqlite_build_version} +Provides: gecko-libs = %{gecko_verrel} Provides: gecko-libs%{?_isa} = %{gecko_verrel} %description @@ -141,7 +142,9 @@ Group: Development/Libraries Obsoletes: mozilla-devel < 1.9 Obsoletes: firefox-devel < 2.1 Obsoletes: xulrunner-devel-unstable +Provides: gecko-devel = %{gecko_verrel} Provides: gecko-devel%{?_isa} = %{gecko_verrel} +Provides: gecko-devel-unstable = %{gecko_verrel} Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} Requires: xulrunner = %{version}-%{release} @@ -478,6 +481,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Feb 10 2011 Christopher Aillon - 2.0-0.21 +- Also provide arch-agnostic versions of gecko virtual provides + * Thu Feb 10 2011 Christopher Aillon - 2.0-0.20 - Introduce better versioning for our gecko virtual provides - Now, the gecko-libs and gecko-devel virtual provides will be pinned From beb596becba69d698816f18cbe75a7dacad34850 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Fri, 11 Feb 2011 15:19:05 -0800 Subject: [PATCH 149/486] Use %{__isa_bits} in place of %{mozbits} It is defined by rpm, so we don't need to worry about figuring it out ourselves. --- xulrunner.spec | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7e81c68..9a4e9af 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -28,13 +28,12 @@ %global moz_out_of_process_plugins 0 %endif -%ifarch x86_64 ia64 s390x ppc64 sparc64 -%global mozbits 64 -%global gre_conf_file gre64.conf -%else -%global mozbits 32 +%if %{__isa_bits} == 32 %global gre_conf_file gre.conf %endif +%if %{__isa_bits} == 64 +%global gre_conf_file gre64.conf +%endif # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -312,7 +311,7 @@ cd - # Fix multilib devel conflicts... function install_file() { genheader=$* -mv ${genheader}.h ${genheader}%{mozbits}.h +mv ${genheader}.h ${genheader}%{__isa_bits}.h cat > ${genheader}.h << EOF /* This file exists to fix multilib conflicts */ #if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) @@ -378,7 +377,7 @@ chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d -LD_CONF_FILE=xulrunner-%{mozbits}.conf +LD_CONF_FILE=xulrunner-%{__isa_bits}.conf %{__mkdir_p} ${RPM_BUILD_ROOT}${LD_SO_CONF_D} %{__cat} > ${RPM_BUILD_ROOT}${LD_SO_CONF_D}/${LD_CONF_FILE} << EOF From 91f07ca8022cd12509d52ac6f945a4fd7e26dd59 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 13 Feb 2011 14:46:58 -0600 Subject: [PATCH 150/486] * Sun Feb 13 2011 Dennis Gilmore 2.0-0.22 - disable nanojit on sparc64 its not supported and doesnt get automatically switched off --- xulrunner.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 9a4e9af..01adbf8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.21%{?pre_tag}%{?dist} +Release: 0.22%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -214,6 +214,12 @@ autoconf-2.13 echo "ac_add_options --disable-ipc" >> .mozconfig %endif +# Upstream bug filed without resolution +# for now make sure jit is not enabled on sparc64 +%ifarch sparc64 +echo "ac_add_options --disable-jit" >> .mozconfig +%endif + #--------------------------------------------------------------------- %build @@ -480,6 +486,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Feb 13 2011 Dennis Gilmore 2.0-0.22 +- disable nanojit on sparc64 its not supported and doesnt get automatically switched off + * Thu Feb 10 2011 Christopher Aillon - 2.0-0.21 - Also provide arch-agnostic versions of gecko virtual provides From b2199476beb9d3f310e9df58ed9b1593160acba8 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sun, 13 Feb 2011 01:03:34 -0800 Subject: [PATCH 151/486] Nix some redundant push/pop pairs --- xulrunner.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 01adbf8..bcb416a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -330,13 +330,7 @@ EOF pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} install_file "mozilla-config" -popd - -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} install_file "jsautocfg" -popd - -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} install_file "js-config" popd From 2133b24e8a6fc6150fd6dbaeb75de2bed3280abe Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Fri, 25 Feb 2011 11:14:22 -0800 Subject: [PATCH 152/486] 2.0 Beta 12 - Remove upstreamed patches: - mozilla-notify.patch - xulrunner-2.0-os2cc.patch - xulrunner-2.0-system-cairo.patch - xulrunner-2.0-system-cairo-tee.patch - Update network pref per https://bugzilla.mozilla.org/show_bug.cgi?id=620472 and https://bugzilla.mozilla.org/show_bug.cgi?id=629833 --- .gitignore | 1 + mozilla-notify.patch | 40 -------- sources | 2 +- xulrunner-2.0-os2cc.patch | 21 ---- xulrunner-2.0-system-cairo-tee.patch | 29 ------ xulrunner-2.0-system-cairo.patch | 137 --------------------------- xulrunner-redhat-default-prefs.js | 2 +- xulrunner.spec | 19 +--- 8 files changed, 8 insertions(+), 243 deletions(-) delete mode 100644 mozilla-notify.patch delete mode 100644 xulrunner-2.0-os2cc.patch delete mode 100644 xulrunner-2.0-system-cairo-tee.patch delete mode 100644 xulrunner-2.0-system-cairo.patch diff --git a/.gitignore b/.gitignore index 31e78ee..3b7e14c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0b9.source.tar.bz2 /xulrunner-2.0b10.source.tar.bz2 /xulrunner-2.0b11.source.tar.bz2 +/xulrunner-2.0b12.source.tar.bz2 diff --git a/mozilla-notify.patch b/mozilla-notify.patch deleted file mode 100644 index 7c865de..0000000 --- a/mozilla-notify.patch +++ /dev/null @@ -1,40 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=628222 - -# HG changeset patch -# User Priit Laes -# Date 1295907218 -7200 -# Node ID ebfe5822e8916cce3d1811e67f6cb95ba3caeb24 -# Parent e874889e43d1b40f16c8234d53f39126a04e6621 -Add support for libnotify-0.7+ - -diff -r e874889e43d1 -r ebfe5822e891 toolkit/system/gnome/nsAlertsIconListener.cpp ---- a/toolkit/system/gnome/nsAlertsIconListener.cpp Fri Jan 21 16:45:23 2011 -0500 -+++ b/toolkit/system/gnome/nsAlertsIconListener.cpp Tue Jan 25 00:13:38 2011 +0200 -@@ -46,6 +46,11 @@ - - #include - -+// Compatibility macro for =libnotify-0.7.0 has no support for attaching to widgets -+#if !NOTIFY_CHECK_VERSION(0,7,0) -+ , NULL -+#endif -+ ); -+ - if (!mNotification) - return NS_ERROR_OUT_OF_MEMORY; - - diff --git a/sources b/sources index 11a4aa2..05689e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a52b8f4bb98f158ef0639db59dd39bce xulrunner-2.0b11.source.tar.bz2 +8b343c8f9db97199ddcf9744315c2bbb xulrunner-2.0b12.source.tar.bz2 diff --git a/xulrunner-2.0-os2cc.patch b/xulrunner-2.0-os2cc.patch deleted file mode 100644 index 3aa5286..0000000 --- a/xulrunner-2.0-os2cc.patch +++ /dev/null @@ -1,21 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=628252 - -diff -r b5ee327bf536 gfx/ots/src/os2.cc ---- a/gfx/ots/src/os2.cc Fri Jan 28 19:59:59 2011 +0100 -+++ b/gfx/ots/src/os2.cc Sat Jan 29 10:56:30 2011 -0800 -@@ -1,12 +1,14 @@ - // Copyright (c) 2009 The Chromium Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include -+ - #include "os2.h" - - #include "head.h" - - // OS/2 - OS/2 and Windows Metrics - // http://www.microsoft.com/opentype/otspec/os2.htm - - namespace ots { - diff --git a/xulrunner-2.0-system-cairo-tee.patch b/xulrunner-2.0-system-cairo-tee.patch deleted file mode 100644 index 85c8447..0000000 --- a/xulrunner-2.0-system-cairo-tee.patch +++ /dev/null @@ -1,29 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=623797 - -# HG changeset patch -# User Jory A. Pratt (anarchy@gentoo.org) -# Parent b27366868c807e07a11741a7a2eb404ebc08e5e7 -Check to ensure system cairo has tee backend support, part 2 bug #623797 - -diff --git a/configure.in b/configure.in ---- a/configure.in -+++ b/configure.in -@@ -8714,16 +8714,17 @@ if test "$MOZ_TREE_CAIRO"; then - - CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h - mv -f $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig 2> /dev/null - - else - PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION pixman-1 freetype2 fontconfig) - 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_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS" - fi - fi - - AC_SUBST(MOZ_TREE_CAIRO) - diff --git a/xulrunner-2.0-system-cairo.patch b/xulrunner-2.0-system-cairo.patch deleted file mode 100644 index 5300f38..0000000 --- a/xulrunner-2.0-system-cairo.patch +++ /dev/null @@ -1,137 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=623797 - -work around new features that are not avaliable in system-cairo on linux -(romaxa's original patch with modifications to use cairo-tee) - -diff --git a/config/system-headers b/config/system-headers ---- a/config/system-headers -+++ b/config/system-headers -@@ -81,16 +81,17 @@ pixman.h - cairo.h - cairo-atsui.h - cairo-beos.h - cairo-ft.h - cairo-glitz.h - cairo-os2.h - cairo-pdf.h - cairo-ps.h -+cairo-tee.h - cairo-quartz.h - cairo-win32.h - cairo-xlib.h - cairo-xlib-xrender.h - cairo-directfb.h - cairo-qpainter.h - #endif - dfiff.h -diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp ---- a/gfx/thebes/gfxASurface.cpp -+++ b/gfx/thebes/gfxASurface.cpp -@@ -216,19 +216,21 @@ gfxASurface::Init(cairo_surface_t* surfa - - mSurface = surface; - mSurfaceValid = PR_TRUE; - - if (existingSurface) { - mFloatingRefs = 0; - } else { - mFloatingRefs = 1; -+#ifdef MOZ_TREE_CAIRO - if (cairo_surface_get_content(surface) != CAIRO_CONTENT_COLOR) { - cairo_surface_set_subpixel_antialiasing(surface, CAIRO_SUBPIXEL_ANTIALIASING_DISABLED); - } -+#endif - } - } - - gfxASurface::gfxSurfaceType - gfxASurface::GetType() const - { - if (!mSurfaceValid) - return (gfxSurfaceType)-1; -@@ -430,28 +432,34 @@ gfxASurface::FormatFromContent(gfxASurfa - default: - return ImageFormatRGB24; - } - } - - void - gfxASurface::SetSubpixelAntialiasingEnabled(PRBool aEnabled) - { -+#ifdef MOZ_TREE_CAIRO - if (!mSurfaceValid) - return; - cairo_surface_set_subpixel_antialiasing(mSurface, - aEnabled ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED); -+#endif - } - - PRBool - gfxASurface::GetSubpixelAntialiasingEnabled() - { - if (!mSurfaceValid) - return PR_FALSE; -+#ifdef MOZ_TREE_CAIRO - return cairo_surface_get_subpixel_antialiasing(mSurface) == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED; -+#else -+ return PR_TRUE; -+#endif - } - - PRInt32 - gfxASurface::BytePerPixelFromFormat(gfxImageFormat format) - { - switch (format) { - case ImageFormatARGB32: - case ImageFormatRGB24: -diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp ---- a/gfx/thebes/gfxTeeSurface.cpp -+++ b/gfx/thebes/gfxTeeSurface.cpp -@@ -32,17 +32,24 @@ - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - - #include "gfxTeeSurface.h" - -+/* Once cairo in tree is update ensure we remove the ifdef -+ and just include cairo-tee.h -+*/ -+#ifdef MOZ_TREE_CAIRO - #include "cairo.h" -+#else -+#include "cairo-tee.h" -+#endif - - gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf) - { - Init(csurf, PR_TRUE); - } - - gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, PRInt32 aSurfaceCount) - { -diff --git a/js/src/config/system-headers b/js/src/config/system-headers ---- a/js/src/config/system-headers -+++ b/js/src/config/system-headers -@@ -82,16 +82,17 @@ cairo.h - cairo-atsui.h - cairo-beos.h - cairo-ft.h - cairo-glitz.h - cairo-os2.h - cairo-pdf.h - cairo-ps.h - cairo-quartz.h -+cairo-tee.h - cairo-win32.h - cairo-xlib.h - cairo-xlib-xrender.h - cairo-directfb.h - cairo-qpainter.h - #endif - dfiff.h - exception - - diff --git a/xulrunner-redhat-default-prefs.js b/xulrunner-redhat-default-prefs.js index b407f0f..bb3cfb8 100644 --- a/xulrunner-redhat-default-prefs.js +++ b/xulrunner-redhat-default-prefs.js @@ -4,5 +4,5 @@ pref("general.smoothScroll", true); pref("general.useragent.vendor", "Fedora"); pref("general.useragent.vendorSub", "RPM_VERREL"); pref("intl.locale.matchOS", true); -pref("toolkit.networkmanager.disable", false); +pref("network.manage-offline-status", true); pref("toolkit.storage.synchronous", 0); diff --git a/xulrunner.spec b/xulrunner.spec index bcb416a..184223c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -12,7 +12,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 11 +%global beta_version 12 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.22%{?pre_tag}%{?dist} +Release: 0.23%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -78,14 +78,10 @@ Patch9: mozilla-build-sbrk.patch Patch12: xulrunner-2.0-64bit-big-endian.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch -Patch15: xulrunner-2.0-system-cairo.patch -Patch16: xulrunner-2.0-system-cairo-tee.patch -Patch17: xulrunner-2.0-os2cc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: mozilla-libjpeg-turbo.patch -Patch22: mozilla-notify.patch Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch @@ -116,7 +112,6 @@ BuildRequires: sqlite-devel >= %{sqlite_version} BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel >= %{libnotify_version} -BuildRequires: autoconf213 BuildRequires: mesa-libGL-devel BuildRequires: yasm BuildRequires: libcurl-devel @@ -190,19 +185,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch12 -p2 -b .64bit-big-endian %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types -%patch15 -p1 -b .system-cairo -%patch16 -p1 -b .system-cairo-tee -%patch17 -p1 -b .os2cc %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo -%patch22 -p1 -b .notify %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -# For xulrunner-2.0-system-cairo-tee.patch -autoconf-2.13 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -480,6 +468,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Feb 25 2011 Christopher Aillon - 2.0-0.23 +- Update to 2.0 Beta 12 + * Sun Feb 13 2011 Dennis Gilmore 2.0-0.22 - disable nanojit on sparc64 its not supported and doesnt get automatically switched off From 3541332ac06292f290494323ea8660a6000e705c Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Fri, 25 Feb 2011 11:14:22 -0800 Subject: [PATCH 153/486] 2.0 Beta 12 - Remove upstreamed patches: - mozilla-notify.patch - xulrunner-2.0-os2cc.patch - xulrunner-2.0-system-cairo.patch - xulrunner-2.0-system-cairo-tee.patch - Update network pref per https://bugzilla.mozilla.org/show_bug.cgi?id=620472 and https://bugzilla.mozilla.org/show_bug.cgi?id=629833 --- .gitignore | 1 + mozilla-notify.patch | 40 -------- sources | 2 +- xulrunner-2.0-os2cc.patch | 21 ---- xulrunner-2.0-system-cairo-tee.patch | 29 ------ xulrunner-2.0-system-cairo.patch | 137 --------------------------- xulrunner-redhat-default-prefs.js | 2 +- xulrunner.spec | 19 +--- 8 files changed, 8 insertions(+), 243 deletions(-) delete mode 100644 mozilla-notify.patch delete mode 100644 xulrunner-2.0-os2cc.patch delete mode 100644 xulrunner-2.0-system-cairo-tee.patch delete mode 100644 xulrunner-2.0-system-cairo.patch diff --git a/.gitignore b/.gitignore index 31e78ee..3b7e14c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0b9.source.tar.bz2 /xulrunner-2.0b10.source.tar.bz2 /xulrunner-2.0b11.source.tar.bz2 +/xulrunner-2.0b12.source.tar.bz2 diff --git a/mozilla-notify.patch b/mozilla-notify.patch deleted file mode 100644 index 7c865de..0000000 --- a/mozilla-notify.patch +++ /dev/null @@ -1,40 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=628222 - -# HG changeset patch -# User Priit Laes -# Date 1295907218 -7200 -# Node ID ebfe5822e8916cce3d1811e67f6cb95ba3caeb24 -# Parent e874889e43d1b40f16c8234d53f39126a04e6621 -Add support for libnotify-0.7+ - -diff -r e874889e43d1 -r ebfe5822e891 toolkit/system/gnome/nsAlertsIconListener.cpp ---- a/toolkit/system/gnome/nsAlertsIconListener.cpp Fri Jan 21 16:45:23 2011 -0500 -+++ b/toolkit/system/gnome/nsAlertsIconListener.cpp Tue Jan 25 00:13:38 2011 +0200 -@@ -46,6 +46,11 @@ - - #include - -+// Compatibility macro for =libnotify-0.7.0 has no support for attaching to widgets -+#if !NOTIFY_CHECK_VERSION(0,7,0) -+ , NULL -+#endif -+ ); -+ - if (!mNotification) - return NS_ERROR_OUT_OF_MEMORY; - - diff --git a/sources b/sources index 11a4aa2..05689e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a52b8f4bb98f158ef0639db59dd39bce xulrunner-2.0b11.source.tar.bz2 +8b343c8f9db97199ddcf9744315c2bbb xulrunner-2.0b12.source.tar.bz2 diff --git a/xulrunner-2.0-os2cc.patch b/xulrunner-2.0-os2cc.patch deleted file mode 100644 index 3aa5286..0000000 --- a/xulrunner-2.0-os2cc.patch +++ /dev/null @@ -1,21 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=628252 - -diff -r b5ee327bf536 gfx/ots/src/os2.cc ---- a/gfx/ots/src/os2.cc Fri Jan 28 19:59:59 2011 +0100 -+++ b/gfx/ots/src/os2.cc Sat Jan 29 10:56:30 2011 -0800 -@@ -1,12 +1,14 @@ - // Copyright (c) 2009 The Chromium Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include -+ - #include "os2.h" - - #include "head.h" - - // OS/2 - OS/2 and Windows Metrics - // http://www.microsoft.com/opentype/otspec/os2.htm - - namespace ots { - diff --git a/xulrunner-2.0-system-cairo-tee.patch b/xulrunner-2.0-system-cairo-tee.patch deleted file mode 100644 index 85c8447..0000000 --- a/xulrunner-2.0-system-cairo-tee.patch +++ /dev/null @@ -1,29 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=623797 - -# HG changeset patch -# User Jory A. Pratt (anarchy@gentoo.org) -# Parent b27366868c807e07a11741a7a2eb404ebc08e5e7 -Check to ensure system cairo has tee backend support, part 2 bug #623797 - -diff --git a/configure.in b/configure.in ---- a/configure.in -+++ b/configure.in -@@ -8714,16 +8714,17 @@ if test "$MOZ_TREE_CAIRO"; then - - CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h - mv -f $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig 2> /dev/null - - else - PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION pixman-1 freetype2 fontconfig) - 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_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS" - fi - fi - - AC_SUBST(MOZ_TREE_CAIRO) - diff --git a/xulrunner-2.0-system-cairo.patch b/xulrunner-2.0-system-cairo.patch deleted file mode 100644 index 5300f38..0000000 --- a/xulrunner-2.0-system-cairo.patch +++ /dev/null @@ -1,137 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=623797 - -work around new features that are not avaliable in system-cairo on linux -(romaxa's original patch with modifications to use cairo-tee) - -diff --git a/config/system-headers b/config/system-headers ---- a/config/system-headers -+++ b/config/system-headers -@@ -81,16 +81,17 @@ pixman.h - cairo.h - cairo-atsui.h - cairo-beos.h - cairo-ft.h - cairo-glitz.h - cairo-os2.h - cairo-pdf.h - cairo-ps.h -+cairo-tee.h - cairo-quartz.h - cairo-win32.h - cairo-xlib.h - cairo-xlib-xrender.h - cairo-directfb.h - cairo-qpainter.h - #endif - dfiff.h -diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp ---- a/gfx/thebes/gfxASurface.cpp -+++ b/gfx/thebes/gfxASurface.cpp -@@ -216,19 +216,21 @@ gfxASurface::Init(cairo_surface_t* surfa - - mSurface = surface; - mSurfaceValid = PR_TRUE; - - if (existingSurface) { - mFloatingRefs = 0; - } else { - mFloatingRefs = 1; -+#ifdef MOZ_TREE_CAIRO - if (cairo_surface_get_content(surface) != CAIRO_CONTENT_COLOR) { - cairo_surface_set_subpixel_antialiasing(surface, CAIRO_SUBPIXEL_ANTIALIASING_DISABLED); - } -+#endif - } - } - - gfxASurface::gfxSurfaceType - gfxASurface::GetType() const - { - if (!mSurfaceValid) - return (gfxSurfaceType)-1; -@@ -430,28 +432,34 @@ gfxASurface::FormatFromContent(gfxASurfa - default: - return ImageFormatRGB24; - } - } - - void - gfxASurface::SetSubpixelAntialiasingEnabled(PRBool aEnabled) - { -+#ifdef MOZ_TREE_CAIRO - if (!mSurfaceValid) - return; - cairo_surface_set_subpixel_antialiasing(mSurface, - aEnabled ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED); -+#endif - } - - PRBool - gfxASurface::GetSubpixelAntialiasingEnabled() - { - if (!mSurfaceValid) - return PR_FALSE; -+#ifdef MOZ_TREE_CAIRO - return cairo_surface_get_subpixel_antialiasing(mSurface) == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED; -+#else -+ return PR_TRUE; -+#endif - } - - PRInt32 - gfxASurface::BytePerPixelFromFormat(gfxImageFormat format) - { - switch (format) { - case ImageFormatARGB32: - case ImageFormatRGB24: -diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp ---- a/gfx/thebes/gfxTeeSurface.cpp -+++ b/gfx/thebes/gfxTeeSurface.cpp -@@ -32,17 +32,24 @@ - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - - #include "gfxTeeSurface.h" - -+/* Once cairo in tree is update ensure we remove the ifdef -+ and just include cairo-tee.h -+*/ -+#ifdef MOZ_TREE_CAIRO - #include "cairo.h" -+#else -+#include "cairo-tee.h" -+#endif - - gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf) - { - Init(csurf, PR_TRUE); - } - - gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, PRInt32 aSurfaceCount) - { -diff --git a/js/src/config/system-headers b/js/src/config/system-headers ---- a/js/src/config/system-headers -+++ b/js/src/config/system-headers -@@ -82,16 +82,17 @@ cairo.h - cairo-atsui.h - cairo-beos.h - cairo-ft.h - cairo-glitz.h - cairo-os2.h - cairo-pdf.h - cairo-ps.h - cairo-quartz.h -+cairo-tee.h - cairo-win32.h - cairo-xlib.h - cairo-xlib-xrender.h - cairo-directfb.h - cairo-qpainter.h - #endif - dfiff.h - exception - - diff --git a/xulrunner-redhat-default-prefs.js b/xulrunner-redhat-default-prefs.js index b407f0f..bb3cfb8 100644 --- a/xulrunner-redhat-default-prefs.js +++ b/xulrunner-redhat-default-prefs.js @@ -4,5 +4,5 @@ pref("general.smoothScroll", true); pref("general.useragent.vendor", "Fedora"); pref("general.useragent.vendorSub", "RPM_VERREL"); pref("intl.locale.matchOS", true); -pref("toolkit.networkmanager.disable", false); +pref("network.manage-offline-status", true); pref("toolkit.storage.synchronous", 0); diff --git a/xulrunner.spec b/xulrunner.spec index bcb416a..184223c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -12,7 +12,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 11 +%global beta_version 12 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.22%{?pre_tag}%{?dist} +Release: 0.23%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -78,14 +78,10 @@ Patch9: mozilla-build-sbrk.patch Patch12: xulrunner-2.0-64bit-big-endian.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch -Patch15: xulrunner-2.0-system-cairo.patch -Patch16: xulrunner-2.0-system-cairo-tee.patch -Patch17: xulrunner-2.0-os2cc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: mozilla-libjpeg-turbo.patch -Patch22: mozilla-notify.patch Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch @@ -116,7 +112,6 @@ BuildRequires: sqlite-devel >= %{sqlite_version} BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel >= %{libnotify_version} -BuildRequires: autoconf213 BuildRequires: mesa-libGL-devel BuildRequires: yasm BuildRequires: libcurl-devel @@ -190,19 +185,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch12 -p2 -b .64bit-big-endian %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types -%patch15 -p1 -b .system-cairo -%patch16 -p1 -b .system-cairo-tee -%patch17 -p1 -b .os2cc %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo -%patch22 -p1 -b .notify %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -# For xulrunner-2.0-system-cairo-tee.patch -autoconf-2.13 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -480,6 +468,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Feb 25 2011 Christopher Aillon - 2.0-0.23 +- Update to 2.0 Beta 12 + * Sun Feb 13 2011 Dennis Gilmore 2.0-0.22 - disable nanojit on sparc64 its not supported and doesnt get automatically switched off From 584ff40cbee00267d8e2b9799ab95bfc6258f923 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sat, 26 Feb 2011 16:29:57 -0800 Subject: [PATCH 154/486] No longer need to get rid of chrome subdirectories ...because there aren't any. --- xulrunner.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 184223c..7ce9a76 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -284,10 +284,6 @@ DESTDIR=$RPM_BUILD_ROOT make install %{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config -cd $RPM_BUILD_ROOT%{mozappdir}/chrome -find . -name "*" -type d -maxdepth 1 -exec %{__rm} -rf {} \; -cd - - # Prepare our devel package %{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} %{__mkdir_p} $RPM_BUILD_ROOT/%{_datadir}/idl/${INTERNAL_APP_SDK_NAME} From 0488b40259c061d63ef763ceaf1877e14fdd36ab Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sat, 26 Feb 2011 16:32:09 -0800 Subject: [PATCH 155/486] Remove User-Agent customizations Support got dropped in https://bugzilla.mozilla.org/show_bug.cgi?id=581008 https://developer.mozilla.org/en/Gecko_user_agent_string_reference --- xulrunner-redhat-default-prefs.js | 2 -- xulrunner.spec | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/xulrunner-redhat-default-prefs.js b/xulrunner-redhat-default-prefs.js index bb3cfb8..7177d9b 100644 --- a/xulrunner-redhat-default-prefs.js +++ b/xulrunner-redhat-default-prefs.js @@ -1,8 +1,6 @@ pref("app.update.enabled", false); pref("app.update.autoInstallEnabled", false); pref("general.smoothScroll", true); -pref("general.useragent.vendor", "Fedora"); -pref("general.useragent.vendorSub", "RPM_VERREL"); pref("intl.locale.matchOS", true); pref("network.manage-offline-status", true); pref("toolkit.storage.synchronous", 0); diff --git a/xulrunner.spec b/xulrunner.spec index 7ce9a76..9f0f596 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -271,10 +271,8 @@ DESTDIR=$RPM_BUILD_ROOT make install $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_SDK_NAME} %{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications} -# set up our default preferences -%{__cat} %{SOURCE12} | %{__sed} -e 's,RPM_VERREL,%{version}-%{release},g' > rh-default-prefs -%{__install} -p -D -m 644 rh-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-redhat.js -%{__rm} rh-default-prefs +# Install our default preferences +%{__install} -p -D -m 644 %{SOURCE12} $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-redhat.js # Start script install %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} From bc4cfee319addf2021c43a3c6af840962647df47 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sat, 26 Feb 2011 16:33:20 -0800 Subject: [PATCH 156/486] Enable omnijar support Patchset from https://bugzilla.mozilla.org/show_bug.cgi?id=620931 --- xulrunner-omnijar.patch | 1737 +++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 1739 insertions(+) create mode 100644 xulrunner-omnijar.patch diff --git a/xulrunner-omnijar.patch b/xulrunner-omnijar.patch new file mode 100644 index 0000000..f27f7e3 --- /dev/null +++ b/xulrunner-omnijar.patch @@ -0,0 +1,1737 @@ +# HG changeset patch +# Parent a7dea879b4b445a23186f438900562155bb39e99 +Bug 620931 part 1 - Use chrome manifest to register resource://gre-resources/ + +diff --git a/layout/style/jar.mn b/layout/style/jar.mn +--- a/layout/style/jar.mn ++++ b/layout/style/jar.mn +@@ -1,8 +1,10 @@ + toolkit.jar: + * res/ua.css (ua.css) + res/html.css (html.css) + res/quirk.css (quirk.css) + res/viewsource.css (viewsource.css) + * res/forms.css (forms.css) + res/arrow.gif (arrow.gif) + res/arrowd.gif (arrowd.gif) ++ ++% resource gre-resources %res/ +diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp +--- a/netwerk/protocol/res/nsResProtocolHandler.cpp ++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp +@@ -75,17 +75,16 @@ static nsResProtocolHandler *gResHandler + // + // this enables PR_LOG_ALWAYS level information and places all output in + // the file log.txt + // + static PRLogModuleInfo *gResLog; + #endif + + #define kGRE NS_LITERAL_CSTRING("gre") +-#define kGRE_RESOURCES NS_LITERAL_CSTRING("gre-resources") + + //---------------------------------------------------------------------------- + // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution + //---------------------------------------------------------------------------- + + nsresult + nsResURL::EnsureFile() + { +@@ -197,28 +196,16 @@ nsResProtocolHandler::Init() + NS_ENSURE_SUCCESS(rv, rv); + + // + // make resource://gre/ point to the GRE directory + // + rv = AddSpecialDir(NS_GRE_DIR, kGRE); + NS_ENSURE_SUCCESS(rv, rv); + +- // make resource://gre-resources/ point to gre toolkit[.jar]/res +- nsCOMPtr greURI; +- nsCOMPtr greResURI; +- GetSubstitution(kGRE, getter_AddRefs(greURI)); +-#ifdef MOZ_CHROME_FILE_FORMAT_JAR +- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "jar:chrome/toolkit.jar!/res/"); +-#else +- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "chrome/toolkit/res/"); +-#endif +- rv = mIOService->NewURI(strGRE_RES_URL, nsnull, greURI, +- getter_AddRefs(greResURI)); +- SetSubstitution(kGRE_RESOURCES, greResURI); + //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir... + // but once I finish multiple chrome registration I'm not sure that it is needed + + // XXX dveditz: resource://pchrome/ defeats profile directory salting + // if web content can load it. Tread carefully. + + return rv; + } +@@ -242,22 +229,16 @@ nsResProtocolHandler::Init(nsIFile *aOmn + // these entries should be kept in sync with the normal Init function + + // resource:/// points to jar:omni.jar!/ + SetSubstitution(EmptyCString(), uri); + + // resource://gre/ points to jar:omni.jar!/ + SetSubstitution(kGRE, uri); + +- urlStr += "chrome/toolkit/res/"; +- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri)); +- NS_ENSURE_SUCCESS(rv, rv); +- +- // resource://gre-resources/ points to jar:omni.jar!/chrome/toolkit/res/ +- SetSubstitution(kGRE_RESOURCES, uri); + return NS_OK; + } + #endif + + #ifdef MOZ_IPC + static PLDHashOperator + EnumerateSubstitution(const nsACString& aKey, + nsIURI* aURI, +# HG changeset patch +# Parent 3038cccba1a071d6b418e15442d0f2d9f3dcb11d +Bug 620931 part 2 - When building --with-libxul-sdk, use the right preferences directory + +diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in +--- a/browser/locales/Makefile.in ++++ b/browser/locales/Makefile.in +@@ -183,17 +183,17 @@ install:: $(addsuffix .xml,$(SEARCH_PLUG + $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins + + + libs-%: + $(NSINSTALL) -D $(DIST)/install + @$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1 + @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 + @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 +- @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1 ++ @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR) BOTH_MANIFESTS=1 + @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 + + + repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe" + repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES) + @echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)." + $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export + $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx +diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk +--- a/toolkit/mozapps/installer/packager.mk ++++ b/toolkit/mozapps/installer/packager.mk +@@ -307,17 +307,17 @@ OMNIJAR_FILES = \ + res \ + defaults \ + greprefs.js \ + jsloader \ + $(NULL) + + NON_OMNIJAR_FILES += \ + chrome/icons/\* \ +- defaults/pref/channel-prefs.js \ ++ $(PREF_DIR)/channel-prefs.js \ + res/cursors/\* \ + res/MainMenu.nib/\* \ + $(NULL) + + PACK_OMNIJAR = \ + rm -f omni.jar components/binary.manifest && \ + grep -h '^binary-component' components/*.manifest > binary.manifest ; \ + sed -e 's/^binary-component/\#binary-component/' components/components.manifest > components.manifest && \ +# HG changeset patch +# Parent cd8df8030f7ad7530692bd7c4391a8009df56a02 +Bug 620931 part 3 - Allow GRE and XUL application to use omni.jar independently + +We now store two independent locations for an omni.jar, allowing GRE/XRE and +XUL application to each have their own omni.jar. And since xulrunner setups +are very independent from the XUL applications, we implement support for both +omni.jar and non omni.jar cases in the same runtime, with the side effect of +allowing to switch from one to the other manually without rebuilding the +binaries. + +We let the mozilla::Omnijar API handle both cases, so that callers don't need +too much work to support them. + +We also make the preferences service load the same set of preferences in all +the various cases (unified vs. separate, omni.jar vs. no omni.jar). + +The child process launcher for IPC is modified to pass the base directories +needed for the mozilla::Omnijar API initialization in the child process. + +Finally, the startupcache file name canonicalization is modified to separate +APP and GRE resources. + +diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp +--- a/ipc/glue/GeckoChildProcessHost.cpp ++++ b/ipc/glue/GeckoChildProcessHost.cpp +@@ -440,26 +440,29 @@ GeckoChildProcessHost::PerformAsyncLaunc + // other end of the socketpair() from us + + std::vector childArgv; + + childArgv.push_back(exePath.value()); + + childArgv.insert(childArgv.end(), aExtraOpts.begin(), aExtraOpts.end()); + +-#ifdef MOZ_OMNIJAR + // Make sure the child process can find the omnijar + // See XRE_InitCommandLine in nsAppRunner.cpp +- nsCAutoString omnijarPath; +- if (mozilla::OmnijarPath()) { +- mozilla::OmnijarPath()->GetNativePath(omnijarPath); +- childArgv.push_back("-omnijar"); +- childArgv.push_back(omnijarPath.get()); ++ nsCAutoString path; ++ nsCOMPtr file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE); ++ if (file && NS_SUCCEEDED(file->GetNativePath(path))) { ++ childArgv.push_back("-grebase"); ++ childArgv.push_back(path.get()); + } +-#endif ++ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP); ++ if (file && NS_SUCCEEDED(file->GetNativePath(path))) { ++ childArgv.push_back("-appbase"); ++ childArgv.push_back(path.get()); ++ } + + childArgv.push_back(pidstring); + + #if defined(MOZ_CRASHREPORTER) + # if defined(OS_LINUX) + int childCrashFd, childCrashRemapFd; + if (!CrashReporter::CreateNotificationPipeForChild( + &childCrashFd, &childCrashRemapFd)) +@@ -552,26 +555,29 @@ GeckoChildProcessHost::PerformAsyncLaunc + for (std::vector::iterator it = aExtraOpts.begin(); + it != aExtraOpts.end(); + ++it) { + cmdLine.AppendLooseValue(UTF8ToWide(*it)); + } + + cmdLine.AppendLooseValue(std::wstring(mGroupId.get())); + +-#ifdef MOZ_OMNIJAR + // Make sure the child process can find the omnijar + // See XRE_InitCommandLine in nsAppRunner.cpp +- nsAutoString omnijarPath; +- if (mozilla::OmnijarPath()) { +- mozilla::OmnijarPath()->GetPath(omnijarPath); +- cmdLine.AppendLooseValue(UTF8ToWide("-omnijar")); +- cmdLine.AppendLooseValue(omnijarPath.get()); ++ nsAutoString path; ++ nsCOMPtr file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE); ++ if (file && NS_SUCCEEDED(file->GetPath(path))) { ++ cmdLine.AppendLooseValue(UTF8ToWide("-grebase")); ++ cmdLine.AppendLooseValue(path.get()); + } +-#endif ++ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP); ++ if (file && NS_SUCCEEDED(file->GetPath(path))) { ++ cmdLine.AppendLooseValue(UTF8ToWide("-appbase")); ++ cmdLine.AppendLooseValue(path.get()); ++ } + + cmdLine.AppendLooseValue(UTF8ToWide(pidstring)); + + #if defined(MOZ_CRASHREPORTER) + cmdLine.AppendLooseValue( + UTF8ToWide(CrashReporter::GetChildNotificationPipe())); + #endif + +diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect/loader/mozJSComponentLoader.cpp +--- a/js/src/xpconnect/loader/mozJSComponentLoader.cpp ++++ b/js/src/xpconnect/loader/mozJSComponentLoader.cpp +@@ -81,16 +81,17 @@ + #include "nsIConsoleService.h" + #include "nsIStorageStream.h" + #include "nsIStringStream.h" + #include "prmem.h" + #if defined(XP_WIN) + #include "nsILocalFileWin.h" + #endif + #include "xpcprivate.h" ++#include "nsIResProtocolHandler.h" + + #ifdef MOZ_ENABLE_LIBXUL + #include "mozilla/scache/StartupCache.h" + #include "mozilla/scache/StartupCacheUtils.h" + #endif + #include "mozilla/Omnijar.h" + + #include "jsdbgapi.h" +@@ -621,34 +622,21 @@ mozJSComponentLoader::LoadModule(nsILoca + + const mozilla::Module* + mozJSComponentLoader::LoadModuleFromJAR(nsILocalFile *aJarFile, + const nsACString &aComponentPath) + { + #if !defined(XPCONNECT_STANDALONE) + nsresult rv; + +- nsCAutoString fullSpec; +- +-#ifdef MOZ_OMNIJAR +- PRBool equal; +- rv = aJarFile->Equals(mozilla::OmnijarPath(), &equal); +- if (NS_SUCCEEDED(rv) && equal) { +- fullSpec = "resource://gre/"; +- } else { +-#endif +- nsCAutoString fileSpec; +- NS_GetURLSpecFromActualFile(aJarFile, fileSpec); +- fullSpec = "jar:"; +- fullSpec += fileSpec; +- fullSpec += "!/"; +-#ifdef MOZ_OMNIJAR +- } +-#endif +- ++ nsCAutoString fullSpec, fileSpec; ++ NS_GetURLSpecFromActualFile(aJarFile, fileSpec); ++ fullSpec = "jar:"; ++ fullSpec += fileSpec; ++ fullSpec += "!/"; + fullSpec += aComponentPath; + + nsCOMPtr uri; + rv = NS_NewURI(getter_AddRefs(uri), fullSpec); + if (NS_FAILED(rv)) + return NULL; + + nsAutoString hashstring; +@@ -833,57 +821,138 @@ class JSScriptHolder + JSScriptHolder(JSContext *cx, JSScript *script) + : mCx(cx), mScript(script) {} + ~JSScriptHolder() { ::JS_DestroyScript(mCx, mScript); } + private: + JSContext *mCx; + JSScript *mScript; + }; + ++static const char baseName[2][5] = { "gre/", "app/" }; ++ ++static inline PRBool ++canonicalizeBase(nsCAutoString &spec, nsACString &out, mozilla::Omnijar::Type aType) ++{ ++ nsCAutoString base; ++ nsresult rv = mozilla::Omnijar::GetURIString(aType, base); ++ ++ if (NS_FAILED(rv) || !base.Length()) ++ return PR_FALSE; ++ ++ if (base.Compare(spec.get(), PR_FALSE, base.Length())) ++ return PR_FALSE; ++ ++ out.Append("/resource/"); ++ out.Append(baseName[aType]); ++ out.Append(Substring(spec, base.Length())); ++ return PR_TRUE; ++} + /** + * PathifyURI transforms mozilla .js uris into useful zip paths + * to make it makes it easier to manipulate startup cache entries + * using standard zip tools. + * Transformations applied: +- * * jsloader/ prefix is used to group mozJSComponentLoader cache entries in ++ * * jsloader/ prefix is used to group mozJSComponentLoader cache entries in + * a top-level zip directory. +- * * In MOZ_OMNIJAR case resource:/// and resource://gre/ URIs refer to the same path +- * so treat both of them as resource://gre/ ++ * * resource:// URIs are resolved to their corresponding file/jar URI to ++ * canonicalize resources URIs other than gre and app. ++ * * Paths under GRE or APP directory have their base path replaced with ++ * resource/gre or resource/app to avoid depending on install location. ++ * * jar:file:///path/to/file.jar!/sub/path urls are replaced with ++ * /path/to/file.jar/sub/path + * * .bin suffix is added to the end of the path to indicate that jsloader/ entries + * are binary representations of JS source. + * For example: +- * resource://gre/modules/XPCOMUtils.jsm becomes +- * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin ++ * resource://gre/modules/XPCOMUtils.jsm or ++ * file://$GRE_DIR/modules/XPCOMUtils.jsm or ++ * jar:file://$GRE_DIR/omni.jar!/modules/XPCOMUtils.jsm become ++ * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin ++ * file://$PROFILE_DIR/extensions/{uuid}/components/component.js becomes ++ * jsloader/$PROFILE_DIR/extensions/%7Buuid%7D/components/component.js.bin ++ * jar:file://$PROFILE_DIR/extensions/some.xpi!/components/component.js becomes ++ * jsloader/$PROFILE_DIR/extensions/some.xpi/components/component.js.bin + */ + static nsresult + PathifyURI(nsIURI *in, nsACString &out) + { +- out = "jsloader/"; +- nsCAutoString scheme; +- nsresult rv = in->GetScheme(scheme); +- NS_ENSURE_SUCCESS(rv, rv); +- out.Append(scheme); +- nsCAutoString host; +- // OK for GetHost to fail since it's not implemented sometimes +- in->GetHost(host); +-#ifdef MOZ_OMNIJAR +- if (scheme.Equals("resource") && host.Length() == 0){ +- host = "gre"; +- } +-#endif +- if (host.Length()) { +- out.Append("/"); +- out.Append(host); +- } +- nsCAutoString path; +- rv = in->GetPath(path); +- NS_ENSURE_SUCCESS(rv, rv); +- out.Append(path); +- out.Append(".bin"); +- return NS_OK; ++ PRBool equals; ++ nsresult rv; ++ nsCOMPtr uri = in; ++ nsCAutoString spec; ++ ++ out = "jsloader"; ++ ++ // Resolve resource:// URIs. At the end of this if/else block, we ++ // have both spec and uri variables identifying the same URI. ++ if (NS_SUCCEEDED(in->SchemeIs("resource", &equals)) && equals) { ++ nsCOMPtr ioService = do_GetIOService(&rv); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ nsCOMPtr ph; ++ rv = ioService->GetProtocolHandler("resource", getter_AddRefs(ph)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ nsCOMPtr irph(do_QueryInterface(ph, &rv)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ rv = irph->ResolveURI(in, spec); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ rv = ioService->NewURI(spec, nsnull, nsnull, getter_AddRefs(uri)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ } else { ++ rv = in->GetSpec(spec); ++ NS_ENSURE_SUCCESS(rv, rv); ++ } ++ ++ if (!canonicalizeBase(spec, out, mozilla::Omnijar::GRE) && ++ !canonicalizeBase(spec, out, mozilla::Omnijar::APP)) { ++ if (NS_SUCCEEDED(uri->SchemeIs("file", &equals)) && equals) { ++ nsCOMPtr baseFileURL; ++ baseFileURL = do_QueryInterface(uri, &rv); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ nsCAutoString path; ++ rv = baseFileURL->GetPath(path); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ out.Append(path); ++ } else if (NS_SUCCEEDED(uri->SchemeIs("jar", &equals)) && equals) { ++ nsCOMPtr jarURI = do_QueryInterface(uri, &rv); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ nsCOMPtr jarFileURI; ++ rv = jarURI->GetJARFile(getter_AddRefs(jarFileURI)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ nsCOMPtr jarFileURL; ++ jarFileURL = do_QueryInterface(jarFileURI, &rv); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ nsCAutoString path; ++ rv = jarFileURL->GetPath(path); ++ NS_ENSURE_SUCCESS(rv, rv); ++ out.Append(path); ++ ++ rv = jarURI->GetJAREntry(path); ++ NS_ENSURE_SUCCESS(rv, rv); ++ out.Append("/"); ++ out.Append(path); ++ } else { // Very unlikely ++ nsCAutoString spec; ++ rv = uri->GetSpec(spec); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ out.Append("/"); ++ out.Append(spec); ++ } ++ } ++ ++ out.Append(".bin"); ++ return NS_OK; + } + + /* static */ + #ifdef MOZ_ENABLE_LIBXUL + nsresult + mozJSComponentLoader::ReadScript(StartupCache* cache, nsIURI *uri, + JSContext *cx, JSScript **script) + { +diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp +--- a/modules/libjar/nsJAR.cpp ++++ b/modules/libjar/nsJAR.cpp +@@ -170,26 +170,23 @@ nsJAR::Open(nsIFile* zipFile) + NS_ENSURE_ARG_POINTER(zipFile); + if (mLock) return NS_ERROR_FAILURE; // Already open! + + mZipFile = zipFile; + + mLock = PR_NewLock(); + NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY); + +-#ifdef MOZ_OMNIJAR + // The omnijar is special, it is opened early on and closed late + // this avoids reopening it +- PRBool equals; +- nsresult rv = zipFile->Equals(mozilla::OmnijarPath(), &equals); +- if (NS_SUCCEEDED(rv) && equals) { +- mZip = mozilla::OmnijarReader(); ++ nsZipArchive *zip = mozilla::Omnijar::GetReader(zipFile); ++ if (zip) { ++ mZip = zip; + return NS_OK; + } +-#endif + return mZip->OpenArchive(zipFile); + } + + NS_IMETHODIMP + nsJAR::OpenInner(nsIZipReader *aZipReader, const char *aZipEntry) + { + NS_ENSURE_ARG_POINTER(aZipReader); + NS_ENSURE_ARG_POINTER(aZipEntry); +@@ -234,23 +231,22 @@ nsJAR::Close() + } + + mParsedManifest = PR_FALSE; + mManifestData.Reset(); + mGlobalStatus = JAR_MANIFEST_NOT_PARSED; + mTotalItemsInManifest = 0; + mOuterZipEntry.Truncate(0); + +-#ifdef MOZ_OMNIJAR +- if (mZip == mozilla::OmnijarReader()) { ++ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) || ++ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP))) { + mZip.forget(); + mZip = new nsZipArchive(); + return NS_OK; + } +-#endif + return mZip->CloseArchive(); + } + + NS_IMETHODIMP + nsJAR::Test(const char *aEntryName) + { + return mZip->Test(aEntryName); + } +@@ -391,22 +387,21 @@ nsJAR::GetInputStreamWithSpec(const nsAC + NS_IMETHODIMP + nsJAR::GetCertificatePrincipal(const char* aFilename, nsIPrincipal** aPrincipal) + { + //-- Parameter check + if (!aPrincipal) + return NS_ERROR_NULL_POINTER; + *aPrincipal = nsnull; + +-#ifdef MOZ_OMNIJAR + // Don't check signatures in the omnijar - this is only + // interesting for extensions/XPIs. +- if (mZip == mozilla::OmnijarReader()) ++ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) || ++ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP))) + return NS_OK; +-#endif + + //-- Parse the manifest + nsresult rv = ParseManifest(); + if (NS_FAILED(rv)) return rv; + if (mGlobalStatus == JAR_NO_MANIFEST) + return NS_OK; + + PRInt16 requestedStatus; +diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefService.cpp +--- a/modules/libpref/src/nsPrefService.cpp ++++ b/modules/libpref/src/nsPrefService.cpp +@@ -67,20 +67,18 @@ + + #include "prefapi.h" + #include "prefread.h" + #include "prefapi_private_data.h" + #include "PrefTuple.h" + + #include "nsITimelineService.h" + +-#ifdef MOZ_OMNIJAR + #include "mozilla/Omnijar.h" + #include "nsZipArchive.h" +-#endif + + // Definitions + #define INITIAL_PREF_FILES 10 + static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID); + + // Prototypes + static nsresult openPrefFile(nsIFile* aFile); + static nsresult pref_InitInitialObjects(void); +@@ -793,124 +791,144 @@ static nsresult pref_LoadPrefsInDirList( + pref_LoadPrefsInDir(dir, nsnull, 0); + } + } + } + } + return NS_OK; + } + +-//---------------------------------------------------------------------------------------- +-// Initialize default preference JavaScript buffers from +-// appropriate TEXT resources +-//---------------------------------------------------------------------------------------- +-static nsresult pref_InitDefaults() +-{ +- nsCOMPtr greprefsFile; +- nsresult rv; +- +- rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile)); +- NS_ENSURE_SUCCESS(rv, rv); +- +- rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js")); +- NS_ENSURE_SUCCESS(rv, rv); +- +- rv = openPrefFile(greprefsFile); +- if (NS_FAILED(rv)) { +- NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?"); +- } +- +- return NS_OK; +-} +- +-#ifdef MOZ_OMNIJAR + static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name) + { + nsZipItemPtr manifest(jarReader, name, true); + NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE); + + PrefParseState ps; + PREF_InitParseState(&ps, PREF_ReaderCallback, NULL); + nsresult rv = PREF_ParseBuf(&ps, manifest, manifest.Length()); + PREF_FinalizeParseState(&ps); + + return rv; + } + +-static nsresult pref_InitAppDefaultsFromOmnijar() +-{ +- nsresult rv; +- +- nsZipArchive* jarReader = mozilla::OmnijarReader(); +- if (!jarReader) +- return pref_InitDefaults(); +- +- rv = pref_ReadPrefFromJar(jarReader, "greprefs.js"); +- NS_ENSURE_SUCCESS(rv, rv); +- +- nsZipFind *findPtr; +- rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); +- NS_ENSURE_SUCCESS(rv, rv); +- +- nsAutoPtr find(findPtr); +- +- nsTArray prefEntries; +- const char *entryName; +- PRUint16 entryNameLen; +- while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { +- prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); +- } +- +- prefEntries.Sort(); +- for (PRUint32 i = prefEntries.Length(); i--; ) { +- rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); +- if (NS_FAILED(rv)) +- NS_WARNING("Error parsing preferences."); +- } +- +- return NS_OK; +-} +-#endif +- ++//---------------------------------------------------------------------------------------- ++// Initialize default preference JavaScript buffers from ++// appropriate TEXT resources ++//---------------------------------------------------------------------------------------- + static nsresult pref_InitInitialObjects() + { + nsresult rv; + +- // first we parse the GRE default prefs. This also works if we're not using a GRE, +-#ifdef MOZ_OMNIJAR +- rv = pref_InitAppDefaultsFromOmnijar(); +-#else +- rv = pref_InitDefaults(); +-#endif +- NS_ENSURE_SUCCESS(rv, rv); ++ // In omni.jar case, we load the following prefs: ++ // - jar:$gre/omni.jar!/greprefs.js ++ // - jar:$gre/omni.jar!/defaults/pref/*.js ++ // In non omni.jar case, we load: ++ // - $gre/greprefs.js ++ // ++ // When $app == $gre, we additionally load, in all cases: ++ // - $gre/defaults/pref/*.js ++ // This is kept for bug 591866 (channel-prefs.js should not be in omni.jar). ++ // We load all files instead of channel-prefs.js only to have the same ++ // behaviour as $app != $gre. ++ // ++ // When $app != $gre, we additionally load, in omni.jar case: ++ // - jar:$app/omni.jar!/defaults/preferences/*.js ++ // - $app/defaults/preferences/*.js ++ // and in non omni.jar case: ++ // - $app/defaults/preferences/*.js + +- nsCOMPtr defaultPrefDir; +- // now parse the "application" default preferences +- rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); +- NS_ENSURE_SUCCESS(rv, rv); ++ nsZipFind *findPtr; ++ nsAutoPtr find; ++ nsTArray prefEntries; ++ const char *entryName; ++ PRUint16 entryNameLen; + +- /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ +- static const char* specialFiles[] = { ++ nsZipArchive* jarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE); ++ if (jarReader) { ++ // Load jar:$gre/omni.jar!/greprefs.js ++ rv = pref_ReadPrefFromJar(jarReader, "greprefs.js"); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ // Load jar:$gre/omni.jar!/defaults/pref/*.js ++ rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ find = findPtr; ++ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { ++ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); ++ } ++ ++ prefEntries.Sort(); ++ for (PRUint32 i = prefEntries.Length(); i--; ) { ++ rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); ++ if (NS_FAILED(rv)) ++ NS_WARNING("Error parsing preferences."); ++ } ++ } else { ++ // Load $gre/greprefs.js ++ nsCOMPtr greprefsFile; ++ rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js")); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ rv = openPrefFile(greprefsFile); ++ if (NS_FAILED(rv)) ++ NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?"); ++ } ++ ++ if (!mozilla::Omnijar::HasOmnijar(mozilla::Omnijar::APP)) { ++ // Load $gre/defaults/pref/*.js ++ nsCOMPtr defaultPrefDir; ++ ++ rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ ++ static const char* specialFiles[] = { + #if defined(XP_MAC) || defined(XP_MACOSX) + "macprefs.js" + #elif defined(XP_WIN) + "winpref.js" + #elif defined(XP_UNIX) + "unix.js" +-#if defined(_AIX) ++#if defined(VMS) ++ , "openvms.js" ++#elif defined(_AIX) + , "aix.js" + #endif + #elif defined(XP_OS2) + "os2pref.js" ++#elif defined(XP_BEOS) ++ "beos.js" + #endif +- }; ++ }; + +- rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); +- if (NS_FAILED(rv)) { +- NS_WARNING("Error parsing application default preferences."); ++ rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); ++ if (NS_FAILED(rv)) ++ NS_WARNING("Error parsing application default preferences."); ++ } ++ ++ // Load jar:$app/omni.jar!/defaults/preferences/*.js ++ nsZipArchive *appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP); ++ if (appJarReader) { ++ rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr); ++ NS_ENSURE_SUCCESS(rv, rv); ++ find = findPtr; ++ prefEntries.Clear(); ++ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { ++ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); ++ } ++ prefEntries.Sort(); ++ for (PRUint32 i = prefEntries.Length(); i--; ) { ++ rv = pref_ReadPrefFromJar(appJarReader, prefEntries[i].get()); ++ if (NS_FAILED(rv)) ++ NS_WARNING("Error parsing preferences."); ++ } + } + + rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST); + NS_ENSURE_SUCCESS(rv, rv); + + NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID, + nsnull, NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID); + +diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp +--- a/netwerk/protocol/res/nsResProtocolHandler.cpp ++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp +@@ -152,97 +152,62 @@ nsResProtocolHandler::nsResProtocolHandl + } + + nsResProtocolHandler::~nsResProtocolHandler() + { + gResHandler = nsnull; + } + + nsresult +-nsResProtocolHandler::AddSpecialDir(const char* aSpecialDir, const nsACString& aSubstitution) +-{ +- nsCOMPtr file; +- nsresult rv = NS_GetSpecialDirectory(aSpecialDir, getter_AddRefs(file)); +- NS_ENSURE_SUCCESS(rv, rv); +- +- nsCOMPtr uri; +- rv = mIOService->NewFileURI(file, getter_AddRefs(uri)); +- NS_ENSURE_SUCCESS(rv, rv); +- +- return SetSubstitution(aSubstitution, uri); +-} +- +-nsresult + nsResProtocolHandler::Init() + { + if (!mSubstitutions.Init(32)) + return NS_ERROR_UNEXPECTED; + + nsresult rv; + + mIOService = do_GetIOService(&rv); + NS_ENSURE_SUCCESS(rv, rv); + +-#ifdef MOZ_OMNIJAR +- nsCOMPtr omniJar(mozilla::OmnijarPath()); +- if (omniJar) +- return Init(omniJar); +-#endif +- +- // these entries should be kept in sync with the omnijar Init function ++ nsCAutoString appURI, greURI; ++ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::APP, appURI); ++ NS_ENSURE_SUCCESS(rv, rv); ++ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::GRE, greURI); ++ NS_ENSURE_SUCCESS(rv, rv); + + // +- // make resource:/// point to the application directory ++ // make resource:/// point to the application directory or omnijar + // +- rv = AddSpecialDir(NS_OS_CURRENT_PROCESS_DIR, EmptyCString()); ++ nsCOMPtr uri; ++ rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ rv = SetSubstitution(EmptyCString(), uri); + NS_ENSURE_SUCCESS(rv, rv); + + // + // make resource://gre/ point to the GRE directory + // +- rv = AddSpecialDir(NS_GRE_DIR, kGRE); ++ if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0. ++ rv = NS_NewURI(getter_AddRefs(uri), greURI); ++ NS_ENSURE_SUCCESS(rv, rv); ++ } ++ ++ rv = SetSubstitution(kGRE, uri); + NS_ENSURE_SUCCESS(rv, rv); + + //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir... + // but once I finish multiple chrome registration I'm not sure that it is needed + + // XXX dveditz: resource://pchrome/ defeats profile directory salting + // if web content can load it. Tread carefully. + + return rv; + } + +-#ifdef MOZ_OMNIJAR +-nsresult +-nsResProtocolHandler::Init(nsIFile *aOmniJar) +-{ +- nsresult rv; +- nsCOMPtr uri; +- nsCAutoString omniJarSpec; +- NS_GetURLSpecFromActualFile(aOmniJar, omniJarSpec, mIOService); +- +- nsCAutoString urlStr("jar:"); +- urlStr += omniJarSpec; +- urlStr += "!/"; +- +- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri)); +- NS_ENSURE_SUCCESS(rv, rv); +- +- // these entries should be kept in sync with the normal Init function +- +- // resource:/// points to jar:omni.jar!/ +- SetSubstitution(EmptyCString(), uri); +- +- // resource://gre/ points to jar:omni.jar!/ +- SetSubstitution(kGRE, uri); +- +- return NS_OK; +-} +-#endif +- + #ifdef MOZ_IPC + static PLDHashOperator + EnumerateSubstitution(const nsACString& aKey, + nsIURI* aURI, + void* aArg) + { + nsTArray* resources = + static_cast*>(aArg); +diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp +--- a/startupcache/StartupCache.cpp ++++ b/startupcache/StartupCache.cpp +@@ -237,27 +237,36 @@ StartupCache::GetBuffer(const char* id, + nsZipItemPtr zipItem(mArchive, id, true); + if (zipItem) { + *outbuf = zipItem.Forget(); + *length = zipItem.Length(); + return NS_OK; + } + } + +-#ifdef MOZ_OMNIJAR +- if (mozilla::OmnijarReader()) { ++ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::APP)) { + // no need to checksum omnijarred entries +- nsZipItemPtr zipItem(mozilla::OmnijarReader(), id); ++ nsZipItemPtr zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::APP), id); + if (zipItem) { + *outbuf = zipItem.Forget(); + *length = zipItem.Length(); + return NS_OK; + } + } +-#endif ++ ++ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) { ++ // no need to checksum omnijarred entries ++ nsZipItemPtr zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE), id); ++ if (zipItem) { ++ *outbuf = zipItem.Forget(); ++ *length = zipItem.Length(); ++ return NS_OK; ++ } ++ } ++ + return NS_ERROR_NOT_AVAILABLE; + } + + // Makes a copy of the buffer, client retains ownership of inbuf. + nsresult + StartupCache::PutBuffer(const char* id, const char* inbuf, PRUint32 len) + { + WaitOnWriteThread(); +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -3897,35 +3897,45 @@ XRE_InitCommandLine(int aArgc, char* aAr + CommandLine::Init(aArgc, canonArgs); + + for (int i = 0; i < aArgc; ++i) + free(canonArgs[i]); + delete[] canonArgs; + #endif + #endif + +-#ifdef MOZ_OMNIJAR +- const char *omnijarPath = nsnull; +- ArgResult ar = CheckArg("omnijar", PR_FALSE, &omnijarPath); ++ const char *path = nsnull; ++ ArgResult ar = CheckArg("grebase", PR_FALSE, &path); + if (ar == ARG_BAD) { +- PR_fprintf(PR_STDERR, "Error: argument -omnijar requires an omnijar path\n"); ++ PR_fprintf(PR_STDERR, "Error: argument -grebase requires a path argument\n"); + return NS_ERROR_FAILURE; + } + +- if (!omnijarPath) ++ if (!path) + return rv; + +- nsCOMPtr omnijar; +- rv = NS_NewNativeLocalFile(nsDependentCString(omnijarPath), PR_TRUE, +- getter_AddRefs(omnijar)); +- if (NS_SUCCEEDED(rv)) +- mozilla::SetOmnijar(omnijar); +-#endif +- +- return rv; ++ nsCOMPtr greBase; ++ rv = XRE_GetFileFromPath(path, getter_AddRefs(greBase)); ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ ar = CheckArg("appbase", PR_FALSE, &path); ++ if (ar == ARG_BAD) { ++ PR_fprintf(PR_STDERR, "Error: argument -appbase requires a path argument\n"); ++ return NS_ERROR_FAILURE; ++ } ++ ++ nsCOMPtr appBase; ++ if (path) { ++ rv = XRE_GetFileFromPath(path, getter_AddRefs(appBase)); ++ if (NS_FAILED(rv)) ++ return rv; ++ } ++ ++ return mozilla::Omnijar::SetBase(greBase, appBase); + } + + nsresult + XRE_DeinitCommandLine() + { + nsresult rv = NS_OK; + + #if defined(MOZ_IPC) +diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp +--- a/toolkit/xre/nsEmbedFunctions.cpp ++++ b/toolkit/xre/nsEmbedFunctions.cpp +@@ -512,19 +512,17 @@ XRE_InitChildProcess(int aArgc, + } + + // Run the UI event loop on the main thread. + uiMessageLoop.MessageLoop::Run(); + + // Allow ProcessChild to clean up after itself before going out of + // scope and being deleted + process->CleanUp(); +-#ifdef MOZ_OMNIJAR +- mozilla::SetOmnijar(nsnull); +-#endif ++ mozilla::Omnijar::SetBase(nsnull, nsnull); + } + } + + NS_LogTerm(); + return XRE_DeinitCommandLine(); + } + + MessageLoop* +diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in +--- a/xpcom/build/Makefile.in ++++ b/xpcom/build/Makefile.in +@@ -64,28 +64,25 @@ CSRCS = \ + $(NULL) + + CPPSRCS = \ + $(XPCOM_GLUE_SRC_LCPPSRCS) \ + $(XPCOM_GLUENS_SRC_LCPPSRCS) \ + nsXPComInit.cpp \ + nsXPCOMStrings.cpp \ + Services.cpp \ ++ Omnijar.cpp \ + $(NULL) + + ifndef MOZ_ENABLE_LIBXUL + ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH))) + CPPSRCS += dlldeps.cpp + endif + endif + +-ifdef MOZ_OMNIJAR +-CPPSRCS += Omnijar.cpp +-endif +- + SHARED_LIBRARY_LIBS = \ + $(DEPTH)/chrome/src/$(LIB_PREFIX)chrome_s.$(LIB_SUFFIX) \ + ../ds/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \ + ../io/$(LIB_PREFIX)xpcomio_s.$(LIB_SUFFIX) \ + ../components/$(LIB_PREFIX)xpcomcomponents_s.$(LIB_SUFFIX) \ + ../threads/$(LIB_PREFIX)xpcomthreads_s.$(LIB_SUFFIX) \ + ../proxy/src/$(LIB_PREFIX)xpcomproxy_s.$(LIB_SUFFIX) \ + ../base/$(LIB_PREFIX)xpcombase_s.$(LIB_SUFFIX) \ +diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp +--- a/xpcom/build/Omnijar.cpp ++++ b/xpcom/build/Omnijar.cpp +@@ -16,16 +16,17 @@ + * + * The Initial Developer of the Original Code is + * Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Michael Wu ++ * Mike Hommey + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your +@@ -33,69 +34,175 @@ + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + + #include "Omnijar.h" + +-#include "nsILocalFile.h" +-#include "nsXULAppAPI.h" ++#include "nsIFile.h" + #include "nsZipArchive.h" ++#include "nsNetUtil.h" + +-static nsILocalFile* sOmnijarPath = nsnull; +-static nsZipArchive* sOmnijarReader = nsnull; ++namespace mozilla { + +-static void +-SetupReader() ++nsIFile *Omnijar::sPath[2] = { nsnull, nsnull }; ++PRBool Omnijar::sIsOmnijar[2] = { PR_FALSE, PR_FALSE }; ++ ++#ifdef MOZ_ENABLE_LIBXUL ++nsZipArchive *Omnijar::sReader[2] = { nsnull, nsnull }; ++#endif ++ ++static already_AddRefed ++ComputePath(nsIFile *aPath, PRBool &aIsOmnijar) + { +- if (!sOmnijarPath) { +- return; ++ PRBool isDir; ++ aIsOmnijar = PR_FALSE; ++ if (!aPath || NS_FAILED(aPath->IsDirectory(&isDir)) || !isDir) ++ return nsnull; ++ ++ nsCOMPtr path; ++#ifdef MOZ_ENABLE_LIBXUL ++ // Search for omni.jar in the given directory ++ if (!isDir || NS_FAILED(aPath->Clone(getter_AddRefs(path)))) ++ return nsnull; ++ ++ if (NS_FAILED(path->AppendNative(NS_LITERAL_CSTRING("omni.jar")))) ++ return nsnull; ++ ++ if (NS_FAILED(path->Exists(&aIsOmnijar))) ++ return nsnull; ++#endif ++ ++ if (!aIsOmnijar && NS_FAILED(aPath->Clone(getter_AddRefs(path)))) ++ return nsnull; ++ ++ return path.forget(); ++} ++ ++nsresult ++Omnijar::SetBase(nsIFile *aGrePath, nsIFile *aAppPath) ++{ ++ NS_ABORT_IF_FALSE(aGrePath || !aAppPath, "Omnijar::SetBase(NULL, something) call forbidden"); ++ ++#ifdef MOZ_ENABLE_LIBXUL ++ if (sReader[GRE]) { ++ sReader[GRE]->CloseArchive(); ++ delete sReader[GRE]; ++ } ++ if (sReader[APP]) { ++ sReader[APP]->CloseArchive(); ++ delete sReader[APP]; ++ } ++ sReader[APP] = sReader[GRE] = nsnull; ++#endif ++ ++ nsresult rv; ++ PRBool equals; ++ if (aAppPath) { ++ rv = aAppPath->Equals(aGrePath, &equals); ++ NS_ENSURE_SUCCESS(rv, rv); ++ } else { ++ equals = PR_TRUE; + } + +- nsZipArchive* zipReader = new nsZipArchive(); +- if (!zipReader) { +- NS_IF_RELEASE(sOmnijarPath); +- return; ++ nsCOMPtr grePath = ComputePath(aGrePath, sIsOmnijar[GRE]); ++ nsCOMPtr appPath = ComputePath(equals ? nsnull : aAppPath, sIsOmnijar[APP]); ++ ++ NS_IF_RELEASE(sPath[GRE]); ++ sPath[GRE] = grePath; ++ NS_IF_ADDREF(sPath[GRE]); ++ ++ NS_IF_RELEASE(sPath[APP]); ++ sPath[APP] = appPath; ++ NS_IF_ADDREF(sPath[APP]); ++ ++ return NS_OK; ++} ++ ++already_AddRefed ++Omnijar::GetBase(Type aType) ++{ ++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); ++ ++ if (!sIsOmnijar[aType]) { ++ NS_IF_ADDREF(sPath[aType]); ++ return sPath[aType]; + } + +- if (NS_FAILED(zipReader->OpenArchive(sOmnijarPath))) { ++ nsCOMPtr file, path; ++ if (NS_FAILED(sPath[aType]->Clone(getter_AddRefs(file)))) ++ return nsnull; ++ ++ if (NS_FAILED(file->GetParent(getter_AddRefs(path)))) ++ return nsnull; ++ return path.forget(); ++} ++ ++#ifdef MOZ_ENABLE_LIBXUL ++nsZipArchive * ++Omnijar::GetReader(Type aType) ++{ ++ if (!sIsOmnijar[aType]) ++ return nsnull; ++ ++ if (sReader[aType]) ++ return sReader[aType]; ++ ++ nsZipArchive* zipReader = new nsZipArchive(); ++ if (!zipReader) ++ return nsnull; ++ ++ if (NS_FAILED(zipReader->OpenArchive(sPath[aType]))) { + delete zipReader; +- NS_IF_RELEASE(sOmnijarPath); +- return; ++ return nsnull; + } + +- sOmnijarReader = zipReader; ++ return (sReader[aType] = zipReader); + } + +-nsILocalFile* +-mozilla::OmnijarPath() ++nsZipArchive * ++Omnijar::GetReader(nsIFile *aPath) + { +- if (!sOmnijarReader) +- SetupReader(); ++ PRBool equals; ++ nsresult rv; + +- return sOmnijarPath; ++ if (sIsOmnijar[GRE]) { ++ rv = sPath[GRE]->Equals(aPath, &equals); ++ if (NS_SUCCEEDED(rv) && equals) ++ return GetReader(GRE); ++ } ++ if (sIsOmnijar[APP]) { ++ rv = sPath[APP]->Equals(aPath, &equals); ++ if (NS_SUCCEEDED(rv) && equals) ++ return GetReader(APP); ++ } ++ return nsnull; ++} ++#endif ++ ++nsresult ++Omnijar::GetURIString(Type aType, nsCString &result) ++{ ++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); ++ ++ result = ""; ++ ++ if ((aType == APP) && (!sPath[APP])) ++ return NS_OK; ++ ++ nsCAutoString omniJarSpec; ++ nsresult rv = NS_GetURLSpecFromActualFile(sPath[aType], omniJarSpec); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ if (sIsOmnijar[aType]) { ++ result = "jar:"; ++ result += omniJarSpec; ++ result += "!"; ++ } else { ++ result = omniJarSpec; ++ } ++ result += "/"; ++ return NS_OK; + } + +-nsZipArchive* +-mozilla::OmnijarReader() +-{ +- if (!sOmnijarReader) +- SetupReader(); +- +- return sOmnijarReader; +-} +- +-void +-mozilla::SetOmnijar(nsILocalFile* aPath) +-{ +- NS_IF_RELEASE(sOmnijarPath); +- if (sOmnijarReader) { +- sOmnijarReader->CloseArchive(); +- delete sOmnijarReader; +- sOmnijarReader = nsnull; +- } +- +- sOmnijarPath = aPath; +- NS_IF_ADDREF(sOmnijarPath); +-} +- ++} /* namespace mozilla */ +diff --git a/xpcom/build/Omnijar.h b/xpcom/build/Omnijar.h +--- a/xpcom/build/Omnijar.h ++++ b/xpcom/build/Omnijar.h +@@ -16,16 +16,17 @@ + * + * The Initial Developer of the Original Code is + * Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Michael Wu ++ * Mike Hommey + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your +@@ -34,29 +35,137 @@ + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + + #ifndef mozilla_Omnijar_h + #define mozilla_Omnijar_h + +-class nsILocalFile; ++#include "nscore.h" ++#include "nsTArray.h" ++#include "nsCOMPtr.h" ++#include "nsString.h" ++ ++class nsIFile; + class nsZipArchive; +- +-#ifdef MOZ_OMNIJAR ++class nsIURI; + + namespace mozilla { + ++#ifdef MOZ_ENABLE_LIBXUL ++#define OMNIJAR_EXPORT ++#else ++#define OMNIJAR_EXPORT NS_EXPORT ++#endif ++ ++class OMNIJAR_EXPORT Omnijar { ++private: + /** +- * This returns the path to the omnijar. +- * If the omnijar isn't available, this function will return null. +- * Callers should fallback to flat packaging if null. ++ * Store an nsIFile for either a base directory when there is no omni.jar, ++ * or omni.jar itself. We can store two paths here, one for GRE ++ * (corresponding to resource://gre/) and one for APP ++ * (corresponding to resource:/// and resource://app/), but only ++ * store one when both point to the same location (unified). + */ +-nsILocalFile *OmnijarPath(); +-nsZipArchive *OmnijarReader(); +-void SetOmnijar(nsILocalFile* aPath); ++static nsIFile *sPath[2]; ++/** ++ * Store whether the corresponding sPath is an omni.jar or a directory ++ */ ++static PRBool sIsOmnijar[2]; ++ ++#ifdef MOZ_ENABLE_LIBXUL ++/** ++ * Cached nsZipArchives for the corresponding sPath ++ */ ++static nsZipArchive *sReader[2]; ++#endif ++ ++public: ++enum Type { ++ GRE = 0, ++ APP = 1 ++}; ++ ++/** ++ * Returns whether SetBase has been called at least once with ++ * a valid nsIFile ++ */ ++static PRBool ++IsInitialized() ++{ ++ // GRE path is always set after initialization. ++ return sPath[0] != nsnull; ++} ++ ++/** ++ * Sets the base directories for GRE and APP. APP base directory ++ * may be nsnull, in case the APP and GRE directories are the same. ++ */ ++static nsresult SetBase(nsIFile *aGrePath, nsIFile *aAppPath); ++ ++/** ++ * Returns an nsIFile pointing to the omni.jar file for GRE or APP. ++ * Returns nsnull when there is no corresponding omni.jar. ++ * Also returns nsnull for APP in the unified case. ++ */ ++static already_AddRefed ++GetPath(Type aType) ++{ ++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); ++ ++ if (sIsOmnijar[aType]) { ++ NS_IF_ADDREF(sPath[aType]); ++ return sPath[aType]; ++ } ++ return nsnull; ++} ++ ++/** ++ * Returns whether GRE or APP use an omni.jar. Returns PR_False when ++ * using an omni.jar in the unified case. ++ */ ++static PRBool ++HasOmnijar(Type aType) ++{ ++ return sIsOmnijar[aType]; ++} ++ ++/** ++ * Returns the base directory for GRE or APP. In the unified case, ++ * returns nsnull for APP. ++ */ ++static already_AddRefed GetBase(Type aType); ++ ++/** ++ * Returns a nsZipArchive pointer for the omni.jar file for GRE or ++ * APP. Returns nsnull in the same cases GetPath() would. ++ */ ++#ifdef MOZ_ENABLE_LIBXUL ++static nsZipArchive *GetReader(Type aType); ++#else ++static nsZipArchive *GetReader(Type aType) { return nsnull; } ++#endif ++ ++/** ++ * Returns a nsZipArchive pointer for the given path IAOI the given ++ * path is the omni.jar for either GRE or APP. ++ */ ++#ifdef MOZ_ENABLE_LIBXUL ++static nsZipArchive *GetReader(nsIFile *aPath); ++#else ++static nsZipArchive *GetReader(nsIFile *aPath) { return nsnull; } ++#endif ++ ++/** ++ * Returns the URI string corresponding to the omni.jar or directory ++ * for GRE or APP. i.e. jar:/path/to/omni.jar!/ for omni.jar and ++ * /path/to/base/dir/ otherwise. Returns an empty string for APP in ++ * the unified case. ++ * The returned URI is guaranteed to end with a slash. ++ */ ++static nsresult GetURIString(Type aType, nsCString &result); ++ ++}; /* class Omnijar */ + + } /* namespace mozilla */ + +-#endif /* MOZ_OMNIJAR */ +- + #endif /* mozilla_Omnijar_h */ +diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp +--- a/xpcom/build/nsXPComInit.cpp ++++ b/xpcom/build/nsXPComInit.cpp +@@ -462,35 +462,35 @@ NS_InitXPCOM2(nsIServiceManager* *result + nsDirectoryService::gService->Set(NS_XPCOM_LIBRARY_FILE, xpcomLib); + } + + if (appFileLocationProvider) { + rv = nsDirectoryService::gService->RegisterProvider(appFileLocationProvider); + if (NS_FAILED(rv)) return rv; + } + +-#ifdef MOZ_OMNIJAR + NS_TIME_FUNCTION_MARK("Next: Omnijar init"); + +- if (!mozilla::OmnijarPath()) { +- nsCOMPtr omnijar; ++ if (!mozilla::Omnijar::IsInitialized()) { ++ nsCOMPtr greDir, appDir; + nsCOMPtr file; + +- rv = NS_ERROR_FAILURE; + nsDirectoryService::gService->Get(NS_GRE_DIR, + NS_GET_IID(nsIFile), + getter_AddRefs(file)); +- if (file) +- rv = file->Append(NS_LITERAL_STRING("omni.jar")); +- if (NS_SUCCEEDED(rv)) +- omnijar = do_QueryInterface(file); +- if (NS_SUCCEEDED(rv)) +- mozilla::SetOmnijar(omnijar); ++ greDir = do_QueryInterface(file); ++ ++ nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, ++ NS_GET_IID(nsIFile), ++ getter_AddRefs(file)); ++ appDir = do_QueryInterface(file); ++ ++ rv = mozilla::Omnijar::SetBase(greDir, appDir); ++ NS_ENSURE_SUCCESS(rv, rv); + } +-#endif + + #ifdef MOZ_IPC + if ((sCommandLineWasInitialized = !CommandLine::IsInitialized())) { + NS_TIME_FUNCTION_MARK("Next: IPC command line init"); + + #ifdef OS_WIN + CommandLine::Init(0, nsnull); + #else +@@ -769,18 +769,16 @@ ShutdownXPCOM(nsIServiceManager* servMgr + sCommandLineWasInitialized = false; + } + if (sExitManager) { + delete sExitManager; + sExitManager = nsnull; + } + #endif + +-#ifdef MOZ_OMNIJAR +- mozilla::SetOmnijar(nsnull); +-#endif ++ mozilla::Omnijar::SetBase(nsnull, nsnull); + + NS_LogTerm(); + + return NS_OK; + } + + } // namespace mozilla +diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp +--- a/xpcom/components/nsComponentManager.cpp ++++ b/xpcom/components/nsComponentManager.cpp +@@ -175,18 +175,16 @@ NS_DEFINE_CID(kCategoryManagerCID, NS_CA + #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) \ + NS_TIME_FUNCTION_MIN_FMT(5, "%s (line %d) (contractid: %s)", MOZ_FUNCTION_NAME, \ + __LINE__, (cid)) + #else + #define COMPMGR_TIME_FUNCTION_CID(cid) do {} while (0) + #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) do {} while (0) + #endif + +-#define kOMNIJAR_PREFIX NS_LITERAL_CSTRING("resource:///") +- + nsresult + nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) const + { + nsresult rv; + nsXPIDLCString value; + nsCOMPtr catman; + nsComponentManagerImpl *compMgr = nsComponentManagerImpl::gComponentManager; + if (!compMgr) { +@@ -390,47 +388,44 @@ nsresult nsComponentManagerImpl::Init() + + nsCategoryManager::GetSingleton()->SuppressNotifications(true); + + RegisterModule(&kXPCOMModule, NULL); + + for (PRUint32 i = 0; i < sStaticModules->Length(); ++i) + RegisterModule((*sStaticModules)[i], NULL); + +-#ifdef MOZ_OMNIJAR +- if (mozilla::OmnijarPath()) { +- nsCOMPtr omnijarReader = new nsJAR(); +- rv = omnijarReader->Open(mozilla::OmnijarPath()); +- if (NS_SUCCEEDED(rv)) +- RegisterJarManifest(omnijarReader, "chrome.manifest", false); ++ nsCOMPtr appOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::APP); ++ if (appOmnijar) { ++ cl = sModuleLocations->InsertElementAt(1); // Insert after greDir ++ cl->type = NS_COMPONENT_LOCATION; ++ cl->location = do_QueryInterface(appOmnijar); ++ cl->jar = true; + } +-#endif ++ nsCOMPtr greOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::GRE); ++ if (greOmnijar) { ++ cl = sModuleLocations->InsertElementAt(0); ++ cl->type = NS_COMPONENT_LOCATION; ++ cl->location = do_QueryInterface(greOmnijar); ++ cl->jar = true; ++ } + + for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) { + ComponentLocation& l = sModuleLocations->ElementAt(i); + if (!l.jar) { + RegisterManifestFile(l.type, l.location, false); + continue; + } + + nsCOMPtr reader = do_CreateInstance(kZipReaderCID, &rv); + rv = reader->Open(l.location); + if (NS_SUCCEEDED(rv)) + RegisterJarManifest(reader, "chrome.manifest", false); + } + +-#ifdef MOZ_OMNIJAR +- if (mozilla::OmnijarPath()) { +- cl = sModuleLocations->InsertElementAt(0); +- cl->type = NS_COMPONENT_LOCATION; +- cl->location = mozilla::OmnijarPath(); +- cl->jar = true; +- } +-#endif +- + nsCategoryManager::GetSingleton()->SuppressNotifications(false); + + mStatus = NORMAL; + + return NS_OK; + } + + void +# HG changeset patch +# Parent ff1b810f78226d7f4010909d3cde05a57fdcf20c +Bug 620931 part 4 - Fix resource://app/ to always point to the same as resource:/// + +diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp +--- a/netwerk/protocol/res/nsResProtocolHandler.cpp ++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp +@@ -74,16 +74,17 @@ static nsResProtocolHandler *gResHandler + // set NSPR_LOG_FILE=log.txt + // + // this enables PR_LOG_ALWAYS level information and places all output in + // the file log.txt + // + static PRLogModuleInfo *gResLog; + #endif + ++#define kAPP NS_LITERAL_CSTRING("app") + #define kGRE NS_LITERAL_CSTRING("gre") + + //---------------------------------------------------------------------------- + // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution + //---------------------------------------------------------------------------- + + nsresult + nsResURL::EnsureFile() +@@ -179,16 +180,22 @@ nsResProtocolHandler::Init() + nsCOMPtr uri; + rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI); + NS_ENSURE_SUCCESS(rv, rv); + + rv = SetSubstitution(EmptyCString(), uri); + NS_ENSURE_SUCCESS(rv, rv); + + // ++ // make resource://app/ point to the application directory or omnijar ++ // ++ rv = SetSubstitution(kAPP, uri); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ // + // make resource://gre/ point to the GRE directory + // + if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0. + rv = NS_NewURI(getter_AddRefs(uri), greURI); + NS_ENSURE_SUCCESS(rv, rv); + } + + rv = SetSubstitution(kGRE, uri); +diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp +--- a/toolkit/xre/nsXREDirProvider.cpp ++++ b/toolkit/xre/nsXREDirProvider.cpp +@@ -300,19 +300,16 @@ nsXREDirProvider::GetFile(const char* aP + } + } + else if (!strcmp(aProperty, XRE_EXECUTABLE_FILE) && gArgv[0]) { + nsCOMPtr lf; + rv = XRE_GetBinaryPath(gArgv[0], getter_AddRefs(lf)); + if (NS_SUCCEEDED(rv)) + file = lf; + } +- else if (!strcmp(aProperty, "resource:app")) { +- rv = GetAppDir()->Clone(getter_AddRefs(file)); +- } + + else if (!strcmp(aProperty, NS_APP_PROFILE_DIR_STARTUP) && mProfileDir) { + return mProfileDir->Clone(aFile); + } + else if (!strcmp(aProperty, NS_APP_PROFILE_LOCAL_DIR_STARTUP)) { + if (mProfileLocalDir) + return mProfileLocalDir->Clone(aFile); + +# HG changeset patch +# Parent 7d2228db71a299afca60babff632a967d2d6c456 +Bug 620931 part 5 - Enable omni.jar by default on xulrunner + +diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh +--- a/xulrunner/confvars.sh ++++ b/xulrunner/confvars.sh +@@ -36,14 +36,15 @@ + # + # ***** END LICENSE BLOCK ***** + + MOZ_APP_NAME=xulrunner + MOZ_APP_DISPLAYNAME=XULRunner + MOZ_UPDATER=1 + MOZ_XULRUNNER=1 + MOZ_ENABLE_LIBXUL=1 ++MOZ_CHROME_FILE_FORMAT=omni + MOZ_STATIC_BUILD_UNSUPPORTED=1 + MOZ_APP_VERSION=$MOZILLA_VERSION + if test "$MOZ_STORAGE"; then + MOZ_PLACES=1 + fi + MOZ_EXTENSIONS_DEFAULT=" gnomevfs" + diff --git a/xulrunner.spec b/xulrunner.spec index 9f0f596..c5760b5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -86,6 +86,7 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches +Patch30: xulrunner-omnijar.patch # --------------------------------------------------- @@ -191,6 +192,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static +%patch30 -p1 -b .omnijar %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 11250faa5901251062432e5c5520f9eef7b26cd7 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sat, 26 Feb 2011 16:38:02 -0800 Subject: [PATCH 157/486] Use omnijar as our chrome file format Don't bother passing a chrome file format in our mozconfig, omnijar is the default, but it didn't work before. Adjust the %files list accordingly. Install our preference file before running make install so it gets automatically added to omni.jar See http://blog.mozilla.com/mwu/2010/08/13/omnijar-how-does-it-work/ --- xulrunner-mozconfig | 1 - xulrunner.spec | 18 ++++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index e27a116..ea4e452 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -33,7 +33,6 @@ ac_add_options --disable-necko-wifi ac_add_options --enable-startup-notification ac_add_options --disable-cpp-exceptions ac_add_options --enable-shared-js -ac_add_options --enable-chrome-format=jar ac_add_options --enable-url-classifier export BUILD_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index c5760b5..5cd335a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.23%{?pre_tag}%{?dist} +Release: 0.24%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -266,6 +266,9 @@ cd %{tarballdir} INTERNAL_APP_SDK_NAME=%{name}-sdk-%{gecko_dir_ver} MOZ_APP_SDK_DIR=%{_libdir}/${INTERNAL_APP_SDK_NAME} +# set up our prefs before install, so it gets pulled in to omni.jar +%{__cp} -p %{SOURCE12} dist/bin/defaults/pref/all-redhat.js + DESTDIR=$RPM_BUILD_ROOT make install %{__mkdir_p} $RPM_BUILD_ROOT/%{mozappdir} \ @@ -273,9 +276,6 @@ DESTDIR=$RPM_BUILD_ROOT make install $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_SDK_NAME} %{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications} -# Install our default preferences -%{__install} -p -D -m 644 %{SOURCE12} $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-redhat.js - # Start script install %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} %{__cat} %{SOURCE21} | %{__sed} -e 's,XULRUNNER_VERSION,%{gecko_dir_ver},g' > \ @@ -417,15 +417,11 @@ fi %ghost %{mozappdir}/components/compreg.dat %ghost %{mozappdir}/components/xpti.dat %{mozappdir}/components/*.so -%{mozappdir}/components/*.xpt %{mozappdir}/components/*.manifest -%attr(644, root, root) %{mozappdir}/components/*.js -%{mozappdir}/defaults %dir %{mozappdir}/icons %attr(644, root, root) %{mozappdir}/icons/* -%{mozappdir}/modules +%{mozappdir}/omni.jar %{mozappdir}/plugins -%{mozappdir}/res %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh @@ -434,7 +430,6 @@ fi %{mozappdir}/xulrunner-stub %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list -%{mozappdir}/greprefs.js %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %if %{?moz_out_of_process_plugins} %{mozappdir}/plugin-container @@ -464,6 +459,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Feb 26 2011 Christopher Aillon - 2.0-0.24 +- Switch to using the omni chrome file format + * Fri Feb 25 2011 Christopher Aillon - 2.0-0.23 - Update to 2.0 Beta 12 From b479600d8985f9633a8b67e7a6590c8f38113e2a Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sun, 27 Feb 2011 01:47:04 -0800 Subject: [PATCH 158/486] Freeze the User-Agent build date at 20100101 This matches upstream. See http://hacks.mozilla.org/2010/09/final-user-agent-string-for-firefox-4/ The build date value gets hardcoded in at compile-time of nsHttpHandler.cpp which is part of XULRunner, so we need to do this here instead of Firefox. --- xulrunner-mozconfig | 3 ++- xulrunner.spec | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index ea4e452..c6d6a3b 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -37,7 +37,8 @@ ac_add_options --enable-url-classifier export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 +export MOZ_UA_BUILDID=20100101 + mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@ - diff --git a/xulrunner.spec b/xulrunner.spec index 5cd335a..093784d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.24%{?pre_tag}%{?dist} +Release: 0.25%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -459,6 +459,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Feb 27 2011 Christopher Aillon - 2.0-0.25 +- Make Firefox's User-Agent string match upstream's + * Sat Feb 26 2011 Christopher Aillon - 2.0-0.24 - Switch to using the omni chrome file format From f11ada0dae23d854d70dc2a965a16e5711a52605 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 1 Mar 2011 10:15:29 -0600 Subject: [PATCH 159/486] use --disable-tracejit on sparc64 the option was renamed from --disable-jit --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 093784d..10409b0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -207,7 +207,7 @@ echo "ac_add_options --disable-ipc" >> .mozconfig # Upstream bug filed without resolution # for now make sure jit is not enabled on sparc64 %ifarch sparc64 -echo "ac_add_options --disable-jit" >> .mozconfig +echo "ac_add_options --disable-tracejit" >> .mozconfig %endif #--------------------------------------------------------------------- From f95548962958d6242981ac82a8752c505d40df64 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Wed, 9 Mar 2011 14:34:05 -0800 Subject: [PATCH 160/486] 2.0 RC 1 Update tarballdir for 2.0 Update omnijar patch for a nearby change --- .gitignore | 1 + sources | 2 +- xulrunner-omnijar.patch | 4 ++-- xulrunner.spec | 11 +++++++---- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 3b7e14c..e521bb3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0b10.source.tar.bz2 /xulrunner-2.0b11.source.tar.bz2 /xulrunner-2.0b12.source.tar.bz2 +/xulrunner-2.0rc1.source.tar.bz2 diff --git a/sources b/sources index 05689e3..270629c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8b343c8f9db97199ddcf9744315c2bbb xulrunner-2.0b12.source.tar.bz2 +511828dcc226f38602c6c67bd192ef40 xulrunner-2.0rc1.source.tar.bz2 diff --git a/xulrunner-omnijar.patch b/xulrunner-omnijar.patch index f27f7e3..05b665a 100644 --- a/xulrunner-omnijar.patch +++ b/xulrunner-omnijar.patch @@ -1718,7 +1718,7 @@ Bug 620931 part 5 - Enable omni.jar by default on xulrunner diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh --- a/xulrunner/confvars.sh +++ b/xulrunner/confvars.sh -@@ -36,14 +36,15 @@ +@@ -36,15 +36,16 @@ # # ***** END LICENSE BLOCK ***** @@ -1734,4 +1734,4 @@ diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh MOZ_PLACES=1 fi MOZ_EXTENSIONS_DEFAULT=" gnomevfs" - + MOZ_URL_CLASSIFIER=1 diff --git a/xulrunner.spec b/xulrunner.spec index 10409b0..262a55e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -12,11 +12,11 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 12 -%global rc_version 0 +%global beta_version 0 +%global rc_version 1 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} -%global tarballdir mozilla-central +%global tarballdir mozilla-2.0 %global gre_dir %{_sysconfdir}/gre.d # crash reporter and out-of-process-plugins work only on x86/x86_64 @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.25%{?pre_tag}%{?dist} +Release: 0.26%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -459,6 +459,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 9 2011 Christopher Aillon - 2.0-0.26 +- Update to 2.0 RC 1 + * Sun Feb 27 2011 Christopher Aillon - 2.0-0.25 - Make Firefox's User-Agent string match upstream's From 0b16fb956986facba532ce4f1b059abef7ad6692 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 17 Mar 2011 17:21:12 +0100 Subject: [PATCH 161/486] Disabled gnomevfs Enabled gio Building with system-libvpx --- xulrunner-mozconfig | 3 +++ xulrunner.spec | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index c6d6a3b..073dabd 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -9,6 +9,7 @@ ac_add_options --with-system-nss ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-bz2 +ac_add_options --with-system-libvpx ac_add_options --enable-system-hunspell ac_add_options --enable-system-sqlite ac_add_options --enable-system-cairo @@ -34,6 +35,8 @@ ac_add_options --enable-startup-notification ac_add_options --disable-cpp-exceptions ac_add_options --enable-shared-js ac_add_options --enable-url-classifier +ac_add_options --enable-gio +ac_add_options --disable-gnomevfs export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index 262a55e..60d7390 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.26%{?pre_tag}%{?dist} +Release: 0.27%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -100,9 +100,6 @@ BuildRequires: bzip2-devel BuildRequires: zlib-devel BuildRequires: libIDL-devel BuildRequires: gtk2-devel -BuildRequires: gnome-vfs2-devel -BuildRequires: libgnome-devel -BuildRequires: libgnomeui-devel BuildRequires: krb5-devel BuildRequires: pango-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -116,6 +113,7 @@ BuildRequires: libnotify-devel >= %{libnotify_version} BuildRequires: mesa-libGL-devel BuildRequires: yasm BuildRequires: libcurl-devel +BuildRequires: libvpx-devel Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} @@ -152,9 +150,6 @@ Requires: bzip2-devel Requires: zlib-devel Requires: libIDL-devel Requires: gtk2-devel -Requires: gnome-vfs2-devel -Requires: libgnome-devel -Requires: libgnomeui-devel Requires: krb5-devel Requires: pango-devel Requires: freetype-devel >= %{freetype_version} @@ -459,6 +454,11 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Mar 17 2011 Jan Horak - 2.0-0.27 +- Disabled gnomevfs +- Enabled gio +- Build with system libvpx + * Wed Mar 9 2011 Christopher Aillon - 2.0-0.26 - Update to 2.0 RC 1 From 6e79ba3d92366485c85940b0b43f02c6c1e9c701 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Fri, 18 Mar 2011 18:26:29 -0700 Subject: [PATCH 162/486] 2.0 RC 2 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e521bb3..81cc3bd 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0b11.source.tar.bz2 /xulrunner-2.0b12.source.tar.bz2 /xulrunner-2.0rc1.source.tar.bz2 +/xulrunner-2.0rc2.source.tar.bz2 diff --git a/sources b/sources index 270629c..8233d23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -511828dcc226f38602c6c67bd192ef40 xulrunner-2.0rc1.source.tar.bz2 +060ad2571e781ca72971c4dcdeb79cff xulrunner-2.0rc2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 60d7390..a7fc5e9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -13,7 +13,7 @@ %global gecko_dir_ver 2 %global alpha_version 0 %global beta_version 0 -%global rc_version 1 +%global rc_version 2 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} %global tarballdir mozilla-2.0 @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.27%{?pre_tag}%{?dist} +Release: 0.28%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -454,6 +454,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Mar 18 2011 Christopher Aillon - 2.0-0.28 +- Update to 2.0 RC2 + * Thu Mar 17 2011 Jan Horak - 2.0-0.27 - Disabled gnomevfs - Enabled gio From 4d8431c89bfad45533b886866b8d894609f3a9f5 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Tue, 22 Mar 2011 08:14:01 -0700 Subject: [PATCH 163/486] 2.0 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 81cc3bd..df9d350 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0b12.source.tar.bz2 /xulrunner-2.0rc1.source.tar.bz2 /xulrunner-2.0rc2.source.tar.bz2 +/xulrunner-2.0.source.tar.bz2 diff --git a/sources b/sources index 8233d23..5c6ca1b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -060ad2571e781ca72971c4dcdeb79cff xulrunner-2.0rc2.source.tar.bz2 +3468a2c463b4fc2788ba621e4b511c30 xulrunner-2.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index a7fc5e9..3169d0e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -13,7 +13,7 @@ %global gecko_dir_ver 2 %global alpha_version 0 %global beta_version 0 -%global rc_version 2 +%global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} %global tarballdir mozilla-2.0 @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 0.28%{?pre_tag}%{?dist} +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -454,6 +454,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 22 2011 Christopher Aillon - 2.0-1 +- 2.0 + * Fri Mar 18 2011 Christopher Aillon - 2.0-0.28 - Update to 2.0 RC2 From 7aeeef53ada05e16e680c807f2779fbc3f9464ad Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sat, 2 Apr 2011 21:56:35 -0700 Subject: [PATCH 164/486] Fix SIGABRT in X_CloseDevice: XI_BadDevice Fedora bug: https://bugzilla.redhat.com/543165 Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=576933 --- xulrunner-2.0-baddevice.patch | 185 ++++++++++++++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 187 insertions(+) create mode 100644 xulrunner-2.0-baddevice.patch diff --git a/xulrunner-2.0-baddevice.patch b/xulrunner-2.0-baddevice.patch new file mode 100644 index 0000000..e37ab9a --- /dev/null +++ b/xulrunner-2.0-baddevice.patch @@ -0,0 +1,185 @@ +# HG changeset patch +# User Karl Tomlinson +# Date 1301024339 -46800 +# Node ID 06ca0535285e66ba87940ff245b78e9c1d14d956 +# Parent bf6532a3d889bae1d9f21d55c28729f41e69e87c +b=576933 use a separate display to make protocol requests within X error handler r=roc + +diff --git a/toolkit/xre/nsX11ErrorHandler.cpp b/toolkit/xre/nsX11ErrorHandler.cpp +--- a/toolkit/xre/nsX11ErrorHandler.cpp ++++ b/toolkit/xre/nsX11ErrorHandler.cpp +@@ -50,56 +50,58 @@ using mozilla::plugins::PluginProcessChi + + #include "mozilla/X11Util.h" + #include + + #define BUFSIZE 2048 // What Xlib uses with XGetErrorDatabaseText + + extern "C" { + static int +-IgnoreError(Display *display, XErrorEvent *event) { +- return 0; // This return value is ignored. +-} +- +-static int + X11Error(Display *display, XErrorEvent *event) { + nsCAutoString notes; + char buffer[BUFSIZE]; + + // Get an indication of how long ago the request that caused the error was +- // made. Do this before querying extensions etc below. ++ // made. + unsigned long age = NextRequest(display) - event->serial; + +- // Ignore subsequent errors, which may get processed during the extension +- // queries below for example. +- XSetErrorHandler(IgnoreError); +- + // Get a string to represent the request that caused the error. + nsCAutoString message; + if (event->request_code < 128) { + // Core protocol request + message.AppendInt(event->request_code); + } else { + // Extension request +- int nExts; +- char** extNames = XListExtensions(display, &nExts); +- if (extNames) { +- for (int i = 0; i < nExts; ++i) { +- int major_opcode, first_event, first_error; +- if (XQueryExtension(display, extNames[i], +- &major_opcode, &first_event, &first_error) +- && major_opcode == event->request_code) { +- message.Append(extNames[i]); +- message.Append('.'); +- message.AppendInt(event->minor_code); +- break; ++ ++ // man XSetErrorHandler says "the error handler should not call any ++ // functions (directly or indirectly) on the display that will generate ++ // protocol requests or that will look for input events" so we use another ++ // temporary Display to request extension information. This assumes on ++ // the DISPLAY environment variable has been set and matches what was used ++ // to open |display|. ++ Display *tmpDisplay = XOpenDisplay(NULL); ++ if (tmpDisplay) { ++ int nExts; ++ char** extNames = XListExtensions(tmpDisplay, &nExts); ++ if (extNames) { ++ for (int i = 0; i < nExts; ++i) { ++ int major_opcode, first_event, first_error; ++ if (XQueryExtension(tmpDisplay, extNames[i], ++ &major_opcode, &first_event, &first_error) ++ && major_opcode == event->request_code) { ++ message.Append(extNames[i]); ++ message.Append('.'); ++ message.AppendInt(event->minor_code); ++ break; ++ } + } ++ ++ XFreeExtensionList(extNames); + } +- +- XFreeExtensionList(extNames); ++ XCloseDisplay(tmpDisplay); + } + } + + if (message.IsEmpty()) { + buffer[0] = '\0'; + } else { + XGetErrorDatabaseText(display, "XRequest", message.get(), "", + buffer, sizeof(buffer)); + + +# HG changeset patch +# User Karl Tomlinson +# Date 1301024339 -46800 +# Node ID 286410eeba47b4b9a8ec8e18779ee10a7b312f1e +# Parent 06ca0535285e66ba87940ff245b78e9c1d14d956 +b=576933 ignore BadDevice errors from XCloseDevice (for GDK2) r=roc + +diff --git a/toolkit/xre/nsX11ErrorHandler.cpp b/toolkit/xre/nsX11ErrorHandler.cpp +--- a/toolkit/xre/nsX11ErrorHandler.cpp ++++ b/toolkit/xre/nsX11ErrorHandler.cpp +@@ -51,19 +51,16 @@ using mozilla::plugins::PluginProcessChi + #include "mozilla/X11Util.h" + #include + + #define BUFSIZE 2048 // What Xlib uses with XGetErrorDatabaseText + + extern "C" { + static int + X11Error(Display *display, XErrorEvent *event) { +- nsCAutoString notes; +- char buffer[BUFSIZE]; +- + // Get an indication of how long ago the request that caused the error was + // made. + unsigned long age = NextRequest(display) - event->serial; + + // Get a string to represent the request that caused the error. + nsCAutoString message; + if (event->request_code < 128) { + // Core protocol request +@@ -76,42 +73,56 @@ X11Error(Display *display, XErrorEvent * + // protocol requests or that will look for input events" so we use another + // temporary Display to request extension information. This assumes on + // the DISPLAY environment variable has been set and matches what was used + // to open |display|. + Display *tmpDisplay = XOpenDisplay(NULL); + if (tmpDisplay) { + int nExts; + char** extNames = XListExtensions(tmpDisplay, &nExts); ++ int first_error; + if (extNames) { + for (int i = 0; i < nExts; ++i) { +- int major_opcode, first_event, first_error; ++ int major_opcode, first_event; + if (XQueryExtension(tmpDisplay, extNames[i], + &major_opcode, &first_event, &first_error) + && major_opcode == event->request_code) { + message.Append(extNames[i]); + message.Append('.'); + message.AppendInt(event->minor_code); + break; + } + } + + XFreeExtensionList(extNames); + } + XCloseDisplay(tmpDisplay); ++ ++#ifdef MOZ_WIDGET_GTK2 ++ // GDK2 calls XCloseDevice the devices that it opened on startup, but ++ // the XI protocol no longer ensures that the devices will still exist. ++ // If they have been removed, then a BadDevice error results. Ignore ++ // this error. ++ if (message.EqualsLiteral("XInputExtension.4") && ++ event->error_code == first_error + 0) { ++ return 0; ++ } ++#endif + } + } + ++ char buffer[BUFSIZE]; + if (message.IsEmpty()) { + buffer[0] = '\0'; + } else { + XGetErrorDatabaseText(display, "XRequest", message.get(), "", + buffer, sizeof(buffer)); + } + ++ nsCAutoString notes; + if (buffer[0]) { + notes.Append(buffer); + } else { + notes.Append("Request "); + notes.AppendInt(event->request_code); + notes.Append('.'); + notes.AppendInt(event->minor_code); + } + + diff --git a/xulrunner.spec b/xulrunner.spec index 3169d0e..80ede9e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -87,6 +87,7 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch30: xulrunner-omnijar.patch +Patch31: xulrunner-2.0-baddevice.patch # --------------------------------------------------- @@ -188,6 +189,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch24 -p1 -b .static %patch30 -p1 -b .omnijar +%patch31 -p1 -b .baddevice %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From bd06f3a387eb9fefd2c520d46b8c595bac61e0a3 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sun, 3 Apr 2011 21:26:14 -0700 Subject: [PATCH 165/486] Updates for GNOME 3 Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=611953 firefox-4.0-moz-app-launcher.patch is patch 1 Strictly speaking, this part isn't really needed in XULRunner, since the patch is for Firefox only, but it changes some things which get touched in the gnome 3 patch later. firefox-4.0-gnome3.patch is patches 2-5. This is mostly a Firefox patch but there are some XULRunner bits interspersed within the patch, which is why we include it here. Not all patches have positive review yet; there's a question of whether to ensure a gsettings key exists, due to picture-filename changing to picture-uri in the middle of the review process. This is something we can control in the distribution, though, and don't need to be dynamic about it. --- firefox-4.0-gnome3.patch | 1301 ++++++++++++++++++++++++++++ firefox-4.0-moz-app-launcher.patch | 137 +++ xulrunner.spec | 4 + 3 files changed, 1442 insertions(+) create mode 100644 firefox-4.0-gnome3.patch create mode 100644 firefox-4.0-moz-app-launcher.patch diff --git a/firefox-4.0-gnome3.patch b/firefox-4.0-gnome3.patch new file mode 100644 index 0000000..a8961e1 --- /dev/null +++ b/firefox-4.0-gnome3.patch @@ -0,0 +1,1301 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=611953 + +diff --git a/toolkit/system/gnome/nsGIOService.cpp b/toolkit/system/gnome/nsGIOService.cpp +--- a/toolkit/system/gnome/nsGIOService.cpp ++++ b/toolkit/system/gnome/nsGIOService.cpp +@@ -101,25 +101,25 @@ nsGIOMimeApp::GetName(nsACString& aName) + return NS_OK; + } + + NS_IMETHODIMP + nsGIOMimeApp::GetCommand(nsACString& aCommand) + { + get_commandline_t g_app_info_get_commandline_ptr; + +- void *libHandle = dlopen("libgio-2.0.so", RTLD_LAZY); ++ void *libHandle = dlopen("libgio-2.0.so.0", RTLD_LAZY); + if (!libHandle) { + return NS_ERROR_FAILURE; + } + dlerror(); /* clear any existing error */ + g_app_info_get_commandline_ptr = + (get_commandline_t) dlsym(libHandle, "g_app_info_get_commandline"); +- if (dlerror() != NULL) { +- const char cmd = *g_app_info_get_commandline_ptr(mApp); ++ if (dlerror() == NULL) { ++ const char *cmd = g_app_info_get_commandline_ptr(mApp); + if (!cmd) { + dlclose(libHandle); + return NS_ERROR_FAILURE; + } + aCommand.Assign(cmd); + } + dlclose(libHandle); + return NS_OK; +@@ -414,75 +414,46 @@ nsGIOService::CreateAppFromCommand(nsACS + nsIGIOMimeApp** appInfo) + { + GError *error = NULL; + *appInfo = nsnull; + + GAppInfo *app_info = NULL, *app_info_from_list = NULL; + GList *apps = g_app_info_get_all(); + GList *apps_p = apps; +- get_commandline_t g_app_info_get_commandline_ptr; +- +- void *libHandle = dlopen("libgio-2.0.so", RTLD_LAZY); +- if (!libHandle) { +- return NS_ERROR_FAILURE; +- } +- dlerror(); /* clear any existing error */ +- g_app_info_get_commandline_ptr = +- (get_commandline_t) dlsym(libHandle, "g_app_info_get_commandline"); +- if (dlerror() != NULL) { +- g_app_info_get_commandline_ptr = NULL; +- } + + // Try to find relevant and existing GAppInfo in all installed application ++ // We do this by comparing each GAppInfo's executable with out own + while (apps_p) { + app_info_from_list = (GAppInfo*) apps_p->data; +- /* This is a silly test. It just compares app names but not +- * commands. This is due to old version of Glib/Gio. The required +- * function which allows to do a regular check of existence of desktop file +- * is possible by using function g_app_info_get_commandline. This function +- * has been introduced in Glib 2.20. */ +- if (app_info_from_list && strcmp(g_app_info_get_name(app_info_from_list), +- PromiseFlatCString(appName).get()) == 0 ) +- { +- if (g_app_info_get_commandline_ptr) +- { +- /* Following test is only possible with Glib >= 2.20. +- * Compare path only by using strncmp */ +- if (strncmp(g_app_info_get_commandline_ptr(app_info_from_list), +- PromiseFlatCString(cmd).get(), +- strlen(PromiseFlatCString(cmd).get())) == 0) +- { +- app_info = app_info_from_list; +- break; +- } else { +- g_object_unref(app_info_from_list); +- } +- } else { ++ if (!app_info) { ++ // If the executable is not absolute, get it's full path ++ char *executable = g_find_program_in_path(g_app_info_get_executable(app_info_from_list)); ++ ++ if (executable && strcmp(executable, PromiseFlatCString(cmd).get()) == 0) { ++ g_object_ref (app_info_from_list); + app_info = app_info_from_list; +- break; + } +- } else { +- g_object_unref(app_info_from_list); ++ g_free(executable); + } ++ ++ g_object_unref(app_info_from_list); + apps_p = apps_p->next; + } + g_list_free(apps); + + if (!app_info) { + app_info = g_app_info_create_from_commandline(PromiseFlatCString(cmd).get(), + PromiseFlatCString(appName).get(), + G_APP_INFO_CREATE_SUPPORTS_URIS, + &error); + } + + if (!app_info) { + g_warning("Cannot create application info from command: %s", error->message); + g_error_free(error); +- dlclose(libHandle); + return NS_ERROR_FAILURE; + } + nsGIOMimeApp *mozApp = new nsGIOMimeApp(app_info); + NS_ENSURE_TRUE(mozApp, NS_ERROR_OUT_OF_MEMORY); + NS_ADDREF(*appInfo = mozApp); +- dlclose(libHandle); + return NS_OK; + } + +diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp +--- a/browser/components/shell/src/nsGNOMEShellService.cpp ++++ b/browser/components/shell/src/nsGNOMEShellService.cpp +@@ -101,24 +101,24 @@ static const char kDesktopOptionsKey[] = + static const char kDesktopDrawBGKey[] = DG_BACKGROUND "/draw_background"; + static const char kDesktopColorKey[] = DG_BACKGROUND "/primary_color"; + + nsresult + nsGNOMEShellService::Init() + { + nsresult rv; + +- // GConf _must_ be available, or we do not allow ++ // GConf or GIO _must_ be available, or we do not allow + // CreateInstance to succeed. + + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + nsCOMPtr giovfs = + do_GetService(NS_GIOSERVICE_CONTRACTID); + +- if (!gconf) ++ if (!gconf && !giovfs) + return NS_ERROR_NOT_AVAILABLE; + + // Check G_BROKEN_FILENAMES. If it's set, then filenames in glib use + // the locale encoding. If it's not set, they use UTF-8. + mUseLocaleFilenames = PR_GetEnv("G_BROKEN_FILENAMES") != nsnull; + + if (GetAppPathFromLauncher()) + return NS_OK; +@@ -189,50 +189,77 @@ nsGNOMEShellService::KeyMatchesAppName(c + if (!commandPath) + return PR_FALSE; + + PRBool matches = mAppPath.Equals(commandPath); + g_free(commandPath); + return matches; + } + ++PRBool ++nsGNOMEShellService::CheckHandlerMatchesAppName(const nsACString &handler) const ++{ ++ gint argc; ++ gchar **argv; ++ nsCAutoString command(handler); ++ ++ // The string will be something of the form: [/path/to/]browser "%s" ++ // We want to remove all of the parameters and get just the binary name. ++ ++ if (g_shell_parse_argv(command.get(), &argc, &argv, NULL) && argc > 0) { ++ command.Assign(argv[0]); ++ g_strfreev(argv); ++ } ++ ++ if (!KeyMatchesAppName(command.get())) ++ return PR_FALSE; // the handler is set to another app ++ ++ return PR_TRUE; ++} ++ + NS_IMETHODIMP + nsGNOMEShellService::IsDefaultBrowser(PRBool aStartupCheck, + PRBool* aIsDefaultBrowser) + { + *aIsDefaultBrowser = PR_FALSE; + if (aStartupCheck) + mCheckedThisSession = PR_TRUE; + + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); ++ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); + + PRBool enabled; + nsCAutoString handler; ++ nsCOMPtr gioApp; + + for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { + if (!appProtocols[i].essential) + continue; + +- handler.Truncate(); +- gconf->GetAppForProtocol(nsDependentCString(appProtocols[i].name), +- &enabled, handler); ++ if (gconf) { ++ handler.Truncate(); ++ gconf->GetAppForProtocol(nsDependentCString(appProtocols[i].name), ++ &enabled, handler); + +- // The string will be something of the form: [/path/to/]browser "%s" +- // We want to remove all of the parameters and get just the binary name. +- +- gint argc; +- gchar **argv; +- +- if (g_shell_parse_argv(handler.get(), &argc, &argv, NULL) && argc > 0) { +- handler.Assign(argv[0]); +- g_strfreev(argv); ++ if (!CheckHandlerMatchesAppName(handler) || !enabled) ++ return NS_OK; // the handler is disabled or set to another app + } + +- if (!KeyMatchesAppName(handler.get()) || !enabled) +- return NS_OK; // the handler is disabled or set to another app ++ if (giovfs) { ++ handler.Truncate(); ++ giovfs->GetAppForURIScheme(nsDependentCString(appProtocols[i].name), ++ getter_AddRefs(gioApp)); ++ if (!gioApp) ++ return NS_OK; ++ ++ gioApp->GetCommand(handler); ++ ++ if (!CheckHandlerMatchesAppName(handler)) ++ return NS_OK; // the handler is set to another app ++ } + } + + *aIsDefaultBrowser = PR_TRUE; + + return NS_OK; + } + + NS_IMETHODIMP +@@ -240,19 +267,20 @@ nsGNOMEShellService::SetDefaultBrowser(P + PRBool aForAllUsers) + { + #ifdef DEBUG + if (aForAllUsers) + NS_WARNING("Setting the default browser for all users is not yet supported"); + #endif + + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); ++ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); + if (gconf) { + nsCAutoString appKeyValue; +- if(mAppIsInPath) { ++ if (mAppIsInPath) { + // mAppPath is in the users path, so use only the basename as the launcher + gchar *tmp = g_path_get_basename(mAppPath.get()); + appKeyValue = tmp; + g_free(tmp); + } else { + appKeyValue = mAppPath; + } + +@@ -261,23 +289,18 @@ nsGNOMEShellService::SetDefaultBrowser(P + for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { + if (appProtocols[i].essential || aClaimAllTypes) { + gconf->SetAppForProtocol(nsDependentCString(appProtocols[i].name), + appKeyValue); + } + } + } + +- // set handler for .html and xhtml files and MIME types: +- if (aClaimAllTypes) { ++ if (giovfs) { + nsresult rv; +- nsCOMPtr giovfs = +- do_GetService(NS_GIOSERVICE_CONTRACTID, &rv); +- NS_ENSURE_SUCCESS(rv, NS_OK); +- + nsCOMPtr bundleService = + do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); + NS_ENSURE_SUCCESS(rv, rv); + + nsCOMPtr brandBundle; + rv = bundleService->CreateBundle(BRAND_PROPERTIES, getter_AddRefs(brandBundle)); + NS_ENSURE_SUCCESS(rv, rv); + +@@ -290,20 +313,30 @@ nsGNOMEShellService::SetDefaultBrowser(P + // use brandShortName as the application id. + NS_ConvertUTF16toUTF8 id(brandShortName); + nsCOMPtr appInfo; + rv = giovfs->CreateAppFromCommand(mAppPath, + id, + getter_AddRefs(appInfo)); + NS_ENSURE_SUCCESS(rv, rv); + +- // Add mime types for html, xhtml extension and set app to just created appinfo. +- for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appTypes); ++i) { +- appInfo->SetAsDefaultForMimeType(nsDependentCString(appTypes[i].mimeType)); +- appInfo->SetAsDefaultForFileExtensions(nsDependentCString(appTypes[i].extensions)); ++ // set handler for the protocols ++ for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { ++ if (appProtocols[i].essential || aClaimAllTypes) { ++ appInfo->SetAsDefaultForURIScheme(nsDependentCString(appProtocols[i].name)); ++ } ++ } ++ ++ // set handler for .html and xhtml files and MIME types: ++ if (aClaimAllTypes) { ++ // Add mime types for html, xhtml extension and set app to just created appinfo. ++ for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appTypes); ++i) { ++ appInfo->SetAsDefaultForMimeType(nsDependentCString(appTypes[i].mimeType)); ++ appInfo->SetAsDefaultForFileExtensions(nsDependentCString(appTypes[i].extensions)); ++ } + } + } + + return NS_OK; + } + + NS_IMETHODIMP + nsGNOMEShellService::GetShouldCheckDefaultBrowser(PRBool* aResult) +@@ -403,48 +436,52 @@ nsGNOMEShellService::SetDesktopBackgroun + filePath.Append("_wallpaper.png"); + + // write the image to a file in the home dir + rv = WriteImage(filePath, container); + + // if the file was written successfully, set it as the system wallpaper + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + +- nsCAutoString options; +- if (aPosition == BACKGROUND_TILE) +- options.Assign("wallpaper"); +- else if (aPosition == BACKGROUND_STRETCH) +- options.Assign("stretched"); +- else +- options.Assign("centered"); ++ if (gconf) { ++ nsCAutoString options; ++ if (aPosition == BACKGROUND_TILE) ++ options.Assign("wallpaper"); ++ else if (aPosition == BACKGROUND_STRETCH) ++ options.Assign("stretched"); ++ else ++ options.Assign("centered"); + +- gconf->SetString(NS_LITERAL_CSTRING(kDesktopOptionsKey), options); ++ gconf->SetString(NS_LITERAL_CSTRING(kDesktopOptionsKey), options); + +- // Set the image to an empty string first to force a refresh +- // (since we could be writing a new image on top of an existing +- // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes) +- gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), +- EmptyCString()); ++ // Set the image to an empty string first to force a refresh ++ // (since we could be writing a new image on top of an existing ++ // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes) ++ gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), ++ EmptyCString()); + +- gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), filePath); +- gconf->SetBool(NS_LITERAL_CSTRING(kDesktopDrawBGKey), PR_TRUE); ++ gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), filePath); ++ gconf->SetBool(NS_LITERAL_CSTRING(kDesktopDrawBGKey), PR_TRUE); ++ } + + return rv; + } + + #define COLOR_16_TO_8_BIT(_c) ((_c) >> 8) + #define COLOR_8_TO_16_BIT(_c) ((_c) << 8 | (_c)) + + NS_IMETHODIMP + nsGNOMEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) + { + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + + nsCAutoString background; +- gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background); ++ if (gconf) { ++ gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background); ++ } + + if (background.IsEmpty()) { + *aColor = 0; + return NS_OK; + } + + GdkColor color; + gboolean success = gdk_color_parse(background.get(), &color); +@@ -473,36 +510,48 @@ ColorToCString(PRUint32 aColor, nsCStrin + } + + NS_IMETHODIMP + nsGNOMEShellService::SetDesktopBackgroundColor(PRUint32 aColor) + { + NS_ASSERTION(aColor <= 0xffffff, "aColor has extra bits"); + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + +- nsCAutoString colorString; +- ColorToCString(aColor, colorString); ++ if (gconf) { ++ nsCAutoString colorString; ++ ColorToCString(aColor, colorString); + +- gconf->SetString(NS_LITERAL_CSTRING(kDesktopColorKey), colorString); ++ gconf->SetString(NS_LITERAL_CSTRING(kDesktopColorKey), colorString); ++ } + + return NS_OK; + } + + NS_IMETHODIMP + nsGNOMEShellService::OpenApplication(PRInt32 aApplication) + { + nsCAutoString scheme; + if (aApplication == APPLICATION_MAIL) + scheme.Assign("mailto"); + else if (aApplication == APPLICATION_NEWS) + scheme.Assign("news"); + else + return NS_ERROR_NOT_AVAILABLE; + ++ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); ++ if (giovfs) { ++ nsCOMPtr gioApp; ++ giovfs->GetAppForURIScheme(scheme, getter_AddRefs(gioApp)); ++ if (gioApp) ++ return gioApp->Launch(EmptyCString()); ++ } ++ + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); ++ if (!gconf) ++ return NS_ERROR_FAILURE; + + PRBool enabled; + nsCAutoString appCommand; + gconf->GetAppForProtocol(scheme, &enabled, appCommand); + + if (!enabled) + return NS_ERROR_FAILURE; + +diff --git a/browser/components/shell/src/nsGNOMEShellService.h b/browser/components/shell/src/nsGNOMEShellService.h +--- a/browser/components/shell/src/nsGNOMEShellService.h ++++ b/browser/components/shell/src/nsGNOMEShellService.h +@@ -49,16 +49,17 @@ public: + NS_DECL_NSISHELLSERVICE + + nsresult Init() NS_HIDDEN; + + private: + ~nsGNOMEShellService() {} + + NS_HIDDEN_(PRBool) KeyMatchesAppName(const char *aKeyValue) const; ++ NS_HIDDEN_(PRBool) CheckHandlerMatchesAppName(const nsACString& handler) const; + + NS_HIDDEN_(PRBool) GetAppPathFromLauncher(); + PRPackedBool mCheckedThisSession; + PRPackedBool mUseLocaleFilenames; + nsCString mAppPath; + PRPackedBool mAppIsInPath; + }; + +diff --git a/toolkit/system/gnome/nsGIOService.cpp b/toolkit/system/gnome/nsGIOService.cpp +--- a/toolkit/system/gnome/nsGIOService.cpp ++++ b/toolkit/system/gnome/nsGIOService.cpp +@@ -277,16 +277,43 @@ nsGIOMimeApp::SetAsDefaultForFileExtensi + } else { + *ext_pos = '\0'; + } + } + g_free(extensions); + return NS_OK; + } + ++/** ++ * Set default application for URI's of a particular scheme ++ * @param aURIScheme string containing the URI scheme ++ * @return NS_OK when application was set as default for URI scheme, ++ * NS_ERROR_FAILURE otherwise ++ */ ++NS_IMETHODIMP ++nsGIOMimeApp::SetAsDefaultForURIScheme(nsACString const& aURIScheme) ++{ ++ GError *error = NULL; ++ nsCAutoString contentType("x-scheme-handler/"); ++ contentType.Append(aURIScheme); ++ ++ g_app_info_set_as_default_for_type(mApp, ++ contentType.get(), ++ &error); ++ if (error) { ++ g_warning("Cannot set application as default for URI scheme (%s): %s", ++ PromiseFlatCString(aURIScheme).get(), ++ error->message); ++ g_error_free(error); ++ return NS_ERROR_FAILURE; ++ } ++ ++ return NS_OK; ++} ++ + nsresult + nsGIOService::Init() + { + // do nothing, gvfs/gio does not init. + return NS_OK; + } + + NS_IMPL_ISUPPORTS1(nsGIOService, nsIGIOService) +@@ -317,16 +344,33 @@ nsGIOService::GetMimeTypeFromExtension(c + g_free(mime_type); + g_free(content_type); + + return NS_OK; + } + // used in nsGNOMERegistry + // ----------------------------------------------------------------------------- + NS_IMETHODIMP ++nsGIOService::GetAppForURIScheme(const nsACString& aURIScheme, ++ nsIGIOMimeApp** aApp) ++{ ++ *aApp = nsnull; ++ ++ GAppInfo *app_info = g_app_info_get_default_for_uri_scheme( ++ PromiseFlatCString(aURIScheme).get()); ++ if (app_info) { ++ nsGIOMimeApp *mozApp = new nsGIOMimeApp(app_info); ++ NS_ADDREF(*aApp = mozApp); ++ } else { ++ return NS_ERROR_FAILURE; ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP + nsGIOService::GetAppForMimeType(const nsACString& aMimeType, + nsIGIOMimeApp** aApp) + { + *aApp = nsnull; + char *content_type = + get_content_type_from_mime_type(PromiseFlatCString(aMimeType).get()); + if (!content_type) + return NS_ERROR_FAILURE; +diff --git a/xpcom/system/nsIGIOService.idl b/xpcom/system/nsIGIOService.idl +--- a/xpcom/system/nsIGIOService.idl ++++ b/xpcom/system/nsIGIOService.idl +@@ -41,57 +41,61 @@ + + interface nsIUTF8StringEnumerator; + interface nsIURI; + + /* nsIGIOMimeApp holds information about an application that is looked up + with nsIGIOService::GetAppForMimeType. */ + // 66009894-9877-405b-9321-bf30420e34e6 prev uuid + +-[scriptable, uuid(e77021b4-4012-407d-b686-7a1f18050109)] ++[scriptable, uuid(ca6bad0c-8a48-48ac-82c7-27bb8f510fbe)] + interface nsIGIOMimeApp : nsISupports + { + const long EXPECTS_URIS = 0; + const long EXPECTS_PATHS = 1; + const long EXPECTS_URIS_FOR_NON_FILES = 2; + + readonly attribute AUTF8String id; + readonly attribute AUTF8String name; + readonly attribute AUTF8String command; + readonly attribute long expectsURIs; // see constants above + readonly attribute nsIUTF8StringEnumerator supportedURISchemes; + + void launch(in AUTF8String uri); + void setAsDefaultForMimeType(in AUTF8String mimeType); + void setAsDefaultForFileExtensions(in AUTF8String extensions); ++ void setAsDefaultForURIScheme(in AUTF8String uriScheme); + }; + + /* + * The VFS service makes use of two distinct registries. + * + * The application registry holds information about applications (uniquely + * identified by id), such as which MIME types and URI schemes they are + * capable of handling, whether they run in a terminal, etc. + * + * The MIME registry holds information about MIME types, such as which + * extensions map to a given MIME type. The MIME registry also stores the + * id of the application selected to handle each MIME type. + */ + + // prev id dea20bf0-4e4d-48c5-b932-dc3e116dc64b +-[scriptable, uuid(47e372c2-78bb-4899-8114-56aa7d9cdac5)] ++[scriptable, uuid(eda22a30-84e1-4e16-9ca0-cd1553c2b34a)] + interface nsIGIOService : nsISupports + { + + /*** MIME registry methods ***/ + + /* Obtain the MIME type registered for an extension. The extension + should not include a leading dot. */ + AUTF8String getMimeTypeFromExtension(in AUTF8String extension); + ++ /* Obtain the preferred application for opening a given URI scheme */ ++ nsIGIOMimeApp getAppForURIScheme(in AUTF8String aURIScheme); ++ + /* Obtain the preferred application for opening a given MIME type */ + nsIGIOMimeApp getAppForMimeType(in AUTF8String mimeType); + + /* Obtain the preferred application for opening a given MIME type */ + nsIGIOMimeApp createAppFromCommand(in AUTF8String cmd, + in AUTF8String appName); + + /* Obtain a description for the given MIME type */ + +diff --git a/toolkit/system/gnome/Makefile.in b/toolkit/system/gnome/Makefile.in +--- a/toolkit/system/gnome/Makefile.in ++++ b/toolkit/system/gnome/Makefile.in +@@ -60,16 +60,17 @@ ifdef MOZ_ENABLE_GNOMEVFS + CPPSRCS += \ + nsGnomeVFSService.cpp \ + $(NULL) + endif + + ifdef MOZ_ENABLE_GIO + CPPSRCS += \ + nsGIOService.cpp \ ++ nsGSettingsService.cpp \ + $(NULL) + endif + + ifdef MOZ_ENABLE_LIBNOTIFY + CPPSRCS += \ + nsAlertsService.cpp \ + nsAlertsIconListener.cpp \ + $(NULL) +diff --git a/toolkit/system/gnome/nsGSettingsService.cpp b/toolkit/system/gnome/nsGSettingsService.cpp +new file mode 100644 +--- /dev/null ++++ b/toolkit/system/gnome/nsGSettingsService.cpp +@@ -0,0 +1,238 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is the Mozilla GNOME integration code. ++ * ++ * The Initial Developer of the Original Code is ++ * Canonical Ltd. ++ * Portions created by the Initial Developer are Copyright (C) 2010 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Chris Coulson ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsGSettingsService.h" ++#include "nsStringAPI.h" ++#include "nsCOMPtr.h" ++#include "prlink.h" ++#include "nsComponentManagerUtils.h" ++ ++#include ++#include ++ ++typedef struct _GSettings GSettings; ++ ++typedef GSettings * (*_g_settings_new_fn) (const char* schema); ++typedef const char * const* (*_g_settings_list_schemas_fn) (void); ++typedef gboolean (*_g_settings_set_string_fn) (GSettings* settings, ++ const char* key, ++ const char* value); ++typedef gboolean (*_g_settings_set_boolean_fn) (GSettings* settings, ++ const char* key, ++ gboolean value); ++typedef gboolean (*_g_settings_set_int_fn) (GSettings* settings, ++ const char* key, ++ int value); ++typedef char * (*_g_settings_get_string_fn) (GSettings* settings, ++ const char* key); ++typedef gboolean (*_g_settings_get_boolean_fn) (GSettings* settings, ++ const char* key); ++typedef int (*_g_settings_get_int_fn) (GSettings* settings, ++ const char* key); ++ ++static _g_settings_new_fn _g_settings_new; ++static _g_settings_list_schemas_fn _g_settings_list_schemas; ++static PRLibrary *gioLib = nsnull; ++ ++class nsGSettingsCollection : public nsIGSettingsCollection ++{ ++public: ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSIGSETTINGSCOLLECTION ++ ++ nsGSettingsCollection(GSettings* aSettings) : mSettings(aSettings) {} ++ ~nsGSettingsCollection() { g_object_unref(mSettings); } ++ ++private: ++ GSettings *mSettings; ++}; ++ ++NS_IMPL_ISUPPORTS1(nsGSettingsCollection, nsIGSettingsCollection) ++ ++NS_IMETHODIMP ++nsGSettingsCollection::SetString(const nsACString& aKey, ++ const nsACString& aValue) ++{ ++ _g_settings_set_string_fn _g_settings_set_string = ++ (_g_settings_set_string_fn) PR_FindFunctionSymbol(gioLib, ++ "g_settings_set_string"); ++ if (!_g_settings_set_string) ++ return NS_ERROR_FAILURE; ++ ++ gboolean res = _g_settings_set_string(mSettings, ++ PromiseFlatCString(aKey).get(), ++ PromiseFlatCString(aValue).get()); ++ ++ return res ? NS_OK : NS_ERROR_FAILURE; ++} ++ ++NS_IMETHODIMP ++nsGSettingsCollection::SetBoolean(const nsACString& aKey, ++ PRBool aValue) ++{ ++ _g_settings_set_boolean_fn _g_settings_set_boolean = ++ (_g_settings_set_boolean_fn) PR_FindFunctionSymbol(gioLib, ++ "g_settings_set_boolean"); ++ if (!_g_settings_set_boolean) ++ return NS_ERROR_FAILURE; ++ ++ gboolean res = _g_settings_set_boolean(mSettings, ++ PromiseFlatCString(aKey).get(), ++ aValue); ++ ++ return res ? NS_OK : NS_ERROR_FAILURE; ++} ++ ++NS_IMETHODIMP ++nsGSettingsCollection::SetInt(const nsACString& aKey, ++ PRInt32 aValue) ++{ ++ _g_settings_set_int_fn _g_settings_set_int = ++ (_g_settings_set_int_fn) PR_FindFunctionSymbol(gioLib, ++ "g_settings_set_int"); ++ if (!_g_settings_set_int) ++ return NS_ERROR_FAILURE; ++ ++ gboolean res = _g_settings_set_int(mSettings, ++ PromiseFlatCString(aKey).get(), ++ aValue); ++ ++ return res ? NS_OK : NS_ERROR_FAILURE; ++} ++ ++NS_IMETHODIMP ++nsGSettingsCollection::GetString(const nsACString& aKey, ++ nsACString& aResult) ++{ ++ _g_settings_get_string_fn _g_settings_get_string = ++ (_g_settings_get_string_fn) PR_FindFunctionSymbol(gioLib, ++ "g_settings_get_string"); ++ if (!_g_settings_get_string) ++ return NS_ERROR_FAILURE; ++ ++ char *result = _g_settings_get_string(mSettings, ++ PromiseFlatCString(aKey).get()); ++ if (!result) ++ return NS_ERROR_FAILURE; ++ ++ aResult.Assign(result); ++ g_free(result); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++nsGSettingsCollection::GetBoolean(const nsACString& aKey, ++ PRBool* aResult) ++{ ++ _g_settings_get_boolean_fn _g_settings_get_boolean = ++ (_g_settings_get_boolean_fn) PR_FindFunctionSymbol(gioLib, ++ "g_settings_get_boolean"); ++ if (!_g_settings_get_boolean) ++ return NS_ERROR_FAILURE; ++ ++ gboolean res = _g_settings_get_boolean(mSettings, ++ PromiseFlatCString(aKey).get()); ++ *aResult = res ? PR_TRUE : PR_FALSE; ++ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++nsGSettingsCollection::GetInt(const nsACString& aKey, ++ PRInt32* aResult) ++{ ++ _g_settings_get_int_fn _g_settings_get_int = ++ (_g_settings_get_int_fn) PR_FindFunctionSymbol(gioLib, ++ "g_settings_get_int"); ++ if (!_g_settings_get_int) ++ return NS_ERROR_FAILURE; ++ ++ *aResult = _g_settings_get_int(mSettings, ++ PromiseFlatCString(aKey).get()); ++ ++ return NS_OK; ++} ++ ++nsresult ++nsGSettingsService::Init() ++{ ++ if (!gioLib) { ++ gioLib = PR_LoadLibrary("libgio-2.0.so.0"); ++ } ++ ++ _g_settings_new = (_g_settings_new_fn) ++ PR_FindFunctionSymbol(gioLib, "g_settings_new"); ++ _g_settings_list_schemas = (_g_settings_list_schemas_fn) ++ PR_FindFunctionSymbol(gioLib, "g_settings_list_schemas"); ++ ++ if (!_g_settings_new || !_g_settings_list_schemas) { ++ PR_UnloadLibrary(gioLib); ++ return NS_ERROR_FAILURE; ++ } ++ ++ return NS_OK; ++} ++ ++NS_IMPL_ISUPPORTS1(nsGSettingsService, nsIGSettingsService) ++ ++nsGSettingsService::~nsGSettingsService() ++{ ++ if (gioLib) { ++ PR_UnloadLibrary(gioLib); ++ gioLib = nsnull; ++ } ++} ++ ++NS_IMETHODIMP ++nsGSettingsService::GetCollectionForSchema(const nsACString& schema, ++ nsIGSettingsCollection** collection) ++{ ++ const char * const *schemas = _g_settings_list_schemas(); ++ unsigned int i = 0; ++ ++ for (i = 0; schemas[i] != NULL; i++) { ++ if (strcmp(schemas[i], PromiseFlatCString(schema).get()) == 0) { ++ GSettings *settings = _g_settings_new(PromiseFlatCString(schema).get()); ++ nsGSettingsCollection *mozGSettings = new nsGSettingsCollection(settings); ++ NS_ADDREF(*collection = mozGSettings); ++ return NS_OK; ++ } ++ } ++ ++ return NS_ERROR_FAILURE; ++} +diff --git a/toolkit/system/gnome/nsGSettingsService.h b/toolkit/system/gnome/nsGSettingsService.h +new file mode 100644 +--- /dev/null ++++ b/toolkit/system/gnome/nsGSettingsService.h +@@ -0,0 +1,60 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is the Mozilla GNOME integration code. ++ * ++ * The Initial Developer of the Original Code is ++ * Canonical Ltd. ++ * Portions created by the Initial Developer are Copyright (C) 2010 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Chris Coulson ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef nsGSettingsService_h_ ++#define nsGSettingsService_h_ ++ ++#include "nsIGSettingsService.h" ++ ++#define NS_GSETTINGSSERVICE_CID \ ++{0xbfd4a9d8, 0xd886, 0x4161, {0x81, 0xef, 0x88, 0x68, 0xda, 0x11, 0x41, 0x70}} ++ ++class nsGSettingsService : public nsIGSettingsService ++{ ++public: ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSIGSETTINGSSERVICE ++ ++ NS_HIDDEN_(nsresult) Init(); ++ ++private: ++ ~nsGSettingsService(); ++}; ++ ++#endif ++ +diff --git a/toolkit/system/gnome/nsGnomeModule.cpp b/toolkit/system/gnome/nsGnomeModule.cpp +--- a/toolkit/system/gnome/nsGnomeModule.cpp ++++ b/toolkit/system/gnome/nsGnomeModule.cpp +@@ -44,62 +44,67 @@ + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGConfService, Init) + #endif + #ifdef MOZ_ENABLE_GNOMEVFS + #include "nsGnomeVFSService.h" + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init) + #endif + #ifdef MOZ_ENABLE_GIO + #include "nsGIOService.h" ++#include "nsGSettingsService.h" + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGIOService, Init) ++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init) + #endif + #ifdef MOZ_ENABLE_LIBNOTIFY + #include "nsAlertsService.h" + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAlertsService, Init) + #endif + + #ifdef MOZ_ENABLE_GCONF + NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID); + #endif + #ifdef MOZ_ENABLE_GNOMEVFS + NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID); + #endif + #ifdef MOZ_ENABLE_GIO + NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID); ++NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID); + #endif + #ifdef MOZ_ENABLE_LIBNOTIFY + NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID); + #endif + + + static const mozilla::Module::CIDEntry kGnomeCIDs[] = { + #ifdef MOZ_ENABLE_GCONF + { &kNS_GCONFSERVICE_CID, false, NULL, nsGConfServiceConstructor }, + #endif + #ifdef MOZ_ENABLE_GNOMEVFS + { &kNS_GNOMEVFSSERVICE_CID, false, NULL, nsGnomeVFSServiceConstructor }, + #endif + #ifdef MOZ_ENABLE_GIO + { &kNS_GIOSERVICE_CID, false, NULL, nsGIOServiceConstructor }, ++ { &kNS_GSETTINGSSERVICE_CID, false, NULL, nsGSettingsServiceConstructor }, + #endif + #ifdef MOZ_ENABLE_LIBNOTIFY + { &kNS_SYSTEMALERTSSERVICE_CID, false, NULL, nsAlertsServiceConstructor }, + #endif + { NULL } + }; + + static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { + #ifdef MOZ_ENABLE_GCONF + { NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID }, + #endif + #ifdef MOZ_ENABLE_GNOMEVFS + { NS_GNOMEVFSSERVICE_CONTRACTID, &kNS_GNOMEVFSSERVICE_CID }, + #endif + #ifdef MOZ_ENABLE_GIO + { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID }, ++ { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID }, + #endif + #ifdef MOZ_ENABLE_LIBNOTIFY + { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID }, + #endif + { NULL } + }; + + static const mozilla::Module kGnomeModule = { +diff --git a/xpcom/system/Makefile.in b/xpcom/system/Makefile.in +--- a/xpcom/system/Makefile.in ++++ b/xpcom/system/Makefile.in +@@ -47,16 +47,17 @@ XPIDL_MODULE = xpcom_system + + XPIDLSRCS = \ + nsIXULAppInfo.idl \ + nsIXULRuntime.idl \ + nsIGConfService.idl \ + nsIGnomeVFSService.idl \ + nsIBlocklistService.idl \ + nsIGIOService.idl \ ++ nsIGSettingsService.idl \ + nsIAccelerometer.idl \ + nsIGeolocationProvider.idl \ + nsIHapticFeedback.idl \ + $(NULL) + + ifdef MOZ_CRASHREPORTER + XPIDLSRCS += nsICrashReporter.idl + endif +diff --git a/xpcom/system/nsIGSettingsService.idl b/xpcom/system/nsIGSettingsService.idl +new file mode 100644 +--- /dev/null ++++ b/xpcom/system/nsIGSettingsService.idl +@@ -0,0 +1,61 @@ ++/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is the Mozilla GNOME integration code. ++ * ++ * The Initial Developer of the Original Code is ++ * Canonical Ltd. ++ * Portions created by the Initial Developer are Copyright (C) 2010 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Chris Coulson ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsISupports.idl" ++#include "nsIArray.idl" ++ ++[scriptable, uuid(09637d3c-3c07-40b4-aff9-1d2a0f046f3c)] ++interface nsIGSettingsCollection : nsISupports ++{ ++ void setString(in AUTF8String key, in AUTF8String value); ++ void setBoolean(in AUTF8String key, in boolean value); ++ void setInt(in AUTF8String key, in long value); ++ AUTF8String getString(in AUTF8String key); ++ boolean getBoolean(in AUTF8String key); ++ long getInt(in AUTF8String key); ++}; ++ ++[scriptable, uuid(849c088b-57d1-4f24-b7b2-3dc4acb04c0a)] ++interface nsIGSettingsService : nsISupports ++{ ++ nsIGSettingsCollection getCollectionForSchema(in AUTF8String schema); ++}; ++ ++%{C++ ++#define NS_GSETTINGSSERVICE_CONTRACTID "@mozilla.org/gsettings-service;1" ++%} + +diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp +--- a/browser/components/shell/src/nsGNOMEShellService.cpp ++++ b/browser/components/shell/src/nsGNOMEShellService.cpp +@@ -41,16 +41,17 @@ + #include "nsILocalFile.h" + #include "nsIProperties.h" + #include "nsDirectoryServiceDefs.h" + #include "nsIPrefService.h" + #include "prenv.h" + #include "nsStringAPI.h" + #include "nsIGConfService.h" + #include "nsIGIOService.h" ++#include "nsIGSettingsService.h" + #include "nsIStringBundle.h" + #include "nsIOutputStream.h" + #include "nsIProcess.h" + #include "nsNetUtil.h" + #include "nsIDOMHTMLImageElement.h" + #include "nsIImageLoadingContent.h" + #include "imgIRequest.h" + #include "imgIContainer.h" +@@ -96,29 +97,37 @@ static const char kDocumentIconPath[] = + // GConf registry key constants + #define DG_BACKGROUND "/desktop/gnome/background" + + static const char kDesktopImageKey[] = DG_BACKGROUND "/picture_filename"; + static const char kDesktopOptionsKey[] = DG_BACKGROUND "/picture_options"; + static const char kDesktopDrawBGKey[] = DG_BACKGROUND "/draw_background"; + static const char kDesktopColorKey[] = DG_BACKGROUND "/primary_color"; + ++static const char kDesktopBGSchema[] = "org.gnome.desktop.background"; ++static const char kDesktopImageGSKey[] = "picture-uri"; ++static const char kDesktopOptionGSKey[] = "picture-options"; ++static const char kDesktopDrawBGGSKey[] = "draw-background"; ++static const char kDesktopColorGSKey[] = "primary-color"; ++ + nsresult + nsGNOMEShellService::Init() + { + nsresult rv; + +- // GConf or GIO _must_ be available, or we do not allow ++ // GConf, GSettings or GIO _must_ be available, or we do not allow + // CreateInstance to succeed. + + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + nsCOMPtr giovfs = + do_GetService(NS_GIOSERVICE_CONTRACTID); ++ nsCOMPtr gsettings = ++ do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); + +- if (!gconf && !giovfs) ++ if (!gconf && !giovfs && !gsettings) + return NS_ERROR_NOT_AVAILABLE; + + // Check G_BROKEN_FILENAMES. If it's set, then filenames in glib use + // the locale encoding. If it's not set, they use UTF-8. + mUseLocaleFilenames = PR_GetEnv("G_BROKEN_FILENAMES") != nsnull; + + if (GetAppPathFromLauncher()) + return NS_OK; +@@ -434,27 +443,47 @@ nsGNOMEShellService::SetDesktopBackgroun + filePath.Append('/'); + filePath.Append(NS_ConvertUTF16toUTF8(brandName)); + filePath.Append("_wallpaper.png"); + + // write the image to a file in the home dir + rv = WriteImage(filePath, container); + + // if the file was written successfully, set it as the system wallpaper ++ nsCAutoString options; ++ if (aPosition == BACKGROUND_TILE) ++ options.Assign("wallpaper"); ++ else if (aPosition == BACKGROUND_STRETCH) ++ options.Assign("stretched"); ++ else ++ options.Assign("centered"); ++ ++ // Try GSettings first. If we don't have GSettings or the right schema, fall back ++ // to using GConf instead. Note that if GSettings works ok, the changes get ++ // mirrored to GConf by the gsettings->gconf bridge in gnome-settings-daemon ++ nsCOMPtr gsettings = ++ do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); ++ if (gsettings) { ++ nsCOMPtr background_settings; ++ gsettings->GetCollectionForSchema( ++ NS_LITERAL_CSTRING(kDesktopBGSchema), getter_AddRefs(background_settings)); ++ if (background_settings) { ++ filePath.Insert("file://", 0); ++ background_settings->SetString(NS_LITERAL_CSTRING(kDesktopOptionGSKey), ++ options); ++ background_settings->SetString(NS_LITERAL_CSTRING(kDesktopImageGSKey), ++ filePath); ++ background_settings->SetBoolean(NS_LITERAL_CSTRING(kDesktopDrawBGGSKey), ++ PR_TRUE); ++ return rv; ++ } ++ } ++ + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); +- + if (gconf) { +- nsCAutoString options; +- if (aPosition == BACKGROUND_TILE) +- options.Assign("wallpaper"); +- else if (aPosition == BACKGROUND_STRETCH) +- options.Assign("stretched"); +- else +- options.Assign("centered"); +- + gconf->SetString(NS_LITERAL_CSTRING(kDesktopOptionsKey), options); + + // Set the image to an empty string first to force a refresh + // (since we could be writing a new image on top of an existing + // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes) + gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), + EmptyCString()); + +@@ -466,21 +495,33 @@ nsGNOMEShellService::SetDesktopBackgroun + } + + #define COLOR_16_TO_8_BIT(_c) ((_c) >> 8) + #define COLOR_8_TO_16_BIT(_c) ((_c) << 8 | (_c)) + + NS_IMETHODIMP + nsGNOMEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) + { +- nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); ++ nsCOMPtr gsettings = ++ do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); ++ nsCOMPtr background_settings; ++ nsCAutoString background; ++ if (gsettings) { ++ gsettings->GetCollectionForSchema( ++ NS_LITERAL_CSTRING(kDesktopBGSchema), getter_AddRefs(background_settings)); ++ if (background_settings) { ++ background_settings->GetString(NS_LITERAL_CSTRING(kDesktopColorGSKey), ++ background); ++ } ++ } + +- nsCAutoString background; +- if (gconf) { +- gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background); ++ if (!background_settings) { ++ nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); ++ if (gconf) ++ gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background); + } + + if (background.IsEmpty()) { + *aColor = 0; + return NS_OK; + } + + GdkColor color; +@@ -508,22 +548,35 @@ ColorToCString(PRUint32 aColor, nsCStrin + + PR_snprintf(buf, 14, "#%04x%04x%04x", red, green, blue); + } + + NS_IMETHODIMP + nsGNOMEShellService::SetDesktopBackgroundColor(PRUint32 aColor) + { + NS_ASSERTION(aColor <= 0xffffff, "aColor has extra bits"); ++ ++ nsCAutoString colorString; ++ ColorToCString(aColor, colorString); ++ ++ nsCOMPtr gsettings = ++ do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); ++ if (gsettings) { ++ nsCOMPtr background_settings; ++ gsettings->GetCollectionForSchema( ++ NS_LITERAL_CSTRING(kDesktopBGSchema), getter_AddRefs(background_settings)); ++ if (background_settings) { ++ background_settings->SetString(NS_LITERAL_CSTRING(kDesktopColorGSKey), ++ colorString); ++ return NS_OK; ++ } ++ } ++ + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); +- + if (gconf) { +- nsCAutoString colorString; +- ColorToCString(aColor, colorString); +- + gconf->SetString(NS_LITERAL_CSTRING(kDesktopColorKey), colorString); + } + + return NS_OK; + } + + NS_IMETHODIMP + nsGNOMEShellService::OpenApplication(PRInt32 aApplication) + diff --git a/firefox-4.0-moz-app-launcher.patch b/firefox-4.0-moz-app-launcher.patch new file mode 100644 index 0000000..d87b64a --- /dev/null +++ b/firefox-4.0-moz-app-launcher.patch @@ -0,0 +1,137 @@ +From https://bugzilla.mozilla.org/show_bug.cgi?id=611953 +Patch 1 - Use MOZ_APP_LAUNCHER for default browser executable (v3, un-bitrotted) + + +diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp +--- a/browser/components/shell/src/nsGNOMEShellService.cpp ++++ b/browser/components/shell/src/nsGNOMEShellService.cpp +@@ -115,16 +115,19 @@ nsGNOMEShellService::Init() + + if (!gconf) + return NS_ERROR_NOT_AVAILABLE; + + // Check G_BROKEN_FILENAMES. If it's set, then filenames in glib use + // the locale encoding. If it's not set, they use UTF-8. + mUseLocaleFilenames = PR_GetEnv("G_BROKEN_FILENAMES") != nsnull; + ++ if (GetAppPathFromLauncher()) ++ return NS_OK; ++ + nsCOMPtr dirSvc + (do_GetService("@mozilla.org/file/directory_service;1")); + NS_ENSURE_TRUE(dirSvc, NS_ERROR_NOT_AVAILABLE); + + nsCOMPtr appPath; + rv = dirSvc->Get(NS_XPCOM_CURRENT_PROCESS_DIR, NS_GET_IID(nsILocalFile), + getter_AddRefs(appPath)); + NS_ENSURE_SUCCESS(rv, rv); +@@ -133,16 +136,44 @@ nsGNOMEShellService::Init() + NS_ENSURE_SUCCESS(rv, rv); + + return appPath->GetNativePath(mAppPath); + } + + NS_IMPL_ISUPPORTS1(nsGNOMEShellService, nsIShellService) + + PRBool ++nsGNOMEShellService::GetAppPathFromLauncher() ++{ ++ gchar *tmp; ++ ++ const char *launcher = PR_GetEnv("MOZ_APP_LAUNCHER"); ++ if (!launcher) ++ return PR_FALSE; ++ ++ if (g_path_is_absolute(launcher)) { ++ mAppPath = launcher; ++ tmp = g_path_get_basename(launcher); ++ gchar *fullpath = g_find_program_in_path(tmp); ++ if (fullpath && mAppPath.Equals(fullpath)) ++ mAppIsInPath = PR_TRUE; ++ g_free(fullpath); ++ } else { ++ tmp = g_find_program_in_path(launcher); ++ if (!tmp) ++ return PR_FALSE; ++ mAppPath = tmp; ++ mAppIsInPath = PR_TRUE; ++ } ++ ++ g_free(tmp); ++ return PR_TRUE; ++} ++ ++PRBool + nsGNOMEShellService::KeyMatchesAppName(const char *aKeyValue) const + { + + gchar *commandPath; + if (mUseLocaleFilenames) { + gchar *nativePath = g_filename_from_utf8(aKeyValue, -1, NULL, NULL, NULL); + if (!nativePath) { + NS_ERROR("Error converting path to filesystem encoding"); +@@ -210,18 +241,28 @@ nsGNOMEShellService::SetDefaultBrowser(P + { + #ifdef DEBUG + if (aForAllUsers) + NS_WARNING("Setting the default browser for all users is not yet supported"); + #endif + + nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + if (gconf) { +- nsCAutoString appKeyValue(mAppPath); +- appKeyValue.Append(" \"%s\""); ++ nsCAutoString appKeyValue; ++ if(mAppIsInPath) { ++ // mAppPath is in the users path, so use only the basename as the launcher ++ gchar *tmp = g_path_get_basename(mAppPath.get()); ++ appKeyValue = tmp; ++ g_free(tmp); ++ } else { ++ appKeyValue = mAppPath; ++ } ++ ++ appKeyValue.AppendLiteral(" %s"); ++ + for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { + if (appProtocols[i].essential || aClaimAllTypes) { + gconf->SetAppForProtocol(nsDependentCString(appProtocols[i].name), + appKeyValue); + } + } + } + +diff --git a/browser/components/shell/src/nsGNOMEShellService.h b/browser/components/shell/src/nsGNOMEShellService.h +--- a/browser/components/shell/src/nsGNOMEShellService.h ++++ b/browser/components/shell/src/nsGNOMEShellService.h +@@ -38,26 +38,28 @@ + #define nsgnomeshellservice_h____ + + #include "nsIShellService.h" + #include "nsStringAPI.h" + + class nsGNOMEShellService : public nsIShellService + { + public: +- nsGNOMEShellService() : mCheckedThisSession(PR_FALSE) { } ++ nsGNOMEShellService() : mCheckedThisSession(PR_FALSE), mAppIsInPath(PR_FALSE) { } + + NS_DECL_ISUPPORTS + NS_DECL_NSISHELLSERVICE + + nsresult Init() NS_HIDDEN; + + private: + ~nsGNOMEShellService() {} + + NS_HIDDEN_(PRBool) KeyMatchesAppName(const char *aKeyValue) const; + ++ NS_HIDDEN_(PRBool) GetAppPathFromLauncher(); + PRPackedBool mCheckedThisSession; + PRPackedBool mUseLocaleFilenames; + nsCString mAppPath; ++ PRPackedBool mAppIsInPath; + }; + + #endif // nsgnomeshellservice_h____ + diff --git a/xulrunner.spec b/xulrunner.spec index 80ede9e..1c3049d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -88,6 +88,8 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch30: xulrunner-omnijar.patch Patch31: xulrunner-2.0-baddevice.patch +Patch32: firefox-4.0-moz-app-launcher.patch +Patch33: firefox-4.0-gnome3.patch # --------------------------------------------------- @@ -190,6 +192,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch30 -p1 -b .omnijar %patch31 -p1 -b .baddevice +%patch32 -p1 -b .moz-app-launcher +%patch33 -p1 -b .gnome3 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 70bd22aed662938a9ebc0f422cf8bd8cfb3fe747 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sun, 3 Apr 2011 23:49:24 -0700 Subject: [PATCH 166/486] Lazily intialize the network link service The IO service needs to be loaded in order to process manifest files, which is where the dbus service is specified. However, the IO service also needs the network link service, which in turn needs the dbus service in order to handle network state changes. So, we need to thus make sure we delay loading of the dbus service. Patch based on v4 (v3 + review nits) from https://bugzilla.mozilla.org/show_bug.cgi?id=627672#c13 --- xulrunner-2.0-network-link-service.patch | 268 +++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 270 insertions(+) create mode 100644 xulrunner-2.0-network-link-service.patch diff --git a/xulrunner-2.0-network-link-service.patch b/xulrunner-2.0-network-link-service.patch new file mode 100644 index 0000000..f318b70 --- /dev/null +++ b/xulrunner-2.0-network-link-service.patch @@ -0,0 +1,268 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627672 + +diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mozilla-2.0/netwerk/base/src/nsIOService.cpp +--- mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service 2011-03-18 16:34:03.000000000 -0700 ++++ mozilla-2.0/netwerk/base/src/nsIOService.cpp 2011-04-03 21:40:34.787142329 -0700 +@@ -160,31 +160,33 @@ PRInt16 gBadPortList[] = { + 2049, // nfs + 4045, // lockd + 6000, // x11 + 0, // This MUST be zero so that we can populating the array + }; + + static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardown"; + static const char kProfileChangeNetRestoreTopic[] = "profile-change-net-restore"; ++static const char kStartupTopic[] = "profile-after-change"; + + // Necko buffer cache + nsIMemory* nsIOService::gBufferCache = nsnull; + PRUint32 nsIOService::gDefaultSegmentSize = 4096; + PRUint32 nsIOService::gDefaultSegmentCount = 24; + + //////////////////////////////////////////////////////////////////////////////// + + nsIOService::nsIOService() + : mOffline(PR_TRUE) + , mOfflineForProfileChange(PR_FALSE) + , mManageOfflineStatus(PR_TRUE) + , mSettingOffline(PR_FALSE) + , mSetOfflineValue(PR_FALSE) + , mShutdown(PR_FALSE) ++ , mNetworkLinkServiceInitialized(PR_FALSE) + , mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY) + , mContentSniffers(NS_CONTENT_SNIFFER_CATEGORY) + { + } + + nsresult + nsIOService::Init() + { +@@ -229,16 +231,17 @@ nsIOService::Init() + } + + // Register for profile change notifications + nsCOMPtr observerService = + mozilla::services::GetObserverService(); + if (observerService) { + observerService->AddObserver(this, kProfileChangeNetTeardownTopic, PR_TRUE); + observerService->AddObserver(this, kProfileChangeNetRestoreTopic, PR_TRUE); ++ observerService->AddObserver(this, kStartupTopic, PR_TRUE); + observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE); + observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, PR_TRUE); + } + else + NS_WARNING("failed to get observer service"); + + NS_TIME_FUNCTION_MARK("Registered observers"); + +@@ -257,32 +260,16 @@ nsIOService::Init() + NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Was unable to allocate. No gBufferCache."); + CallQueryInterface(recyclingAllocator, &gBufferCache); + } + + NS_TIME_FUNCTION_MARK("Set up the recycling allocator"); + + gIOService = this; + +-#ifdef MOZ_IPC +- // go into managed mode if we can, and chrome process +- if (XRE_GetProcessType() == GeckoProcessType_Default) +-#endif +- mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID); +- +- if (!mNetworkLinkService) +- // We can't really determine if the machine has a usable network connection, +- // so let's cross our fingers! +- mManageOfflineStatus = PR_FALSE; +- +- if (mManageOfflineStatus) +- TrackNetworkLinkStatusForOffline(); +- else +- SetOffline(PR_FALSE); +- + NS_TIME_FUNCTION_MARK("Set up network link service"); + + return NS_OK; + } + + + nsIOService::~nsIOService() + { +@@ -306,16 +293,54 @@ nsIOService::InitializeSocketTransportSe + if (mSocketTransportService) { + rv = mSocketTransportService->Init(); + NS_ASSERTION(NS_SUCCEEDED(rv), "socket transport service init failed"); + } + + return rv; + } + ++nsresult ++nsIOService::InitializeNetworkLinkService() ++{ ++ NS_TIME_FUNCTION; ++ ++ nsresult rv = NS_OK; ++ ++ if (mNetworkLinkServiceInitialized) ++ return rv; ++ ++#ifdef MOZ_IPC ++ // go into managed mode if we can, and chrome process ++ if (XRE_GetProcessType() == GeckoProcessType_Default) ++#endif ++ { ++ mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID, &rv); ++ if (NS_FAILED(rv)) { ++ NS_WARNING("failed to get network link service"); ++ return rv; ++ } ++ } ++ ++ mNetworkLinkServiceInitialized = PR_TRUE; ++ ++ if (!mNetworkLinkService) { ++ // We can't really determine if the machine has a usable network connection, ++ // so let's cross our fingers! ++ mManageOfflineStatus = PR_FALSE; ++ } ++ ++ if (mManageOfflineStatus) ++ TrackNetworkLinkStatusForOffline(); ++ else ++ SetOffline(PR_FALSE); ++ ++ return rv; ++} ++ + nsIOService* + nsIOService::GetInstance() { + if (!gIOService) { + gIOService = new nsIOService(); + if (!gIOService) + return nsnull; + NS_ADDREF(gIOService); + +@@ -658,16 +683,19 @@ nsIOService::NewChannel(const nsACString + if (NS_FAILED(rv)) return rv; + + return NewChannelFromURI(uri, result); + } + + PRBool + nsIOService::IsLinkUp() + { ++ NS_ASSERTION(mNetworkLinkServiceInitialized, ++ "network link service should be initialized"); ++ + if (!mNetworkLinkService) { + // We cannot decide, assume the link is up + return PR_TRUE; + } + + PRBool isLinkUp; + nsresult rv; + rv = mNetworkLinkService->GetIsLinkUp(&isLinkUp); +@@ -938,16 +966,20 @@ nsIOService::Observe(nsISupports *subjec + if (mOfflineForProfileChange) { + mOfflineForProfileChange = PR_FALSE; + if (!mManageOfflineStatus || + NS_FAILED(TrackNetworkLinkStatusForOffline())) { + SetOffline(PR_FALSE); + } + } + } ++ else if (!strcmp(topic, kStartupTopic)) { ++ // Lazy initialization of network link service (see bug 620472) ++ InitializeNetworkLinkService(); ++ } + else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { + // Remember we passed XPCOM shutdown notification to prevent any + // changes of the offline status from now. We must not allow going + // online after this point. + mShutdown = PR_TRUE; + + SetOffline(PR_TRUE); + +@@ -1055,32 +1087,42 @@ nsIOService::NewSimpleNestedURI(nsIURI* + NS_IF_ADDREF(*aResult = new nsSimpleNestedURI(safeURI)); + return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY; + } + + NS_IMETHODIMP + nsIOService::SetManageOfflineStatus(PRBool aManage) { + PRBool wasManaged = mManageOfflineStatus; + mManageOfflineStatus = aManage; ++ ++ if (!mNetworkLinkServiceInitialized) { ++ nsresult rv = InitializeNetworkLinkService(); ++ if (NS_FAILED(rv)) ++ return rv; ++ } ++ + if (mManageOfflineStatus && !wasManaged) + return TrackNetworkLinkStatusForOffline(); + return NS_OK; + } + + NS_IMETHODIMP + nsIOService::GetManageOfflineStatus(PRBool* aManage) { + *aManage = mManageOfflineStatus; + return NS_OK; + } + + nsresult + nsIOService::TrackNetworkLinkStatusForOffline() + { + NS_ASSERTION(mManageOfflineStatus, + "Don't call this unless we're managing the offline status"); ++ NS_ASSERTION(mNetworkLinkServiceInitialized, ++ "network link service should be set up"); ++ + if (!mNetworkLinkService) + return NS_ERROR_FAILURE; + + if (mShutdown) + return NS_ERROR_NOT_AVAILABLE; + + // check to make sure this won't collide with Autodial + if (mSocketTransportService) { +diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.h.network-link-service mozilla-2.0/netwerk/base/src/nsIOService.h +--- mozilla-2.0/netwerk/base/src/nsIOService.h.network-link-service 2011-03-18 16:34:03.000000000 -0700 ++++ mozilla-2.0/netwerk/base/src/nsIOService.h 2011-04-03 21:34:34.608645179 -0700 +@@ -129,16 +129,17 @@ private: + nsIProtocolHandler* hdlr); + + // Prefs wrangling + NS_HIDDEN_(void) PrefsChanged(nsIPrefBranch *prefs, const char *pref = nsnull); + NS_HIDDEN_(void) GetPrefBranch(nsIPrefBranch2 **); + NS_HIDDEN_(void) ParsePortList(nsIPrefBranch *prefBranch, const char *pref, PRBool remove); + + nsresult InitializeSocketTransportService(); ++ nsresult InitializeNetworkLinkService(); + + private: + PRPackedBool mOffline; + PRPackedBool mOfflineForProfileChange; + PRPackedBool mManageOfflineStatus; + + // Used to handle SetOffline() reentrancy. See the comment in + // SetOffline() for more details. +@@ -146,16 +147,17 @@ private: + PRPackedBool mSetOfflineValue; + + PRPackedBool mShutdown; + + nsCOMPtr mSocketTransportService; + nsCOMPtr mDNSService; + nsCOMPtr mProxyService; + nsCOMPtr mNetworkLinkService; ++ PRPackedBool mNetworkLinkServiceInitialized; + + // Cached protocol handlers + nsWeakPtr mWeakHandler[NS_N(gScheme)]; + + // cached categories + nsCategoryCache mChannelEventSinks; + nsCategoryCache mContentSniffers; + diff --git a/xulrunner.spec b/xulrunner.spec index 1c3049d..1e5fc3a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -90,6 +90,7 @@ Patch30: xulrunner-omnijar.patch Patch31: xulrunner-2.0-baddevice.patch Patch32: firefox-4.0-moz-app-launcher.patch Patch33: firefox-4.0-gnome3.patch +Patch34: xulrunner-2.0-network-link-service.patch # --------------------------------------------------- @@ -194,6 +195,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch31 -p1 -b .baddevice %patch32 -p1 -b .moz-app-launcher %patch33 -p1 -b .gnome3 +%patch34 -p1 -b .network-link-service %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From c08abc5f1d370c82f21b899b60cd81954bd87525 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sun, 3 Apr 2011 23:57:31 -0700 Subject: [PATCH 167/486] Update for NetworkManager 0.9 connection states https://bugzilla.mozilla.org/show_bug.cgi?id=639959 --- xulrunner-2.0-NetworkManager09.patch | 51 ++++++++++++++++++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 53 insertions(+) create mode 100644 xulrunner-2.0-NetworkManager09.patch diff --git a/xulrunner-2.0-NetworkManager09.patch b/xulrunner-2.0-NetworkManager09.patch new file mode 100644 index 0000000..317a1b4 --- /dev/null +++ b/xulrunner-2.0-NetworkManager09.patch @@ -0,0 +1,51 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=639959 + +--- source/toolkit/system/dbus/nsNetworkManagerListener.cpp.foo 2011-03-08 14:26:28.167074923 -0600 ++++ source/toolkit/system/dbus/nsNetworkManagerListener.cpp 2011-03-08 14:30:54.260748294 -0600 +@@ -51,15 +51,13 @@ + #define NM_DBUS_SERVICE "org.freedesktop.NetworkManager" + #define NM_DBUS_PATH "/org/freedesktop/NetworkManager" + #define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager" +-#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange" +-typedef enum NMState +-{ +- NM_STATE_UNKNOWN = 0, +- NM_STATE_ASLEEP, +- NM_STATE_CONNECTING, +- NM_STATE_CONNECTED, +- NM_STATE_DISCONNECTED +-} NMState; ++#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange" /* Deprecated in 0.7.x */ ++#define NM_DBUS_SIGNAL_STATE_CHANGED "StateChanged" ++ ++#define NM_STATE_CONNECTED_OLD 3 ++#define NM_STATE_CONNECTED_LOCAL 50 ++#define NM_STATE_CONNECTED_SITE 60 ++#define NM_STATE_CONNECTED_GLOBAL 70 + + nsNetworkManagerListener::nsNetworkManagerListener() : + mLinkUp(PR_TRUE), mNetworkManagerActive(PR_FALSE), +@@ -174,7 +172,9 @@ + PRBool + nsNetworkManagerListener::HandleMessage(DBusMessage* message) { + if (dbus_message_is_signal(message, NM_DBUS_INTERFACE, +- NM_DBUS_SIGNAL_STATE_CHANGE)) { ++ NM_DBUS_SIGNAL_STATE_CHANGE) || ++ dbus_message_is_signal(message, NM_DBUS_INTERFACE, ++ NM_DBUS_SIGNAL_STATE_CHANGED)) { + UpdateNetworkStatus(message); + return PR_TRUE; + } +@@ -191,7 +191,10 @@ + mNetworkManagerActive = PR_TRUE; + + PRBool wasUp = mLinkUp; +- mLinkUp = result == NM_STATE_CONNECTED; ++ mLinkUp = (result == NM_STATE_CONNECTED_OLD) || ++ (result == NM_STATE_CONNECTED_LOCAL) || ++ (result == NM_STATE_CONNECTED_SITE) || ++ (result == NM_STATE_CONNECTED_GLOBAL); + if (wasUp == mLinkUp) + return; + + diff --git a/xulrunner.spec b/xulrunner.spec index 1e5fc3a..02b9d73 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -91,6 +91,7 @@ Patch31: xulrunner-2.0-baddevice.patch Patch32: firefox-4.0-moz-app-launcher.patch Patch33: firefox-4.0-gnome3.patch Patch34: xulrunner-2.0-network-link-service.patch +Patch35: xulrunner-2.0-NetworkManager09.patch # --------------------------------------------------- @@ -196,6 +197,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch32 -p1 -b .moz-app-launcher %patch33 -p1 -b .gnome3 %patch34 -p1 -b .network-link-service +%patch35 -p1 -b .NetworkManager09 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From f3c3a331546fb15f228f1946c379817192b79222 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Mon, 4 Apr 2011 01:15:00 -0700 Subject: [PATCH 168/486] Let's do a -2 build with all the stuff that just got added, yay! --- xulrunner.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 02b9d73..981dd09 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -464,6 +464,11 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 4 2011 Christopher Aillon - 2.0-2 +- Fix SIGABRT in X_CloseDevice: XI_BadDevice +- Updates for NetworkManager 0.9 +- Updates for GNOME 3 + * Tue Mar 22 2011 Christopher Aillon - 2.0-1 - 2.0 From f69a239dc5588d110760b3ef15fc138fa82a4320 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sun, 10 Apr 2011 17:10:11 -0700 Subject: [PATCH 169/486] Don't claim network is offline until we've loaded the link service On version upgrades, we look for network earlier to check for extension updates. Since we haven't loaded the network link service at this point, we can't ask it, so assume it's off. This updates the patch for mozilla bug 627672 from v4 to v5. https://bugzilla.mozilla.org/show_bug.cgi?id=627672 --- xulrunner-2.0-network-link-service.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner-2.0-network-link-service.patch b/xulrunner-2.0-network-link-service.patch index f318b70..bdd1e2f 100644 --- a/xulrunner-2.0-network-link-service.patch +++ b/xulrunner-2.0-network-link-service.patch @@ -55,7 +55,7 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo NS_TIME_FUNCTION_MARK("Registered observers"); -@@ -257,32 +260,16 @@ nsIOService::Init() +@@ -257,32 +260,20 @@ nsIOService::Init() NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Was unable to allocate. No gBufferCache."); CallQueryInterface(recyclingAllocator, &gBufferCache); } @@ -69,7 +69,10 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo - if (XRE_GetProcessType() == GeckoProcessType_Default) -#endif - mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID); -- ++ // We can't really determine if the machine has a usable network connection, ++ // (mNetworkLinkService will be initialized later) so let's cross our fingers! ++ SetOffline(PR_FALSE); + - if (!mNetworkLinkService) - // We can't really determine if the machine has a usable network connection, - // so let's cross our fingers! From d06f46e99ea1eb9a311c96308e78c1153a2410f0 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sun, 10 Apr 2011 19:08:47 -0700 Subject: [PATCH 170/486] Eliminate deadlocks in ReleaseZip Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=637286 Upstream commit: http://hg.mozilla.org/releases/mozilla-2.0/rev/46171fccbeda Apply the deadlock patch before the omnijar patch; the latter is reviewed but not yet committed. Also, update the latter due to nearby changes. --- xulrunner-2.0-zip-deadlocks.patch | 195 ++++++++++++++++++++++++++++++ xulrunner-omnijar.patch | 6 +- xulrunner.spec | 6 +- 3 files changed, 202 insertions(+), 5 deletions(-) create mode 100644 xulrunner-2.0-zip-deadlocks.patch diff --git a/xulrunner-2.0-zip-deadlocks.patch b/xulrunner-2.0-zip-deadlocks.patch new file mode 100644 index 0000000..61d0020 --- /dev/null +++ b/xulrunner-2.0-zip-deadlocks.patch @@ -0,0 +1,195 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=637286 + +# HG changeset patch +# User Michael Wu +# Date 1301598072 14400 +# Node ID 46171fccbedad63dd408985d725422d69e2d7b1e +# Parent a2840fe77a5b168ba0244140bf142cec7b827c94 +Bug 637286 - Eliminate deadlocks in ReleaseZip, r=taras a=dveditz + +diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp +--- a/modules/libjar/nsJAR.cpp ++++ b/modules/libjar/nsJAR.cpp +@@ -166,16 +166,17 @@ nsrefcnt nsJAR::Release(void) + + NS_IMETHODIMP + nsJAR::Open(nsIFile* zipFile) + { + NS_ENSURE_ARG_POINTER(zipFile); + if (mLock) return NS_ERROR_FAILURE; // Already open! + + mZipFile = zipFile; ++ mOuterZipEntry.Truncate(); + + mLock = PR_NewLock(); + NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY); + + #ifdef MOZ_OMNIJAR + // The omnijar is special, it is opened early on and closed late + // this avoids reopening it + PRBool equals; +@@ -232,17 +233,16 @@ nsJAR::Close() + PR_DestroyLock(mLock); + mLock = nsnull; + } + + mParsedManifest = PR_FALSE; + mManifestData.Reset(); + mGlobalStatus = JAR_MANIFEST_NOT_PARSED; + mTotalItemsInManifest = 0; +- mOuterZipEntry.Truncate(0); + + #ifdef MOZ_OMNIJAR + if (mZip == mozilla::OmnijarReader()) { + mZip.forget(); + mZip = new nsZipArchive(); + return NS_OK; + } + #endif +@@ -1285,41 +1285,38 @@ nsZipReaderCache::ReleaseZip(nsJAR* zip) + // needs removing. + if (!oldest) + return NS_OK; + + #ifdef ZIP_CACHE_HIT_RATE + mZipCacheFlushes++; + #endif + +- // Clear the cache pointer in case we gave out this oldest guy while +- // his Release call was being made. Otherwise we could nest on ReleaseZip +- // when the second owner calls Release and we are still here in this lock. +- oldest->SetZipReaderCache(nsnull); +- + // remove from hashtable + nsCAutoString uri; + rv = oldest->GetJarPath(uri); + if (NS_FAILED(rv)) + return rv; + +- if (zip->mOuterZipEntry.IsEmpty()) { ++ if (oldest->mOuterZipEntry.IsEmpty()) { + uri.Insert(NS_LITERAL_CSTRING("file:"), 0); + } else { + uri.Insert(NS_LITERAL_CSTRING("jar:"), 0); + uri.AppendLiteral("!/"); +- uri.Append(zip->mOuterZipEntry); ++ uri.Append(oldest->mOuterZipEntry); + } + + nsCStringKey key(uri); +-#ifdef DEBUG +- PRBool removed = +-#endif +- mZips.Remove(&key); // Releases ++ nsRefPtr removed; ++ mZips.Remove(&key, (nsISupports **)removed.StartAssignment()); + NS_ASSERTION(removed, "botched"); ++ NS_ASSERTION(oldest == removed, "removed wrong entry"); ++ ++ if (removed) ++ removed->SetZipReaderCache(nsnull); + + return NS_OK; + } + + static PRBool + FindFlushableZip(nsHashKey *aKey, void *aData, void* closure) + { + nsHashKey** flushableKeyPtr = (nsHashKey**)closure; +diff --git a/modules/libjar/test/unit/data/test_bug637286.zip b/modules/libjar/test/unit/data/test_bug637286.zip +new file mode 100644 +index 0000000000000000000000000000000000000000..5dc8e747eaa212ae633bb24679f95d10c06cba8b +GIT binary patch +literal 12958 +zc%0>$OH7%;baNaewpuxSZVo +zeGK%aGwmjNY~J|v!p*@;w|;@w(baB_o6)hck?}%)a`f8JVAiB-3se2kH8hbiTj^ml +z;2PhB#-pEqF`tLm(UpeAmut17Rzpz>(rWPPNcjHs(M#`yZ;jVJ8VfJiCc?L`zjtk9 +zIIMj*G9G>aKY#bl$s6Ht?Ml9Vpsyv>nU>zA!`R19pG6;!-ZS|BJtqv@VbB_VzXhHb +z;Pdd&@8W&uCX>>~taK5rw}G{-%DP*$E;{QSVC|@~&WqM1XT1xoT~*dEi`Hdly$7s4 +zRn`U3y5g+&fwkWx);-Sp09XgAtc#*`ud_Y`)}bovl4xCZ)@E_4Kf3f-mqqJy&N>Cg +zDOJ`L(fYiz&VX@7m325N1X2tsD}Y*2Rn|RHSC=r5wn8_zs_N=q(Hi@@4UF4VSyx4C +z45V2w&Z@G$C|YA6&4F=Fm35zJje)cqjJun}8Utw_jPt6jUlpw}kQTtWpvt;mw8lVM +z0^^b@>(@kU45Vc+E;ora2GR-`S5#S_kOCSwAgw|-S5gbCi^a!cQMi$`4sf +zIqxVL4~6gMQ_AgjOL34D&!2_wj#J3ZVja)^%TC_Oer5fXeoFvZ5|5Wy`_}# +z4okrT$a*MzHxWf_8bKZV76h(zfW5V +z7Qmc`!dC|=W#bu3!2+1~Q24qNrTqP@rC ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++const Cc = Components.classes; ++const Ci = Components.interfaces; ++ ++// Check that the zip cache can expire entries from nested jars ++var ios = Cc["@mozilla.org/network/io-service;1"]. ++ getService(Ci.nsIIOService); ++ ++function open_inner_zip(base, idx) { ++ var spec = "jar:" + base + "inner" + idx + ".zip!/foo"; ++ var channel = ios.newChannel(spec, null, null); ++ var stream = channel.open(); ++} ++ ++function run_test() { ++ var file = do_get_file("data/test_bug637286.zip"); ++ var outerJarBase = "jar:" + ios.newFileURI(file).spec + "!/"; ++ ++ for (var i = 0; i < 40; i++) { ++ open_inner_zip(outerJarBase, i); ++ gc(); ++ } ++} ++ + + diff --git a/xulrunner-omnijar.patch b/xulrunner-omnijar.patch index 05b665a..66ec520 100644 --- a/xulrunner-omnijar.patch +++ b/xulrunner-omnijar.patch @@ -468,11 +468,11 @@ diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp --- a/modules/libjar/nsJAR.cpp +++ b/modules/libjar/nsJAR.cpp -@@ -170,26 +170,23 @@ nsJAR::Open(nsIFile* zipFile) - NS_ENSURE_ARG_POINTER(zipFile); +@@ -171,26 +171,23 @@ nsJAR::Open(nsIFile* zipFile) if (mLock) return NS_ERROR_FAILURE; // Already open! mZipFile = zipFile; + mOuterZipEntry.Truncate(); mLock = PR_NewLock(); NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY); @@ -499,13 +499,13 @@ diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp NS_ENSURE_ARG_POINTER(aZipReader); NS_ENSURE_ARG_POINTER(aZipEntry); @@ -234,23 +231,22 @@ nsJAR::Close() + mLock = nsnull; } mParsedManifest = PR_FALSE; mManifestData.Reset(); mGlobalStatus = JAR_MANIFEST_NOT_PARSED; mTotalItemsInManifest = 0; - mOuterZipEntry.Truncate(0); -#ifdef MOZ_OMNIJAR - if (mZip == mozilla::OmnijarReader()) { diff --git a/xulrunner.spec b/xulrunner.spec index 981dd09..60b2f6e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -86,12 +86,13 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches -Patch30: xulrunner-omnijar.patch +Patch30: xulrunner-2.0-zip-deadlocks.patch Patch31: xulrunner-2.0-baddevice.patch Patch32: firefox-4.0-moz-app-launcher.patch Patch33: firefox-4.0-gnome3.patch Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch +Patch36: xulrunner-omnijar.patch # --------------------------------------------------- @@ -192,12 +193,13 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -%patch30 -p1 -b .omnijar +%patch30 -p1 -b .zip-deadlocks %patch31 -p1 -b .baddevice %patch32 -p1 -b .moz-app-launcher %patch33 -p1 -b .gnome3 %patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 +%patch36 -p1 -b .omnijar %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 38886e79b2e7d00d4fca346f299ed874461acf4c Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sun, 10 Apr 2011 20:39:28 -0700 Subject: [PATCH 171/486] Bump release to -3 --- xulrunner.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 60b2f6e..a7bffa9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -466,6 +466,10 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Apr 10 2011 Christopher Aillon - 2.0-3 +- Fix offline status issue on version upgrades +- Fix a hang with 20+ extensions + * Mon Apr 4 2011 Christopher Aillon - 2.0-2 - Fix SIGABRT in X_CloseDevice: XI_BadDevice - Updates for NetworkManager 0.9 From 0dcb17abd5254174dde327800a25716276ade4fe Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 21 Apr 2011 11:13:55 -0700 Subject: [PATCH 172/486] Split out mozilla crashreporter symbols to its own debuginfo package These are symbols for mozilla.org's crashreporter server, and aren't needed for normal debuginfo usage. --- xulrunner.spec | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index a7bffa9..a30ba2a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -172,6 +172,24 @@ Requires: mesa-libGL-devel This package contains the libraries amd header files that are needed for writing XUL+XPCOM applications with Mozilla XULRunner and Gecko. +%if %{enable_mozilla_crashreporter} +%global moz_debug_prefix %{_prefix}/lib/debug +%global moz_debug_dir %{moz_debug_prefix}%{mozappdir} +%global symbols_file_name %{name}-%{version}.en-US.%{_os}-%{_arch}.crashreporter-symbols.zip +%global symbols_file_path %{moz_debug_dir}/%{symbols_file_name} +%global _find_debuginfo_opts -p %{symbols_file_path} -o debugcrashreporter.list +%global crashreporter_pkg_name mozilla-crashreporter-%{name}-debuginfo +%package -n %{crashreporter_pkg_name} +Summary: Debugging symbols used by Mozilla's crash reporter servers +Group: Development/Debug +%description -n %{crashreporter_pkg_name} +This package provides debug information for XULRunner, for use by +Mozilla's crash reporter servers. If you are trying to locally +debug %{name}, you want to install %{name}-debuginfo instead. +%files -n %{crashreporter_pkg_name} -f debugcrashreporter.list +%defattr(-,root,root) +%endif + #--------------------------------------------------------------------- %prep @@ -389,10 +407,8 @@ touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat # Add debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} -# Debug symbols are stored in /usr/lib even in x86_64 arch -DEBUG_LIB_DIR=`echo %{_libdir}|sed -e "s/lib64/lib/"` -mkdir -p $RPM_BUILD_ROOT$DEBUG_LIB_DIR/debug%{mozappdir} -cp dist/%{name}-%{version}*.crashreporter-symbols.zip $RPM_BUILD_ROOT$DEBUG_LIB_DIR/debug%{mozappdir} +%{__mkdir_p} $RPM_BUILD_ROOT/%{moz_debug_dir} +%{__cp} dist/%{symbols_file_name} $RPM_BUILD_ROOT/%{moz_debug_dir} %endif #--------------------------------------------------------------------- From f59e20acc5b4555f9160b6691371d61a4ba0e7ee Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 21 Apr 2011 14:27:18 -0700 Subject: [PATCH 173/486] Bump release to -4 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index a30ba2a..2d0d120 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -482,6 +482,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Apr 21 2011 Christopher Aillon - 2.0-4 +- Split out mozilla crashreporter symbols to its own debuginfo package + * Sun Apr 10 2011 Christopher Aillon - 2.0-3 - Fix offline status issue on version upgrades - Fix a hang with 20+ extensions From a11f08f79774817071be9119002d13553e9c9873 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 21 Apr 2011 15:17:34 -0700 Subject: [PATCH 174/486] Use uname -m for creating the symbols file name This matches what the makefile does. Noticed since %_arch is i386 on i686 machines. --- xulrunner.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2d0d120..0f2ea3f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -175,7 +175,8 @@ for writing XUL+XPCOM applications with Mozilla XULRunner and Gecko. %if %{enable_mozilla_crashreporter} %global moz_debug_prefix %{_prefix}/lib/debug %global moz_debug_dir %{moz_debug_prefix}%{mozappdir} -%global symbols_file_name %{name}-%{version}.en-US.%{_os}-%{_arch}.crashreporter-symbols.zip +%global uname_m %(uname -m) +%global symbols_file_name %{name}-%{version}.en-US.%{_os}-%{uname_m}.crashreporter-symbols.zip %global symbols_file_path %{moz_debug_dir}/%{symbols_file_name} %global _find_debuginfo_opts -p %{symbols_file_path} -o debugcrashreporter.list %global crashreporter_pkg_name mozilla-crashreporter-%{name}-debuginfo From 3c6f8e5e33bb9b9ea05e98f45cc3e5f6284f84fd Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 28 Apr 2011 21:23:36 -0700 Subject: [PATCH 175/486] 2.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner-2.0-baddevice.patch | 185 ---------------------------- xulrunner-2.0-zip-deadlocks.patch | 195 ------------------------------ xulrunner.spec | 11 +- 5 files changed, 7 insertions(+), 387 deletions(-) delete mode 100644 xulrunner-2.0-baddevice.patch delete mode 100644 xulrunner-2.0-zip-deadlocks.patch diff --git a/.gitignore b/.gitignore index df9d350..4408487 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0rc1.source.tar.bz2 /xulrunner-2.0rc2.source.tar.bz2 /xulrunner-2.0.source.tar.bz2 +/xulrunner-2.0.1.source.tar.bz2 diff --git a/sources b/sources index 5c6ca1b..17631ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3468a2c463b4fc2788ba621e4b511c30 xulrunner-2.0.source.tar.bz2 +9abda7d23151e97913c8555a64c13f34 xulrunner-2.0.1.source.tar.bz2 diff --git a/xulrunner-2.0-baddevice.patch b/xulrunner-2.0-baddevice.patch deleted file mode 100644 index e37ab9a..0000000 --- a/xulrunner-2.0-baddevice.patch +++ /dev/null @@ -1,185 +0,0 @@ -# HG changeset patch -# User Karl Tomlinson -# Date 1301024339 -46800 -# Node ID 06ca0535285e66ba87940ff245b78e9c1d14d956 -# Parent bf6532a3d889bae1d9f21d55c28729f41e69e87c -b=576933 use a separate display to make protocol requests within X error handler r=roc - -diff --git a/toolkit/xre/nsX11ErrorHandler.cpp b/toolkit/xre/nsX11ErrorHandler.cpp ---- a/toolkit/xre/nsX11ErrorHandler.cpp -+++ b/toolkit/xre/nsX11ErrorHandler.cpp -@@ -50,56 +50,58 @@ using mozilla::plugins::PluginProcessChi - - #include "mozilla/X11Util.h" - #include - - #define BUFSIZE 2048 // What Xlib uses with XGetErrorDatabaseText - - extern "C" { - static int --IgnoreError(Display *display, XErrorEvent *event) { -- return 0; // This return value is ignored. --} -- --static int - X11Error(Display *display, XErrorEvent *event) { - nsCAutoString notes; - char buffer[BUFSIZE]; - - // Get an indication of how long ago the request that caused the error was -- // made. Do this before querying extensions etc below. -+ // made. - unsigned long age = NextRequest(display) - event->serial; - -- // Ignore subsequent errors, which may get processed during the extension -- // queries below for example. -- XSetErrorHandler(IgnoreError); -- - // Get a string to represent the request that caused the error. - nsCAutoString message; - if (event->request_code < 128) { - // Core protocol request - message.AppendInt(event->request_code); - } else { - // Extension request -- int nExts; -- char** extNames = XListExtensions(display, &nExts); -- if (extNames) { -- for (int i = 0; i < nExts; ++i) { -- int major_opcode, first_event, first_error; -- if (XQueryExtension(display, extNames[i], -- &major_opcode, &first_event, &first_error) -- && major_opcode == event->request_code) { -- message.Append(extNames[i]); -- message.Append('.'); -- message.AppendInt(event->minor_code); -- break; -+ -+ // man XSetErrorHandler says "the error handler should not call any -+ // functions (directly or indirectly) on the display that will generate -+ // protocol requests or that will look for input events" so we use another -+ // temporary Display to request extension information. This assumes on -+ // the DISPLAY environment variable has been set and matches what was used -+ // to open |display|. -+ Display *tmpDisplay = XOpenDisplay(NULL); -+ if (tmpDisplay) { -+ int nExts; -+ char** extNames = XListExtensions(tmpDisplay, &nExts); -+ if (extNames) { -+ for (int i = 0; i < nExts; ++i) { -+ int major_opcode, first_event, first_error; -+ if (XQueryExtension(tmpDisplay, extNames[i], -+ &major_opcode, &first_event, &first_error) -+ && major_opcode == event->request_code) { -+ message.Append(extNames[i]); -+ message.Append('.'); -+ message.AppendInt(event->minor_code); -+ break; -+ } - } -+ -+ XFreeExtensionList(extNames); - } -- -- XFreeExtensionList(extNames); -+ XCloseDisplay(tmpDisplay); - } - } - - if (message.IsEmpty()) { - buffer[0] = '\0'; - } else { - XGetErrorDatabaseText(display, "XRequest", message.get(), "", - buffer, sizeof(buffer)); - - -# HG changeset patch -# User Karl Tomlinson -# Date 1301024339 -46800 -# Node ID 286410eeba47b4b9a8ec8e18779ee10a7b312f1e -# Parent 06ca0535285e66ba87940ff245b78e9c1d14d956 -b=576933 ignore BadDevice errors from XCloseDevice (for GDK2) r=roc - -diff --git a/toolkit/xre/nsX11ErrorHandler.cpp b/toolkit/xre/nsX11ErrorHandler.cpp ---- a/toolkit/xre/nsX11ErrorHandler.cpp -+++ b/toolkit/xre/nsX11ErrorHandler.cpp -@@ -51,19 +51,16 @@ using mozilla::plugins::PluginProcessChi - #include "mozilla/X11Util.h" - #include - - #define BUFSIZE 2048 // What Xlib uses with XGetErrorDatabaseText - - extern "C" { - static int - X11Error(Display *display, XErrorEvent *event) { -- nsCAutoString notes; -- char buffer[BUFSIZE]; -- - // Get an indication of how long ago the request that caused the error was - // made. - unsigned long age = NextRequest(display) - event->serial; - - // Get a string to represent the request that caused the error. - nsCAutoString message; - if (event->request_code < 128) { - // Core protocol request -@@ -76,42 +73,56 @@ X11Error(Display *display, XErrorEvent * - // protocol requests or that will look for input events" so we use another - // temporary Display to request extension information. This assumes on - // the DISPLAY environment variable has been set and matches what was used - // to open |display|. - Display *tmpDisplay = XOpenDisplay(NULL); - if (tmpDisplay) { - int nExts; - char** extNames = XListExtensions(tmpDisplay, &nExts); -+ int first_error; - if (extNames) { - for (int i = 0; i < nExts; ++i) { -- int major_opcode, first_event, first_error; -+ int major_opcode, first_event; - if (XQueryExtension(tmpDisplay, extNames[i], - &major_opcode, &first_event, &first_error) - && major_opcode == event->request_code) { - message.Append(extNames[i]); - message.Append('.'); - message.AppendInt(event->minor_code); - break; - } - } - - XFreeExtensionList(extNames); - } - XCloseDisplay(tmpDisplay); -+ -+#ifdef MOZ_WIDGET_GTK2 -+ // GDK2 calls XCloseDevice the devices that it opened on startup, but -+ // the XI protocol no longer ensures that the devices will still exist. -+ // If they have been removed, then a BadDevice error results. Ignore -+ // this error. -+ if (message.EqualsLiteral("XInputExtension.4") && -+ event->error_code == first_error + 0) { -+ return 0; -+ } -+#endif - } - } - -+ char buffer[BUFSIZE]; - if (message.IsEmpty()) { - buffer[0] = '\0'; - } else { - XGetErrorDatabaseText(display, "XRequest", message.get(), "", - buffer, sizeof(buffer)); - } - -+ nsCAutoString notes; - if (buffer[0]) { - notes.Append(buffer); - } else { - notes.Append("Request "); - notes.AppendInt(event->request_code); - notes.Append('.'); - notes.AppendInt(event->minor_code); - } - - diff --git a/xulrunner-2.0-zip-deadlocks.patch b/xulrunner-2.0-zip-deadlocks.patch deleted file mode 100644 index 61d0020..0000000 --- a/xulrunner-2.0-zip-deadlocks.patch +++ /dev/null @@ -1,195 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=637286 - -# HG changeset patch -# User Michael Wu -# Date 1301598072 14400 -# Node ID 46171fccbedad63dd408985d725422d69e2d7b1e -# Parent a2840fe77a5b168ba0244140bf142cec7b827c94 -Bug 637286 - Eliminate deadlocks in ReleaseZip, r=taras a=dveditz - -diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp ---- a/modules/libjar/nsJAR.cpp -+++ b/modules/libjar/nsJAR.cpp -@@ -166,16 +166,17 @@ nsrefcnt nsJAR::Release(void) - - NS_IMETHODIMP - nsJAR::Open(nsIFile* zipFile) - { - NS_ENSURE_ARG_POINTER(zipFile); - if (mLock) return NS_ERROR_FAILURE; // Already open! - - mZipFile = zipFile; -+ mOuterZipEntry.Truncate(); - - mLock = PR_NewLock(); - NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY); - - #ifdef MOZ_OMNIJAR - // The omnijar is special, it is opened early on and closed late - // this avoids reopening it - PRBool equals; -@@ -232,17 +233,16 @@ nsJAR::Close() - PR_DestroyLock(mLock); - mLock = nsnull; - } - - mParsedManifest = PR_FALSE; - mManifestData.Reset(); - mGlobalStatus = JAR_MANIFEST_NOT_PARSED; - mTotalItemsInManifest = 0; -- mOuterZipEntry.Truncate(0); - - #ifdef MOZ_OMNIJAR - if (mZip == mozilla::OmnijarReader()) { - mZip.forget(); - mZip = new nsZipArchive(); - return NS_OK; - } - #endif -@@ -1285,41 +1285,38 @@ nsZipReaderCache::ReleaseZip(nsJAR* zip) - // needs removing. - if (!oldest) - return NS_OK; - - #ifdef ZIP_CACHE_HIT_RATE - mZipCacheFlushes++; - #endif - -- // Clear the cache pointer in case we gave out this oldest guy while -- // his Release call was being made. Otherwise we could nest on ReleaseZip -- // when the second owner calls Release and we are still here in this lock. -- oldest->SetZipReaderCache(nsnull); -- - // remove from hashtable - nsCAutoString uri; - rv = oldest->GetJarPath(uri); - if (NS_FAILED(rv)) - return rv; - -- if (zip->mOuterZipEntry.IsEmpty()) { -+ if (oldest->mOuterZipEntry.IsEmpty()) { - uri.Insert(NS_LITERAL_CSTRING("file:"), 0); - } else { - uri.Insert(NS_LITERAL_CSTRING("jar:"), 0); - uri.AppendLiteral("!/"); -- uri.Append(zip->mOuterZipEntry); -+ uri.Append(oldest->mOuterZipEntry); - } - - nsCStringKey key(uri); --#ifdef DEBUG -- PRBool removed = --#endif -- mZips.Remove(&key); // Releases -+ nsRefPtr removed; -+ mZips.Remove(&key, (nsISupports **)removed.StartAssignment()); - NS_ASSERTION(removed, "botched"); -+ NS_ASSERTION(oldest == removed, "removed wrong entry"); -+ -+ if (removed) -+ removed->SetZipReaderCache(nsnull); - - return NS_OK; - } - - static PRBool - FindFlushableZip(nsHashKey *aKey, void *aData, void* closure) - { - nsHashKey** flushableKeyPtr = (nsHashKey**)closure; -diff --git a/modules/libjar/test/unit/data/test_bug637286.zip b/modules/libjar/test/unit/data/test_bug637286.zip -new file mode 100644 -index 0000000000000000000000000000000000000000..5dc8e747eaa212ae633bb24679f95d10c06cba8b -GIT binary patch -literal 12958 -zc%0>$OH7%;baNaewpuxSZVo -zeGK%aGwmjNY~J|v!p*@;w|;@w(baB_o6)hck?}%)a`f8JVAiB-3se2kH8hbiTj^ml -z;2PhB#-pEqF`tLm(UpeAmut17Rzpz>(rWPPNcjHs(M#`yZ;jVJ8VfJiCc?L`zjtk9 -zIIMj*G9G>aKY#bl$s6Ht?Ml9Vpsyv>nU>zA!`R19pG6;!-ZS|BJtqv@VbB_VzXhHb -z;Pdd&@8W&uCX>>~taK5rw}G{-%DP*$E;{QSVC|@~&WqM1XT1xoT~*dEi`Hdly$7s4 -zRn`U3y5g+&fwkWx);-Sp09XgAtc#*`ud_Y`)}bovl4xCZ)@E_4Kf3f-mqqJy&N>Cg -zDOJ`L(fYiz&VX@7m325N1X2tsD}Y*2Rn|RHSC=r5wn8_zs_N=q(Hi@@4UF4VSyx4C -z45V2w&Z@G$C|YA6&4F=Fm35zJje)cqjJun}8Utw_jPt6jUlpw}kQTtWpvt;mw8lVM -z0^^b@>(@kU45Vc+E;ora2GR-`S5#S_kOCSwAgw|-S5gbCi^a!cQMi$`4sf -zIqxVL4~6gMQ_AgjOL34D&!2_wj#J3ZVja)^%TC_Oer5fXeoFvZ5|5Wy`_}# -z4okrT$a*MzHxWf_8bKZV76h(zfW5V -z7Qmc`!dC|=W#bu3!2+1~Q24qNrTqP@rC -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+const Cc = Components.classes; -+const Ci = Components.interfaces; -+ -+// Check that the zip cache can expire entries from nested jars -+var ios = Cc["@mozilla.org/network/io-service;1"]. -+ getService(Ci.nsIIOService); -+ -+function open_inner_zip(base, idx) { -+ var spec = "jar:" + base + "inner" + idx + ".zip!/foo"; -+ var channel = ios.newChannel(spec, null, null); -+ var stream = channel.open(); -+} -+ -+function run_test() { -+ var file = do_get_file("data/test_bug637286.zip"); -+ var outerJarBase = "jar:" + ios.newFileURI(file).spec + "!/"; -+ -+ for (var i = 0; i < 40; i++) { -+ open_inner_zip(outerJarBase, i); -+ gc(); -+ } -+} -+ - - diff --git a/xulrunner.spec b/xulrunner.spec index 0f2ea3f..ab9b29c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -59,8 +59,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 2.0 -Release: 4%{?pre_tag}%{?dist} +Version: 2.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -86,8 +86,6 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches -Patch30: xulrunner-2.0-zip-deadlocks.patch -Patch31: xulrunner-2.0-baddevice.patch Patch32: firefox-4.0-moz-app-launcher.patch Patch33: firefox-4.0-gnome3.patch Patch34: xulrunner-2.0-network-link-service.patch @@ -212,8 +210,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -%patch30 -p1 -b .zip-deadlocks -%patch31 -p1 -b .baddevice %patch32 -p1 -b .moz-app-launcher %patch33 -p1 -b .gnome3 %patch34 -p1 -b .network-link-service @@ -483,6 +479,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Apr 28 2011 Christopher Aillon - 2.0.1-1 +- 2.0.1 + * Thu Apr 21 2011 Christopher Aillon - 2.0-4 - Split out mozilla crashreporter symbols to its own debuginfo package From 33d5afaf974f3e51fe5a9b39b27e29fbf984f4d7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 26 May 2011 14:38:46 +0200 Subject: [PATCH 176/486] Rebuild for new hunspell (rhbz#707760) --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ab9b29c..2260a2d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 2.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -479,6 +479,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 26 2010 Martin Stransky 2.0.1-2 +- Rebuild for new hunspell (rhbz#707760) + * Thu Apr 28 2011 Christopher Aillon - 2.0.1-1 - 2.0.1 From 7e6097986d427cf7ce8c6bfd8f80bb4c2d495daa Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 26 May 2011 14:39:34 +0200 Subject: [PATCH 177/486] changelog fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2260a2d..f654c11 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -479,7 +479,7 @@ fi #--------------------------------------------------------------------- %changelog -* Thu May 26 2010 Martin Stransky 2.0.1-2 +* Thu May 26 2011 Martin Stransky 2.0.1-2 - Rebuild for new hunspell (rhbz#707760) * Thu Apr 28 2011 Christopher Aillon - 2.0.1-1 From eb1d55c5818402ddf5c0629be551c82733af8c63 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Jun 2011 15:40:38 +0200 Subject: [PATCH 178/486] Update to 5.0 --- .gitignore | 1 + sources | 2 +- xulrunner-2.0-64bit-big-endian.patch | 13 - xulrunner-2.0-network-link-service.patch | 171 +-- xulrunner-mozconfig | 2 + ...omnijar.patch => xulrunner-omnijar-5.patch | 1089 +++++------------ xulrunner.spec | 31 +- 7 files changed, 384 insertions(+), 925 deletions(-) delete mode 100644 xulrunner-2.0-64bit-big-endian.patch rename xulrunner-omnijar.patch => xulrunner-omnijar-5.patch (67%) diff --git a/.gitignore b/.gitignore index 4408487..f3b6562 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0rc2.source.tar.bz2 /xulrunner-2.0.source.tar.bz2 /xulrunner-2.0.1.source.tar.bz2 +/xulrunner-5.0.source.tar.bz2 diff --git a/sources b/sources index 17631ad..8dd1d26 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9abda7d23151e97913c8555a64c13f34 xulrunner-2.0.1.source.tar.bz2 +9f64a01e86a5d424e12a8e3305c5debe xulrunner-5.0.source.tar.bz2 diff --git a/xulrunner-2.0-64bit-big-endian.patch b/xulrunner-2.0-64bit-big-endian.patch deleted file mode 100644 index 8cf3fc9..0000000 --- a/xulrunner-2.0-64bit-big-endian.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=627664 - -diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian xulrunner-2.0/mozilla-central/js/src/jsval.h ---- xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian 2011-01-20 15:59:49.000000000 +0100 -+++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2011-01-20 16:00:21.000000000 +0100 -@@ -347,6 +347,7 @@ typedef union jsval_layout - int32 i32; - uint32 u32; - JSWhyMagic why; -+ jsuword word; - } payload; - } s; - double asDouble; diff --git a/xulrunner-2.0-network-link-service.patch b/xulrunner-2.0-network-link-service.patch index bdd1e2f..2199d83 100644 --- a/xulrunner-2.0-network-link-service.patch +++ b/xulrunner-2.0-network-link-service.patch @@ -1,14 +1,7 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=627672 - -diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mozilla-2.0/netwerk/base/src/nsIOService.cpp ---- mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service 2011-03-18 16:34:03.000000000 -0700 -+++ mozilla-2.0/netwerk/base/src/nsIOService.cpp 2011-04-03 21:40:34.787142329 -0700 -@@ -160,31 +160,33 @@ PRInt16 gBadPortList[] = { - 2049, // nfs - 4045, // lockd - 6000, // x11 - 0, // This MUST be zero so that we can populating the array - }; +diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network-link-service xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp +--- xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network-link-service 2011-06-15 23:57:41.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp 2011-06-21 14:04:16.798060709 +0200 +@@ -165,6 +165,7 @@ PRInt16 gBadPortList[] = { static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardown"; static const char kProfileChangeNetRestoreTopic[] = "profile-change-net-restore"; @@ -16,15 +9,7 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo // Necko buffer cache nsIMemory* nsIOService::gBufferCache = nsnull; - PRUint32 nsIOService::gDefaultSegmentSize = 4096; - PRUint32 nsIOService::gDefaultSegmentCount = 24; - - //////////////////////////////////////////////////////////////////////////////// - - nsIOService::nsIOService() - : mOffline(PR_TRUE) - , mOfflineForProfileChange(PR_FALSE) - , mManageOfflineStatus(PR_TRUE) +@@ -180,6 +181,7 @@ nsIOService::nsIOService() , mSettingOffline(PR_FALSE) , mSetOfflineValue(PR_FALSE) , mShutdown(PR_FALSE) @@ -32,17 +17,7 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo , mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY) , mContentSniffers(NS_CONTENT_SNIFFER_CATEGORY) { - } - - nsresult - nsIOService::Init() - { -@@ -229,16 +231,17 @@ nsIOService::Init() - } - - // Register for profile change notifications - nsCOMPtr observerService = - mozilla::services::GetObserverService(); +@@ -234,6 +236,7 @@ nsIOService::Init() if (observerService) { observerService->AddObserver(this, kProfileChangeNetTeardownTopic, PR_TRUE); observerService->AddObserver(this, kProfileChangeNetRestoreTopic, PR_TRUE); @@ -50,29 +25,14 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE); observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, PR_TRUE); } - else - NS_WARNING("failed to get observer service"); - - NS_TIME_FUNCTION_MARK("Registered observers"); - -@@ -257,32 +260,20 @@ nsIOService::Init() - NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Was unable to allocate. No gBufferCache."); - CallQueryInterface(recyclingAllocator, &gBufferCache); - } - - NS_TIME_FUNCTION_MARK("Set up the recycling allocator"); +@@ -262,19 +265,9 @@ nsIOService::Init() gIOService = this; --#ifdef MOZ_IPC - // go into managed mode if we can, and chrome process - if (XRE_GetProcessType() == GeckoProcessType_Default) --#endif - mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID); -+ // We can't really determine if the machine has a usable network connection, -+ // (mNetworkLinkService will be initialized later) so let's cross our fingers! -+ SetOffline(PR_FALSE); - +- - if (!mNetworkLinkService) - // We can't really determine if the machine has a usable network connection, - // so let's cross our fingers! @@ -82,21 +42,13 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo - TrackNetworkLinkStatusForOffline(); - else - SetOffline(PR_FALSE); -- ++ // We can't really determine if the machine has a usable network connection, ++ // (mNetworkLinkService will be initialized later) so let's cross our fingers! ++ SetOffline(PR_FALSE); + NS_TIME_FUNCTION_MARK("Set up network link service"); - return NS_OK; - } - - - nsIOService::~nsIOService() - { -@@ -306,16 +293,54 @@ nsIOService::InitializeSocketTransportSe - if (mSocketTransportService) { - rv = mSocketTransportService->Init(); - NS_ASSERTION(NS_SUCCEEDED(rv), "socket transport service init failed"); - } - +@@ -309,6 +302,47 @@ nsIOService::InitializeSocketTransportSe return rv; } @@ -110,10 +62,12 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo + if (mNetworkLinkServiceInitialized) + return rv; + -+#ifdef MOZ_IPC ++#if defined(MOZ_PLATFORM_MAEMO) ++ // libdbusservice fails to initialize on Maemo platform, see Bug 627672 ++ mNetworkLinkService = NULL; ++#else + // go into managed mode if we can, and chrome process + if (XRE_GetProcessType() == GeckoProcessType_Default) -+#endif + { + mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID, &rv); + if (NS_FAILED(rv)) { @@ -121,7 +75,8 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo + return rv; + } + } -+ ++#endif ++ + mNetworkLinkServiceInitialized = PR_TRUE; + + if (!mNetworkLinkService) { @@ -141,17 +96,7 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo nsIOService* nsIOService::GetInstance() { if (!gIOService) { - gIOService = new nsIOService(); - if (!gIOService) - return nsnull; - NS_ADDREF(gIOService); - -@@ -658,16 +683,19 @@ nsIOService::NewChannel(const nsACString - if (NS_FAILED(rv)) return rv; - - return NewChannelFromURI(uri, result); - } - +@@ -682,6 +716,9 @@ nsIOService::NewChannel(const nsACString PRBool nsIOService::IsLinkUp() { @@ -161,17 +106,7 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo if (!mNetworkLinkService) { // We cannot decide, assume the link is up return PR_TRUE; - } - - PRBool isLinkUp; - nsresult rv; - rv = mNetworkLinkService->GetIsLinkUp(&isLinkUp); -@@ -938,16 +966,20 @@ nsIOService::Observe(nsISupports *subjec - if (mOfflineForProfileChange) { - mOfflineForProfileChange = PR_FALSE; - if (!mManageOfflineStatus || - NS_FAILED(TrackNetworkLinkStatusForOffline())) { - SetOffline(PR_FALSE); +@@ -960,6 +997,10 @@ nsIOService::Observe(nsISupports *subjec } } } @@ -182,40 +117,19 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { // Remember we passed XPCOM shutdown notification to prevent any // changes of the offline status from now. We must not allow going - // online after this point. - mShutdown = PR_TRUE; - - SetOffline(PR_TRUE); - -@@ -1055,32 +1087,42 @@ nsIOService::NewSimpleNestedURI(nsIURI* - NS_IF_ADDREF(*aResult = new nsSimpleNestedURI(safeURI)); - return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY; - } - - NS_IMETHODIMP +@@ -1077,6 +1118,11 @@ NS_IMETHODIMP nsIOService::SetManageOfflineStatus(PRBool aManage) { PRBool wasManaged = mManageOfflineStatus; mManageOfflineStatus = aManage; + + if (!mNetworkLinkServiceInitialized) { -+ nsresult rv = InitializeNetworkLinkService(); -+ if (NS_FAILED(rv)) -+ return rv; ++ InitializeNetworkLinkService(); + } -+ ++ if (mManageOfflineStatus && !wasManaged) return TrackNetworkLinkStatusForOffline(); return NS_OK; - } - - NS_IMETHODIMP - nsIOService::GetManageOfflineStatus(PRBool* aManage) { - *aManage = mManageOfflineStatus; - return NS_OK; - } - - nsresult - nsIOService::TrackNetworkLinkStatusForOffline() +@@ -1093,6 +1139,9 @@ nsIOService::TrackNetworkLinkStatusForOf { NS_ASSERTION(mManageOfflineStatus, "Don't call this unless we're managing the offline status"); @@ -225,20 +139,10 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.cpp.network-link-service mo if (!mNetworkLinkService) return NS_ERROR_FAILURE; - if (mShutdown) - return NS_ERROR_NOT_AVAILABLE; - - // check to make sure this won't collide with Autodial - if (mSocketTransportService) { -diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.h.network-link-service mozilla-2.0/netwerk/base/src/nsIOService.h ---- mozilla-2.0/netwerk/base/src/nsIOService.h.network-link-service 2011-03-18 16:34:03.000000000 -0700 -+++ mozilla-2.0/netwerk/base/src/nsIOService.h 2011-04-03 21:34:34.608645179 -0700 -@@ -129,16 +129,17 @@ private: - nsIProtocolHandler* hdlr); - - // Prefs wrangling - NS_HIDDEN_(void) PrefsChanged(nsIPrefBranch *prefs, const char *pref = nsnull); - NS_HIDDEN_(void) GetPrefBranch(nsIPrefBranch2 **); +diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h.network-link-service xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h +--- xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h.network-link-service 2011-06-15 23:57:41.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h 2011-06-21 13:59:23.147215108 +0200 +@@ -134,6 +134,7 @@ private: NS_HIDDEN_(void) ParsePortList(nsIPrefBranch *prefBranch, const char *pref, PRBool remove); nsresult InitializeSocketTransportService(); @@ -246,17 +150,7 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.h.network-link-service mozi private: PRPackedBool mOffline; - PRPackedBool mOfflineForProfileChange; - PRPackedBool mManageOfflineStatus; - - // Used to handle SetOffline() reentrancy. See the comment in - // SetOffline() for more details. -@@ -146,16 +147,17 @@ private: - PRPackedBool mSetOfflineValue; - - PRPackedBool mShutdown; - - nsCOMPtr mSocketTransportService; +@@ -151,6 +152,7 @@ private: nsCOMPtr mDNSService; nsCOMPtr mProxyService; nsCOMPtr mNetworkLinkService; @@ -264,8 +158,3 @@ diff -p -U8 mozilla-2.0/netwerk/base/src/nsIOService.h.network-link-service mozi // Cached protocol handlers nsWeakPtr mWeakHandler[NS_N(gScheme)]; - - // cached categories - nsCategoryCache mChannelEventSinks; - nsCategoryCache mContentSniffers; - diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 073dabd..9391b82 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -37,6 +37,8 @@ ac_add_options --enable-shared-js ac_add_options --enable-url-classifier ac_add_options --enable-gio ac_add_options --disable-gnomevfs +ac_add_options --disable-updater +ac_add_options --enable-chrome-format=omni export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner-omnijar.patch b/xulrunner-omnijar-5.patch similarity index 67% rename from xulrunner-omnijar.patch rename to xulrunner-omnijar-5.patch index 66ec520..f214e8d 100644 --- a/xulrunner-omnijar.patch +++ b/xulrunner-omnijar-5.patch @@ -1,107 +1,7 @@ -# HG changeset patch -# Parent a7dea879b4b445a23186f438900562155bb39e99 -Bug 620931 part 1 - Use chrome manifest to register resource://gre-resources/ - -diff --git a/layout/style/jar.mn b/layout/style/jar.mn ---- a/layout/style/jar.mn -+++ b/layout/style/jar.mn -@@ -1,8 +1,10 @@ - toolkit.jar: - * res/ua.css (ua.css) - res/html.css (html.css) - res/quirk.css (quirk.css) - res/viewsource.css (viewsource.css) - * res/forms.css (forms.css) - res/arrow.gif (arrow.gif) - res/arrowd.gif (arrowd.gif) -+ -+% resource gre-resources %res/ -diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp ---- a/netwerk/protocol/res/nsResProtocolHandler.cpp -+++ b/netwerk/protocol/res/nsResProtocolHandler.cpp -@@ -75,17 +75,16 @@ static nsResProtocolHandler *gResHandler - // - // this enables PR_LOG_ALWAYS level information and places all output in - // the file log.txt - // - static PRLogModuleInfo *gResLog; - #endif - - #define kGRE NS_LITERAL_CSTRING("gre") --#define kGRE_RESOURCES NS_LITERAL_CSTRING("gre-resources") - - //---------------------------------------------------------------------------- - // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution - //---------------------------------------------------------------------------- - - nsresult - nsResURL::EnsureFile() - { -@@ -197,28 +196,16 @@ nsResProtocolHandler::Init() - NS_ENSURE_SUCCESS(rv, rv); - - // - // make resource://gre/ point to the GRE directory - // - rv = AddSpecialDir(NS_GRE_DIR, kGRE); - NS_ENSURE_SUCCESS(rv, rv); - -- // make resource://gre-resources/ point to gre toolkit[.jar]/res -- nsCOMPtr greURI; -- nsCOMPtr greResURI; -- GetSubstitution(kGRE, getter_AddRefs(greURI)); --#ifdef MOZ_CHROME_FILE_FORMAT_JAR -- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "jar:chrome/toolkit.jar!/res/"); --#else -- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "chrome/toolkit/res/"); --#endif -- rv = mIOService->NewURI(strGRE_RES_URL, nsnull, greURI, -- getter_AddRefs(greResURI)); -- SetSubstitution(kGRE_RESOURCES, greResURI); - //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir... - // but once I finish multiple chrome registration I'm not sure that it is needed - - // XXX dveditz: resource://pchrome/ defeats profile directory salting - // if web content can load it. Tread carefully. - - return rv; - } -@@ -242,22 +229,16 @@ nsResProtocolHandler::Init(nsIFile *aOmn - // these entries should be kept in sync with the normal Init function - - // resource:/// points to jar:omni.jar!/ - SetSubstitution(EmptyCString(), uri); - - // resource://gre/ points to jar:omni.jar!/ - SetSubstitution(kGRE, uri); - -- urlStr += "chrome/toolkit/res/"; -- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- // resource://gre-resources/ points to jar:omni.jar!/chrome/toolkit/res/ -- SetSubstitution(kGRE_RESOURCES, uri); - return NS_OK; - } - #endif - - #ifdef MOZ_IPC - static PLDHashOperator - EnumerateSubstitution(const nsACString& aKey, - nsIURI* aURI, -# HG changeset patch -# Parent 3038cccba1a071d6b418e15442d0f2d9f3dcb11d -Bug 620931 part 2 - When building --with-libxul-sdk, use the right preferences directory - -diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in ---- a/browser/locales/Makefile.in -+++ b/browser/locales/Makefile.in -@@ -183,17 +183,17 @@ install:: $(addsuffix .xml,$(SEARCH_PLUG - $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins - - - libs-%: - $(NSINSTALL) -D $(DIST)/install +diff -up xulrunner-5.0/mozilla-release/browser/locales/Makefile.in.omnijar xulrunner-5.0/mozilla-release/browser/locales/Makefile.in +--- xulrunner-5.0/mozilla-release/browser/locales/Makefile.in.omnijar 2011-06-15 23:57:18.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/browser/locales/Makefile.in 2011-06-21 13:16:56.434904620 +0200 +@@ -186,7 +186,7 @@ libs-%: @$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1 @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 @@ -110,65 +10,10 @@ diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 - repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe" - repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES) - @echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)." - $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export - $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx -diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk ---- a/toolkit/mozapps/installer/packager.mk -+++ b/toolkit/mozapps/installer/packager.mk -@@ -307,17 +307,17 @@ OMNIJAR_FILES = \ - res \ - defaults \ - greprefs.js \ - jsloader \ - $(NULL) - - NON_OMNIJAR_FILES += \ - chrome/icons/\* \ -- defaults/pref/channel-prefs.js \ -+ $(PREF_DIR)/channel-prefs.js \ - res/cursors/\* \ - res/MainMenu.nib/\* \ - $(NULL) - - PACK_OMNIJAR = \ - rm -f omni.jar components/binary.manifest && \ - grep -h '^binary-component' components/*.manifest > binary.manifest ; \ - sed -e 's/^binary-component/\#binary-component/' components/components.manifest > components.manifest && \ -# HG changeset patch -# Parent cd8df8030f7ad7530692bd7c4391a8009df56a02 -Bug 620931 part 3 - Allow GRE and XUL application to use omni.jar independently - -We now store two independent locations for an omni.jar, allowing GRE/XRE and -XUL application to each have their own omni.jar. And since xulrunner setups -are very independent from the XUL applications, we implement support for both -omni.jar and non omni.jar cases in the same runtime, with the side effect of -allowing to switch from one to the other manually without rebuilding the -binaries. - -We let the mozilla::Omnijar API handle both cases, so that callers don't need -too much work to support them. - -We also make the preferences service load the same set of preferences in all -the various cases (unified vs. separate, omni.jar vs. no omni.jar). - -The child process launcher for IPC is modified to pass the base directories -needed for the mozilla::Omnijar API initialization in the child process. - -Finally, the startupcache file name canonicalization is modified to separate -APP and GRE resources. - -diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp ---- a/ipc/glue/GeckoChildProcessHost.cpp -+++ b/ipc/glue/GeckoChildProcessHost.cpp -@@ -440,26 +440,29 @@ GeckoChildProcessHost::PerformAsyncLaunc - // other end of the socketpair() from us - - std::vector childArgv; - - childArgv.push_back(exePath.value()); +diff -up xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp.omnijar xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp +--- xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp.omnijar 2011-06-15 23:57:27.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp 2011-06-21 12:46:33.537167186 +0200 +@@ -492,16 +492,19 @@ GeckoChildProcessHost::PerformAsyncLaunc childArgv.insert(childArgv.end(), aExtraOpts.begin(), aExtraOpts.end()); @@ -185,27 +30,17 @@ diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost + if (file && NS_SUCCEEDED(file->GetNativePath(path))) { + childArgv.push_back("-grebase"); + childArgv.push_back(path.get()); - } --#endif ++ } + file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP); + if (file && NS_SUCCEEDED(file->GetNativePath(path))) { + childArgv.push_back("-appbase"); + childArgv.push_back(path.get()); -+ } + } +-#endif childArgv.push_back(pidstring); - #if defined(MOZ_CRASHREPORTER) - # if defined(OS_LINUX) - int childCrashFd, childCrashRemapFd; - if (!CrashReporter::CreateNotificationPipeForChild( - &childCrashFd, &childCrashRemapFd)) -@@ -552,26 +555,29 @@ GeckoChildProcessHost::PerformAsyncLaunc - for (std::vector::iterator it = aExtraOpts.begin(); - it != aExtraOpts.end(); - ++it) { - cmdLine.AppendLooseValue(UTF8ToWide(*it)); - } +@@ -604,16 +607,19 @@ GeckoChildProcessHost::PerformAsyncLaunc cmdLine.AppendLooseValue(std::wstring(mGroupId.get())); @@ -222,30 +57,20 @@ diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost + if (file && NS_SUCCEEDED(file->GetPath(path))) { + cmdLine.AppendLooseValue(UTF8ToWide("-grebase")); + cmdLine.AppendLooseValue(path.get()); - } --#endif ++ } + file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP); + if (file && NS_SUCCEEDED(file->GetPath(path))) { + cmdLine.AppendLooseValue(UTF8ToWide("-appbase")); + cmdLine.AppendLooseValue(path.get()); -+ } + } +-#endif cmdLine.AppendLooseValue(UTF8ToWide(pidstring)); - #if defined(MOZ_CRASHREPORTER) - cmdLine.AppendLooseValue( - UTF8ToWide(CrashReporter::GetChildNotificationPipe())); - #endif - -diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect/loader/mozJSComponentLoader.cpp ---- a/js/src/xpconnect/loader/mozJSComponentLoader.cpp -+++ b/js/src/xpconnect/loader/mozJSComponentLoader.cpp -@@ -81,16 +81,17 @@ - #include "nsIConsoleService.h" - #include "nsIStorageStream.h" - #include "nsIStringStream.h" - #include "prmem.h" - #if defined(XP_WIN) +diff -up xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp.omnijar xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp +--- xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp.omnijar 2011-06-15 23:57:31.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp 2011-06-21 13:34:03.057293901 +0200 +@@ -86,6 +86,7 @@ #include "nsILocalFileWin.h" #endif #include "xpcprivate.h" @@ -253,17 +78,7 @@ diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect #ifdef MOZ_ENABLE_LIBXUL #include "mozilla/scache/StartupCache.h" - #include "mozilla/scache/StartupCacheUtils.h" - #endif - #include "mozilla/Omnijar.h" - - #include "jsdbgapi.h" -@@ -621,34 +622,21 @@ mozJSComponentLoader::LoadModule(nsILoca - - const mozilla::Module* - mozJSComponentLoader::LoadModuleFromJAR(nsILocalFile *aJarFile, - const nsACString &aComponentPath) - { +@@ -626,24 +627,11 @@ mozJSComponentLoader::LoadModuleFromJAR( #if !defined(XPCONNECT_STANDALONE) nsresult rv; @@ -293,18 +108,8 @@ diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect fullSpec += aComponentPath; nsCOMPtr uri; - rv = NS_NewURI(getter_AddRefs(uri), fullSpec); - if (NS_FAILED(rv)) - return NULL; - - nsAutoString hashstring; -@@ -833,57 +821,138 @@ class JSScriptHolder - JSScriptHolder(JSContext *cx, JSScript *script) - : mCx(cx), mScript(script) {} - ~JSScriptHolder() { ::JS_DestroyScript(mCx, mScript); } - private: - JSContext *mCx; - JSScript *mScript; +@@ -827,47 +815,129 @@ class JSPrincipalsHolder + JSPrincipals *mPrincipals; }; +static const char baseName[2][5] = { "gre/", "app/" }; @@ -326,6 +131,7 @@ diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect + out.Append(Substring(spec, base.Length())); + return PR_TRUE; +} ++ /** * PathifyURI transforms mozilla .js uris into useful zip paths * to make it makes it easier to manipulate startup cache entries @@ -386,61 +192,61 @@ diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect + nsresult rv; + nsCOMPtr uri = in; + nsCAutoString spec; -+ ++ + out = "jsloader"; -+ ++ + // Resolve resource:// URIs. At the end of this if/else block, we + // have both spec and uri variables identifying the same URI. + if (NS_SUCCEEDED(in->SchemeIs("resource", &equals)) && equals) { + nsCOMPtr ioService = do_GetIOService(&rv); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + nsCOMPtr ph; + rv = ioService->GetProtocolHandler("resource", getter_AddRefs(ph)); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + nsCOMPtr irph(do_QueryInterface(ph, &rv)); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + rv = irph->ResolveURI(in, spec); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + rv = ioService->NewURI(spec, nsnull, nsnull, getter_AddRefs(uri)); + NS_ENSURE_SUCCESS(rv, rv); + } else { + rv = in->GetSpec(spec); + NS_ENSURE_SUCCESS(rv, rv); + } -+ ++ + if (!canonicalizeBase(spec, out, mozilla::Omnijar::GRE) && + !canonicalizeBase(spec, out, mozilla::Omnijar::APP)) { + if (NS_SUCCEEDED(uri->SchemeIs("file", &equals)) && equals) { + nsCOMPtr baseFileURL; + baseFileURL = do_QueryInterface(uri, &rv); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + nsCAutoString path; + rv = baseFileURL->GetPath(path); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + out.Append(path); + } else if (NS_SUCCEEDED(uri->SchemeIs("jar", &equals)) && equals) { + nsCOMPtr jarURI = do_QueryInterface(uri, &rv); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + nsCOMPtr jarFileURI; + rv = jarURI->GetJARFile(getter_AddRefs(jarFileURI)); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + nsCOMPtr jarFileURL; + jarFileURL = do_QueryInterface(jarFileURI, &rv); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + nsCAutoString path; + rv = jarFileURL->GetPath(path); + NS_ENSURE_SUCCESS(rv, rv); + out.Append(path); -+ ++ + rv = jarURI->GetJAREntry(path); + NS_ENSURE_SUCCESS(rv, rv); + out.Append("/"); @@ -449,33 +255,32 @@ diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect + nsCAutoString spec; + rv = uri->GetSpec(spec); + NS_ENSURE_SUCCESS(rv, rv); -+ ++ + out.Append("/"); + out.Append(spec); + } + } -+ ++ + out.Append(".bin"); + return NS_OK; } /* static */ - #ifdef MOZ_ENABLE_LIBXUL - nsresult - mozJSComponentLoader::ReadScript(StartupCache* cache, nsIURI *uri, - JSContext *cx, JSScript **script) - { -diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp ---- a/modules/libjar/nsJAR.cpp -+++ b/modules/libjar/nsJAR.cpp -@@ -171,26 +171,23 @@ nsJAR::Open(nsIFile* zipFile) - if (mLock) return NS_ERROR_FAILURE; // Already open! - - mZipFile = zipFile; +diff -up xulrunner-5.0/mozilla-release/layout/style/jar.mn.omnijar xulrunner-5.0/mozilla-release/layout/style/jar.mn +--- xulrunner-5.0/mozilla-release/layout/style/jar.mn.omnijar 2011-06-15 23:57:39.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/layout/style/jar.mn 2011-06-21 12:46:33.530167305 +0200 +@@ -6,3 +6,5 @@ toolkit.jar: + * res/forms.css (forms.css) + res/arrow.gif (arrow.gif) + res/arrowd.gif (arrowd.gif) ++ ++% resource gre-resources %res/ +diff -up xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp.omnijar xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp +--- xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp.omnijar 2011-06-15 23:58:10.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp 2011-06-21 13:23:23.829895163 +0200 +@@ -177,16 +177,14 @@ nsJAR::Open(nsIFile* zipFile) mOuterZipEntry.Truncate(); - - mLock = PR_NewLock(); - NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY); + mOpened = PR_TRUE; -#ifdef MOZ_OMNIJAR // The omnijar is special, it is opened early on and closed late @@ -490,20 +295,11 @@ diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp return NS_OK; } -#endif ++ return mZip->OpenArchive(zipFile); } - NS_IMETHODIMP - nsJAR::OpenInner(nsIZipReader *aZipReader, const char *aZipEntry) - { - NS_ENSURE_ARG_POINTER(aZipReader); - NS_ENSURE_ARG_POINTER(aZipEntry); -@@ -234,23 +231,22 @@ nsJAR::Close() - mLock = nsnull; - } - - mParsedManifest = PR_FALSE; - mManifestData.Reset(); +@@ -235,13 +233,13 @@ nsJAR::Close() mGlobalStatus = JAR_MANIFEST_NOT_PARSED; mTotalItemsInManifest = 0; @@ -516,20 +312,11 @@ diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp return NS_OK; } -#endif ++ return mZip->CloseArchive(); } - NS_IMETHODIMP - nsJAR::Test(const char *aEntryName) - { - return mZip->Test(aEntryName); - } -@@ -391,22 +387,21 @@ nsJAR::GetInputStreamWithSpec(const nsAC - NS_IMETHODIMP - nsJAR::GetCertificatePrincipal(const char* aFilename, nsIPrincipal** aPrincipal) - { - //-- Parameter check - if (!aPrincipal) +@@ -392,12 +390,11 @@ nsJAR::GetCertificatePrincipal(const cha return NS_ERROR_NULL_POINTER; *aPrincipal = nsnull; @@ -544,20 +331,10 @@ diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp //-- Parse the manifest nsresult rv = ParseManifest(); - if (NS_FAILED(rv)) return rv; - if (mGlobalStatus == JAR_NO_MANIFEST) - return NS_OK; - - PRInt16 requestedStatus; -diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefService.cpp ---- a/modules/libpref/src/nsPrefService.cpp -+++ b/modules/libpref/src/nsPrefService.cpp -@@ -67,20 +67,18 @@ - - #include "prefapi.h" - #include "prefread.h" - #include "prefapi_private_data.h" - #include "PrefTuple.h" +diff -up xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp.omnijar xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp +--- xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp.omnijar 2011-06-15 23:57:41.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp 2011-06-21 12:46:33.545167043 +0200 +@@ -70,10 +70,8 @@ #include "nsITimelineService.h" @@ -568,17 +345,7 @@ diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefS // Definitions #define INITIAL_PREF_FILES 10 - static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID); - - // Prototypes - static nsresult openPrefFile(nsIFile* aFile); - static nsresult pref_InitInitialObjects(void); -@@ -793,124 +791,144 @@ static nsresult pref_LoadPrefsInDirList( - pref_LoadPrefsInDir(dir, nsnull, 0); - } - } - } - } +@@ -784,30 +782,6 @@ static nsresult pref_LoadPrefsInDirList( return NS_OK; } @@ -609,66 +376,25 @@ diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefS static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name) { nsZipItemPtr manifest(jarReader, name, true); - NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE); - - PrefParseState ps; - PREF_InitParseState(&ps, PREF_ReaderCallback, NULL); - nsresult rv = PREF_ParseBuf(&ps, manifest, manifest.Length()); - PREF_FinalizeParseState(&ps); - +@@ -821,77 +795,121 @@ static nsresult pref_ReadPrefFromJar(nsZ return rv; } -static nsresult pref_InitAppDefaultsFromOmnijar() --{ -- nsresult rv; -- ++//---------------------------------------------------------------------------------------- ++// Initialize default preference JavaScript buffers from ++// appropriate TEXT resources ++//---------------------------------------------------------------------------------------- ++static nsresult pref_InitInitialObjects() + { + nsresult rv; + - nsZipArchive* jarReader = mozilla::OmnijarReader(); - if (!jarReader) - return pref_InitDefaults(); - - rv = pref_ReadPrefFromJar(jarReader, "greprefs.js"); - NS_ENSURE_SUCCESS(rv, rv); -- -- nsZipFind *findPtr; -- rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); -- NS_ENSURE_SUCCESS(rv, rv); -- -- nsAutoPtr find(findPtr); -- -- nsTArray prefEntries; -- const char *entryName; -- PRUint16 entryNameLen; -- while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { -- prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); -- } -- -- prefEntries.Sort(); -- for (PRUint32 i = prefEntries.Length(); i--; ) { -- rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); -- if (NS_FAILED(rv)) -- NS_WARNING("Error parsing preferences."); -- } -- -- return NS_OK; --} --#endif -- -+//---------------------------------------------------------------------------------------- -+// Initialize default preference JavaScript buffers from -+// appropriate TEXT resources -+//---------------------------------------------------------------------------------------- - static nsresult pref_InitInitialObjects() - { - nsresult rv; - -- // first we parse the GRE default prefs. This also works if we're not using a GRE, --#ifdef MOZ_OMNIJAR -- rv = pref_InitAppDefaultsFromOmnijar(); --#else -- rv = pref_InitDefaults(); --#endif -- NS_ENSURE_SUCCESS(rv, rv); + // In omni.jar case, we load the following prefs: + // - jar:$gre/omni.jar!/greprefs.js + // - jar:$gre/omni.jar!/defaults/pref/*.js @@ -687,33 +413,54 @@ diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefS + // and in non omni.jar case: + // - $app/defaults/preferences/*.js -- nsCOMPtr defaultPrefDir; -- // now parse the "application" default preferences -- rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); + nsZipFind *findPtr; +- rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); - NS_ENSURE_SUCCESS(rv, rv); -+ nsZipFind *findPtr; +- +- nsAutoPtr find(findPtr); +- + nsAutoPtr find; -+ nsTArray prefEntries; -+ const char *entryName; -+ PRUint16 entryNameLen; + nsTArray prefEntries; + const char *entryName; + PRUint16 entryNameLen; +- while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { +- prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); +- } -- /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ -- static const char* specialFiles[] = { +- prefEntries.Sort(); +- for (PRUint32 i = prefEntries.Length(); i--; ) { +- rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); +- if (NS_FAILED(rv)) +- NS_WARNING("Error parsing preferences."); +- } + nsZipArchive* jarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE); + if (jarReader) { + // Load jar:$gre/omni.jar!/greprefs.js + rv = pref_ReadPrefFromJar(jarReader, "greprefs.js"); + NS_ENSURE_SUCCESS(rv, rv); -+ + +- return NS_OK; +-} +-#endif + // Load jar:$gre/omni.jar!/defaults/pref/*.js + rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); + NS_ENSURE_SUCCESS(rv, rv); -+ + +-static nsresult pref_InitInitialObjects() +-{ +- nsresult rv; + find = findPtr; + while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { + prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); + } -+ + +- // first we parse the GRE default prefs. This also works if we're not using a GRE, +-#ifdef MOZ_OMNIJAR +- rv = pref_InitAppDefaultsFromOmnijar(); +-#else +- rv = pref_InitDefaults(); +-#endif +- NS_ENSURE_SUCCESS(rv, rv); + prefEntries.Sort(); + for (PRUint32 i = prefEntries.Length(); i--; ) { + rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); @@ -725,7 +472,11 @@ diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefS + nsCOMPtr greprefsFile; + rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile)); + NS_ENSURE_SUCCESS(rv, rv); -+ + +- nsCOMPtr defaultPrefDir; +- // now parse the "application" default preferences +- rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); +- NS_ENSURE_SUCCESS(rv, rv); + rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js")); + NS_ENSURE_SUCCESS(rv, rv); + @@ -740,7 +491,9 @@ diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefS + + rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); + NS_ENSURE_SUCCESS(rv, rv); -+ + +- /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ +- static const char* specialFiles[] = { + /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ + static const char* specialFiles[] = { #if defined(XP_MAC) || defined(XP_MACOSX) @@ -790,20 +543,20 @@ diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefS } rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST); - NS_ENSURE_SUCCESS(rv, rv); +diff -up xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp.omnijar xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp +--- xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp.omnijar 2011-06-15 23:57:50.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp 2011-06-21 13:30:07.167653046 +0200 +@@ -76,8 +76,8 @@ static nsResProtocolHandler *gResHandler + static PRLogModuleInfo *gResLog; + #endif - NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID, - nsnull, NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID); ++#define kAPP NS_LITERAL_CSTRING("app") + #define kGRE NS_LITERAL_CSTRING("gre") +-#define kGRE_RESOURCES NS_LITERAL_CSTRING("gre-resources") -diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp ---- a/netwerk/protocol/res/nsResProtocolHandler.cpp -+++ b/netwerk/protocol/res/nsResProtocolHandler.cpp -@@ -152,97 +152,62 @@ nsResProtocolHandler::nsResProtocolHandl - } - - nsResProtocolHandler::~nsResProtocolHandler() - { - gResHandler = nsnull; + //---------------------------------------------------------------------------- + // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution +@@ -155,20 +155,6 @@ nsResProtocolHandler::~nsResProtocolHand } nsresult @@ -824,10 +577,7 @@ diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/re nsResProtocolHandler::Init() { if (!mSubstitutions.Init(32)) - return NS_ERROR_UNEXPECTED; - - nsresult rv; - +@@ -179,38 +165,39 @@ nsResProtocolHandler::Init() mIOService = do_GetIOService(&rv); NS_ENSURE_SUCCESS(rv, rv); @@ -836,24 +586,29 @@ diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/re - if (omniJar) - return Init(omniJar); -#endif -- -- // these entries should be kept in sync with the omnijar Init function + nsCAutoString appURI, greURI; + rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::APP, appURI); + NS_ENSURE_SUCCESS(rv, rv); + rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::GRE, greURI); + NS_ENSURE_SUCCESS(rv, rv); - - // -- // make resource:/// point to the application directory ++ ++ // + // make resource:/// point to the application directory or omnijar - // -- rv = AddSpecialDir(NS_OS_CURRENT_PROCESS_DIR, EmptyCString()); ++ // + nsCOMPtr uri; + rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI); + NS_ENSURE_SUCCESS(rv, rv); -+ + +- // these entries should be kept in sync with the omnijar Init function + rv = SetSubstitution(EmptyCString(), uri); ++ NS_ENSURE_SUCCESS(rv, rv); + + // +- // make resource:/// point to the application directory ++ // make resource://app/ point to the application directory or omnijar + // +- rv = AddSpecialDir(NS_OS_CURRENT_PROCESS_DIR, EmptyCString()); ++ rv = SetSubstitution(kAPP, uri); NS_ENSURE_SUCCESS(rv, rv); // @@ -868,12 +623,22 @@ diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/re + rv = SetSubstitution(kGRE, uri); NS_ENSURE_SUCCESS(rv, rv); +- // make resource://gre-resources/ point to gre toolkit[.jar]/res +- nsCOMPtr greURI; +- nsCOMPtr greResURI; +- GetSubstitution(kGRE, getter_AddRefs(greURI)); +-#ifdef MOZ_CHROME_FILE_FORMAT_JAR +- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "jar:chrome/toolkit.jar!/res/"); +-#else +- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "chrome/toolkit/res/"); +-#endif +- rv = mIOService->NewURI(strGRE_RES_URL, nsnull, greURI, +- getter_AddRefs(greResURI)); +- SetSubstitution(kGRE_RESOURCES, greResURI); //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir... // but once I finish multiple chrome registration I'm not sure that it is needed - // XXX dveditz: resource://pchrome/ defeats profile directory salting - // if web content can load it. Tread carefully. - +@@ -220,40 +207,6 @@ nsResProtocolHandler::Init() return rv; } @@ -901,27 +666,23 @@ diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/re - // resource://gre/ points to jar:omni.jar!/ - SetSubstitution(kGRE, uri); - +- urlStr += "chrome/toolkit/res/"; +- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri)); +- NS_ENSURE_SUCCESS(rv, rv); +- +- // resource://gre-resources/ points to jar:omni.jar!/chrome/toolkit/res/ +- SetSubstitution(kGRE_RESOURCES, uri); - return NS_OK; -} -#endif - - #ifdef MOZ_IPC static PLDHashOperator EnumerateSubstitution(const nsACString& aKey, nsIURI* aURI, - void* aArg) - { - nsTArray* resources = - static_cast*>(aArg); -diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp ---- a/startupcache/StartupCache.cpp -+++ b/startupcache/StartupCache.cpp -@@ -237,27 +237,36 @@ StartupCache::GetBuffer(const char* id, - nsZipItemPtr zipItem(mArchive, id, true); - if (zipItem) { - *outbuf = zipItem.Forget(); - *length = zipItem.Length(); - return NS_OK; +diff -up xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp.omnijar xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp +--- xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp.omnijar 2011-06-15 23:57:54.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp 2011-06-21 13:10:46.687518879 +0200 +@@ -250,17 +250,26 @@ StartupCache::GetBuffer(const char* id, } } @@ -952,22 +713,24 @@ diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp return NS_ERROR_NOT_AVAILABLE; } - // Makes a copy of the buffer, client retains ownership of inbuf. - nsresult - StartupCache::PutBuffer(const char* id, const char* inbuf, PRUint32 len) - { - WaitOnWriteThread(); -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -3897,35 +3897,45 @@ XRE_InitCommandLine(int aArgc, char* aAr - CommandLine::Init(aArgc, canonArgs); +diff -up xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk.omnijar xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk +--- xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk.omnijar 2011-06-15 23:58:10.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk 2011-06-21 12:46:33.535167224 +0200 +@@ -397,7 +397,7 @@ OMNIJAR_FILES = \ - for (int i = 0; i < aArgc; ++i) - free(canonArgs[i]); + NON_OMNIJAR_FILES += \ + chrome/icons/\* \ +- defaults/pref/channel-prefs.js \ ++ $(PREF_DIR)/channel-prefs.js \ + res/cursors/\* \ + res/MainMenu.nib/\* \ + $(NULL) +diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp +--- xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp.omnijar 2011-06-15 23:57:56.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp 2011-06-21 13:20:33.307973388 +0200 +@@ -3877,25 +3877,35 @@ XRE_InitCommandLine(int aArgc, char* aAr delete[] canonArgs; #endif - #endif -#ifdef MOZ_OMNIJAR - const char *omnijarPath = nsnull; @@ -990,13 +753,12 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp - if (NS_SUCCEEDED(rv)) - mozilla::SetOmnijar(omnijar); -#endif -- -- return rv; + nsCOMPtr greBase; + rv = XRE_GetFileFromPath(path, getter_AddRefs(greBase)); + if (NS_FAILED(rv)) + return rv; -+ + +- return rv; + ar = CheckArg("appbase", PR_FALSE, &path); + if (ar == ARG_BAD) { + PR_fprintf(PR_STDERR, "Error: argument -appbase requires a path argument\n"); @@ -1014,20 +776,10 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp } nsresult - XRE_DeinitCommandLine() - { - nsresult rv = NS_OK; - - #if defined(MOZ_IPC) -diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp ---- a/toolkit/xre/nsEmbedFunctions.cpp -+++ b/toolkit/xre/nsEmbedFunctions.cpp -@@ -512,19 +512,17 @@ XRE_InitChildProcess(int aArgc, - } - - // Run the UI event loop on the main thread. - uiMessageLoop.MessageLoop::Run(); - +diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp +--- xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp.omnijar 2011-06-15 23:57:56.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp 2011-06-21 12:46:33.558166809 +0200 +@@ -512,9 +512,7 @@ XRE_InitChildProcess(int aArgc, // Allow ProcessChild to clean up after itself before going out of // scope and being deleted process->CleanUp(); @@ -1038,20 +790,23 @@ diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp } } - NS_LogTerm(); - return XRE_DeinitCommandLine(); - } +diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp +--- xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp.omnijar 2011-06-15 23:57:57.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp 2011-06-21 12:46:33.575166505 +0200 +@@ -301,9 +301,6 @@ nsXREDirProvider::GetFile(const char* aP + if (NS_SUCCEEDED(rv)) + file = lf; + } +- else if (!strcmp(aProperty, "resource:app")) { +- rv = GetAppDir()->Clone(getter_AddRefs(file)); +- } - MessageLoop* -diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in ---- a/xpcom/build/Makefile.in -+++ b/xpcom/build/Makefile.in -@@ -64,28 +64,25 @@ CSRCS = \ - $(NULL) - - CPPSRCS = \ - $(XPCOM_GLUE_SRC_LCPPSRCS) \ - $(XPCOM_GLUENS_SRC_LCPPSRCS) \ + else if (!strcmp(aProperty, NS_APP_PROFILE_DIR_STARTUP) && mProfileDir) { + return mProfileDir->Clone(aFile); +diff -up xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in +--- xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in.omnijar 2011-06-15 23:57:58.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in 2011-06-21 12:46:33.560166773 +0200 +@@ -69,6 +69,7 @@ CPPSRCS = \ nsXPComInit.cpp \ nsXPCOMStrings.cpp \ Services.cpp \ @@ -1059,8 +814,7 @@ diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in $(NULL) ifndef MOZ_ENABLE_LIBXUL - ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH))) - CPPSRCS += dlldeps.cpp +@@ -77,10 +78,6 @@ CPPSRCS += dlldeps.cpp endif endif @@ -1071,20 +825,61 @@ diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in SHARED_LIBRARY_LIBS = \ $(DEPTH)/chrome/src/$(LIB_PREFIX)chrome_s.$(LIB_SUFFIX) \ ../ds/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \ - ../io/$(LIB_PREFIX)xpcomio_s.$(LIB_SUFFIX) \ - ../components/$(LIB_PREFIX)xpcomcomponents_s.$(LIB_SUFFIX) \ - ../threads/$(LIB_PREFIX)xpcomthreads_s.$(LIB_SUFFIX) \ - ../proxy/src/$(LIB_PREFIX)xpcomproxy_s.$(LIB_SUFFIX) \ - ../base/$(LIB_PREFIX)xpcombase_s.$(LIB_SUFFIX) \ -diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp ---- a/xpcom/build/Omnijar.cpp -+++ b/xpcom/build/Omnijar.cpp -@@ -16,16 +16,17 @@ - * - * The Initial Developer of the Original Code is - * Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2010 - * the Initial Developer. All Rights Reserved. +diff -up xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp +--- xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp.omnijar 2011-06-15 23:58:00.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp 2011-06-21 13:15:00.545014024 +0200 +@@ -457,25 +457,25 @@ NS_InitXPCOM2(nsIServiceManager* *result + if (NS_FAILED(rv)) return rv; + } + +-#ifdef MOZ_OMNIJAR + NS_TIME_FUNCTION_MARK("Next: Omnijar init"); + +- if (!mozilla::OmnijarPath()) { +- nsCOMPtr omnijar; ++ if (!mozilla::Omnijar::IsInitialized()) { ++ nsCOMPtr greDir, appDir; + nsCOMPtr file; + +- rv = NS_ERROR_FAILURE; + nsDirectoryService::gService->Get(NS_GRE_DIR, + NS_GET_IID(nsIFile), ++ getter_AddRefs(file)); ++ greDir = do_QueryInterface(file); ++ ++ nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, ++ NS_GET_IID(nsIFile), + getter_AddRefs(file)); +- if (file) +- rv = file->Append(NS_LITERAL_STRING("omni.jar")); +- if (NS_SUCCEEDED(rv)) +- omnijar = do_QueryInterface(file); +- if (NS_SUCCEEDED(rv)) +- mozilla::SetOmnijar(omnijar); ++ appDir = do_QueryInterface(file); ++ ++ rv = mozilla::Omnijar::SetBase(greDir, appDir); ++ NS_ENSURE_SUCCESS(rv, rv); + } +-#endif + + if ((sCommandLineWasInitialized = !CommandLine::IsInitialized())) { + NS_TIME_FUNCTION_MARK("Next: IPC command line init"); +@@ -755,9 +755,7 @@ ShutdownXPCOM(nsIServiceManager* servMgr + sExitManager = nsnull; + } + +-#ifdef MOZ_OMNIJAR +- mozilla::SetOmnijar(nsnull); +-#endif ++ mozilla::Omnijar::SetBase(nsnull, nsnull); + + NS_LogTerm(); + +diff -up xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp +--- xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp.omnijar 2011-06-15 23:57:58.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp 2011-06-21 12:46:33.563166721 +0200 +@@ -21,6 +21,7 @@ * * Contributor(s): * Michael Wu @@ -1092,17 +887,7 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your -@@ -33,69 +34,175 @@ - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +@@ -38,64 +39,170 @@ #include "Omnijar.h" @@ -1130,6 +915,7 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp { - if (!sOmnijarPath) { - return; +- } + PRBool isDir; + aIsOmnijar = PR_FALSE; + if (!aPath || NS_FAILED(aPath->IsDirectory(&isDir)) || !isDir) @@ -1147,7 +933,11 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp + if (NS_FAILED(path->Exists(&aIsOmnijar))) + return nsnull; +#endif -+ + +- nsZipArchive* zipReader = new nsZipArchive(); +- if (!zipReader) { +- NS_IF_RELEASE(sOmnijarPath); +- return; + if (!aIsOmnijar && NS_FAILED(aPath->Clone(getter_AddRefs(path)))) + return nsnull; + @@ -1167,10 +957,14 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp + if (sReader[APP]) { + sReader[APP]->CloseArchive(); + delete sReader[APP]; -+ } + } + sReader[APP] = sReader[GRE] = nsnull; +#endif -+ + +- if (NS_FAILED(zipReader->OpenArchive(sOmnijarPath))) { +- delete zipReader; +- NS_IF_RELEASE(sOmnijarPath); +- return; + nsresult rv; + PRBool equals; + if (aAppPath) { @@ -1180,10 +974,7 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp + equals = PR_TRUE; } -- nsZipArchive* zipReader = new nsZipArchive(); -- if (!zipReader) { -- NS_IF_RELEASE(sOmnijarPath); -- return; +- sOmnijarReader = zipReader; + nsCOMPtr grePath = ComputePath(aGrePath, sIsOmnijar[GRE]); + nsCOMPtr appPath = ComputePath(equals ? nsnull : aAppPath, sIsOmnijar[APP]); + @@ -1196,19 +987,23 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp + NS_IF_ADDREF(sPath[APP]); + + return NS_OK; -+} -+ + } + +-nsILocalFile* +-mozilla::OmnijarPath() +already_AddRefed +Omnijar::GetBase(Type aType) -+{ + { +- if (!sOmnijarReader) +- SetupReader(); + NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); + + if (!sIsOmnijar[aType]) { + NS_IF_ADDREF(sPath[aType]); + return sPath[aType]; - } ++ } -- if (NS_FAILED(zipReader->OpenArchive(sOmnijarPath))) { +- return sOmnijarPath; + nsCOMPtr file, path; + if (NS_FAILED(sPath[aType]->Clone(getter_AddRefs(file)))) + return nsnull; @@ -1216,15 +1011,20 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp + if (NS_FAILED(file->GetParent(getter_AddRefs(path)))) + return nsnull; + return path.forget(); -+} -+ + } + +-nsZipArchive* +-mozilla::OmnijarReader() +#ifdef MOZ_ENABLE_LIBXUL +nsZipArchive * +Omnijar::GetReader(Type aType) -+{ + { +- if (!sOmnijarReader) +- SetupReader(); + if (!sIsOmnijar[aType]) + return nsnull; -+ + +- return sOmnijarReader; + if (sReader[aType]) + return sReader[aType]; + @@ -1233,32 +1033,31 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp + return nsnull; + + if (NS_FAILED(zipReader->OpenArchive(sPath[aType]))) { - delete zipReader; -- NS_IF_RELEASE(sOmnijarPath); -- return; ++ delete zipReader; + return nsnull; - } - -- sOmnijarReader = zipReader; ++ } ++ + return (sReader[aType] = zipReader); } --nsILocalFile* --mozilla::OmnijarPath() +-void +-mozilla::SetOmnijar(nsILocalFile* aPath) +nsZipArchive * +Omnijar::GetReader(nsIFile *aPath) { -- if (!sOmnijarReader) -- SetupReader(); +- NS_IF_RELEASE(sOmnijarPath); +- if (sOmnijarReader) { +- sOmnijarReader->CloseArchive(); +- delete sOmnijarReader; +- sOmnijarReader = nsnull; + PRBool equals; + nsresult rv; - -- return sOmnijarPath; ++ + if (sIsOmnijar[GRE]) { + rv = sPath[GRE]->Equals(aPath, &equals); + if (NS_SUCCEEDED(rv) && equals) + return GetReader(GRE); -+ } + } + if (sIsOmnijar[APP]) { + rv = sPath[APP]->Equals(aPath, &equals); + if (NS_SUCCEEDED(rv) && equals) @@ -1272,7 +1071,9 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp +Omnijar::GetURIString(Type aType, nsCString &result) +{ + NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); -+ + +- sOmnijarPath = aPath; +- NS_IF_ADDREF(sOmnijarPath); + result = ""; + + if ((aType == APP) && (!sPath[APP])) @@ -1293,39 +1094,11 @@ diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp + return NS_OK; } --nsZipArchive* --mozilla::OmnijarReader() --{ -- if (!sOmnijarReader) -- SetupReader(); -- -- return sOmnijarReader; --} -- --void --mozilla::SetOmnijar(nsILocalFile* aPath) --{ -- NS_IF_RELEASE(sOmnijarPath); -- if (sOmnijarReader) { -- sOmnijarReader->CloseArchive(); -- delete sOmnijarReader; -- sOmnijarReader = nsnull; -- } -- -- sOmnijarPath = aPath; -- NS_IF_ADDREF(sOmnijarPath); --} -- +} /* namespace mozilla */ -diff --git a/xpcom/build/Omnijar.h b/xpcom/build/Omnijar.h ---- a/xpcom/build/Omnijar.h -+++ b/xpcom/build/Omnijar.h -@@ -16,16 +16,17 @@ - * - * The Initial Developer of the Original Code is - * Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2010 - * the Initial Developer. All Rights Reserved. +diff -up xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h +--- xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h.omnijar 2011-06-15 23:57:58.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h 2011-06-21 12:46:33.564166703 +0200 +@@ -21,6 +21,7 @@ * * Contributor(s): * Michael Wu @@ -1333,30 +1106,20 @@ diff --git a/xpcom/build/Omnijar.h b/xpcom/build/Omnijar.h * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your -@@ -34,29 +35,137 @@ - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - +@@ -39,24 +40,132 @@ #ifndef mozilla_Omnijar_h #define mozilla_Omnijar_h -class nsILocalFile; +-class nsZipArchive; +#include "nscore.h" +#include "nsTArray.h" +#include "nsCOMPtr.h" +#include "nsString.h" -+ -+class nsIFile; - class nsZipArchive; -- + -#ifdef MOZ_OMNIJAR ++class nsIFile; ++class nsZipArchive; +class nsIURI; namespace mozilla { @@ -1369,25 +1132,27 @@ diff --git a/xpcom/build/Omnijar.h b/xpcom/build/Omnijar.h + +class OMNIJAR_EXPORT Omnijar { +private: - /** -- * This returns the path to the omnijar. -- * If the omnijar isn't available, this function will return null. -- * Callers should fallback to flat packaging if null. ++/** + * Store an nsIFile for either a base directory when there is no omni.jar, + * or omni.jar itself. We can store two paths here, one for GRE + * (corresponding to resource://gre/) and one for APP + * (corresponding to resource:/// and resource://app/), but only + * store one when both point to the same location (unified). - */ ++ */ ++static nsIFile *sPath[2]; + /** +- * This returns the path to the omnijar. +- * If the omnijar isn't available, this function will return null. +- * Callers should fallback to flat packaging if null. +- */ -nsILocalFile *OmnijarPath(); -nsZipArchive *OmnijarReader(); -void SetOmnijar(nsILocalFile* aPath); -+static nsIFile *sPath[2]; -+/** + * Store whether the corresponding sPath is an omni.jar or a directory + */ +static PRBool sIsOmnijar[2]; -+ + +-} /* namespace mozilla */ +#ifdef MOZ_ENABLE_LIBXUL +/** + * Cached nsZipArchives for the corresponding sPath @@ -1460,7 +1225,8 @@ diff --git a/xpcom/build/Omnijar.h b/xpcom/build/Omnijar.h +#else +static nsZipArchive *GetReader(Type aType) { return nsnull; } +#endif -+ + +-#endif /* MOZ_OMNIJAR */ +/** + * Returns a nsZipArchive pointer for the given path IAOI the given + * path is the omni.jar for either GRE or APP. @@ -1481,91 +1247,14 @@ diff --git a/xpcom/build/Omnijar.h b/xpcom/build/Omnijar.h +static nsresult GetURIString(Type aType, nsCString &result); + +}; /* class Omnijar */ ++ ++} /* namespace mozilla */ - } /* namespace mozilla */ - --#endif /* MOZ_OMNIJAR */ -- #endif /* mozilla_Omnijar_h */ -diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp ---- a/xpcom/build/nsXPComInit.cpp -+++ b/xpcom/build/nsXPComInit.cpp -@@ -462,35 +462,35 @@ NS_InitXPCOM2(nsIServiceManager* *result - nsDirectoryService::gService->Set(NS_XPCOM_LIBRARY_FILE, xpcomLib); - } - - if (appFileLocationProvider) { - rv = nsDirectoryService::gService->RegisterProvider(appFileLocationProvider); - if (NS_FAILED(rv)) return rv; - } - --#ifdef MOZ_OMNIJAR - NS_TIME_FUNCTION_MARK("Next: Omnijar init"); - -- if (!mozilla::OmnijarPath()) { -- nsCOMPtr omnijar; -+ if (!mozilla::Omnijar::IsInitialized()) { -+ nsCOMPtr greDir, appDir; - nsCOMPtr file; - -- rv = NS_ERROR_FAILURE; - nsDirectoryService::gService->Get(NS_GRE_DIR, - NS_GET_IID(nsIFile), - getter_AddRefs(file)); -- if (file) -- rv = file->Append(NS_LITERAL_STRING("omni.jar")); -- if (NS_SUCCEEDED(rv)) -- omnijar = do_QueryInterface(file); -- if (NS_SUCCEEDED(rv)) -- mozilla::SetOmnijar(omnijar); -+ greDir = do_QueryInterface(file); -+ -+ nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, -+ NS_GET_IID(nsIFile), -+ getter_AddRefs(file)); -+ appDir = do_QueryInterface(file); -+ -+ rv = mozilla::Omnijar::SetBase(greDir, appDir); -+ NS_ENSURE_SUCCESS(rv, rv); - } --#endif - - #ifdef MOZ_IPC - if ((sCommandLineWasInitialized = !CommandLine::IsInitialized())) { - NS_TIME_FUNCTION_MARK("Next: IPC command line init"); - - #ifdef OS_WIN - CommandLine::Init(0, nsnull); - #else -@@ -769,18 +769,16 @@ ShutdownXPCOM(nsIServiceManager* servMgr - sCommandLineWasInitialized = false; - } - if (sExitManager) { - delete sExitManager; - sExitManager = nsnull; - } - #endif - --#ifdef MOZ_OMNIJAR -- mozilla::SetOmnijar(nsnull); --#endif -+ mozilla::Omnijar::SetBase(nsnull, nsnull); - - NS_LogTerm(); - - return NS_OK; - } - - } // namespace mozilla -diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp ---- a/xpcom/components/nsComponentManager.cpp -+++ b/xpcom/components/nsComponentManager.cpp -@@ -175,18 +175,16 @@ NS_DEFINE_CID(kCategoryManagerCID, NS_CA - #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) \ - NS_TIME_FUNCTION_MIN_FMT(5, "%s (line %d) (contractid: %s)", MOZ_FUNCTION_NAME, \ - __LINE__, (cid)) - #else - #define COMPMGR_TIME_FUNCTION_CID(cid) do {} while (0) +diff -up xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp +--- xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp.omnijar 2011-06-15 23:58:01.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp 2011-06-21 12:46:33.569166613 +0200 +@@ -174,8 +174,6 @@ NS_DEFINE_CID(kCategoryManagerCID, NS_CA #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) do {} while (0) #endif @@ -1574,17 +1263,7 @@ diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsCompon nsresult nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) const { - nsresult rv; - nsXPIDLCString value; - nsCOMPtr catman; - nsComponentManagerImpl *compMgr = nsComponentManagerImpl::gComponentManager; - if (!compMgr) { -@@ -390,47 +388,44 @@ nsresult nsComponentManagerImpl::Init() - - nsCategoryManager::GetSingleton()->SuppressNotifications(true); - - RegisterModule(&kXPCOMModule, NULL); - +@@ -385,14 +383,20 @@ nsresult nsComponentManagerImpl::Init() for (PRUint32 i = 0; i < sStaticModules->Length(); ++i) RegisterModule((*sStaticModules)[i], NULL); @@ -1600,26 +1279,19 @@ diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsCompon + cl->type = NS_COMPONENT_LOCATION; + cl->location = do_QueryInterface(appOmnijar); + cl->jar = true; - } --#endif ++ } + nsCOMPtr greOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::GRE); + if (greOmnijar) { + cl = sModuleLocations->InsertElementAt(0); + cl->type = NS_COMPONENT_LOCATION; + cl->location = do_QueryInterface(greOmnijar); + cl->jar = true; -+ } + } +-#endif for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) { ComponentLocation& l = sModuleLocations->ElementAt(i); - if (!l.jar) { - RegisterManifestFile(l.type, l.location, false); - continue; - } - - nsCOMPtr reader = do_CreateInstance(kZipReaderCID, &rv); - rv = reader->Open(l.location); - if (NS_SUCCEEDED(rv)) +@@ -407,15 +411,6 @@ nsresult nsComponentManagerImpl::Init() RegisterJarManifest(reader, "chrome.manifest", false); } @@ -1635,95 +1307,10 @@ diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsCompon nsCategoryManager::GetSingleton()->SuppressNotifications(false); mStatus = NORMAL; - - return NS_OK; - } - - void -# HG changeset patch -# Parent ff1b810f78226d7f4010909d3cde05a57fdcf20c -Bug 620931 part 4 - Fix resource://app/ to always point to the same as resource:/// - -diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp ---- a/netwerk/protocol/res/nsResProtocolHandler.cpp -+++ b/netwerk/protocol/res/nsResProtocolHandler.cpp -@@ -74,16 +74,17 @@ static nsResProtocolHandler *gResHandler - // set NSPR_LOG_FILE=log.txt - // - // this enables PR_LOG_ALWAYS level information and places all output in - // the file log.txt - // - static PRLogModuleInfo *gResLog; - #endif - -+#define kAPP NS_LITERAL_CSTRING("app") - #define kGRE NS_LITERAL_CSTRING("gre") - - //---------------------------------------------------------------------------- - // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution - //---------------------------------------------------------------------------- - - nsresult - nsResURL::EnsureFile() -@@ -179,16 +180,22 @@ nsResProtocolHandler::Init() - nsCOMPtr uri; - rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI); - NS_ENSURE_SUCCESS(rv, rv); - - rv = SetSubstitution(EmptyCString(), uri); - NS_ENSURE_SUCCESS(rv, rv); - - // -+ // make resource://app/ point to the application directory or omnijar -+ // -+ rv = SetSubstitution(kAPP, uri); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ // - // make resource://gre/ point to the GRE directory - // - if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0. - rv = NS_NewURI(getter_AddRefs(uri), greURI); - NS_ENSURE_SUCCESS(rv, rv); - } - - rv = SetSubstitution(kGRE, uri); -diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp ---- a/toolkit/xre/nsXREDirProvider.cpp -+++ b/toolkit/xre/nsXREDirProvider.cpp -@@ -300,19 +300,16 @@ nsXREDirProvider::GetFile(const char* aP - } - } - else if (!strcmp(aProperty, XRE_EXECUTABLE_FILE) && gArgv[0]) { - nsCOMPtr lf; - rv = XRE_GetBinaryPath(gArgv[0], getter_AddRefs(lf)); - if (NS_SUCCEEDED(rv)) - file = lf; - } -- else if (!strcmp(aProperty, "resource:app")) { -- rv = GetAppDir()->Clone(getter_AddRefs(file)); -- } - - else if (!strcmp(aProperty, NS_APP_PROFILE_DIR_STARTUP) && mProfileDir) { - return mProfileDir->Clone(aFile); - } - else if (!strcmp(aProperty, NS_APP_PROFILE_LOCAL_DIR_STARTUP)) { - if (mProfileLocalDir) - return mProfileLocalDir->Clone(aFile); - -# HG changeset patch -# Parent 7d2228db71a299afca60babff632a967d2d6c456 -Bug 620931 part 5 - Enable omni.jar by default on xulrunner - -diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh ---- a/xulrunner/confvars.sh -+++ b/xulrunner/confvars.sh -@@ -36,15 +36,16 @@ - # - # ***** END LICENSE BLOCK ***** - - MOZ_APP_NAME=xulrunner - MOZ_APP_DISPLAYNAME=XULRunner +diff -up xulrunner-5.0/mozilla-release/xulrunner/confvars.sh.omnijar xulrunner-5.0/mozilla-release/xulrunner/confvars.sh +--- xulrunner-5.0/mozilla-release/xulrunner/confvars.sh.omnijar 2011-06-15 23:58:02.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/xulrunner/confvars.sh 2011-06-21 12:46:33.578166451 +0200 +@@ -41,6 +41,7 @@ MOZ_APP_DISPLAYNAME=XULRunner MOZ_UPDATER=1 MOZ_XULRUNNER=1 MOZ_ENABLE_LIBXUL=1 @@ -1731,7 +1318,3 @@ diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh MOZ_STATIC_BUILD_UNSUPPORTED=1 MOZ_APP_VERSION=$MOZILLA_VERSION if test "$MOZ_STORAGE"; then - MOZ_PLACES=1 - fi - MOZ_EXTENSIONS_DEFAULT=" gnomevfs" - MOZ_URL_CLASSIFIER=1 diff --git a/xulrunner.spec b/xulrunner.spec index ab9b29c..5071828 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -16,7 +16,7 @@ %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} -%global tarballdir mozilla-2.0 +%global tarballdir mozilla-release %global gre_dir %{_sysconfdir}/gre.d # crash reporter and out-of-process-plugins work only on x86/x86_64 @@ -59,7 +59,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 2.0.1 +Version: 5.0 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -75,7 +75,6 @@ Source21: %{name}.sh.in Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch9: mozilla-build-sbrk.patch -Patch12: xulrunner-2.0-64bit-big-endian.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch @@ -90,7 +89,7 @@ Patch32: firefox-4.0-moz-app-launcher.patch Patch33: firefox-4.0-gnome3.patch Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch -Patch36: xulrunner-omnijar.patch +Patch36: xulrunner-omnijar-5.patch # --------------------------------------------------- @@ -201,7 +200,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch1 -p2 -b .build %patch9 -p2 -b .sbrk -%patch12 -p2 -b .64bit-big-endian %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types @@ -212,9 +210,9 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch32 -p1 -b .moz-app-launcher %patch33 -p1 -b .gnome3 -%patch34 -p1 -b .network-link-service +%patch34 -p2 -b .network-link-service %patch35 -p1 -b .NetworkManager09 -%patch36 -p1 -b .omnijar +%patch36 -p2 -b .omnijar %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -376,10 +374,10 @@ done popd # GRE stuff -MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` -%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ - $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} -chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} +#MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` +#%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ +# $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} +#chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d @@ -425,8 +423,8 @@ fi %files %defattr(-,root,root,-) %{_bindir}/xulrunner -%dir %{_sysconfdir}/gre.d -%{_sysconfdir}/gre.d/gre*.conf +#%dir %{_sysconfdir}/gre.d +#%{_sysconfdir}/gre.d/gre*.conf %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.txt @@ -455,10 +453,6 @@ fi %{mozappdir}/plugin-container %endif -# XXX See if these are needed still -%{mozappdir}/updater* -%exclude %{mozappdir}/update.locale - %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter %{mozappdir}/crashreporter.ini @@ -479,6 +473,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 21 2011 Martin Stransky 5.0-1 +- 5.0 + * Thu Apr 28 2011 Christopher Aillon - 2.0.1-1 - 2.0.1 From 96aeb5e23be62c2ed0284215b285da66c7708efd Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Jun 2011 15:53:01 +0200 Subject: [PATCH 179/486] added patch header --- xulrunner-omnijar-5.patch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xulrunner-omnijar-5.patch b/xulrunner-omnijar-5.patch index f214e8d..4cf2ac2 100644 --- a/xulrunner-omnijar-5.patch +++ b/xulrunner-omnijar-5.patch @@ -1,3 +1,7 @@ +# HG changeset patch +# Parent a7dea879b4b445a23186f438900562155bb39e99 +Bug 620931 part 1 - Use chrome manifest to register resource://gre-resources/ + diff -up xulrunner-5.0/mozilla-release/browser/locales/Makefile.in.omnijar xulrunner-5.0/mozilla-release/browser/locales/Makefile.in --- xulrunner-5.0/mozilla-release/browser/locales/Makefile.in.omnijar 2011-06-15 23:57:18.000000000 +0200 +++ xulrunner-5.0/mozilla-release/browser/locales/Makefile.in 2011-06-21 13:16:56.434904620 +0200 From 1d183885f012dbcd2e0e03e73b94c99213998ac9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Jun 2011 22:58:15 +0200 Subject: [PATCH 180/486] Reversed mozbz#642795 - Remove support for registering and finding system XULRunner via config files or the registry. --- firefox-5.0-xulstub.patch | 1843 +++++++++++++++++++++++++++++++++++++ xulrunner.spec | 14 +- 2 files changed, 1851 insertions(+), 6 deletions(-) create mode 100644 firefox-5.0-xulstub.patch diff --git a/firefox-5.0-xulstub.patch b/firefox-5.0-xulstub.patch new file mode 100644 index 0000000..c905475 --- /dev/null +++ b/firefox-5.0-xulstub.patch @@ -0,0 +1,1843 @@ + +# HG changeset patch +# User Benjamin Smedberg +# Date 1301678913 14400 +# Node ID d7fc46501527a4aeecdf3f69f908b250a305ef00 +# Parent e61659c0f0d4505edcb6c018a38f21c830da2e26 +Bug 642795 - Remove support for registering and finding "system XULRunner" via config files or the registry. r=glandium + + +diff --git a/xpcom/build/dlldeps.cpp b/xpcom/build/dlldeps.cpp +--- a/xpcom/build/dlldeps.cpp ++++ b/xpcom/build/dlldeps.cpp +@@ -108,17 +108,16 @@ + + using namespace mozilla; + + class nsCStringContainer : private nsStringContainer_base { }; + class nsStringContainer : private nsStringContainer_base { }; + + void XXXNeverCalled() + { +- GRE_GetGREPathWithProperties(nsnull, 0, nsnull, 0, nsnull, 0); + nsTextFormatter::snprintf(nsnull,0,nsnull); + nsTextFormatter::smprintf(nsnull, nsnull); + nsTextFormatter::smprintf_free(nsnull); + nsVoidArray(); + nsSmallVoidArray(); + { + nsTArray array1(1), array2(1); + PRBool a, b, c; +diff --git a/xpcom/glue/nsGREGlue.cpp b/xpcom/glue/nsGREGlue.cpp +deleted file mode 100644 +--- a/xpcom/glue/nsGREGlue.cpp ++++ /dev/null +@@ -1,760 +0,0 @@ +-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +-/* ***** BEGIN LICENSE BLOCK ***** +- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 +- * +- * The contents of this file are subject to the Mozilla Public License Version +- * 1.1 (the "License"); you may not use this file except in compliance with +- * the License. You may obtain a copy of the License at +- * http://www.mozilla.org/MPL/ +- * +- * Software distributed under the License is distributed on an "AS IS" basis, +- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +- * for the specific language governing rights and limitations under the +- * License. +- * +- * The Original Code is Mozilla Communicator. +- * +- * The Initial Developer of the Original Code is +- * Netscape Communications Corp. +- * Portions created by the Initial Developer are Copyright (C) 2003 +- * the Initial Developer. All Rights Reserved. +- * +- * Contributor(s): +- * Sean Su +- * Benjamin Smedberg +- * +- * Alternatively, the contents of this file may be used under the terms of +- * either the GNU General Public License Version 2 or later (the "GPL"), or +- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +- * in which case the provisions of the GPL or the LGPL are applicable instead +- * of those above. If you wish to allow use of your version of this file only +- * under the terms of either the GPL or the LGPL, and not to allow others to +- * use your version of this file under the terms of the MPL, indicate your +- * decision by deleting the provisions above and replace them with the notice +- * and other provisions required by the GPL or the LGPL. If you do not delete +- * the provisions above, a recipient may use your version of this file under +- * the terms of any one of the MPL, the GPL or the LGPL. +- * +- * ***** END LICENSE BLOCK ***** */ +- +-#include "nsXPCOMGlue.h" +- +-#include "nsAutoPtr.h" +-#include "nsINIParser.h" +-#include "nsVersionComparator.h" +-#include "nsXPCOMPrivate.h" +- +-#include +-#include +-#include +-#include +- +-#ifdef XP_WIN32 +-# include +-# include +-# include +-# define snprintf _snprintf +-# define R_OK 04 +-#elif defined(XP_OS2) +-# define INCL_DOS +-# include +-#elif defined(XP_MACOSX) +-# include +-# include +-# include +-#elif defined(XP_UNIX) +-# include +-# include +-# include +-#endif +- +-#include +- +-/** +- * Like strncat, appends a buffer to another buffer. This is where the +- * similarity ends. Firstly, the "count" here is the total size of the buffer +- * (not the number of chars to append. Secondly, the function returns PR_FALSE +- * if the buffer is not long enough to hold the concatenated string. +- */ +-static PRBool safe_strncat(char *dest, const char *append, PRUint32 count) +-{ +- char *end = dest + count - 1; +- +- // skip to the end of dest +- while (*dest) +- ++dest; +- +- while (*append && dest < end) { +- *dest = *append; +- ++dest, ++append; +- } +- +- *dest = '\0'; +- +- return *append == '\0'; +-} +- +-#ifdef XP_WIN +-static PRBool +-CheckVersion(const PRUnichar* toCheck, +- const GREVersionRange *versions, +- PRUint32 versionsLength); +-#endif +-static PRBool +-CheckVersion(const char* toCheck, +- const GREVersionRange *versions, +- PRUint32 versionsLength); +- +- +-#if defined(XP_MACOSX) +- +-static PRBool +-GRE_FindGREFramework(const char* rootPath, +- const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char* buffer, PRUint32 buflen); +- +-#elif defined(XP_UNIX) +- +-static PRBool +-GRE_GetPathFromConfigDir(const char* dirname, +- const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char* buffer, PRUint32 buflen); +- +-static PRBool +-GRE_GetPathFromConfigFile(const char* filename, +- const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char* buffer, PRUint32 buflen); +- +-#elif defined(XP_WIN) +- +-static PRBool +-GRE_GetPathFromRegKey(HKEY aRegKey, +- const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char* buffer, PRUint32 buflen); +- +-#endif +- +-nsresult +-GRE_GetGREPathWithProperties(const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char *aBuffer, PRUint32 aBufLen) +-{ +-#ifdef TARGET_XPCOM_ABI +- // append the ABI to the properties to match only binary +- // compatible GREs +- static const GREProperty kExtraProperty = +- { "abi", TARGET_XPCOM_ABI }; +- +- nsAutoArrayPtr allProperties(new GREProperty[propertiesLength + 1]); +- if (!allProperties) +- return NS_ERROR_OUT_OF_MEMORY; +- +- for (PRUint32 i=0; i= aBufLen) +- return NS_ERROR_FILE_NAME_TOO_LONG; +- +- strcpy(aBuffer, p); +- +- return NS_OK; +- } +- +- // the Gecko bits that sit next to the application or in the LD_LIBRARY_PATH +- env = getenv("USE_LOCAL_GRE"); +- if (env && *env) { +- *aBuffer = nsnull; +- return NS_OK; +- } +- +-#ifdef XP_MACOSX +- aBuffer[0] = '\0'; +- +- // Check the bundle first, for /Contents/Frameworks/XUL.framework/libxpcom.dylib +- CFBundleRef appBundle = CFBundleGetMainBundle(); +- if (appBundle) { +- CFURLRef fwurl = CFBundleCopyPrivateFrameworksURL(appBundle); +- CFURLRef absfwurl = nsnull; +- if (fwurl) { +- absfwurl = CFURLCopyAbsoluteURL(fwurl); +- CFRelease(fwurl); +- } +- +- if (absfwurl) { +- CFURLRef xulurl = +- CFURLCreateCopyAppendingPathComponent(NULL, absfwurl, +- CFSTR(GRE_FRAMEWORK_NAME), +- PR_TRUE); +- +- if (xulurl) { +- CFURLRef xpcomurl = +- CFURLCreateCopyAppendingPathComponent(NULL, xulurl, +- CFSTR("libxpcom.dylib"), +- PR_FALSE); +- +- if (xpcomurl) { +- char tbuffer[MAXPATHLEN]; +- +- if (CFURLGetFileSystemRepresentation(xpcomurl, PR_TRUE, +- (UInt8*) tbuffer, +- sizeof(tbuffer)) && +- access(tbuffer, R_OK | X_OK) == 0) { +- if (!realpath(tbuffer, aBuffer)) { +- aBuffer[0] = '\0'; +- } +- } +- +- CFRelease(xpcomurl); +- } +- +- CFRelease(xulurl); +- } +- +- CFRelease(absfwurl); +- } +- } +- +- if (aBuffer[0]) +- return NS_OK; +- +- // Check ~/Library/Frameworks/XUL.framework/Versions//libxpcom.dylib +- const char *home = getenv("HOME"); +- if (home && *home && GRE_FindGREFramework(home, +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen)) { +- return NS_OK; +- } +- +- // Check /Library/Frameworks/XUL.framework/Versions//libxpcom.dylib +- if (GRE_FindGREFramework("", +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen)) { +- return NS_OK; +- } +- +-#elif defined(XP_UNIX) +- env = getenv("MOZ_GRE_CONF"); +- if (env && GRE_GetPathFromConfigFile(env, +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen)) { +- return NS_OK; +- } +- +- env = getenv("HOME"); +- if (env && *env) { +- char buffer[MAXPATHLEN]; +- +- // Look in ~/.gre.config +- +- snprintf(buffer, sizeof(buffer), +- "%s" XPCOM_FILE_PATH_SEPARATOR GRE_CONF_NAME, env); +- +- if (GRE_GetPathFromConfigFile(buffer, +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen)) { +- return NS_OK; +- } +- +- // Look in ~/.gre.d/*.conf +- +- snprintf(buffer, sizeof(buffer), +- "%s" XPCOM_FILE_PATH_SEPARATOR GRE_USER_CONF_DIR, env); +- +- if (GRE_GetPathFromConfigDir(buffer, +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen)) { +- return NS_OK; +- } +- } +- +- // Look for a global /etc/gre.conf file +- if (GRE_GetPathFromConfigFile(GRE_CONF_PATH, +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen)) { +- return NS_OK; +- } +- +- // Look for a group of config files in /etc/gre.d/ +- if (GRE_GetPathFromConfigDir(GRE_CONF_DIR, +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen)) { +- return NS_OK; +- } +- +-#elif defined(XP_WIN) +- HKEY hRegKey = NULL; +- +- // A couple of key points here: +- // 1. Note the usage of the "Software\\mozilla.org\\GRE" subkey - this allows +- // us to have multiple versions of GREs on the same machine by having +- // subkeys such as 1.0, 1.1, 2.0 etc. under it. +- // 2. In this sample below we're looking for the location of GRE version 1.2 +- // i.e. we're compatible with GRE 1.2 and we're trying to find it's install +- // location. +- // +- // Please see http://www.mozilla.org/projects/embedding/GRE.html for +- // more info. +- // +- if (::RegOpenKeyExW(HKEY_CURRENT_USER, GRE_WIN_REG_LOC, 0, +- KEY_READ, &hRegKey) == ERROR_SUCCESS) { +- PRBool ok = GRE_GetPathFromRegKey(hRegKey, +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen); +- ::RegCloseKey(hRegKey); +- +- if (ok) +- return NS_OK; +- } +- +- if (::RegOpenKeyExW(HKEY_LOCAL_MACHINE, GRE_WIN_REG_LOC, 0, +- KEY_ENUMERATE_SUB_KEYS, &hRegKey) == ERROR_SUCCESS) { +- PRBool ok = GRE_GetPathFromRegKey(hRegKey, +- versions, versionsLength, +- allProperties, allPropertiesLength, +- aBuffer, aBufLen); +- ::RegCloseKey(hRegKey); +- +- if (ok) +- return NS_OK; +- } +-#endif +- +- return NS_ERROR_FAILURE; +-} +- +-static PRBool +-CheckVersion(const char* toCheck, +- const GREVersionRange *versions, +- PRUint32 versionsLength) +-{ +- +- for (const GREVersionRange *versionsEnd = versions + versionsLength; +- versions < versionsEnd; +- ++versions) { +- PRInt32 c = NS_CompareVersions(toCheck, versions->lower); +- if (c < 0) +- continue; +- +- if (!c && !versions->lowerInclusive) +- continue; +- +- c = NS_CompareVersions(toCheck, versions->upper); +- if (c > 0) +- continue; +- +- if (!c && !versions->upperInclusive) +- continue; +- +- return PR_TRUE; +- } +- +- return PR_FALSE; +-} +- +-#ifdef XP_WIN +- +-// Allocate an array of characters using new[], converting from UTF8 to UTF-16. +-// @note Use nsAutoArrayPtr for this result. +- +-static PRUnichar* +-ConvertUTF8toNewUTF16(const char *cstr) +-{ +- int len = MultiByteToWideChar(CP_UTF8, 0, cstr, -1, NULL, 0); +- WCHAR *wstr = new WCHAR[len]; +- MultiByteToWideChar(CP_UTF8, 0, cstr, -1, wstr, len); +- return wstr; +-} +- +-typedef nsAutoArrayPtr AutoWString; +- +-static PRBool +-CheckVersion(const PRUnichar* toCheck, +- const GREVersionRange *versions, +- PRUint32 versionsLength) +-{ +- for (const GREVersionRange *versionsEnd = versions + versionsLength; +- versions < versionsEnd; +- ++versions) { +- AutoWString wlower(ConvertUTF8toNewUTF16(versions->lower)); +- PRInt32 c = NS_CompareVersions(toCheck, wlower); +- if (c < 0) +- continue; +- +- if (!c && !versions->lowerInclusive) +- continue; +- +- AutoWString wupper(ConvertUTF8toNewUTF16(versions->upper)); +- c = NS_CompareVersions(toCheck, wupper); +- if (c > 0) +- continue; +- +- if (!c && !versions->upperInclusive) +- continue; +- +- return PR_TRUE; +- } +- +- return PR_FALSE; +-} +-#endif +- +- +-#ifdef XP_MACOSX +-PRBool +-GRE_FindGREFramework(const char* rootPath, +- const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char* buffer, PRUint32 buflen) +-{ +- PRBool found = PR_FALSE; +- +- snprintf(buffer, buflen, +- "%s/Library/Frameworks/" GRE_FRAMEWORK_NAME "/Versions", rootPath); +- DIR *dir = opendir(buffer); +- if (dir) { +- struct dirent *entry; +- while (!found && (entry = readdir(dir))) { +- if (CheckVersion(entry->d_name, versions, versionsLength)) { +- snprintf(buffer, buflen, +- "%s/Library/Frameworks/" GRE_FRAMEWORK_NAME +- "/Versions/%s/" XPCOM_DLL, rootPath, entry->d_name); +- if (access(buffer, R_OK | X_OK) == 0) +- found = PR_TRUE; +- } +- } +- +- closedir(dir); +- } +- +- if (found) +- return PR_TRUE; +- +- buffer[0] = '\0'; +- return PR_FALSE; +-} +- +-#elif defined(XP_UNIX) +- +-static PRBool IsConfFile(const char *filename) +-{ +- const char *dot = strrchr(filename, '.'); +- +- return (dot && strcmp(dot, ".conf") == 0); +-} +- +-PRBool +-GRE_GetPathFromConfigDir(const char* dirname, +- const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char* buffer, PRUint32 buflen) +-{ +- // Open the directory provided and try to read any files in that +- // directory that end with .conf. We look for an entry that might +- // point to the GRE that we're interested in. +- DIR *dir = opendir(dirname); +- if (!dir) +- return nsnull; +- +- PRBool found = PR_FALSE; +- struct dirent *entry; +- +- while (!found && (entry = readdir(dir))) { +- +- // Only look for files that end in .conf +- // IsConfFile will skip "." and ".." +- if (!IsConfFile(entry->d_name)) +- continue; +- +- char fullPath[MAXPATHLEN]; +- snprintf(fullPath, sizeof(fullPath), "%s" XPCOM_FILE_PATH_SEPARATOR "%s", +- dirname, entry->d_name); +- +- found = GRE_GetPathFromConfigFile(fullPath, +- versions, versionsLength, +- properties, propertiesLength, +- buffer, buflen); +- } +- +- closedir(dir); +- +- return found; +-} +- +-#define READ_BUFFER_SIZE 1024 +- +-struct INIClosure +-{ +- nsINIParser *parser; +- const GREVersionRange *versions; +- PRUint32 versionsLength; +- const GREProperty *properties; +- PRUint32 propertiesLength; +- char *pathBuffer; +- PRUint32 buflen; +- PRBool found; +-}; +- +-static PRBool +-CheckINIHeader(const char *aHeader, void *aClosure) +-{ +- nsresult rv; +- +- INIClosure *c = reinterpret_cast(aClosure); +- +- if (!CheckVersion(aHeader, c->versions, c->versionsLength)) +- return PR_TRUE; +- +- const GREProperty *properties = c->properties; +- const GREProperty *endProperties = properties + c->propertiesLength; +- for (; properties < endProperties; ++properties) { +- char buffer[MAXPATHLEN]; +- rv = c->parser->GetString(aHeader, properties->property, +- buffer, sizeof(buffer)); +- if (NS_FAILED(rv)) +- return PR_TRUE; +- +- if (strcmp(buffer, properties->value)) +- return PR_TRUE; +- } +- +- rv = c->parser->GetString(aHeader, "GRE_PATH", c->pathBuffer, c->buflen); +- if (NS_FAILED(rv)) +- return PR_TRUE; +- +- if (!safe_strncat(c->pathBuffer, "/" XPCOM_DLL, c->buflen) || +- access(c->pathBuffer, R_OK)) +- return PR_TRUE; +- +- // We found a good GRE! Stop looking. +- c->found = PR_TRUE; +- return PR_FALSE; +-} +- +-PRBool +-GRE_GetPathFromConfigFile(const char* filename, +- const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char* pathBuffer, PRUint32 buflen) +-{ +- nsINIParser parser; +- nsresult rv = parser.Init(filename); +- if (NS_FAILED(rv)) +- return PR_FALSE; +- +- INIClosure c = { +- &parser, +- versions, versionsLength, +- properties, propertiesLength, +- pathBuffer, buflen, +- PR_FALSE +- }; +- +- parser.GetSections(CheckINIHeader, &c); +- return c.found; +-} +- +-#elif defined(XP_WIN) +- +-static PRBool +-CopyWithEnvExpansion(PRUnichar* aDest, const PRUnichar* aSource, PRUint32 aBufLen, +- DWORD aType) +-{ +- switch (aType) { +- case REG_SZ: +- if (wcslen(aSource) >= aBufLen) +- return PR_FALSE; +- +- wcscpy(aDest, aSource); +- return PR_TRUE; +- +- case REG_EXPAND_SZ: +- if (ExpandEnvironmentStringsW(aSource, aDest, aBufLen) > aBufLen) +- return PR_FALSE; +- +- return PR_TRUE; +- }; +- +- // Whoops! We expected REG_SZ or REG_EXPAND_SZ, what happened here? +- +- return PR_FALSE; +-} +- +-PRBool +-GRE_GetPathFromRegKey(HKEY aRegKey, +- const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char* aBuffer, PRUint32 aBufLen) +-{ +- // Formerly, GREs were registered at the registry key +- // HKLM/Software/mozilla.org/GRE/ valuepair GreHome=Path. +- // Nowadays, they are registered in any subkey of +- // Software/mozilla.org/GRE, with the following valuepairs: +- // Version= (REG_SZ) +- // GreHome= (REG_SZ or REG_EXPAND_SZ) +- // = (REG_SZ) +- // +- // Additional meta-info may be available in the future, including +- // localization info and other information which might be pertinent +- // to selecting one GRE over another. +- // +- // When a GRE is being registered, it should try to register itself at +- // HKLM/Software/mozilla.org/GRE/ first, to preserve compatibility +- // with older glue. If this key is already taken (i.e. there is more than +- // one GRE of that version installed), it should append a unique number to +- // the version, for example: +- // 1.1 (already in use), 1.1_1, 1.1_2, etc... +- +- DWORD i = 0; +- PRUnichar buffer[MAXPATHLEN + 1]; +- +- while (PR_TRUE) { +- PRUnichar name[MAXPATHLEN + 1]; +- DWORD nameLen = MAXPATHLEN; +- if (::RegEnumKeyExW(aRegKey, i, name, &nameLen, NULL, NULL, NULL, NULL) != +- ERROR_SUCCESS) { +- break; +- } +- +- HKEY subKey = NULL; +- if (::RegOpenKeyExW(aRegKey, name, 0, KEY_QUERY_VALUE, &subKey) != +- ERROR_SUCCESS) { +- continue; +- } +- +- PRUnichar version[40]; +- DWORD versionlen = 40; +- PRUnichar pathbuf[MAXPATHLEN + 1]; +- DWORD pathlen; +- DWORD pathtype; +- +- PRBool ok = PR_FALSE; +- +- if (::RegQueryValueExW(subKey, L"Version", NULL, NULL, +- (BYTE*) version, &versionlen) == ERROR_SUCCESS && +- CheckVersion(version, versions, versionsLength)) { +- +- ok = PR_TRUE; +- const GREProperty *props = properties; +- const GREProperty *propsEnd = properties + propertiesLength; +- for (; ok && props < propsEnd; ++props) { +- pathlen = MAXPATHLEN + 1; +- +- AutoWString wproperty(ConvertUTF8toNewUTF16(props->property)); +- AutoWString wvalue(ConvertUTF8toNewUTF16(props->value)); +- if (::RegQueryValueExW(subKey, wproperty, NULL, &pathtype, +- (BYTE*) pathbuf, &pathlen) != ERROR_SUCCESS || +- wcscmp(pathbuf, wvalue)) +- ok = PR_FALSE; +- } +- +- pathlen = sizeof(pathbuf); +- if (ok && +- (!::RegQueryValueExW(subKey, L"GreHome", NULL, &pathtype, +- (BYTE*) pathbuf, &pathlen) == ERROR_SUCCESS || +- !*pathbuf || +- !CopyWithEnvExpansion(buffer, pathbuf, MAXPATHLEN, pathtype))) { +- ok = PR_FALSE; +- } +- else if (!wcsncat(buffer, L"\\" LXPCOM_DLL, aBufLen) +-#ifdef WINCE +- || (GetFileAttributesW(buffer) == INVALID_FILE_ATTRIBUTES) +-#else +- || _waccess(buffer, R_OK) +-#endif +- ) { +- ok = PR_FALSE; +- } +- } +- +- RegCloseKey(subKey); +- +- if (ok) { +- WideCharToMultiByte(CP_UTF8, 0, buffer, -1, aBuffer, aBufLen, NULL, NULL); +- return PR_TRUE; +- } +- +- ++i; +- } +- +- aBuffer[0] = '\0'; +- +- return PR_FALSE; +-} +-#endif // XP_WIN +diff --git a/xpcom/glue/objs.mk b/xpcom/glue/objs.mk +--- a/xpcom/glue/objs.mk ++++ b/xpcom/glue/objs.mk +@@ -51,17 +51,16 @@ XPCOM_GLUE_SRC_LCPPSRCS = \ + nsComponentManagerUtils.cpp \ + nsEnumeratorUtils.cpp \ + nsID.cpp \ + nsIInterfaceRequestorUtils.cpp \ + nsINIParser.cpp \ + nsISupportsImpl.cpp \ + nsMemory.cpp \ + nsWeakReference.cpp \ +- nsGREGlue.cpp \ + nsVersionComparator.cpp \ + nsTHashtable.cpp \ + nsQuickSort.cpp \ + nsVoidArray.cpp \ + nsTArray.cpp \ + nsThreadUtils.cpp \ + nsTObserverArray.cpp \ + nsCycleCollectionParticipant.cpp \ +diff --git a/xpcom/glue/standalone/nsXPCOMGlue.h b/xpcom/glue/standalone/nsXPCOMGlue.h +--- a/xpcom/glue/standalone/nsXPCOMGlue.h ++++ b/xpcom/glue/standalone/nsXPCOMGlue.h +@@ -36,64 +36,16 @@ + * + * ***** END LICENSE BLOCK ***** */ + + #ifndef nsXPCOMGlue_h__ + #define nsXPCOMGlue_h__ + + #include "nscore.h" + +-class nsILocalFile; +- +-/** +- * The following function is available in both the standalone and +- * dynamically linked versions of the glue. +- */ +- +-struct GREVersionRange { +- const char *lower; +- PRBool lowerInclusive; +- const char *upper; +- PRBool upperInclusive; +-}; +- +-struct GREProperty { +- const char *property; +- const char *value; +-}; +- +-/** +- * Locate the path of the xpcom shared library from a GRE with specified +- * properties. +- * +- * @param versions An array of version ranges: if any version range +- * matches, the GRE is considered acceptable. +- * @param versionsLength The length of the versions array. +- * @param properties A null-terminated list of GRE property/value pairs +- * which must all be satisfied. +- * @param propertiesLength Length of the properties array. +- * @param buffer A buffer to be filled with the appropriate path. If +- * the "local" GRE is specified (via the USE_LOCAL_GRE +- * environment variable, for example), this buffer +- * will be set to the empty string. +- * @param buflen The length of buffer. This must be at least +- * PATH_MAX/MAXPATHLEN. +- * @throws NS_ERROR_FAILURE if an appropriate GRE could not be found. +- * @note The properties parameter is ignored on macintosh, because of the +- * manner in which the XUL frameworks are installed by version. +- * @note Currently this uses a "first-fit" algorithm, it does not select +- * the newest available GRE. +- */ +-extern "C" NS_COM_GLUE nsresult +-GRE_GetGREPathWithProperties(const GREVersionRange *versions, +- PRUint32 versionsLength, +- const GREProperty *properties, +- PRUint32 propertiesLength, +- char *buffer, PRUint32 buflen); +- + #ifdef XPCOM_GLUE + + /** + * The following functions are only available in the standalone glue. + */ + + /** + * Initialize the XPCOM glue by dynamically linking against the XPCOM +diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in +--- a/xulrunner/app/Makefile.in ++++ b/xulrunner/app/Makefile.in +@@ -68,30 +68,16 @@ endif + + ifdef TARGET_XPCOM_ABI + DEFINES += -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\" + endif + + + CPPSRCS = nsXULRunnerApp.cpp + +-ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) +-CPPSRCS += nsRegisterGREWin.cpp +-else +-ifeq (OS2,$(OS_ARCH)) +-CPPSRCS += nsRegisterGREVoid.cpp +-else +-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) +-CPPSRCS += nsRegisterGREVoid.cpp +-else +-CPPSRCS += nsRegisterGREUnix.cpp +-endif +-endif +-endif +- + LOCAL_INCLUDES += \ + -I$(topsrcdir)/toolkit/xre \ + -I$(topsrcdir)/toolkit/profile \ + -I$(topsrcdir)/xpcom/base \ + $(NULL) + + ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) + TK_LIBS := -framework Cocoa $(TK_LIBS) +diff --git a/xulrunner/app/nsRegisterGRE.h b/xulrunner/app/nsRegisterGRE.h +deleted file mode 100644 +--- a/xulrunner/app/nsRegisterGRE.h ++++ /dev/null +@@ -1,58 +0,0 @@ +-/* ***** BEGIN LICENSE BLOCK ***** +- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 +- * +- * The contents of this file are subject to the Mozilla Public License Version +- * 1.1 (the "License"); you may not use this file except in compliance with +- * the License. You may obtain a copy of the License at +- * http://www.mozilla.org/MPL/ +- * +- * Software distributed under the License is distributed on an "AS IS" basis, +- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +- * for the specific language governing rights and limitations under the +- * License. +- * +- * The Original Code is Mozilla XULRunner. +- * +- * The Initial Developer of the Original Code is +- * Benjamin Smedberg . +- * +- * Portions created by the Initial Developer are Copyright (C) 2005 +- * the Initial Developer. All Rights Reserved. +- * +- * Contributor(s): +- * +- * Alternatively, the contents of this file may be used under the terms of +- * either the GNU General Public License Version 2 or later (the "GPL"), or +- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +- * in which case the provisions of the GPL or the LGPL are applicable instead +- * of those above. If you wish to allow use of your version of this file only +- * under the terms of either the GPL or the LGPL, and not to allow others to +- * use your version of this file under the terms of the MPL, indicate your +- * decision by deleting the provisions above and replace them with the notice +- * and other provisions required by the GPL or the LGPL. If you do not delete +- * the provisions above, a recipient may use your version of this file under +- * the terms of any one of the MPL, the GPL or the LGPL. +- * +- * ***** END LICENSE BLOCK ***** */ +- +-#ifndef nsRegisterGRE_h__ +-#define nsRegisterGRE_h__ +- +-#include "nscore.h" +-#include "nsStringAPI.h" +-class nsIFile; +-struct GREProperty; +- +-/** +- * @return PR_TRUE on success +- */ +-NS_HIDDEN_(PRBool) +-RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, +- const GREProperty *aProperties, PRUint32 aPropertiesLen, +- const char *aGREMilestone); +- +-NS_HIDDEN_(void) +-UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation, +- const char *aGREMilestone); +- +-#endif // nsRegisterGRE_h__ +diff --git a/xulrunner/app/nsRegisterGREUnix.cpp b/xulrunner/app/nsRegisterGREUnix.cpp +deleted file mode 100644 +--- a/xulrunner/app/nsRegisterGREUnix.cpp ++++ /dev/null +@@ -1,272 +0,0 @@ +-/* ***** BEGIN LICENSE BLOCK ***** +- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 +- * +- * The contents of this file are subject to the Mozilla Public License Version +- * 1.1 (the "License"); you may not use this file except in compliance with +- * the License. You may obtain a copy of the License at +- * http://www.mozilla.org/MPL/ +- * +- * Software distributed under the License is distributed on an "AS IS" basis, +- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +- * for the specific language governing rights and limitations under the +- * License. +- * +- * The Original Code is Mozilla XULRunner. +- * +- * The Initial Developer of the Original Code is +- * Benjamin Smedberg . +- * +- * Portions created by the Initial Developer are Copyright (C) 2005 +- * the Initial Developer. All Rights Reserved. +- * +- * Contributor(s): +- * +- * Alternatively, the contents of this file may be used under the terms of +- * either the GNU General Public License Version 2 or later (the "GPL"), or +- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +- * in which case the provisions of the GPL or the LGPL are applicable instead +- * of those above. If you wish to allow use of your version of this file only +- * under the terms of either the GPL or the LGPL, and not to allow others to +- * use your version of this file under the terms of the MPL, indicate your +- * decision by deleting the provisions above and replace them with the notice +- * and other provisions required by the GPL or the LGPL. If you do not delete +- * the provisions above, a recipient may use your version of this file under +- * the terms of any one of the MPL, the GPL or the LGPL. +- * +- * ***** END LICENSE BLOCK ***** */ +- +-#include "nsRegisterGRE.h" +-#include "nsXPCOMGlue.h" +- +-#include "nsXPCOM.h" +-#include "nsIFile.h" +-#include "nsILocalFile.h" +-#include "mozilla/FileUtils.h" +- +-#include "nsAppRunner.h" // for MAXPATHLEN +-#include "nsStringAPI.h" +-#include "nsINIParser.h" +-#include "nsCOMPtr.h" +- +-#include "prio.h" +-#include "prprf.h" +-#include "prenv.h" +- +-#include +-#include +- +-// If we can't register .conf, we try to create a unique filename +-// by looping through _.conf, but if something is seriously wrong +-// we stop at 1000 +-#define UNIQ_LOOP_LIMIT 1000 +- +-using namespace mozilla; +- +-static const char kRegFileGlobal[] = "global.reginfo"; +-static const char kRegFileUser[] = "user.reginfo"; +- +-static PRBool +-MakeConfFile(const char *regfile, const nsCString &greHome, +- const GREProperty *aProperties, PRUint32 aPropertiesLen, +- const char *aGREMilestone) +-{ +- // If the file exists, don't create it again! +- if (access(regfile, R_OK) == 0) +- return PR_FALSE; +- +- PRBool ok = PR_TRUE; +- +- { // scope "fd" so that we can delete the file if something goes wrong +- AutoFDClose fd = PR_Open(regfile, PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, +- 0664); +- if (!fd) +- return PR_FALSE; +- +- static const char kHeader[] = +- "# Registration file generated by xulrunner. Do not edit.\n\n" +- "[%s]\n" +- "GRE_PATH=%s\n"; +- +- if (PR_fprintf(fd, kHeader, aGREMilestone, greHome.get()) <= 0) +- ok = PR_FALSE; +- +- for (PRUint32 i = 0; i < aPropertiesLen; ++i) { +- if (PR_fprintf(fd, "%s=%s\n", +- aProperties[i].property, aProperties[i].value) <= 0) +- ok = PR_FALSE; +- } +- } +- +- if (!ok) +- PR_Delete(regfile); +- +- return ok; +-} +- +- +-PRBool +-RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, +- const GREProperty *aProperties, PRUint32 aPropertiesLen, +- const char *aGREMilestone) +-{ +- // Register ourself in /etc/gre.d or ~/.gre.d/ and record what key we created +- // for future unregistration. +- +- nsresult rv; +- +- char root[MAXPATHLEN] = "/etc/gre.d"; +- +- if (!aRegisterGlobally) { +- char *home = PR_GetEnv("HOME"); +- if (!home || !*home) +- return PR_FALSE; +- +- PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); +- } +- +- nsCString greHome; +- rv = aLocation->GetNativePath(greHome); +- if (NS_FAILED(rv)) +- return rv; +- +- nsCOMPtr savedInfoFile; +- aLocation->Clone(getter_AddRefs(savedInfoFile)); +- nsCOMPtr localSaved(do_QueryInterface(savedInfoFile)); +- if (!localSaved) +- return PR_FALSE; +- +- const char *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; +- localSaved->AppendNative(nsDependentCString(infoname)); +- +- AutoFDClose fd; +- rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_RDWR, 0664, &fd); +- // XXX report error? +- if (NS_FAILED(rv)) +- return PR_FALSE; +- +- char keyName[MAXPATHLEN]; +- +- PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); +- if (r < 0) +- return PR_FALSE; +- +- char regfile[MAXPATHLEN]; +- +- if (r > 0) { +- keyName[r] = '\0'; +- +- PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, keyName); +- +- // There was already a .reginfo file, let's see if we are already +- // registered. +- if (access(regfile, R_OK) == 0) { +- fprintf(stderr, "Warning: Configuration file '%s' already exists.\n" +- "No action was performed.\n", regfile); +- return PR_FALSE; +- } +- +- rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd); +- if (NS_FAILED(rv)) +- return PR_FALSE; +- } +- +- if (access(root, R_OK | X_OK) && +- mkdir(root, 0775)) { +- fprintf(stderr, "Error: could not create '%s'.\n", +- root); +- return PR_FALSE; +- } +- +- PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, aGREMilestone); +- if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen, +- aGREMilestone)) { +- PR_fprintf(fd, "%s", aGREMilestone); +- return PR_TRUE; +- } +- +- for (int i = 0; i < UNIQ_LOOP_LIMIT; ++i) { +- static char buildID[30]; +- sprintf(buildID, "%s_%i", aGREMilestone, i); +- +- PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, buildID); +- +- if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen, +- aGREMilestone)) { +- PR_Write(fd, buildID, strlen(buildID)); +- return PR_TRUE; +- } +- } +- +- return PR_FALSE; +-} +- +-void +-UnregisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, +- const char *aGREMilestone) +-{ +- nsresult rv; +- +- char root[MAXPATHLEN] = "/etc/gre.d"; +- +- if (!aRegisterGlobally) { +- char *home = PR_GetEnv("HOME"); +- if (!home || !*home) +- return; +- +- PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); +- } +- +- nsCOMPtr savedInfoFile; +- aLocation->Clone(getter_AddRefs(savedInfoFile)); +- nsCOMPtr localSaved (do_QueryInterface(savedInfoFile)); +- if (!localSaved) +- return; +- +- const char *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; +- localSaved->AppendNative(nsDependentCString(infoname)); +- +- PRFileDesc* fd = nsnull; +- rv = localSaved->OpenNSPRFileDesc(PR_RDONLY, 0, &fd); +- if (NS_FAILED(rv)) { +- // XXX report error? +- return; +- } +- +- char keyName[MAXPATHLEN]; +- PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); +- PR_Close(fd); +- +- localSaved->Remove(PR_FALSE); +- +- if (r <= 0) +- return; +- +- keyName[r] = '\0'; +- +- char regFile[MAXPATHLEN]; +- PR_snprintf(regFile, MAXPATHLEN, "%s/%s.conf", root, keyName); +- +- nsCOMPtr lf; +- rv = NS_NewNativeLocalFile(nsDependentCString(regFile), PR_FALSE, +- getter_AddRefs(lf)); +- if (NS_FAILED(rv)) +- return; +- +- nsINIParser p; +- rv = p.Init(lf); +- if (NS_FAILED(rv)) +- return; +- +- rv = p.GetString(aGREMilestone, "GRE_PATH", root, MAXPATHLEN); +- if (NS_FAILED(rv)) +- return; +- +- rv = NS_NewNativeLocalFile(nsDependentCString(root), PR_TRUE, +- getter_AddRefs(lf)); +- if (NS_FAILED(rv)) +- return; +- +- PRBool eq; +- if (NS_SUCCEEDED(aLocation->Equals(lf, &eq)) && eq) +- PR_Delete(regFile); +-} +diff --git a/xulrunner/app/nsRegisterGREVoid.cpp b/xulrunner/app/nsRegisterGREVoid.cpp +deleted file mode 100644 +--- a/xulrunner/app/nsRegisterGREVoid.cpp ++++ /dev/null +@@ -1,57 +0,0 @@ +-/* ***** BEGIN LICENSE BLOCK ***** +- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 +- * +- * The contents of this file are subject to the Mozilla Public License Version +- * 1.1 (the "License"); you may not use this file except in compliance with +- * the License. You may obtain a copy of the License at +- * http://www.mozilla.org/MPL/ +- * +- * Software distributed under the License is distributed on an "AS IS" basis, +- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +- * for the specific language governing rights and limitations under the +- * License. +- * +- * The Original Code is Mozilla XULRunner. +- * +- * The Initial Developer of the Original Code is +- * Benjamin Smedberg . +- * +- * Portions created by the Initial Developer are Copyright (C) 2005 +- * the Initial Developer. All Rights Reserved. +- * +- * Contributor(s): +- * +- * Alternatively, the contents of this file may be used under the terms of +- * either the GNU General Public License Version 2 or later (the "GPL"), or +- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +- * in which case the provisions of the GPL or the LGPL are applicable instead +- * of those above. If you wish to allow use of your version of this file only +- * under the terms of either the GPL or the LGPL, and not to allow others to +- * use your version of this file under the terms of the MPL, indicate your +- * decision by deleting the provisions above and replace them with the notice +- * and other provisions required by the GPL or the LGPL. If you do not delete +- * the provisions above, a recipient may use your version of this file under +- * the terms of any one of the MPL, the GPL or the LGPL. +- * +- * ***** END LICENSE BLOCK ***** */ +- +-#include "nsRegisterGRE.h" +- +-#include +-#include +- +-int +-RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, +- const GREProperty *aProperties, PRUint32 aPropertiesLen, +- const char *aGREMilestone) +-{ +- fprintf(stderr, "Registration not implemented on this platform!\n"); +- return 1; +-} +- +-void +-UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation, +- const char *aGREMilestone) +-{ +- fprintf(stderr, "Registration not implemented on this platform!\n"); +-} +diff --git a/xulrunner/app/nsRegisterGREWin.cpp b/xulrunner/app/nsRegisterGREWin.cpp +deleted file mode 100644 +--- a/xulrunner/app/nsRegisterGREWin.cpp ++++ /dev/null +@@ -1,288 +0,0 @@ +-/* ***** BEGIN LICENSE BLOCK ***** +- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 +- * +- * The contents of this file are subject to the Mozilla Public License Version +- * 1.1 (the "License"); you may not use this file except in compliance with +- * the License. You may obtain a copy of the License at +- * http://www.mozilla.org/MPL/ +- * +- * Software distributed under the License is distributed on an "AS IS" basis, +- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +- * for the specific language governing rights and limitations under the +- * License. +- * +- * The Original Code is Mozilla XULRunner. +- * +- * The Initial Developer of the Original Code is +- * Benjamin Smedberg . +- * +- * Portions created by the Initial Developer are Copyright (C) 2005 +- * the Initial Developer. All Rights Reserved. +- * +- * Contributor(s): +- * +- * Alternatively, the contents of this file may be used under the terms of +- * either the GNU General Public License Version 2 or later (the "GPL"), or +- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +- * in which case the provisions of the GPL or the LGPL are applicable instead +- * of those above. If you wish to allow use of your version of this file only +- * under the terms of either the GPL or the LGPL, and not to allow others to +- * use your version of this file under the terms of the MPL, indicate your +- * decision by deleting the provisions above and replace them with the notice +- * and other provisions required by the GPL or the LGPL. If you do not delete +- * the provisions above, a recipient may use your version of this file under +- * the terms of any one of the MPL, the GPL or the LGPL. +- * +- * ***** END LICENSE BLOCK ***** */ +- +-#include "nsRegisterGRE.h" +- +-#include "nsXPCOM.h" +-#include "nsIFile.h" +-#include "nsILocalFile.h" +- +-#include "nsAppRunner.h" // for MAXPATHLEN +-#include "nsStringAPI.h" +-#include "nsXPCOMGlue.h" +-#include "nsCOMPtr.h" +- +-#include "prio.h" +- +-#include +-#include "malloc.h" +- +-static const wchar_t kRegKeyRoot[] = L"Software\\mozilla.org\\GRE"; +-static const wchar_t kRegFileGlobal[] = L"global.reginfo"; +-static const wchar_t kRegFileUser[] = L"user.reginfo"; +- +-static nsresult +-MakeVersionKey(HKEY root, const wchar_t* keyname, const nsString &grehome, +- const GREProperty *aProperties, PRUint32 aPropertiesLen, +- const wchar_t *aGREMilestone) +-{ +- HKEY subkey; +- DWORD disp; +- +- if (::RegCreateKeyExW(root, keyname, NULL, NULL, 0, KEY_WRITE, NULL, +- &subkey, &disp) != ERROR_SUCCESS) +- return NS_ERROR_FAILURE; +- +- if (disp != REG_CREATED_NEW_KEY) { +- ::RegCloseKey(subkey); +- return NS_ERROR_FAILURE; +- } +- +- PRBool failed = PR_FALSE; +- failed |= ::RegSetValueExW(subkey, L"Version", NULL, REG_SZ, +- (BYTE*) aGREMilestone, +- sizeof(PRUnichar) * (wcslen(aGREMilestone) + 1)) +- != ERROR_SUCCESS; +- failed |= ::RegSetValueExW(subkey, L"GreHome", NULL, REG_SZ, +- (BYTE*) grehome.get(), +- sizeof(PRUnichar) * (grehome.Length() + 1)) +- != ERROR_SUCCESS; +- +- for (PRUint32 i = 0; i < aPropertiesLen; ++i) { +- // Properties should be ascii only +- NS_ConvertASCIItoUTF16 prop(aProperties[i].property); +- NS_ConvertASCIItoUTF16 val(aProperties[i].value); +- failed |= ::RegSetValueExW(subkey, prop.get(), NULL, REG_SZ, +- (BYTE*) val.get(), +- sizeof(wchar_t)*(val.Length()+1) +- ) != ERROR_SUCCESS; +- } +- +- ::RegCloseKey(subkey); +- +- if (failed) { +- // we created a key but couldn't fill it properly: delete it +- ::RegDeleteKeyW(root, keyname); +- return NS_ERROR_FAILURE; +- } +- +- return NS_OK; +-} +- +-int +-RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, +- const GREProperty *aProperties, PRUint32 aPropertiesLen, +- const char *aGREMilestoneAscii) +-{ +- // Register ourself in the windows registry, and record what key we created +- // for future unregistration. +- +- nsresult rv; +- PRBool irv; +- int i; +- NS_ConvertASCIItoUTF16 aGREMilestone(aGREMilestoneAscii); +- nsString greHome; +- rv = aLocation->GetPath(greHome); +- if (NS_FAILED(rv)) +- return rv; +- +- nsCOMPtr savedInfoFile; +- aLocation->Clone(getter_AddRefs(savedInfoFile)); +- nsCOMPtr localSaved(do_QueryInterface(savedInfoFile)); +- if (!localSaved) +- return PR_FALSE; +- +- const wchar_t *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; +- localSaved->Append(nsDependentString(infoname)); +- +- PRFileDesc* fd = nsnull; +- rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_RDWR, 0664, &fd); +- if (NS_FAILED(rv)) { +- // XXX report error? +- return PR_FALSE; +- } +- +- HKEY rootKey = NULL; +- wchar_t keyName[MAXPATHLEN]; +- PRInt32 r; +- +- if (::RegCreateKeyExW(aRegisterGlobally ? HKEY_LOCAL_MACHINE : +- HKEY_CURRENT_USER, +- kRegKeyRoot, NULL, NULL, 0, KEY_WRITE, +- NULL, &rootKey, NULL) != ERROR_SUCCESS) { +- irv = PR_FALSE; +- goto reg_end; +- } +- +- r = PR_Read(fd, keyName, MAXPATHLEN); +- if (r < 0) { +- irv = PR_FALSE; +- goto reg_end; +- } +- +- if (r > 0) { +- keyName[r] = '\0'; +- +- // There was already a .reginfo file, let's see if we are already +- // registered. +- HKEY existing = NULL; +- if (::RegOpenKeyExW(rootKey, keyName, NULL, KEY_QUERY_VALUE, &existing) == +- ERROR_SUCCESS) { +- fprintf(stderr, "Warning: Registry key Software\\mozilla.org\\GRE\\%s already exists.\n" +- "No action was performed.\n", +- keyName); +- irv = PR_FALSE; +- goto reg_end; +- } +- +- PR_Close(fd); +- fd = nsnull; +- +- rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd); +- if (NS_FAILED(rv)) { +- // XXX report error? +- irv = PR_FALSE; +- goto reg_end; +- } +- } +- +- wcscpy(keyName, aGREMilestone.get()); +- rv = MakeVersionKey(rootKey, keyName, greHome, aProperties, aPropertiesLen, +- aGREMilestone.get()); +- if (NS_SUCCEEDED(rv)) { +- NS_ConvertUTF16toUTF8 keyNameAscii(keyName); +- PR_Write(fd, keyNameAscii.get(), sizeof(char)*keyNameAscii.Length()); +- irv = PR_TRUE; +- goto reg_end; +- } +- +- for (i = 0; i < 1000; ++i) { +- swprintf(keyName, L"%s_%i", aGREMilestone.get(), i); +- rv = MakeVersionKey(rootKey, keyName, greHome, +- aProperties, aPropertiesLen, +- aGREMilestone.get()); +- if (NS_SUCCEEDED(rv)) { +- NS_ConvertUTF16toUTF8 keyNameAscii(keyName); +- PR_Write(fd, keyNameAscii.get(), sizeof(char)*keyNameAscii.Length()); +- irv = PR_TRUE; +- goto reg_end; +- } +- } +- +- irv = PR_FALSE; +- +-reg_end: +- if (fd) +- PR_Close(fd); +- +- if (rootKey) +- ::RegCloseKey(rootKey); +- +- return irv; +-} +- +-void +-UnregisterXULRunner(PRBool aGlobal, nsIFile* aLocation, +- const char *aGREMilestone) +-{ +- nsCOMPtr savedInfoFile; +- aLocation->Clone(getter_AddRefs(savedInfoFile)); +- nsCOMPtr localSaved (do_QueryInterface(savedInfoFile)); +- if (!localSaved) +- return; +- +- const wchar_t *infoname = aGlobal ? kRegFileGlobal : kRegFileUser; +- localSaved->Append(nsDependentString(infoname)); +- +- PRFileDesc* fd = nsnull; +- nsresult rv = localSaved->OpenNSPRFileDesc(PR_RDONLY, 0, &fd); +- if (NS_FAILED(rv)) { +- // XXX report error? +- return; +- } +- +- wchar_t keyName[MAXPATHLEN]; +- PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); +- PR_Close(fd); +- +- localSaved->Remove(PR_FALSE); +- +- if (r <= 0) +- return; +- +- keyName[r] = '\0'; +- +- HKEY rootKey = NULL; +- if (::RegOpenKeyExW(aGlobal ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, +- kRegKeyRoot, 0, KEY_READ, &rootKey) != ERROR_SUCCESS) +- return; +- +- HKEY subKey = NULL; +- if (::RegOpenKeyExW(rootKey, keyName, 0, KEY_READ, &subKey) == ERROR_SUCCESS) { +- +- char regpath[MAXPATHLEN]; +- DWORD reglen = MAXPATHLEN; +- +- if (::RegQueryValueExW(subKey, L"GreHome", NULL, NULL, +- (BYTE*) regpath, ®len) == ERROR_SUCCESS) { +- +- nsCOMPtr regpathfile; +- rv = NS_NewNativeLocalFile(nsDependentCString(regpath), PR_FALSE, +- getter_AddRefs(regpathfile)); +- +- PRBool eq; +- if (NS_SUCCEEDED(rv) && +- NS_SUCCEEDED(aLocation->Equals(regpathfile, &eq)) && !eq) { +- // We think we registered for this key, but it doesn't point to +- // us any more! +- fprintf(stderr, "Warning: Registry key Software\\mozilla.org\\GRE\\%s points to\n" +- "alternate path '%s'; unregistration was not successful.\n", +- keyName, regpath); +- +- ::RegCloseKey(subKey); +- ::RegCloseKey(rootKey); +- +- return; +- } +- } +- +- ::RegCloseKey(subKey); +- } +- +- ::RegDeleteKeyW(rootKey, keyName); +- ::RegCloseKey(rootKey); +-} +diff --git a/xulrunner/app/nsXULRunnerApp.cpp b/xulrunner/app/nsXULRunnerApp.cpp +--- a/xulrunner/app/nsXULRunnerApp.cpp ++++ b/xulrunner/app/nsXULRunnerApp.cpp +@@ -38,17 +38,16 @@ + #include + #include + #ifdef XP_WIN + #include + #endif + + #include "nsXULAppAPI.h" + #include "nsXPCOMGlue.h" +-#include "nsRegisterGRE.h" + #include "nsAppRunner.h" + #include "nsILocalFile.h" + #include "nsIXULAppInstall.h" + #include "nsCOMPtr.h" + #include "nsMemory.h" + #include "nsCRTGlue.h" + #include "nsStringAPI.h" + #include "nsServiceManagerUtils.h" +@@ -256,26 +255,16 @@ InstallXULApp(nsIFile* aXULRunnerDir, + NS_ShutdownXPCOM(nsnull); + + if (NS_FAILED(rv)) + return 3; + + return 0; + } + +-static const GREProperty kGREProperties[] = { +- { "xulrunner", "true" } +-#ifdef TARGET_XPCOM_ABI +- , { "abi", TARGET_XPCOM_ABI } +-#endif +-#ifdef MOZ_JAVAXPCOM +- , { "javaxpcom", "1" } +-#endif +-}; +- + class AutoAppData + { + public: + AutoAppData(nsILocalFile* aINIFile) : mAppData(nsnull) { + nsresult rv = XRE_CreateAppData(aINIFile, &mAppData); + if (NS_FAILED(rv)) + mAppData = nsnull; + } +@@ -312,77 +301,16 @@ int main(int argc, char* argv[]) + } + + if (argc > 1) { + nsCAutoString milestone; + nsresult rv = GetGREVersion(argv[0], &milestone, nsnull); + if (NS_FAILED(rv)) + return 2; + +- PRBool registerGlobal = IsArg(argv[1], "register-global"); +- PRBool registerUser = IsArg(argv[1], "register-user"); +- if (registerGlobal || registerUser) { +- if (argc != 2) { +- Usage(argv[0]); +- return 1; +- } +- +- nsCOMPtr regDir; +- rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); +- if (NS_FAILED(rv)) +- return 2; +- +- return RegisterXULRunner(registerGlobal, regDir, +- kGREProperties, +- NS_ARRAY_LENGTH(kGREProperties), +- milestone.get()) ? 0 : 2; +- } +- +- registerGlobal = IsArg(argv[1], "unregister-global"); +- registerUser = IsArg(argv[1], "unregister-user"); +- if (registerGlobal || registerUser) { +- if (argc != 2) { +- Usage(argv[0]); +- return 1; +- } +- +- nsCOMPtr regDir; +- rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); +- if (NS_FAILED(rv)) +- return 2; +- +- UnregisterXULRunner(registerGlobal, regDir, milestone.get()); +- return 0; +- } +- +- if (IsArg(argv[1], "find-gre")) { +- if (argc != 3) { +- Usage(argv[0]); +- return 1; +- } +- +- char path[MAXPATHLEN]; +- static const GREVersionRange vr = { +- argv[2], PR_TRUE, +- argv[2], PR_TRUE +- }; +- static const GREProperty kProperties[] = { +- { "xulrunner", "true" } +- }; +- +- rv = GRE_GetGREPathWithProperties(&vr, 1, kProperties, +- NS_ARRAY_LENGTH(kProperties), +- path, sizeof(path)); +- if (NS_FAILED(rv)) +- return 1; +- +- printf("%s\n", path); +- return 0; +- } +- + if (IsArg(argv[1], "gre-version")) { + if (argc != 2) { + Usage(argv[0]); + return 1; + } + + printf("%s\n", milestone.get()); + return 0; +diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in +--- a/xulrunner/installer/Makefile.in ++++ b/xulrunner/installer/Makefile.in +@@ -62,29 +62,16 @@ PKG_DMG_SOURCE = $(STAGEPATH)xulrunner-p + endif + + include $(topsrcdir)/config/rules.mk + + INSTALL_SDK = 1 + + include $(topsrcdir)/toolkit/mozapps/installer/packager.mk + +-$(MOZILLA_VERSION).system.conf: $(topsrcdir)/config/milestone.txt Makefile +- printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \ +- $(MOZILLA_VERSION) $(installdir) $(TARGET_XPCOM_ABI)> $@ +- +-ifndef SKIP_GRE_REGISTRATION +-# to register xulrunner per-user, override this with $HOME/.gre.d +-regdir = /etc/gre.d +- +-install:: $(MOZILLA_VERSION).system.conf +- $(NSINSTALL) -D $(DESTDIR)$(regdir) +- $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(regdir) +-endif +- + # Add pkg-config files to the install:: target + + pkg_config_files = \ + libxul.pc \ + libxul-embedding.pc \ + mozilla-js.pc \ + mozilla-plugin.pc \ + mozilla-gtkmozembed.pc \ +diff --git a/xulrunner/stub/nsXULStub.cpp b/xulrunner/stub/nsXULStub.cpp +--- a/xulrunner/stub/nsXULStub.cpp ++++ b/xulrunner/stub/nsXULStub.cpp +@@ -430,64 +430,19 @@ main(int argc, char **argv) + // Forward the command-line and bail out + ForwardToWindow(wnd); + return 0; + } + } + #endif + + if (!greFound) { +- char minVersion[VERSION_MAXLEN]; +- +- // If a gecko maxVersion is not specified, we assume that the app uses only +- // frozen APIs, and is therefore compatible with any xulrunner 1.x. +- char maxVersion[VERSION_MAXLEN] = "1.*"; +- +- GREVersionRange range = { +- minVersion, +- PR_TRUE, +- maxVersion, +- PR_TRUE +- }; +- +- rv = parser.GetString("Gecko", "MinVersion", minVersion, sizeof(minVersion)); +- if (NS_FAILED(rv)) { +- fprintf(stderr, +- "The application.ini does not specify a [Gecko] MinVersion\n"); ++ Output(PR_FALSE, ++ "Could not find the Mozilla runtime.\n"); + return 1; +- } +- +- rv = parser.GetString("Gecko", "MaxVersion", maxVersion, sizeof(maxVersion)); +- if (NS_SUCCEEDED(rv)) +- range.upperInclusive = PR_TRUE; +- +- static const GREProperty kProperties[] = { +- { "xulrunner", "true" } +- }; +- +- rv = GRE_GetGREPathWithProperties(&range, 1, +- kProperties, NS_ARRAY_LENGTH(kProperties), +- greDir, sizeof(greDir)); +- if (NS_FAILED(rv)) { +- // XXXbsmedberg: Do something much smarter here: notify the +- // user/offer to download/? +- +- Output(PR_FALSE, +- "Could not find compatible GRE between version %s and %s.\n", +- range.lower, range.upper); +- return 1; +- } +-#ifdef XP_UNIX +- // Using a symlinked greDir will fail during startup. Not sure why, but if +- // we resolve the symlink, everything works as expected. +- char resolved_greDir[MAXPATHLEN] = ""; +- if (realpath(greDir, resolved_greDir) && *resolved_greDir) { +- strncpy(greDir, resolved_greDir, MAXPATHLEN); +- } +-#endif + } + + #ifdef XP_OS2 + // On OS/2 we need to set BEGINLIBPATH to be able to find XULRunner DLLs + strcpy(tmpPath, greDir); + lastSlash = strrchr(tmpPath, PATH_SEPARATOR_CHAR); + if (lastSlash) { + *lastSlash = '\0'; + diff --git a/xulrunner.spec b/xulrunner.spec index 5071828..0d4c456 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,6 +77,7 @@ Patch1: mozilla-build.patch Patch9: mozilla-build-sbrk.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch +Patch15: firefox-5.0-xulstub.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -202,6 +203,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch9 -p2 -b .sbrk %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types +%patch15 -p1 -R -b .xulstub %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo @@ -374,10 +376,10 @@ done popd # GRE stuff -#MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` -#%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ -# $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} -#chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} +MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` +%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ + $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} +chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d @@ -423,8 +425,8 @@ fi %files %defattr(-,root,root,-) %{_bindir}/xulrunner -#%dir %{_sysconfdir}/gre.d -#%{_sysconfdir}/gre.d/gre*.conf +%dir %{_sysconfdir}/gre.d +%{_sysconfdir}/gre.d/gre*.conf %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.txt From 7c60274b4a1f1588a5739d0c81ab0ead22494ca9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 Jun 2011 12:44:45 +0200 Subject: [PATCH 181/486] Reverted mozbz#648156 - Remove gtkmozembed --- add-gtkmozembed.patch | 8800 +++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 7 +- 2 files changed, 8806 insertions(+), 1 deletion(-) create mode 100644 add-gtkmozembed.patch diff --git a/add-gtkmozembed.patch b/add-gtkmozembed.patch new file mode 100644 index 0000000..027ff6f --- /dev/null +++ b/add-gtkmozembed.patch @@ -0,0 +1,8800 @@ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-06-22 12:14:58.776816358 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in 2011-06-22 12:14:58.776816358 +0200 +@@ -0,0 +1,54 @@ ++# ++# ***** BEGIN LICENSE BLOCK ***** ++# Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++# ++# The contents of this file are subject to the Mozilla Public License Version ++# 1.1 (the "License"); you may not use this file except in compliance with ++# the License. You may obtain a copy of the License at ++# http://www.mozilla.org/MPL/ ++# ++# Software distributed under the License is distributed on an "AS IS" basis, ++# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++# for the specific language governing rights and limitations under the ++# License. ++# ++# The Original Code is the Mozilla browser. ++# ++# The Initial Developer of the Original Code is ++# Christopher Blizzard. ++# Portions created by the Initial Developer are Copyright (C) 1999 ++# the Initial Developer. All Rights Reserved. ++# ++# Contributor(s): ++# Christopher Blizzard ++# ++# Alternatively, the contents of this file may be used under the terms of ++# either the GNU General Public License Version 2 or later (the "GPL"), or ++# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++# in which case the provisions of the GPL or the LGPL are applicable instead ++# of those above. If you wish to allow use of your version of this file only ++# under the terms of either the GPL or the LGPL, and not to allow others to ++# use your version of this file under the terms of the MPL, indicate your ++# decision by deleting the provisions above and replace them with the notice ++# and other provisions required by the GPL or the LGPL. If you do not delete ++# the provisions above, a recipient may use your version of this file under ++# the terms of any one of the MPL, the GPL or the LGPL. ++# ++# ***** END LICENSE BLOCK ***** ++ ++DEPTH = ../../.. ++topsrcdir = @top_srcdir@ ++srcdir = @srcdir@ ++VPATH = @srcdir@ ++ ++include $(DEPTH)/config/autoconf.mk ++ ++MODULE = gtkembedmoz ++ ++DIRS=src ++ ++ifdef ENABLE_TESTS ++TOOL_DIRS += tests ++endif ++ ++include $(topsrcdir)/config/rules.mk +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-06-22 12:14:58.777816363 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-06-22 12:14:58.777816363 +0200 +@@ -0,0 +1,253 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Terry Hayes ++ * Javier Delgadillo ++ * Oleg Romashin ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++/** ++ * Derived from nsNSSDialogs http://landfill.mozilla.org/mxr-test/seamonkey/source/security/manager/pki/src/nsNSSDialogs.cpp ++ */ ++#include ++#include "nsIURI.h" ++#include "EmbedPrivate.h" ++#include "nsServiceManagerUtils.h" ++#include "nsIWebNavigationInfo.h" ++#include "nsDocShellCID.h" ++#include "nsCOMPtr.h" ++#ifdef MOZILLA_INTERNAL_API ++#include "nsString.h" ++#include "nsXPIDLString.h" ++#include "nsReadableUtils.h" ++#else ++#include "nsStringAPI.h" ++#endif ++#include "nsIPrompt.h" ++#include "nsIDOMWindowInternal.h" ++#include "nsIComponentManager.h" ++#include "nsIServiceManager.h" ++#include "nsIStringBundle.h" ++#include "nsIInterfaceRequestor.h" ++#include "nsIInterfaceRequestorUtils.h" ++#include "nsIX509Cert.h" ++#include "nsIX509CertDB.h" ++#include "nsIDateTimeFormat.h" ++#include "nsDateTimeFormatCID.h" ++#include "EmbedCertificates.h" ++#include "nsIKeygenThread.h" ++#include "nsIX509CertValidity.h" ++#include "nsICRLInfo.h" ++#include "gtkmozembed.h" ++ ++#define PIPSTRING_BUNDLE_URL "chrome://pippki/locale/pippki.properties" ++ ++EmbedCertificates::EmbedCertificates(void) ++{ ++} ++ ++EmbedCertificates::~EmbedCertificates() ++{ ++} ++ ++NS_IMPL_THREADSAFE_ADDREF(EmbedCertificates) ++NS_IMPL_THREADSAFE_RELEASE(EmbedCertificates) ++NS_INTERFACE_MAP_BEGIN(EmbedCertificates) ++NS_INTERFACE_MAP_ENTRY(nsITokenPasswordDialogs) ++NS_INTERFACE_MAP_ENTRY(nsICertificateDialogs) ++NS_INTERFACE_MAP_ENTRY(nsIClientAuthDialogs) ++NS_INTERFACE_MAP_ENTRY(nsICertPickDialogs) ++NS_INTERFACE_MAP_ENTRY(nsITokenDialogs) ++NS_INTERFACE_MAP_ENTRY(nsIGeneratingKeypairInfoDialogs) ++NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCryptoDialogs) ++NS_INTERFACE_MAP_END ++ ++nsresult ++EmbedCertificates::Init(void) ++{ ++ nsresult rv; ++ nsCOMPtr service = ++ do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); ++ if (NS_FAILED(rv)) return NS_OK; ++ rv = service->CreateBundle(PIPSTRING_BUNDLE_URL, ++ getter_AddRefs(mPIPStringBundle)); ++ return NS_OK; ++} ++ ++nsresult ++EmbedCertificates::SetPassword(nsIInterfaceRequestor *ctx, ++ const PRUnichar *tokenName, PRBool* _canceled) ++{ ++ *_canceled = PR_FALSE; ++ return NS_OK; ++} ++ ++nsresult ++EmbedCertificates::GetPassword(nsIInterfaceRequestor *ctx, ++ const PRUnichar *tokenName, ++ PRUnichar **_password, ++ PRBool* _canceled) ++{ ++ *_canceled = PR_FALSE; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) ++{ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, ++ nsIX509Cert *cert, ++ PRUint32 *_trust, ++ PRBool *_retval) ++{ ++ // If an implementation chooses not to implement UI for displaying ++ // the cert and asking the user for confirmation, ++ // then this function must return PR_FALSE. ++ *_retval = PR_FALSE; ++ *_trust = nsIX509CertDB::UNTRUSTED; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::NotifyCACertExists(nsIInterfaceRequestor *ctx) ++{ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::ChooseCertificate( ++ nsIInterfaceRequestor *ctx, ++ const PRUnichar *cn, ++ const PRUnichar *organization, ++ const PRUnichar *issuer, ++ const PRUnichar **certNickList, ++ const PRUnichar **certDetailsList, ++ PRUint32 count, ++ PRInt32 *selectedIndex, ++ PRBool *canceled) ++{ ++ *canceled = PR_FALSE; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::PickCertificate( ++ nsIInterfaceRequestor *ctx, ++ const PRUnichar **certNickList, ++ const PRUnichar **certDetailsList, ++ PRUint32 count, ++ PRInt32 *selectedIndex, ++ PRBool *canceled) ++{ ++ *canceled = PR_FALSE; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::SetPKCS12FilePassword( ++ nsIInterfaceRequestor *ctx, ++ nsAString &_password, ++ PRBool *_retval) ++{ ++ /* The person who wrote this method implementation did ++ * not read the contract. ++ */ ++ *_retval = PR_FALSE; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::GetPKCS12FilePassword( ++ nsIInterfaceRequestor *ctx, ++ nsAString &_password, ++ PRBool *_retval) ++{ ++ /* The person who wrote this method implementation did ++ * not read the contract. ++ */ ++ *_retval = PR_FALSE; ++ return NS_OK; ++} ++ ++/* void viewCert (in nsIX509Cert cert); */ ++NS_IMETHODIMP ++EmbedCertificates::ViewCert( ++ nsIInterfaceRequestor *ctx, ++ nsIX509Cert *cert) ++{ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::DisplayGeneratingKeypairInfo(nsIInterfaceRequestor *aCtx, nsIKeygenThread *runnable) ++{ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::ChooseToken( ++ nsIInterfaceRequestor *aCtx, ++ const PRUnichar **aTokenList, ++ PRUint32 aCount, ++ PRUnichar **aTokenChosen, ++ PRBool *aCanceled) ++{ ++ *aCanceled = PR_FALSE; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedCertificates::DisplayProtectedAuth( ++ nsIInterfaceRequestor *aCtx, ++ nsIProtectedAuthThread *runnable) ++{ ++ return NS_OK; ++} ++ ++/* boolean ConfirmKeyEscrow (in nsIX509Cert escrowAuthority); */ ++NS_IMETHODIMP ++EmbedCertificates::ConfirmKeyEscrow(nsIX509Cert *escrowAuthority, PRBool *_retval) ++{ ++ // If an implementation chooses not to implement UI that asks the user for ++ // confirmation to hand out the private key, ++ // then this function must return PR_FALSE. ++ *_retval = PR_FALSE; ++ return NS_OK; ++} ++ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-06-22 12:14:58.778816368 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h 2011-06-22 12:14:58.778816368 +0200 +@@ -0,0 +1,84 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* vim:set ts=2 sw=2 sts=2 et cindent: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Terry Hayes ++ * Javier Delgadillo ++ * Oleg Romashin ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++/** ++ * Derived from nsNSSDialogs http://landfill.mozilla.org/mxr-test/seamonkey/source/security/manager/pki/src/nsNSSDialogs.h ++ */ ++#ifndef __EmbedCertificates_h ++#define __EmbedCertificates_h ++#include "nsITokenPasswordDialogs.h" ++#include "nsICertificateDialogs.h" ++#include "nsIClientAuthDialogs.h" ++#include "nsICertPickDialogs.h" ++#include "nsITokenDialogs.h" ++#include "nsIDOMCryptoDialogs.h" ++#include "nsIGenKeypairInfoDlg.h" ++#include "nsCOMPtr.h" ++#include "nsIStringBundle.h" ++#define EMBED_CERTIFICATES_CID \ ++ { 0x518e071f, 0x1dd2, 0x11b2, \ ++ { 0x93, 0x7e, 0xc4, 0x5f, 0x14, 0xde, 0xf7, 0x78 }} ++#define EMBED_CERTIFICATES_DESCRIPTION "Certificates Listener Impl" ++class EmbedPrivate; ++class EmbedCertificates ++: public nsITokenPasswordDialogs, ++ public nsICertificateDialogs, ++ public nsIClientAuthDialogs, ++ public nsICertPickDialogs, ++ public nsITokenDialogs, ++ public nsIDOMCryptoDialogs, ++ public nsIGeneratingKeypairInfoDialogs ++{ ++ public: ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSITOKENPASSWORDDIALOGS ++ NS_DECL_NSICERTIFICATEDIALOGS ++ NS_DECL_NSICLIENTAUTHDIALOGS ++ NS_DECL_NSICERTPICKDIALOGS ++ NS_DECL_NSITOKENDIALOGS ++ NS_DECL_NSIDOMCRYPTODIALOGS ++ NS_DECL_NSIGENERATINGKEYPAIRINFODIALOGS ++ EmbedCertificates(); ++ virtual ~EmbedCertificates(); ++ nsresult Init(void); ++ protected: ++ nsCOMPtr mPIPStringBundle; ++}; ++#endif /* __EmbedCertificates_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-06-22 12:14:58.780816378 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-06-22 12:14:58.780816378 +0200 +@@ -0,0 +1,156 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsIURI.h" ++ ++#include "EmbedContentListener.h" ++#include "EmbedPrivate.h" ++ ++#include "nsServiceManagerUtils.h" ++#include "nsIWebNavigationInfo.h" ++#include "nsDocShellCID.h" ++ ++EmbedContentListener::EmbedContentListener(void) ++{ ++ mOwner = nsnull; ++} ++ ++EmbedContentListener::~EmbedContentListener() ++{ ++} ++ ++NS_IMPL_ISUPPORTS2(EmbedContentListener, ++ nsIURIContentListener, ++ nsISupportsWeakReference) ++ ++nsresult ++EmbedContentListener::Init(EmbedPrivate *aOwner) ++{ ++ mOwner = aOwner; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedContentListener::OnStartURIOpen(nsIURI *aURI, ++ PRBool *aAbortOpen) ++{ ++ nsresult rv; ++ ++ nsCAutoString specString; ++ rv = aURI->GetSpec(specString); ++ ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[OPEN_URI], 0, ++ specString.get(), &return_val); ++ ++ *aAbortOpen = return_val; ++ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedContentListener::DoContent(const char *aContentType, ++ PRBool aIsContentPreferred, ++ nsIRequest *aRequest, ++ nsIStreamListener **aContentHandler, ++ PRBool *aAbortProcess) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++EmbedContentListener::IsPreferred(const char *aContentType, ++ char **aDesiredContentType, ++ PRBool *aCanHandleContent) ++{ ++ return CanHandleContent(aContentType, PR_TRUE, aDesiredContentType, ++ aCanHandleContent); ++} ++ ++NS_IMETHODIMP ++EmbedContentListener::CanHandleContent(const char *aContentType, ++ PRBool aIsContentPreferred, ++ char **aDesiredContentType, ++ PRBool *_retval) ++{ ++ *_retval = PR_FALSE; ++ *aDesiredContentType = nsnull; ++ ++ if (aContentType) { ++ nsCOMPtr webNavInfo( ++ do_GetService(NS_WEBNAVIGATION_INFO_CONTRACTID)); ++ if (webNavInfo) { ++ PRUint32 canHandle; ++ nsresult rv = ++ webNavInfo->IsTypeSupported(nsDependentCString(aContentType), ++ mOwner ? mOwner->mNavigation.get() : nsnull, ++ &canHandle); ++ NS_ENSURE_SUCCESS(rv, rv); ++ *_retval = (canHandle != nsIWebNavigationInfo::UNSUPPORTED); ++ } ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedContentListener::GetLoadCookie(nsISupports **aLoadCookie) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++EmbedContentListener::SetLoadCookie(nsISupports *aLoadCookie) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++EmbedContentListener::GetParentContentListener(nsIURIContentListener **aParent) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++EmbedContentListener::SetParentContentListener(nsIURIContentListener *aParent) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-06-22 12:14:58.781816383 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h 2011-06-22 12:14:58.781816383 +0200 +@@ -0,0 +1,66 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef __EmbedContentListener_h ++#define __EmbedContentListener_h ++ ++#include "nsIURIContentListener.h" ++#include "nsWeakReference.h" ++ ++class EmbedPrivate; ++ ++class EmbedContentListener : public nsIURIContentListener, ++ public nsSupportsWeakReference ++{ ++ public: ++ ++ EmbedContentListener(); ++ virtual ~EmbedContentListener(); ++ ++ nsresult Init (EmbedPrivate *aOwner); ++ ++ NS_DECL_ISUPPORTS ++ ++ NS_DECL_NSIURICONTENTLISTENER ++ ++ private: ++ ++ EmbedPrivate *mOwner; ++ ++}; ++ ++#endif /* __EmbedContentListener_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-06-22 12:14:58.783816393 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-06-22 12:14:58.783816393 +0200 +@@ -0,0 +1,618 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Oleg Romashin. ++ * Portions created by the Initial Developer are Copyright (C) 2006 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Oleg Romashin ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++#include "EmbedContextMenuInfo.h" ++#include "nsIImageLoadingContent.h" ++#include "imgILoader.h" ++#include "nsIDOMDocument.h" ++#include "nsIDOMHTMLDocument.h" ++#include "nsIDOMHTMLElement.h" ++#include "nsIDOMHTMLHtmlElement.h" ++#include "nsIDOMHTMLAnchorElement.h" ++#include "nsIDOMHTMLImageElement.h" ++#include "nsIDOMHTMLAreaElement.h" ++#include "nsIDOMHTMLLinkElement.h" ++#include "nsIDOMDocumentView.h" ++#include "nsIDOMAbstractView.h" ++#include "nsIDOMViewCSS.h" ++#include "nsIDOMCSSStyleDeclaration.h" ++#include "nsIDOMCSSValue.h" ++#include "nsIDOMCSSPrimitiveValue.h" ++#include "nsNetUtil.h" ++#include "nsUnicharUtils.h" ++#include "nsIDOMMouseEvent.h" ++#include "nsIDOMNSEvent.h" ++#include "nsIDOMWindow.h" ++#include "nsIDOMWindowCollection.h" ++#include "nsIWebBrowser.h" ++#include "nsIContent.h" ++#include "nsIPresShell.h" ++#include "nsIFormControl.h" ++#include "nsIDOMNSHTMLTextAreaElement.h" ++#include "nsIDOMHTMLInputElement.h" ++#include "nsIDOMHTMLTextAreaElement.h" ++#include "nsIDOMNSHTMLDocument.h" ++#include "nsIDOMNodeList.h" ++#include "nsISelection.h" ++#include "nsIDocument.h" ++#include "EmbedPrivate.h" ++#include ++#include ++#include ++#include ++#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) ++#include "nsIFrame.h" ++#endif ++ ++//***************************************************************************** ++// class EmbedContextMenuInfo ++//***************************************************************************** ++EmbedContextMenuInfo::EmbedContextMenuInfo(EmbedPrivate *aOwner) : mCtxFrameNum(-1), mEmbedCtxType(0) ++{ ++ mOwner = aOwner; ++ mEventNode = nsnull; ++ mCtxDocument = nsnull; ++ mNSHHTMLElement = nsnull; ++ mNSHHTMLElementSc = nsnull; ++ mCtxEvent = nsnull; ++ mEventNode = nsnull; ++ mFormRect = nsIntRect(0,0,0,0); ++} ++ ++EmbedContextMenuInfo::~EmbedContextMenuInfo(void) ++{ ++ mEventNode = nsnull; ++ mCtxDocument = nsnull; ++ mNSHHTMLElement = nsnull; ++ mNSHHTMLElementSc = nsnull; ++ mCtxEvent = nsnull; ++ mEventNode = nsnull; ++} ++ ++NS_IMPL_ADDREF(EmbedContextMenuInfo) ++NS_IMPL_RELEASE(EmbedContextMenuInfo) ++NS_INTERFACE_MAP_BEGIN(EmbedContextMenuInfo) ++NS_INTERFACE_MAP_ENTRY(nsISupports) ++NS_INTERFACE_MAP_END ++ ++nsresult ++EmbedContextMenuInfo::SetFrameIndex() ++{ ++ nsCOMPtr frames; ++ mCtxDomWindow->GetFrames(getter_AddRefs(frames)); ++ nsCOMPtr currentWindow; ++ PRUint32 frameCount = 0; ++ frames->GetLength(&frameCount); ++ for (unsigned int i= 0; i < frameCount; i++) { ++ frames->Item(i, getter_AddRefs(currentWindow)); ++ nsCOMPtr currentDoc; ++ currentWindow->GetDocument(getter_AddRefs(currentDoc)); ++ if (currentDoc == mCtxDocument) { ++ mCtxFrameNum = i; ++ mCtxDomWindow = currentWindow; ++ nsCOMPtr doc = do_QueryInterface(currentDoc); ++ if (doc) ++ doc->GetTitle(mCtxDocTitle); ++ return NS_OK; ++ } ++ } ++ return NS_ERROR_FAILURE; ++} ++ ++nsresult ++EmbedContextMenuInfo::GetFormControlType(nsIDOMEvent* aEvent) ++{ ++ if (!aEvent) ++ return NS_OK; ++ nsCOMPtr nsevent(do_QueryInterface(aEvent)); ++ nsCOMPtr target; ++ nsevent->GetOriginalTarget(getter_AddRefs(target)); ++ // mOrigTarget = target; ++ if (SetFormControlType(target)) { ++ nsCOMPtr eventNode = do_QueryInterface(target); ++ if (!eventNode) ++ return NS_OK; ++ //Frame Stuff ++ nsCOMPtr domDoc; ++ nsresult rv = eventNode->GetOwnerDocument(getter_AddRefs(domDoc)); ++ if (!NS_SUCCEEDED(rv) || !domDoc) { ++ return NS_OK; ++ } ++ mEventNode = eventNode; ++ mCtxDocument = domDoc; ++ nsCOMPtr doc = do_QueryInterface(mCtxDocument); ++ if (!doc) ++ return NS_OK; ++ nsIPresShell *presShell = doc->GetShell(); ++ if (!presShell) ++ return NS_OK; ++ nsCOMPtr tgContent = do_QueryInterface(mEventTarget); ++ nsIFrame* frame = nsnull; ++#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) ++ frame = tgContent->GetDocument() == presShell->GetDocument() ? ++ tgContent->GetPrimaryFrame() : nsnull; ++ if (frame) ++ mFormRect = frame->GetScreenRectExternal(); ++#endif ++ return NS_OK; ++ } ++ return NS_ERROR_FAILURE; ++} ++ ++nsresult ++EmbedContextMenuInfo::SetFormControlType(nsIDOMEventTarget *originalTarget) ++{ ++ nsresult rv = NS_ERROR_FAILURE; ++ nsCOMPtr targetContent = do_QueryInterface(originalTarget); ++ mCtxFormType = 0; ++ if (targetContent && targetContent->IsNodeOfType(nsIContent::eHTML_FORM_CONTROL)) { ++ nsCOMPtr formControl(do_QueryInterface(targetContent)); ++ if (formControl) { ++ mCtxFormType = formControl->GetType(); ++ rv = NS_OK; ++ //#ifdef MOZ_LOGGING ++ switch (mCtxFormType) { ++ case NS_FORM_BUTTON_BUTTON: ++ break; ++ case NS_FORM_BUTTON_RESET: ++ break; ++ case NS_FORM_BUTTON_SUBMIT: ++ break; ++ case NS_FORM_INPUT_BUTTON: ++ break; ++ case NS_FORM_INPUT_CHECKBOX: ++ break; ++ case NS_FORM_INPUT_FILE: ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; ++ break; ++ case NS_FORM_INPUT_HIDDEN: ++ break; ++ case NS_FORM_INPUT_RESET: ++ break; ++ case NS_FORM_INPUT_IMAGE: ++ break; ++ case NS_FORM_INPUT_PASSWORD: ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IPASSWORD; ++ break; ++ case NS_FORM_INPUT_RADIO: ++ break; ++ case NS_FORM_INPUT_SUBMIT: ++ break; ++ case NS_FORM_INPUT_EMAIL: ++ case NS_FORM_INPUT_SEARCH: ++ case NS_FORM_INPUT_TEXT: ++ case NS_FORM_INPUT_TEL: ++ case NS_FORM_INPUT_URL: ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; ++ break; ++ case NS_FORM_LABEL: ++ break; ++ case NS_FORM_SELECT: ++ break; ++ case NS_FORM_TEXTAREA: ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; ++ break; ++ case NS_FORM_OBJECT: ++ break; ++ case NS_FORM_OUTPUT: ++ break; ++ default: ++ break; ++ } ++ if (mEmbedCtxType & GTK_MOZ_EMBED_CTX_INPUT) { ++ PRBool rdonly = PR_FALSE; ++ if (mCtxFormType == NS_FORM_TEXTAREA) { ++ nsCOMPtr input; ++ input = do_QueryInterface(mEventNode, &rv); ++ if (!NS_FAILED(rv) && input) ++ rv = input->GetReadOnly(&rdonly); ++ if (!NS_FAILED(rv) && rdonly) { ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_ROINPUT; ++ } ++ } else { ++ nsCOMPtr input; ++ input = do_QueryInterface(mEventNode, &rv); ++ if (!NS_FAILED(rv) && input) ++ rv = input->GetReadOnly(&rdonly); ++ if (!NS_FAILED(rv) && rdonly) { ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_ROINPUT; ++ } ++ } ++ } ++ //#endif ++ } ++ } ++ return rv; ++} ++ ++const char* ++EmbedContextMenuInfo::GetSelectedText() ++{ ++ nsString cString; ++ nsresult rv = NS_ERROR_FAILURE; ++ if (mCtxFormType != 0 && mEventNode) { ++ PRInt32 TextLength = 0, selStart = 0, selEnd = 0; ++ if (mCtxFormType == NS_FORM_INPUT_TEXT || mCtxFormType == NS_FORM_INPUT_FILE) { ++ nsCOMPtr nsinput = do_QueryInterface(mEventNode, &rv); ++ if (NS_SUCCEEDED(rv) && nsinput) ++ nsinput->GetTextLength(&TextLength); ++ if (TextLength > 0) { ++ nsinput->GetSelectionEnd(&selEnd); ++ nsinput->GetSelectionStart(&selStart); ++ if (selStart < selEnd || mCtxFormType == NS_FORM_INPUT_FILE) { ++ nsCOMPtr input = do_QueryInterface(mEventNode, &rv); ++ rv = input->GetValue(cString); ++ } ++ } ++ } else if (mCtxFormType == NS_FORM_TEXTAREA) { ++ nsCOMPtr nsinput = do_QueryInterface(mEventNode, &rv); ++ if (NS_SUCCEEDED(rv) && nsinput) ++ nsinput->GetTextLength(&TextLength); ++ if (TextLength > 0) { ++ nsinput->GetSelectionStart(&selStart); ++ nsinput->GetSelectionEnd(&selEnd); ++ if (selStart < selEnd) { ++ nsCOMPtr input = do_QueryInterface(mEventNode, &rv); ++ rv = input->GetValue(cString); ++ } ++ } ++ } ++ if (NS_SUCCEEDED(rv) && !cString.IsEmpty()) { ++ if (selStart < selEnd) { ++ cString.Cut(0, selStart); ++ cString.Cut(selEnd-selStart, TextLength); ++ } ++ rv = NS_OK; ++ } ++ } else if (mCtxDocument) { ++ nsCOMPtr htmlDoc = do_QueryInterface(mCtxDocument, &rv); ++ if (NS_FAILED(rv) || !htmlDoc) ++ return nsnull; ++ rv = htmlDoc->GetSelection(cString); ++ if (NS_FAILED(rv) || cString.IsEmpty()) ++ return nsnull; ++ rv = NS_OK; ++ } ++ if (rv == NS_OK) { ++ return NS_ConvertUTF16toUTF8(cString).get(); ++ } ++ return nsnull; ++} ++ ++nsresult ++EmbedContextMenuInfo::CheckDomImageElement(nsIDOMNode *node, nsString& aHref, ++ PRInt32 *aWidth, PRInt32 *aHeight) ++{ ++ nsresult rv = NS_ERROR_FAILURE; ++ nsCOMPtr image = ++ do_QueryInterface(node, &rv); ++ if (image) { ++ rv = image->GetSrc(aHref); ++ if (NS_FAILED(rv)) { ++ return rv; ++ } ++ rv = image->GetWidth(aWidth); ++ rv = image->GetHeight(aHeight); ++ rv = NS_OK; ++ } ++ return rv; ++} ++ ++nsresult ++EmbedContextMenuInfo::GetImageRequest(imgIRequest **aRequest, nsIDOMNode *aDOMNode) ++{ ++ NS_ENSURE_ARG(aDOMNode); ++ NS_ENSURE_ARG_POINTER(aRequest); ++ ++ // Get content ++ nsCOMPtr content(do_QueryInterface(aDOMNode)); ++ NS_ENSURE_TRUE(content, NS_ERROR_FAILURE); ++ ++ return content->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST, ++ aRequest); ++} ++ ++nsresult ++EmbedContextMenuInfo::CheckDomHtmlNode(nsIDOMNode *aNode) ++{ ++ nsresult rv = NS_ERROR_FAILURE; ++ nsString uTag; ++ PRUint16 dnode_type; ++ ++ nsCOMPtr node; ++ if (!aNode && mEventNode) ++ node = mEventNode; ++ nsCOMPtr element = do_QueryInterface(node, &rv); ++ if (!element) { ++ element = do_QueryInterface(mOrigNode, &rv); ++ if (element) { ++ node = mOrigNode; ++ element = do_QueryInterface(node, &rv); ++ } ++ } ++ ++ rv = node->GetNodeType(&dnode_type); ++ if (NS_FAILED(rv)) { ++ return rv; ++ } ++ ++ if (!((nsIDOMNode::ELEMENT_NODE == dnode_type) && element)) { ++ return rv; ++ } ++ nsCOMPtr nodeElement = do_QueryInterface(node, &rv); ++ if (NS_SUCCEEDED(rv) && nodeElement) { ++ mNSHHTMLElement = nodeElement; ++ } else { ++ mNSHHTMLElement = nsnull; ++ } ++ rv = element->GetLocalName(uTag); ++ if (NS_FAILED(rv)) { ++ return rv; ++ } ++ if (uTag.LowerCaseEqualsLiteral("object")) { ++ } ++ else if (uTag.LowerCaseEqualsLiteral("html")) { ++ } ++ else if (uTag.LowerCaseEqualsLiteral("a")) { ++ nsCOMPtr anchor = do_QueryInterface(node); ++ anchor->GetHref(mCtxHref); ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_LINK; ++ if (anchor && !mCtxHref.IsEmpty()) { ++ if (mCtxHref.LowerCaseEqualsLiteral("text/smartbookmark")) { ++ nsCOMPtr childNode; ++ node->GetFirstChild(getter_AddRefs(childNode)); ++ if (childNode) { ++ PRInt32 width, height; ++ rv = CheckDomImageElement(node, mCtxImgHref, &width, &height); ++ if (NS_SUCCEEDED(rv)) ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IMAGE; ++ } ++ } else if (StringBeginsWith(mCtxHref, NS_LITERAL_STRING("mailto:"))) { ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_EMAIL; ++ } ++ } ++ } ++ else if (uTag.LowerCaseEqualsLiteral("area")) { ++ nsCOMPtr area = do_QueryInterface(node, &rv); ++ if (NS_SUCCEEDED(rv) && area) { ++ PRBool aNoHref = PR_FALSE; ++ rv = area->GetNoHref(&aNoHref); ++ if (!aNoHref) ++ rv = area->GetHref(mCtxHref); ++ else ++ rv = area->GetTarget(mCtxHref); ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_LINK; ++ rv = NS_OK; ++ } ++ } ++ else if (uTag.LowerCaseEqualsLiteral("img")) { ++ PRInt32 width, height; ++ rv = CheckDomImageElement(node, mCtxImgHref, &width, &height); ++ if (NS_SUCCEEDED(rv)) ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IMAGE; ++ } else { ++ rv = NS_ERROR_FAILURE; ++ } ++ return rv; ++} ++ ++nsresult ++EmbedContextMenuInfo::UpdateContextData(void *aEvent) ++{ ++ NS_ENSURE_ARG_POINTER(aEvent); ++ nsresult rv; ++ nsCOMPtr event = do_QueryInterface((nsISupports*)aEvent, &rv); ++ if (NS_FAILED(rv) || !event) ++ return NS_ERROR_FAILURE; ++ return UpdateContextData(event); ++} ++ ++nsresult ++EmbedContextMenuInfo::GetElementForScroll(nsIDOMEvent *aEvent) ++{ ++ if (!aEvent) return NS_ERROR_UNEXPECTED; ++ nsCOMPtr nsevent(do_QueryInterface(aEvent)); ++ nsCOMPtr target; ++ nsevent->GetOriginalTarget(getter_AddRefs(target)); ++ if (!target) return NS_ERROR_UNEXPECTED; ++ nsCOMPtr targetDOMNode(do_QueryInterface(target)); ++ if (!targetDOMNode) return NS_ERROR_UNEXPECTED; ++ nsCOMPtr targetDOMDocument; ++ targetDOMNode->GetOwnerDocument(getter_AddRefs(targetDOMDocument)); ++ if (!targetDOMDocument) return NS_ERROR_UNEXPECTED; ++ return GetElementForScroll(targetDOMDocument); ++} ++ ++nsresult ++EmbedContextMenuInfo::GetElementForScroll(nsIDOMDocument *targetDOMDocument) ++{ ++ nsCOMPtr targetDOMElement; ++ targetDOMDocument->GetDocumentElement(getter_AddRefs(targetDOMElement)); ++ if (!targetDOMElement) return NS_ERROR_UNEXPECTED; ++ nsString bodyName(NS_LITERAL_STRING("body")); ++ nsCOMPtr bodyList; ++ targetDOMElement->GetElementsByTagName(bodyName, getter_AddRefs(bodyList)); ++ PRUint32 i = 0; ++ bodyList->GetLength(&i); ++ if (i) { ++ nsCOMPtr domBodyNode; ++ bodyList->Item(0, getter_AddRefs(domBodyNode)); ++ if (!domBodyNode) return NS_ERROR_UNEXPECTED; ++ mNSHHTMLElementSc = do_QueryInterface(domBodyNode); ++ if (!mNSHHTMLElementSc) return NS_ERROR_UNEXPECTED; ++ } ++ return NS_OK; ++} ++ ++nsresult ++EmbedContextMenuInfo::UpdateContextData(nsIDOMEvent *aDOMEvent) ++{ ++ if (mCtxEvent == aDOMEvent) ++ return NS_OK; ++ ++ nsresult rv = nsnull; ++ mCtxEvent = aDOMEvent; ++ NS_ENSURE_ARG_POINTER(mCtxEvent); ++ ++ PRUint16 eventphase; ++ mCtxEvent->GetEventPhase(&eventphase); ++ if (!eventphase) { ++ mCtxEvent = nsnull; ++ return NS_ERROR_FAILURE; ++ } ++ ++ nsCOMPtr originalTarget = nsnull; ++ nsCOMPtr originalNode = nsnull; ++ ++ nsCOMPtr aEvent = do_QueryInterface(mCtxEvent, &rv); ++ if (NS_FAILED(rv) || !aEvent) ++ return NS_OK; ++ ++ nsCOMPtr mouseEvent(do_QueryInterface(mCtxEvent, &rv)); ++ if (mouseEvent) { ++ ((nsIDOMMouseEvent*)mouseEvent)->GetClientX(&mX); ++ ((nsIDOMMouseEvent*)mouseEvent)->GetClientY(&mY); ++ } ++ ++ if (aEvent) ++ rv = aEvent->GetOriginalTarget(getter_AddRefs(originalTarget)); ++ originalNode = do_QueryInterface(originalTarget); ++ if (NS_FAILED(rv) || !originalNode) ++ return NS_ERROR_NULL_POINTER; ++ ++ // nsresult SelText = mOwner->ClipBoardAction(GTK_MOZ_EMBED_CAN_COPY); ++ if (originalNode == mOrigNode) ++ return NS_OK; ++ ++ mEmbedCtxType = GTK_MOZ_EMBED_CTX_NONE; ++ mOrigNode = originalNode; ++ if (mOrigNode) { ++ nsString SOrigNode; ++ mOrigNode->GetNodeName(SOrigNode); ++ if (SOrigNode.EqualsLiteral("#document")) ++ return NS_OK; ++ if (SOrigNode.EqualsLiteral("xul:thumb") ++ || SOrigNode.EqualsLiteral("xul:slider") ++ || SOrigNode.EqualsLiteral("xul:scrollbarbutton") ++ || SOrigNode.EqualsLiteral("xul:vbox") ++ || SOrigNode.EqualsLiteral("xul:spacer")) { ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_XUL; ++ return NS_OK; ++ } ++ } ++ if (mCtxEvent) ++ rv = mCtxEvent->GetTarget(getter_AddRefs(mEventTarget)); ++ if (NS_FAILED(rv) || !mEventTarget) { ++ return NS_OK; ++ } ++ nsCOMPtr eventNode = do_QueryInterface(mEventTarget, &rv); ++ mEventNode = eventNode; ++ //Frame Stuff ++ nsCOMPtr domDoc; ++ if (mEventNode) ++ rv = mEventNode->GetOwnerDocument(getter_AddRefs(domDoc)); ++ if (!NS_SUCCEEDED(rv) || !domDoc) { ++ // return NS_OK; ++ } ++ if (NS_SUCCEEDED(rv) && domDoc && mCtxDocument != domDoc) { ++ mCtxDocument = domDoc; ++ mNSHHTMLElementSc = nsnull; ++ mCtxDocument->GetDocumentURI(mCtxURI); ++ NS_ENSURE_ARG_POINTER(mOwner); ++ nsCOMPtr webBrowser; ++ mOwner->mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ webBrowser->GetContentDOMWindow(getter_AddRefs(mCtxDomWindow)); ++ nsCOMPtr mainDocument; ++ mCtxDomWindow->GetDocument(getter_AddRefs(mainDocument)); ++ if (!mainDocument) { ++ return NS_OK; ++ } ++ mCtxFrameNum = -1; ++ if (mainDocument != domDoc) { ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IFRAME; ++ SetFrameIndex(); ++ } ++ } ++ nsCOMPtr targetDOMElement; ++ mCtxDocument->GetDocumentElement(getter_AddRefs(targetDOMElement)); ++ if (!targetDOMElement) return NS_ERROR_UNEXPECTED; ++ nsCOMPtr htmlDoc = do_QueryInterface(mCtxDocument); ++ if (htmlDoc) { ++ nsString DMode; ++ htmlDoc->GetDesignMode(DMode); ++ if (DMode.EqualsLiteral("on")) { ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_RICHEDIT; ++ } ++ } ++ nsCOMPtr doc = do_QueryInterface(mCtxDocument); ++ if (!doc) ++ return NS_OK; ++ nsIPresShell *presShell = doc->GetShell(); ++ if (!presShell) ++ return NS_OK; ++ nsCOMPtr tgContent = do_QueryInterface(mEventTarget); ++ nsIFrame* frame = nsnull; ++#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) ++ if (mEmbedCtxType & GTK_MOZ_EMBED_CTX_RICHEDIT) ++ frame = presShell->GetRootFrame(); ++ else if (tgContent->GetDocument() == presShell->GetDocument()) { ++ frame = tgContent->GetPrimaryFrame(); ++ } ++ if (frame) { ++ mFormRect = frame->GetScreenRectExternal(); ++ } ++#endif ++ if (NS_SUCCEEDED(SetFormControlType(mEventTarget))) { ++ return NS_OK; ++ } ++ CheckDomHtmlNode(); ++ nsCOMPtr node = mEventNode; ++ nsCOMPtr parentNode; ++ node->GetParentNode(getter_AddRefs(parentNode)); ++ node = parentNode; ++ while (node) { ++ if (NS_FAILED(CheckDomHtmlNode())) ++ break; ++ node->GetParentNode(getter_AddRefs(parentNode)); ++ node = parentNode; ++ } ++ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; ++ return NS_OK; ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-06-22 12:14:58.784816398 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-06-22 12:14:58.784816398 +0200 +@@ -0,0 +1,101 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ ++/* ++ * ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is the Mozilla browser. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Oleg Romashin. ++ * Portions created by the Initial Developer are Copyright (C) 2006 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Oleg Romashin ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++#ifndef EmbedContextMenuInfo_h__ ++#define EmbedContextMenuInfo_h__ ++#include "nsCOMPtr.h" ++#include "nsIDOMNode.h" ++#include "nsIDOMEvent.h" ++#include "imgIContainer.h" ++#include "imgIRequest.h" ++#include "nsIDOMEventTarget.h" ++#include "nsRect.h" ++// for strings ++#ifdef MOZILLA_INTERNAL_API ++#include "nsXPIDLString.h" ++#include "nsReadableUtils.h" ++#endif ++#include "EmbedWindow.h" ++#include "nsIDOMNSHTMLElement.h" ++//***************************************************************************** ++// class EmbedContextMenuInfo ++// ++//***************************************************************************** ++class EmbedContextMenuInfo : public nsISupports ++{ ++public: ++ EmbedContextMenuInfo(EmbedPrivate *aOwner); ++ virtual ~EmbedContextMenuInfo(void); ++ NS_DECL_ISUPPORTS ++ nsresult GetFormControlType(nsIDOMEvent *aDOMEvent); ++ nsresult UpdateContextData(nsIDOMEvent *aDOMEvent); ++ nsresult UpdateContextData(void *aEvent); ++ const char* GetSelectedText(); ++ nsresult GetElementForScroll(nsIDOMDocument *targetDOMDocument); ++ nsresult GetElementForScroll(nsIDOMEvent *aEvent); ++ nsresult CheckDomImageElement(nsIDOMNode *node, nsString& aHref, ++ PRInt32 *aWidth, PRInt32 *aHeight); ++ nsresult GetImageRequest(imgIRequest **aRequest, nsIDOMNode *aDOMNode); ++ nsString GetCtxDocTitle(void) { return mCtxDocTitle; } ++ ++ ++ PRInt32 mX, mY, mObjWidth, mObjHeight, mCtxFrameNum; ++ nsString mCtxURI, mCtxHref, mCtxImgHref; ++ PRUint32 mEmbedCtxType; ++ PRInt32 mCtxFormType; ++ nsCOMPtr mEventNode; ++ nsCOMPtr mEventTarget; ++ nsCOMPtrmCtxDocument; ++ nsIntRect mFormRect; ++ nsCOMPtr mCtxDomWindow; ++ nsCOMPtr mCtxEvent; ++ nsCOMPtr mNSHHTMLElement; ++ nsCOMPtr mNSHHTMLElementSc; ++private: ++ nsresult SetFrameIndex(); ++ nsresult SetFormControlType(nsIDOMEventTarget *originalTarget); ++ nsresult CheckDomHtmlNode(nsIDOMNode *aNode = nsnull); ++ ++ EmbedPrivate *mOwner; ++ nsCOMPtr mOrigNode; ++ nsString mCtxDocTitle; ++}; // class EmbedContextMenuInfo ++#endif // EmbedContextMenuInfo_h__ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-06-22 12:14:58.787816413 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-06-22 12:14:58.787816413 +0200 +@@ -0,0 +1,304 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsCOMPtr.h" ++#include "nsIDOMMouseEvent.h" ++ ++#include "nsIDOMKeyEvent.h" ++#include "nsIDOMUIEvent.h" ++ ++#include "EmbedEventListener.h" ++#include "EmbedPrivate.h" ++ ++EmbedEventListener::EmbedEventListener(void) ++{ ++ mOwner = nsnull; ++} ++ ++EmbedEventListener::~EmbedEventListener() ++{ ++} ++ ++NS_IMPL_ADDREF(EmbedEventListener) ++NS_IMPL_RELEASE(EmbedEventListener) ++NS_INTERFACE_MAP_BEGIN(EmbedEventListener) ++ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMKeyListener) ++ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener) ++ NS_INTERFACE_MAP_ENTRY(nsIDOMKeyListener) ++ NS_INTERFACE_MAP_ENTRY(nsIDOMMouseListener) ++ NS_INTERFACE_MAP_ENTRY(nsIDOMUIListener) ++NS_INTERFACE_MAP_END ++ ++nsresult ++EmbedEventListener::Init(EmbedPrivate *aOwner) ++{ ++ mOwner = aOwner; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::HandleEvent(nsIDOMEvent* aDOMEvent) ++{ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::KeyDown(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr keyEvent; ++ keyEvent = do_QueryInterface(aDOMEvent); ++ if (!keyEvent) ++ return NS_OK; ++ // Return FALSE to this function to mark the event as not ++ // consumed... ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_KEY_DOWN], 0, ++ (void *)keyEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::KeyUp(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr keyEvent; ++ keyEvent = do_QueryInterface(aDOMEvent); ++ if (!keyEvent) ++ return NS_OK; ++ // return FALSE to this function to mark this event as not ++ // consumed... ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_KEY_UP], 0, ++ (void *)keyEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::KeyPress(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr keyEvent; ++ keyEvent = do_QueryInterface(aDOMEvent); ++ if (!keyEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_KEY_PRESS], 0, ++ (void *)keyEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::MouseDown(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr mouseEvent; ++ mouseEvent = do_QueryInterface(aDOMEvent); ++ if (!mouseEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_MOUSE_DOWN], 0, ++ (void *)mouseEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::MouseUp(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr mouseEvent; ++ mouseEvent = do_QueryInterface(aDOMEvent); ++ if (!mouseEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_MOUSE_UP], 0, ++ (void *)mouseEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::MouseClick(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr mouseEvent; ++ mouseEvent = do_QueryInterface(aDOMEvent); ++ if (!mouseEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_MOUSE_CLICK], 0, ++ (void *)mouseEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::MouseDblClick(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr mouseEvent; ++ mouseEvent = do_QueryInterface(aDOMEvent); ++ if (!mouseEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_MOUSE_DBL_CLICK], 0, ++ (void *)mouseEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::MouseOver(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr mouseEvent; ++ mouseEvent = do_QueryInterface(aDOMEvent); ++ if (!mouseEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_MOUSE_OVER], 0, ++ (void *)mouseEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::MouseOut(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr mouseEvent; ++ mouseEvent = do_QueryInterface(aDOMEvent); ++ if (!mouseEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_MOUSE_OUT], 0, ++ (void *)mouseEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::Activate(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr uiEvent = do_QueryInterface(aDOMEvent); ++ if (!uiEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_ACTIVATE], 0, ++ (void *)uiEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::FocusIn(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr uiEvent = do_QueryInterface(aDOMEvent); ++ if (!uiEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_FOCUS_IN], 0, ++ (void *)uiEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedEventListener::FocusOut(nsIDOMEvent* aDOMEvent) ++{ ++ nsCOMPtr uiEvent = do_QueryInterface(aDOMEvent); ++ if (!uiEvent) ++ return NS_OK; ++ // Return TRUE from your signal handler to mark the event as consumed. ++ gint return_val = FALSE; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DOM_FOCUS_OUT], 0, ++ (void *)uiEvent, &return_val); ++ if (return_val) { ++ aDOMEvent->StopPropagation(); ++ aDOMEvent->PreventDefault(); ++ } ++ return NS_OK; ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-06-22 12:14:58.788816418 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h 2011-06-22 12:14:58.789816423 +0200 +@@ -0,0 +1,90 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef __EmbedEventListener_h ++#define __EmbedEventListener_h ++ ++#include "nsIDOMKeyListener.h" ++#include "nsIDOMMouseListener.h" ++#include "nsIDOMUIListener.h" ++ ++class EmbedPrivate; ++ ++class EmbedEventListener : public nsIDOMKeyListener, ++ public nsIDOMMouseListener, ++ public nsIDOMUIListener ++{ ++ public: ++ ++ EmbedEventListener(); ++ virtual ~EmbedEventListener(); ++ ++ nsresult Init(EmbedPrivate *aOwner); ++ ++ NS_DECL_ISUPPORTS ++ ++ // nsIDOMEventListener ++ ++ NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent); ++ ++ // nsIDOMKeyListener ++ ++ NS_IMETHOD KeyDown(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD KeyUp(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD KeyPress(nsIDOMEvent* aDOMEvent); ++ ++ // nsIDOMMouseListener ++ ++ NS_IMETHOD MouseDown(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD MouseUp(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD MouseClick(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD MouseDblClick(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD MouseOver(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD MouseOut(nsIDOMEvent* aDOMEvent); ++ ++ // nsIDOMUIListener ++ ++ NS_IMETHOD Activate(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD FocusIn(nsIDOMEvent* aDOMEvent); ++ NS_IMETHOD FocusOut(nsIDOMEvent* aDOMEvent); ++ ++ private: ++ ++ EmbedPrivate *mOwner; ++}; ++ ++#endif /* __EmbedEventListener_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-06-22 12:14:58.790816428 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-06-22 12:14:58.790816428 +0200 +@@ -0,0 +1,88 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Oleg Romashin. ++ * Portions created by the Initial Developer are Copyright (C) 2006 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Oleg Romashin ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "EmbedGtkTools.h" ++#ifndef MOZILLA_INTERNAL_API ++#include "nsServiceManagerUtils.h" ++#endif ++#include "EmbedPrivate.h" ++ ++GtkWidget * GetGtkWidgetForDOMWindow(nsIDOMWindow* aDOMWindow) ++{ ++ nsCOMPtr wwatch = do_GetService("@mozilla.org/embedcomp/window-watcher;1"); ++ if (!aDOMWindow) ++ return NULL; ++ nsCOMPtr chrome; ++ wwatch->GetChromeForWindow(aDOMWindow, getter_AddRefs(chrome)); ++ if (!chrome) { ++ return GTK_WIDGET(EmbedCommon::GetAnyLiveWidget()); ++ } ++ ++ nsCOMPtr siteWindow = nsnull; ++ siteWindow = do_QueryInterface(chrome); ++ ++ if (!siteWindow) { ++ return GTK_WIDGET(EmbedCommon::GetAnyLiveWidget()); ++ } ++ ++ GtkWidget* parentWidget; ++ siteWindow->GetSiteWindow((void**)&parentWidget); ++ if (GTK_IS_WIDGET(parentWidget)) ++ return parentWidget; ++ return NULL; ++} ++ ++GtkWindow * GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow) ++{ ++ GtkWidget* parentWidget = GetGtkWidgetForDOMWindow(aDOMWindow); ++ if (!parentWidget) ++ return NULL; ++ GtkWidget* gtkWin = gtk_widget_get_toplevel(parentWidget); ++ if (GTK_WIDGET_TOPLEVEL(gtkWin)) ++ return GTK_WINDOW(gtkWin); ++ return NULL; ++} ++ ++nsresult GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer) ++{ ++ g_return_val_if_fail(webBrowser, NS_ERROR_FAILURE); ++ nsCOMPtr docShell(do_GetInterface((nsISupports*)webBrowser)); ++ NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); ++ return docShell->GetContentViewer(aViewer); ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-06-22 12:14:58.791816433 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h 2011-06-22 12:14:58.791816433 +0200 +@@ -0,0 +1,67 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* vim:set ts=2 sw=2 sts=2 et cindent: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Oleg Romashin. ++ * Portions created by the Initial Developer are Copyright (C) 2006 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Oleg Romashin ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++#ifndef __EmbedTools_h ++#define __EmbedTools_h ++ ++#include "nsCOMPtr.h" ++#ifdef MOZILLA_INTERNAL_API ++#include "nsString.h" ++#else ++#include "nsStringAPI.h" ++#endif ++#include "nsIDOMWindow.h" ++#include "nsIWindowWatcher.h" ++#include "nsIWebBrowserChrome.h" ++#include "nsIEmbeddingSiteWindow.h" ++#include "nsIServiceManager.h" ++#include "nsIContentViewer.h" ++#include "nsIDocShell.h" ++#include "nsIInterfaceRequestorUtils.h" ++#include ++ ++GtkWidget* ++GetGtkWidgetForDOMWindow(nsIDOMWindow* aDOMWindow); ++ ++GtkWindow* ++GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow); ++ ++nsresult ++GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); ++ ++#endif /* __EmbedTools_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-06-22 12:14:58.793816443 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-06-22 12:14:58.793816443 +0200 +@@ -0,0 +1,983 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsIDocShell.h" ++#include "nsIWebProgress.h" ++#include "nsIWidget.h" ++#include "nsCRT.h" ++#include "nsNetUtil.h" ++#include "nsIWebBrowserStream.h" ++#include "nsIWebBrowserFocus.h" ++#include "nsIDirectoryService.h" ++#include "nsAppDirectoryServiceDefs.h" ++ ++// for do_GetInterface ++#include "nsIInterfaceRequestor.h" ++// for do_CreateInstance ++#include "nsIComponentManager.h" ++#include "nsComponentManagerUtils.h" ++ ++// for initializing our window watcher service ++#include "nsIWindowWatcher.h" ++ ++#include "nsILocalFile.h" ++ ++#include "nsXULAppAPI.h" ++ ++// all of the crap that we need for event listeners ++// and when chrome windows finish loading ++#include "nsIDOMWindow.h" ++#include "nsPIDOMWindow.h" ++#include "nsIDOMWindowInternal.h" ++ ++// For seting scrollbar visibilty ++#include "nsIDOMBarProp.h" ++ ++// all of our local includes ++#include "EmbedPrivate.h" ++#include "EmbedWindow.h" ++#include "EmbedProgress.h" ++#include "EmbedContentListener.h" ++#include "EmbedEventListener.h" ++#include "EmbedWindowCreator.h" ++#include "GtkPromptService.h" ++ ++#include "mozilla/ModuleUtils.h" ++ ++#ifdef MOZ_ACCESSIBILITY_ATK ++#include "nsIAccessibilityService.h" ++#include "nsIAccessible.h" ++#include "nsIDOMDocument.h" ++#endif ++ ++PRUint32 EmbedPrivate::sWidgetCount = 0; ++ ++char *EmbedPrivate::sPath = nsnull; ++char *EmbedPrivate::sCompPath = nsnull; ++nsTArray *EmbedPrivate::sWindowList = nsnull; ++nsILocalFile *EmbedPrivate::sProfileDir = nsnull; ++nsISupports *EmbedPrivate::sProfileLock = nsnull; ++GtkWidget *EmbedPrivate::sOffscreenWindow = 0; ++GtkWidget *EmbedPrivate::sOffscreenFixed = 0; ++ ++nsIDirectoryServiceProvider *EmbedPrivate::sAppFileLocProvider = nsnull; ++ ++class GTKEmbedDirectoryProvider : public nsIDirectoryServiceProvider2 ++{ ++public: ++ NS_DECL_ISUPPORTS_INHERITED ++ NS_DECL_NSIDIRECTORYSERVICEPROVIDER ++ NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 ++}; ++ ++static const GTKEmbedDirectoryProvider kDirectoryProvider; ++ ++NS_IMPL_QUERY_INTERFACE2(GTKEmbedDirectoryProvider, ++ nsIDirectoryServiceProvider, ++ nsIDirectoryServiceProvider2) ++ ++NS_IMETHODIMP_(nsrefcnt) ++GTKEmbedDirectoryProvider::AddRef() ++{ ++ return 1; ++} ++ ++NS_IMETHODIMP_(nsrefcnt) ++GTKEmbedDirectoryProvider::Release() ++{ ++ return 1; ++} ++ ++NS_IMETHODIMP ++GTKEmbedDirectoryProvider::GetFile(const char *aKey, PRBool *aPersist, ++ nsIFile* *aResult) ++{ ++ if (EmbedPrivate::sAppFileLocProvider) { ++ nsresult rv = EmbedPrivate::sAppFileLocProvider->GetFile(aKey, aPersist, ++ aResult); ++ if (NS_SUCCEEDED(rv)) ++ return rv; ++ } ++ ++ if (EmbedPrivate::sProfileDir && (!strcmp(aKey, NS_APP_USER_PROFILE_50_DIR) ++ || !strcmp(aKey, NS_APP_PROFILE_DIR_STARTUP))) { ++ *aPersist = PR_TRUE; ++ return EmbedPrivate::sProfileDir->Clone(aResult); ++ } ++ ++ return NS_ERROR_FAILURE; ++} ++ ++NS_IMETHODIMP ++GTKEmbedDirectoryProvider::GetFiles(const char *aKey, ++ nsISimpleEnumerator* *aResult) ++{ ++ nsCOMPtr ++ dp2(do_QueryInterface(EmbedPrivate::sAppFileLocProvider)); ++ ++ if (!dp2) ++ return NS_ERROR_FAILURE; ++ ++ return dp2->GetFiles(aKey, aResult); ++} ++ ++#define NS_PROMPTSERVICE_CID \ ++ {0x95611356, 0xf583, 0x46f5, {0x81, 0xff, 0x4b, 0x3e, 0x01, 0x62, 0xc6, 0x19}} ++ ++NS_GENERIC_FACTORY_CONSTRUCTOR(GtkPromptService) ++NS_DEFINE_NAMED_CID(NS_PROMPTSERVICE_CID); ++ ++static const mozilla::Module::CIDEntry kDefaultPromptCIDs[] = { ++ { &kNS_PROMPTSERVICE_CID, false, NULL, GtkPromptServiceConstructor }, ++ { NULL } ++}; ++ ++static const mozilla::Module::ContractIDEntry kDefaultPromptContracts[] = { ++ { "@mozilla.org/embedcomp/prompt-service;1", &kNS_PROMPTSERVICE_CID }, ++ { NULL } ++}; ++ ++static const mozilla::Module kDefaultPromptModule = { ++ mozilla::Module::kVersion, ++ kDefaultPromptCIDs, ++ kDefaultPromptContracts ++}; ++ ++EmbedPrivate::EmbedPrivate(void) ++{ ++ mOwningWidget = nsnull; ++ mWindow = nsnull; ++ mProgress = nsnull; ++ mContentListener = nsnull; ++ mEventListener = nsnull; ++ mChromeMask = nsIWebBrowserChrome::CHROME_ALL; ++ mIsChrome = PR_FALSE; ++ mChromeLoaded = PR_FALSE; ++ mListenersAttached = PR_FALSE; ++ mMozWindowWidget = 0; ++ mIsDestroyed = PR_FALSE; ++ ++ PushStartup(); ++ if (!sWindowList) { ++ sWindowList = new nsTArray(); ++ } ++ sWindowList->AppendElement(this); ++} ++ ++EmbedPrivate::~EmbedPrivate() ++{ ++ sWindowList->RemoveElement(this); ++ PopStartup(); ++} ++ ++nsresult ++EmbedPrivate::Init(GtkMozEmbed *aOwningWidget) ++{ ++ // are we being re-initialized? ++ if (mOwningWidget) ++ return NS_OK; ++ ++ // hang on with a reference to the owning widget ++ mOwningWidget = aOwningWidget; ++ ++ // Create our embed window, and create an owning reference to it and ++ // initialize it. It is assumed that this window will be destroyed ++ // when we go out of scope. ++ mWindow = new EmbedWindow(); ++ mWindowGuard = static_cast(mWindow); ++ mWindow->Init(this); ++ ++ // Create our progress listener object, make an owning reference, ++ // and initialize it. It is assumed that this progress listener ++ // will be destroyed when we go out of scope. ++ mProgress = new EmbedProgress(); ++ mProgressGuard = static_cast ++ (mProgress); ++ mProgress->Init(this); ++ ++ // Create our content listener object, initialize it and attach it. ++ // It is assumed that this will be destroyed when we go out of ++ // scope. ++ mContentListener = new EmbedContentListener(); ++ mContentListenerGuard = static_cast(static_cast(mContentListener)); ++ mContentListener->Init(this); ++ ++ // Create our key listener object and initialize it. It is assumed ++ // that this will be destroyed before we go out of scope. ++ mEventListener = new EmbedEventListener(); ++ mEventListenerGuard = ++ static_cast(static_cast(mEventListener)); ++ mEventListener->Init(this); ++ ++ // has the window creator service been set up? ++ static int initialized = PR_FALSE; ++ // Set up our window creator ( only once ) ++ if (!initialized) { ++ // We set this flag here instead of on success. If it failed we ++ // don't want to keep trying and leaking window creator objects. ++ initialized = PR_TRUE; ++ ++ // create our local object ++ EmbedWindowCreator *creator = new EmbedWindowCreator(); ++ nsCOMPtr windowCreator; ++ windowCreator = static_cast(creator); ++ ++ // Attach it via the watcher service ++ nsCOMPtr watcher = do_GetService(NS_WINDOWWATCHER_CONTRACTID); ++ if (watcher) ++ watcher->SetWindowCreator(windowCreator); ++ } ++ return NS_OK; ++} ++ ++nsresult ++EmbedPrivate::Realize(PRBool *aAlreadyRealized) ++{ ++ ++ *aAlreadyRealized = PR_FALSE; ++ ++ // create the offscreen window if we have to ++ EnsureOffscreenWindow(); ++ ++ // Have we ever been initialized before? If so then just reparent ++ // from the offscreen window. ++ if (mMozWindowWidget) { ++ gtk_widget_reparent(mMozWindowWidget, GTK_WIDGET(mOwningWidget)); ++ *aAlreadyRealized = PR_TRUE; ++ return NS_OK; ++ } ++ ++ // Get the nsIWebBrowser object for our embedded window. ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ // get a handle on the navigation object ++ mNavigation = do_QueryInterface(webBrowser); ++ ++ // Create our session history object and tell the navigation object ++ // to use it. We need to do this before we create the web browser ++ // window. ++ mSessionHistory = do_CreateInstance(NS_SHISTORY_CONTRACTID); ++ mNavigation->SetSessionHistory(mSessionHistory); ++ ++ // create the window ++ mWindow->CreateWindow(); ++ ++ // bind the progress listener to the browser object ++ nsCOMPtr supportsWeak; ++ supportsWeak = do_QueryInterface(mProgressGuard); ++ nsCOMPtr weakRef; ++ supportsWeak->GetWeakReference(getter_AddRefs(weakRef)); ++ webBrowser->AddWebBrowserListener(weakRef, ++ NS_GET_IID(nsIWebProgressListener)); ++ ++ // set ourselves as the parent uri content listener ++ nsCOMPtr uriListener; ++ uriListener = do_QueryInterface(mContentListenerGuard); ++ webBrowser->SetParentURIContentListener(uriListener); ++ ++ // save the window id of the newly created window ++ nsCOMPtr mozWidget; ++ mWindow->mBaseWindow->GetMainWidget(getter_AddRefs(mozWidget)); ++ // get the native drawing area ++ GdkWindow *tmp_window = ++ static_cast( ++ mozWidget->GetNativeData(NS_NATIVE_WINDOW)); ++ // and, thanks to superwin we actually need the parent of that. ++ tmp_window = gdk_window_get_parent(tmp_window); ++ // save the widget ID - it should be the mozarea of the window. ++ gpointer data = nsnull; ++ gdk_window_get_user_data(tmp_window, &data); ++ mMozWindowWidget = static_cast(data); ++ ++ // Apply the current chrome mask ++ ApplyChromeMask(); ++ ++ return NS_OK; ++} ++ ++void ++EmbedPrivate::Unrealize(void) ++{ ++ // reparent to our offscreen window ++ gtk_widget_reparent(mMozWindowWidget, sOffscreenFixed); ++} ++ ++void ++EmbedPrivate::Show(void) ++{ ++ // Get the nsIWebBrowser object for our embedded window. ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ // and set the visibility on the thing ++ nsCOMPtr baseWindow = do_QueryInterface(webBrowser); ++ baseWindow->SetVisibility(PR_TRUE); ++} ++ ++void ++EmbedPrivate::Hide(void) ++{ ++ // Get the nsIWebBrowser object for our embedded window. ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ // and set the visibility on the thing ++ nsCOMPtr baseWindow = do_QueryInterface(webBrowser); ++ baseWindow->SetVisibility(PR_FALSE); ++} ++ ++void ++EmbedPrivate::Resize(PRUint32 aWidth, PRUint32 aHeight) ++{ ++ mWindow->SetDimensions(nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION | ++ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER, ++ 0, 0, aWidth, aHeight); ++} ++ ++void ++EmbedPrivate::Destroy(void) ++{ ++ // This flag might have been set from ++ // EmbedWindow::DestroyBrowserWindow() as well if someone used a ++ // window.close() or something or some other script action to close ++ // the window. No harm setting it again. ++ mIsDestroyed = PR_TRUE; ++ ++ // Get the nsIWebBrowser object for our embedded window. ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ // Release our progress listener ++ nsCOMPtr supportsWeak; ++ supportsWeak = do_QueryInterface(mProgressGuard); ++ nsCOMPtr weakRef; ++ supportsWeak->GetWeakReference(getter_AddRefs(weakRef)); ++ webBrowser->RemoveWebBrowserListener(weakRef, ++ NS_GET_IID(nsIWebProgressListener)); ++ weakRef = nsnull; ++ supportsWeak = nsnull; ++ ++ // Release our content listener ++ webBrowser->SetParentURIContentListener(nsnull); ++ mContentListenerGuard = nsnull; ++ mContentListener = nsnull; ++ ++ // Now that we have removed the listener, release our progress ++ // object ++ mProgressGuard = nsnull; ++ mProgress = nsnull; ++ ++ // detach our event listeners and release the event receiver ++ DetachListeners(); ++ if (mEventTarget) ++ mEventTarget = nsnull; ++ ++ // destroy our child window ++ mWindow->ReleaseChildren(); ++ ++ // release navigation ++ mNavigation = nsnull; ++ ++ // release session history ++ mSessionHistory = nsnull; ++ ++ mOwningWidget = nsnull; ++ ++ mMozWindowWidget = 0; ++} ++ ++void ++EmbedPrivate::SetURI(const char *aURI) ++{ ++ mURI.Assign(aURI); ++} ++ ++void ++EmbedPrivate::LoadCurrentURI(void) ++{ ++ if (mURI.Length()) { ++ nsCOMPtr piWin; ++ GetPIDOMWindow(getter_AddRefs(piWin)); ++ ++ nsAutoPopupStatePusher popupStatePusher(piWin, openAllowed); ++ ++ mNavigation->LoadURI(NS_ConvertUTF8toUTF16(mURI).get(), // URI string ++ nsIWebNavigation::LOAD_FLAGS_NONE | // Load flags ++ nsIWebNavigation::LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP, // Allow keyword.URL.. functionality ++ nsnull, // Referring URI ++ nsnull, // Post data ++ nsnull); // extra headers ++ } ++} ++ ++void ++EmbedPrivate::Reload(PRUint32 reloadFlags) ++{ ++ /* Use the session history if it is available, this ++ * allows framesets to reload correctly */ ++ nsCOMPtr wn; ++ ++ if (mSessionHistory) { ++ wn = do_QueryInterface(mSessionHistory); ++ } ++ if (!wn) ++ wn = mNavigation; ++ ++ if (wn) ++ wn->Reload(reloadFlags); ++} ++ ++ ++void ++EmbedPrivate::ApplyChromeMask() ++{ ++ if (mWindow) { ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ nsCOMPtr domWindow; ++ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); ++ if (domWindow) { ++ ++ nsCOMPtr scrollbars; ++ domWindow->GetScrollbars(getter_AddRefs(scrollbars)); ++ if (scrollbars) { ++ ++ scrollbars->SetVisible ++ (mChromeMask & nsIWebBrowserChrome::CHROME_SCROLLBARS ? ++ PR_TRUE : PR_FALSE); ++ } ++ } ++ } ++} ++ ++ ++void ++EmbedPrivate::SetChromeMask(PRUint32 aChromeMask) ++{ ++ mChromeMask = aChromeMask; ++ ++ ApplyChromeMask(); ++} ++ ++ ++/* static */ ++void ++EmbedPrivate::PushStartup(void) ++{ ++ // increment the number of widgets ++ sWidgetCount++; ++ ++ // if this is the first widget, fire up xpcom ++ if (sWidgetCount == 1) { ++ nsresult rv; ++ ++ nsCOMPtr binDir; ++ if (sCompPath) { ++ rv = NS_NewNativeLocalFile(nsDependentCString(sCompPath), 1, getter_AddRefs(binDir)); ++ if (NS_FAILED(rv)) ++ return; ++ } ++ ++ const char *grePath = sPath; ++ ++ if (!grePath) ++ grePath = getenv("MOZILLA_FIVE_HOME"); ++ ++ if (!grePath) ++ return; ++ ++ nsCOMPtr greDir; ++ rv = NS_NewNativeLocalFile(nsDependentCString(grePath), PR_TRUE, ++ getter_AddRefs(greDir)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ if (sProfileDir && !sProfileLock) { ++ rv = XRE_LockProfileDirectory(sProfileDir, ++ &sProfileLock); ++ if (NS_FAILED(rv)) return; ++ } ++ ++ rv = XRE_InitEmbedding2(greDir, binDir, ++ const_cast(&kDirectoryProvider)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ if (sProfileDir) ++ XRE_NotifyProfile(); ++ ++ RegisterAppComponents(); ++ } ++} ++ ++/* static */ ++void ++EmbedPrivate::PopStartup(void) ++{ ++ sWidgetCount--; ++ if (sWidgetCount == 0) { ++ ++ // destroy the offscreen window ++ DestroyOffscreenWindow(); ++ ++ // we no longer need a reference to the DirectoryServiceProvider ++ if (sAppFileLocProvider) { ++ NS_RELEASE(sAppFileLocProvider); ++ sAppFileLocProvider = nsnull; ++ } ++ ++ // shut down XPCOM/Embedding ++ XRE_TermEmbedding(); ++ ++ NS_IF_RELEASE(sProfileLock); ++ NS_IF_RELEASE(sProfileDir); ++ } ++} ++ ++/* static */ ++void EmbedPrivate::SetPath(const char *aPath) ++{ ++ if (sPath) ++ free(sPath); ++ if (aPath) ++ sPath = strdup(aPath); ++ else ++ sPath = nsnull; ++} ++ ++/* static */ ++void ++EmbedPrivate::SetCompPath(const char *aPath) ++{ ++ if (sCompPath) ++ free(sCompPath); ++ if (aPath) ++ sCompPath = strdup(aPath); ++ else ++ sCompPath = nsnull; ++} ++ ++/* static */ ++void ++EmbedPrivate::SetProfilePath(const char *aDir, const char *aName) ++{ ++ if (sProfileDir) { ++ if (sWidgetCount) { ++ NS_ERROR("Cannot change profile directory during run."); ++ return; ++ } ++ ++ NS_RELEASE(sProfileDir); ++ NS_RELEASE(sProfileLock); ++ } ++ ++ nsresult rv = ++ NS_NewNativeLocalFile(nsDependentCString(aDir), PR_TRUE, &sProfileDir); ++ ++ if (NS_SUCCEEDED(rv) && aName) ++ rv = sProfileDir->AppendNative(nsDependentCString(aName)); ++ ++ if (NS_SUCCEEDED(rv)) { ++ PRBool exists = PR_FALSE; ++ rv = sProfileDir->Exists(&exists); ++ if (!exists) ++ rv = sProfileDir->Create(nsIFile::DIRECTORY_TYPE, 0700); ++ rv = XRE_LockProfileDirectory(sProfileDir, &sProfileLock); ++ } ++ ++ if (NS_SUCCEEDED(rv)) { ++ if (sWidgetCount) ++ XRE_NotifyProfile(); ++ ++ return; ++ } ++ ++ NS_WARNING("Failed to lock profile."); ++ ++ // Failed ++ NS_IF_RELEASE(sProfileDir); ++ NS_IF_RELEASE(sProfileLock); ++} ++ ++void ++EmbedPrivate::SetDirectoryServiceProvider(nsIDirectoryServiceProvider * appFileLocProvider) ++{ ++ if (sAppFileLocProvider) ++ NS_RELEASE(sAppFileLocProvider); ++ ++ if (appFileLocProvider) { ++ sAppFileLocProvider = appFileLocProvider; ++ NS_ADDREF(sAppFileLocProvider); ++ } ++} ++ ++nsresult ++EmbedPrivate::OpenStream(const char *aBaseURI, const char *aContentType) ++{ ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ nsCOMPtr wbStream = do_QueryInterface(webBrowser); ++ if (!wbStream) return NS_ERROR_FAILURE; ++ ++ nsCOMPtr uri; ++ nsresult rv = NS_NewURI(getter_AddRefs(uri), aBaseURI); ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ rv = wbStream->OpenStream(uri, nsDependentCString(aContentType)); ++ return rv; ++} ++ ++nsresult ++EmbedPrivate::AppendToStream(const PRUint8 *aData, PRUint32 aLen) ++{ ++ // Attach listeners to this document since in some cases we don't ++ // get updates for content added this way. ++ ContentStateChange(); ++ ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ nsCOMPtr wbStream = do_QueryInterface(webBrowser); ++ if (!wbStream) return NS_ERROR_FAILURE; ++ ++ return wbStream->AppendToStream(aData, aLen); ++} ++ ++nsresult ++EmbedPrivate::CloseStream(void) ++{ ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ nsCOMPtr wbStream = do_QueryInterface(webBrowser); ++ if (!wbStream) return NS_ERROR_FAILURE; ++ ++ return wbStream->CloseStream(); ++} ++ ++/* static */ ++EmbedPrivate * ++EmbedPrivate::FindPrivateForBrowser(nsIWebBrowserChrome *aBrowser) ++{ ++ if (!sWindowList) ++ return nsnull; ++ ++ // Get the number of browser windows. ++ PRInt32 count = sWindowList->Length(); ++ // This function doesn't get called very often at all ( only when ++ // creating a new window ) so it's OK to walk the list of open ++ // windows. ++ for (int i = 0; i < count; i++) { ++ EmbedPrivate *tmpPrivate = sWindowList->ElementAt(i); ++ // get the browser object for that window ++ nsIWebBrowserChrome *chrome = static_cast( ++ tmpPrivate->mWindow); ++ if (chrome == aBrowser) ++ return tmpPrivate; ++ } ++ ++ return nsnull; ++} ++ ++void ++EmbedPrivate::ContentStateChange(void) ++{ ++ ++ // we don't attach listeners to chrome ++ if (mListenersAttached && !mIsChrome) ++ return; ++ ++ GetListener(); ++ ++ if (!mEventTarget) ++ return; ++ ++ AttachListeners(); ++ ++} ++ ++void ++EmbedPrivate::ContentFinishedLoading(void) ++{ ++ if (mIsChrome) { ++ // We're done loading. ++ mChromeLoaded = PR_TRUE; ++ ++ // get the web browser ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ // get the content DOM window for that web browser ++ nsCOMPtr domWindow; ++ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); ++ if (!domWindow) { ++ NS_WARNING("no dom window in content finished loading\n"); ++ return; ++ } ++ ++ // resize the content ++ domWindow->SizeToContent(); ++ ++ // and since we're done loading show the window, assuming that the ++ // visibility flag has been set. ++ PRBool visibility; ++ mWindow->GetVisibility(&visibility); ++ if (visibility) ++ mWindow->SetVisibility(PR_TRUE); ++ } ++} ++ ++void ++EmbedPrivate::ChildFocusIn(void) ++{ ++ if (mIsDestroyed) ++ return; ++ ++ nsresult rv; ++ nsCOMPtr webBrowser; ++ rv = mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ nsCOMPtr webBrowserFocus(do_QueryInterface(webBrowser)); ++ if (!webBrowserFocus) ++ return; ++ ++ webBrowserFocus->Activate(); ++} ++ ++void ++EmbedPrivate::ChildFocusOut(void) ++{ ++ if (mIsDestroyed) ++ return; ++ ++ nsresult rv; ++ nsCOMPtr webBrowser; ++ rv = mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ nsCOMPtr webBrowserFocus(do_QueryInterface(webBrowser)); ++ if (!webBrowserFocus) ++ return; ++ ++ webBrowserFocus->Deactivate(); ++} ++ ++// Get the event listener for the chrome event handler. ++ ++void ++EmbedPrivate::GetListener(void) ++{ ++ if (mEventTarget) ++ return; ++ ++ nsCOMPtr piWin; ++ GetPIDOMWindow(getter_AddRefs(piWin)); ++ ++ if (!piWin) ++ return; ++ ++ mEventTarget = do_QueryInterface(piWin->GetChromeEventHandler()); ++} ++ ++// attach key and mouse event listeners ++ ++void ++EmbedPrivate::AttachListeners(void) ++{ ++ if (!mEventTarget || mListenersAttached) ++ return; ++ ++ nsIDOMEventListener *eventListener = ++ static_cast(static_cast(mEventListener)); ++ ++ // add the key listener ++ nsresult rv; ++ rv = mEventTarget->AddEventListenerByIID(eventListener, ++ NS_GET_IID(nsIDOMKeyListener)); ++ if (NS_FAILED(rv)) { ++ NS_WARNING("Failed to add key listener\n"); ++ return; ++ } ++ ++ rv = mEventTarget->AddEventListenerByIID(eventListener, ++ NS_GET_IID(nsIDOMMouseListener)); ++ if (NS_FAILED(rv)) { ++ NS_WARNING("Failed to add mouse listener\n"); ++ return; ++ } ++ ++ rv = mEventTarget->AddEventListenerByIID(eventListener, ++ NS_GET_IID(nsIDOMUIListener)); ++ if (NS_FAILED(rv)) { ++ NS_WARNING("Failed to add UI listener\n"); ++ return; ++ } ++ ++ // ok, all set. ++ mListenersAttached = PR_TRUE; ++} ++ ++void ++EmbedPrivate::DetachListeners(void) ++{ ++ if (!mListenersAttached || !mEventTarget) ++ return; ++ ++ nsIDOMEventListener *eventListener = ++ static_cast(static_cast(mEventListener)); ++ ++ nsresult rv; ++ rv = mEventTarget->RemoveEventListenerByIID(eventListener, ++ NS_GET_IID(nsIDOMKeyListener)); ++ if (NS_FAILED(rv)) { ++ NS_WARNING("Failed to remove key listener\n"); ++ return; ++ } ++ ++ rv = ++ mEventTarget->RemoveEventListenerByIID(eventListener, ++ NS_GET_IID(nsIDOMMouseListener)); ++ if (NS_FAILED(rv)) { ++ NS_WARNING("Failed to remove mouse listener\n"); ++ return; ++ } ++ ++ rv = mEventTarget->RemoveEventListenerByIID(eventListener, ++ NS_GET_IID(nsIDOMUIListener)); ++ if (NS_FAILED(rv)) { ++ NS_WARNING("Failed to remove UI listener\n"); ++ return; ++ } ++ ++ mListenersAttached = PR_FALSE; ++} ++ ++nsresult ++EmbedPrivate::GetPIDOMWindow(nsPIDOMWindow **aPIWin) ++{ ++ *aPIWin = nsnull; ++ ++ // get the web browser ++ nsCOMPtr webBrowser; ++ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); ++ ++ // get the content DOM window for that web browser ++ nsCOMPtr domWindow; ++ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); ++ if (!domWindow) ++ return NS_ERROR_FAILURE; ++ ++ // get the private DOM window ++ nsCOMPtr domWindowPrivate = do_QueryInterface(domWindow); ++ // and the root window for that DOM window ++ *aPIWin = domWindowPrivate->GetPrivateRoot(); ++ ++ if (*aPIWin) { ++ NS_ADDREF(*aPIWin); ++ return NS_OK; ++ } ++ ++ return NS_ERROR_FAILURE; ++ ++} ++ ++#ifdef MOZ_ACCESSIBILITY_ATK ++void * ++EmbedPrivate::GetAtkObjectForCurrentDocument() ++{ ++ if (!mNavigation) ++ return nsnull; ++ ++ nsCOMPtr accService = ++ do_GetService("@mozilla.org/accessibilityService;1"); ++ if (accService) { ++ //get current document ++ nsCOMPtr domDoc; ++ mNavigation->GetDocument(getter_AddRefs(domDoc)); ++ NS_ENSURE_TRUE(domDoc, nsnull); ++ ++ nsCOMPtr domNode(do_QueryInterface(domDoc)); ++ NS_ENSURE_TRUE(domNode, nsnull); ++ ++ nsCOMPtr acc; ++ accService->GetAccessibleFor(domNode, getter_AddRefs(acc)); ++ NS_ENSURE_TRUE(acc, nsnull); ++ ++ void *atkObj = nsnull; ++ if (NS_SUCCEEDED(acc->GetNativeInterface(&atkObj))) ++ return atkObj; ++ } ++ return nsnull; ++} ++#endif /* MOZ_ACCESSIBILITY_ATK */ ++ ++/* static */ ++void ++EmbedPrivate::RegisterAppComponents(void) ++{ ++ XRE_AddStaticComponent(&kDefaultPromptModule); ++} ++ ++/* static */ ++void ++EmbedPrivate::EnsureOffscreenWindow(void) ++{ ++ if (sOffscreenWindow) ++ return; ++ sOffscreenWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); ++ gtk_widget_realize(sOffscreenWindow); ++ sOffscreenFixed = gtk_fixed_new(); ++ gtk_container_add(GTK_CONTAINER(sOffscreenWindow), sOffscreenFixed); ++ gtk_widget_realize(sOffscreenFixed); ++} ++ ++/* static */ ++void ++EmbedPrivate::DestroyOffscreenWindow(void) ++{ ++ if (!sOffscreenWindow) ++ return; ++ gtk_widget_destroy(sOffscreenWindow); ++ sOffscreenWindow = 0; ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-06-22 12:14:58.795816453 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h 2011-06-22 12:14:58.795816453 +0200 +@@ -0,0 +1,188 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef __EmbedPrivate_h ++#define __EmbedPrivate_h ++ ++#include "nsCOMPtr.h" ++#include "nsStringGlue.h" ++#include "nsIWebNavigation.h" ++#include "nsISHistory.h" ++// for our one function that gets the EmbedPrivate via the chrome ++// object. ++#include "nsIWebBrowserChrome.h" ++#include "nsIAppShell.h" ++#include "nsPIDOMEventTarget.h" ++#include "nsTArray.h" ++ ++#include "gtkmozembedprivate.h" ++ ++class EmbedProgress; ++class EmbedWindow; ++class EmbedContentListener; ++class EmbedEventListener; ++ ++class nsPIDOMWindow; ++class nsIDirectoryServiceProvider; ++ ++class EmbedPrivate { ++ ++ public: ++ ++ EmbedPrivate(); ++ ~EmbedPrivate(); ++ ++ nsresult Init (GtkMozEmbed *aOwningWidget); ++ nsresult Realize (PRBool *aAlreadRealized); ++ void Unrealize (void); ++ void Show (void); ++ void Hide (void); ++ void Resize (PRUint32 aWidth, PRUint32 aHeight); ++ void Destroy (void); ++ void SetURI (const char *aURI); ++ void LoadCurrentURI (void); ++ void Reload (PRUint32 reloadFlags); ++ ++ void SetChromeMask (PRUint32 chromeMask); ++ void ApplyChromeMask (); ++ ++ static void PushStartup (void); ++ static void PopStartup (void); ++ static void SetPath (const char *aPath); ++ static void SetCompPath (const char *aPath); ++ static void SetProfilePath (const char *aDir, const char *aName); ++ static void SetDirectoryServiceProvider (nsIDirectoryServiceProvider * appFileLocProvider); ++ ++ nsresult OpenStream (const char *aBaseURI, const char *aContentType); ++ nsresult AppendToStream (const PRUint8 *aData, PRUint32 aLen); ++ nsresult CloseStream (void); ++ ++ // This function will find the specific EmbedPrivate object for a ++ // given nsIWebBrowserChrome. ++ static EmbedPrivate *FindPrivateForBrowser(nsIWebBrowserChrome *aBrowser); ++ ++ // This is an upcall that will come from the progress listener ++ // whenever there is a content state change. We need this so we can ++ // attach event listeners. ++ void ContentStateChange (void); ++ ++ // This is an upcall from the progress listener when content is ++ // finished loading. We have this so that if it's chrome content ++ // that we can size to content properly and show ourselves if ++ // visibility is set. ++ void ContentFinishedLoading(void); ++ ++ // these are when the widget itself gets focus in and focus out ++ // events ++ void ChildFocusIn (void); ++ void ChildFocusOut(void); ++ ++#ifdef MOZ_ACCESSIBILITY_ATK ++ void *GetAtkObjectForCurrentDocument(); ++#endif ++ ++ GtkMozEmbed *mOwningWidget; ++ ++ // all of the objects that we own ++ EmbedWindow *mWindow; ++ nsCOMPtr mWindowGuard; ++ EmbedProgress *mProgress; ++ nsCOMPtr mProgressGuard; ++ EmbedContentListener *mContentListener; ++ nsCOMPtr mContentListenerGuard; ++ EmbedEventListener *mEventListener; ++ nsCOMPtr mEventListenerGuard; ++ ++ nsCOMPtr mNavigation; ++ nsCOMPtr mSessionHistory; ++ ++ // our event receiver ++ nsCOMPtr mEventTarget; ++ ++ // the currently loaded uri ++ nsCString mURI; ++ ++ // the number of widgets that have been created ++ static PRUint32 sWidgetCount; ++ // the path to the GRE ++ static char *sPath; ++ // the path to components ++ static char *sCompPath; ++ // the appshell we have created ++ static nsIAppShell *sAppShell; ++ // the list of all open windows ++ static nsTArray *sWindowList; ++ // what is our profile path? ++ static nsILocalFile *sProfileDir; ++ static nsISupports *sProfileLock; ++ ++ static nsIDirectoryServiceProvider * sAppFileLocProvider; ++ ++ // chrome mask ++ PRUint32 mChromeMask; ++ // is this a chrome window? ++ PRBool mIsChrome; ++ // has the chrome finished loading? ++ PRBool mChromeLoaded; ++ // saved window ID for reparenting later ++ GtkWidget *mMozWindowWidget; ++ // has someone called Destroy() on us? ++ PRBool mIsDestroyed; ++ ++ private: ++ ++ // is the chrome listener attached yet? ++ PRBool mListenersAttached; ++ ++ void GetListener (void); ++ void AttachListeners(void); ++ void DetachListeners(void); ++ ++ // this will get the PIDOMWindow for this widget ++ nsresult GetPIDOMWindow (nsPIDOMWindow **aPIWin); ++ ++ static void RegisterAppComponents(); ++ ++ // offscreen window methods and the offscreen widget ++ static void EnsureOffscreenWindow(void); ++ static void DestroyOffscreenWindow(void); ++ static GtkWidget *sOffscreenWindow; ++ static GtkWidget *sOffscreenFixed; ++ ++}; ++ ++#endif /* __EmbedPrivate_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-06-22 12:14:58.796816458 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp 2011-06-22 12:14:58.796816458 +0200 +@@ -0,0 +1,215 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "EmbedProgress.h" ++ ++#include "nsIChannel.h" ++#include "nsIWebProgress.h" ++#include "nsIDOMWindow.h" ++ ++#include "nsIURI.h" ++ ++EmbedProgress::EmbedProgress(void) ++{ ++ mOwner = nsnull; ++} ++ ++EmbedProgress::~EmbedProgress() ++{ ++} ++ ++NS_IMPL_ISUPPORTS2(EmbedProgress, ++ nsIWebProgressListener, ++ nsISupportsWeakReference) ++ ++nsresult ++EmbedProgress::Init(EmbedPrivate *aOwner) ++{ ++ mOwner = aOwner; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedProgress::OnStateChange(nsIWebProgress *aWebProgress, ++ nsIRequest *aRequest, ++ PRUint32 aStateFlags, ++ nsresult aStatus) ++{ ++ // give the widget a chance to attach any listeners ++ mOwner->ContentStateChange(); ++ // if we've got the start flag, emit the signal ++ if ((aStateFlags & GTK_MOZ_EMBED_FLAG_IS_NETWORK) && ++ (aStateFlags & GTK_MOZ_EMBED_FLAG_START)) ++ { ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[NET_START], 0); ++ } ++ ++ // get the uri for this request ++ nsCAutoString uriString; ++ RequestToURIString(aRequest, uriString); ++ ++ // is it the same as the current URI? ++ if (mOwner->mURI.Equals(uriString)) ++ { ++ // for people who know what they are doing ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[NET_STATE], 0, ++ aStateFlags, aStatus); ++ } ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[NET_STATE_ALL], 0, ++ uriString.get(), ++ (gint)aStateFlags, (gint)aStatus); ++ // and for stop, too ++ if ((aStateFlags & GTK_MOZ_EMBED_FLAG_IS_NETWORK) && ++ (aStateFlags & GTK_MOZ_EMBED_FLAG_STOP)) ++ { ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[NET_STOP], 0); ++ // let our owner know that the load finished ++ mOwner->ContentFinishedLoading(); ++ } ++ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedProgress::OnProgressChange(nsIWebProgress *aWebProgress, ++ nsIRequest *aRequest, ++ PRInt32 aCurSelfProgress, ++ PRInt32 aMaxSelfProgress, ++ PRInt32 aCurTotalProgress, ++ PRInt32 aMaxTotalProgress) ++{ ++ ++ nsCAutoString uriString; ++ RequestToURIString(aRequest, uriString); ++ ++ // is it the same as the current uri? ++ if (mOwner->mURI.Equals(uriString)) { ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[PROGRESS], 0, ++ aCurTotalProgress, aMaxTotalProgress); ++ } ++ ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[PROGRESS_ALL], 0, ++ uriString.get(), ++ aCurTotalProgress, aMaxTotalProgress); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedProgress::OnLocationChange(nsIWebProgress *aWebProgress, ++ nsIRequest *aRequest, ++ nsIURI *aLocation) ++{ ++ nsCAutoString newURI; ++ NS_ENSURE_ARG_POINTER(aLocation); ++ aLocation->GetSpec(newURI); ++ ++ // Make sure that this is the primary frame change and not ++ // just a subframe. ++ PRBool isSubFrameLoad = PR_FALSE; ++ if (aWebProgress) { ++ nsCOMPtr domWindow; ++ nsCOMPtr topDomWindow; ++ ++ aWebProgress->GetDOMWindow(getter_AddRefs(domWindow)); ++ ++ // get the root dom window ++ if (domWindow) ++ domWindow->GetTop(getter_AddRefs(topDomWindow)); ++ ++ if (domWindow != topDomWindow) ++ isSubFrameLoad = PR_TRUE; ++ } ++ ++ if (!isSubFrameLoad) { ++ mOwner->SetURI(newURI.get()); ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[LOCATION], 0); ++ } ++ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedProgress::OnStatusChange(nsIWebProgress *aWebProgress, ++ nsIRequest *aRequest, ++ nsresult aStatus, ++ const PRUnichar *aMessage) ++{ ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[STATUS_CHANGE], 0, ++ static_cast(aRequest), ++ static_cast(aStatus), ++ static_cast(aMessage)); ++ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedProgress::OnSecurityChange(nsIWebProgress *aWebProgress, ++ nsIRequest *aRequest, ++ PRUint32 aState) ++{ ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[SECURITY_CHANGE], 0, ++ static_cast(aRequest), ++ aState); ++ return NS_OK; ++} ++ ++/* static */ ++void ++EmbedProgress::RequestToURIString(nsIRequest *aRequest, nsACString &aString) ++{ ++ // is it a channel ++ nsCOMPtr channel; ++ channel = do_QueryInterface(aRequest); ++ if (!channel) ++ return; ++ ++ nsCOMPtr uri; ++ channel->GetURI(getter_AddRefs(uri)); ++ if (!uri) ++ return; ++ ++ uri->GetSpec(aString); ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-06-22 12:14:58.798816468 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h 2011-06-22 12:14:58.798816468 +0200 +@@ -0,0 +1,66 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef __EmbedProgress_h ++#define __EmbedProgress_h ++ ++#include "nsIWebProgressListener.h" ++#include "nsWeakReference.h" ++#include "EmbedPrivate.h" ++ ++class EmbedProgress : public nsIWebProgressListener, ++ public nsSupportsWeakReference ++{ ++ public: ++ EmbedProgress(); ++ virtual ~EmbedProgress(); ++ ++ nsresult Init(EmbedPrivate *aOwner); ++ ++ NS_DECL_ISUPPORTS ++ ++ NS_DECL_NSIWEBPROGRESSLISTENER ++ ++ private: ++ ++ static void RequestToURIString (nsIRequest *aRequest, nsACString &aString); ++ ++ EmbedPrivate *mOwner; ++ ++}; ++ ++#endif /* __EmbedProgress_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-06-22 12:14:58.800816478 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-06-22 12:14:58.800816478 +0200 +@@ -0,0 +1,411 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 2003 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Brian Ryner ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "EmbedPrompter.h" ++ ++enum { ++ INCLUDE_USERNAME = 1 << 0, ++ INCLUDE_PASSWORD = 1 << 1, ++ INCLUDE_CHECKBOX = 1 << 2, ++ INCLUDE_CANCEL = 1 << 3 ++}; ++ ++struct DialogDescription { ++ int flags; ++ const gchar* icon; ++}; ++ ++// This table contains the optional widgets and icons associated with ++// each type of dialog. ++ ++static const DialogDescription DialogTable[] = { ++ { 0, GTK_STOCK_DIALOG_WARNING }, // ALERT ++ { INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_WARNING }, // ALERT_CHECK ++ { INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // CONFIRM ++ { INCLUDE_CHECKBOX | ++ INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // CONFIRM_CHECK ++ { INCLUDE_CANCEL | ++ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT ++ { INCLUDE_CANCEL | ++ INCLUDE_USERNAME | ++ INCLUDE_PASSWORD | ++ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT_USER_PASS ++ { INCLUDE_CANCEL | ++ INCLUDE_PASSWORD | ++ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT_PASS ++ { INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // SELECT ++ { INCLUDE_CANCEL | ++ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION } // UNIVERSAL ++}; ++ ++EmbedPrompter::EmbedPrompter(void) ++ : mCheckValue(PR_FALSE), ++ mItemList(nsnull), ++ mItemCount(0), ++ mButtonPressed(0), ++ mConfirmResult(PR_FALSE), ++ mSelectedItem(0), ++ mWindow(NULL), ++ mUserField(NULL), ++ mPassField(NULL), ++ mTextField(NULL), ++ mComboBox(NULL), ++ mCheckBox(NULL) ++{ ++} ++ ++EmbedPrompter::~EmbedPrompter(void) ++{ ++ if (mItemList) ++ delete[] mItemList; ++} ++ ++nsresult ++EmbedPrompter::Create(PromptType aType, GtkWindow* aParentWindow) ++{ ++ mWindow = gtk_dialog_new_with_buttons(mTitle.get(), aParentWindow, ++ (GtkDialogFlags)0, ++ NULL); ++ ++ // only add the dialog to the window group if the parent already has a window group, ++ // so as not to break app's expectations about modal dialogs. ++ if (aParentWindow && aParentWindow->group) { ++ gtk_window_group_add_window (aParentWindow->group, GTK_WINDOW (mWindow)); ++ } ++ ++ // gtk will resize this for us as necessary ++ gtk_window_set_default_size(GTK_WINDOW(mWindow), 100, 50); ++ ++ // this HBox will contain the icon, and a vbox which contains the ++ // dialog text and other widgets. ++ GtkWidget* dialogHBox = gtk_hbox_new(FALSE, 12); ++ ++ ++ // Set up dialog properties according to the GNOME HIG ++ // (http://developer.gnome.org/projects/gup/hig/1.0/windows.html#alert-windows) ++ ++ gtk_container_set_border_width(GTK_CONTAINER(mWindow), 6); ++ gtk_dialog_set_has_separator(GTK_DIALOG(mWindow), FALSE); ++ gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(mWindow)->vbox), 12); ++ gtk_container_set_border_width(GTK_CONTAINER(dialogHBox), 6); ++ ++ ++ // This is the VBox which will contain the label and other controls. ++ GtkWidget* contentsVBox = gtk_vbox_new(FALSE, 12); ++ ++ // get the stock icon for this dialog and put it in the box ++ const gchar* iconDesc = DialogTable[aType].icon; ++ GtkWidget* icon = gtk_image_new_from_stock(iconDesc, GTK_ICON_SIZE_DIALOG); ++ gtk_misc_set_alignment(GTK_MISC(icon), 0.5, 0.0); ++ gtk_box_pack_start(GTK_BOX(dialogHBox), icon, FALSE, FALSE, 0); ++ ++ // now pack the label into the vbox ++ GtkWidget* label = gtk_label_new(mMessageText.get()); ++ gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); ++ gtk_label_set_selectable(GTK_LABEL(label), TRUE); ++ gtk_box_pack_start(GTK_BOX(contentsVBox), label, FALSE, FALSE, 0); ++ ++ int widgetFlags = DialogTable[aType].flags; ++ ++ if (widgetFlags & (INCLUDE_USERNAME | INCLUDE_PASSWORD)) { ++ ++ // If we're creating a username and/or password field, make an hbox ++ // which will contain two vboxes, one for the labels and one for the ++ // text fields. This will let us line up the textfields. ++ ++ GtkWidget* userPassHBox = gtk_hbox_new(FALSE, 12); ++ GtkWidget* userPassLabels = gtk_vbox_new(TRUE, 6); ++ GtkWidget* userPassFields = gtk_vbox_new(TRUE, 6); ++ ++ if (widgetFlags & INCLUDE_USERNAME) { ++ GtkWidget* userLabel = gtk_label_new("User Name:"); ++ gtk_box_pack_start(GTK_BOX(userPassLabels), userLabel, FALSE, ++ FALSE, 0); ++ ++ mUserField = gtk_entry_new(); ++ ++ if (!mUser.IsEmpty()) ++ gtk_entry_set_text(GTK_ENTRY(mUserField), mUser.get()); ++ ++ gtk_entry_set_activates_default(GTK_ENTRY(mUserField), TRUE); ++ ++ gtk_box_pack_start(GTK_BOX(userPassFields), mUserField, FALSE, ++ FALSE, 0); ++ } ++ if (widgetFlags & INCLUDE_PASSWORD) { ++ GtkWidget* passLabel = gtk_label_new("Password:"); ++ gtk_box_pack_start(GTK_BOX(userPassLabels), passLabel, FALSE, ++ FALSE, 0); ++ ++ mPassField = gtk_entry_new(); ++ ++ if (!mPass.IsEmpty()) ++ gtk_entry_set_text(GTK_ENTRY(mPassField), mPass.get()); ++ ++ gtk_entry_set_visibility(GTK_ENTRY(mPassField), FALSE); ++ gtk_entry_set_activates_default(GTK_ENTRY(mPassField), TRUE); ++ ++ gtk_box_pack_start(GTK_BOX(userPassFields), mPassField, FALSE, ++ FALSE, 0); ++ } ++ ++ gtk_box_pack_start(GTK_BOX(userPassHBox), userPassLabels, FALSE, ++ FALSE, 0); ++ gtk_box_pack_start(GTK_BOX(userPassHBox), userPassFields, FALSE, ++ FALSE, 0); ++ gtk_box_pack_start(GTK_BOX(contentsVBox), userPassHBox, FALSE, FALSE, 0); ++ } ++ ++ if (aType == TYPE_PROMPT) { ++ mTextField = gtk_entry_new(); ++ ++ if (!mTextValue.IsEmpty()) ++ gtk_entry_set_text(GTK_ENTRY(mTextField), mTextValue.get()); ++ ++ gtk_entry_set_activates_default(GTK_ENTRY(mTextField), TRUE); ++ ++ gtk_box_pack_start(GTK_BOX(contentsVBox), mTextField, FALSE, FALSE, 0); ++ } ++ ++ // Add a checkbox ++ if ((widgetFlags & INCLUDE_CHECKBOX) && !mCheckMessage.IsEmpty()) { ++ mCheckBox = gtk_check_button_new_with_label(mCheckMessage.get()); ++ ++ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mCheckBox), ++ mCheckValue); ++ gtk_label_set_line_wrap(GTK_LABEL(gtk_bin_get_child(GTK_BIN(mCheckBox))), ++ TRUE); ++ ++ gtk_box_pack_start(GTK_BOX(contentsVBox), mCheckBox, FALSE, FALSE, 0); ++ } ++ ++ // Add a dropdown menu ++ if (aType == TYPE_SELECT) { ++ // Build up a GtkComboBox containing the items ++ GtkWidget* mComboBox = gtk_combo_box_new_text(); ++ for (PRUint32 i = 0; i < mItemCount; ++i) { ++ gtk_combo_box_append_text(GTK_COMBO_BOX(mComboBox), mItemList[i].get()); ++ } ++ gtk_box_pack_start(GTK_BOX(contentsVBox), mComboBox, FALSE, FALSE, 0); ++ } ++ ++ if (aType == TYPE_UNIVERSAL) { ++ // Create buttons based on the flags passed in. ++ for (PRUint32 i = EMBED_MAX_BUTTONS; i-- > 0; ) { ++ if (!mButtonLabels[i].IsEmpty()) ++ gtk_dialog_add_button(GTK_DIALOG(mWindow), ++ mButtonLabels[i].get(), i); ++ } ++ gtk_dialog_set_default_response(GTK_DIALOG(mWindow), 0); ++ } else { ++ // Create standard ok and cancel buttons ++ if (widgetFlags & INCLUDE_CANCEL) ++ gtk_dialog_add_button(GTK_DIALOG(mWindow), GTK_STOCK_CANCEL, ++ GTK_RESPONSE_CANCEL); ++ ++ GtkWidget* okButton = gtk_dialog_add_button(GTK_DIALOG(mWindow), ++ GTK_STOCK_OK, ++ GTK_RESPONSE_ACCEPT); ++ gtk_widget_grab_default(okButton); ++ } ++ ++ // Pack the contentsVBox into the dialogHBox and the dialog. ++ gtk_box_pack_start(GTK_BOX(dialogHBox), contentsVBox, FALSE, FALSE, 0); ++ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mWindow)->vbox), dialogHBox, FALSE, ++ FALSE, 0); ++ ++ return NS_OK; ++} ++ ++void ++EmbedPrompter::SetTitle(const PRUnichar *aTitle) ++{ ++ mTitle.Assign(NS_ConvertUTF16toUTF8(aTitle)); ++} ++ ++void ++EmbedPrompter::SetTextValue(const PRUnichar *aTextValue) ++{ ++ mTextValue.Assign(NS_ConvertUTF16toUTF8(aTextValue)); ++} ++ ++void ++EmbedPrompter::SetCheckMessage(const PRUnichar *aMessage) ++{ ++ mCheckMessage.Assign(NS_ConvertUTF16toUTF8(aMessage)); ++} ++ ++void ++EmbedPrompter::SetMessageText(const PRUnichar *aMessageText) ++{ ++ mMessageText.Assign(NS_ConvertUTF16toUTF8(aMessageText)); ++} ++ ++void ++EmbedPrompter::SetUser(const PRUnichar *aUser) ++{ ++ mUser.Assign(NS_ConvertUTF16toUTF8(aUser)); ++} ++ ++void ++EmbedPrompter::SetPassword(const PRUnichar *aPass) ++{ ++ mPass.Assign(NS_ConvertUTF16toUTF8(aPass)); ++} ++ ++void ++EmbedPrompter::SetCheckValue(const PRBool aValue) ++{ ++ mCheckValue = aValue; ++} ++ ++void ++EmbedPrompter::SetItems(const PRUnichar** aItemArray, PRUint32 aCount) ++{ ++ if (mItemList) ++ delete[] mItemList; ++ ++ mItemCount = aCount; ++ mItemList = new nsCString[aCount]; ++ for (PRUint32 i = 0; i < aCount; ++i) ++ mItemList[i].Assign(NS_ConvertUTF16toUTF8(aItemArray[i])); ++} ++ ++void ++EmbedPrompter::SetButtons(const PRUnichar* aButton0Label, ++ const PRUnichar* aButton1Label, ++ const PRUnichar* aButton2Label) ++{ ++ mButtonLabels[0].Assign(NS_ConvertUTF16toUTF8(aButton0Label)); ++ mButtonLabels[1].Assign(NS_ConvertUTF16toUTF8(aButton1Label)); ++ mButtonLabels[2].Assign(NS_ConvertUTF16toUTF8(aButton2Label)); ++} ++ ++void ++EmbedPrompter::GetCheckValue(PRBool *aValue) ++{ ++ *aValue = mCheckValue; ++} ++ ++void ++EmbedPrompter::GetConfirmValue(PRBool *aConfirmValue) ++{ ++ *aConfirmValue = mConfirmResult; ++} ++ ++void ++EmbedPrompter::GetTextValue(PRUnichar **aTextValue) ++{ ++ *aTextValue = ToNewUnicode(NS_ConvertUTF8toUTF16(mTextValue)); ++} ++ ++void ++EmbedPrompter::GetUser(PRUnichar **aUser) ++{ ++ *aUser = ToNewUnicode(NS_ConvertUTF8toUTF16(mUser)); ++} ++ ++void ++EmbedPrompter::GetPassword(PRUnichar **aPass) ++{ ++ *aPass = ToNewUnicode(NS_ConvertUTF8toUTF16(mPass)); ++} ++ ++void ++EmbedPrompter::GetSelectedItem(PRInt32 *aIndex) ++{ ++ *aIndex = mSelectedItem; ++} ++ ++void ++EmbedPrompter::GetButtonPressed(PRInt32 *aButton) ++{ ++ *aButton = mButtonPressed; ++} ++ ++void ++EmbedPrompter::Run(void) ++{ ++ gtk_widget_show_all(mWindow); ++ gint response = gtk_dialog_run(GTK_DIALOG(mWindow)); ++ switch (response) { ++ case GTK_RESPONSE_NONE: ++ case GTK_RESPONSE_CANCEL: ++ case GTK_RESPONSE_DELETE_EVENT: ++ mConfirmResult = PR_FALSE; ++ break; ++ case GTK_RESPONSE_ACCEPT: ++ mConfirmResult = PR_TRUE; ++ SaveDialogValues(); ++ break; ++ default: ++ mButtonPressed = response; ++ SaveDialogValues(); ++ } ++ ++ gtk_widget_destroy(mWindow); ++} ++ ++void ++EmbedPrompter::SaveDialogValues() ++{ ++ if (mUserField) ++ mUser.Assign(gtk_entry_get_text(GTK_ENTRY(mUserField))); ++ ++ if (mPassField) ++ mPass.Assign(gtk_entry_get_text(GTK_ENTRY(mPassField))); ++ ++ if (mCheckBox) ++ mCheckValue = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mCheckBox)); ++ ++ if (mTextField) ++ mTextValue.Assign(gtk_entry_get_text(GTK_ENTRY(mTextField))); ++ ++ if (mComboBox) ++ { ++ gchar *str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(mComboBox)); ++ for (PRUint32 i = 0; i < mItemCount; ++i) { ++ if(mItemList[i].Equals(str)) ++ { ++ mSelectedItem = i; ++ break; ++ } ++ } ++ } ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-06-22 12:14:58.801816483 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h 2011-06-22 12:14:58.801816483 +0200 +@@ -0,0 +1,113 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * Brian Ryner ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsStringGlue.h" ++#include ++ ++#define EMBED_MAX_BUTTONS 3 ++ ++class EmbedPrompter { ++ ++public: ++ ++ EmbedPrompter(); ++ ~EmbedPrompter(); ++ ++ enum PromptType { ++ TYPE_ALERT, ++ TYPE_ALERT_CHECK, ++ TYPE_CONFIRM, ++ TYPE_CONFIRM_CHECK, ++ TYPE_PROMPT, ++ TYPE_PROMPT_USER_PASS, ++ TYPE_PROMPT_PASS, ++ TYPE_SELECT, ++ TYPE_UNIVERSAL ++ }; ++ ++ nsresult Create(PromptType aType, GtkWindow* aParentWindow); ++ void SetTitle(const PRUnichar *aTitle); ++ void SetTextValue (const PRUnichar *aTextValue); ++ void SetCheckMessage(const PRUnichar *aCheckMessage); ++ void SetCheckValue(const PRBool aValue); ++ void SetMessageText(const PRUnichar *aMessageText); ++ void SetUser(const PRUnichar *aUser); ++ void SetPassword(const PRUnichar *aPass); ++ void SetButtons(const PRUnichar* aButton0Label, ++ const PRUnichar* aButton1Label, ++ const PRUnichar* aButton2Label); ++ void SetItems(const PRUnichar **aItemArray, PRUint32 aCount); ++ ++ void GetCheckValue(PRBool *aValue); ++ void GetConfirmValue(PRBool *aConfirmValue); ++ void GetTextValue(PRUnichar **aTextValue); ++ void GetUser(PRUnichar **aUser); ++ void GetPassword(PRUnichar **aPass); ++ void GetButtonPressed(PRInt32 *aButton); ++ void GetSelectedItem(PRInt32 *aIndex); ++ ++ void Run(void); ++ ++private: ++ ++ void SaveDialogValues(); ++ ++ nsCString mTitle; ++ nsCString mMessageText; ++ nsCString mTextValue; ++ nsCString mCheckMessage; ++ PRBool mCheckValue; ++ nsCString mUser; ++ nsCString mPass; ++ nsCString mButtonLabels[EMBED_MAX_BUTTONS]; ++ nsCString *mItemList; ++ PRUint32 mItemCount; ++ ++ PRInt32 mButtonPressed; ++ PRBool mConfirmResult; ++ PRInt32 mSelectedItem; ++ ++ GtkWidget *mWindow; ++ GtkWidget *mUserField; ++ GtkWidget *mPassField; ++ GtkWidget *mTextField; ++ GtkWidget *mComboBox; ++ GtkWidget *mCheckBox; ++}; +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-06-22 12:14:58.803816493 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp 2011-06-22 12:14:58.803816493 +0200 +@@ -0,0 +1,474 @@ ++/* ++ * vim:ts=2:et:sw=2 ++ * ++ * ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsCWebBrowser.h" ++#include "nsIComponentManager.h" ++#include "nsComponentManagerUtils.h" ++#include "nsIDocShellTreeItem.h" ++#include "nsIWidget.h" ++ ++#include "EmbedWindow.h" ++#include "EmbedPrivate.h" ++#include "EmbedPrompter.h" ++ ++GtkWidget *EmbedWindow::sTipWindow = nsnull; ++ ++EmbedWindow::EmbedWindow(void) ++{ ++ mOwner = nsnull; ++ mVisibility = PR_FALSE; ++ mIsModal = PR_FALSE; ++} ++ ++EmbedWindow::~EmbedWindow(void) ++{ ++ ExitModalEventLoop(PR_FALSE); ++} ++ ++nsresult ++EmbedWindow::Init(EmbedPrivate *aOwner) ++{ ++ // save our owner for later ++ mOwner = aOwner; ++ ++ // create our nsIWebBrowser object and set up some basic defaults. ++ mWebBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID); ++ if (!mWebBrowser) ++ return NS_ERROR_FAILURE; ++ ++ mWebBrowser->SetContainerWindow(static_cast(this)); ++ ++ nsCOMPtr item = do_QueryInterface(mWebBrowser); ++ item->SetItemType(nsIDocShellTreeItem::typeContentWrapper); ++ ++ return NS_OK; ++} ++ ++nsresult ++EmbedWindow::CreateWindow(void) ++{ ++ nsresult rv; ++ GtkWidget *ownerAsWidget = GTK_WIDGET(mOwner->mOwningWidget); ++ ++ // Get the base window interface for the web browser object and ++ // create the window. ++ mBaseWindow = do_QueryInterface(mWebBrowser); ++ rv = mBaseWindow->InitWindow(GTK_WIDGET(mOwner->mOwningWidget), ++ nsnull, ++ 0, 0, ++ ownerAsWidget->allocation.width, ++ ownerAsWidget->allocation.height); ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ rv = mBaseWindow->Create(); ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ return NS_OK; ++} ++ ++void ++EmbedWindow::ReleaseChildren(void) ++{ ++ ExitModalEventLoop(PR_FALSE); ++ ++ mBaseWindow->Destroy(); ++ mBaseWindow = 0; ++ mWebBrowser = 0; ++} ++ ++// nsISupports ++ ++NS_IMPL_ADDREF(EmbedWindow) ++NS_IMPL_RELEASE(EmbedWindow) ++ ++NS_INTERFACE_MAP_BEGIN(EmbedWindow) ++ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWebBrowserChrome) ++ NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome) ++ NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChromeFocus) ++ NS_INTERFACE_MAP_ENTRY(nsIEmbeddingSiteWindow) ++ NS_INTERFACE_MAP_ENTRY(nsITooltipListener) ++ NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) ++NS_INTERFACE_MAP_END ++ ++// nsIWebBrowserChrome ++ ++NS_IMETHODIMP ++EmbedWindow::SetStatus(PRUint32 aStatusType, const PRUnichar *aStatus) ++{ ++ switch (aStatusType) { ++ case STATUS_SCRIPT: ++ { ++ mJSStatus = aStatus; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[JS_STATUS], 0); ++ } ++ break; ++ case STATUS_SCRIPT_DEFAULT: ++ // Gee, that's nice. ++ break; ++ case STATUS_LINK: ++ { ++ mLinkMessage = aStatus; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[LINK_MESSAGE], 0); ++ } ++ break; ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::GetWebBrowser(nsIWebBrowser **aWebBrowser) ++{ ++ *aWebBrowser = mWebBrowser; ++ NS_IF_ADDREF(*aWebBrowser); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::SetWebBrowser(nsIWebBrowser *aWebBrowser) ++{ ++ mWebBrowser = aWebBrowser; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::GetChromeFlags(PRUint32 *aChromeFlags) ++{ ++ *aChromeFlags = mOwner->mChromeMask; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::SetChromeFlags(PRUint32 aChromeFlags) ++{ ++ mOwner->SetChromeMask(aChromeFlags); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::DestroyBrowserWindow(void) ++{ ++ // mark the owner as destroyed so it won't emit events anymore. ++ mOwner->mIsDestroyed = PR_TRUE; ++ ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[DESTROY_BROWSER], 0); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) ++{ ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[SIZE_TO], 0, aCX, aCY); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::ShowAsModal(void) ++{ ++ mIsModal = PR_TRUE; ++ GtkWidget *toplevel; ++ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); ++ gtk_grab_add(toplevel); ++ gtk_main(); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::IsWindowModal(PRBool *_retval) ++{ ++ *_retval = mIsModal; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::ExitModalEventLoop(nsresult aStatus) ++{ ++ if (mIsModal) { ++ GtkWidget *toplevel; ++ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); ++ gtk_grab_remove(toplevel); ++ mIsModal = PR_FALSE; ++ gtk_main_quit(); ++ } ++ return NS_OK; ++} ++ ++// nsIWebBrowserChromeFocus ++ ++NS_IMETHODIMP ++EmbedWindow::FocusNextElement() ++{ ++ GtkWidget *toplevel; ++ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); ++ if (!GTK_WIDGET_TOPLEVEL(toplevel)) ++ return NS_OK; ++ ++ g_signal_emit_by_name(G_OBJECT(toplevel), "move_focus", ++ GTK_DIR_TAB_FORWARD); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::FocusPrevElement() ++{ ++ GtkWidget *toplevel; ++ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); ++ if (!GTK_WIDGET_TOPLEVEL(toplevel)) ++ return NS_OK; ++ ++ g_signal_emit_by_name(G_OBJECT(toplevel), "move_focus", ++ GTK_DIR_TAB_BACKWARD); ++ return NS_OK; ++} ++ ++// nsIEmbeddingSiteWindow ++ ++NS_IMETHODIMP ++EmbedWindow::SetDimensions(PRUint32 aFlags, PRInt32 aX, PRInt32 aY, ++ PRInt32 aCX, PRInt32 aCY) ++{ ++ if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION && ++ (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | ++ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER))) { ++ return mBaseWindow->SetPositionAndSize(aX, aY, aCX, aCY, PR_TRUE); ++ } ++ else if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION) { ++ return mBaseWindow->SetPosition(aX, aY); ++ } ++ else if (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | ++ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER)) { ++ return mBaseWindow->SetSize(aCX, aCY, PR_TRUE); ++ } ++ return NS_ERROR_INVALID_ARG; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::GetDimensions(PRUint32 aFlags, PRInt32 *aX, ++ PRInt32 *aY, PRInt32 *aCX, PRInt32 *aCY) ++{ ++ if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION && ++ (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | ++ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER))) { ++ return mBaseWindow->GetPositionAndSize(aX, aY, aCX, aCY); ++ } ++ else if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION) { ++ return mBaseWindow->GetPosition(aX, aY); ++ } ++ else if (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | ++ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER)) { ++ return mBaseWindow->GetSize(aCX, aCY); ++ } ++ return NS_ERROR_INVALID_ARG; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::SetFocus(void) ++{ ++ // XXX might have to do more here. ++ return mBaseWindow->SetFocus(); ++} ++ ++NS_IMETHODIMP ++EmbedWindow::GetTitle(PRUnichar **aTitle) ++{ ++ *aTitle = ToNewUnicode(mTitle); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::SetTitle(const PRUnichar *aTitle) ++{ ++ mTitle = aTitle; ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[TITLE], 0); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::GetSiteWindow(void **aSiteWindow) ++{ ++ GtkWidget *ownerAsWidget (GTK_WIDGET(mOwner->mOwningWidget)); ++ *aSiteWindow = static_cast(ownerAsWidget); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::GetVisibility(PRBool *aVisibility) ++{ ++ // XXX See bug 312998 ++ // Work around the problem that sometimes the window ++ // is already visible even though mVisibility isn't true ++ // yet. ++ *aVisibility = mVisibility || ++ (!mOwner->mIsChrome && ++ mOwner->mOwningWidget && ++ GTK_WIDGET_MAPPED(mOwner->mOwningWidget)); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::SetVisibility(PRBool aVisibility) ++{ ++ // We always set the visibility so that if it's chrome and we finish ++ // the load we know that we have to show the window. ++ mVisibility = aVisibility; ++ ++ // if this is a chrome window and the chrome hasn't finished loading ++ // yet then don't show the window yet. ++ if (mOwner->mIsChrome && !mOwner->mChromeLoaded) ++ return NS_OK; ++ ++ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), ++ moz_embed_signals[VISIBILITY], 0, ++ aVisibility); ++ return NS_OK; ++} ++ ++// nsITooltipListener ++ ++static gint ++tooltips_paint_window(GtkWidget *window) ++{ ++ // draw tooltip style border around the text ++ gtk_paint_flat_box(window->style, window->window, ++ GTK_STATE_NORMAL, GTK_SHADOW_OUT, ++ NULL, window, "tooltip", ++ 0, 0, ++ window->allocation.width, window->allocation.height); ++ ++ return FALSE; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, ++ const PRUnichar *aTipText) ++{ ++ nsAutoString tipText ( aTipText ); ++ ++ const char* tipString = ToNewUTF8String(tipText); ++ ++ if (sTipWindow) ++ gtk_widget_destroy(sTipWindow); ++ ++ // get the root origin for this content window ++ nsCOMPtr mainWidget; ++ mBaseWindow->GetMainWidget(getter_AddRefs(mainWidget)); ++ GdkWindow *window; ++ window = static_cast(mainWidget->GetNativeData(NS_NATIVE_WINDOW)); ++ gint root_x, root_y; ++ gdk_window_get_origin(window, &root_x, &root_y); ++ ++ // XXX work around until I can get pink to figure out why ++ // tooltips vanish if they show up right at the origin of the ++ // cursor. ++ root_y += 10; ++ ++ sTipWindow = gtk_window_new(GTK_WINDOW_POPUP); ++ gtk_widget_set_app_paintable(sTipWindow, TRUE); ++ gtk_window_set_resizable(GTK_WINDOW(sTipWindow), TRUE); ++ // needed to get colors + fonts etc correctly ++ gtk_widget_set_name(sTipWindow, "gtk-tooltips"); ++ gtk_window_set_type_hint(GTK_WINDOW(sTipWindow), GDK_WINDOW_TYPE_HINT_TOOLTIP); ++ ++ // set up the popup window as a transient of the widget. ++ GtkWidget *toplevel_window; ++ toplevel_window = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); ++ if (!GTK_WINDOW(toplevel_window)) { ++ NS_ERROR("no gtk window in hierarchy!"); ++ return NS_ERROR_FAILURE; ++ } ++ gtk_window_set_transient_for(GTK_WINDOW(sTipWindow), ++ GTK_WINDOW(toplevel_window)); ++ ++ // realize the widget ++ gtk_widget_realize(sTipWindow); ++ ++ g_signal_connect(G_OBJECT(sTipWindow), "expose_event", ++ G_CALLBACK(tooltips_paint_window), NULL); ++ ++ // set up the label for the tooltip ++ GtkWidget *label = gtk_label_new(tipString); ++ // wrap automatically ++ gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); ++ gtk_container_add(GTK_CONTAINER(sTipWindow), label); ++ gtk_container_set_border_width(GTK_CONTAINER(sTipWindow), 4); ++ // set the coords for the widget ++ gtk_widget_set_uposition(sTipWindow, aXCoords + root_x, ++ aYCoords + root_y); ++ ++ // and show it. ++ gtk_widget_show_all(sTipWindow); ++ ++ NS_Free( (void*)tipString ); ++ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++EmbedWindow::OnHideTooltip(void) ++{ ++ if (sTipWindow) ++ gtk_widget_destroy(sTipWindow); ++ sTipWindow = NULL; ++ return NS_OK; ++} ++ ++// nsIInterfaceRequestor ++ ++NS_IMETHODIMP ++EmbedWindow::GetInterface(const nsIID &aIID, void** aInstancePtr) ++{ ++ nsresult rv; ++ ++ rv = QueryInterface(aIID, aInstancePtr); ++ ++ // pass it up to the web browser object ++ if (NS_FAILED(rv) || !*aInstancePtr) { ++ nsCOMPtr ir = do_QueryInterface(mWebBrowser); ++ return ir->GetInterface(aIID, aInstancePtr); ++ } ++ ++ return rv; ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-06-22 12:14:58.806816508 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-06-22 12:14:58.806816508 +0200 +@@ -0,0 +1,106 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. Portions created by Christopher Blizzard are Copyright (C) Christopher Blizzard. All Rights Reserved. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "EmbedWindowCreator.h" ++#include "EmbedPrivate.h" ++#include "EmbedWindow.h" ++ ++// in order to create orphaned windows ++#include "gtkmozembedprivate.h" ++ ++EmbedWindowCreator::EmbedWindowCreator(void) ++{ ++} ++ ++EmbedWindowCreator::~EmbedWindowCreator() ++{ ++} ++ ++NS_IMPL_ISUPPORTS1(EmbedWindowCreator, nsIWindowCreator) ++ ++NS_IMETHODIMP ++EmbedWindowCreator::CreateChromeWindow(nsIWebBrowserChrome *aParent, ++ PRUint32 aChromeFlags, ++ nsIWebBrowserChrome **_retval) ++{ ++ NS_ENSURE_ARG_POINTER(_retval); ++ ++ GtkMozEmbed *newEmbed = nsnull; ++ ++ // No parent? Ask via the singleton object instead. ++ if (!aParent) { ++ gtk_moz_embed_single_create_window(&newEmbed, ++ (guint)aChromeFlags); ++ } ++ else { ++ // Find the EmbedPrivate object for this web browser chrome object. ++ EmbedPrivate *embedPrivate = EmbedPrivate::FindPrivateForBrowser(aParent); ++ ++ if (!embedPrivate) ++ return NS_ERROR_FAILURE; ++ ++ g_signal_emit(G_OBJECT(embedPrivate->mOwningWidget), ++ moz_embed_signals[NEW_WINDOW], 0, ++ &newEmbed, (guint)aChromeFlags); ++ ++ } ++ ++ // check to make sure that we made a new window ++ if (!newEmbed) ++ return NS_ERROR_FAILURE; ++ ++ // The window _must_ be realized before we pass it back to the ++ // function that created it. Functions that create new windows ++ // will do things like GetDocShell() and the widget has to be ++ // realized before that can happen. ++ gtk_widget_realize(GTK_WIDGET(newEmbed)); ++ ++ EmbedPrivate *newEmbedPrivate = static_cast(newEmbed->data); ++ ++ // set the chrome flag on the new window if it's a chrome open ++ if (aChromeFlags & nsIWebBrowserChrome::CHROME_OPENAS_CHROME) ++ newEmbedPrivate->mIsChrome = PR_TRUE; ++ ++ *_retval = static_cast(newEmbedPrivate->mWindow); ++ ++ if (*_retval) { ++ NS_ADDREF(*_retval); ++ return NS_OK; ++ } ++ ++ return NS_ERROR_FAILURE; ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-06-22 12:14:58.807816513 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-06-22 12:14:58.807816513 +0200 +@@ -0,0 +1,54 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef __EmbedWindowCreator_h ++#define __EmbedWindowCreator_h ++ ++#include ++ ++class EmbedWindowCreator : public nsIWindowCreator ++{ ++ public: ++ EmbedWindowCreator(); ++ virtual ~EmbedWindowCreator(); ++ ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSIWINDOWCREATOR ++ ++}; ++ ++#endif /* __EmbedWindowCreator_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-06-22 12:14:58.805816503 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h 2011-06-22 12:14:58.805816503 +0200 +@@ -0,0 +1,101 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef __EmbedWindow_h ++#define __EmbedWindow_h ++ ++#include "nsIWebBrowserChrome.h" ++#include "nsIWebBrowserChromeFocus.h" ++#include "nsIEmbeddingSiteWindow.h" ++#include "nsITooltipListener.h" ++#include "nsISupports.h" ++#include "nsIWebBrowser.h" ++#include "nsIBaseWindow.h" ++#include "nsIInterfaceRequestor.h" ++#include "nsCOMPtr.h" ++#include "nsStringGlue.h" ++ ++#include ++ ++class EmbedPrivate; ++ ++class EmbedWindow : public nsIWebBrowserChrome, ++ public nsIWebBrowserChromeFocus, ++ public nsIEmbeddingSiteWindow, ++ public nsITooltipListener, ++ public nsIInterfaceRequestor ++{ ++ ++ public: ++ ++ EmbedWindow(); ++ virtual ~EmbedWindow(); ++ ++ nsresult Init (EmbedPrivate *aOwner); ++ nsresult CreateWindow (void); ++ void ReleaseChildren (void); ++ ++ NS_DECL_ISUPPORTS ++ ++ NS_DECL_NSIWEBBROWSERCHROME ++ ++ NS_DECL_NSIWEBBROWSERCHROMEFOCUS ++ ++ NS_DECL_NSIEMBEDDINGSITEWINDOW ++ ++ NS_DECL_NSITOOLTIPLISTENER ++ ++ NS_DECL_NSIINTERFACEREQUESTOR ++ ++ nsString mTitle; ++ nsString mJSStatus; ++ nsString mLinkMessage; ++ ++ nsCOMPtr mBaseWindow; // [OWNER] ++ ++private: ++ ++ EmbedPrivate *mOwner; ++ nsCOMPtr mWebBrowser; // [OWNER] ++ static GtkWidget *sTipWindow; ++ PRBool mVisibility; ++ PRBool mIsModal; ++ ++}; ++ ++ ++#endif /* __EmbedWindow_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-06-22 12:14:58.816816558 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-06-22 12:14:58.816816558 +0200 +@@ -0,0 +1,1132 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. Portions created by Christopher Blizzard are Copyright (C) Christopher Blizzard. All Rights Reserved. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * Ramiro Estrugo ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include ++ ++#include "gtkmozembed.h" ++#include "gtkmozembedprivate.h" ++#include "gtkmozembed_internal.h" ++ ++#include "EmbedPrivate.h" ++#include "EmbedWindow.h" ++ ++// so we can do our get_nsIWebBrowser later... ++#include "nsIWebBrowser.h" ++ ++#include "gtkmozembedmarshal.h" ++ ++#define NEW_TOOLKIT_STRING(x) g_strdup(NS_ConvertUTF16toUTF8(x).get()) ++#define GET_OBJECT_CLASS_TYPE(x) G_OBJECT_CLASS_TYPE(x) ++ ++class nsIDirectoryServiceProvider; ++ ++// class and instance initialization ++ ++static void ++gtk_moz_embed_class_init(GtkMozEmbedClass *klass); ++ ++static void ++gtk_moz_embed_init(GtkMozEmbed *embed); ++ ++// GtkObject methods ++ ++static void ++gtk_moz_embed_destroy(GtkObject *object); ++ ++// GtkWidget methods ++ ++static void ++gtk_moz_embed_realize(GtkWidget *widget); ++ ++static void ++gtk_moz_embed_unrealize(GtkWidget *widget); ++ ++static void ++gtk_moz_embed_size_allocate(GtkWidget *widget, GtkAllocation *allocation); ++ ++static void ++gtk_moz_embed_map(GtkWidget *widget); ++ ++static void ++gtk_moz_embed_unmap(GtkWidget *widget); ++ ++#ifdef MOZ_ACCESSIBILITY_ATK ++static AtkObject* gtk_moz_embed_get_accessible (GtkWidget *widget); ++#endif ++ ++static gint ++handle_child_focus_in(GtkWidget *aWidget, ++ GdkEventFocus *aGdkFocusEvent, ++ GtkMozEmbed *aEmbed); ++ ++static gint ++handle_child_focus_out(GtkWidget *aWidget, ++ GdkEventFocus *aGdkFocusEvent, ++ GtkMozEmbed *aEmbed); ++ ++// globals for this type of widget ++ ++static GtkBinClass *embed_parent_class; ++ ++guint moz_embed_signals[EMBED_LAST_SIGNAL] = { 0 }; ++ ++// GtkObject + class-related functions ++ ++GType ++gtk_moz_embed_get_type(void) ++{ ++ static GType moz_embed_type = 0; ++ if (moz_embed_type == 0) ++ { ++ const GTypeInfo our_info = ++ { ++ sizeof(GtkMozEmbedClass), ++ NULL, /* base_init */ ++ NULL, /* base_finalize */ ++ (GClassInitFunc)gtk_moz_embed_class_init, ++ NULL, ++ NULL, /* class_data */ ++ sizeof(GtkMozEmbed), ++ 0, /* n_preallocs */ ++ (GInstanceInitFunc)gtk_moz_embed_init, ++ }; ++ ++ moz_embed_type = g_type_register_static(GTK_TYPE_BIN, ++ "GtkMozEmbed", ++ &our_info, ++ (GTypeFlags)0); ++ } ++ ++ return moz_embed_type; ++} ++ ++static void ++gtk_moz_embed_class_init(GtkMozEmbedClass *klass) ++{ ++ GtkContainerClass *container_class; ++ GtkWidgetClass *widget_class; ++ GtkObjectClass *object_class; ++ ++ container_class = GTK_CONTAINER_CLASS(klass); ++ widget_class = GTK_WIDGET_CLASS(klass); ++ object_class = GTK_OBJECT_CLASS(klass); ++ ++ embed_parent_class = (GtkBinClass *)g_type_class_peek(gtk_bin_get_type()); ++ ++ widget_class->realize = gtk_moz_embed_realize; ++ widget_class->unrealize = gtk_moz_embed_unrealize; ++ widget_class->size_allocate = gtk_moz_embed_size_allocate; ++ widget_class->map = gtk_moz_embed_map; ++ widget_class->unmap = gtk_moz_embed_unmap; ++ ++#ifdef MOZ_ACCESSIBILITY_ATK ++ widget_class->get_accessible = gtk_moz_embed_get_accessible; ++#endif ++ ++ object_class->destroy = gtk_moz_embed_destroy; ++ ++ // set up our signals ++ ++ moz_embed_signals[LINK_MESSAGE] = ++ g_signal_new("link_message", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, link_message), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ moz_embed_signals[JS_STATUS] = ++ g_signal_new("js_status", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, js_status), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ moz_embed_signals[LOCATION] = ++ g_signal_new("location", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, location), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ moz_embed_signals[TITLE] = ++ g_signal_new("title", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, title), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ moz_embed_signals[PROGRESS] = ++ g_signal_new("progress", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, progress), ++ NULL, NULL, ++ gtkmozembed_VOID__INT_INT, ++ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); ++ moz_embed_signals[PROGRESS_ALL] = ++ g_signal_new("progress_all", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, progress_all), ++ NULL, NULL, ++ gtkmozembed_VOID__STRING_INT_INT, ++ G_TYPE_NONE, 3, ++ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE, ++ G_TYPE_INT, G_TYPE_INT); ++ moz_embed_signals[NET_STATE] = ++ g_signal_new("net_state", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, net_state), ++ NULL, NULL, ++ gtkmozembed_VOID__INT_UINT, ++ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT); ++ moz_embed_signals[NET_STATE_ALL] = ++ g_signal_new("net_state_all", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, net_state_all), ++ NULL, NULL, ++ gtkmozembed_VOID__STRING_INT_UINT, ++ G_TYPE_NONE, 3, ++ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE, ++ G_TYPE_INT, G_TYPE_UINT); ++ moz_embed_signals[NET_START] = ++ g_signal_new("net_start", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, net_start), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ moz_embed_signals[NET_STOP] = ++ g_signal_new("net_stop", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, net_stop), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ moz_embed_signals[NEW_WINDOW] = ++ g_signal_new("new_window", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, new_window), ++ NULL, NULL, ++ gtkmozembed_VOID__POINTER_UINT, ++ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); ++ moz_embed_signals[VISIBILITY] = ++ g_signal_new("visibility", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, visibility), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__BOOLEAN, ++ G_TYPE_NONE, 1, G_TYPE_BOOLEAN); ++ moz_embed_signals[DESTROY_BROWSER] = ++ g_signal_new("destroy_browser", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, destroy_brsr), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ moz_embed_signals[OPEN_URI] = ++ g_signal_new("open_uri", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, open_uri), ++ NULL, NULL, ++ gtkmozembed_BOOL__STRING, ++ G_TYPE_BOOLEAN, 1, G_TYPE_STRING | ++ G_SIGNAL_TYPE_STATIC_SCOPE); ++ moz_embed_signals[SIZE_TO] = ++ g_signal_new("size_to", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, size_to), ++ NULL, NULL, ++ gtkmozembed_VOID__INT_INT, ++ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); ++ moz_embed_signals[DOM_KEY_DOWN] = ++ g_signal_new("dom_key_down", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_down), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_KEY_PRESS] = ++ g_signal_new("dom_key_press", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_press), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_KEY_UP] = ++ g_signal_new("dom_key_up", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_up), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_MOUSE_DOWN] = ++ g_signal_new("dom_mouse_down", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_down), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_MOUSE_UP] = ++ g_signal_new("dom_mouse_up", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_up), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_MOUSE_CLICK] = ++ g_signal_new("dom_mouse_click", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_click), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_MOUSE_DBL_CLICK] = ++ g_signal_new("dom_mouse_dbl_click", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_dbl_click), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_MOUSE_OVER] = ++ g_signal_new("dom_mouse_over", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_over), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_MOUSE_OUT] = ++ g_signal_new("dom_mouse_out", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_out), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[SECURITY_CHANGE] = ++ g_signal_new("security_change", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, security_change), ++ NULL, NULL, ++ gtkmozembed_VOID__POINTER_UINT, ++ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); ++ moz_embed_signals[STATUS_CHANGE] = ++ g_signal_new("status_change", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, status_change), ++ NULL, NULL, ++ gtkmozembed_VOID__POINTER_INT_POINTER, ++ G_TYPE_NONE, 3, ++ G_TYPE_POINTER, G_TYPE_INT, G_TYPE_POINTER); ++ moz_embed_signals[DOM_ACTIVATE] = ++ g_signal_new("dom_activate", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_activate), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_FOCUS_IN] = ++ g_signal_new("dom_focus_in", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_focus_in), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++ moz_embed_signals[DOM_FOCUS_OUT] = ++ g_signal_new("dom_focus_out", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_focus_out), ++ NULL, NULL, ++ gtkmozembed_BOOL__POINTER, ++ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); ++} ++ ++static void ++gtk_moz_embed_init(GtkMozEmbed *embed) ++{ ++ EmbedPrivate *priv = new EmbedPrivate(); ++ embed->data = priv; ++ gtk_widget_set_name(GTK_WIDGET(embed), "gtkmozembed"); ++ ++ GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(embed), GTK_NO_WINDOW); ++} ++ ++GtkWidget * ++gtk_moz_embed_new(void) ++{ ++ return GTK_WIDGET(g_object_new(GTK_TYPE_MOZ_EMBED, NULL)); ++} ++ ++// GtkObject methods ++ ++static void ++gtk_moz_embed_destroy(GtkObject *object) ++{ ++ GtkMozEmbed *embed; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail(object != NULL); ++ g_return_if_fail(GTK_IS_MOZ_EMBED(object)); ++ ++ embed = GTK_MOZ_EMBED(object); ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate) { ++ ++ // Destroy the widget only if it's been Init()ed. ++ if(embedPrivate->mMozWindowWidget != 0) { ++ embedPrivate->Destroy(); ++ } ++ ++ delete embedPrivate; ++ embed->data = NULL; ++ } ++} ++ ++// GtkWidget methods ++ ++static void ++gtk_moz_embed_realize(GtkWidget *widget) ++{ ++ GtkMozEmbed *embed; ++ EmbedPrivate *embedPrivate; ++ GdkWindowAttr attributes; ++ gint attributes_mask; ++ ++ g_return_if_fail(widget != NULL); ++ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); ++ ++ embed = GTK_MOZ_EMBED(widget); ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); ++ ++ attributes.window_type = GDK_WINDOW_CHILD; ++ attributes.x = widget->allocation.x; ++ attributes.y = widget->allocation.y; ++ attributes.width = widget->allocation.width; ++ attributes.height = widget->allocation.height; ++ attributes.wclass = GDK_INPUT_OUTPUT; ++ attributes.visual = gtk_widget_get_visual (widget); ++ attributes.colormap = gtk_widget_get_colormap (widget); ++ attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; ++ ++ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; ++ ++ widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), ++ &attributes, attributes_mask); ++ gdk_window_set_user_data (widget->window, embed); ++ ++ widget->style = gtk_style_attach (widget->style, widget->window); ++ gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); ++ ++ // initialize the window ++ nsresult rv; ++ rv = embedPrivate->Init(embed); ++ g_return_if_fail(NS_SUCCEEDED(rv)); ++ ++ PRBool alreadyRealized = PR_FALSE; ++ rv = embedPrivate->Realize(&alreadyRealized); ++ g_return_if_fail(NS_SUCCEEDED(rv)); ++ ++ // if we're already realized we don't need to hook up to anything below ++ if (alreadyRealized) ++ return; ++ ++ if (embedPrivate->mURI.Length()) ++ embedPrivate->LoadCurrentURI(); ++ ++ // connect to the focus out event for the child ++ GtkWidget *child_widget = GTK_BIN(widget)->child; ++ g_signal_connect_object(G_OBJECT(child_widget), ++ "focus_out_event", ++ G_CALLBACK(handle_child_focus_out), ++ embed, ++ G_CONNECT_AFTER); ++ g_signal_connect_object(G_OBJECT(child_widget), ++ "focus_in_event", ++ G_CALLBACK(handle_child_focus_in), ++ embed, ++ G_CONNECT_AFTER); ++} ++ ++static void ++gtk_moz_embed_unrealize(GtkWidget *widget) ++{ ++ GtkMozEmbed *embed; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail(widget != NULL); ++ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); ++ ++ embed = GTK_MOZ_EMBED(widget); ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate) { ++ embedPrivate->Unrealize(); ++ } ++ ++ if (GTK_WIDGET_CLASS(embed_parent_class)->unrealize) ++ (* GTK_WIDGET_CLASS(embed_parent_class)->unrealize)(widget); ++} ++ ++static void ++gtk_moz_embed_size_allocate(GtkWidget *widget, GtkAllocation *allocation) ++{ ++ GtkMozEmbed *embed; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail(widget != NULL); ++ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); ++ ++ embed = GTK_MOZ_EMBED(widget); ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ widget->allocation = *allocation; ++ ++ if (GTK_WIDGET_REALIZED(widget)) ++ { ++ gdk_window_move_resize(widget->window, ++ allocation->x, allocation->y, ++ allocation->width, allocation->height); ++ embedPrivate->Resize(allocation->width, allocation->height); ++ } ++} ++ ++static void ++gtk_moz_embed_map(GtkWidget *widget) ++{ ++ GtkMozEmbed *embed; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail(widget != NULL); ++ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); ++ ++ embed = GTK_MOZ_EMBED(widget); ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED); ++ ++ embedPrivate->Show(); ++ ++ gdk_window_show(widget->window); ++ ++} ++ ++static void ++gtk_moz_embed_unmap(GtkWidget *widget) ++{ ++ GtkMozEmbed *embed; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail(widget != NULL); ++ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); ++ ++ embed = GTK_MOZ_EMBED(widget); ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED); ++ ++ gdk_window_hide(widget->window); ++ ++ embedPrivate->Hide(); ++} ++ ++#ifdef MOZ_ACCESSIBILITY_ATK ++static AtkObject* ++gtk_moz_embed_get_accessible (GtkWidget *widget) ++{ ++ g_return_val_if_fail(widget != NULL, NULL); ++ g_return_val_if_fail(GTK_IS_MOZ_EMBED(widget), NULL); ++ ++ GtkMozEmbed *embed = GTK_MOZ_EMBED(widget);; ++ EmbedPrivate *embedPrivate = (EmbedPrivate *)embed->data; ++ return static_cast( ++ embedPrivate->GetAtkObjectForCurrentDocument()); ++} ++#endif /* MOZ_ACCESSIBILITY_ATK */ ++ ++static gint ++handle_child_focus_in(GtkWidget *aWidget, ++ GdkEventFocus *aGdkFocusEvent, ++ GtkMozEmbed *aEmbed) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ embedPrivate = (EmbedPrivate *)aEmbed->data; ++ ++ embedPrivate->ChildFocusIn(); ++ ++ return FALSE; ++} ++ ++static gint ++handle_child_focus_out(GtkWidget *aWidget, ++ GdkEventFocus *aGdkFocusEvent, ++ GtkMozEmbed *aEmbed) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ embedPrivate = (EmbedPrivate *)aEmbed->data; ++ ++ embedPrivate->ChildFocusOut(); ++ ++ return FALSE; ++} ++ ++// Widget methods ++ ++void ++gtk_moz_embed_push_startup(void) ++{ ++ EmbedPrivate::PushStartup(); ++} ++ ++void ++gtk_moz_embed_pop_startup(void) ++{ ++ EmbedPrivate::PopStartup(); ++} ++ ++void ++gtk_moz_embed_set_path(const char *aPath) ++{ ++ EmbedPrivate::SetPath(aPath); ++} ++ ++void ++gtk_moz_embed_set_comp_path(const char *aPath) ++{ ++ EmbedPrivate::SetCompPath(aPath); ++} ++ ++void ++gtk_moz_embed_set_profile_path(const char *aDir, const char *aName) ++{ ++ EmbedPrivate::SetProfilePath(aDir, aName); ++} ++ ++void ++gtk_moz_embed_set_directory_service_provider(nsIDirectoryServiceProvider *appFileLocProvider) { ++ EmbedPrivate::SetDirectoryServiceProvider(appFileLocProvider); ++} ++ ++void ++gtk_moz_embed_load_url(GtkMozEmbed *embed, const char *url) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail(embed != NULL); ++ g_return_if_fail(GTK_IS_MOZ_EMBED(embed)); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ embedPrivate->SetURI(url); ++ ++ // If the widget is realized, load the URI. If it isn't then we ++ // will load it later. ++ if (GTK_WIDGET_REALIZED(embed)) ++ embedPrivate->LoadCurrentURI(); ++} ++ ++void ++gtk_moz_embed_stop_load(GtkMozEmbed *embed) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail(embed != NULL); ++ g_return_if_fail(GTK_IS_MOZ_EMBED(embed)); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mNavigation) ++ embedPrivate->mNavigation->Stop(nsIWebNavigation::STOP_ALL); ++} ++ ++gboolean ++gtk_moz_embed_can_go_back(GtkMozEmbed *embed) ++{ ++ PRBool retval = PR_FALSE; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), FALSE); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), FALSE); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mNavigation) ++ embedPrivate->mNavigation->GetCanGoBack(&retval); ++ return retval; ++} ++ ++gboolean ++gtk_moz_embed_can_go_forward(GtkMozEmbed *embed) ++{ ++ PRBool retval = PR_FALSE; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), FALSE); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), FALSE); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mNavigation) ++ embedPrivate->mNavigation->GetCanGoForward(&retval); ++ return retval; ++} ++ ++void ++gtk_moz_embed_go_back(GtkMozEmbed *embed) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mNavigation) ++ embedPrivate->mNavigation->GoBack(); ++} ++ ++void ++gtk_moz_embed_go_forward(GtkMozEmbed *embed) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mNavigation) ++ embedPrivate->mNavigation->GoForward(); ++} ++ ++void ++gtk_moz_embed_render_data(GtkMozEmbed *embed, const char *data, ++ guint32 len, const char *base_uri, ++ const char *mime_type) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ embedPrivate->OpenStream(base_uri, mime_type); ++ embedPrivate->AppendToStream((const PRUint8*)data, len); ++ embedPrivate->CloseStream(); ++} ++ ++void ++gtk_moz_embed_open_stream(GtkMozEmbed *embed, const char *base_uri, ++ const char *mime_type) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ embedPrivate->OpenStream(base_uri, mime_type); ++} ++ ++void gtk_moz_embed_append_data(GtkMozEmbed *embed, const char *data, ++ guint32 len) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ embedPrivate->AppendToStream((const PRUint8*)data, len); ++} ++ ++void ++gtk_moz_embed_close_stream(GtkMozEmbed *embed) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ embedPrivate->CloseStream(); ++} ++ ++char * ++gtk_moz_embed_get_link_message(GtkMozEmbed *embed) ++{ ++ char *retval = nsnull; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), (char *)NULL); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mWindow) ++ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mLinkMessage); ++ ++ return retval; ++} ++ ++char * ++gtk_moz_embed_get_js_status(GtkMozEmbed *embed) ++{ ++ char *retval = nsnull; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), (char *)NULL); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mWindow) ++ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mJSStatus); ++ ++ return retval; ++} ++ ++char * ++gtk_moz_embed_get_title(GtkMozEmbed *embed) ++{ ++ char *retval = nsnull; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), (char *)NULL); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mWindow) ++ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mTitle); ++ ++ return retval; ++} ++ ++char * ++gtk_moz_embed_get_location(GtkMozEmbed *embed) ++{ ++ char *retval = nsnull; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), (char *)NULL); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (!embedPrivate->mURI.IsEmpty()) ++ retval = g_strdup(embedPrivate->mURI.get()); ++ ++ return retval; ++} ++ ++void ++gtk_moz_embed_reload(GtkMozEmbed *embed, gint32 flags) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ PRUint32 reloadFlags = 0; ++ ++ // map the external API to the internal web navigation API. ++ switch (flags) { ++ case GTK_MOZ_EMBED_FLAG_RELOADNORMAL: ++ reloadFlags = 0; ++ break; ++ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE: ++ reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE; ++ break; ++ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXY: ++ reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY; ++ break; ++ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXYANDCACHE: ++ reloadFlags = (nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY | ++ nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE); ++ break; ++ case GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE: ++ reloadFlags = nsIWebNavigation::LOAD_FLAGS_CHARSET_CHANGE; ++ break; ++ default: ++ reloadFlags = 0; ++ break; ++ } ++ ++ embedPrivate->Reload(reloadFlags); ++} ++ ++void ++gtk_moz_embed_set_chrome_mask(GtkMozEmbed *embed, guint32 flags) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ embedPrivate->SetChromeMask(flags); ++} ++ ++guint32 ++gtk_moz_embed_get_chrome_mask(GtkMozEmbed *embed) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), 0); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), 0); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ return embedPrivate->mChromeMask; ++} ++ ++void ++gtk_moz_embed_get_nsIWebBrowser (GtkMozEmbed *embed, nsIWebBrowser **retval) ++{ ++ EmbedPrivate *embedPrivate; ++ ++ g_return_if_fail (embed != NULL); ++ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mWindow) ++ embedPrivate->mWindow->GetWebBrowser(retval); ++} ++ ++PRUnichar * ++gtk_moz_embed_get_title_unichar (GtkMozEmbed *embed) ++{ ++ PRUnichar *retval = nsnull; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mWindow) ++ retval = ToNewUnicode(embedPrivate->mWindow->mTitle); ++ ++ return retval; ++} ++ ++PRUnichar * ++gtk_moz_embed_get_js_status_unichar (GtkMozEmbed *embed) ++{ ++ PRUnichar *retval = nsnull; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mWindow) ++ retval = ToNewUnicode(embedPrivate->mWindow->mJSStatus); ++ ++ return retval; ++} ++ ++PRUnichar * ++gtk_moz_embed_get_link_message_unichar (GtkMozEmbed *embed) ++{ ++ PRUnichar *retval = nsnull; ++ EmbedPrivate *embedPrivate; ++ ++ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); ++ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); ++ ++ embedPrivate = (EmbedPrivate *)embed->data; ++ ++ if (embedPrivate->mWindow) ++ retval = ToNewUnicode(embedPrivate->mWindow->mLinkMessage); ++ ++ return retval; ++} ++ ++// class and instance initialization ++ ++static void ++gtk_moz_embed_single_class_init(GtkMozEmbedSingleClass *klass); ++ ++static void ++gtk_moz_embed_single_init(GtkMozEmbedSingle *embed); ++ ++GtkMozEmbedSingle * ++gtk_moz_embed_single_new(void); ++ ++enum { ++ NEW_WINDOW_ORPHAN, ++ SINGLE_LAST_SIGNAL ++}; ++ ++guint moz_embed_single_signals[SINGLE_LAST_SIGNAL] = { 0 }; ++ ++// GtkObject + class-related functions ++ ++GType ++gtk_moz_embed_single_get_type(void) ++{ ++ static GType moz_embed_single_type = 0; ++ if (moz_embed_single_type == 0) ++ { ++ const GTypeInfo our_info = ++ { ++ sizeof(GtkMozEmbedClass), ++ NULL, /* base_init */ ++ NULL, /* base_finalize */ ++ (GClassInitFunc)gtk_moz_embed_single_class_init, ++ NULL, ++ NULL, /* class_data */ ++ sizeof(GtkMozEmbed), ++ 0, /* n_preallocs */ ++ (GInstanceInitFunc)gtk_moz_embed_single_init, ++ }; ++ ++ moz_embed_single_type = g_type_register_static(GTK_TYPE_OBJECT, ++ "GtkMozEmbedSingle", ++ &our_info, ++ (GTypeFlags)0); ++ } ++ ++ return moz_embed_single_type; ++} ++ ++static void ++gtk_moz_embed_single_class_init(GtkMozEmbedSingleClass *klass) ++{ ++ GtkObjectClass *object_class; ++ ++ object_class = GTK_OBJECT_CLASS(klass); ++ ++ // set up our signals ++ ++ moz_embed_single_signals[NEW_WINDOW_ORPHAN] = ++ g_signal_new("new_window_orphan", ++ G_TYPE_FROM_CLASS(klass), ++ G_SIGNAL_RUN_FIRST, ++ G_STRUCT_OFFSET(GtkMozEmbedSingleClass, new_window_orphan), ++ NULL, NULL, ++ gtkmozembed_VOID__POINTER_UINT, ++ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); ++ ++} ++ ++static void ++gtk_moz_embed_single_init(GtkMozEmbedSingle *embed) ++{ ++ // this is a placeholder for later in case we need to stash data at ++ // a later data and maintain backwards compatibility. ++ embed->data = nsnull; ++} ++ ++GtkMozEmbedSingle * ++gtk_moz_embed_single_new(void) ++{ ++ return (GtkMozEmbedSingle *)g_object_new(GTK_TYPE_MOZ_EMBED_SINGLE, NULL); ++} ++ ++GtkMozEmbedSingle * ++gtk_moz_embed_single_get(void) ++{ ++ static GtkMozEmbedSingle *singleton_object = nsnull; ++ if (!singleton_object) ++ { ++ singleton_object = gtk_moz_embed_single_new(); ++ } ++ ++ return singleton_object; ++} ++ ++// our callback from the window creator service ++void ++gtk_moz_embed_single_create_window(GtkMozEmbed **aNewEmbed, ++ guint aChromeFlags) ++{ ++ GtkMozEmbedSingle *single = gtk_moz_embed_single_get(); ++ ++ *aNewEmbed = nsnull; ++ ++ if (!single) ++ return; ++ ++ g_signal_emit(G_OBJECT(single), ++ moz_embed_single_signals[NEW_WINDOW_ORPHAN], 0, ++ aNewEmbed, aChromeFlags); ++ ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-06-22 12:14:58.818816568 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-06-22 12:14:58.818816568 +0200 +@@ -0,0 +1,116 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Mozilla embedding. ++ * ++ * The Initial Developer of the Original Code is ++ * Benjamin Smedberg . ++ * ++ * Portions created by the Initial Developer are Copyright (C) 2005 ++ * the Mozilla Foundation . All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++// This file is an implementation file, meant to be #included in a ++// single C++ file of an embedding application. It is called after ++// XPCOMGlueStartup to glue the gtkmozembed functions. ++ ++#include "gtkmozembed.h" ++#include "gtkmozembed_internal.h" ++#include "nsXPCOMGlue.h" ++ ++#ifndef XPCOM_GLUE ++#error This file only makes sense when XPCOM_GLUE is defined. ++#endif ++ ++#define GTKMOZEMBED_FUNCTIONS \ ++ GTKF(gtk_moz_embed_get_type) \ ++ GTKF(gtk_moz_embed_new) \ ++ GTKF(gtk_moz_embed_push_startup) \ ++ GTKF(gtk_moz_embed_pop_startup) \ ++ GTKF(gtk_moz_embed_set_path) \ ++ GTKF(gtk_moz_embed_set_comp_path) \ ++ GTKF(gtk_moz_embed_set_profile_path) \ ++ GTKF(gtk_moz_embed_load_url) \ ++ GTKF(gtk_moz_embed_stop_load) \ ++ GTKF(gtk_moz_embed_can_go_back) \ ++ GTKF(gtk_moz_embed_can_go_forward) \ ++ GTKF(gtk_moz_embed_go_back) \ ++ GTKF(gtk_moz_embed_go_forward) \ ++ GTKF(gtk_moz_embed_render_data) \ ++ GTKF(gtk_moz_embed_open_stream) \ ++ GTKF(gtk_moz_embed_append_data) \ ++ GTKF(gtk_moz_embed_close_stream) \ ++ GTKF(gtk_moz_embed_get_link_message) \ ++ GTKF(gtk_moz_embed_get_js_status) \ ++ GTKF(gtk_moz_embed_get_title) \ ++ GTKF(gtk_moz_embed_get_location) \ ++ GTKF(gtk_moz_embed_reload) \ ++ GTKF(gtk_moz_embed_set_chrome_mask) \ ++ GTKF(gtk_moz_embed_get_chrome_mask) \ ++ GTKF(gtk_moz_embed_single_get_type) \ ++ GTKF(gtk_moz_embed_single_get) ++ ++#define GTKMOZEMBED_FUNCTIONS_INTERNAL \ ++ GTKF(gtk_moz_embed_get_nsIWebBrowser) \ ++ GTKF(gtk_moz_embed_get_title_unichar) \ ++ GTKF(gtk_moz_embed_get_js_status_unichar) \ ++ GTKF(gtk_moz_embed_get_link_message_unichar) \ ++ GTKF(gtk_moz_embed_set_directory_service_provider) ++ ++#define GTKF(fname) fname##Type fname; ++ ++GTKMOZEMBED_FUNCTIONS ++GTKMOZEMBED_FUNCTIONS_INTERNAL ++ ++#undef GTKF ++ ++#define GTKF(fname) { #fname, (NSFuncPtr*) &fname }, ++ ++static const nsDynamicFunctionLoad GtkSymbols[] = { ++GTKMOZEMBED_FUNCTIONS ++ { nsnull, nsnull } ++}; ++ ++static const nsDynamicFunctionLoad GtkSymbolsInternal[] = { ++GTKMOZEMBED_FUNCTIONS_INTERNAL ++ { nsnull, nsnull } ++}; ++#undef GTKF ++ ++static nsresult ++GTKEmbedGlueStartup() ++{ ++ return XPCOMGlueLoadXULFunctions(GtkSymbols); ++} ++ ++static nsresult ++GTKEmbedGlueStartupInternal() ++{ ++ return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); ++} ++ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-06-22 12:14:58.813816543 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h 2011-06-22 12:14:58.814816548 +0200 +@@ -0,0 +1,287 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * Ramiro Estrugo ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef gtkmozembed_h ++#define gtkmozembed_h ++ ++#include ++#include ++ ++#ifdef MOZILLA_CLIENT ++#include "nscore.h" ++#else /* MOZILLA_CLIENT */ ++#ifndef nscore_h__ ++/* Because this header may be included from files which not part of the mozilla ++ build system, define macros from nscore.h */ ++ ++#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) ++#define NS_HIDDEN __attribute__((visibility("hidden"))) ++#else ++#define NS_HIDDEN ++#endif ++ ++#define NS_FROZENCALL ++#define NS_EXPORT_(type) type ++#define NS_IMPORT_(type) type ++#endif /* nscore_h__ */ ++#endif /* MOZILLA_CLIENT */ ++ ++#ifdef XPCOM_GLUE ++ ++#define GTKMOZEMBED_API(type, name, params) \ ++ typedef type (NS_FROZENCALL * name##Type) params; \ ++ extern name##Type name NS_HIDDEN; ++ ++#else /* XPCOM_GLUE */ ++ ++#ifdef _IMPL_GTKMOZEMBED ++#define GTKMOZEMBED_API(type, name, params) NS_EXPORT_(type) name params; ++#else ++#define GTKMOZEMBED_API(type,name, params) NS_IMPORT_(type) name params; ++#endif ++ ++#endif /* XPCOM_GLUE */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ ++#define GTK_TYPE_MOZ_EMBED (gtk_moz_embed_get_type()) ++#define GTK_MOZ_EMBED(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_MOZ_EMBED, GtkMozEmbed) ++#define GTK_MOZ_EMBED_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_MOZ_EMBED, GtkMozEmbedClass) ++#define GTK_IS_MOZ_EMBED(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_MOZ_EMBED) ++#define GTK_IS_MOZ_EMBED_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_MOZ_EMBED) ++ ++typedef struct _GtkMozEmbed GtkMozEmbed; ++typedef struct _GtkMozEmbedClass GtkMozEmbedClass; ++ ++struct _GtkMozEmbed ++{ ++ GtkBin bin; ++ void *data; ++}; ++ ++struct _GtkMozEmbedClass ++{ ++ GtkBinClass parent_class; ++ ++ void (* link_message) (GtkMozEmbed *embed); ++ void (* js_status) (GtkMozEmbed *embed); ++ void (* location) (GtkMozEmbed *embed); ++ void (* title) (GtkMozEmbed *embed); ++ void (* progress) (GtkMozEmbed *embed, gint curprogress, ++ gint maxprogress); ++ void (* progress_all) (GtkMozEmbed *embed, const char *aURI, ++ gint curprogress, gint maxprogress); ++ void (* net_state) (GtkMozEmbed *embed, gint state, guint status); ++ void (* net_state_all) (GtkMozEmbed *embed, const char *aURI, ++ gint state, guint status); ++ void (* net_start) (GtkMozEmbed *embed); ++ void (* net_stop) (GtkMozEmbed *embed); ++ void (* new_window) (GtkMozEmbed *embed, GtkMozEmbed **newEmbed, ++ guint chromemask); ++ void (* visibility) (GtkMozEmbed *embed, gboolean visibility); ++ void (* destroy_brsr) (GtkMozEmbed *embed); ++ gint (* open_uri) (GtkMozEmbed *embed, const char *aURI); ++ void (* size_to) (GtkMozEmbed *embed, gint width, gint height); ++ gint (* dom_key_down) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_key_press) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_key_up) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_mouse_down) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_mouse_up) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_mouse_click) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_mouse_dbl_click) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_mouse_over) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_mouse_out) (GtkMozEmbed *embed, gpointer dom_event); ++ void (* security_change) (GtkMozEmbed *embed, gpointer request, ++ guint state); ++ void (* status_change) (GtkMozEmbed *embed, gpointer request, ++ gint status, gpointer message); ++ gint (* dom_activate) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_focus_in) (GtkMozEmbed *embed, gpointer dom_event); ++ gint (* dom_focus_out) (GtkMozEmbed *embed, gpointer dom_event); ++}; ++ ++GTKMOZEMBED_API(GType, gtk_moz_embed_get_type, (void)) ++GTKMOZEMBED_API(GtkWidget*, gtk_moz_embed_new, (void)) ++GTKMOZEMBED_API(void, gtk_moz_embed_push_startup, (void)) ++GTKMOZEMBED_API(void, gtk_moz_embed_pop_startup, (void)) ++ ++/* Tell gtkmozembed where the gtkmozembed libs live. If this is not specified, ++ The MOZILLA_FIVE_HOME environment variable is checked. */ ++GTKMOZEMBED_API(void, gtk_moz_embed_set_path, (const char *aPath)) ++ ++GTKMOZEMBED_API(void, gtk_moz_embed_set_comp_path, (const char *aPath)) ++GTKMOZEMBED_API(void, gtk_moz_embed_set_profile_path, (const char *aDir, ++ const char *aName)) ++GTKMOZEMBED_API(void, gtk_moz_embed_load_url, (GtkMozEmbed *embed, ++ const char *url)) ++GTKMOZEMBED_API(void, gtk_moz_embed_stop_load, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(gboolean, gtk_moz_embed_can_go_back, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(gboolean, gtk_moz_embed_can_go_forward, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(void, gtk_moz_embed_go_back, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(void, gtk_moz_embed_go_forward, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(void, gtk_moz_embed_render_data, (GtkMozEmbed *embed, ++ const char *data, ++ guint32 len, ++ const char *base_uri, ++ const char *mime_type)) ++GTKMOZEMBED_API(void, gtk_moz_embed_open_stream, (GtkMozEmbed *embed, ++ const char *base_uri, ++ const char *mime_type)) ++GTKMOZEMBED_API(void, gtk_moz_embed_append_data, (GtkMozEmbed *embed, ++ const char *data, ++ guint32 len)) ++GTKMOZEMBED_API(void, gtk_moz_embed_close_stream, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(char*, gtk_moz_embed_get_link_message, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(char*, gtk_moz_embed_get_js_status, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(char*, gtk_moz_embed_get_title, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(char*, gtk_moz_embed_get_location, (GtkMozEmbed *embed)) ++GTKMOZEMBED_API(void, gtk_moz_embed_reload, (GtkMozEmbed *embed, ++ gint32 flags)) ++GTKMOZEMBED_API(void, gtk_moz_embed_set_chrome_mask, (GtkMozEmbed *embed, ++ guint32 flags)) ++GTKMOZEMBED_API(guint32, gtk_moz_embed_get_chrome_mask, (GtkMozEmbed *embed)) ++ ++/* These are straight out of nsIWebProgressListener.h */ ++ ++typedef enum ++{ ++ GTK_MOZ_EMBED_FLAG_START = 1, ++ GTK_MOZ_EMBED_FLAG_REDIRECTING = 2, ++ GTK_MOZ_EMBED_FLAG_TRANSFERRING = 4, ++ GTK_MOZ_EMBED_FLAG_NEGOTIATING = 8, ++ GTK_MOZ_EMBED_FLAG_STOP = 16, ++ ++ GTK_MOZ_EMBED_FLAG_IS_REQUEST = 65536, ++ GTK_MOZ_EMBED_FLAG_IS_DOCUMENT = 131072, ++ GTK_MOZ_EMBED_FLAG_IS_NETWORK = 262144, ++ GTK_MOZ_EMBED_FLAG_IS_WINDOW = 524288, ++ ++ GTK_MOZ_EMBED_FLAG_RESTORING = 16777216 ++} GtkMozEmbedProgressFlags; ++ ++/* These are from various networking headers */ ++ ++typedef enum ++{ ++ /* NS_ERROR_UNKNOWN_HOST */ ++ GTK_MOZ_EMBED_STATUS_FAILED_DNS = 2152398878U, ++ /* NS_ERROR_CONNECTION_REFUSED */ ++ GTK_MOZ_EMBED_STATUS_FAILED_CONNECT = 2152398861U, ++ /* NS_ERROR_NET_TIMEOUT */ ++ GTK_MOZ_EMBED_STATUS_FAILED_TIMEOUT = 2152398862U, ++ /* NS_BINDING_ABORTED */ ++ GTK_MOZ_EMBED_STATUS_FAILED_USERCANCELED = 2152398850U ++} GtkMozEmbedStatusFlags; ++ ++/* These used to be straight out of nsIWebNavigation.h until the API ++ changed. Now there's a mapping table that maps these values to the ++ internal values. */ ++ ++typedef enum ++{ ++ GTK_MOZ_EMBED_FLAG_RELOADNORMAL = 0, ++ GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE = 1, ++ GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXY = 2, ++ GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXYANDCACHE = 3, ++ GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE = 4 ++} GtkMozEmbedReloadFlags; ++ ++/* These are straight out of nsIWebBrowserChrome.h */ ++ ++typedef enum ++{ ++ GTK_MOZ_EMBED_FLAG_DEFAULTCHROME = 1U, ++ GTK_MOZ_EMBED_FLAG_WINDOWBORDERSON = 2U, ++ GTK_MOZ_EMBED_FLAG_WINDOWCLOSEON = 4U, ++ GTK_MOZ_EMBED_FLAG_WINDOWRESIZEON = 8U, ++ GTK_MOZ_EMBED_FLAG_MENUBARON = 16U, ++ GTK_MOZ_EMBED_FLAG_TOOLBARON = 32U, ++ GTK_MOZ_EMBED_FLAG_LOCATIONBARON = 64U, ++ GTK_MOZ_EMBED_FLAG_STATUSBARON = 128U, ++ GTK_MOZ_EMBED_FLAG_PERSONALTOOLBARON = 256U, ++ GTK_MOZ_EMBED_FLAG_SCROLLBARSON = 512U, ++ GTK_MOZ_EMBED_FLAG_TITLEBARON = 1024U, ++ GTK_MOZ_EMBED_FLAG_EXTRACHROMEON = 2048U, ++ GTK_MOZ_EMBED_FLAG_ALLCHROME = 4094U, ++ GTK_MOZ_EMBED_FLAG_WINDOWRAISED = 33554432U, ++ GTK_MOZ_EMBED_FLAG_WINDOWLOWERED = 67108864U, ++ GTK_MOZ_EMBED_FLAG_CENTERSCREEN = 134217728U, ++ GTK_MOZ_EMBED_FLAG_DEPENDENT = 268435456U, ++ GTK_MOZ_EMBED_FLAG_MODAL = 536870912U, ++ GTK_MOZ_EMBED_FLAG_OPENASDIALOG = 1073741824U, ++ GTK_MOZ_EMBED_FLAG_OPENASCHROME = 2147483648U ++} GtkMozEmbedChromeFlags; ++ ++/* this is a singleton object that you can hook up to to get signals ++ that are not handed out on a per widget basis. */ ++ ++#define GTK_TYPE_MOZ_EMBED_SINGLE (gtk_moz_embed_single_get_type()) ++#define GTK_MOZ_EMBED_SINGLE(obj) GTK_CHECK_CAST((obj), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingle) ++#define GTK_MOZ_EMBED_SINGLE_CLASS(klass) GTK_CHEK_CLASS_CAST((klass), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingleClass) ++#define GTK_IS_MOZ_EMBED_SINGLE(obj) GTK_CHECK_TYPE((obj), GTK_TYPE_MOZ_EMBED_SINGLE) ++#define GTK_IS_MOZ_EMBED_SINGLE_CLASS(klass) GTK_CHECK_CLASS_TYPE((klass), GTK_TYPE_MOZ_EMBED) ++#define GTK_MOZ_EMBED_SINGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingleClass)) ++ ++typedef struct _GtkMozEmbedSingle GtkMozEmbedSingle; ++typedef struct _GtkMozEmbedSingleClass GtkMozEmbedSingleClass; ++ ++struct _GtkMozEmbedSingle ++{ ++ GtkObject object; ++ void *data; ++}; ++ ++struct _GtkMozEmbedSingleClass ++{ ++ GtkObjectClass parent_class; ++ ++ void (* new_window_orphan) (GtkMozEmbedSingle *embed, ++ GtkMozEmbed **newEmbed, ++ guint chromemask); ++}; ++ ++GTKMOZEMBED_API(GType, gtk_moz_embed_single_get_type, (void)) ++GTKMOZEMBED_API(GtkMozEmbedSingle *, gtk_moz_embed_single_get, (void)) ++ ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++ ++#endif /* gtkmozembed_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-06-22 12:14:58.820816578 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-06-22 12:14:58.821816583 +0200 +@@ -0,0 +1,70 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef gtkmozembed_internal_h ++#define gtkmozembed_internal_h ++ ++#include "nsIWebBrowser.h" ++#include "nsXPCOM.h" ++ ++struct nsModuleComponentInfo; ++ ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ ++GTKMOZEMBED_API(void, ++ gtk_moz_embed_get_nsIWebBrowser, (GtkMozEmbed *embed, ++ nsIWebBrowser **retval)) ++GTKMOZEMBED_API(PRUnichar*, ++ gtk_moz_embed_get_title_unichar, (GtkMozEmbed *embed)) ++ ++GTKMOZEMBED_API(PRUnichar*, ++ gtk_moz_embed_get_js_status_unichar, (GtkMozEmbed *embed)) ++ ++GTKMOZEMBED_API(PRUnichar*, ++ gtk_moz_embed_get_link_message_unichar, (GtkMozEmbed *embed)) ++ ++GTKMOZEMBED_API(void, ++ gtk_moz_embed_set_directory_service_provider, (nsIDirectoryServiceProvider *appFileLocProvider)) ++ ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++ ++#endif /* gtkmozembed_internal_h */ ++ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-06-22 12:14:58.821816583 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-06-22 12:14:58.822816588 +0200 +@@ -0,0 +1,34 @@ ++BOOL:STRING ++BOOL:STRING,STRING ++BOOL:STRING,STRING,POINTER ++BOOL:STRING,STRING,POINTER,INT ++BOOL:STRING,STRING,POINTER,POINTER,STRING,POINTER ++BOOL:STRING,STRING,POINTER,STRING,POINTER ++BOOL:STRING,STRING,STRING,POINTER ++INT:STRING,INT,INT,INT,INT,INT ++INT:STRING,STRING,INT,INT,INT,INT ++INT:STRING,STRING,UINT,STRING,STRING,STRING,STRING,POINTER ++INT:VOID ++STRING:STRING,STRING ++VOID:BOOL ++VOID:INT,INT ++VOID:INT,INT,BOOL ++VOID:INT,STRING ++VOID:INT,STRING,STRING ++VOID:INT,UINT ++VOID:POINTER,INT,POINTER ++VOID:POINTER,INT,STRING,STRING,STRING,STRING,STRING,BOOLEAN,INT ++VOID:POINTER,STRING,BOOL,BOOL ++VOID:STRING,INT,INT ++VOID:STRING,INT,UINT ++VOID:STRING,STRING ++VOID:STRING,STRING,POINTER ++VOID:STRING,STRING,STRING,ULONG,INT ++VOID:STRING,STRING,STRING,POINTER ++VOID:UINT,INT,INT,STRING,STRING,STRING,STRING ++VOID:ULONG,ULONG,ULONG ++VOID:POINTER,UINT ++BOOL:POINTER,UINT ++BOOL:POINTER ++VOID:POINTER ++BOOL:STRING,STRING,POINTER +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-06-22 12:14:58.823816593 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-06-22 12:14:58.823816593 +0200 +@@ -0,0 +1,91 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef gtkmozembedprivate_h ++#define gtkmozembedprivate_h ++ ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ ++#include "gtkmozembed.h" ++ ++/* signals */ ++ ++enum { ++ LINK_MESSAGE, ++ JS_STATUS, ++ LOCATION, ++ TITLE, ++ PROGRESS, ++ PROGRESS_ALL, ++ NET_STATE, ++ NET_STATE_ALL, ++ NET_START, ++ NET_STOP, ++ NEW_WINDOW, ++ VISIBILITY, ++ DESTROY_BROWSER, ++ OPEN_URI, ++ SIZE_TO, ++ DOM_KEY_DOWN, ++ DOM_KEY_PRESS, ++ DOM_KEY_UP, ++ DOM_MOUSE_DOWN, ++ DOM_MOUSE_UP, ++ DOM_MOUSE_CLICK, ++ DOM_MOUSE_DBL_CLICK, ++ DOM_MOUSE_OVER, ++ DOM_MOUSE_OUT, ++ SECURITY_CHANGE, ++ STATUS_CHANGE, ++ DOM_ACTIVATE, ++ DOM_FOCUS_IN, ++ DOM_FOCUS_OUT, ++ EMBED_LAST_SIGNAL ++}; ++ ++extern guint moz_embed_signals[EMBED_LAST_SIGNAL]; ++ ++extern void gtk_moz_embed_single_create_window(GtkMozEmbed **aNewEmbed, ++ guint aChromeFlags); ++ ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++ ++#endif /* gtkmozembedprivate_h */ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-06-22 12:14:58.809816523 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp 2011-06-22 12:14:58.809816523 +0200 +@@ -0,0 +1,349 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 2003 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Brian Ryner ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "GtkPromptService.h" ++#include "EmbedPrompter.h" ++#include "nsStringGlue.h" ++#include "nsIWindowWatcher.h" ++#include "nsIWebBrowserChrome.h" ++#include "nsIEmbeddingSiteWindow.h" ++#include "nsCOMPtr.h" ++#include "nsIServiceManager.h" ++#include "nsServiceManagerUtils.h" ++ ++GtkPromptService::GtkPromptService() ++{ ++} ++ ++GtkPromptService::~GtkPromptService() ++{ ++} ++ ++NS_IMPL_ISUPPORTS1(GtkPromptService, nsIPromptService) ++ ++NS_IMETHODIMP ++GtkPromptService::Alert(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText) ++{ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Alert").get()); ++ prompter.SetMessageText(aDialogText); ++ prompter.Create(EmbedPrompter::TYPE_ALERT, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++GtkPromptService::AlertCheck(nsIDOMWindow* aParent, ++ const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText, ++ const PRUnichar* aCheckMsg, PRBool* aCheckValue) ++{ ++ NS_ENSURE_ARG_POINTER(aCheckValue); ++ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Alert").get()); ++ prompter.SetMessageText(aDialogText); ++ prompter.SetCheckMessage(aCheckMsg); ++ prompter.SetCheckValue(*aCheckValue); ++ prompter.Create(EmbedPrompter::TYPE_ALERT_CHECK, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ prompter.GetCheckValue(aCheckValue); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++GtkPromptService::Confirm(nsIDOMWindow* aParent, ++ const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText, PRBool* aConfirm) ++{ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); ++ prompter.SetMessageText(aDialogText); ++ prompter.Create(EmbedPrompter::TYPE_CONFIRM, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ prompter.GetConfirmValue(aConfirm); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++GtkPromptService::ConfirmCheck(nsIDOMWindow* aParent, ++ const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText, ++ const PRUnichar* aCheckMsg, ++ PRBool* aCheckValue, PRBool* aConfirm) ++{ ++ NS_ENSURE_ARG_POINTER(aCheckValue); ++ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); ++ prompter.SetMessageText(aDialogText); ++ prompter.SetCheckMessage(aCheckMsg); ++ prompter.SetCheckValue(*aCheckValue); ++ prompter.Create(EmbedPrompter::TYPE_CONFIRM_CHECK, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ prompter.GetCheckValue(aCheckValue); ++ prompter.GetConfirmValue(aConfirm); ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++GtkPromptService::ConfirmEx(nsIDOMWindow* aParent, ++ const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText, ++ PRUint32 aButtonFlags, ++ const PRUnichar* aButton0Title, ++ const PRUnichar* aButton1Title, ++ const PRUnichar* aButton2Title, ++ const PRUnichar* aCheckMsg, PRBool* aCheckValue, ++ PRInt32* aRetVal) ++{ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); ++ prompter.SetMessageText(aDialogText); ++ ++ nsAutoString button0Label, button1Label, button2Label; ++ GetButtonLabel(aButtonFlags, BUTTON_POS_0, aButton0Title, button0Label); ++ GetButtonLabel(aButtonFlags, BUTTON_POS_1, aButton1Title, button1Label); ++ GetButtonLabel(aButtonFlags, BUTTON_POS_2, aButton2Title, button2Label); ++ prompter.SetButtons(button0Label.get(), button1Label.get(), ++ button2Label.get()); ++ ++ if (aCheckMsg) ++ prompter.SetCheckMessage(aCheckMsg); ++ if (aCheckValue) ++ prompter.SetCheckValue(*aCheckValue); ++ ++ prompter.Create(EmbedPrompter::TYPE_UNIVERSAL, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ ++ if (aCheckValue) ++ prompter.GetCheckValue(aCheckValue); ++ ++ prompter.GetButtonPressed(aRetVal); ++ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++GtkPromptService::Prompt(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText, PRUnichar** aValue, ++ const PRUnichar* aCheckMsg, PRBool* aCheckValue, ++ PRBool* aConfirm) ++{ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); ++ prompter.SetMessageText(aDialogText); ++ prompter.SetTextValue(*aValue); ++ if (aCheckMsg) ++ prompter.SetCheckMessage(aCheckMsg); ++ if (aCheckValue) ++ prompter.SetCheckValue(*aCheckValue); ++ ++ prompter.Create(EmbedPrompter::TYPE_PROMPT, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ if (aCheckValue) ++ prompter.GetCheckValue(aCheckValue); ++ prompter.GetConfirmValue(aConfirm); ++ if (*aConfirm) { ++ if (*aValue) ++ NS_Free(*aValue); ++ prompter.GetTextValue(aValue); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++GtkPromptService::PromptUsernameAndPassword(nsIDOMWindow* aParent, ++ const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText, ++ PRUnichar** aUsername, ++ PRUnichar** aPassword, ++ const PRUnichar* aCheckMsg, ++ PRBool* aCheckValue, ++ PRBool* aConfirm) ++{ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); ++ prompter.SetMessageText(aDialogText); ++ prompter.SetUser(*aUsername); ++ prompter.SetPassword(*aPassword); ++ if (aCheckMsg) ++ prompter.SetCheckMessage(aCheckMsg); ++ if (aCheckValue) ++ prompter.SetCheckValue(*aCheckValue); ++ ++ prompter.Create(EmbedPrompter::TYPE_PROMPT_USER_PASS, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ if (aCheckValue) ++ prompter.GetCheckValue(aCheckValue); ++ prompter.GetConfirmValue(aConfirm); ++ if (*aConfirm) { ++ if (*aUsername) ++ NS_Free(*aUsername); ++ prompter.GetUser(aUsername); ++ ++ if (*aPassword) ++ NS_Free(*aPassword); ++ prompter.GetPassword(aPassword); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++GtkPromptService::PromptPassword(nsIDOMWindow* aParent, ++ const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText, ++ PRUnichar** aPassword, ++ const PRUnichar* aCheckMsg, ++ PRBool* aCheckValue, PRBool* aConfirm) ++{ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); ++ prompter.SetMessageText(aDialogText); ++ prompter.SetPassword(*aPassword); ++ if (aCheckMsg) ++ prompter.SetCheckMessage(aCheckMsg); ++ if (aCheckValue) ++ prompter.SetCheckValue(*aCheckValue); ++ ++ prompter.Create(EmbedPrompter::TYPE_PROMPT_PASS, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ if (aCheckValue) ++ prompter.GetCheckValue(aCheckValue); ++ prompter.GetConfirmValue(aConfirm); ++ if (*aConfirm) { ++ if (*aPassword) ++ NS_Free(*aPassword); ++ prompter.GetPassword(aPassword); ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++GtkPromptService::Select(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, ++ const PRUnichar* aDialogText, PRUint32 aCount, ++ const PRUnichar** aSelectList, PRInt32* outSelection, ++ PRBool* aConfirm) ++{ ++ EmbedPrompter prompter; ++ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Select").get()); ++ prompter.SetMessageText(aDialogText); ++ prompter.SetItems(aSelectList, aCount); ++ prompter.Create(EmbedPrompter::TYPE_SELECT, ++ GetGtkWindowForDOMWindow(aParent)); ++ prompter.Run(); ++ prompter.GetSelectedItem(outSelection); ++ prompter.GetConfirmValue(aConfirm); ++ return NS_OK; ++} ++ ++GtkWindow* ++GtkPromptService::GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow) ++{ ++ nsCOMPtr wwatch = do_GetService("@mozilla.org/embedcomp/window-watcher;1"); ++ ++ if (!aDOMWindow) ++ return NULL; ++ ++ nsCOMPtr chrome; ++ wwatch->GetChromeForWindow(aDOMWindow, getter_AddRefs(chrome)); ++ nsCOMPtr siteWindow = do_QueryInterface(chrome); ++ ++ if (!siteWindow) ++ return NULL; ++ ++ GtkWidget* parentWidget; ++ siteWindow->GetSiteWindow((void**)&parentWidget); ++ ++ if (!parentWidget) ++ return NULL; ++ ++ GtkWidget* gtkWin = gtk_widget_get_toplevel(parentWidget); ++ if (GTK_WIDGET_TOPLEVEL(gtkWin)) ++ return GTK_WINDOW(gtkWin); ++ ++ return NULL; ++} ++ ++void ++GtkPromptService::GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, ++ const PRUnichar* aStringValue, ++ nsAString& aLabel) ++{ ++ PRUint32 posFlag = (aFlags & (255 * aPos)) / aPos; ++ switch (posFlag) { ++ case 0: ++ break; ++ case BUTTON_TITLE_OK: ++ aLabel.AssignLiteral(GTK_STOCK_OK); ++ break; ++ case BUTTON_TITLE_CANCEL: ++ aLabel.AssignLiteral(GTK_STOCK_CANCEL); ++ break; ++ case BUTTON_TITLE_YES: ++ aLabel.AssignLiteral(GTK_STOCK_YES); ++ break; ++ case BUTTON_TITLE_NO: ++ aLabel.AssignLiteral(GTK_STOCK_NO); ++ break; ++ case BUTTON_TITLE_SAVE: ++ aLabel.AssignLiteral(GTK_STOCK_SAVE); ++ break; ++ case BUTTON_TITLE_DONT_SAVE: ++ aLabel.AssignLiteral("Don't Save"); ++ break; ++ case BUTTON_TITLE_REVERT: ++ aLabel.AssignLiteral("Revert"); ++ break; ++ case BUTTON_TITLE_IS_STRING: ++ aLabel = aStringValue; ++ break; ++ default: ++ NS_WARNING("Unexpected button flags"); ++ } ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-06-22 12:14:58.811816533 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h 2011-06-22 12:14:58.811816533 +0200 +@@ -0,0 +1,59 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 2003 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Brian Ryner ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsIPromptService.h" ++#include "nsStringGlue.h" ++#include ++ ++class nsIDOMWindow; ++ ++class GtkPromptService : public nsIPromptService ++{ ++public: ++ GtkPromptService(); ++ virtual ~GtkPromptService(); ++ ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSIPROMPTSERVICE ++ ++private: ++ GtkWindow* GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow); ++ void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, ++ const PRUnichar* aStringValue, nsAString &aLabel); ++}; +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-06-22 12:14:58.812816538 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in 2011-06-22 12:14:58.812816538 +0200 +@@ -0,0 +1,112 @@ ++# ++# ***** BEGIN LICENSE BLOCK ***** ++# Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++# ++# The contents of this file are subject to the Mozilla Public License Version ++# 1.1 (the "License"); you may not use this file except in compliance with ++# the License. You may obtain a copy of the License at ++# http://www.mozilla.org/MPL/ ++# ++# Software distributed under the License is distributed on an "AS IS" basis, ++# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++# for the specific language governing rights and limitations under the ++# License. ++# ++# The Original Code is the Mozilla browser. ++# ++# The Initial Developer of the Original Code is ++# Christopher Blizzard. ++# Portions created by the Initial Developer are Copyright (C) 1999 ++# the Initial Developer. All Rights Reserved. ++# ++# Contributor(s): ++# Christopher Blizzard ++# ++# Alternatively, the contents of this file may be used under the terms of ++# either the GNU General Public License Version 2 or later (the "GPL"), or ++# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++# in which case the provisions of the GPL or the LGPL are applicable instead ++# of those above. If you wish to allow use of your version of this file only ++# under the terms of either the GPL or the LGPL, and not to allow others to ++# use your version of this file under the terms of the MPL, indicate your ++# decision by deleting the provisions above and replace them with the notice ++# and other provisions required by the GPL or the LGPL. If you do not delete ++# the provisions above, a recipient may use your version of this file under ++# the terms of any one of the MPL, the GPL or the LGPL. ++# ++# ***** END LICENSE BLOCK ***** ++ ++DEPTH = ../../../.. ++topsrcdir = @top_srcdir@ ++srcdir = @srcdir@ ++VPATH = @srcdir@ ++ ++include $(DEPTH)/config/autoconf.mk ++ ++MODULE = gtkembedmoz ++LIBRARY_NAME = gtkembedmoz ++LIBXUL_LIBRARY = 1 ++FORCE_STATIC_LIB = 1 ++DEFINES += -DIMPL_XREAPI ++ ++ ++ ++CPPSRCS = \ ++ gtkmozembed2.cpp \ ++ EmbedPrivate.cpp \ ++ EmbedWindow.cpp \ ++ EmbedProgress.cpp \ ++ EmbedContentListener.cpp \ ++ EmbedEventListener.cpp \ ++ EmbedWindowCreator.cpp \ ++ $(NULL) ++ ++ifdef MOZ_ENABLE_GTK2 ++CSRCS = \ ++ gtkmozembedmarshal.c ++CPPSRCS += \ ++ EmbedPrompter.cpp \ ++ GtkPromptService.cpp ++endif ++ ++LOCAL_INCLUDES += \ ++ -I. \ ++ $(NULL) ++ ++include $(topsrcdir)/config/config.mk ++ ++EXPORTS = \ ++ gtkmozembed.h \ ++ gtkmozembed_glue.cpp \ ++ gtkmozembed_internal.h ++ ++include $(topsrcdir)/config/rules.mk ++ ++ifeq ($(OS_ARCH), SunOS) ++ifndef GNU_CC ++# When using Sun's WorkShop compiler, including ++# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h ++# causes most of these compiles to fail with: ++# line 29: Error: Multiple declaration for std::tm. ++# So, this gets around the problem. ++DEFINES += -D_TIME_H=1 ++endif ++endif ++ ++CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) ++CFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) ++DEFINES += -D_IMPL_GTKMOZEMBED ++ ++MARSHAL_FILE = gtkmozembedmarshal ++MARSHAL_PREFIX = gtkmozembed ++ ++$(MARSHAL_FILE).h: $(MARSHAL_FILE).list ++ glib-genmarshal --prefix=$(MARSHAL_PREFIX) $(srcdir)/$(MARSHAL_FILE).list --skip-source --header > $@ ++ ++$(MARSHAL_FILE).c: $(MARSHAL_FILE).list $(MARSHAL_FILE).h ++ glib-genmarshal --prefix=$(MARSHAL_PREFIX) $(srcdir)/$(MARSHAL_FILE).list --skip-source --body > $@ ++ ++gtkmozembed2.$(OBJ_SUFFIX): $(MARSHAL_FILE).h ++ ++GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c ++ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-06-22 12:14:58.824816598 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in 2011-06-22 12:14:58.824816598 +0200 +@@ -0,0 +1,101 @@ ++# ++# ***** BEGIN LICENSE BLOCK ***** ++# Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++# ++# The contents of this file are subject to the Mozilla Public License Version ++# 1.1 (the "License"); you may not use this file except in compliance with ++# the License. You may obtain a copy of the License at ++# http://www.mozilla.org/MPL/ ++# ++# Software distributed under the License is distributed on an "AS IS" basis, ++# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++# for the specific language governing rights and limitations under the ++# License. ++# ++# The Original Code is the Mozilla browser. ++# ++# The Initial Developer of the Original Code is ++# Christopher Blizzard. ++# Portions created by the Initial Developer are Copyright (C) 1999 ++# the Initial Developer. All Rights Reserved. ++# ++# Contributor(s): ++# Christopher Blizzard ++# ++# Alternatively, the contents of this file may be used under the terms of ++# either the GNU General Public License Version 2 or later (the "GPL"), or ++# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++# in which case the provisions of the GPL or the LGPL are applicable instead ++# of those above. If you wish to allow use of your version of this file only ++# under the terms of either the GPL or the LGPL, and not to allow others to ++# use your version of this file under the terms of the MPL, indicate your ++# decision by deleting the provisions above and replace them with the notice ++# and other provisions required by the GPL or the LGPL. If you do not delete ++# the provisions above, a recipient may use your version of this file under ++# the terms of any one of the MPL, the GPL or the LGPL. ++# ++# ***** END LICENSE BLOCK ***** ++ ++DEPTH = ../../../.. ++topsrcdir = @top_srcdir@ ++srcdir = @srcdir@ ++VPATH = @srcdir@ ++ ++include $(DEPTH)/config/autoconf.mk ++ ++MODULE = gtkembedmoz ++ ++CPPSRCS = \ ++ TestGtkEmbed.cpp \ ++ TestGtkEmbedNotebook.cpp ++ ++ifdef MOZ_X11 ++CPPSRCS += TestGtkEmbedSocket.cpp \ ++ TestGtkEmbedChild.cpp ++endif ++ ++SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=) ++ ++# ENABLE_GNOME=1 ++ ++ifdef ENABLE_GNOME ++CPPSRCS += TestGtkEmbedMDI.cpp ++endif ++ ++ifdef MOZ_ENABLE_GTK2 ++LIBS += \ ++ $(XLDFLAGS) \ ++ $(XLIBS) \ ++ $(NULL) ++endif ++ ++include $(topsrcdir)/config/config.mk ++ ++include $(topsrcdir)/config/rules.mk ++ ++LIBS += $(XPCOM_STANDALONE_GLUE_LDOPTS) ++ ++DEFINES += -DXPCOM_GLUE ++STL_FLAGS = ++ ++CXXFLAGS += $(MOZ_GTK2_CFLAGS) ++ ++ifdef ENABLE_GNOME ++CXXFLAGS += `gnome-config --cflags gnomeui` ++EXTRA_LIBS += `gnome-config --libs gnomeui` ++endif ++ ++EXTRA_LIBS += \ ++ $(TK_LIBS) \ ++ $(NULL) ++ ++ifeq ($(OS_ARCH), SunOS) ++ifndef GNU_CC ++# When using Sun's WorkShop compiler, including ++# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h ++# causes most of these compiles to fail with: ++# line 29: Error: Multiple declaration for std::tm. ++# So, this gets around the problem. ++DEFINES += -D_TIME_H=1 ++endif ++endif +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-06-22 12:14:58.828816618 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-06-22 12:14:58.829816623 +0200 +@@ -0,0 +1,185 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "gtkmozembed.h" ++#include ++#include ++#include ++#include ++ ++#include "nsStringAPI.h" ++#include "gtkmozembed_glue.cpp" ++ ++int (*old_handler) (Display *, XErrorEvent *); ++ ++int error_handler (Display *d, XErrorEvent *e) ++{ ++ if ((e->error_code == BadWindow) || (e->error_code == BadDrawable)) ++ { ++ XID resourceid = e->resourceid; ++ GdkWindow *window = gdk_window_lookup (resourceid); ++ ++ if (window) ++ { ++ if (!g_dataset_get_data (window, "bonobo-error")) ++ { ++ g_dataset_set_data_full (window, "bonobo-error", ++ g_new (gint, 1), ++ (GDestroyNotify)g_free); ++ ++ g_warning ("Error accessing window %ld", resourceid); ++ } ++ } ++ return 0; ++ } ++ else ++ { ++ return (*old_handler)(d, e); ++ } ++} ++ ++void ++load_page(gpointer data); ++ ++GtkWidget *embed = 0; ++GtkWidget *entry = 0; ++ ++int ++main(int argc, char **argv) ++{ ++ guint32 xid; ++ ++ GtkWidget *window; ++ GtkWidget *hbox; ++ GtkWidget *vbox; ++ GtkWidget *button; ++ ++ gtk_init(&argc, &argv); ++ ++ static const GREVersionRange greVersion = { ++ "1.9a", PR_TRUE, ++ "2", PR_TRUE ++ }; ++ ++ char xpcomPath[PATH_MAX]; ++ ++ nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, ++ xpcomPath, sizeof(xpcomPath)); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't find a compatible GRE.\n"); ++ return 1; ++ } ++ ++ rv = XPCOMGlueStartup(xpcomPath); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't start XPCOM."); ++ return 1; ++ } ++ ++ rv = GTKEmbedGlueStartup(); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); ++ return 1; ++ } ++ ++ char *lastSlash = strrchr(xpcomPath, '/'); ++ if (lastSlash) ++ *lastSlash = '\0'; ++ ++ gtk_moz_embed_set_path(xpcomPath); ++ ++ old_handler = XSetErrorHandler (error_handler); ++ ++ if (argc < 2) { ++ fprintf(stderr, "Usage: TestGtkEmbedChild WINDOW_ID\n"); ++ exit(1); ++ } ++ ++ xid = strtol (argv[1], (char **)NULL, 0); ++ ++ if (xid == 0) { ++ fprintf(stderr, "Invalid window id '%s'\n", argv[1]); ++ exit(1); ++ } ++ ++ window = gtk_plug_new(xid); ++ ++ g_signal_connect(GTK_OBJECT(window), "destroy", ++ G_CALLBACK(gtk_main_quit), NULL); ++ ++ gtk_container_set_border_width(GTK_CONTAINER(window), 0); ++ ++ vbox = gtk_vbox_new (FALSE, 0); ++ gtk_container_add(GTK_CONTAINER(window), vbox); ++ gtk_widget_show(vbox); ++ ++ hbox = gtk_hbox_new (FALSE, 0); ++ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); ++ gtk_widget_show (hbox); ++ ++ entry = gtk_entry_new (); ++ gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); ++ gtk_widget_show (entry); ++ ++ button = gtk_button_new_with_label("Load"); ++ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); ++ gtk_widget_show(button); ++ ++ g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(load_page), NULL); ++ ++ embed = gtk_moz_embed_new(); ++ gtk_box_pack_start(GTK_BOX(vbox), embed, TRUE, TRUE, 0); ++ gtk_widget_set_size_request(embed, 200, 200); ++ gtk_widget_show(embed); ++ ++ gtk_widget_show(window); ++ ++ gtk_main(); ++ ++ fprintf(stderr, "exiting.\n"); ++ ++ return 0; ++} ++ ++void ++load_page(gpointer data) ++{ ++ gchar *text = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); ++ g_print("load url %s\n", text); ++ gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); ++ g_free(text); ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-06-22 12:14:58.827816613 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-06-22 12:14:58.827816613 +0200 +@@ -0,0 +1,1145 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "gtkmozembed.h" ++#include ++#include ++#include ++#include ++ ++// mozilla specific headers ++#include "nsIDOMKeyEvent.h" ++#include "nsIDOMMouseEvent.h" ++#include "nsIDOMUIEvent.h" ++ ++#include "nsCOMPtr.h" ++#include "nsISupportsUtils.h" ++#include "nsServiceManagerUtils.h" ++#include "nsIObserverService.h" ++ ++#include "nsStringAPI.h" ++#include "gtkmozembed_glue.cpp" ++ ++typedef struct _TestGtkBrowser { ++ GtkWidget *topLevelWindow; ++ GtkWidget *topLevelVBox; ++ GtkWidget *menuBar; ++ GtkWidget *fileMenuItem; ++ GtkWidget *fileMenu; ++ GtkWidget *fileOpenNewBrowser; ++ GtkWidget *fileStream; ++ GtkWidget *fileMemory; ++ GtkWidget *fileClose; ++ GtkWidget *fileQuit; ++ GtkWidget *toolbarHBox; ++ GtkWidget *toolbar; ++ GtkWidget *backButton; ++ GtkWidget *stopButton; ++ GtkWidget *forwardButton; ++ GtkWidget *reloadButton; ++ GtkWidget *urlEntry; ++ GtkWidget *mozEmbed; ++ GtkWidget *progressAreaHBox; ++ GtkWidget *progressBar; ++ GtkWidget *statusAlign; ++ GtkWidget *statusBar; ++ const char *statusMessage; ++ int loadPercent; ++ int bytesLoaded; ++ int maxBytesLoaded; ++ char *tempMessage; ++ gboolean menuBarOn; ++ gboolean toolBarOn; ++ gboolean locationBarOn; ++ gboolean statusBarOn; ++ ++} TestGtkBrowser; ++ ++// the list of browser windows currently open ++GList *browser_list = g_list_alloc(); ++ ++static TestGtkBrowser *new_gtk_browser (guint32 chromeMask); ++static void set_browser_visibility (TestGtkBrowser *browser, ++ gboolean visibility); ++ ++static int num_browsers = 0; ++ ++// callbacks from the UI ++static void back_clicked_cb (GtkButton *button, ++ TestGtkBrowser *browser); ++static void stop_clicked_cb (GtkButton *button, ++ TestGtkBrowser *browser); ++static void forward_clicked_cb (GtkButton *button, ++ TestGtkBrowser *browser); ++static void reload_clicked_cb (GtkButton *button, ++ TestGtkBrowser *browser); ++static void url_activate_cb (GtkEditable *widget, ++ TestGtkBrowser *browser); ++static void menu_open_new_cb (GtkMenuItem *menuitem, ++ TestGtkBrowser *browser); ++static void menu_stream_cb (GtkMenuItem *menuitem, ++ TestGtkBrowser *browser); ++static void menu_memory_cb (GtkMenuItem *menuitem, ++ TestGtkBrowser *browser); ++static void menu_close_cb (GtkMenuItem *menuitem, ++ TestGtkBrowser *browser); ++static void menu_quit_cb (GtkMenuItem *menuitem, ++ TestGtkBrowser *browser); ++static gboolean delete_cb (GtkWidget *widget, GdkEventAny *event, ++ TestGtkBrowser *browser); ++static void destroy_cb (GtkWidget *widget, ++ TestGtkBrowser *browser); ++ ++// callbacks from the widget ++static void location_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); ++static void title_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); ++static void load_started_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); ++static void load_finished_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); ++static void net_state_change_cb (GtkMozEmbed *embed, gint flags, ++ guint status, TestGtkBrowser *browser); ++static void net_state_change_all_cb (GtkMozEmbed *embed, const char *uri, ++ gint flags, guint status, ++ TestGtkBrowser *browser); ++static void progress_change_cb (GtkMozEmbed *embed, gint cur, gint max, ++ TestGtkBrowser *browser); ++static void progress_change_all_cb (GtkMozEmbed *embed, const char *uri, ++ gint cur, gint max, ++ TestGtkBrowser *browser); ++static void link_message_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); ++static void js_status_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); ++static void new_window_cb (GtkMozEmbed *embed, ++ GtkMozEmbed **retval, guint chromemask, ++ TestGtkBrowser *browser); ++static void visibility_cb (GtkMozEmbed *embed, ++ gboolean visibility, ++ TestGtkBrowser *browser); ++static void destroy_brsr_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); ++static gint open_uri_cb (GtkMozEmbed *embed, const char *uri, ++ TestGtkBrowser *browser); ++static void size_to_cb (GtkMozEmbed *embed, gint width, ++ gint height, TestGtkBrowser *browser); ++static gint dom_key_down_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_key_press_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_key_up_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_mouse_down_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_mouse_up_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_mouse_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_mouse_dbl_click_cb (GtkMozEmbed *embed, ++ nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_mouse_over_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_mouse_out_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_activate_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_focus_in_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, ++ TestGtkBrowser *browser); ++static gint dom_focus_out_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, ++ TestGtkBrowser *browser); ++ ++// callbacks from the singleton object ++static void new_window_orphan_cb (GtkMozEmbedSingle *embed, ++ GtkMozEmbed **retval, guint chromemask, ++ gpointer data); ++ ++// some utility functions ++static void update_status_bar_text (TestGtkBrowser *browser); ++static void update_temp_message (TestGtkBrowser *browser, ++ const char *message); ++static void update_nav_buttons (TestGtkBrowser *browser); ++ ++int ++main(int argc, char **argv) ++{ ++ gtk_set_locale(); ++ gtk_init(&argc, &argv); ++ ++ static const GREVersionRange greVersion = { ++ "1.9a", PR_TRUE, ++ "2", PR_TRUE ++ }; ++ ++ char xpcomPath[PATH_MAX]; ++ ++ nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, ++ xpcomPath, sizeof(xpcomPath)); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't find a compatible GRE.\n"); ++ return 1; ++ } ++ ++ rv = XPCOMGlueStartup(xpcomPath); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't start XPCOM."); ++ return 1; ++ } ++ ++ rv = GTKEmbedGlueStartup(); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); ++ return 1; ++ } ++ ++ char *lastSlash = strrchr(xpcomPath, '/'); ++ if (lastSlash) ++ *lastSlash = '\0'; ++ ++ gtk_moz_embed_set_path(xpcomPath); ++ ++ char *home_path; ++ char *full_path; ++ home_path = getenv("HOME"); ++ if (!home_path) { ++ fprintf(stderr, "Failed to get HOME\n"); ++ exit(1); ++ } ++ ++ full_path = g_strdup_printf("%s/%s", home_path, ".TestGtkEmbed"); ++ ++ gtk_moz_embed_set_profile_path(full_path, "TestGtkEmbed"); ++ ++ TestGtkBrowser *browser = new_gtk_browser(GTK_MOZ_EMBED_FLAG_DEFAULTCHROME); ++ ++ // set our minimum size ++ gtk_widget_set_size_request(browser->mozEmbed, 400, 400); ++ ++ set_browser_visibility(browser, TRUE); ++ ++ if (argc > 1) ++ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser->mozEmbed), argv[1]); ++ ++ // get the singleton object and hook up to its new window callback ++ // so we can create orphaned windows. ++ ++ GtkMozEmbedSingle *single; ++ ++ single = gtk_moz_embed_single_get(); ++ if (!single) { ++ fprintf(stderr, "Failed to get singleton embed object!\n"); ++ exit(1); ++ } ++ ++ g_signal_connect(GTK_OBJECT(single), "new_window_orphan", ++ G_CALLBACK(new_window_orphan_cb), NULL); ++ ++ gtk_moz_embed_push_startup(); ++ gtk_main(); ++ gtk_moz_embed_pop_startup(); ++} ++ ++static TestGtkBrowser * ++new_gtk_browser(guint32 chromeMask) ++{ ++ guint32 actualChromeMask = chromeMask; ++ TestGtkBrowser *browser = 0; ++ ++ num_browsers++; ++ ++ browser = g_new0(TestGtkBrowser, 1); ++ ++ browser_list = g_list_prepend(browser_list, browser); ++ ++ browser->menuBarOn = FALSE; ++ browser->toolBarOn = FALSE; ++ browser->locationBarOn = FALSE; ++ browser->statusBarOn = FALSE; ++ ++ g_print("new_gtk_browser\n"); ++ ++ if (chromeMask == GTK_MOZ_EMBED_FLAG_DEFAULTCHROME) ++ actualChromeMask = GTK_MOZ_EMBED_FLAG_ALLCHROME; ++ ++ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_MENUBARON) ++ { ++ browser->menuBarOn = TRUE; ++ g_print("\tmenu bar\n"); ++ } ++ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_TOOLBARON) ++ { ++ browser->toolBarOn = TRUE; ++ g_print("\ttool bar\n"); ++ } ++ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_LOCATIONBARON) ++ { ++ browser->locationBarOn = TRUE; ++ g_print("\tlocation bar\n"); ++ } ++ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_STATUSBARON) ++ { ++ browser->statusBarOn = TRUE; ++ g_print("\tstatus bar\n"); ++ } ++ ++ // create our new toplevel window ++ browser->topLevelWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); ++ // new vbox ++ browser->topLevelVBox = gtk_vbox_new(FALSE, 0); ++ // add it to the toplevel window ++ gtk_container_add(GTK_CONTAINER(browser->topLevelWindow), ++ browser->topLevelVBox); ++ // create our menu bar ++ browser->menuBar = gtk_menu_bar_new(); ++ // create the file menu ++ browser->fileMenuItem = gtk_menu_item_new_with_label("File"); ++ browser->fileMenu = gtk_menu_new(); ++ gtk_menu_item_set_submenu (GTK_MENU_ITEM(browser->fileMenuItem), ++ browser->fileMenu); ++ ++ browser->fileOpenNewBrowser = ++ gtk_menu_item_new_with_label("Open New Browser"); ++ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), ++ browser->fileOpenNewBrowser); ++ ++ browser->fileStream = ++ gtk_menu_item_new_with_label("Test Stream"); ++ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), ++ browser->fileStream); ++ ++ browser->fileMemory = ++ gtk_menu_item_new_with_label("Release Memory"); ++ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), ++ browser->fileMemory); ++ ++ browser->fileClose = ++ gtk_menu_item_new_with_label("Close"); ++ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), ++ browser->fileClose); ++ ++ browser->fileQuit = ++ gtk_menu_item_new_with_label("Quit"); ++ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), ++ browser->fileQuit); ++ ++ // append it ++ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU_BAR(browser->menuBar), ++ browser->fileMenuItem); ++ ++ // add it to the vbox ++ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), ++ browser->menuBar, ++ FALSE, // expand ++ FALSE, // fill ++ 0); // padding ++ // create the hbox that will contain the toolbar and the url text entry bar ++ browser->toolbarHBox = gtk_hbox_new(FALSE, 0); ++ // add that hbox to the vbox ++ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), ++ browser->toolbarHBox, ++ FALSE, // expand ++ FALSE, // fill ++ 0); // padding ++ // new horiz toolbar with buttons + icons ++ browser->toolbar = gtk_toolbar_new(); ++ gtk_toolbar_set_orientation(GTK_TOOLBAR(browser->toolbar), ++ GTK_ORIENTATION_HORIZONTAL); ++ gtk_toolbar_set_style(GTK_TOOLBAR(browser->toolbar), ++ GTK_TOOLBAR_BOTH); ++ ++ // add it to the hbox ++ gtk_box_pack_start(GTK_BOX(browser->toolbarHBox), browser->toolbar, ++ FALSE, // expand ++ FALSE, // fill ++ 0); // padding ++ // new back button ++ browser->backButton = ++ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), ++ "Back", ++ "Go Back", ++ "Go Back", ++ 0, // XXX replace with icon ++ G_CALLBACK(back_clicked_cb), ++ browser); ++ // new stop button ++ browser->stopButton = ++ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), ++ "Stop", ++ "Stop", ++ "Stop", ++ 0, // XXX replace with icon ++ G_CALLBACK(stop_clicked_cb), ++ browser); ++ // new forward button ++ browser->forwardButton = ++ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), ++ "Forward", ++ "Forward", ++ "Forward", ++ 0, // XXX replace with icon ++ G_CALLBACK(forward_clicked_cb), ++ browser); ++ // new reload button ++ browser->reloadButton = ++ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), ++ "Reload", ++ "Reload", ++ "Reload", ++ 0, // XXX replace with icon ++ G_CALLBACK(reload_clicked_cb), ++ browser); ++ // create the url text entry ++ browser->urlEntry = gtk_entry_new(); ++ // add it to the hbox ++ gtk_box_pack_start(GTK_BOX(browser->toolbarHBox), browser->urlEntry, ++ TRUE, // expand ++ TRUE, // fill ++ 0); // padding ++ // create our new gtk moz embed widget ++ browser->mozEmbed = gtk_moz_embed_new(); ++ gtk_moz_embed_push_startup(); ++ // add it to the toplevel vbox ++ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->mozEmbed, ++ TRUE, // expand ++ TRUE, // fill ++ 0); // padding ++ // create the new hbox for the progress area ++ browser->progressAreaHBox = gtk_hbox_new(FALSE, 0); ++ // add it to the vbox ++ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->progressAreaHBox, ++ FALSE, // expand ++ FALSE, // fill ++ 0); // padding ++ // create our new progress bar ++ browser->progressBar = gtk_progress_bar_new(); ++ // add it to the hbox ++ gtk_box_pack_start(GTK_BOX(browser->progressAreaHBox), browser->progressBar, ++ FALSE, // expand ++ FALSE, // fill ++ 0); // padding ++ ++ // create our status area and the alignment object that will keep it ++ // from expanding ++ browser->statusAlign = gtk_alignment_new(0, 0, 1, 1); ++ gtk_widget_set_size_request(browser->statusAlign, 1, -1); ++ // create the status bar ++ browser->statusBar = gtk_statusbar_new(); ++ gtk_container_add(GTK_CONTAINER(browser->statusAlign), browser->statusBar); ++ // add it to the hbox ++ gtk_box_pack_start(GTK_BOX(browser->progressAreaHBox), browser->statusAlign, ++ TRUE, // expand ++ TRUE, // fill ++ 0); // padding ++ // by default none of the buttons are marked as sensitive. ++ gtk_widget_set_sensitive(browser->backButton, FALSE); ++ gtk_widget_set_sensitive(browser->stopButton, FALSE); ++ gtk_widget_set_sensitive(browser->forwardButton, FALSE); ++ gtk_widget_set_sensitive(browser->reloadButton, FALSE); ++ ++ // catch the destruction of the toplevel window ++ g_signal_connect(GTK_OBJECT(browser->topLevelWindow), "delete_event", ++ G_CALLBACK(delete_cb), browser); ++ ++ // hook up the activate signal to the right callback ++ g_signal_connect(GTK_OBJECT(browser->urlEntry), "activate", ++ G_CALLBACK(url_activate_cb), browser); ++ ++ // hook up to the open new browser activation ++ g_signal_connect(GTK_OBJECT(browser->fileOpenNewBrowser), "activate", ++ G_CALLBACK(menu_open_new_cb), browser); ++ // hook up to the stream test ++ g_signal_connect(GTK_OBJECT(browser->fileStream), "activate", ++ G_CALLBACK(menu_stream_cb), browser); ++ // hook up the memory pressure release function ++ g_signal_connect(GTK_OBJECT(browser->fileMemory), "activate", ++ G_CALLBACK(menu_memory_cb), browser); ++ // close this window ++ g_signal_connect(GTK_OBJECT(browser->fileClose), "activate", ++ G_CALLBACK(menu_close_cb), browser); ++ // quit the application ++ g_signal_connect(GTK_OBJECT(browser->fileQuit), "activate", ++ G_CALLBACK(menu_quit_cb), browser); ++ ++ // hook up the location change to update the urlEntry ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "location", ++ G_CALLBACK(location_changed_cb), browser); ++ // hook up the title change to update the window title ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "title", ++ G_CALLBACK(title_changed_cb), browser); ++ // hook up the start and stop signals ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_start", ++ G_CALLBACK(load_started_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_stop", ++ G_CALLBACK(load_finished_cb), browser); ++ // hook up to the change in network status ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_state", ++ G_CALLBACK(net_state_change_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_state_all", ++ G_CALLBACK(net_state_change_all_cb), browser); ++ // hookup to changes in progress ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "progress", ++ G_CALLBACK(progress_change_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "progress_all", ++ G_CALLBACK(progress_change_all_cb), browser); ++ // hookup to changes in over-link message ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "link_message", ++ G_CALLBACK(link_message_cb), browser); ++ // hookup to changes in js status message ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "js_status", ++ G_CALLBACK(js_status_cb), browser); ++ // hookup to see whenever a new window is requested ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "new_window", ++ G_CALLBACK(new_window_cb), browser); ++ // hookup to any requested visibility changes ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "visibility", ++ G_CALLBACK(visibility_cb), browser); ++ // hookup to the signal that says that the browser requested to be ++ // destroyed ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "destroy_browser", ++ G_CALLBACK(destroy_brsr_cb), browser); ++ // hookup to the signal that is called when someone clicks on a link ++ // to load a new uri ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "open_uri", ++ G_CALLBACK(open_uri_cb), browser); ++ // this signal is emitted when there's a request to change the ++ // containing browser window to a certain height, like with width ++ // and height args for a window.open in javascript ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "size_to", ++ G_CALLBACK(size_to_cb), browser); ++ // key event signals ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_down", ++ G_CALLBACK(dom_key_down_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_press", ++ G_CALLBACK(dom_key_press_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_up", ++ G_CALLBACK(dom_key_up_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_down", ++ G_CALLBACK(dom_mouse_down_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_up", ++ G_CALLBACK(dom_mouse_up_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_click", ++ G_CALLBACK(dom_mouse_click_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_dbl_click", ++ G_CALLBACK(dom_mouse_dbl_click_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_over", ++ G_CALLBACK(dom_mouse_over_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_out", ++ G_CALLBACK(dom_mouse_out_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_activate", ++ G_CALLBACK(dom_activate_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_focus_in", ++ G_CALLBACK(dom_focus_in_cb), browser); ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_focus_out", ++ G_CALLBACK(dom_focus_out_cb), browser); ++ // hookup to when the window is destroyed ++ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "destroy", ++ G_CALLBACK(destroy_cb), browser); ++ ++ // set the chrome type so it's stored in the object ++ gtk_moz_embed_set_chrome_mask(GTK_MOZ_EMBED(browser->mozEmbed), ++ actualChromeMask); ++ ++ return browser; ++} ++ ++void ++set_browser_visibility (TestGtkBrowser *browser, gboolean visibility) ++{ ++ if (!visibility) ++ { ++ gtk_widget_hide(browser->topLevelWindow); ++ return; ++ } ++ ++ if (browser->menuBarOn) ++ gtk_widget_show_all(browser->menuBar); ++ else ++ gtk_widget_hide_all(browser->menuBar); ++ ++ // since they are on the same line here... ++ if (browser->toolBarOn || browser->locationBarOn) ++ gtk_widget_show_all(browser->toolbarHBox); ++ else ++ gtk_widget_hide_all(browser->toolbarHBox); ++ ++ if (browser->statusBarOn) ++ gtk_widget_show_all(browser->progressAreaHBox); ++ else ++ gtk_widget_hide_all(browser->progressAreaHBox); ++ ++ gtk_widget_show(browser->mozEmbed); ++ gtk_widget_show(browser->topLevelVBox); ++ gtk_widget_show(browser->topLevelWindow); ++} ++ ++void ++back_clicked_cb (GtkButton *button, TestGtkBrowser *browser) ++{ ++ gtk_moz_embed_go_back(GTK_MOZ_EMBED(browser->mozEmbed)); ++} ++ ++void ++stop_clicked_cb (GtkButton *button, TestGtkBrowser *browser) ++{ ++ g_print("stop_clicked_cb\n"); ++ gtk_moz_embed_stop_load(GTK_MOZ_EMBED(browser->mozEmbed)); ++} ++ ++void ++forward_clicked_cb (GtkButton *button, TestGtkBrowser *browser) ++{ ++ g_print("forward_clicked_cb\n"); ++ gtk_moz_embed_go_forward(GTK_MOZ_EMBED(browser->mozEmbed)); ++} ++ ++void ++reload_clicked_cb (GtkButton *button, TestGtkBrowser *browser) ++{ ++ g_print("reload_clicked_cb\n"); ++ GdkModifierType state = (GdkModifierType)0; ++ gint x, y; ++ gdk_window_get_pointer(NULL, &x, &y, &state); ++ ++ gtk_moz_embed_reload(GTK_MOZ_EMBED(browser->mozEmbed), ++ (state & GDK_SHIFT_MASK) ? ++ GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE : ++ GTK_MOZ_EMBED_FLAG_RELOADNORMAL); ++} ++ ++void ++stream_clicked_cb (GtkButton *button, TestGtkBrowser *browser) ++{ ++ const char *data; ++ const char *data2; ++ data = "Hi"; ++ data2 = " there\n"; ++ g_print("stream_clicked_cb\n"); ++ gtk_moz_embed_open_stream(GTK_MOZ_EMBED(browser->mozEmbed), ++ "file://", "text/html"); ++ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), ++ data, strlen(data)); ++ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), ++ data2, strlen(data2)); ++ gtk_moz_embed_close_stream(GTK_MOZ_EMBED(browser->mozEmbed)); ++} ++ ++void ++url_activate_cb (GtkEditable *widget, TestGtkBrowser *browser) ++{ ++ gchar *text = gtk_editable_get_chars(widget, 0, -1); ++ g_print("loading url %s\n", text); ++ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser->mozEmbed), text); ++ g_free(text); ++} ++ ++void ++menu_open_new_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) ++{ ++ g_print("opening new browser.\n"); ++ TestGtkBrowser *newBrowser = ++ new_gtk_browser(GTK_MOZ_EMBED_FLAG_DEFAULTCHROME); ++ gtk_widget_set_size_request(newBrowser->mozEmbed, 400, 400); ++ set_browser_visibility(newBrowser, TRUE); ++} ++ ++void ++menu_stream_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) ++{ ++ g_print("menu_stream_cb\n"); ++ const char *data; ++ const char *data2; ++ data = "Hi"; ++ data2 = " there\n"; ++ g_print("stream_clicked_cb\n"); ++ gtk_moz_embed_open_stream(GTK_MOZ_EMBED(browser->mozEmbed), ++ "file://", "text/html"); ++ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), ++ data, strlen(data)); ++ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), ++ data2, strlen(data2)); ++ gtk_moz_embed_close_stream(GTK_MOZ_EMBED(browser->mozEmbed)); ++} ++ ++void ++menu_memory_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) ++{ ++ g_print("menu_memory_cb\n"); ++ nsCOMPtr os = do_GetService("@mozilla.org/observer-service;1"); ++ if (!os) ++ return; ++ ++ // Compact like you mean it. We do this three times to give the ++ // cycle collector a chance to try and reclaim as much as we can. ++ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); ++ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); ++ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); ++} ++ ++void ++menu_close_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) ++{ ++ gtk_widget_destroy(browser->topLevelWindow); ++} ++ ++void ++menu_quit_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) ++{ ++ TestGtkBrowser *tmpBrowser; ++ GList *tmp_list = browser_list; ++ tmpBrowser = (TestGtkBrowser *)tmp_list->data; ++ while (tmpBrowser) { ++ tmp_list = tmp_list->next; ++ gtk_widget_destroy(tmpBrowser->topLevelWindow); ++ tmpBrowser = (TestGtkBrowser *)tmp_list->data; ++ } ++} ++ ++gboolean ++delete_cb(GtkWidget *widget, GdkEventAny *event, TestGtkBrowser *browser) ++{ ++ g_print("delete_cb\n"); ++ gtk_widget_destroy(widget); ++ return TRUE; ++} ++ ++static gboolean ++idle_quit(void*) ++{ ++ gtk_main_quit(); ++ return FALSE; ++} ++ ++static gboolean ++idle_pop(void*) ++{ ++ gtk_moz_embed_pop_startup(); ++ return FALSE; ++} ++ ++void ++destroy_cb (GtkWidget *widget, TestGtkBrowser *browser) ++{ ++ GList *tmp_list; ++ g_print("destroy_cb\n"); ++ num_browsers--; ++ tmp_list = g_list_find(browser_list, browser); ++ browser_list = g_list_remove_link(browser_list, tmp_list); ++ if (browser->tempMessage) ++ g_free(browser->tempMessage); ++ g_idle_add(idle_pop, NULL); ++ if (num_browsers == 0) ++ g_idle_add (idle_quit, NULL); ++} ++ ++void ++location_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) ++{ ++ char *newLocation; ++ int newPosition = 0; ++ g_print("location_changed_cb\n"); ++ newLocation = gtk_moz_embed_get_location(embed); ++ if (newLocation) ++ { ++ gtk_editable_delete_text(GTK_EDITABLE(browser->urlEntry), 0, -1); ++ gtk_editable_insert_text(GTK_EDITABLE(browser->urlEntry), ++ newLocation, strlen(newLocation), &newPosition); ++ g_free(newLocation); ++ } ++ else ++ g_print("failed to get location!\n"); ++ // always make sure to clear the tempMessage. it might have been ++ // set from the link before a click and we wouldn't have gotten the ++ // callback to unset it. ++ update_temp_message(browser, 0); ++ // update the nav buttons on a location change ++ update_nav_buttons(browser); ++} ++ ++void ++title_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) ++{ ++ char *newTitle; ++ g_print("title_changed_cb\n"); ++ newTitle = gtk_moz_embed_get_title(embed); ++ if (newTitle) ++ { ++ gtk_window_set_title(GTK_WINDOW(browser->topLevelWindow), newTitle); ++ g_free(newTitle); ++ } ++ ++} ++ ++void ++load_started_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) ++{ ++ g_print("load_started_cb\n"); ++ gtk_widget_set_sensitive(browser->stopButton, TRUE); ++ gtk_widget_set_sensitive(browser->reloadButton, FALSE); ++ browser->loadPercent = 0; ++ browser->bytesLoaded = 0; ++ browser->maxBytesLoaded = 0; ++ update_status_bar_text(browser); ++} ++ ++void ++load_finished_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) ++{ ++ g_print("load_finished_cb\n"); ++ gtk_widget_set_sensitive(browser->stopButton, FALSE); ++ gtk_widget_set_sensitive(browser->reloadButton, TRUE); ++ browser->loadPercent = 0; ++ browser->bytesLoaded = 0; ++ browser->maxBytesLoaded = 0; ++ update_status_bar_text(browser); ++ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(browser->progressBar), 0); ++} ++ ++ ++void ++net_state_change_cb (GtkMozEmbed *embed, gint flags, guint status, ++ TestGtkBrowser *browser) ++{ ++ g_print("net_state_change_cb %d\n", flags); ++ if (flags & GTK_MOZ_EMBED_FLAG_IS_REQUEST) { ++ if (flags & GTK_MOZ_EMBED_FLAG_REDIRECTING) ++ browser->statusMessage = "Redirecting to site..."; ++ else if (flags & GTK_MOZ_EMBED_FLAG_TRANSFERRING) ++ browser->statusMessage = "Transferring data from site..."; ++ else if (flags & GTK_MOZ_EMBED_FLAG_NEGOTIATING) ++ browser->statusMessage = "Waiting for authorization..."; ++ } ++ ++ if (status == GTK_MOZ_EMBED_STATUS_FAILED_DNS) ++ browser->statusMessage = "Site not found."; ++ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_CONNECT) ++ browser->statusMessage = "Failed to connect to site."; ++ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_TIMEOUT) ++ browser->statusMessage = "Failed due to connection timeout."; ++ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_USERCANCELED) ++ browser->statusMessage = "User canceled connecting to site."; ++ ++ if (flags & GTK_MOZ_EMBED_FLAG_IS_DOCUMENT) { ++ if (flags & GTK_MOZ_EMBED_FLAG_START) ++ browser->statusMessage = "Loading site..."; ++ else if (flags & GTK_MOZ_EMBED_FLAG_STOP) ++ browser->statusMessage = "Done."; ++ } ++ ++ update_status_bar_text(browser); ++ ++} ++ ++void net_state_change_all_cb (GtkMozEmbed *embed, const char *uri, ++ gint flags, guint status, ++ TestGtkBrowser *browser) ++{ ++ // g_print("net_state_change_all_cb %s %d %d\n", uri, flags, status); ++} ++ ++void progress_change_cb (GtkMozEmbed *embed, gint cur, gint max, ++ TestGtkBrowser *browser) ++{ ++ g_print("progress_change_cb cur %d max %d\n", cur, max); ++ ++ // avoid those pesky divide by zero errors ++ if (max < 1) ++ { ++ browser->loadPercent = 0; ++ browser->bytesLoaded = cur; ++ browser->maxBytesLoaded = 0; ++ update_status_bar_text(browser); ++ } ++ else ++ { ++ browser->bytesLoaded = cur; ++ browser->maxBytesLoaded = max; ++ if (cur > max) ++ browser->loadPercent = 100; ++ else ++ browser->loadPercent = (cur * 100) / max; ++ update_status_bar_text(browser); ++ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(browser->progressBar), ++ browser->loadPercent / 100.0); ++ } ++ ++} ++ ++void progress_change_all_cb (GtkMozEmbed *embed, const char *uri, ++ gint cur, gint max, ++ TestGtkBrowser *browser) ++{ ++ //g_print("progress_change_all_cb %s cur %d max %d\n", uri, cur, max); ++} ++ ++void ++link_message_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) ++{ ++ char *message; ++ g_print("link_message_cb\n"); ++ message = gtk_moz_embed_get_link_message(embed); ++ if (!message || !*message) ++ update_temp_message(browser, 0); ++ else ++ update_temp_message(browser, message); ++ if (message) ++ g_free(message); ++} ++ ++void ++js_status_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) ++{ ++ char *message; ++ g_print("js_status_cb\n"); ++ message = gtk_moz_embed_get_js_status(embed); ++ if (!message || !*message) ++ update_temp_message(browser, 0); ++ else ++ update_temp_message(browser, message); ++ if (message) ++ g_free(message); ++} ++ ++void ++new_window_cb (GtkMozEmbed *embed, GtkMozEmbed **newEmbed, guint chromemask, TestGtkBrowser *browser) ++{ ++ g_print("new_window_cb\n"); ++ g_print("embed is %p chromemask is %d\n", (void *)embed, chromemask); ++ TestGtkBrowser *newBrowser = new_gtk_browser(chromemask); ++ gtk_widget_set_size_request(newBrowser->mozEmbed, 400, 400); ++ *newEmbed = GTK_MOZ_EMBED(newBrowser->mozEmbed); ++ g_print("new browser is %p\n", (void *)*newEmbed); ++} ++ ++void ++visibility_cb (GtkMozEmbed *embed, gboolean visibility, TestGtkBrowser *browser) ++{ ++ g_print("visibility_cb %d\n", visibility); ++ set_browser_visibility(browser, visibility); ++} ++ ++void ++destroy_brsr_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) ++{ ++ g_print("destroy_brsr_cb\n"); ++ gtk_widget_destroy(browser->topLevelWindow); ++} ++ ++gint ++open_uri_cb (GtkMozEmbed *embed, const char *uri, TestGtkBrowser *browser) ++{ ++ g_print("open_uri_cb %s\n", uri); ++ ++ // interrupt this test load ++ if (!strcmp(uri, "http://people.redhat.com/blizzard/monkeys.txt")) ++ return TRUE; ++ // don't interrupt anything ++ return FALSE; ++} ++ ++void ++size_to_cb (GtkMozEmbed *embed, gint width, gint height, ++ TestGtkBrowser *browser) ++{ ++ g_print("*** size_to_cb %d %d\n", width, height); ++ gtk_widget_set_size_request(browser->mozEmbed, width, height); ++} ++ ++gint dom_key_down_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, ++ TestGtkBrowser *browser) ++{ ++ PRUint32 keyCode = 0; ++ // g_print("dom_key_down_cb\n"); ++ event->GetKeyCode(&keyCode); ++ // g_print("key code is %d\n", keyCode); ++ return NS_OK; ++} ++ ++gint dom_key_press_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, ++ TestGtkBrowser *browser) ++{ ++ PRUint32 keyCode = 0; ++ // g_print("dom_key_press_cb\n"); ++ event->GetCharCode(&keyCode); ++ // g_print("char code is %d\n", keyCode); ++ return NS_OK; ++} ++ ++gint dom_key_up_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, ++ TestGtkBrowser *browser) ++{ ++ PRUint32 keyCode = 0; ++ // g_print("dom_key_up_cb\n"); ++ event->GetKeyCode(&keyCode); ++ // g_print("key code is %d\n", keyCode); ++ return NS_OK; ++} ++ ++gint dom_mouse_down_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser) ++{ ++ // g_print("dom_mouse_down_cb\n"); ++ return NS_OK; ++ } ++ ++gint dom_mouse_up_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser) ++{ ++ // g_print("dom_mouse_up_cb\n"); ++ return NS_OK; ++} ++ ++gint dom_mouse_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser) ++{ ++ // g_print("dom_mouse_click_cb\n"); ++ PRUint16 button; ++ event->GetButton(&button); ++ printf("button was %d\n", button); ++ return NS_OK; ++} ++ ++gint dom_mouse_dbl_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser) ++{ ++ // g_print("dom_mouse_dbl_click_cb\n"); ++ return NS_OK; ++} ++ ++gint dom_mouse_over_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser) ++{ ++ //g_print("dom_mouse_over_cb\n"); ++ return NS_OK; ++} ++ ++gint dom_mouse_out_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, ++ TestGtkBrowser *browser) ++{ ++ //g_print("dom_mouse_out_cb\n"); ++ return NS_OK; ++} ++ ++gint dom_activate_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, ++ TestGtkBrowser *browser) ++{ ++ //g_print("dom_activate_cb\n"); ++ return NS_OK; ++} ++ ++gint dom_focus_in_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, ++ TestGtkBrowser *browser) ++{ ++ //g_print("dom_focus_in_cb\n"); ++ return NS_OK; ++} ++ ++gint dom_focus_out_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, ++ TestGtkBrowser *browser) ++{ ++ //g_print("dom_focus_out_cb\n"); ++ return NS_OK; ++} ++ ++void new_window_orphan_cb (GtkMozEmbedSingle *embed, ++ GtkMozEmbed **retval, guint chromemask, ++ gpointer data) ++{ ++ g_print("new_window_orphan_cb\n"); ++ g_print("chromemask is %d\n", chromemask); ++ TestGtkBrowser *newBrowser = new_gtk_browser(chromemask); ++ *retval = GTK_MOZ_EMBED(newBrowser->mozEmbed); ++ g_print("new browser is %p\n", (void *)*retval); ++} ++ ++// utility functions ++ ++void ++update_status_bar_text(TestGtkBrowser *browser) ++{ ++ gchar message[256]; ++ ++ gtk_statusbar_pop(GTK_STATUSBAR(browser->statusBar), 1); ++ if (browser->tempMessage) ++ gtk_statusbar_push(GTK_STATUSBAR(browser->statusBar), 1, browser->tempMessage); ++ else ++ { ++ if (browser->loadPercent) ++ { ++ g_snprintf(message, 255, "%s (%d%% complete, %d bytes of %d loaded)", browser->statusMessage, browser->loadPercent, browser->bytesLoaded, browser->maxBytesLoaded); ++ } ++ else if (browser->bytesLoaded) ++ { ++ g_snprintf(message, 255, "%s (%d bytes loaded)", browser->statusMessage, browser->bytesLoaded); ++ } ++ else if (browser->statusMessage == NULL) ++ { ++ g_snprintf(message, 255, " "); ++ } ++ else ++ { ++ g_snprintf(message, 255, "%s", browser->statusMessage); ++ } ++ gtk_statusbar_push(GTK_STATUSBAR(browser->statusBar), 1, message); ++ } ++} ++ ++void ++update_temp_message(TestGtkBrowser *browser, const char *message) ++{ ++ if (browser->tempMessage) ++ g_free(browser->tempMessage); ++ if (message) ++ browser->tempMessage = g_strdup(message); ++ else ++ browser->tempMessage = 0; ++ // now that we've updated the temp message, redraw the status bar ++ update_status_bar_text(browser); ++} ++ ++ ++void ++update_nav_buttons (TestGtkBrowser *browser) ++{ ++ gboolean can_go_back; ++ gboolean can_go_forward; ++ can_go_back = gtk_moz_embed_can_go_back(GTK_MOZ_EMBED(browser->mozEmbed)); ++ can_go_forward = gtk_moz_embed_can_go_forward(GTK_MOZ_EMBED(browser->mozEmbed)); ++ if (can_go_back) ++ gtk_widget_set_sensitive(browser->backButton, TRUE); ++ else ++ gtk_widget_set_sensitive(browser->backButton, FALSE); ++ if (can_go_forward) ++ gtk_widget_set_sensitive(browser->forwardButton, TRUE); ++ else ++ gtk_widget_set_sensitive(browser->forwardButton, FALSE); ++ } ++ +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-06-22 12:14:58.831816633 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-06-22 12:14:58.831816633 +0200 +@@ -0,0 +1,142 @@ ++/** simplemdi.c **/ ++/* ++ * Sample code from "GNOME/GTK+ Programming Bible" by Arthur Griffith ++ * Modified by Kevin Gibbs (kgibbs@stanford.edu) to provide sample of ++ * GtkMozEmbed realization/unrealization crashes. ++ * ++ * To get a fatal crash, simply run the program, click on the "Mozilla" ++ * tab to display the MozEmbed widget, and then try to drag that MDI tab ++ * off to a new window. ++ * ++ * Although this test might seem elaborate, it is really only a convenient ++ * to create a situation where the widget is realized, unrealized, and ++ * realized again at some point. (Dragging the MDI tab off to a new window ++ * causes all widgets to be unrealized in the old window, and then realized ++ * again in the new window.) ++ */ ++ ++#include ++#include "gtkmozembed.h" ++ ++// Testing flags ++// ++ ++// Define this flag to have the test program use the gtkmozembed widget. ++// Without this flag, mozilla is never loaded in the program, and a simple ++// widget is used in place of the mozembed widget. ++#define USE_MOZILLA_TEST ++ ++// Define this flag to have a simpler test than the usual one. The normal ++// test builds a notebook inside of each MDI view, with one page being a label ++// and the other page being a browser widget. The simpler test does not ++// build a notebook and simply puts the browser widget in the MDI view itself. ++// Currently, this test is not very interesting, since for some reason all ++// the webshells just create and destroy themselves. (???) ++//#define SIMPLER_TEST ++ ++// Define this flag to use a GnomePixmap instead of a GtkLabel as the ++// replacement for the gtkmozembed widget when USE_MOZILLA_TEST is ++// undefined. This is to stress test the program a bit more by providing a ++// replacement widget slightly more complex than GtkLabel. ++// (Has no effect when USE_MOZILLA_TEST is defined.) ++#define SAMPLE_PIXMAP ++ ++ ++gint eventDelete(GtkWidget *widget, ++ GdkEvent *event,gpointer data); ++gint eventDestroy(GtkWidget *widget, ++ GdkEvent *event,gpointer data); ++ ++static void addChild(GtkObject *mdi,gchar *name); ++static GtkWidget *setLabel(GnomeMDIChild *child, ++ GtkWidget *currentLabel,gpointer data); ++static GtkWidget *createView(GnomeMDIChild *child, ++ gpointer data); ++ ++int main(int argc,char *argv[]) ++{ ++ GtkObject *mdi; ++ ++ gnome_init("simplemdi","1.0",argc,argv); ++ mdi = gnome_mdi_new("simplemdi","Simple MDI"); ++ gtk_signal_connect(mdi,"destroy", ++ GTK_SIGNAL_FUNC(eventDestroy),NULL); ++ ++ addChild(mdi,"First"); ++ addChild(mdi,"Second"); ++ addChild(mdi,"Third"); ++ addChild(mdi,"Last"); ++ ++ gnome_mdi_set_mode(GNOME_MDI(mdi),GNOME_MDI_NOTEBOOK); ++ //gnome_mdi_open_toplevel(GNOME_MDI(mdi)); ++ ++ gtk_main(); ++ exit(0); ++} ++static void addChild(GtkObject *mdi,gchar *name) ++{ ++ GnomeMDIGenericChild *child; ++ ++ child = gnome_mdi_generic_child_new(name); ++ gnome_mdi_add_child(GNOME_MDI(mdi), ++ GNOME_MDI_CHILD(child)); ++ ++ gnome_mdi_generic_child_set_view_creator(child, ++ createView,name); ++ gnome_mdi_generic_child_set_label_func(child,setLabel, ++ NULL); ++ gnome_mdi_add_view(GNOME_MDI(mdi), ++ GNOME_MDI_CHILD(child)); ++} ++static GtkWidget *createView(GnomeMDIChild *child, ++ gpointer data) ++{ ++#ifdef USE_MOZILLA_TEST ++ GtkWidget *browser = gtk_moz_embed_new(); ++#else ++#ifndef SAMPLE_PIXMAP ++ GtkWidget *browser = gtk_label_new("lynx 0.01a"); ++#else ++ /* Another example -- */ ++ GtkWidget *browser = ++ gnome_pixmap_new_from_file("/usr/share/pixmaps/emacs.png"); ++#endif /* SAMPLE_PIXMAP */ ++#endif /* USE_MOZILLA_TEST */ ++ ++ GtkWidget *notebook = gtk_notebook_new(); ++ char str[80]; ++ ++ sprintf(str,"View of the\n%s widget",(gchar *)data); ++ ++#ifdef USE_MOZILLA_TEST ++ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser), "http://www.mozilla.org"); ++#endif /* USE_MOZILLA_TEST */ ++ ++#ifndef SIMPLER_TEST ++ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), gtk_label_new(str), ++ gtk_label_new("Label")); ++ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), browser, ++ gtk_label_new("Mozilla")); ++ gtk_widget_show_all(notebook); ++ return (notebook); ++#else ++ gtk_widget_show(browser); ++ return (browser); ++#endif /* SIMPLER_TEST */ ++} ++ ++static GtkWidget *setLabel(GnomeMDIChild *child, ++ GtkWidget *currentLabel,gpointer data) ++{ ++ if(currentLabel == NULL) ++ return(gtk_label_new(child->name)); ++ ++ gtk_label_set_text(GTK_LABEL(currentLabel), ++ child->name); ++ return(currentLabel); ++} ++gint eventDestroy(GtkWidget *widget, ++ GdkEvent *event,gpointer data) { ++ gtk_main_quit(); ++ return(0); ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-06-22 12:14:58.832816638 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-06-22 12:14:58.832816638 +0200 +@@ -0,0 +1,86 @@ ++#include ++#include ++#include ++#include "nsStringAPI.h" ++#include "gtkmozembed_glue.cpp" ++ ++int main(int argc, char *argv[]) ++{ ++ GtkWidget *window; ++ GtkWidget *label; ++ GtkWidget *mozembed; ++ GtkWidget *container; ++ char *url; ++ ++ gtk_init(&argc, &argv); ++ ++ static const GREVersionRange greVersion = { ++ "1.9a", PR_TRUE, ++ "2", PR_TRUE ++ }; ++ ++ char xpcomPath[PATH_MAX]; ++ ++ nsresult rv = ++ GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, ++ xpcomPath, sizeof(xpcomPath)); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't find a compatible GRE.\n"); ++ return 1; ++ } ++ ++ rv = XPCOMGlueStartup(xpcomPath); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't start XPCOM."); ++ return 1; ++ } ++ ++ rv = GTKEmbedGlueStartup(); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); ++ return 1; ++ } ++ ++ char *lastSlash = strrchr(xpcomPath, '/'); ++ if (lastSlash) ++ *lastSlash = '\0'; ++ ++ gtk_moz_embed_set_path(xpcomPath); ++ ++ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ++ ++ container = gtk_notebook_new(); ++ mozembed = gtk_moz_embed_new(); ++ label = gtk_label_new("Can you see this message?\n" ++ "Once you switch to mozembed page " ++ "you never see this message."); ++ ++ g_signal_connect(GTK_OBJECT(mozembed), "destroy", ++ G_CALLBACK(gtk_main_quit), ++NULL); ++ ++ gtk_container_add(GTK_CONTAINER(window), container); ++ ++ gtk_notebook_append_page(GTK_NOTEBOOK(container), ++ label, ++ gtk_label_new("gtk label")); ++ ++ gtk_notebook_append_page(GTK_NOTEBOOK(container), ++ mozembed, ++ gtk_label_new("mozembed")); ++ ++ ++ ++ ++ gtk_widget_set_size_request(window, 400, 300); ++ gtk_widget_show(mozembed); ++ gtk_widget_show(label); ++ gtk_widget_show_all(window); ++ ++ url = (argc > 1) ? argv[1] : (char *)"localhost"; ++ gtk_moz_embed_load_url(GTK_MOZ_EMBED(mozembed), url); ++ ++ gtk_main(); ++ ++ return 0; ++} +diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp +--- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-06-22 12:14:58.833816643 +0200 ++++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-06-22 12:14:58.833816643 +0200 +@@ -0,0 +1,109 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Christopher Blizzard. ++ * Portions created by the Initial Developer are Copyright (C) 2001 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Blizzard ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++GtkWidget *toplevel_window = 0; ++GtkWidget *button = 0; ++GtkWidget *vbox = 0; ++GtkWidget *gtk_socket = 0; ++ ++void ++insert_mozilla(gpointer data); ++ ++int ++main(int argc, char **argv) ++{ ++ gtk_init(&argc, &argv); ++ ++ toplevel_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ++ ++ g_signal_connect(GTK_OBJECT(toplevel_window), "destroy", ++ G_CALLBACK(exit), NULL); ++ ++ vbox = gtk_vbox_new(FALSE, 0); ++ gtk_container_add(GTK_CONTAINER(toplevel_window), vbox); ++ gtk_widget_show(vbox); ++ ++ button = gtk_button_new_with_label("Insert Mozilla"); ++ ++ gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); ++ gtk_widget_show(button); ++ ++ g_signal_connect(GTK_OBJECT(button), "clicked", ++ G_CALLBACK(insert_mozilla), NULL); ++ ++ gtk_widget_show(toplevel_window); ++ ++ gtk_main(); ++ ++ return 0; ++} ++ ++void ++insert_mozilla(gpointer data) ++{ ++ char buffer[20]; ++ int pid; ++ ++ if (gtk_socket) ++ return; ++ ++ gtk_socket = gtk_socket_new(); ++ gtk_box_pack_start(GTK_BOX(vbox), gtk_socket, TRUE, TRUE, 0); ++ gtk_widget_show(gtk_socket); ++ ++ sprintf(buffer, "%#lx", GDK_WINDOW_XWINDOW(gtk_socket->window)); ++ ++ gdk_flush(); ++ ++ if ((pid = fork()) == 0) { /* child */ ++ execl("./TestGtkEmbedChild", "./TestGtkEmbedChild", buffer, NULL); ++ fprintf(stderr, "can't exec child\n"); ++ _exit(1); ++ } ++ else if (pid > 0) { /* parent */ ++ } ++ else { ++ fprintf(stderr, "Can't fork.\n"); ++ } ++} +diff -up xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in +--- xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed 2011-06-15 23:58:10.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in 2011-06-22 12:19:35.677237033 +0200 +@@ -77,6 +77,8 @@ CPPSRCS += dlldeps-xul.cpp + endif + + ifneq (,$(MOZ_ENABLE_GTK2)) ++SHARED_LIBRARY_LIBS += \ ++ $(DEPTH)/embedding/browser/gtk/src/$(LIB_PREFIX)gtkembedmoz.$(LIB_SUFFIX) + DEFINES += -DMOZ_ENABLE_GTK2 + endif + +diff -up xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh +--- xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-06-15 23:58:10.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh 2011-06-22 12:14:58.837816663 +0200 +@@ -554,6 +554,9 @@ MAKEFILES_embedding=" + embedding/browser/activex/src/plugin/Makefile + embedding/browser/build/Makefile + embedding/browser/webBrowser/Makefile ++ embedding/browser/gtk/Makefile ++ embedding/browser/gtk/src/Makefile ++ embedding/browser/gtk/tests/Makefile + embedding/components/Makefile + embedding/components/appstartup/Makefile + embedding/components/appstartup/src/Makefile +diff -up xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk +--- xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed 2011-06-15 23:57:56.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk 2011-06-22 12:18:01.539746305 +0200 +@@ -234,6 +234,12 @@ endif + + tier_platform_dirs += services/crypto/component + ++ifndef BUILD_STATIC_LIBS ++ifneq (,$(MOZ_ENABLE_GTK2)) ++tier_platform_dirs += embedding/browser/gtk ++endif ++endif ++ + ifdef MOZ_ENABLE_LIBXUL + tier_platform_dirs += startupcache + endif +@@ -286,4 +292,3 @@ tier_platform_dirs += testing/xpcshell + tier_platform_dirs += testing/mozmill + tier_platform_dirs += testing/tools/screenshot + endif +- diff --git a/xulrunner.spec b/xulrunner.spec index 0d4c456..7b76d01 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 5.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -78,6 +78,7 @@ Patch9: mozilla-build-sbrk.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch Patch15: firefox-5.0-xulstub.patch +Patch16: add-gtkmozembed.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -204,6 +205,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types %patch15 -p1 -R -b .xulstub +%patch16 -p2 -b .gtkmozembed %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo @@ -475,6 +477,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 22 2011 Martin Stransky 5.0-2 +- Reverted mozbz#648156 - Remove gtkmozembed + * Tue Jun 21 2011 Martin Stransky 5.0-1 - 5.0 From 083b75fdc9394f3b183312e85f8e5006cbc0c791 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 24 Jun 2011 11:13:01 +0200 Subject: [PATCH 182/486] libCurl build fix --- xulrunner-5.0-curl.patch | 44 ++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 15 +++++++++++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 xulrunner-5.0-curl.patch diff --git a/xulrunner-5.0-curl.patch b/xulrunner-5.0-curl.patch new file mode 100644 index 0000000..6d40aa5 --- /dev/null +++ b/xulrunner-5.0-curl.patch @@ -0,0 +1,44 @@ +diff -up xulrunner-5.0/mozilla-release/config/system-headers.old xulrunner-5.0/mozilla-release/config/system-headers +--- xulrunner-5.0/mozilla-release/config/system-headers.old 2011-06-15 23:57:19.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/config/system-headers 2011-06-24 11:03:04.725787684 +0200 +@@ -207,7 +207,6 @@ ctime + ctype.h + curl/curl.h + curl/easy.h +-curl/types.h + curses.h + cxxabi.h + DateTimeUtils.h +diff -up xulrunner-5.0/mozilla-release/js/src/config/system-headers.old xulrunner-5.0/mozilla-release/js/src/config/system-headers +--- xulrunner-5.0/mozilla-release/js/src/config/system-headers.old 2011-06-15 23:57:28.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/js/src/config/system-headers 2011-06-24 11:05:09.305688350 +0200 +@@ -207,7 +207,6 @@ ctime + ctype.h + curl/curl.h + curl/easy.h +-curl/types.h + curses.h + cxxabi.h + DateTimeUtils.h +diff -up xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc.old xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc +--- xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc.old 2011-06-15 23:57:55.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc 2011-06-24 11:02:26.854732204 +0200 +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + + namespace { + +diff -up xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc.old xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc +--- xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc.old 2011-06-15 23:57:55.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc 2011-06-24 11:02:08.801845273 +0200 +@@ -29,7 +29,6 @@ + + #include + #include +-#include + #include + + #include diff --git a/xulrunner.spec b/xulrunner.spec index 7b76d01..92daa45 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 5.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -78,7 +78,12 @@ Patch9: mozilla-build-sbrk.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch Patch15: firefox-5.0-xulstub.patch +%if 0%{?fedora} <= 15 Patch16: add-gtkmozembed.patch +%endif +%if 0%{?fedora} > 15 +Patch17: xulrunner-5.0-curl.patch +%endif # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -205,7 +210,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types %patch15 -p1 -R -b .xulstub +%if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed +%endif +%if 0%{?fedora} > 15 +%patch17 -p2 -b .curl +%endif %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo @@ -477,6 +487,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 21 2011 Martin Stransky 5.0-3 +- libCurl build fix + * Wed Jun 22 2011 Martin Stransky 5.0-2 - Reverted mozbz#648156 - Remove gtkmozembed From 181c5a7b48a137f56dddad73c2f99933b26bb4c9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 24 Jun 2011 11:31:49 +0200 Subject: [PATCH 183/486] added libcurl patch --- xulrunner-5.0-curl.patch | 44 ++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 22 ++++++++++++++++++-- 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 xulrunner-5.0-curl.patch diff --git a/xulrunner-5.0-curl.patch b/xulrunner-5.0-curl.patch new file mode 100644 index 0000000..6d40aa5 --- /dev/null +++ b/xulrunner-5.0-curl.patch @@ -0,0 +1,44 @@ +diff -up xulrunner-5.0/mozilla-release/config/system-headers.old xulrunner-5.0/mozilla-release/config/system-headers +--- xulrunner-5.0/mozilla-release/config/system-headers.old 2011-06-15 23:57:19.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/config/system-headers 2011-06-24 11:03:04.725787684 +0200 +@@ -207,7 +207,6 @@ ctime + ctype.h + curl/curl.h + curl/easy.h +-curl/types.h + curses.h + cxxabi.h + DateTimeUtils.h +diff -up xulrunner-5.0/mozilla-release/js/src/config/system-headers.old xulrunner-5.0/mozilla-release/js/src/config/system-headers +--- xulrunner-5.0/mozilla-release/js/src/config/system-headers.old 2011-06-15 23:57:28.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/js/src/config/system-headers 2011-06-24 11:05:09.305688350 +0200 +@@ -207,7 +207,6 @@ ctime + ctype.h + curl/curl.h + curl/easy.h +-curl/types.h + curses.h + cxxabi.h + DateTimeUtils.h +diff -up xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc.old xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc +--- xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc.old 2011-06-15 23:57:55.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc 2011-06-24 11:02:26.854732204 +0200 +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + + namespace { + +diff -up xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc.old xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc +--- xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc.old 2011-06-15 23:57:55.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc 2011-06-24 11:02:08.801845273 +0200 +@@ -29,7 +29,6 @@ + + #include + #include +-#include + #include + + #include diff --git a/xulrunner.spec b/xulrunner.spec index ccb2de9..3732a49 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 5.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -78,6 +78,12 @@ Patch9: mozilla-build-sbrk.patch Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch Patch15: firefox-5.0-xulstub.patch +%if 0%{?fedora} <= 15 +Patch16: add-gtkmozembed.patch +%endif +%if 0%{?fedora} > 15 +Patch17: xulrunner-5.0-curl.patch +%endif # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -204,6 +210,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch13 -p2 -b .secondary-jit %patch14 -p2 -b .chromium-types %patch15 -p1 -R -b .xulstub +%if 0%{?fedora} <= 15 +%patch16 -p2 -b .gtkmozembed +%endif +%if 0%{?fedora} > 15 +%patch17 -p2 -b .curl +%endif %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo @@ -475,7 +487,13 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Jun 21 2011 Martin Stransky 5.0-2 +* Tue Jun 21 2011 Martin Stransky 5.0-3 +- libCurl build fix + +* Wed Jun 22 2011 Martin Stransky 5.0-2 +- Reverted mozbz#648156 - Remove gtkmozembed + +* Tue Jun 21 2011 Martin Stransky 5.0-1 - 5.0 * Thu May 26 2011 Martin Stransky 2.0.1-2 From 6784b47c312e5587e0d8b8899bcbd41ae78f306d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 24 Jun 2011 11:36:45 +0200 Subject: [PATCH 184/486] changelog fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 3732a49..a2e515f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -487,7 +487,7 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Jun 21 2011 Martin Stransky 5.0-3 +* Tue Jun 24 2011 Martin Stransky 5.0-3 - libCurl build fix * Wed Jun 22 2011 Martin Stransky 5.0-2 From dc36f804a383af50ef94be068295b69c6b8dd12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 28 Jun 2011 16:15:23 +0200 Subject: [PATCH 185/486] fix build on secondary arches with IPC enabled --- xulrunner-5.0-secondary-ipc.patch | 55 +++++++++++++++++++++++++++++++ xulrunner.spec | 17 ++++------ 2 files changed, 62 insertions(+), 10 deletions(-) create mode 100644 xulrunner-5.0-secondary-ipc.patch diff --git a/xulrunner-5.0-secondary-ipc.patch b/xulrunner-5.0-secondary-ipc.patch new file mode 100644 index 0000000..9286ea4 --- /dev/null +++ b/xulrunner-5.0-secondary-ipc.patch @@ -0,0 +1,55 @@ +diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc +--- xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-06-15 17:57:27.000000000 -0400 ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc 2011-06-28 06:25:37.505230834 -0400 +@@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path + bool DataPack::Get(uint32_t resource_id, StringPiece* data) { + // It won't be hard to make this endian-agnostic, but it's not worth + // bothering to do right now. +-#if defined(__BYTE_ORDER) +- // Linux check +- COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN, +- datapack_assumes_little_endian); +-#elif defined(__BIG_ENDIAN__) +- // Mac check +- #error DataPack assumes little endian +-#endif ++#warning DoTheRightThingMakingThisEndianAgnostic! + + DataPackEntry* target = reinterpret_cast( + bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_, +diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h +--- xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-06-15 17:57:27.000000000 -0400 ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h 2011-06-28 06:25:37.505230834 -0400 +@@ -60,6 +60,20 @@ + #elif defined(__ppc__) + #define ARCH_CPU_PPC 1 + #define ARCH_CPU_32_BITS 1 ++#elif defined(__ppc64__) ++#define ARCH_CPU_PPC64 1 ++#define ARCH_CPU_64_BITS 1 ++#elif defined(__s390__) && !defined(__s390x__) ++#define ARCH_CPU_S390 1 ++#elif defined(__s390x__) ++#define ARCH_CPU_S390X 1 ++#define ARCH_CPU_64_BITS 1 ++#elif defined(__sparc__) && !defined(__arch64) ++#define ARCH_CPU_SPARC 1 ++#define ARCH_CPU_32_BITS 1 ++#elif defined(__sparc__) && defined(__arch64) ++#define ARCH_CPU_SPARC64 1 ++#define ARCH_CPU_64_BITS 1 + #else + #error Please add support for your architecture in build/build_config.h + #endif +diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h +--- xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-06-28 06:40:19.355238742 -0400 ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-06-28 06:46:20.205237879 -0400 +@@ -219,7 +219,7 @@ struct ParamTraits { + } + }; + +-#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))) ++#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390)))) + // There size_t is a synonym for |unsigned long| ... + template <> + struct ParamTraits { diff --git a/xulrunner.spec b/xulrunner.spec index a2e515f..6db22f4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -19,13 +19,11 @@ %global tarballdir mozilla-release %global gre_dir %{_sysconfdir}/gre.d -# crash reporter and out-of-process-plugins work only on x86/x86_64 +# crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 %global enable_mozilla_crashreporter 1 -%global moz_out_of_process_plugins 1 %else %global enable_mozilla_crashreporter 0 -%global moz_out_of_process_plugins 0 %endif %if %{__isa_bits} == 32 @@ -60,7 +58,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 5.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -84,6 +82,7 @@ Patch16: add-gtkmozembed.patch %if 0%{?fedora} > 15 Patch17: xulrunner-5.0-curl.patch %endif +Patch18: xulrunner-5.0-secondary-ipc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -216,6 +215,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %if 0%{?fedora} > 15 %patch17 -p2 -b .curl %endif +%patch18 -p2 -b .secondary-ipc %patch20 -p2 -b .pk %patch21 -p2 -b .jpeg-turbo @@ -234,10 +234,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %{__cat} %{SOURCE11} >> .mozconfig %endif -%if !%{?moz_out_of_process_plugins} -echo "ac_add_options --disable-ipc" >> .mozconfig -%endif - # Upstream bug filed without resolution # for now make sure jit is not enabled on sparc64 %ifarch sparc64 @@ -463,9 +459,7 @@ fi %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf -%if %{?moz_out_of_process_plugins} %{mozappdir}/plugin-container -%endif %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter @@ -487,6 +481,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 28 2011 Dan Horák - 5.0-4 +- fix build on secondary arches with IPC enabled + * Tue Jun 24 2011 Martin Stransky 5.0-3 - libCurl build fix From 1b303d1e2c238e1c87658f5e4b8f054a3713f702 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 30 Jun 2011 09:20:09 +0200 Subject: [PATCH 186/486] Fixed build on powerpc(64) --- xulrunner-5.0-secondary-ipc.patch | 29 +++++++++++++++++------------ xulrunner.spec | 5 ++++- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/xulrunner-5.0-secondary-ipc.patch b/xulrunner-5.0-secondary-ipc.patch index 9286ea4..dfe95a5 100644 --- a/xulrunner-5.0-secondary-ipc.patch +++ b/xulrunner-5.0-secondary-ipc.patch @@ -1,6 +1,6 @@ diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc ---- xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-06-15 17:57:27.000000000 -0400 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc 2011-06-28 06:25:37.505230834 -0400 +--- xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc 2011-06-29 11:37:06.984946864 +0200 @@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path bool DataPack::Get(uint32_t resource_id, StringPiece* data) { // It won't be hard to make this endian-agnostic, but it's not worth @@ -18,20 +18,25 @@ diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.second DataPackEntry* target = reinterpret_cast( bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_, diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h ---- xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-06-15 17:57:27.000000000 -0400 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h 2011-06-28 06:25:37.505230834 -0400 -@@ -60,6 +60,20 @@ - #elif defined(__ppc__) - #define ARCH_CPU_PPC 1 +--- xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h 2011-06-29 11:44:13.924217693 +0200 +@@ -57,9 +57,24 @@ + #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 -+#elif defined(__ppc64__) + #define WCHAR_T_IS_UNSIGNED 1 +-#elif defined(__ppc__) ++#elif defined(__powerpc64__) +#define ARCH_CPU_PPC64 1 +#define ARCH_CPU_64_BITS 1 -+#elif defined(__s390__) && !defined(__s390x__) -+#define ARCH_CPU_S390 1 ++#elif defined(__powerpc__) + #define ARCH_CPU_PPC 1 + #define ARCH_CPU_32_BITS 1 +#elif defined(__s390x__) +#define ARCH_CPU_S390X 1 +#define ARCH_CPU_64_BITS 1 ++#elif defined(__s390__) ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_32_BITS 1 +#elif defined(__sparc__) && !defined(__arch64) +#define ARCH_CPU_SPARC 1 +#define ARCH_CPU_32_BITS 1 @@ -42,8 +47,8 @@ diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.sec #error Please add support for your architecture in build/build_config.h #endif diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h ---- xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-06-28 06:40:19.355238742 -0400 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-06-28 06:46:20.205237879 -0400 +--- xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-06-29 11:37:06.987946885 +0200 @@ -219,7 +219,7 @@ struct ParamTraits { } }; diff --git a/xulrunner.spec b/xulrunner.spec index 6db22f4..fb3e784 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -58,7 +58,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 5.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -481,6 +481,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jun 30 2011 Martin Stransky 5.0-5 +- Fixed build on powerpc(64) + * Tue Jun 28 2011 Dan Horák - 5.0-4 - fix build on secondary arches with IPC enabled From 37ba0418d62b054e00707629ca2acc49e300857e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 30 Jun 2011 10:09:43 +0200 Subject: [PATCH 187/486] chromium_types.h patch fix for second arches --- xulrunner-2.0-chromium-types.patch | 34 ++++++++++++++++-------------- xulrunner-5.0-secondary-ipc.patch | 11 ++++++---- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch index 65dbc59..dfc82cc 100644 --- a/xulrunner-2.0-chromium-types.patch +++ b/xulrunner-2.0-chromium-types.patch @@ -1,31 +1,33 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=627669 +Bug 627669 - add support for s390(x) and ppc(64) -diff -up xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h ---- xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h.chromium-types 2010-11-04 21:05:47.000000000 +0100 -+++ xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h 2010-11-15 14:20:12.000000000 +0100 -@@ -64,6 +64,10 @@ typedef PRInt16 int16; - #define ARCH_CPU_PPC_FAMILY 1 - #define ARCH_CPU_PPC 1 +diff -up mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types mozilla-release/gfx/ycbcr/chromium_types.h +--- mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2011-06-15 23:57:26.000000000 +0200 ++++ mozilla-release/gfx/ycbcr/chromium_types.h 2011-06-30 10:04:25.105032221 +0200 +@@ -61,7 +61,11 @@ typedef PRInt16 int16; + #define ARCH_CPU_ARM_FAMILY 1 + #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 -+#elif defined(__ppc64__) +-#elif defined(__ppc__) || defined(__powerpc) || defined(__PPC__) ++#elif defined(__ppc64__) || defined(__powerpc64__) +#define ARCH_CPU_PPC_FAMILY 1 +#define ARCH_CPU_PPC 1 +#define ARCH_CPU_64_BITS 1 - #elif defined(__sparc) - #define ARCH_CPU_SPARC_FAMILY 1 - #define ARCH_CPU_SPARC 1 -@@ -72,6 +76,14 @@ typedef PRInt16 int16; ++#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) + #define ARCH_CPU_PPC_FAMILY 1 + #define ARCH_CPU_PPC 1 + #define ARCH_CPU_32_BITS 1 +@@ -73,6 +77,14 @@ typedef PRInt16 int16; #define ARCH_CPU_SPARC_FAMILY 1 #define ARCH_CPU_SPARC 1 #define ARCH_CPU_64_BITS 1 -+#elif defined(__s390__) -+#define ARCH_CPU_S390_FAMILY 1 -+#define ARCH_CPU_S390 1 -+#define ARCH_CPU_32_BITS 1 +#elif defined(__s390x__) +#define ARCH_CPU_S390_FAMILY 1 +#define ARCH_CPU_S390 1 +#define ARCH_CPU_64_BITS 1 ++#elif defined(__s390__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_32_BITS 1 #else #warning Please add support for your architecture in chromium_types.h #endif diff --git a/xulrunner-5.0-secondary-ipc.patch b/xulrunner-5.0-secondary-ipc.patch index dfe95a5..a64dc4e 100644 --- a/xulrunner-5.0-secondary-ipc.patch +++ b/xulrunner-5.0-secondary-ipc.patch @@ -1,6 +1,8 @@ +Bug 668460 - Adds IPC build config for s390(x) and powerpc(64) + diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc --- xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc 2011-06-29 11:37:06.984946864 +0200 ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc 2011-06-30 09:08:26.777844341 +0200 @@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path bool DataPack::Get(uint32_t resource_id, StringPiece* data) { // It won't be hard to make this endian-agnostic, but it's not worth @@ -19,7 +21,7 @@ diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.second bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_, diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h --- xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h 2011-06-29 11:44:13.924217693 +0200 ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h 2011-06-30 09:08:26.777844341 +0200 @@ -57,9 +57,24 @@ #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 @@ -48,12 +50,13 @@ diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.sec #endif diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h --- xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-06-29 11:37:06.987946885 +0200 -@@ -219,7 +219,7 @@ struct ParamTraits { ++++ xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-06-30 09:47:16.629029528 +0200 +@@ -219,7 +219,8 @@ struct ParamTraits { } }; -#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))) ++// Although s390 is a 32-bit system it defines size_t as unsigned long +#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390)))) // There size_t is a synonym for |unsigned long| ... template <> From e1e5499faf81fa08f448ed36b601cdb626eb8f5e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 30 Jun 2011 10:11:57 +0200 Subject: [PATCH 188/486] chromium_types.h patch fix for second arches - fixed patch path --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index fb3e784..8bbcb08 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -207,7 +207,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch1 -p2 -b .build %patch9 -p2 -b .sbrk %patch13 -p2 -b .secondary-jit -%patch14 -p2 -b .chromium-types +%patch14 -p1 -b .chromium-types %patch15 -p1 -R -b .xulstub %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed From 7f40f3bcf875ca57e574d4e09ef860884a443d05 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 16 Aug 2011 10:36:46 +0200 Subject: [PATCH 189/486] Update to 6.0 --- .gitignore | 1 + firefox-4.0-gnome3.patch | 1301 ------------ firefox-4.0-moz-app-launcher.patch | 137 -- firefox-5.0-xulstub.patch | 1843 ----------------- firefox-6.0-xulstub.patch | 1728 ++++++++++++++++ sources | 2 +- xulrunner-2.0-network-link-service.patch | 148 +- xulrunner-2.0-secondary-jit.patch | 14 - ...patch => xulrunner-6.0-secondary-ipc.patch | 23 +- xulrunner.spec | 23 +- 10 files changed, 1880 insertions(+), 3340 deletions(-) delete mode 100644 firefox-4.0-gnome3.patch delete mode 100644 firefox-4.0-moz-app-launcher.patch delete mode 100644 firefox-5.0-xulstub.patch create mode 100644 firefox-6.0-xulstub.patch delete mode 100644 xulrunner-2.0-secondary-jit.patch rename xulrunner-5.0-secondary-ipc.patch => xulrunner-6.0-secondary-ipc.patch (62%) diff --git a/.gitignore b/.gitignore index f3b6562..6115316 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0.source.tar.bz2 /xulrunner-2.0.1.source.tar.bz2 /xulrunner-5.0.source.tar.bz2 +/xulrunner-6.0.source.tar.bz2 diff --git a/firefox-4.0-gnome3.patch b/firefox-4.0-gnome3.patch deleted file mode 100644 index a8961e1..0000000 --- a/firefox-4.0-gnome3.patch +++ /dev/null @@ -1,1301 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=611953 - -diff --git a/toolkit/system/gnome/nsGIOService.cpp b/toolkit/system/gnome/nsGIOService.cpp ---- a/toolkit/system/gnome/nsGIOService.cpp -+++ b/toolkit/system/gnome/nsGIOService.cpp -@@ -101,25 +101,25 @@ nsGIOMimeApp::GetName(nsACString& aName) - return NS_OK; - } - - NS_IMETHODIMP - nsGIOMimeApp::GetCommand(nsACString& aCommand) - { - get_commandline_t g_app_info_get_commandline_ptr; - -- void *libHandle = dlopen("libgio-2.0.so", RTLD_LAZY); -+ void *libHandle = dlopen("libgio-2.0.so.0", RTLD_LAZY); - if (!libHandle) { - return NS_ERROR_FAILURE; - } - dlerror(); /* clear any existing error */ - g_app_info_get_commandline_ptr = - (get_commandline_t) dlsym(libHandle, "g_app_info_get_commandline"); -- if (dlerror() != NULL) { -- const char cmd = *g_app_info_get_commandline_ptr(mApp); -+ if (dlerror() == NULL) { -+ const char *cmd = g_app_info_get_commandline_ptr(mApp); - if (!cmd) { - dlclose(libHandle); - return NS_ERROR_FAILURE; - } - aCommand.Assign(cmd); - } - dlclose(libHandle); - return NS_OK; -@@ -414,75 +414,46 @@ nsGIOService::CreateAppFromCommand(nsACS - nsIGIOMimeApp** appInfo) - { - GError *error = NULL; - *appInfo = nsnull; - - GAppInfo *app_info = NULL, *app_info_from_list = NULL; - GList *apps = g_app_info_get_all(); - GList *apps_p = apps; -- get_commandline_t g_app_info_get_commandline_ptr; -- -- void *libHandle = dlopen("libgio-2.0.so", RTLD_LAZY); -- if (!libHandle) { -- return NS_ERROR_FAILURE; -- } -- dlerror(); /* clear any existing error */ -- g_app_info_get_commandline_ptr = -- (get_commandline_t) dlsym(libHandle, "g_app_info_get_commandline"); -- if (dlerror() != NULL) { -- g_app_info_get_commandline_ptr = NULL; -- } - - // Try to find relevant and existing GAppInfo in all installed application -+ // We do this by comparing each GAppInfo's executable with out own - while (apps_p) { - app_info_from_list = (GAppInfo*) apps_p->data; -- /* This is a silly test. It just compares app names but not -- * commands. This is due to old version of Glib/Gio. The required -- * function which allows to do a regular check of existence of desktop file -- * is possible by using function g_app_info_get_commandline. This function -- * has been introduced in Glib 2.20. */ -- if (app_info_from_list && strcmp(g_app_info_get_name(app_info_from_list), -- PromiseFlatCString(appName).get()) == 0 ) -- { -- if (g_app_info_get_commandline_ptr) -- { -- /* Following test is only possible with Glib >= 2.20. -- * Compare path only by using strncmp */ -- if (strncmp(g_app_info_get_commandline_ptr(app_info_from_list), -- PromiseFlatCString(cmd).get(), -- strlen(PromiseFlatCString(cmd).get())) == 0) -- { -- app_info = app_info_from_list; -- break; -- } else { -- g_object_unref(app_info_from_list); -- } -- } else { -+ if (!app_info) { -+ // If the executable is not absolute, get it's full path -+ char *executable = g_find_program_in_path(g_app_info_get_executable(app_info_from_list)); -+ -+ if (executable && strcmp(executable, PromiseFlatCString(cmd).get()) == 0) { -+ g_object_ref (app_info_from_list); - app_info = app_info_from_list; -- break; - } -- } else { -- g_object_unref(app_info_from_list); -+ g_free(executable); - } -+ -+ g_object_unref(app_info_from_list); - apps_p = apps_p->next; - } - g_list_free(apps); - - if (!app_info) { - app_info = g_app_info_create_from_commandline(PromiseFlatCString(cmd).get(), - PromiseFlatCString(appName).get(), - G_APP_INFO_CREATE_SUPPORTS_URIS, - &error); - } - - if (!app_info) { - g_warning("Cannot create application info from command: %s", error->message); - g_error_free(error); -- dlclose(libHandle); - return NS_ERROR_FAILURE; - } - nsGIOMimeApp *mozApp = new nsGIOMimeApp(app_info); - NS_ENSURE_TRUE(mozApp, NS_ERROR_OUT_OF_MEMORY); - NS_ADDREF(*appInfo = mozApp); -- dlclose(libHandle); - return NS_OK; - } - -diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp ---- a/browser/components/shell/src/nsGNOMEShellService.cpp -+++ b/browser/components/shell/src/nsGNOMEShellService.cpp -@@ -101,24 +101,24 @@ static const char kDesktopOptionsKey[] = - static const char kDesktopDrawBGKey[] = DG_BACKGROUND "/draw_background"; - static const char kDesktopColorKey[] = DG_BACKGROUND "/primary_color"; - - nsresult - nsGNOMEShellService::Init() - { - nsresult rv; - -- // GConf _must_ be available, or we do not allow -+ // GConf or GIO _must_ be available, or we do not allow - // CreateInstance to succeed. - - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - nsCOMPtr giovfs = - do_GetService(NS_GIOSERVICE_CONTRACTID); - -- if (!gconf) -+ if (!gconf && !giovfs) - return NS_ERROR_NOT_AVAILABLE; - - // Check G_BROKEN_FILENAMES. If it's set, then filenames in glib use - // the locale encoding. If it's not set, they use UTF-8. - mUseLocaleFilenames = PR_GetEnv("G_BROKEN_FILENAMES") != nsnull; - - if (GetAppPathFromLauncher()) - return NS_OK; -@@ -189,50 +189,77 @@ nsGNOMEShellService::KeyMatchesAppName(c - if (!commandPath) - return PR_FALSE; - - PRBool matches = mAppPath.Equals(commandPath); - g_free(commandPath); - return matches; - } - -+PRBool -+nsGNOMEShellService::CheckHandlerMatchesAppName(const nsACString &handler) const -+{ -+ gint argc; -+ gchar **argv; -+ nsCAutoString command(handler); -+ -+ // The string will be something of the form: [/path/to/]browser "%s" -+ // We want to remove all of the parameters and get just the binary name. -+ -+ if (g_shell_parse_argv(command.get(), &argc, &argv, NULL) && argc > 0) { -+ command.Assign(argv[0]); -+ g_strfreev(argv); -+ } -+ -+ if (!KeyMatchesAppName(command.get())) -+ return PR_FALSE; // the handler is set to another app -+ -+ return PR_TRUE; -+} -+ - NS_IMETHODIMP - nsGNOMEShellService::IsDefaultBrowser(PRBool aStartupCheck, - PRBool* aIsDefaultBrowser) - { - *aIsDefaultBrowser = PR_FALSE; - if (aStartupCheck) - mCheckedThisSession = PR_TRUE; - - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); -+ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); - - PRBool enabled; - nsCAutoString handler; -+ nsCOMPtr gioApp; - - for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { - if (!appProtocols[i].essential) - continue; - -- handler.Truncate(); -- gconf->GetAppForProtocol(nsDependentCString(appProtocols[i].name), -- &enabled, handler); -+ if (gconf) { -+ handler.Truncate(); -+ gconf->GetAppForProtocol(nsDependentCString(appProtocols[i].name), -+ &enabled, handler); - -- // The string will be something of the form: [/path/to/]browser "%s" -- // We want to remove all of the parameters and get just the binary name. -- -- gint argc; -- gchar **argv; -- -- if (g_shell_parse_argv(handler.get(), &argc, &argv, NULL) && argc > 0) { -- handler.Assign(argv[0]); -- g_strfreev(argv); -+ if (!CheckHandlerMatchesAppName(handler) || !enabled) -+ return NS_OK; // the handler is disabled or set to another app - } - -- if (!KeyMatchesAppName(handler.get()) || !enabled) -- return NS_OK; // the handler is disabled or set to another app -+ if (giovfs) { -+ handler.Truncate(); -+ giovfs->GetAppForURIScheme(nsDependentCString(appProtocols[i].name), -+ getter_AddRefs(gioApp)); -+ if (!gioApp) -+ return NS_OK; -+ -+ gioApp->GetCommand(handler); -+ -+ if (!CheckHandlerMatchesAppName(handler)) -+ return NS_OK; // the handler is set to another app -+ } - } - - *aIsDefaultBrowser = PR_TRUE; - - return NS_OK; - } - - NS_IMETHODIMP -@@ -240,19 +267,20 @@ nsGNOMEShellService::SetDefaultBrowser(P - PRBool aForAllUsers) - { - #ifdef DEBUG - if (aForAllUsers) - NS_WARNING("Setting the default browser for all users is not yet supported"); - #endif - - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); -+ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); - if (gconf) { - nsCAutoString appKeyValue; -- if(mAppIsInPath) { -+ if (mAppIsInPath) { - // mAppPath is in the users path, so use only the basename as the launcher - gchar *tmp = g_path_get_basename(mAppPath.get()); - appKeyValue = tmp; - g_free(tmp); - } else { - appKeyValue = mAppPath; - } - -@@ -261,23 +289,18 @@ nsGNOMEShellService::SetDefaultBrowser(P - for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { - if (appProtocols[i].essential || aClaimAllTypes) { - gconf->SetAppForProtocol(nsDependentCString(appProtocols[i].name), - appKeyValue); - } - } - } - -- // set handler for .html and xhtml files and MIME types: -- if (aClaimAllTypes) { -+ if (giovfs) { - nsresult rv; -- nsCOMPtr giovfs = -- do_GetService(NS_GIOSERVICE_CONTRACTID, &rv); -- NS_ENSURE_SUCCESS(rv, NS_OK); -- - nsCOMPtr bundleService = - do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); - NS_ENSURE_SUCCESS(rv, rv); - - nsCOMPtr brandBundle; - rv = bundleService->CreateBundle(BRAND_PROPERTIES, getter_AddRefs(brandBundle)); - NS_ENSURE_SUCCESS(rv, rv); - -@@ -290,20 +313,30 @@ nsGNOMEShellService::SetDefaultBrowser(P - // use brandShortName as the application id. - NS_ConvertUTF16toUTF8 id(brandShortName); - nsCOMPtr appInfo; - rv = giovfs->CreateAppFromCommand(mAppPath, - id, - getter_AddRefs(appInfo)); - NS_ENSURE_SUCCESS(rv, rv); - -- // Add mime types for html, xhtml extension and set app to just created appinfo. -- for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appTypes); ++i) { -- appInfo->SetAsDefaultForMimeType(nsDependentCString(appTypes[i].mimeType)); -- appInfo->SetAsDefaultForFileExtensions(nsDependentCString(appTypes[i].extensions)); -+ // set handler for the protocols -+ for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { -+ if (appProtocols[i].essential || aClaimAllTypes) { -+ appInfo->SetAsDefaultForURIScheme(nsDependentCString(appProtocols[i].name)); -+ } -+ } -+ -+ // set handler for .html and xhtml files and MIME types: -+ if (aClaimAllTypes) { -+ // Add mime types for html, xhtml extension and set app to just created appinfo. -+ for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appTypes); ++i) { -+ appInfo->SetAsDefaultForMimeType(nsDependentCString(appTypes[i].mimeType)); -+ appInfo->SetAsDefaultForFileExtensions(nsDependentCString(appTypes[i].extensions)); -+ } - } - } - - return NS_OK; - } - - NS_IMETHODIMP - nsGNOMEShellService::GetShouldCheckDefaultBrowser(PRBool* aResult) -@@ -403,48 +436,52 @@ nsGNOMEShellService::SetDesktopBackgroun - filePath.Append("_wallpaper.png"); - - // write the image to a file in the home dir - rv = WriteImage(filePath, container); - - // if the file was written successfully, set it as the system wallpaper - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - -- nsCAutoString options; -- if (aPosition == BACKGROUND_TILE) -- options.Assign("wallpaper"); -- else if (aPosition == BACKGROUND_STRETCH) -- options.Assign("stretched"); -- else -- options.Assign("centered"); -+ if (gconf) { -+ nsCAutoString options; -+ if (aPosition == BACKGROUND_TILE) -+ options.Assign("wallpaper"); -+ else if (aPosition == BACKGROUND_STRETCH) -+ options.Assign("stretched"); -+ else -+ options.Assign("centered"); - -- gconf->SetString(NS_LITERAL_CSTRING(kDesktopOptionsKey), options); -+ gconf->SetString(NS_LITERAL_CSTRING(kDesktopOptionsKey), options); - -- // Set the image to an empty string first to force a refresh -- // (since we could be writing a new image on top of an existing -- // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes) -- gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), -- EmptyCString()); -+ // Set the image to an empty string first to force a refresh -+ // (since we could be writing a new image on top of an existing -+ // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes) -+ gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), -+ EmptyCString()); - -- gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), filePath); -- gconf->SetBool(NS_LITERAL_CSTRING(kDesktopDrawBGKey), PR_TRUE); -+ gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), filePath); -+ gconf->SetBool(NS_LITERAL_CSTRING(kDesktopDrawBGKey), PR_TRUE); -+ } - - return rv; - } - - #define COLOR_16_TO_8_BIT(_c) ((_c) >> 8) - #define COLOR_8_TO_16_BIT(_c) ((_c) << 8 | (_c)) - - NS_IMETHODIMP - nsGNOMEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) - { - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - - nsCAutoString background; -- gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background); -+ if (gconf) { -+ gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background); -+ } - - if (background.IsEmpty()) { - *aColor = 0; - return NS_OK; - } - - GdkColor color; - gboolean success = gdk_color_parse(background.get(), &color); -@@ -473,36 +510,48 @@ ColorToCString(PRUint32 aColor, nsCStrin - } - - NS_IMETHODIMP - nsGNOMEShellService::SetDesktopBackgroundColor(PRUint32 aColor) - { - NS_ASSERTION(aColor <= 0xffffff, "aColor has extra bits"); - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - -- nsCAutoString colorString; -- ColorToCString(aColor, colorString); -+ if (gconf) { -+ nsCAutoString colorString; -+ ColorToCString(aColor, colorString); - -- gconf->SetString(NS_LITERAL_CSTRING(kDesktopColorKey), colorString); -+ gconf->SetString(NS_LITERAL_CSTRING(kDesktopColorKey), colorString); -+ } - - return NS_OK; - } - - NS_IMETHODIMP - nsGNOMEShellService::OpenApplication(PRInt32 aApplication) - { - nsCAutoString scheme; - if (aApplication == APPLICATION_MAIL) - scheme.Assign("mailto"); - else if (aApplication == APPLICATION_NEWS) - scheme.Assign("news"); - else - return NS_ERROR_NOT_AVAILABLE; - -+ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); -+ if (giovfs) { -+ nsCOMPtr gioApp; -+ giovfs->GetAppForURIScheme(scheme, getter_AddRefs(gioApp)); -+ if (gioApp) -+ return gioApp->Launch(EmptyCString()); -+ } -+ - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); -+ if (!gconf) -+ return NS_ERROR_FAILURE; - - PRBool enabled; - nsCAutoString appCommand; - gconf->GetAppForProtocol(scheme, &enabled, appCommand); - - if (!enabled) - return NS_ERROR_FAILURE; - -diff --git a/browser/components/shell/src/nsGNOMEShellService.h b/browser/components/shell/src/nsGNOMEShellService.h ---- a/browser/components/shell/src/nsGNOMEShellService.h -+++ b/browser/components/shell/src/nsGNOMEShellService.h -@@ -49,16 +49,17 @@ public: - NS_DECL_NSISHELLSERVICE - - nsresult Init() NS_HIDDEN; - - private: - ~nsGNOMEShellService() {} - - NS_HIDDEN_(PRBool) KeyMatchesAppName(const char *aKeyValue) const; -+ NS_HIDDEN_(PRBool) CheckHandlerMatchesAppName(const nsACString& handler) const; - - NS_HIDDEN_(PRBool) GetAppPathFromLauncher(); - PRPackedBool mCheckedThisSession; - PRPackedBool mUseLocaleFilenames; - nsCString mAppPath; - PRPackedBool mAppIsInPath; - }; - -diff --git a/toolkit/system/gnome/nsGIOService.cpp b/toolkit/system/gnome/nsGIOService.cpp ---- a/toolkit/system/gnome/nsGIOService.cpp -+++ b/toolkit/system/gnome/nsGIOService.cpp -@@ -277,16 +277,43 @@ nsGIOMimeApp::SetAsDefaultForFileExtensi - } else { - *ext_pos = '\0'; - } - } - g_free(extensions); - return NS_OK; - } - -+/** -+ * Set default application for URI's of a particular scheme -+ * @param aURIScheme string containing the URI scheme -+ * @return NS_OK when application was set as default for URI scheme, -+ * NS_ERROR_FAILURE otherwise -+ */ -+NS_IMETHODIMP -+nsGIOMimeApp::SetAsDefaultForURIScheme(nsACString const& aURIScheme) -+{ -+ GError *error = NULL; -+ nsCAutoString contentType("x-scheme-handler/"); -+ contentType.Append(aURIScheme); -+ -+ g_app_info_set_as_default_for_type(mApp, -+ contentType.get(), -+ &error); -+ if (error) { -+ g_warning("Cannot set application as default for URI scheme (%s): %s", -+ PromiseFlatCString(aURIScheme).get(), -+ error->message); -+ g_error_free(error); -+ return NS_ERROR_FAILURE; -+ } -+ -+ return NS_OK; -+} -+ - nsresult - nsGIOService::Init() - { - // do nothing, gvfs/gio does not init. - return NS_OK; - } - - NS_IMPL_ISUPPORTS1(nsGIOService, nsIGIOService) -@@ -317,16 +344,33 @@ nsGIOService::GetMimeTypeFromExtension(c - g_free(mime_type); - g_free(content_type); - - return NS_OK; - } - // used in nsGNOMERegistry - // ----------------------------------------------------------------------------- - NS_IMETHODIMP -+nsGIOService::GetAppForURIScheme(const nsACString& aURIScheme, -+ nsIGIOMimeApp** aApp) -+{ -+ *aApp = nsnull; -+ -+ GAppInfo *app_info = g_app_info_get_default_for_uri_scheme( -+ PromiseFlatCString(aURIScheme).get()); -+ if (app_info) { -+ nsGIOMimeApp *mozApp = new nsGIOMimeApp(app_info); -+ NS_ADDREF(*aApp = mozApp); -+ } else { -+ return NS_ERROR_FAILURE; -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP - nsGIOService::GetAppForMimeType(const nsACString& aMimeType, - nsIGIOMimeApp** aApp) - { - *aApp = nsnull; - char *content_type = - get_content_type_from_mime_type(PromiseFlatCString(aMimeType).get()); - if (!content_type) - return NS_ERROR_FAILURE; -diff --git a/xpcom/system/nsIGIOService.idl b/xpcom/system/nsIGIOService.idl ---- a/xpcom/system/nsIGIOService.idl -+++ b/xpcom/system/nsIGIOService.idl -@@ -41,57 +41,61 @@ - - interface nsIUTF8StringEnumerator; - interface nsIURI; - - /* nsIGIOMimeApp holds information about an application that is looked up - with nsIGIOService::GetAppForMimeType. */ - // 66009894-9877-405b-9321-bf30420e34e6 prev uuid - --[scriptable, uuid(e77021b4-4012-407d-b686-7a1f18050109)] -+[scriptable, uuid(ca6bad0c-8a48-48ac-82c7-27bb8f510fbe)] - interface nsIGIOMimeApp : nsISupports - { - const long EXPECTS_URIS = 0; - const long EXPECTS_PATHS = 1; - const long EXPECTS_URIS_FOR_NON_FILES = 2; - - readonly attribute AUTF8String id; - readonly attribute AUTF8String name; - readonly attribute AUTF8String command; - readonly attribute long expectsURIs; // see constants above - readonly attribute nsIUTF8StringEnumerator supportedURISchemes; - - void launch(in AUTF8String uri); - void setAsDefaultForMimeType(in AUTF8String mimeType); - void setAsDefaultForFileExtensions(in AUTF8String extensions); -+ void setAsDefaultForURIScheme(in AUTF8String uriScheme); - }; - - /* - * The VFS service makes use of two distinct registries. - * - * The application registry holds information about applications (uniquely - * identified by id), such as which MIME types and URI schemes they are - * capable of handling, whether they run in a terminal, etc. - * - * The MIME registry holds information about MIME types, such as which - * extensions map to a given MIME type. The MIME registry also stores the - * id of the application selected to handle each MIME type. - */ - - // prev id dea20bf0-4e4d-48c5-b932-dc3e116dc64b --[scriptable, uuid(47e372c2-78bb-4899-8114-56aa7d9cdac5)] -+[scriptable, uuid(eda22a30-84e1-4e16-9ca0-cd1553c2b34a)] - interface nsIGIOService : nsISupports - { - - /*** MIME registry methods ***/ - - /* Obtain the MIME type registered for an extension. The extension - should not include a leading dot. */ - AUTF8String getMimeTypeFromExtension(in AUTF8String extension); - -+ /* Obtain the preferred application for opening a given URI scheme */ -+ nsIGIOMimeApp getAppForURIScheme(in AUTF8String aURIScheme); -+ - /* Obtain the preferred application for opening a given MIME type */ - nsIGIOMimeApp getAppForMimeType(in AUTF8String mimeType); - - /* Obtain the preferred application for opening a given MIME type */ - nsIGIOMimeApp createAppFromCommand(in AUTF8String cmd, - in AUTF8String appName); - - /* Obtain a description for the given MIME type */ - -diff --git a/toolkit/system/gnome/Makefile.in b/toolkit/system/gnome/Makefile.in ---- a/toolkit/system/gnome/Makefile.in -+++ b/toolkit/system/gnome/Makefile.in -@@ -60,16 +60,17 @@ ifdef MOZ_ENABLE_GNOMEVFS - CPPSRCS += \ - nsGnomeVFSService.cpp \ - $(NULL) - endif - - ifdef MOZ_ENABLE_GIO - CPPSRCS += \ - nsGIOService.cpp \ -+ nsGSettingsService.cpp \ - $(NULL) - endif - - ifdef MOZ_ENABLE_LIBNOTIFY - CPPSRCS += \ - nsAlertsService.cpp \ - nsAlertsIconListener.cpp \ - $(NULL) -diff --git a/toolkit/system/gnome/nsGSettingsService.cpp b/toolkit/system/gnome/nsGSettingsService.cpp -new file mode 100644 ---- /dev/null -+++ b/toolkit/system/gnome/nsGSettingsService.cpp -@@ -0,0 +1,238 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is the Mozilla GNOME integration code. -+ * -+ * The Initial Developer of the Original Code is -+ * Canonical Ltd. -+ * Portions created by the Initial Developer are Copyright (C) 2010 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Chris Coulson -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsGSettingsService.h" -+#include "nsStringAPI.h" -+#include "nsCOMPtr.h" -+#include "prlink.h" -+#include "nsComponentManagerUtils.h" -+ -+#include -+#include -+ -+typedef struct _GSettings GSettings; -+ -+typedef GSettings * (*_g_settings_new_fn) (const char* schema); -+typedef const char * const* (*_g_settings_list_schemas_fn) (void); -+typedef gboolean (*_g_settings_set_string_fn) (GSettings* settings, -+ const char* key, -+ const char* value); -+typedef gboolean (*_g_settings_set_boolean_fn) (GSettings* settings, -+ const char* key, -+ gboolean value); -+typedef gboolean (*_g_settings_set_int_fn) (GSettings* settings, -+ const char* key, -+ int value); -+typedef char * (*_g_settings_get_string_fn) (GSettings* settings, -+ const char* key); -+typedef gboolean (*_g_settings_get_boolean_fn) (GSettings* settings, -+ const char* key); -+typedef int (*_g_settings_get_int_fn) (GSettings* settings, -+ const char* key); -+ -+static _g_settings_new_fn _g_settings_new; -+static _g_settings_list_schemas_fn _g_settings_list_schemas; -+static PRLibrary *gioLib = nsnull; -+ -+class nsGSettingsCollection : public nsIGSettingsCollection -+{ -+public: -+ NS_DECL_ISUPPORTS -+ NS_DECL_NSIGSETTINGSCOLLECTION -+ -+ nsGSettingsCollection(GSettings* aSettings) : mSettings(aSettings) {} -+ ~nsGSettingsCollection() { g_object_unref(mSettings); } -+ -+private: -+ GSettings *mSettings; -+}; -+ -+NS_IMPL_ISUPPORTS1(nsGSettingsCollection, nsIGSettingsCollection) -+ -+NS_IMETHODIMP -+nsGSettingsCollection::SetString(const nsACString& aKey, -+ const nsACString& aValue) -+{ -+ _g_settings_set_string_fn _g_settings_set_string = -+ (_g_settings_set_string_fn) PR_FindFunctionSymbol(gioLib, -+ "g_settings_set_string"); -+ if (!_g_settings_set_string) -+ return NS_ERROR_FAILURE; -+ -+ gboolean res = _g_settings_set_string(mSettings, -+ PromiseFlatCString(aKey).get(), -+ PromiseFlatCString(aValue).get()); -+ -+ return res ? NS_OK : NS_ERROR_FAILURE; -+} -+ -+NS_IMETHODIMP -+nsGSettingsCollection::SetBoolean(const nsACString& aKey, -+ PRBool aValue) -+{ -+ _g_settings_set_boolean_fn _g_settings_set_boolean = -+ (_g_settings_set_boolean_fn) PR_FindFunctionSymbol(gioLib, -+ "g_settings_set_boolean"); -+ if (!_g_settings_set_boolean) -+ return NS_ERROR_FAILURE; -+ -+ gboolean res = _g_settings_set_boolean(mSettings, -+ PromiseFlatCString(aKey).get(), -+ aValue); -+ -+ return res ? NS_OK : NS_ERROR_FAILURE; -+} -+ -+NS_IMETHODIMP -+nsGSettingsCollection::SetInt(const nsACString& aKey, -+ PRInt32 aValue) -+{ -+ _g_settings_set_int_fn _g_settings_set_int = -+ (_g_settings_set_int_fn) PR_FindFunctionSymbol(gioLib, -+ "g_settings_set_int"); -+ if (!_g_settings_set_int) -+ return NS_ERROR_FAILURE; -+ -+ gboolean res = _g_settings_set_int(mSettings, -+ PromiseFlatCString(aKey).get(), -+ aValue); -+ -+ return res ? NS_OK : NS_ERROR_FAILURE; -+} -+ -+NS_IMETHODIMP -+nsGSettingsCollection::GetString(const nsACString& aKey, -+ nsACString& aResult) -+{ -+ _g_settings_get_string_fn _g_settings_get_string = -+ (_g_settings_get_string_fn) PR_FindFunctionSymbol(gioLib, -+ "g_settings_get_string"); -+ if (!_g_settings_get_string) -+ return NS_ERROR_FAILURE; -+ -+ char *result = _g_settings_get_string(mSettings, -+ PromiseFlatCString(aKey).get()); -+ if (!result) -+ return NS_ERROR_FAILURE; -+ -+ aResult.Assign(result); -+ g_free(result); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsGSettingsCollection::GetBoolean(const nsACString& aKey, -+ PRBool* aResult) -+{ -+ _g_settings_get_boolean_fn _g_settings_get_boolean = -+ (_g_settings_get_boolean_fn) PR_FindFunctionSymbol(gioLib, -+ "g_settings_get_boolean"); -+ if (!_g_settings_get_boolean) -+ return NS_ERROR_FAILURE; -+ -+ gboolean res = _g_settings_get_boolean(mSettings, -+ PromiseFlatCString(aKey).get()); -+ *aResult = res ? PR_TRUE : PR_FALSE; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsGSettingsCollection::GetInt(const nsACString& aKey, -+ PRInt32* aResult) -+{ -+ _g_settings_get_int_fn _g_settings_get_int = -+ (_g_settings_get_int_fn) PR_FindFunctionSymbol(gioLib, -+ "g_settings_get_int"); -+ if (!_g_settings_get_int) -+ return NS_ERROR_FAILURE; -+ -+ *aResult = _g_settings_get_int(mSettings, -+ PromiseFlatCString(aKey).get()); -+ -+ return NS_OK; -+} -+ -+nsresult -+nsGSettingsService::Init() -+{ -+ if (!gioLib) { -+ gioLib = PR_LoadLibrary("libgio-2.0.so.0"); -+ } -+ -+ _g_settings_new = (_g_settings_new_fn) -+ PR_FindFunctionSymbol(gioLib, "g_settings_new"); -+ _g_settings_list_schemas = (_g_settings_list_schemas_fn) -+ PR_FindFunctionSymbol(gioLib, "g_settings_list_schemas"); -+ -+ if (!_g_settings_new || !_g_settings_list_schemas) { -+ PR_UnloadLibrary(gioLib); -+ return NS_ERROR_FAILURE; -+ } -+ -+ return NS_OK; -+} -+ -+NS_IMPL_ISUPPORTS1(nsGSettingsService, nsIGSettingsService) -+ -+nsGSettingsService::~nsGSettingsService() -+{ -+ if (gioLib) { -+ PR_UnloadLibrary(gioLib); -+ gioLib = nsnull; -+ } -+} -+ -+NS_IMETHODIMP -+nsGSettingsService::GetCollectionForSchema(const nsACString& schema, -+ nsIGSettingsCollection** collection) -+{ -+ const char * const *schemas = _g_settings_list_schemas(); -+ unsigned int i = 0; -+ -+ for (i = 0; schemas[i] != NULL; i++) { -+ if (strcmp(schemas[i], PromiseFlatCString(schema).get()) == 0) { -+ GSettings *settings = _g_settings_new(PromiseFlatCString(schema).get()); -+ nsGSettingsCollection *mozGSettings = new nsGSettingsCollection(settings); -+ NS_ADDREF(*collection = mozGSettings); -+ return NS_OK; -+ } -+ } -+ -+ return NS_ERROR_FAILURE; -+} -diff --git a/toolkit/system/gnome/nsGSettingsService.h b/toolkit/system/gnome/nsGSettingsService.h -new file mode 100644 ---- /dev/null -+++ b/toolkit/system/gnome/nsGSettingsService.h -@@ -0,0 +1,60 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is the Mozilla GNOME integration code. -+ * -+ * The Initial Developer of the Original Code is -+ * Canonical Ltd. -+ * Portions created by the Initial Developer are Copyright (C) 2010 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Chris Coulson -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef nsGSettingsService_h_ -+#define nsGSettingsService_h_ -+ -+#include "nsIGSettingsService.h" -+ -+#define NS_GSETTINGSSERVICE_CID \ -+{0xbfd4a9d8, 0xd886, 0x4161, {0x81, 0xef, 0x88, 0x68, 0xda, 0x11, 0x41, 0x70}} -+ -+class nsGSettingsService : public nsIGSettingsService -+{ -+public: -+ NS_DECL_ISUPPORTS -+ NS_DECL_NSIGSETTINGSSERVICE -+ -+ NS_HIDDEN_(nsresult) Init(); -+ -+private: -+ ~nsGSettingsService(); -+}; -+ -+#endif -+ -diff --git a/toolkit/system/gnome/nsGnomeModule.cpp b/toolkit/system/gnome/nsGnomeModule.cpp ---- a/toolkit/system/gnome/nsGnomeModule.cpp -+++ b/toolkit/system/gnome/nsGnomeModule.cpp -@@ -44,62 +44,67 @@ - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGConfService, Init) - #endif - #ifdef MOZ_ENABLE_GNOMEVFS - #include "nsGnomeVFSService.h" - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init) - #endif - #ifdef MOZ_ENABLE_GIO - #include "nsGIOService.h" -+#include "nsGSettingsService.h" - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGIOService, Init) -+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init) - #endif - #ifdef MOZ_ENABLE_LIBNOTIFY - #include "nsAlertsService.h" - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAlertsService, Init) - #endif - - #ifdef MOZ_ENABLE_GCONF - NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID); - #endif - #ifdef MOZ_ENABLE_GNOMEVFS - NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID); - #endif - #ifdef MOZ_ENABLE_GIO - NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID); -+NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID); - #endif - #ifdef MOZ_ENABLE_LIBNOTIFY - NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID); - #endif - - - static const mozilla::Module::CIDEntry kGnomeCIDs[] = { - #ifdef MOZ_ENABLE_GCONF - { &kNS_GCONFSERVICE_CID, false, NULL, nsGConfServiceConstructor }, - #endif - #ifdef MOZ_ENABLE_GNOMEVFS - { &kNS_GNOMEVFSSERVICE_CID, false, NULL, nsGnomeVFSServiceConstructor }, - #endif - #ifdef MOZ_ENABLE_GIO - { &kNS_GIOSERVICE_CID, false, NULL, nsGIOServiceConstructor }, -+ { &kNS_GSETTINGSSERVICE_CID, false, NULL, nsGSettingsServiceConstructor }, - #endif - #ifdef MOZ_ENABLE_LIBNOTIFY - { &kNS_SYSTEMALERTSSERVICE_CID, false, NULL, nsAlertsServiceConstructor }, - #endif - { NULL } - }; - - static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { - #ifdef MOZ_ENABLE_GCONF - { NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID }, - #endif - #ifdef MOZ_ENABLE_GNOMEVFS - { NS_GNOMEVFSSERVICE_CONTRACTID, &kNS_GNOMEVFSSERVICE_CID }, - #endif - #ifdef MOZ_ENABLE_GIO - { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID }, -+ { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID }, - #endif - #ifdef MOZ_ENABLE_LIBNOTIFY - { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID }, - #endif - { NULL } - }; - - static const mozilla::Module kGnomeModule = { -diff --git a/xpcom/system/Makefile.in b/xpcom/system/Makefile.in ---- a/xpcom/system/Makefile.in -+++ b/xpcom/system/Makefile.in -@@ -47,16 +47,17 @@ XPIDL_MODULE = xpcom_system - - XPIDLSRCS = \ - nsIXULAppInfo.idl \ - nsIXULRuntime.idl \ - nsIGConfService.idl \ - nsIGnomeVFSService.idl \ - nsIBlocklistService.idl \ - nsIGIOService.idl \ -+ nsIGSettingsService.idl \ - nsIAccelerometer.idl \ - nsIGeolocationProvider.idl \ - nsIHapticFeedback.idl \ - $(NULL) - - ifdef MOZ_CRASHREPORTER - XPIDLSRCS += nsICrashReporter.idl - endif -diff --git a/xpcom/system/nsIGSettingsService.idl b/xpcom/system/nsIGSettingsService.idl -new file mode 100644 ---- /dev/null -+++ b/xpcom/system/nsIGSettingsService.idl -@@ -0,0 +1,61 @@ -+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is the Mozilla GNOME integration code. -+ * -+ * The Initial Developer of the Original Code is -+ * Canonical Ltd. -+ * Portions created by the Initial Developer are Copyright (C) 2010 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Chris Coulson -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsISupports.idl" -+#include "nsIArray.idl" -+ -+[scriptable, uuid(09637d3c-3c07-40b4-aff9-1d2a0f046f3c)] -+interface nsIGSettingsCollection : nsISupports -+{ -+ void setString(in AUTF8String key, in AUTF8String value); -+ void setBoolean(in AUTF8String key, in boolean value); -+ void setInt(in AUTF8String key, in long value); -+ AUTF8String getString(in AUTF8String key); -+ boolean getBoolean(in AUTF8String key); -+ long getInt(in AUTF8String key); -+}; -+ -+[scriptable, uuid(849c088b-57d1-4f24-b7b2-3dc4acb04c0a)] -+interface nsIGSettingsService : nsISupports -+{ -+ nsIGSettingsCollection getCollectionForSchema(in AUTF8String schema); -+}; -+ -+%{C++ -+#define NS_GSETTINGSSERVICE_CONTRACTID "@mozilla.org/gsettings-service;1" -+%} - -diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp ---- a/browser/components/shell/src/nsGNOMEShellService.cpp -+++ b/browser/components/shell/src/nsGNOMEShellService.cpp -@@ -41,16 +41,17 @@ - #include "nsILocalFile.h" - #include "nsIProperties.h" - #include "nsDirectoryServiceDefs.h" - #include "nsIPrefService.h" - #include "prenv.h" - #include "nsStringAPI.h" - #include "nsIGConfService.h" - #include "nsIGIOService.h" -+#include "nsIGSettingsService.h" - #include "nsIStringBundle.h" - #include "nsIOutputStream.h" - #include "nsIProcess.h" - #include "nsNetUtil.h" - #include "nsIDOMHTMLImageElement.h" - #include "nsIImageLoadingContent.h" - #include "imgIRequest.h" - #include "imgIContainer.h" -@@ -96,29 +97,37 @@ static const char kDocumentIconPath[] = - // GConf registry key constants - #define DG_BACKGROUND "/desktop/gnome/background" - - static const char kDesktopImageKey[] = DG_BACKGROUND "/picture_filename"; - static const char kDesktopOptionsKey[] = DG_BACKGROUND "/picture_options"; - static const char kDesktopDrawBGKey[] = DG_BACKGROUND "/draw_background"; - static const char kDesktopColorKey[] = DG_BACKGROUND "/primary_color"; - -+static const char kDesktopBGSchema[] = "org.gnome.desktop.background"; -+static const char kDesktopImageGSKey[] = "picture-uri"; -+static const char kDesktopOptionGSKey[] = "picture-options"; -+static const char kDesktopDrawBGGSKey[] = "draw-background"; -+static const char kDesktopColorGSKey[] = "primary-color"; -+ - nsresult - nsGNOMEShellService::Init() - { - nsresult rv; - -- // GConf or GIO _must_ be available, or we do not allow -+ // GConf, GSettings or GIO _must_ be available, or we do not allow - // CreateInstance to succeed. - - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - nsCOMPtr giovfs = - do_GetService(NS_GIOSERVICE_CONTRACTID); -+ nsCOMPtr gsettings = -+ do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); - -- if (!gconf && !giovfs) -+ if (!gconf && !giovfs && !gsettings) - return NS_ERROR_NOT_AVAILABLE; - - // Check G_BROKEN_FILENAMES. If it's set, then filenames in glib use - // the locale encoding. If it's not set, they use UTF-8. - mUseLocaleFilenames = PR_GetEnv("G_BROKEN_FILENAMES") != nsnull; - - if (GetAppPathFromLauncher()) - return NS_OK; -@@ -434,27 +443,47 @@ nsGNOMEShellService::SetDesktopBackgroun - filePath.Append('/'); - filePath.Append(NS_ConvertUTF16toUTF8(brandName)); - filePath.Append("_wallpaper.png"); - - // write the image to a file in the home dir - rv = WriteImage(filePath, container); - - // if the file was written successfully, set it as the system wallpaper -+ nsCAutoString options; -+ if (aPosition == BACKGROUND_TILE) -+ options.Assign("wallpaper"); -+ else if (aPosition == BACKGROUND_STRETCH) -+ options.Assign("stretched"); -+ else -+ options.Assign("centered"); -+ -+ // Try GSettings first. If we don't have GSettings or the right schema, fall back -+ // to using GConf instead. Note that if GSettings works ok, the changes get -+ // mirrored to GConf by the gsettings->gconf bridge in gnome-settings-daemon -+ nsCOMPtr gsettings = -+ do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); -+ if (gsettings) { -+ nsCOMPtr background_settings; -+ gsettings->GetCollectionForSchema( -+ NS_LITERAL_CSTRING(kDesktopBGSchema), getter_AddRefs(background_settings)); -+ if (background_settings) { -+ filePath.Insert("file://", 0); -+ background_settings->SetString(NS_LITERAL_CSTRING(kDesktopOptionGSKey), -+ options); -+ background_settings->SetString(NS_LITERAL_CSTRING(kDesktopImageGSKey), -+ filePath); -+ background_settings->SetBoolean(NS_LITERAL_CSTRING(kDesktopDrawBGGSKey), -+ PR_TRUE); -+ return rv; -+ } -+ } -+ - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); -- - if (gconf) { -- nsCAutoString options; -- if (aPosition == BACKGROUND_TILE) -- options.Assign("wallpaper"); -- else if (aPosition == BACKGROUND_STRETCH) -- options.Assign("stretched"); -- else -- options.Assign("centered"); -- - gconf->SetString(NS_LITERAL_CSTRING(kDesktopOptionsKey), options); - - // Set the image to an empty string first to force a refresh - // (since we could be writing a new image on top of an existing - // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes) - gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), - EmptyCString()); - -@@ -466,21 +495,33 @@ nsGNOMEShellService::SetDesktopBackgroun - } - - #define COLOR_16_TO_8_BIT(_c) ((_c) >> 8) - #define COLOR_8_TO_16_BIT(_c) ((_c) << 8 | (_c)) - - NS_IMETHODIMP - nsGNOMEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) - { -- nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); -+ nsCOMPtr gsettings = -+ do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); -+ nsCOMPtr background_settings; -+ nsCAutoString background; -+ if (gsettings) { -+ gsettings->GetCollectionForSchema( -+ NS_LITERAL_CSTRING(kDesktopBGSchema), getter_AddRefs(background_settings)); -+ if (background_settings) { -+ background_settings->GetString(NS_LITERAL_CSTRING(kDesktopColorGSKey), -+ background); -+ } -+ } - -- nsCAutoString background; -- if (gconf) { -- gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background); -+ if (!background_settings) { -+ nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); -+ if (gconf) -+ gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background); - } - - if (background.IsEmpty()) { - *aColor = 0; - return NS_OK; - } - - GdkColor color; -@@ -508,22 +548,35 @@ ColorToCString(PRUint32 aColor, nsCStrin - - PR_snprintf(buf, 14, "#%04x%04x%04x", red, green, blue); - } - - NS_IMETHODIMP - nsGNOMEShellService::SetDesktopBackgroundColor(PRUint32 aColor) - { - NS_ASSERTION(aColor <= 0xffffff, "aColor has extra bits"); -+ -+ nsCAutoString colorString; -+ ColorToCString(aColor, colorString); -+ -+ nsCOMPtr gsettings = -+ do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); -+ if (gsettings) { -+ nsCOMPtr background_settings; -+ gsettings->GetCollectionForSchema( -+ NS_LITERAL_CSTRING(kDesktopBGSchema), getter_AddRefs(background_settings)); -+ if (background_settings) { -+ background_settings->SetString(NS_LITERAL_CSTRING(kDesktopColorGSKey), -+ colorString); -+ return NS_OK; -+ } -+ } -+ - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); -- - if (gconf) { -- nsCAutoString colorString; -- ColorToCString(aColor, colorString); -- - gconf->SetString(NS_LITERAL_CSTRING(kDesktopColorKey), colorString); - } - - return NS_OK; - } - - NS_IMETHODIMP - nsGNOMEShellService::OpenApplication(PRInt32 aApplication) - diff --git a/firefox-4.0-moz-app-launcher.patch b/firefox-4.0-moz-app-launcher.patch deleted file mode 100644 index d87b64a..0000000 --- a/firefox-4.0-moz-app-launcher.patch +++ /dev/null @@ -1,137 +0,0 @@ -From https://bugzilla.mozilla.org/show_bug.cgi?id=611953 -Patch 1 - Use MOZ_APP_LAUNCHER for default browser executable (v3, un-bitrotted) - - -diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp ---- a/browser/components/shell/src/nsGNOMEShellService.cpp -+++ b/browser/components/shell/src/nsGNOMEShellService.cpp -@@ -115,16 +115,19 @@ nsGNOMEShellService::Init() - - if (!gconf) - return NS_ERROR_NOT_AVAILABLE; - - // Check G_BROKEN_FILENAMES. If it's set, then filenames in glib use - // the locale encoding. If it's not set, they use UTF-8. - mUseLocaleFilenames = PR_GetEnv("G_BROKEN_FILENAMES") != nsnull; - -+ if (GetAppPathFromLauncher()) -+ return NS_OK; -+ - nsCOMPtr dirSvc - (do_GetService("@mozilla.org/file/directory_service;1")); - NS_ENSURE_TRUE(dirSvc, NS_ERROR_NOT_AVAILABLE); - - nsCOMPtr appPath; - rv = dirSvc->Get(NS_XPCOM_CURRENT_PROCESS_DIR, NS_GET_IID(nsILocalFile), - getter_AddRefs(appPath)); - NS_ENSURE_SUCCESS(rv, rv); -@@ -133,16 +136,44 @@ nsGNOMEShellService::Init() - NS_ENSURE_SUCCESS(rv, rv); - - return appPath->GetNativePath(mAppPath); - } - - NS_IMPL_ISUPPORTS1(nsGNOMEShellService, nsIShellService) - - PRBool -+nsGNOMEShellService::GetAppPathFromLauncher() -+{ -+ gchar *tmp; -+ -+ const char *launcher = PR_GetEnv("MOZ_APP_LAUNCHER"); -+ if (!launcher) -+ return PR_FALSE; -+ -+ if (g_path_is_absolute(launcher)) { -+ mAppPath = launcher; -+ tmp = g_path_get_basename(launcher); -+ gchar *fullpath = g_find_program_in_path(tmp); -+ if (fullpath && mAppPath.Equals(fullpath)) -+ mAppIsInPath = PR_TRUE; -+ g_free(fullpath); -+ } else { -+ tmp = g_find_program_in_path(launcher); -+ if (!tmp) -+ return PR_FALSE; -+ mAppPath = tmp; -+ mAppIsInPath = PR_TRUE; -+ } -+ -+ g_free(tmp); -+ return PR_TRUE; -+} -+ -+PRBool - nsGNOMEShellService::KeyMatchesAppName(const char *aKeyValue) const - { - - gchar *commandPath; - if (mUseLocaleFilenames) { - gchar *nativePath = g_filename_from_utf8(aKeyValue, -1, NULL, NULL, NULL); - if (!nativePath) { - NS_ERROR("Error converting path to filesystem encoding"); -@@ -210,18 +241,28 @@ nsGNOMEShellService::SetDefaultBrowser(P - { - #ifdef DEBUG - if (aForAllUsers) - NS_WARNING("Setting the default browser for all users is not yet supported"); - #endif - - nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - if (gconf) { -- nsCAutoString appKeyValue(mAppPath); -- appKeyValue.Append(" \"%s\""); -+ nsCAutoString appKeyValue; -+ if(mAppIsInPath) { -+ // mAppPath is in the users path, so use only the basename as the launcher -+ gchar *tmp = g_path_get_basename(mAppPath.get()); -+ appKeyValue = tmp; -+ g_free(tmp); -+ } else { -+ appKeyValue = mAppPath; -+ } -+ -+ appKeyValue.AppendLiteral(" %s"); -+ - for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { - if (appProtocols[i].essential || aClaimAllTypes) { - gconf->SetAppForProtocol(nsDependentCString(appProtocols[i].name), - appKeyValue); - } - } - } - -diff --git a/browser/components/shell/src/nsGNOMEShellService.h b/browser/components/shell/src/nsGNOMEShellService.h ---- a/browser/components/shell/src/nsGNOMEShellService.h -+++ b/browser/components/shell/src/nsGNOMEShellService.h -@@ -38,26 +38,28 @@ - #define nsgnomeshellservice_h____ - - #include "nsIShellService.h" - #include "nsStringAPI.h" - - class nsGNOMEShellService : public nsIShellService - { - public: -- nsGNOMEShellService() : mCheckedThisSession(PR_FALSE) { } -+ nsGNOMEShellService() : mCheckedThisSession(PR_FALSE), mAppIsInPath(PR_FALSE) { } - - NS_DECL_ISUPPORTS - NS_DECL_NSISHELLSERVICE - - nsresult Init() NS_HIDDEN; - - private: - ~nsGNOMEShellService() {} - - NS_HIDDEN_(PRBool) KeyMatchesAppName(const char *aKeyValue) const; - -+ NS_HIDDEN_(PRBool) GetAppPathFromLauncher(); - PRPackedBool mCheckedThisSession; - PRPackedBool mUseLocaleFilenames; - nsCString mAppPath; -+ PRPackedBool mAppIsInPath; - }; - - #endif // nsgnomeshellservice_h____ - diff --git a/firefox-5.0-xulstub.patch b/firefox-5.0-xulstub.patch deleted file mode 100644 index c905475..0000000 --- a/firefox-5.0-xulstub.patch +++ /dev/null @@ -1,1843 +0,0 @@ - -# HG changeset patch -# User Benjamin Smedberg -# Date 1301678913 14400 -# Node ID d7fc46501527a4aeecdf3f69f908b250a305ef00 -# Parent e61659c0f0d4505edcb6c018a38f21c830da2e26 -Bug 642795 - Remove support for registering and finding "system XULRunner" via config files or the registry. r=glandium - - -diff --git a/xpcom/build/dlldeps.cpp b/xpcom/build/dlldeps.cpp ---- a/xpcom/build/dlldeps.cpp -+++ b/xpcom/build/dlldeps.cpp -@@ -108,17 +108,16 @@ - - using namespace mozilla; - - class nsCStringContainer : private nsStringContainer_base { }; - class nsStringContainer : private nsStringContainer_base { }; - - void XXXNeverCalled() - { -- GRE_GetGREPathWithProperties(nsnull, 0, nsnull, 0, nsnull, 0); - nsTextFormatter::snprintf(nsnull,0,nsnull); - nsTextFormatter::smprintf(nsnull, nsnull); - nsTextFormatter::smprintf_free(nsnull); - nsVoidArray(); - nsSmallVoidArray(); - { - nsTArray array1(1), array2(1); - PRBool a, b, c; -diff --git a/xpcom/glue/nsGREGlue.cpp b/xpcom/glue/nsGREGlue.cpp -deleted file mode 100644 ---- a/xpcom/glue/nsGREGlue.cpp -+++ /dev/null -@@ -1,760 +0,0 @@ --/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* ***** BEGIN LICENSE BLOCK ***** -- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -- * -- * The contents of this file are subject to the Mozilla Public License Version -- * 1.1 (the "License"); you may not use this file except in compliance with -- * the License. You may obtain a copy of the License at -- * http://www.mozilla.org/MPL/ -- * -- * Software distributed under the License is distributed on an "AS IS" basis, -- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -- * for the specific language governing rights and limitations under the -- * License. -- * -- * The Original Code is Mozilla Communicator. -- * -- * The Initial Developer of the Original Code is -- * Netscape Communications Corp. -- * Portions created by the Initial Developer are Copyright (C) 2003 -- * the Initial Developer. All Rights Reserved. -- * -- * Contributor(s): -- * Sean Su -- * Benjamin Smedberg -- * -- * Alternatively, the contents of this file may be used under the terms of -- * either the GNU General Public License Version 2 or later (the "GPL"), or -- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -- * in which case the provisions of the GPL or the LGPL are applicable instead -- * of those above. If you wish to allow use of your version of this file only -- * under the terms of either the GPL or the LGPL, and not to allow others to -- * use your version of this file under the terms of the MPL, indicate your -- * decision by deleting the provisions above and replace them with the notice -- * and other provisions required by the GPL or the LGPL. If you do not delete -- * the provisions above, a recipient may use your version of this file under -- * the terms of any one of the MPL, the GPL or the LGPL. -- * -- * ***** END LICENSE BLOCK ***** */ -- --#include "nsXPCOMGlue.h" -- --#include "nsAutoPtr.h" --#include "nsINIParser.h" --#include "nsVersionComparator.h" --#include "nsXPCOMPrivate.h" -- --#include --#include --#include --#include -- --#ifdef XP_WIN32 --# include --# include --# include --# define snprintf _snprintf --# define R_OK 04 --#elif defined(XP_OS2) --# define INCL_DOS --# include --#elif defined(XP_MACOSX) --# include --# include --# include --#elif defined(XP_UNIX) --# include --# include --# include --#endif -- --#include -- --/** -- * Like strncat, appends a buffer to another buffer. This is where the -- * similarity ends. Firstly, the "count" here is the total size of the buffer -- * (not the number of chars to append. Secondly, the function returns PR_FALSE -- * if the buffer is not long enough to hold the concatenated string. -- */ --static PRBool safe_strncat(char *dest, const char *append, PRUint32 count) --{ -- char *end = dest + count - 1; -- -- // skip to the end of dest -- while (*dest) -- ++dest; -- -- while (*append && dest < end) { -- *dest = *append; -- ++dest, ++append; -- } -- -- *dest = '\0'; -- -- return *append == '\0'; --} -- --#ifdef XP_WIN --static PRBool --CheckVersion(const PRUnichar* toCheck, -- const GREVersionRange *versions, -- PRUint32 versionsLength); --#endif --static PRBool --CheckVersion(const char* toCheck, -- const GREVersionRange *versions, -- PRUint32 versionsLength); -- -- --#if defined(XP_MACOSX) -- --static PRBool --GRE_FindGREFramework(const char* rootPath, -- const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char* buffer, PRUint32 buflen); -- --#elif defined(XP_UNIX) -- --static PRBool --GRE_GetPathFromConfigDir(const char* dirname, -- const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char* buffer, PRUint32 buflen); -- --static PRBool --GRE_GetPathFromConfigFile(const char* filename, -- const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char* buffer, PRUint32 buflen); -- --#elif defined(XP_WIN) -- --static PRBool --GRE_GetPathFromRegKey(HKEY aRegKey, -- const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char* buffer, PRUint32 buflen); -- --#endif -- --nsresult --GRE_GetGREPathWithProperties(const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char *aBuffer, PRUint32 aBufLen) --{ --#ifdef TARGET_XPCOM_ABI -- // append the ABI to the properties to match only binary -- // compatible GREs -- static const GREProperty kExtraProperty = -- { "abi", TARGET_XPCOM_ABI }; -- -- nsAutoArrayPtr allProperties(new GREProperty[propertiesLength + 1]); -- if (!allProperties) -- return NS_ERROR_OUT_OF_MEMORY; -- -- for (PRUint32 i=0; i= aBufLen) -- return NS_ERROR_FILE_NAME_TOO_LONG; -- -- strcpy(aBuffer, p); -- -- return NS_OK; -- } -- -- // the Gecko bits that sit next to the application or in the LD_LIBRARY_PATH -- env = getenv("USE_LOCAL_GRE"); -- if (env && *env) { -- *aBuffer = nsnull; -- return NS_OK; -- } -- --#ifdef XP_MACOSX -- aBuffer[0] = '\0'; -- -- // Check the bundle first, for /Contents/Frameworks/XUL.framework/libxpcom.dylib -- CFBundleRef appBundle = CFBundleGetMainBundle(); -- if (appBundle) { -- CFURLRef fwurl = CFBundleCopyPrivateFrameworksURL(appBundle); -- CFURLRef absfwurl = nsnull; -- if (fwurl) { -- absfwurl = CFURLCopyAbsoluteURL(fwurl); -- CFRelease(fwurl); -- } -- -- if (absfwurl) { -- CFURLRef xulurl = -- CFURLCreateCopyAppendingPathComponent(NULL, absfwurl, -- CFSTR(GRE_FRAMEWORK_NAME), -- PR_TRUE); -- -- if (xulurl) { -- CFURLRef xpcomurl = -- CFURLCreateCopyAppendingPathComponent(NULL, xulurl, -- CFSTR("libxpcom.dylib"), -- PR_FALSE); -- -- if (xpcomurl) { -- char tbuffer[MAXPATHLEN]; -- -- if (CFURLGetFileSystemRepresentation(xpcomurl, PR_TRUE, -- (UInt8*) tbuffer, -- sizeof(tbuffer)) && -- access(tbuffer, R_OK | X_OK) == 0) { -- if (!realpath(tbuffer, aBuffer)) { -- aBuffer[0] = '\0'; -- } -- } -- -- CFRelease(xpcomurl); -- } -- -- CFRelease(xulurl); -- } -- -- CFRelease(absfwurl); -- } -- } -- -- if (aBuffer[0]) -- return NS_OK; -- -- // Check ~/Library/Frameworks/XUL.framework/Versions//libxpcom.dylib -- const char *home = getenv("HOME"); -- if (home && *home && GRE_FindGREFramework(home, -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen)) { -- return NS_OK; -- } -- -- // Check /Library/Frameworks/XUL.framework/Versions//libxpcom.dylib -- if (GRE_FindGREFramework("", -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen)) { -- return NS_OK; -- } -- --#elif defined(XP_UNIX) -- env = getenv("MOZ_GRE_CONF"); -- if (env && GRE_GetPathFromConfigFile(env, -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen)) { -- return NS_OK; -- } -- -- env = getenv("HOME"); -- if (env && *env) { -- char buffer[MAXPATHLEN]; -- -- // Look in ~/.gre.config -- -- snprintf(buffer, sizeof(buffer), -- "%s" XPCOM_FILE_PATH_SEPARATOR GRE_CONF_NAME, env); -- -- if (GRE_GetPathFromConfigFile(buffer, -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen)) { -- return NS_OK; -- } -- -- // Look in ~/.gre.d/*.conf -- -- snprintf(buffer, sizeof(buffer), -- "%s" XPCOM_FILE_PATH_SEPARATOR GRE_USER_CONF_DIR, env); -- -- if (GRE_GetPathFromConfigDir(buffer, -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen)) { -- return NS_OK; -- } -- } -- -- // Look for a global /etc/gre.conf file -- if (GRE_GetPathFromConfigFile(GRE_CONF_PATH, -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen)) { -- return NS_OK; -- } -- -- // Look for a group of config files in /etc/gre.d/ -- if (GRE_GetPathFromConfigDir(GRE_CONF_DIR, -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen)) { -- return NS_OK; -- } -- --#elif defined(XP_WIN) -- HKEY hRegKey = NULL; -- -- // A couple of key points here: -- // 1. Note the usage of the "Software\\mozilla.org\\GRE" subkey - this allows -- // us to have multiple versions of GREs on the same machine by having -- // subkeys such as 1.0, 1.1, 2.0 etc. under it. -- // 2. In this sample below we're looking for the location of GRE version 1.2 -- // i.e. we're compatible with GRE 1.2 and we're trying to find it's install -- // location. -- // -- // Please see http://www.mozilla.org/projects/embedding/GRE.html for -- // more info. -- // -- if (::RegOpenKeyExW(HKEY_CURRENT_USER, GRE_WIN_REG_LOC, 0, -- KEY_READ, &hRegKey) == ERROR_SUCCESS) { -- PRBool ok = GRE_GetPathFromRegKey(hRegKey, -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen); -- ::RegCloseKey(hRegKey); -- -- if (ok) -- return NS_OK; -- } -- -- if (::RegOpenKeyExW(HKEY_LOCAL_MACHINE, GRE_WIN_REG_LOC, 0, -- KEY_ENUMERATE_SUB_KEYS, &hRegKey) == ERROR_SUCCESS) { -- PRBool ok = GRE_GetPathFromRegKey(hRegKey, -- versions, versionsLength, -- allProperties, allPropertiesLength, -- aBuffer, aBufLen); -- ::RegCloseKey(hRegKey); -- -- if (ok) -- return NS_OK; -- } --#endif -- -- return NS_ERROR_FAILURE; --} -- --static PRBool --CheckVersion(const char* toCheck, -- const GREVersionRange *versions, -- PRUint32 versionsLength) --{ -- -- for (const GREVersionRange *versionsEnd = versions + versionsLength; -- versions < versionsEnd; -- ++versions) { -- PRInt32 c = NS_CompareVersions(toCheck, versions->lower); -- if (c < 0) -- continue; -- -- if (!c && !versions->lowerInclusive) -- continue; -- -- c = NS_CompareVersions(toCheck, versions->upper); -- if (c > 0) -- continue; -- -- if (!c && !versions->upperInclusive) -- continue; -- -- return PR_TRUE; -- } -- -- return PR_FALSE; --} -- --#ifdef XP_WIN -- --// Allocate an array of characters using new[], converting from UTF8 to UTF-16. --// @note Use nsAutoArrayPtr for this result. -- --static PRUnichar* --ConvertUTF8toNewUTF16(const char *cstr) --{ -- int len = MultiByteToWideChar(CP_UTF8, 0, cstr, -1, NULL, 0); -- WCHAR *wstr = new WCHAR[len]; -- MultiByteToWideChar(CP_UTF8, 0, cstr, -1, wstr, len); -- return wstr; --} -- --typedef nsAutoArrayPtr AutoWString; -- --static PRBool --CheckVersion(const PRUnichar* toCheck, -- const GREVersionRange *versions, -- PRUint32 versionsLength) --{ -- for (const GREVersionRange *versionsEnd = versions + versionsLength; -- versions < versionsEnd; -- ++versions) { -- AutoWString wlower(ConvertUTF8toNewUTF16(versions->lower)); -- PRInt32 c = NS_CompareVersions(toCheck, wlower); -- if (c < 0) -- continue; -- -- if (!c && !versions->lowerInclusive) -- continue; -- -- AutoWString wupper(ConvertUTF8toNewUTF16(versions->upper)); -- c = NS_CompareVersions(toCheck, wupper); -- if (c > 0) -- continue; -- -- if (!c && !versions->upperInclusive) -- continue; -- -- return PR_TRUE; -- } -- -- return PR_FALSE; --} --#endif -- -- --#ifdef XP_MACOSX --PRBool --GRE_FindGREFramework(const char* rootPath, -- const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char* buffer, PRUint32 buflen) --{ -- PRBool found = PR_FALSE; -- -- snprintf(buffer, buflen, -- "%s/Library/Frameworks/" GRE_FRAMEWORK_NAME "/Versions", rootPath); -- DIR *dir = opendir(buffer); -- if (dir) { -- struct dirent *entry; -- while (!found && (entry = readdir(dir))) { -- if (CheckVersion(entry->d_name, versions, versionsLength)) { -- snprintf(buffer, buflen, -- "%s/Library/Frameworks/" GRE_FRAMEWORK_NAME -- "/Versions/%s/" XPCOM_DLL, rootPath, entry->d_name); -- if (access(buffer, R_OK | X_OK) == 0) -- found = PR_TRUE; -- } -- } -- -- closedir(dir); -- } -- -- if (found) -- return PR_TRUE; -- -- buffer[0] = '\0'; -- return PR_FALSE; --} -- --#elif defined(XP_UNIX) -- --static PRBool IsConfFile(const char *filename) --{ -- const char *dot = strrchr(filename, '.'); -- -- return (dot && strcmp(dot, ".conf") == 0); --} -- --PRBool --GRE_GetPathFromConfigDir(const char* dirname, -- const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char* buffer, PRUint32 buflen) --{ -- // Open the directory provided and try to read any files in that -- // directory that end with .conf. We look for an entry that might -- // point to the GRE that we're interested in. -- DIR *dir = opendir(dirname); -- if (!dir) -- return nsnull; -- -- PRBool found = PR_FALSE; -- struct dirent *entry; -- -- while (!found && (entry = readdir(dir))) { -- -- // Only look for files that end in .conf -- // IsConfFile will skip "." and ".." -- if (!IsConfFile(entry->d_name)) -- continue; -- -- char fullPath[MAXPATHLEN]; -- snprintf(fullPath, sizeof(fullPath), "%s" XPCOM_FILE_PATH_SEPARATOR "%s", -- dirname, entry->d_name); -- -- found = GRE_GetPathFromConfigFile(fullPath, -- versions, versionsLength, -- properties, propertiesLength, -- buffer, buflen); -- } -- -- closedir(dir); -- -- return found; --} -- --#define READ_BUFFER_SIZE 1024 -- --struct INIClosure --{ -- nsINIParser *parser; -- const GREVersionRange *versions; -- PRUint32 versionsLength; -- const GREProperty *properties; -- PRUint32 propertiesLength; -- char *pathBuffer; -- PRUint32 buflen; -- PRBool found; --}; -- --static PRBool --CheckINIHeader(const char *aHeader, void *aClosure) --{ -- nsresult rv; -- -- INIClosure *c = reinterpret_cast(aClosure); -- -- if (!CheckVersion(aHeader, c->versions, c->versionsLength)) -- return PR_TRUE; -- -- const GREProperty *properties = c->properties; -- const GREProperty *endProperties = properties + c->propertiesLength; -- for (; properties < endProperties; ++properties) { -- char buffer[MAXPATHLEN]; -- rv = c->parser->GetString(aHeader, properties->property, -- buffer, sizeof(buffer)); -- if (NS_FAILED(rv)) -- return PR_TRUE; -- -- if (strcmp(buffer, properties->value)) -- return PR_TRUE; -- } -- -- rv = c->parser->GetString(aHeader, "GRE_PATH", c->pathBuffer, c->buflen); -- if (NS_FAILED(rv)) -- return PR_TRUE; -- -- if (!safe_strncat(c->pathBuffer, "/" XPCOM_DLL, c->buflen) || -- access(c->pathBuffer, R_OK)) -- return PR_TRUE; -- -- // We found a good GRE! Stop looking. -- c->found = PR_TRUE; -- return PR_FALSE; --} -- --PRBool --GRE_GetPathFromConfigFile(const char* filename, -- const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char* pathBuffer, PRUint32 buflen) --{ -- nsINIParser parser; -- nsresult rv = parser.Init(filename); -- if (NS_FAILED(rv)) -- return PR_FALSE; -- -- INIClosure c = { -- &parser, -- versions, versionsLength, -- properties, propertiesLength, -- pathBuffer, buflen, -- PR_FALSE -- }; -- -- parser.GetSections(CheckINIHeader, &c); -- return c.found; --} -- --#elif defined(XP_WIN) -- --static PRBool --CopyWithEnvExpansion(PRUnichar* aDest, const PRUnichar* aSource, PRUint32 aBufLen, -- DWORD aType) --{ -- switch (aType) { -- case REG_SZ: -- if (wcslen(aSource) >= aBufLen) -- return PR_FALSE; -- -- wcscpy(aDest, aSource); -- return PR_TRUE; -- -- case REG_EXPAND_SZ: -- if (ExpandEnvironmentStringsW(aSource, aDest, aBufLen) > aBufLen) -- return PR_FALSE; -- -- return PR_TRUE; -- }; -- -- // Whoops! We expected REG_SZ or REG_EXPAND_SZ, what happened here? -- -- return PR_FALSE; --} -- --PRBool --GRE_GetPathFromRegKey(HKEY aRegKey, -- const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char* aBuffer, PRUint32 aBufLen) --{ -- // Formerly, GREs were registered at the registry key -- // HKLM/Software/mozilla.org/GRE/ valuepair GreHome=Path. -- // Nowadays, they are registered in any subkey of -- // Software/mozilla.org/GRE, with the following valuepairs: -- // Version= (REG_SZ) -- // GreHome= (REG_SZ or REG_EXPAND_SZ) -- // = (REG_SZ) -- // -- // Additional meta-info may be available in the future, including -- // localization info and other information which might be pertinent -- // to selecting one GRE over another. -- // -- // When a GRE is being registered, it should try to register itself at -- // HKLM/Software/mozilla.org/GRE/ first, to preserve compatibility -- // with older glue. If this key is already taken (i.e. there is more than -- // one GRE of that version installed), it should append a unique number to -- // the version, for example: -- // 1.1 (already in use), 1.1_1, 1.1_2, etc... -- -- DWORD i = 0; -- PRUnichar buffer[MAXPATHLEN + 1]; -- -- while (PR_TRUE) { -- PRUnichar name[MAXPATHLEN + 1]; -- DWORD nameLen = MAXPATHLEN; -- if (::RegEnumKeyExW(aRegKey, i, name, &nameLen, NULL, NULL, NULL, NULL) != -- ERROR_SUCCESS) { -- break; -- } -- -- HKEY subKey = NULL; -- if (::RegOpenKeyExW(aRegKey, name, 0, KEY_QUERY_VALUE, &subKey) != -- ERROR_SUCCESS) { -- continue; -- } -- -- PRUnichar version[40]; -- DWORD versionlen = 40; -- PRUnichar pathbuf[MAXPATHLEN + 1]; -- DWORD pathlen; -- DWORD pathtype; -- -- PRBool ok = PR_FALSE; -- -- if (::RegQueryValueExW(subKey, L"Version", NULL, NULL, -- (BYTE*) version, &versionlen) == ERROR_SUCCESS && -- CheckVersion(version, versions, versionsLength)) { -- -- ok = PR_TRUE; -- const GREProperty *props = properties; -- const GREProperty *propsEnd = properties + propertiesLength; -- for (; ok && props < propsEnd; ++props) { -- pathlen = MAXPATHLEN + 1; -- -- AutoWString wproperty(ConvertUTF8toNewUTF16(props->property)); -- AutoWString wvalue(ConvertUTF8toNewUTF16(props->value)); -- if (::RegQueryValueExW(subKey, wproperty, NULL, &pathtype, -- (BYTE*) pathbuf, &pathlen) != ERROR_SUCCESS || -- wcscmp(pathbuf, wvalue)) -- ok = PR_FALSE; -- } -- -- pathlen = sizeof(pathbuf); -- if (ok && -- (!::RegQueryValueExW(subKey, L"GreHome", NULL, &pathtype, -- (BYTE*) pathbuf, &pathlen) == ERROR_SUCCESS || -- !*pathbuf || -- !CopyWithEnvExpansion(buffer, pathbuf, MAXPATHLEN, pathtype))) { -- ok = PR_FALSE; -- } -- else if (!wcsncat(buffer, L"\\" LXPCOM_DLL, aBufLen) --#ifdef WINCE -- || (GetFileAttributesW(buffer) == INVALID_FILE_ATTRIBUTES) --#else -- || _waccess(buffer, R_OK) --#endif -- ) { -- ok = PR_FALSE; -- } -- } -- -- RegCloseKey(subKey); -- -- if (ok) { -- WideCharToMultiByte(CP_UTF8, 0, buffer, -1, aBuffer, aBufLen, NULL, NULL); -- return PR_TRUE; -- } -- -- ++i; -- } -- -- aBuffer[0] = '\0'; -- -- return PR_FALSE; --} --#endif // XP_WIN -diff --git a/xpcom/glue/objs.mk b/xpcom/glue/objs.mk ---- a/xpcom/glue/objs.mk -+++ b/xpcom/glue/objs.mk -@@ -51,17 +51,16 @@ XPCOM_GLUE_SRC_LCPPSRCS = \ - nsComponentManagerUtils.cpp \ - nsEnumeratorUtils.cpp \ - nsID.cpp \ - nsIInterfaceRequestorUtils.cpp \ - nsINIParser.cpp \ - nsISupportsImpl.cpp \ - nsMemory.cpp \ - nsWeakReference.cpp \ -- nsGREGlue.cpp \ - nsVersionComparator.cpp \ - nsTHashtable.cpp \ - nsQuickSort.cpp \ - nsVoidArray.cpp \ - nsTArray.cpp \ - nsThreadUtils.cpp \ - nsTObserverArray.cpp \ - nsCycleCollectionParticipant.cpp \ -diff --git a/xpcom/glue/standalone/nsXPCOMGlue.h b/xpcom/glue/standalone/nsXPCOMGlue.h ---- a/xpcom/glue/standalone/nsXPCOMGlue.h -+++ b/xpcom/glue/standalone/nsXPCOMGlue.h -@@ -36,64 +36,16 @@ - * - * ***** END LICENSE BLOCK ***** */ - - #ifndef nsXPCOMGlue_h__ - #define nsXPCOMGlue_h__ - - #include "nscore.h" - --class nsILocalFile; -- --/** -- * The following function is available in both the standalone and -- * dynamically linked versions of the glue. -- */ -- --struct GREVersionRange { -- const char *lower; -- PRBool lowerInclusive; -- const char *upper; -- PRBool upperInclusive; --}; -- --struct GREProperty { -- const char *property; -- const char *value; --}; -- --/** -- * Locate the path of the xpcom shared library from a GRE with specified -- * properties. -- * -- * @param versions An array of version ranges: if any version range -- * matches, the GRE is considered acceptable. -- * @param versionsLength The length of the versions array. -- * @param properties A null-terminated list of GRE property/value pairs -- * which must all be satisfied. -- * @param propertiesLength Length of the properties array. -- * @param buffer A buffer to be filled with the appropriate path. If -- * the "local" GRE is specified (via the USE_LOCAL_GRE -- * environment variable, for example), this buffer -- * will be set to the empty string. -- * @param buflen The length of buffer. This must be at least -- * PATH_MAX/MAXPATHLEN. -- * @throws NS_ERROR_FAILURE if an appropriate GRE could not be found. -- * @note The properties parameter is ignored on macintosh, because of the -- * manner in which the XUL frameworks are installed by version. -- * @note Currently this uses a "first-fit" algorithm, it does not select -- * the newest available GRE. -- */ --extern "C" NS_COM_GLUE nsresult --GRE_GetGREPathWithProperties(const GREVersionRange *versions, -- PRUint32 versionsLength, -- const GREProperty *properties, -- PRUint32 propertiesLength, -- char *buffer, PRUint32 buflen); -- - #ifdef XPCOM_GLUE - - /** - * The following functions are only available in the standalone glue. - */ - - /** - * Initialize the XPCOM glue by dynamically linking against the XPCOM -diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in ---- a/xulrunner/app/Makefile.in -+++ b/xulrunner/app/Makefile.in -@@ -68,30 +68,16 @@ endif - - ifdef TARGET_XPCOM_ABI - DEFINES += -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\" - endif - - - CPPSRCS = nsXULRunnerApp.cpp - --ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) --CPPSRCS += nsRegisterGREWin.cpp --else --ifeq (OS2,$(OS_ARCH)) --CPPSRCS += nsRegisterGREVoid.cpp --else --ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) --CPPSRCS += nsRegisterGREVoid.cpp --else --CPPSRCS += nsRegisterGREUnix.cpp --endif --endif --endif -- - LOCAL_INCLUDES += \ - -I$(topsrcdir)/toolkit/xre \ - -I$(topsrcdir)/toolkit/profile \ - -I$(topsrcdir)/xpcom/base \ - $(NULL) - - ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) - TK_LIBS := -framework Cocoa $(TK_LIBS) -diff --git a/xulrunner/app/nsRegisterGRE.h b/xulrunner/app/nsRegisterGRE.h -deleted file mode 100644 ---- a/xulrunner/app/nsRegisterGRE.h -+++ /dev/null -@@ -1,58 +0,0 @@ --/* ***** BEGIN LICENSE BLOCK ***** -- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -- * -- * The contents of this file are subject to the Mozilla Public License Version -- * 1.1 (the "License"); you may not use this file except in compliance with -- * the License. You may obtain a copy of the License at -- * http://www.mozilla.org/MPL/ -- * -- * Software distributed under the License is distributed on an "AS IS" basis, -- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -- * for the specific language governing rights and limitations under the -- * License. -- * -- * The Original Code is Mozilla XULRunner. -- * -- * The Initial Developer of the Original Code is -- * Benjamin Smedberg . -- * -- * Portions created by the Initial Developer are Copyright (C) 2005 -- * the Initial Developer. All Rights Reserved. -- * -- * Contributor(s): -- * -- * Alternatively, the contents of this file may be used under the terms of -- * either the GNU General Public License Version 2 or later (the "GPL"), or -- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -- * in which case the provisions of the GPL or the LGPL are applicable instead -- * of those above. If you wish to allow use of your version of this file only -- * under the terms of either the GPL or the LGPL, and not to allow others to -- * use your version of this file under the terms of the MPL, indicate your -- * decision by deleting the provisions above and replace them with the notice -- * and other provisions required by the GPL or the LGPL. If you do not delete -- * the provisions above, a recipient may use your version of this file under -- * the terms of any one of the MPL, the GPL or the LGPL. -- * -- * ***** END LICENSE BLOCK ***** */ -- --#ifndef nsRegisterGRE_h__ --#define nsRegisterGRE_h__ -- --#include "nscore.h" --#include "nsStringAPI.h" --class nsIFile; --struct GREProperty; -- --/** -- * @return PR_TRUE on success -- */ --NS_HIDDEN_(PRBool) --RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -- const GREProperty *aProperties, PRUint32 aPropertiesLen, -- const char *aGREMilestone); -- --NS_HIDDEN_(void) --UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation, -- const char *aGREMilestone); -- --#endif // nsRegisterGRE_h__ -diff --git a/xulrunner/app/nsRegisterGREUnix.cpp b/xulrunner/app/nsRegisterGREUnix.cpp -deleted file mode 100644 ---- a/xulrunner/app/nsRegisterGREUnix.cpp -+++ /dev/null -@@ -1,272 +0,0 @@ --/* ***** BEGIN LICENSE BLOCK ***** -- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -- * -- * The contents of this file are subject to the Mozilla Public License Version -- * 1.1 (the "License"); you may not use this file except in compliance with -- * the License. You may obtain a copy of the License at -- * http://www.mozilla.org/MPL/ -- * -- * Software distributed under the License is distributed on an "AS IS" basis, -- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -- * for the specific language governing rights and limitations under the -- * License. -- * -- * The Original Code is Mozilla XULRunner. -- * -- * The Initial Developer of the Original Code is -- * Benjamin Smedberg . -- * -- * Portions created by the Initial Developer are Copyright (C) 2005 -- * the Initial Developer. All Rights Reserved. -- * -- * Contributor(s): -- * -- * Alternatively, the contents of this file may be used under the terms of -- * either the GNU General Public License Version 2 or later (the "GPL"), or -- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -- * in which case the provisions of the GPL or the LGPL are applicable instead -- * of those above. If you wish to allow use of your version of this file only -- * under the terms of either the GPL or the LGPL, and not to allow others to -- * use your version of this file under the terms of the MPL, indicate your -- * decision by deleting the provisions above and replace them with the notice -- * and other provisions required by the GPL or the LGPL. If you do not delete -- * the provisions above, a recipient may use your version of this file under -- * the terms of any one of the MPL, the GPL or the LGPL. -- * -- * ***** END LICENSE BLOCK ***** */ -- --#include "nsRegisterGRE.h" --#include "nsXPCOMGlue.h" -- --#include "nsXPCOM.h" --#include "nsIFile.h" --#include "nsILocalFile.h" --#include "mozilla/FileUtils.h" -- --#include "nsAppRunner.h" // for MAXPATHLEN --#include "nsStringAPI.h" --#include "nsINIParser.h" --#include "nsCOMPtr.h" -- --#include "prio.h" --#include "prprf.h" --#include "prenv.h" -- --#include --#include -- --// If we can't register .conf, we try to create a unique filename --// by looping through _.conf, but if something is seriously wrong --// we stop at 1000 --#define UNIQ_LOOP_LIMIT 1000 -- --using namespace mozilla; -- --static const char kRegFileGlobal[] = "global.reginfo"; --static const char kRegFileUser[] = "user.reginfo"; -- --static PRBool --MakeConfFile(const char *regfile, const nsCString &greHome, -- const GREProperty *aProperties, PRUint32 aPropertiesLen, -- const char *aGREMilestone) --{ -- // If the file exists, don't create it again! -- if (access(regfile, R_OK) == 0) -- return PR_FALSE; -- -- PRBool ok = PR_TRUE; -- -- { // scope "fd" so that we can delete the file if something goes wrong -- AutoFDClose fd = PR_Open(regfile, PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, -- 0664); -- if (!fd) -- return PR_FALSE; -- -- static const char kHeader[] = -- "# Registration file generated by xulrunner. Do not edit.\n\n" -- "[%s]\n" -- "GRE_PATH=%s\n"; -- -- if (PR_fprintf(fd, kHeader, aGREMilestone, greHome.get()) <= 0) -- ok = PR_FALSE; -- -- for (PRUint32 i = 0; i < aPropertiesLen; ++i) { -- if (PR_fprintf(fd, "%s=%s\n", -- aProperties[i].property, aProperties[i].value) <= 0) -- ok = PR_FALSE; -- } -- } -- -- if (!ok) -- PR_Delete(regfile); -- -- return ok; --} -- -- --PRBool --RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -- const GREProperty *aProperties, PRUint32 aPropertiesLen, -- const char *aGREMilestone) --{ -- // Register ourself in /etc/gre.d or ~/.gre.d/ and record what key we created -- // for future unregistration. -- -- nsresult rv; -- -- char root[MAXPATHLEN] = "/etc/gre.d"; -- -- if (!aRegisterGlobally) { -- char *home = PR_GetEnv("HOME"); -- if (!home || !*home) -- return PR_FALSE; -- -- PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); -- } -- -- nsCString greHome; -- rv = aLocation->GetNativePath(greHome); -- if (NS_FAILED(rv)) -- return rv; -- -- nsCOMPtr savedInfoFile; -- aLocation->Clone(getter_AddRefs(savedInfoFile)); -- nsCOMPtr localSaved(do_QueryInterface(savedInfoFile)); -- if (!localSaved) -- return PR_FALSE; -- -- const char *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; -- localSaved->AppendNative(nsDependentCString(infoname)); -- -- AutoFDClose fd; -- rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_RDWR, 0664, &fd); -- // XXX report error? -- if (NS_FAILED(rv)) -- return PR_FALSE; -- -- char keyName[MAXPATHLEN]; -- -- PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); -- if (r < 0) -- return PR_FALSE; -- -- char regfile[MAXPATHLEN]; -- -- if (r > 0) { -- keyName[r] = '\0'; -- -- PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, keyName); -- -- // There was already a .reginfo file, let's see if we are already -- // registered. -- if (access(regfile, R_OK) == 0) { -- fprintf(stderr, "Warning: Configuration file '%s' already exists.\n" -- "No action was performed.\n", regfile); -- return PR_FALSE; -- } -- -- rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd); -- if (NS_FAILED(rv)) -- return PR_FALSE; -- } -- -- if (access(root, R_OK | X_OK) && -- mkdir(root, 0775)) { -- fprintf(stderr, "Error: could not create '%s'.\n", -- root); -- return PR_FALSE; -- } -- -- PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, aGREMilestone); -- if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen, -- aGREMilestone)) { -- PR_fprintf(fd, "%s", aGREMilestone); -- return PR_TRUE; -- } -- -- for (int i = 0; i < UNIQ_LOOP_LIMIT; ++i) { -- static char buildID[30]; -- sprintf(buildID, "%s_%i", aGREMilestone, i); -- -- PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, buildID); -- -- if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen, -- aGREMilestone)) { -- PR_Write(fd, buildID, strlen(buildID)); -- return PR_TRUE; -- } -- } -- -- return PR_FALSE; --} -- --void --UnregisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -- const char *aGREMilestone) --{ -- nsresult rv; -- -- char root[MAXPATHLEN] = "/etc/gre.d"; -- -- if (!aRegisterGlobally) { -- char *home = PR_GetEnv("HOME"); -- if (!home || !*home) -- return; -- -- PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); -- } -- -- nsCOMPtr savedInfoFile; -- aLocation->Clone(getter_AddRefs(savedInfoFile)); -- nsCOMPtr localSaved (do_QueryInterface(savedInfoFile)); -- if (!localSaved) -- return; -- -- const char *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; -- localSaved->AppendNative(nsDependentCString(infoname)); -- -- PRFileDesc* fd = nsnull; -- rv = localSaved->OpenNSPRFileDesc(PR_RDONLY, 0, &fd); -- if (NS_FAILED(rv)) { -- // XXX report error? -- return; -- } -- -- char keyName[MAXPATHLEN]; -- PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); -- PR_Close(fd); -- -- localSaved->Remove(PR_FALSE); -- -- if (r <= 0) -- return; -- -- keyName[r] = '\0'; -- -- char regFile[MAXPATHLEN]; -- PR_snprintf(regFile, MAXPATHLEN, "%s/%s.conf", root, keyName); -- -- nsCOMPtr lf; -- rv = NS_NewNativeLocalFile(nsDependentCString(regFile), PR_FALSE, -- getter_AddRefs(lf)); -- if (NS_FAILED(rv)) -- return; -- -- nsINIParser p; -- rv = p.Init(lf); -- if (NS_FAILED(rv)) -- return; -- -- rv = p.GetString(aGREMilestone, "GRE_PATH", root, MAXPATHLEN); -- if (NS_FAILED(rv)) -- return; -- -- rv = NS_NewNativeLocalFile(nsDependentCString(root), PR_TRUE, -- getter_AddRefs(lf)); -- if (NS_FAILED(rv)) -- return; -- -- PRBool eq; -- if (NS_SUCCEEDED(aLocation->Equals(lf, &eq)) && eq) -- PR_Delete(regFile); --} -diff --git a/xulrunner/app/nsRegisterGREVoid.cpp b/xulrunner/app/nsRegisterGREVoid.cpp -deleted file mode 100644 ---- a/xulrunner/app/nsRegisterGREVoid.cpp -+++ /dev/null -@@ -1,57 +0,0 @@ --/* ***** BEGIN LICENSE BLOCK ***** -- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -- * -- * The contents of this file are subject to the Mozilla Public License Version -- * 1.1 (the "License"); you may not use this file except in compliance with -- * the License. You may obtain a copy of the License at -- * http://www.mozilla.org/MPL/ -- * -- * Software distributed under the License is distributed on an "AS IS" basis, -- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -- * for the specific language governing rights and limitations under the -- * License. -- * -- * The Original Code is Mozilla XULRunner. -- * -- * The Initial Developer of the Original Code is -- * Benjamin Smedberg . -- * -- * Portions created by the Initial Developer are Copyright (C) 2005 -- * the Initial Developer. All Rights Reserved. -- * -- * Contributor(s): -- * -- * Alternatively, the contents of this file may be used under the terms of -- * either the GNU General Public License Version 2 or later (the "GPL"), or -- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -- * in which case the provisions of the GPL or the LGPL are applicable instead -- * of those above. If you wish to allow use of your version of this file only -- * under the terms of either the GPL or the LGPL, and not to allow others to -- * use your version of this file under the terms of the MPL, indicate your -- * decision by deleting the provisions above and replace them with the notice -- * and other provisions required by the GPL or the LGPL. If you do not delete -- * the provisions above, a recipient may use your version of this file under -- * the terms of any one of the MPL, the GPL or the LGPL. -- * -- * ***** END LICENSE BLOCK ***** */ -- --#include "nsRegisterGRE.h" -- --#include --#include -- --int --RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -- const GREProperty *aProperties, PRUint32 aPropertiesLen, -- const char *aGREMilestone) --{ -- fprintf(stderr, "Registration not implemented on this platform!\n"); -- return 1; --} -- --void --UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation, -- const char *aGREMilestone) --{ -- fprintf(stderr, "Registration not implemented on this platform!\n"); --} -diff --git a/xulrunner/app/nsRegisterGREWin.cpp b/xulrunner/app/nsRegisterGREWin.cpp -deleted file mode 100644 ---- a/xulrunner/app/nsRegisterGREWin.cpp -+++ /dev/null -@@ -1,288 +0,0 @@ --/* ***** BEGIN LICENSE BLOCK ***** -- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -- * -- * The contents of this file are subject to the Mozilla Public License Version -- * 1.1 (the "License"); you may not use this file except in compliance with -- * the License. You may obtain a copy of the License at -- * http://www.mozilla.org/MPL/ -- * -- * Software distributed under the License is distributed on an "AS IS" basis, -- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -- * for the specific language governing rights and limitations under the -- * License. -- * -- * The Original Code is Mozilla XULRunner. -- * -- * The Initial Developer of the Original Code is -- * Benjamin Smedberg . -- * -- * Portions created by the Initial Developer are Copyright (C) 2005 -- * the Initial Developer. All Rights Reserved. -- * -- * Contributor(s): -- * -- * Alternatively, the contents of this file may be used under the terms of -- * either the GNU General Public License Version 2 or later (the "GPL"), or -- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -- * in which case the provisions of the GPL or the LGPL are applicable instead -- * of those above. If you wish to allow use of your version of this file only -- * under the terms of either the GPL or the LGPL, and not to allow others to -- * use your version of this file under the terms of the MPL, indicate your -- * decision by deleting the provisions above and replace them with the notice -- * and other provisions required by the GPL or the LGPL. If you do not delete -- * the provisions above, a recipient may use your version of this file under -- * the terms of any one of the MPL, the GPL or the LGPL. -- * -- * ***** END LICENSE BLOCK ***** */ -- --#include "nsRegisterGRE.h" -- --#include "nsXPCOM.h" --#include "nsIFile.h" --#include "nsILocalFile.h" -- --#include "nsAppRunner.h" // for MAXPATHLEN --#include "nsStringAPI.h" --#include "nsXPCOMGlue.h" --#include "nsCOMPtr.h" -- --#include "prio.h" -- --#include --#include "malloc.h" -- --static const wchar_t kRegKeyRoot[] = L"Software\\mozilla.org\\GRE"; --static const wchar_t kRegFileGlobal[] = L"global.reginfo"; --static const wchar_t kRegFileUser[] = L"user.reginfo"; -- --static nsresult --MakeVersionKey(HKEY root, const wchar_t* keyname, const nsString &grehome, -- const GREProperty *aProperties, PRUint32 aPropertiesLen, -- const wchar_t *aGREMilestone) --{ -- HKEY subkey; -- DWORD disp; -- -- if (::RegCreateKeyExW(root, keyname, NULL, NULL, 0, KEY_WRITE, NULL, -- &subkey, &disp) != ERROR_SUCCESS) -- return NS_ERROR_FAILURE; -- -- if (disp != REG_CREATED_NEW_KEY) { -- ::RegCloseKey(subkey); -- return NS_ERROR_FAILURE; -- } -- -- PRBool failed = PR_FALSE; -- failed |= ::RegSetValueExW(subkey, L"Version", NULL, REG_SZ, -- (BYTE*) aGREMilestone, -- sizeof(PRUnichar) * (wcslen(aGREMilestone) + 1)) -- != ERROR_SUCCESS; -- failed |= ::RegSetValueExW(subkey, L"GreHome", NULL, REG_SZ, -- (BYTE*) grehome.get(), -- sizeof(PRUnichar) * (grehome.Length() + 1)) -- != ERROR_SUCCESS; -- -- for (PRUint32 i = 0; i < aPropertiesLen; ++i) { -- // Properties should be ascii only -- NS_ConvertASCIItoUTF16 prop(aProperties[i].property); -- NS_ConvertASCIItoUTF16 val(aProperties[i].value); -- failed |= ::RegSetValueExW(subkey, prop.get(), NULL, REG_SZ, -- (BYTE*) val.get(), -- sizeof(wchar_t)*(val.Length()+1) -- ) != ERROR_SUCCESS; -- } -- -- ::RegCloseKey(subkey); -- -- if (failed) { -- // we created a key but couldn't fill it properly: delete it -- ::RegDeleteKeyW(root, keyname); -- return NS_ERROR_FAILURE; -- } -- -- return NS_OK; --} -- --int --RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -- const GREProperty *aProperties, PRUint32 aPropertiesLen, -- const char *aGREMilestoneAscii) --{ -- // Register ourself in the windows registry, and record what key we created -- // for future unregistration. -- -- nsresult rv; -- PRBool irv; -- int i; -- NS_ConvertASCIItoUTF16 aGREMilestone(aGREMilestoneAscii); -- nsString greHome; -- rv = aLocation->GetPath(greHome); -- if (NS_FAILED(rv)) -- return rv; -- -- nsCOMPtr savedInfoFile; -- aLocation->Clone(getter_AddRefs(savedInfoFile)); -- nsCOMPtr localSaved(do_QueryInterface(savedInfoFile)); -- if (!localSaved) -- return PR_FALSE; -- -- const wchar_t *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; -- localSaved->Append(nsDependentString(infoname)); -- -- PRFileDesc* fd = nsnull; -- rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_RDWR, 0664, &fd); -- if (NS_FAILED(rv)) { -- // XXX report error? -- return PR_FALSE; -- } -- -- HKEY rootKey = NULL; -- wchar_t keyName[MAXPATHLEN]; -- PRInt32 r; -- -- if (::RegCreateKeyExW(aRegisterGlobally ? HKEY_LOCAL_MACHINE : -- HKEY_CURRENT_USER, -- kRegKeyRoot, NULL, NULL, 0, KEY_WRITE, -- NULL, &rootKey, NULL) != ERROR_SUCCESS) { -- irv = PR_FALSE; -- goto reg_end; -- } -- -- r = PR_Read(fd, keyName, MAXPATHLEN); -- if (r < 0) { -- irv = PR_FALSE; -- goto reg_end; -- } -- -- if (r > 0) { -- keyName[r] = '\0'; -- -- // There was already a .reginfo file, let's see if we are already -- // registered. -- HKEY existing = NULL; -- if (::RegOpenKeyExW(rootKey, keyName, NULL, KEY_QUERY_VALUE, &existing) == -- ERROR_SUCCESS) { -- fprintf(stderr, "Warning: Registry key Software\\mozilla.org\\GRE\\%s already exists.\n" -- "No action was performed.\n", -- keyName); -- irv = PR_FALSE; -- goto reg_end; -- } -- -- PR_Close(fd); -- fd = nsnull; -- -- rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd); -- if (NS_FAILED(rv)) { -- // XXX report error? -- irv = PR_FALSE; -- goto reg_end; -- } -- } -- -- wcscpy(keyName, aGREMilestone.get()); -- rv = MakeVersionKey(rootKey, keyName, greHome, aProperties, aPropertiesLen, -- aGREMilestone.get()); -- if (NS_SUCCEEDED(rv)) { -- NS_ConvertUTF16toUTF8 keyNameAscii(keyName); -- PR_Write(fd, keyNameAscii.get(), sizeof(char)*keyNameAscii.Length()); -- irv = PR_TRUE; -- goto reg_end; -- } -- -- for (i = 0; i < 1000; ++i) { -- swprintf(keyName, L"%s_%i", aGREMilestone.get(), i); -- rv = MakeVersionKey(rootKey, keyName, greHome, -- aProperties, aPropertiesLen, -- aGREMilestone.get()); -- if (NS_SUCCEEDED(rv)) { -- NS_ConvertUTF16toUTF8 keyNameAscii(keyName); -- PR_Write(fd, keyNameAscii.get(), sizeof(char)*keyNameAscii.Length()); -- irv = PR_TRUE; -- goto reg_end; -- } -- } -- -- irv = PR_FALSE; -- --reg_end: -- if (fd) -- PR_Close(fd); -- -- if (rootKey) -- ::RegCloseKey(rootKey); -- -- return irv; --} -- --void --UnregisterXULRunner(PRBool aGlobal, nsIFile* aLocation, -- const char *aGREMilestone) --{ -- nsCOMPtr savedInfoFile; -- aLocation->Clone(getter_AddRefs(savedInfoFile)); -- nsCOMPtr localSaved (do_QueryInterface(savedInfoFile)); -- if (!localSaved) -- return; -- -- const wchar_t *infoname = aGlobal ? kRegFileGlobal : kRegFileUser; -- localSaved->Append(nsDependentString(infoname)); -- -- PRFileDesc* fd = nsnull; -- nsresult rv = localSaved->OpenNSPRFileDesc(PR_RDONLY, 0, &fd); -- if (NS_FAILED(rv)) { -- // XXX report error? -- return; -- } -- -- wchar_t keyName[MAXPATHLEN]; -- PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); -- PR_Close(fd); -- -- localSaved->Remove(PR_FALSE); -- -- if (r <= 0) -- return; -- -- keyName[r] = '\0'; -- -- HKEY rootKey = NULL; -- if (::RegOpenKeyExW(aGlobal ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, -- kRegKeyRoot, 0, KEY_READ, &rootKey) != ERROR_SUCCESS) -- return; -- -- HKEY subKey = NULL; -- if (::RegOpenKeyExW(rootKey, keyName, 0, KEY_READ, &subKey) == ERROR_SUCCESS) { -- -- char regpath[MAXPATHLEN]; -- DWORD reglen = MAXPATHLEN; -- -- if (::RegQueryValueExW(subKey, L"GreHome", NULL, NULL, -- (BYTE*) regpath, ®len) == ERROR_SUCCESS) { -- -- nsCOMPtr regpathfile; -- rv = NS_NewNativeLocalFile(nsDependentCString(regpath), PR_FALSE, -- getter_AddRefs(regpathfile)); -- -- PRBool eq; -- if (NS_SUCCEEDED(rv) && -- NS_SUCCEEDED(aLocation->Equals(regpathfile, &eq)) && !eq) { -- // We think we registered for this key, but it doesn't point to -- // us any more! -- fprintf(stderr, "Warning: Registry key Software\\mozilla.org\\GRE\\%s points to\n" -- "alternate path '%s'; unregistration was not successful.\n", -- keyName, regpath); -- -- ::RegCloseKey(subKey); -- ::RegCloseKey(rootKey); -- -- return; -- } -- } -- -- ::RegCloseKey(subKey); -- } -- -- ::RegDeleteKeyW(rootKey, keyName); -- ::RegCloseKey(rootKey); --} -diff --git a/xulrunner/app/nsXULRunnerApp.cpp b/xulrunner/app/nsXULRunnerApp.cpp ---- a/xulrunner/app/nsXULRunnerApp.cpp -+++ b/xulrunner/app/nsXULRunnerApp.cpp -@@ -38,17 +38,16 @@ - #include - #include - #ifdef XP_WIN - #include - #endif - - #include "nsXULAppAPI.h" - #include "nsXPCOMGlue.h" --#include "nsRegisterGRE.h" - #include "nsAppRunner.h" - #include "nsILocalFile.h" - #include "nsIXULAppInstall.h" - #include "nsCOMPtr.h" - #include "nsMemory.h" - #include "nsCRTGlue.h" - #include "nsStringAPI.h" - #include "nsServiceManagerUtils.h" -@@ -256,26 +255,16 @@ InstallXULApp(nsIFile* aXULRunnerDir, - NS_ShutdownXPCOM(nsnull); - - if (NS_FAILED(rv)) - return 3; - - return 0; - } - --static const GREProperty kGREProperties[] = { -- { "xulrunner", "true" } --#ifdef TARGET_XPCOM_ABI -- , { "abi", TARGET_XPCOM_ABI } --#endif --#ifdef MOZ_JAVAXPCOM -- , { "javaxpcom", "1" } --#endif --}; -- - class AutoAppData - { - public: - AutoAppData(nsILocalFile* aINIFile) : mAppData(nsnull) { - nsresult rv = XRE_CreateAppData(aINIFile, &mAppData); - if (NS_FAILED(rv)) - mAppData = nsnull; - } -@@ -312,77 +301,16 @@ int main(int argc, char* argv[]) - } - - if (argc > 1) { - nsCAutoString milestone; - nsresult rv = GetGREVersion(argv[0], &milestone, nsnull); - if (NS_FAILED(rv)) - return 2; - -- PRBool registerGlobal = IsArg(argv[1], "register-global"); -- PRBool registerUser = IsArg(argv[1], "register-user"); -- if (registerGlobal || registerUser) { -- if (argc != 2) { -- Usage(argv[0]); -- return 1; -- } -- -- nsCOMPtr regDir; -- rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); -- if (NS_FAILED(rv)) -- return 2; -- -- return RegisterXULRunner(registerGlobal, regDir, -- kGREProperties, -- NS_ARRAY_LENGTH(kGREProperties), -- milestone.get()) ? 0 : 2; -- } -- -- registerGlobal = IsArg(argv[1], "unregister-global"); -- registerUser = IsArg(argv[1], "unregister-user"); -- if (registerGlobal || registerUser) { -- if (argc != 2) { -- Usage(argv[0]); -- return 1; -- } -- -- nsCOMPtr regDir; -- rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); -- if (NS_FAILED(rv)) -- return 2; -- -- UnregisterXULRunner(registerGlobal, regDir, milestone.get()); -- return 0; -- } -- -- if (IsArg(argv[1], "find-gre")) { -- if (argc != 3) { -- Usage(argv[0]); -- return 1; -- } -- -- char path[MAXPATHLEN]; -- static const GREVersionRange vr = { -- argv[2], PR_TRUE, -- argv[2], PR_TRUE -- }; -- static const GREProperty kProperties[] = { -- { "xulrunner", "true" } -- }; -- -- rv = GRE_GetGREPathWithProperties(&vr, 1, kProperties, -- NS_ARRAY_LENGTH(kProperties), -- path, sizeof(path)); -- if (NS_FAILED(rv)) -- return 1; -- -- printf("%s\n", path); -- return 0; -- } -- - if (IsArg(argv[1], "gre-version")) { - if (argc != 2) { - Usage(argv[0]); - return 1; - } - - printf("%s\n", milestone.get()); - return 0; -diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in ---- a/xulrunner/installer/Makefile.in -+++ b/xulrunner/installer/Makefile.in -@@ -62,29 +62,16 @@ PKG_DMG_SOURCE = $(STAGEPATH)xulrunner-p - endif - - include $(topsrcdir)/config/rules.mk - - INSTALL_SDK = 1 - - include $(topsrcdir)/toolkit/mozapps/installer/packager.mk - --$(MOZILLA_VERSION).system.conf: $(topsrcdir)/config/milestone.txt Makefile -- printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \ -- $(MOZILLA_VERSION) $(installdir) $(TARGET_XPCOM_ABI)> $@ -- --ifndef SKIP_GRE_REGISTRATION --# to register xulrunner per-user, override this with $HOME/.gre.d --regdir = /etc/gre.d -- --install:: $(MOZILLA_VERSION).system.conf -- $(NSINSTALL) -D $(DESTDIR)$(regdir) -- $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(regdir) --endif -- - # Add pkg-config files to the install:: target - - pkg_config_files = \ - libxul.pc \ - libxul-embedding.pc \ - mozilla-js.pc \ - mozilla-plugin.pc \ - mozilla-gtkmozembed.pc \ -diff --git a/xulrunner/stub/nsXULStub.cpp b/xulrunner/stub/nsXULStub.cpp ---- a/xulrunner/stub/nsXULStub.cpp -+++ b/xulrunner/stub/nsXULStub.cpp -@@ -430,64 +430,19 @@ main(int argc, char **argv) - // Forward the command-line and bail out - ForwardToWindow(wnd); - return 0; - } - } - #endif - - if (!greFound) { -- char minVersion[VERSION_MAXLEN]; -- -- // If a gecko maxVersion is not specified, we assume that the app uses only -- // frozen APIs, and is therefore compatible with any xulrunner 1.x. -- char maxVersion[VERSION_MAXLEN] = "1.*"; -- -- GREVersionRange range = { -- minVersion, -- PR_TRUE, -- maxVersion, -- PR_TRUE -- }; -- -- rv = parser.GetString("Gecko", "MinVersion", minVersion, sizeof(minVersion)); -- if (NS_FAILED(rv)) { -- fprintf(stderr, -- "The application.ini does not specify a [Gecko] MinVersion\n"); -+ Output(PR_FALSE, -+ "Could not find the Mozilla runtime.\n"); - return 1; -- } -- -- rv = parser.GetString("Gecko", "MaxVersion", maxVersion, sizeof(maxVersion)); -- if (NS_SUCCEEDED(rv)) -- range.upperInclusive = PR_TRUE; -- -- static const GREProperty kProperties[] = { -- { "xulrunner", "true" } -- }; -- -- rv = GRE_GetGREPathWithProperties(&range, 1, -- kProperties, NS_ARRAY_LENGTH(kProperties), -- greDir, sizeof(greDir)); -- if (NS_FAILED(rv)) { -- // XXXbsmedberg: Do something much smarter here: notify the -- // user/offer to download/? -- -- Output(PR_FALSE, -- "Could not find compatible GRE between version %s and %s.\n", -- range.lower, range.upper); -- return 1; -- } --#ifdef XP_UNIX -- // Using a symlinked greDir will fail during startup. Not sure why, but if -- // we resolve the symlink, everything works as expected. -- char resolved_greDir[MAXPATHLEN] = ""; -- if (realpath(greDir, resolved_greDir) && *resolved_greDir) { -- strncpy(greDir, resolved_greDir, MAXPATHLEN); -- } --#endif - } - - #ifdef XP_OS2 - // On OS/2 we need to set BEGINLIBPATH to be able to find XULRunner DLLs - strcpy(tmpPath, greDir); - lastSlash = strrchr(tmpPath, PATH_SEPARATOR_CHAR); - if (lastSlash) { - *lastSlash = '\0'; - diff --git a/firefox-6.0-xulstub.patch b/firefox-6.0-xulstub.patch new file mode 100644 index 0000000..586c2b5 --- /dev/null +++ b/firefox-6.0-xulstub.patch @@ -0,0 +1,1728 @@ +diff -up xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp +--- xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp.xulstub 2011-08-16 09:57:54.550206534 +0200 ++++ xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp 2011-08-16 09:57:54.550206534 +0200 +@@ -0,0 +1,760 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Mozilla Communicator. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corp. ++ * Portions created by the Initial Developer are Copyright (C) 2003 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Sean Su ++ * Benjamin Smedberg ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsXPCOMGlue.h" ++ ++#include "nsAutoPtr.h" ++#include "nsINIParser.h" ++#include "nsVersionComparator.h" ++#include "nsXPCOMPrivate.h" ++ ++#include ++#include ++#include ++#include ++ ++#ifdef XP_WIN32 ++# include ++# include ++# include ++# define snprintf _snprintf ++# define R_OK 04 ++#elif defined(XP_OS2) ++# define INCL_DOS ++# include ++#elif defined(XP_MACOSX) ++# include ++# include ++# include ++#elif defined(XP_UNIX) ++# include ++# include ++# include ++#endif ++ ++#include ++ ++/** ++ * Like strncat, appends a buffer to another buffer. This is where the ++ * similarity ends. Firstly, the "count" here is the total size of the buffer ++ * (not the number of chars to append. Secondly, the function returns PR_FALSE ++ * if the buffer is not long enough to hold the concatenated string. ++ */ ++static PRBool safe_strncat(char *dest, const char *append, PRUint32 count) ++{ ++ char *end = dest + count - 1; ++ ++ // skip to the end of dest ++ while (*dest) ++ ++dest; ++ ++ while (*append && dest < end) { ++ *dest = *append; ++ ++dest, ++append; ++ } ++ ++ *dest = '\0'; ++ ++ return *append == '\0'; ++} ++ ++#ifdef XP_WIN ++static PRBool ++CheckVersion(const PRUnichar* toCheck, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength); ++#endif ++static PRBool ++CheckVersion(const char* toCheck, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength); ++ ++ ++#if defined(XP_MACOSX) ++ ++static PRBool ++GRE_FindGREFramework(const char* rootPath, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char* buffer, PRUint32 buflen); ++ ++#elif defined(XP_UNIX) ++ ++static PRBool ++GRE_GetPathFromConfigDir(const char* dirname, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char* buffer, PRUint32 buflen); ++ ++static PRBool ++GRE_GetPathFromConfigFile(const char* filename, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char* buffer, PRUint32 buflen); ++ ++#elif defined(XP_WIN) ++ ++static PRBool ++GRE_GetPathFromRegKey(HKEY aRegKey, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char* buffer, PRUint32 buflen); ++ ++#endif ++ ++nsresult ++GRE_GetGREPathWithProperties(const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char *aBuffer, PRUint32 aBufLen) ++{ ++#ifdef TARGET_XPCOM_ABI ++ // append the ABI to the properties to match only binary ++ // compatible GREs ++ static const GREProperty kExtraProperty = ++ { "abi", TARGET_XPCOM_ABI }; ++ ++ nsAutoArrayPtr allProperties(new GREProperty[propertiesLength + 1]); ++ if (!allProperties) ++ return NS_ERROR_OUT_OF_MEMORY; ++ ++ for (PRUint32 i=0; i= aBufLen) ++ return NS_ERROR_FILE_NAME_TOO_LONG; ++ ++ strcpy(aBuffer, p); ++ ++ return NS_OK; ++ } ++ ++ // the Gecko bits that sit next to the application or in the LD_LIBRARY_PATH ++ env = getenv("USE_LOCAL_GRE"); ++ if (env && *env) { ++ *aBuffer = nsnull; ++ return NS_OK; ++ } ++ ++#ifdef XP_MACOSX ++ aBuffer[0] = '\0'; ++ ++ // Check the bundle first, for /Contents/Frameworks/XUL.framework/libxpcom.dylib ++ CFBundleRef appBundle = CFBundleGetMainBundle(); ++ if (appBundle) { ++ CFURLRef fwurl = CFBundleCopyPrivateFrameworksURL(appBundle); ++ CFURLRef absfwurl = nsnull; ++ if (fwurl) { ++ absfwurl = CFURLCopyAbsoluteURL(fwurl); ++ CFRelease(fwurl); ++ } ++ ++ if (absfwurl) { ++ CFURLRef xulurl = ++ CFURLCreateCopyAppendingPathComponent(NULL, absfwurl, ++ CFSTR(GRE_FRAMEWORK_NAME), ++ PR_TRUE); ++ ++ if (xulurl) { ++ CFURLRef xpcomurl = ++ CFURLCreateCopyAppendingPathComponent(NULL, xulurl, ++ CFSTR("libxpcom.dylib"), ++ PR_FALSE); ++ ++ if (xpcomurl) { ++ char tbuffer[MAXPATHLEN]; ++ ++ if (CFURLGetFileSystemRepresentation(xpcomurl, PR_TRUE, ++ (UInt8*) tbuffer, ++ sizeof(tbuffer)) && ++ access(tbuffer, R_OK | X_OK) == 0) { ++ if (!realpath(tbuffer, aBuffer)) { ++ aBuffer[0] = '\0'; ++ } ++ } ++ ++ CFRelease(xpcomurl); ++ } ++ ++ CFRelease(xulurl); ++ } ++ ++ CFRelease(absfwurl); ++ } ++ } ++ ++ if (aBuffer[0]) ++ return NS_OK; ++ ++ // Check ~/Library/Frameworks/XUL.framework/Versions//libxpcom.dylib ++ const char *home = getenv("HOME"); ++ if (home && *home && GRE_FindGREFramework(home, ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen)) { ++ return NS_OK; ++ } ++ ++ // Check /Library/Frameworks/XUL.framework/Versions//libxpcom.dylib ++ if (GRE_FindGREFramework("", ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen)) { ++ return NS_OK; ++ } ++ ++#elif defined(XP_UNIX) ++ env = getenv("MOZ_GRE_CONF"); ++ if (env && GRE_GetPathFromConfigFile(env, ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen)) { ++ return NS_OK; ++ } ++ ++ env = getenv("HOME"); ++ if (env && *env) { ++ char buffer[MAXPATHLEN]; ++ ++ // Look in ~/.gre.config ++ ++ snprintf(buffer, sizeof(buffer), ++ "%s" XPCOM_FILE_PATH_SEPARATOR GRE_CONF_NAME, env); ++ ++ if (GRE_GetPathFromConfigFile(buffer, ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen)) { ++ return NS_OK; ++ } ++ ++ // Look in ~/.gre.d/*.conf ++ ++ snprintf(buffer, sizeof(buffer), ++ "%s" XPCOM_FILE_PATH_SEPARATOR GRE_USER_CONF_DIR, env); ++ ++ if (GRE_GetPathFromConfigDir(buffer, ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen)) { ++ return NS_OK; ++ } ++ } ++ ++ // Look for a global /etc/gre.conf file ++ if (GRE_GetPathFromConfigFile(GRE_CONF_PATH, ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen)) { ++ return NS_OK; ++ } ++ ++ // Look for a group of config files in /etc/gre.d/ ++ if (GRE_GetPathFromConfigDir(GRE_CONF_DIR, ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen)) { ++ return NS_OK; ++ } ++ ++#elif defined(XP_WIN) ++ HKEY hRegKey = NULL; ++ ++ // A couple of key points here: ++ // 1. Note the usage of the "Software\\mozilla.org\\GRE" subkey - this allows ++ // us to have multiple versions of GREs on the same machine by having ++ // subkeys such as 1.0, 1.1, 2.0 etc. under it. ++ // 2. In this sample below we're looking for the location of GRE version 1.2 ++ // i.e. we're compatible with GRE 1.2 and we're trying to find it's install ++ // location. ++ // ++ // Please see http://www.mozilla.org/projects/embedding/GRE.html for ++ // more info. ++ // ++ if (::RegOpenKeyExW(HKEY_CURRENT_USER, GRE_WIN_REG_LOC, 0, ++ KEY_READ, &hRegKey) == ERROR_SUCCESS) { ++ PRBool ok = GRE_GetPathFromRegKey(hRegKey, ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen); ++ ::RegCloseKey(hRegKey); ++ ++ if (ok) ++ return NS_OK; ++ } ++ ++ if (::RegOpenKeyExW(HKEY_LOCAL_MACHINE, GRE_WIN_REG_LOC, 0, ++ KEY_ENUMERATE_SUB_KEYS, &hRegKey) == ERROR_SUCCESS) { ++ PRBool ok = GRE_GetPathFromRegKey(hRegKey, ++ versions, versionsLength, ++ allProperties, allPropertiesLength, ++ aBuffer, aBufLen); ++ ::RegCloseKey(hRegKey); ++ ++ if (ok) ++ return NS_OK; ++ } ++#endif ++ ++ return NS_ERROR_FAILURE; ++} ++ ++static PRBool ++CheckVersion(const char* toCheck, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength) ++{ ++ ++ for (const GREVersionRange *versionsEnd = versions + versionsLength; ++ versions < versionsEnd; ++ ++versions) { ++ PRInt32 c = NS_CompareVersions(toCheck, versions->lower); ++ if (c < 0) ++ continue; ++ ++ if (!c && !versions->lowerInclusive) ++ continue; ++ ++ c = NS_CompareVersions(toCheck, versions->upper); ++ if (c > 0) ++ continue; ++ ++ if (!c && !versions->upperInclusive) ++ continue; ++ ++ return PR_TRUE; ++ } ++ ++ return PR_FALSE; ++} ++ ++#ifdef XP_WIN ++ ++// Allocate an array of characters using new[], converting from UTF8 to UTF-16. ++// @note Use nsAutoArrayPtr for this result. ++ ++static PRUnichar* ++ConvertUTF8toNewUTF16(const char *cstr) ++{ ++ int len = MultiByteToWideChar(CP_UTF8, 0, cstr, -1, NULL, 0); ++ WCHAR *wstr = new WCHAR[len]; ++ MultiByteToWideChar(CP_UTF8, 0, cstr, -1, wstr, len); ++ return wstr; ++} ++ ++typedef nsAutoArrayPtr AutoWString; ++ ++static PRBool ++CheckVersion(const PRUnichar* toCheck, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength) ++{ ++ for (const GREVersionRange *versionsEnd = versions + versionsLength; ++ versions < versionsEnd; ++ ++versions) { ++ AutoWString wlower(ConvertUTF8toNewUTF16(versions->lower)); ++ PRInt32 c = NS_CompareVersions(toCheck, wlower); ++ if (c < 0) ++ continue; ++ ++ if (!c && !versions->lowerInclusive) ++ continue; ++ ++ AutoWString wupper(ConvertUTF8toNewUTF16(versions->upper)); ++ c = NS_CompareVersions(toCheck, wupper); ++ if (c > 0) ++ continue; ++ ++ if (!c && !versions->upperInclusive) ++ continue; ++ ++ return PR_TRUE; ++ } ++ ++ return PR_FALSE; ++} ++#endif ++ ++ ++#ifdef XP_MACOSX ++PRBool ++GRE_FindGREFramework(const char* rootPath, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char* buffer, PRUint32 buflen) ++{ ++ PRBool found = PR_FALSE; ++ ++ snprintf(buffer, buflen, ++ "%s/Library/Frameworks/" GRE_FRAMEWORK_NAME "/Versions", rootPath); ++ DIR *dir = opendir(buffer); ++ if (dir) { ++ struct dirent *entry; ++ while (!found && (entry = readdir(dir))) { ++ if (CheckVersion(entry->d_name, versions, versionsLength)) { ++ snprintf(buffer, buflen, ++ "%s/Library/Frameworks/" GRE_FRAMEWORK_NAME ++ "/Versions/%s/" XPCOM_DLL, rootPath, entry->d_name); ++ if (access(buffer, R_OK | X_OK) == 0) ++ found = PR_TRUE; ++ } ++ } ++ ++ closedir(dir); ++ } ++ ++ if (found) ++ return PR_TRUE; ++ ++ buffer[0] = '\0'; ++ return PR_FALSE; ++} ++ ++#elif defined(XP_UNIX) ++ ++static PRBool IsConfFile(const char *filename) ++{ ++ const char *dot = strrchr(filename, '.'); ++ ++ return (dot && strcmp(dot, ".conf") == 0); ++} ++ ++PRBool ++GRE_GetPathFromConfigDir(const char* dirname, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char* buffer, PRUint32 buflen) ++{ ++ // Open the directory provided and try to read any files in that ++ // directory that end with .conf. We look for an entry that might ++ // point to the GRE that we're interested in. ++ DIR *dir = opendir(dirname); ++ if (!dir) ++ return nsnull; ++ ++ PRBool found = PR_FALSE; ++ struct dirent *entry; ++ ++ while (!found && (entry = readdir(dir))) { ++ ++ // Only look for files that end in .conf ++ // IsConfFile will skip "." and ".." ++ if (!IsConfFile(entry->d_name)) ++ continue; ++ ++ char fullPath[MAXPATHLEN]; ++ snprintf(fullPath, sizeof(fullPath), "%s" XPCOM_FILE_PATH_SEPARATOR "%s", ++ dirname, entry->d_name); ++ ++ found = GRE_GetPathFromConfigFile(fullPath, ++ versions, versionsLength, ++ properties, propertiesLength, ++ buffer, buflen); ++ } ++ ++ closedir(dir); ++ ++ return found; ++} ++ ++#define READ_BUFFER_SIZE 1024 ++ ++struct INIClosure ++{ ++ nsINIParser *parser; ++ const GREVersionRange *versions; ++ PRUint32 versionsLength; ++ const GREProperty *properties; ++ PRUint32 propertiesLength; ++ char *pathBuffer; ++ PRUint32 buflen; ++ PRBool found; ++}; ++ ++static PRBool ++CheckINIHeader(const char *aHeader, void *aClosure) ++{ ++ nsresult rv; ++ ++ INIClosure *c = reinterpret_cast(aClosure); ++ ++ if (!CheckVersion(aHeader, c->versions, c->versionsLength)) ++ return PR_TRUE; ++ ++ const GREProperty *properties = c->properties; ++ const GREProperty *endProperties = properties + c->propertiesLength; ++ for (; properties < endProperties; ++properties) { ++ char buffer[MAXPATHLEN]; ++ rv = c->parser->GetString(aHeader, properties->property, ++ buffer, sizeof(buffer)); ++ if (NS_FAILED(rv)) ++ return PR_TRUE; ++ ++ if (strcmp(buffer, properties->value)) ++ return PR_TRUE; ++ } ++ ++ rv = c->parser->GetString(aHeader, "GRE_PATH", c->pathBuffer, c->buflen); ++ if (NS_FAILED(rv)) ++ return PR_TRUE; ++ ++ if (!safe_strncat(c->pathBuffer, "/" XPCOM_DLL, c->buflen) || ++ access(c->pathBuffer, R_OK)) ++ return PR_TRUE; ++ ++ // We found a good GRE! Stop looking. ++ c->found = PR_TRUE; ++ return PR_FALSE; ++} ++ ++PRBool ++GRE_GetPathFromConfigFile(const char* filename, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char* pathBuffer, PRUint32 buflen) ++{ ++ nsINIParser parser; ++ nsresult rv = parser.Init(filename); ++ if (NS_FAILED(rv)) ++ return PR_FALSE; ++ ++ INIClosure c = { ++ &parser, ++ versions, versionsLength, ++ properties, propertiesLength, ++ pathBuffer, buflen, ++ PR_FALSE ++ }; ++ ++ parser.GetSections(CheckINIHeader, &c); ++ return c.found; ++} ++ ++#elif defined(XP_WIN) ++ ++static PRBool ++CopyWithEnvExpansion(PRUnichar* aDest, const PRUnichar* aSource, PRUint32 aBufLen, ++ DWORD aType) ++{ ++ switch (aType) { ++ case REG_SZ: ++ if (wcslen(aSource) >= aBufLen) ++ return PR_FALSE; ++ ++ wcscpy(aDest, aSource); ++ return PR_TRUE; ++ ++ case REG_EXPAND_SZ: ++ if (ExpandEnvironmentStringsW(aSource, aDest, aBufLen) > aBufLen) ++ return PR_FALSE; ++ ++ return PR_TRUE; ++ }; ++ ++ // Whoops! We expected REG_SZ or REG_EXPAND_SZ, what happened here? ++ ++ return PR_FALSE; ++} ++ ++PRBool ++GRE_GetPathFromRegKey(HKEY aRegKey, ++ const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char* aBuffer, PRUint32 aBufLen) ++{ ++ // Formerly, GREs were registered at the registry key ++ // HKLM/Software/mozilla.org/GRE/ valuepair GreHome=Path. ++ // Nowadays, they are registered in any subkey of ++ // Software/mozilla.org/GRE, with the following valuepairs: ++ // Version= (REG_SZ) ++ // GreHome= (REG_SZ or REG_EXPAND_SZ) ++ // = (REG_SZ) ++ // ++ // Additional meta-info may be available in the future, including ++ // localization info and other information which might be pertinent ++ // to selecting one GRE over another. ++ // ++ // When a GRE is being registered, it should try to register itself at ++ // HKLM/Software/mozilla.org/GRE/ first, to preserve compatibility ++ // with older glue. If this key is already taken (i.e. there is more than ++ // one GRE of that version installed), it should append a unique number to ++ // the version, for example: ++ // 1.1 (already in use), 1.1_1, 1.1_2, etc... ++ ++ DWORD i = 0; ++ PRUnichar buffer[MAXPATHLEN + 1]; ++ ++ while (PR_TRUE) { ++ PRUnichar name[MAXPATHLEN + 1]; ++ DWORD nameLen = MAXPATHLEN; ++ if (::RegEnumKeyExW(aRegKey, i, name, &nameLen, NULL, NULL, NULL, NULL) != ++ ERROR_SUCCESS) { ++ break; ++ } ++ ++ HKEY subKey = NULL; ++ if (::RegOpenKeyExW(aRegKey, name, 0, KEY_QUERY_VALUE, &subKey) != ++ ERROR_SUCCESS) { ++ continue; ++ } ++ ++ PRUnichar version[40]; ++ DWORD versionlen = 40; ++ PRUnichar pathbuf[MAXPATHLEN + 1]; ++ DWORD pathlen; ++ DWORD pathtype; ++ ++ PRBool ok = PR_FALSE; ++ ++ if (::RegQueryValueExW(subKey, L"Version", NULL, NULL, ++ (BYTE*) version, &versionlen) == ERROR_SUCCESS && ++ CheckVersion(version, versions, versionsLength)) { ++ ++ ok = PR_TRUE; ++ const GREProperty *props = properties; ++ const GREProperty *propsEnd = properties + propertiesLength; ++ for (; ok && props < propsEnd; ++props) { ++ pathlen = MAXPATHLEN + 1; ++ ++ AutoWString wproperty(ConvertUTF8toNewUTF16(props->property)); ++ AutoWString wvalue(ConvertUTF8toNewUTF16(props->value)); ++ if (::RegQueryValueExW(subKey, wproperty, NULL, &pathtype, ++ (BYTE*) pathbuf, &pathlen) != ERROR_SUCCESS || ++ wcscmp(pathbuf, wvalue)) ++ ok = PR_FALSE; ++ } ++ ++ pathlen = sizeof(pathbuf); ++ if (ok && ++ (!::RegQueryValueExW(subKey, L"GreHome", NULL, &pathtype, ++ (BYTE*) pathbuf, &pathlen) == ERROR_SUCCESS || ++ !*pathbuf || ++ !CopyWithEnvExpansion(buffer, pathbuf, MAXPATHLEN, pathtype))) { ++ ok = PR_FALSE; ++ } ++ else if (!wcsncat(buffer, L"\\" LXPCOM_DLL, aBufLen) ++#ifdef WINCE ++ || (GetFileAttributesW(buffer) == INVALID_FILE_ATTRIBUTES) ++#else ++ || _waccess(buffer, R_OK) ++#endif ++ ) { ++ ok = PR_FALSE; ++ } ++ } ++ ++ RegCloseKey(subKey); ++ ++ if (ok) { ++ WideCharToMultiByte(CP_UTF8, 0, buffer, -1, aBuffer, aBufLen, NULL, NULL); ++ return PR_TRUE; ++ } ++ ++ ++i; ++ } ++ ++ aBuffer[0] = '\0'; ++ ++ return PR_FALSE; ++} ++#endif // XP_WIN +diff -up xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk +--- xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk.xulstub 2011-08-11 23:41:32.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk 2011-08-16 09:57:54.551206436 +0200 +@@ -56,6 +56,7 @@ XPCOM_GLUE_SRC_LCPPSRCS = \ + nsISupportsImpl.cpp \ + nsMemory.cpp \ + nsWeakReference.cpp \ ++ nsGREGlue.cpp \ + nsVersionComparator.cpp \ + nsTHashtable.cpp \ + nsQuickSort.cpp \ +diff -up xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h +--- xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h.xulstub 2011-08-11 23:41:32.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h 2011-08-16 09:57:54.553206240 +0200 +@@ -41,6 +41,54 @@ + + #include "nscore.h" + ++class nsILocalFile; ++ ++/** ++ * The following function is available in both the standalone and ++ * dynamically linked versions of the glue. ++ */ ++ ++struct GREVersionRange { ++ const char *lower; ++ PRBool lowerInclusive; ++ const char *upper; ++ PRBool upperInclusive; ++}; ++ ++struct GREProperty { ++ const char *property; ++ const char *value; ++}; ++ ++/** ++ * Locate the path of the xpcom shared library from a GRE with specified ++ * properties. ++ * ++ * @param versions An array of version ranges: if any version range ++ * matches, the GRE is considered acceptable. ++ * @param versionsLength The length of the versions array. ++ * @param properties A null-terminated list of GRE property/value pairs ++ * which must all be satisfied. ++ * @param propertiesLength Length of the properties array. ++ * @param buffer A buffer to be filled with the appropriate path. If ++ * the "local" GRE is specified (via the USE_LOCAL_GRE ++ * environment variable, for example), this buffer ++ * will be set to the empty string. ++ * @param buflen The length of buffer. This must be at least ++ * PATH_MAX/MAXPATHLEN. ++ * @throws NS_ERROR_FAILURE if an appropriate GRE could not be found. ++ * @note The properties parameter is ignored on macintosh, because of the ++ * manner in which the XUL frameworks are installed by version. ++ * @note Currently this uses a "first-fit" algorithm, it does not select ++ * the newest available GRE. ++ */ ++extern "C" NS_COM_GLUE nsresult ++GRE_GetGREPathWithProperties(const GREVersionRange *versions, ++ PRUint32 versionsLength, ++ const GREProperty *properties, ++ PRUint32 propertiesLength, ++ char *buffer, PRUint32 buflen); ++ + #ifdef XPCOM_GLUE + + /** +diff -up xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in +--- xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in.xulstub 2011-08-11 23:41:33.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in 2011-08-16 09:57:54.560205553 +0200 +@@ -69,6 +69,20 @@ endif + + CPPSRCS = nsXULRunnerApp.cpp + ++ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) ++CPPSRCS += nsRegisterGREWin.cpp ++else ++ifeq (OS2,$(OS_ARCH)) ++CPPSRCS += nsRegisterGREVoid.cpp ++else ++ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) ++CPPSRCS += nsRegisterGREVoid.cpp ++else ++CPPSRCS += nsRegisterGREUnix.cpp ++endif ++endif ++endif ++ + LOCAL_INCLUDES += \ + -I$(topsrcdir)/toolkit/xre \ + -I$(topsrcdir)/toolkit/profile \ +diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h.xulstub 2011-08-16 09:57:54.569204670 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h 2011-08-16 09:57:54.569204670 +0200 +@@ -0,0 +1,58 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Mozilla XULRunner. ++ * ++ * The Initial Developer of the Original Code is ++ * Benjamin Smedberg . ++ * ++ * Portions created by the Initial Developer are Copyright (C) 2005 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef nsRegisterGRE_h__ ++#define nsRegisterGRE_h__ ++ ++#include "nscore.h" ++#include "nsStringAPI.h" ++class nsIFile; ++struct GREProperty; ++ ++/** ++ * @return PR_TRUE on success ++ */ ++NS_HIDDEN_(PRBool) ++RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, ++ const GREProperty *aProperties, PRUint32 aPropertiesLen, ++ const char *aGREMilestone); ++ ++NS_HIDDEN_(void) ++UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation, ++ const char *aGREMilestone); ++ ++#endif // nsRegisterGRE_h__ +diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp.xulstub 2011-08-16 09:57:54.577203884 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp 2011-08-16 09:57:54.577203884 +0200 +@@ -0,0 +1,272 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Mozilla XULRunner. ++ * ++ * The Initial Developer of the Original Code is ++ * Benjamin Smedberg . ++ * ++ * Portions created by the Initial Developer are Copyright (C) 2005 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsRegisterGRE.h" ++#include "nsXPCOMGlue.h" ++ ++#include "nsXPCOM.h" ++#include "nsIFile.h" ++#include "nsILocalFile.h" ++#include "mozilla/FileUtils.h" ++ ++#include "nsAppRunner.h" // for MAXPATHLEN ++#include "nsStringAPI.h" ++#include "nsINIParser.h" ++#include "nsCOMPtr.h" ++ ++#include "prio.h" ++#include "prprf.h" ++#include "prenv.h" ++ ++#include ++#include ++ ++// If we can't register .conf, we try to create a unique filename ++// by looping through _.conf, but if something is seriously wrong ++// we stop at 1000 ++#define UNIQ_LOOP_LIMIT 1000 ++ ++using namespace mozilla; ++ ++static const char kRegFileGlobal[] = "global.reginfo"; ++static const char kRegFileUser[] = "user.reginfo"; ++ ++static PRBool ++MakeConfFile(const char *regfile, const nsCString &greHome, ++ const GREProperty *aProperties, PRUint32 aPropertiesLen, ++ const char *aGREMilestone) ++{ ++ // If the file exists, don't create it again! ++ if (access(regfile, R_OK) == 0) ++ return PR_FALSE; ++ ++ PRBool ok = PR_TRUE; ++ ++ { // scope "fd" so that we can delete the file if something goes wrong ++ AutoFDClose fd = PR_Open(regfile, PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, ++ 0664); ++ if (!fd) ++ return PR_FALSE; ++ ++ static const char kHeader[] = ++ "# Registration file generated by xulrunner. Do not edit.\n\n" ++ "[%s]\n" ++ "GRE_PATH=%s\n"; ++ ++ if (PR_fprintf(fd, kHeader, aGREMilestone, greHome.get()) <= 0) ++ ok = PR_FALSE; ++ ++ for (PRUint32 i = 0; i < aPropertiesLen; ++i) { ++ if (PR_fprintf(fd, "%s=%s\n", ++ aProperties[i].property, aProperties[i].value) <= 0) ++ ok = PR_FALSE; ++ } ++ } ++ ++ if (!ok) ++ PR_Delete(regfile); ++ ++ return ok; ++} ++ ++ ++PRBool ++RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, ++ const GREProperty *aProperties, PRUint32 aPropertiesLen, ++ const char *aGREMilestone) ++{ ++ // Register ourself in /etc/gre.d or ~/.gre.d/ and record what key we created ++ // for future unregistration. ++ ++ nsresult rv; ++ ++ char root[MAXPATHLEN] = "/etc/gre.d"; ++ ++ if (!aRegisterGlobally) { ++ char *home = PR_GetEnv("HOME"); ++ if (!home || !*home) ++ return PR_FALSE; ++ ++ PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); ++ } ++ ++ nsCString greHome; ++ rv = aLocation->GetNativePath(greHome); ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ nsCOMPtr savedInfoFile; ++ aLocation->Clone(getter_AddRefs(savedInfoFile)); ++ nsCOMPtr localSaved(do_QueryInterface(savedInfoFile)); ++ if (!localSaved) ++ return PR_FALSE; ++ ++ const char *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; ++ localSaved->AppendNative(nsDependentCString(infoname)); ++ ++ AutoFDClose fd; ++ rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_RDWR, 0664, &fd); ++ // XXX report error? ++ if (NS_FAILED(rv)) ++ return PR_FALSE; ++ ++ char keyName[MAXPATHLEN]; ++ ++ PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); ++ if (r < 0) ++ return PR_FALSE; ++ ++ char regfile[MAXPATHLEN]; ++ ++ if (r > 0) { ++ keyName[r] = '\0'; ++ ++ PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, keyName); ++ ++ // There was already a .reginfo file, let's see if we are already ++ // registered. ++ if (access(regfile, R_OK) == 0) { ++ fprintf(stderr, "Warning: Configuration file '%s' already exists.\n" ++ "No action was performed.\n", regfile); ++ return PR_FALSE; ++ } ++ ++ rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd); ++ if (NS_FAILED(rv)) ++ return PR_FALSE; ++ } ++ ++ if (access(root, R_OK | X_OK) && ++ mkdir(root, 0775)) { ++ fprintf(stderr, "Error: could not create '%s'.\n", ++ root); ++ return PR_FALSE; ++ } ++ ++ PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, aGREMilestone); ++ if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen, ++ aGREMilestone)) { ++ PR_fprintf(fd, "%s", aGREMilestone); ++ return PR_TRUE; ++ } ++ ++ for (int i = 0; i < UNIQ_LOOP_LIMIT; ++i) { ++ static char buildID[30]; ++ sprintf(buildID, "%s_%i", aGREMilestone, i); ++ ++ PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, buildID); ++ ++ if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen, ++ aGREMilestone)) { ++ PR_Write(fd, buildID, strlen(buildID)); ++ return PR_TRUE; ++ } ++ } ++ ++ return PR_FALSE; ++} ++ ++void ++UnregisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, ++ const char *aGREMilestone) ++{ ++ nsresult rv; ++ ++ char root[MAXPATHLEN] = "/etc/gre.d"; ++ ++ if (!aRegisterGlobally) { ++ char *home = PR_GetEnv("HOME"); ++ if (!home || !*home) ++ return; ++ ++ PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); ++ } ++ ++ nsCOMPtr savedInfoFile; ++ aLocation->Clone(getter_AddRefs(savedInfoFile)); ++ nsCOMPtr localSaved (do_QueryInterface(savedInfoFile)); ++ if (!localSaved) ++ return; ++ ++ const char *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; ++ localSaved->AppendNative(nsDependentCString(infoname)); ++ ++ PRFileDesc* fd = nsnull; ++ rv = localSaved->OpenNSPRFileDesc(PR_RDONLY, 0, &fd); ++ if (NS_FAILED(rv)) { ++ // XXX report error? ++ return; ++ } ++ ++ char keyName[MAXPATHLEN]; ++ PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); ++ PR_Close(fd); ++ ++ localSaved->Remove(PR_FALSE); ++ ++ if (r <= 0) ++ return; ++ ++ keyName[r] = '\0'; ++ ++ char regFile[MAXPATHLEN]; ++ PR_snprintf(regFile, MAXPATHLEN, "%s/%s.conf", root, keyName); ++ ++ nsCOMPtr lf; ++ rv = NS_NewNativeLocalFile(nsDependentCString(regFile), PR_FALSE, ++ getter_AddRefs(lf)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ nsINIParser p; ++ rv = p.Init(lf); ++ if (NS_FAILED(rv)) ++ return; ++ ++ rv = p.GetString(aGREMilestone, "GRE_PATH", root, MAXPATHLEN); ++ if (NS_FAILED(rv)) ++ return; ++ ++ rv = NS_NewNativeLocalFile(nsDependentCString(root), PR_TRUE, ++ getter_AddRefs(lf)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ PRBool eq; ++ if (NS_SUCCEEDED(aLocation->Equals(lf, &eq)) && eq) ++ PR_Delete(regFile); ++} +diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp.xulstub 2011-08-16 09:57:54.610200648 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp 2011-08-16 09:57:54.611200550 +0200 +@@ -0,0 +1,57 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Mozilla XULRunner. ++ * ++ * The Initial Developer of the Original Code is ++ * Benjamin Smedberg . ++ * ++ * Portions created by the Initial Developer are Copyright (C) 2005 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsRegisterGRE.h" ++ ++#include ++#include ++ ++int ++RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, ++ const GREProperty *aProperties, PRUint32 aPropertiesLen, ++ const char *aGREMilestone) ++{ ++ fprintf(stderr, "Registration not implemented on this platform!\n"); ++ return 1; ++} ++ ++void ++UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation, ++ const char *aGREMilestone) ++{ ++ fprintf(stderr, "Registration not implemented on this platform!\n"); ++} +diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp.xulstub 2011-08-16 09:57:54.619199765 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp 2011-08-16 09:57:54.619199765 +0200 +@@ -0,0 +1,288 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Mozilla XULRunner. ++ * ++ * The Initial Developer of the Original Code is ++ * Benjamin Smedberg . ++ * ++ * Portions created by the Initial Developer are Copyright (C) 2005 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsRegisterGRE.h" ++ ++#include "nsXPCOM.h" ++#include "nsIFile.h" ++#include "nsILocalFile.h" ++ ++#include "nsAppRunner.h" // for MAXPATHLEN ++#include "nsStringAPI.h" ++#include "nsXPCOMGlue.h" ++#include "nsCOMPtr.h" ++ ++#include "prio.h" ++ ++#include ++#include "malloc.h" ++ ++static const wchar_t kRegKeyRoot[] = L"Software\\mozilla.org\\GRE"; ++static const wchar_t kRegFileGlobal[] = L"global.reginfo"; ++static const wchar_t kRegFileUser[] = L"user.reginfo"; ++ ++static nsresult ++MakeVersionKey(HKEY root, const wchar_t* keyname, const nsString &grehome, ++ const GREProperty *aProperties, PRUint32 aPropertiesLen, ++ const wchar_t *aGREMilestone) ++{ ++ HKEY subkey; ++ DWORD disp; ++ ++ if (::RegCreateKeyExW(root, keyname, NULL, NULL, 0, KEY_WRITE, NULL, ++ &subkey, &disp) != ERROR_SUCCESS) ++ return NS_ERROR_FAILURE; ++ ++ if (disp != REG_CREATED_NEW_KEY) { ++ ::RegCloseKey(subkey); ++ return NS_ERROR_FAILURE; ++ } ++ ++ PRBool failed = PR_FALSE; ++ failed |= ::RegSetValueExW(subkey, L"Version", NULL, REG_SZ, ++ (BYTE*) aGREMilestone, ++ sizeof(PRUnichar) * (wcslen(aGREMilestone) + 1)) ++ != ERROR_SUCCESS; ++ failed |= ::RegSetValueExW(subkey, L"GreHome", NULL, REG_SZ, ++ (BYTE*) grehome.get(), ++ sizeof(PRUnichar) * (grehome.Length() + 1)) ++ != ERROR_SUCCESS; ++ ++ for (PRUint32 i = 0; i < aPropertiesLen; ++i) { ++ // Properties should be ascii only ++ NS_ConvertASCIItoUTF16 prop(aProperties[i].property); ++ NS_ConvertASCIItoUTF16 val(aProperties[i].value); ++ failed |= ::RegSetValueExW(subkey, prop.get(), NULL, REG_SZ, ++ (BYTE*) val.get(), ++ sizeof(wchar_t)*(val.Length()+1) ++ ) != ERROR_SUCCESS; ++ } ++ ++ ::RegCloseKey(subkey); ++ ++ if (failed) { ++ // we created a key but couldn't fill it properly: delete it ++ ::RegDeleteKeyW(root, keyname); ++ return NS_ERROR_FAILURE; ++ } ++ ++ return NS_OK; ++} ++ ++int ++RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, ++ const GREProperty *aProperties, PRUint32 aPropertiesLen, ++ const char *aGREMilestoneAscii) ++{ ++ // Register ourself in the windows registry, and record what key we created ++ // for future unregistration. ++ ++ nsresult rv; ++ PRBool irv; ++ int i; ++ NS_ConvertASCIItoUTF16 aGREMilestone(aGREMilestoneAscii); ++ nsString greHome; ++ rv = aLocation->GetPath(greHome); ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ nsCOMPtr savedInfoFile; ++ aLocation->Clone(getter_AddRefs(savedInfoFile)); ++ nsCOMPtr localSaved(do_QueryInterface(savedInfoFile)); ++ if (!localSaved) ++ return PR_FALSE; ++ ++ const wchar_t *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; ++ localSaved->Append(nsDependentString(infoname)); ++ ++ PRFileDesc* fd = nsnull; ++ rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_RDWR, 0664, &fd); ++ if (NS_FAILED(rv)) { ++ // XXX report error? ++ return PR_FALSE; ++ } ++ ++ HKEY rootKey = NULL; ++ wchar_t keyName[MAXPATHLEN]; ++ PRInt32 r; ++ ++ if (::RegCreateKeyExW(aRegisterGlobally ? HKEY_LOCAL_MACHINE : ++ HKEY_CURRENT_USER, ++ kRegKeyRoot, NULL, NULL, 0, KEY_WRITE, ++ NULL, &rootKey, NULL) != ERROR_SUCCESS) { ++ irv = PR_FALSE; ++ goto reg_end; ++ } ++ ++ r = PR_Read(fd, keyName, MAXPATHLEN); ++ if (r < 0) { ++ irv = PR_FALSE; ++ goto reg_end; ++ } ++ ++ if (r > 0) { ++ keyName[r] = '\0'; ++ ++ // There was already a .reginfo file, let's see if we are already ++ // registered. ++ HKEY existing = NULL; ++ if (::RegOpenKeyExW(rootKey, keyName, NULL, KEY_QUERY_VALUE, &existing) == ++ ERROR_SUCCESS) { ++ fprintf(stderr, "Warning: Registry key Software\\mozilla.org\\GRE\\%s already exists.\n" ++ "No action was performed.\n", ++ keyName); ++ irv = PR_FALSE; ++ goto reg_end; ++ } ++ ++ PR_Close(fd); ++ fd = nsnull; ++ ++ rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd); ++ if (NS_FAILED(rv)) { ++ // XXX report error? ++ irv = PR_FALSE; ++ goto reg_end; ++ } ++ } ++ ++ wcscpy(keyName, aGREMilestone.get()); ++ rv = MakeVersionKey(rootKey, keyName, greHome, aProperties, aPropertiesLen, ++ aGREMilestone.get()); ++ if (NS_SUCCEEDED(rv)) { ++ NS_ConvertUTF16toUTF8 keyNameAscii(keyName); ++ PR_Write(fd, keyNameAscii.get(), sizeof(char)*keyNameAscii.Length()); ++ irv = PR_TRUE; ++ goto reg_end; ++ } ++ ++ for (i = 0; i < 1000; ++i) { ++ swprintf(keyName, L"%s_%i", aGREMilestone.get(), i); ++ rv = MakeVersionKey(rootKey, keyName, greHome, ++ aProperties, aPropertiesLen, ++ aGREMilestone.get()); ++ if (NS_SUCCEEDED(rv)) { ++ NS_ConvertUTF16toUTF8 keyNameAscii(keyName); ++ PR_Write(fd, keyNameAscii.get(), sizeof(char)*keyNameAscii.Length()); ++ irv = PR_TRUE; ++ goto reg_end; ++ } ++ } ++ ++ irv = PR_FALSE; ++ ++reg_end: ++ if (fd) ++ PR_Close(fd); ++ ++ if (rootKey) ++ ::RegCloseKey(rootKey); ++ ++ return irv; ++} ++ ++void ++UnregisterXULRunner(PRBool aGlobal, nsIFile* aLocation, ++ const char *aGREMilestone) ++{ ++ nsCOMPtr savedInfoFile; ++ aLocation->Clone(getter_AddRefs(savedInfoFile)); ++ nsCOMPtr localSaved (do_QueryInterface(savedInfoFile)); ++ if (!localSaved) ++ return; ++ ++ const wchar_t *infoname = aGlobal ? kRegFileGlobal : kRegFileUser; ++ localSaved->Append(nsDependentString(infoname)); ++ ++ PRFileDesc* fd = nsnull; ++ nsresult rv = localSaved->OpenNSPRFileDesc(PR_RDONLY, 0, &fd); ++ if (NS_FAILED(rv)) { ++ // XXX report error? ++ return; ++ } ++ ++ wchar_t keyName[MAXPATHLEN]; ++ PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); ++ PR_Close(fd); ++ ++ localSaved->Remove(PR_FALSE); ++ ++ if (r <= 0) ++ return; ++ ++ keyName[r] = '\0'; ++ ++ HKEY rootKey = NULL; ++ if (::RegOpenKeyExW(aGlobal ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, ++ kRegKeyRoot, 0, KEY_READ, &rootKey) != ERROR_SUCCESS) ++ return; ++ ++ HKEY subKey = NULL; ++ if (::RegOpenKeyExW(rootKey, keyName, 0, KEY_READ, &subKey) == ERROR_SUCCESS) { ++ ++ char regpath[MAXPATHLEN]; ++ DWORD reglen = MAXPATHLEN; ++ ++ if (::RegQueryValueExW(subKey, L"GreHome", NULL, NULL, ++ (BYTE*) regpath, ®len) == ERROR_SUCCESS) { ++ ++ nsCOMPtr regpathfile; ++ rv = NS_NewNativeLocalFile(nsDependentCString(regpath), PR_FALSE, ++ getter_AddRefs(regpathfile)); ++ ++ PRBool eq; ++ if (NS_SUCCEEDED(rv) && ++ NS_SUCCEEDED(aLocation->Equals(regpathfile, &eq)) && !eq) { ++ // We think we registered for this key, but it doesn't point to ++ // us any more! ++ fprintf(stderr, "Warning: Registry key Software\\mozilla.org\\GRE\\%s points to\n" ++ "alternate path '%s'; unregistration was not successful.\n", ++ keyName, regpath); ++ ++ ::RegCloseKey(subKey); ++ ::RegCloseKey(rootKey); ++ ++ return; ++ } ++ } ++ ++ ::RegCloseKey(subKey); ++ } ++ ++ ::RegDeleteKeyW(rootKey, keyName); ++ ::RegCloseKey(rootKey); ++} +diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp.xulstub 2011-08-11 23:41:33.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp 2011-08-16 09:57:54.627198981 +0200 +@@ -43,6 +43,7 @@ + + #include "nsXULAppAPI.h" + #include "nsXPCOMGlue.h" ++#include "nsRegisterGRE.h" + #include "nsAppRunner.h" + #include "nsILocalFile.h" + #include "nsIXULAppInstall.h" +@@ -252,6 +253,16 @@ InstallXULApp(nsIFile* aXULRunnerDir, + return 0; + } + ++static const GREProperty kGREProperties[] = { ++ { "xulrunner", "true" } ++#ifdef TARGET_XPCOM_ABI ++ , { "abi", TARGET_XPCOM_ABI } ++#endif ++#ifdef MOZ_JAVAXPCOM ++ , { "javaxpcom", "1" } ++#endif ++}; ++ + class AutoAppData + { + public: +@@ -298,6 +309,67 @@ int main(int argc, char* argv[]) + if (NS_FAILED(rv)) + return 2; + ++ PRBool registerGlobal = IsArg(argv[1], "register-global"); ++ PRBool registerUser = IsArg(argv[1], "register-user"); ++ if (registerGlobal || registerUser) { ++ if (argc != 2) { ++ Usage(argv[0]); ++ return 1; ++ } ++ ++ nsCOMPtr regDir; ++ rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); ++ if (NS_FAILED(rv)) ++ return 2; ++ ++ return RegisterXULRunner(registerGlobal, regDir, ++ kGREProperties, ++ NS_ARRAY_LENGTH(kGREProperties), ++ milestone.get()) ? 0 : 2; ++ } ++ ++ registerGlobal = IsArg(argv[1], "unregister-global"); ++ registerUser = IsArg(argv[1], "unregister-user"); ++ if (registerGlobal || registerUser) { ++ if (argc != 2) { ++ Usage(argv[0]); ++ return 1; ++ } ++ ++ nsCOMPtr regDir; ++ rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); ++ if (NS_FAILED(rv)) ++ return 2; ++ ++ UnregisterXULRunner(registerGlobal, regDir, milestone.get()); ++ return 0; ++ } ++ ++ if (IsArg(argv[1], "find-gre")) { ++ if (argc != 3) { ++ Usage(argv[0]); ++ return 1; ++ } ++ ++ char path[MAXPATHLEN]; ++ static const GREVersionRange vr = { ++ argv[2], PR_TRUE, ++ argv[2], PR_TRUE ++ }; ++ static const GREProperty kProperties[] = { ++ { "xulrunner", "true" } ++ }; ++ ++ rv = GRE_GetGREPathWithProperties(&vr, 1, kProperties, ++ NS_ARRAY_LENGTH(kProperties), ++ path, sizeof(path)); ++ if (NS_FAILED(rv)) ++ return 1; ++ ++ printf("%s\n", path); ++ return 0; ++ } ++ + if (IsArg(argv[1], "gre-version")) { + if (argc != 2) { + Usage(argv[0]); +diff -up xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in.xulstub xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in +--- xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in.xulstub 2011-08-16 09:57:54.406220659 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in 2011-08-16 09:57:54.636198098 +0200 +@@ -70,6 +70,19 @@ INSTALL_SDK = 1 + + include $(topsrcdir)/toolkit/mozapps/installer/packager.mk + ++$(MOZILLA_VERSION).system.conf: $(topsrcdir)/config/milestone.txt Makefile ++ printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \ ++ $(MOZILLA_VERSION) $(installdir) $(TARGET_XPCOM_ABI)> $@ ++ ++ifndef SKIP_GRE_REGISTRATION ++# to register xulrunner per-user, override this with $HOME/.gre.d ++regdir = /etc/gre.d ++ ++install:: $(MOZILLA_VERSION).system.conf ++ $(NSINSTALL) -D $(DESTDIR)$(regdir) ++ $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(regdir) ++endif ++ + # Add pkg-config files to the install:: target + + pkg_config_files = \ +diff -up xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp +--- xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub 2011-08-11 23:41:33.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp 2011-08-16 10:01:16.319912869 +0200 +@@ -409,9 +409,54 @@ main(int argc, char **argv) + } + #endif + if (!greFound) { +- Output(PR_FALSE, "Could not find the Mozilla runtime.\n"); +- return 1; +- } ++ char minVersion[VERSION_MAXLEN]; ++ ++ // If a gecko maxVersion is not specified, we assume that the app uses only ++ // frozen APIs, and is therefore compatible with any xulrunner 1.x. ++ char maxVersion[VERSION_MAXLEN] = "1.*"; ++ ++ GREVersionRange range = { ++ minVersion, ++ PR_TRUE, ++ maxVersion, ++ PR_TRUE ++ }; ++ ++ rv = parser.GetString("Gecko", "MinVersion", minVersion, sizeof(minVersion)); ++ if (NS_FAILED(rv)) { ++ fprintf(stderr, ++ "The application.ini does not specify a [Gecko] MinVersion\n"); ++ return 1; ++ } ++ ++ rv = parser.GetString("Gecko", "MaxVersion", maxVersion, sizeof(maxVersion)); ++ if (NS_SUCCEEDED(rv)) ++ range.upperInclusive = PR_TRUE; ++ ++ static const GREProperty kProperties[] = { ++ { "xulrunner", "true" } ++ }; ++ ++ rv = GRE_GetGREPathWithProperties(&range, 1, ++ kProperties, NS_ARRAY_LENGTH(kProperties), ++ greDir, sizeof(greDir)); ++ if (NS_FAILED(rv)) { ++ // XXXbsmedberg: Do something much smarter here: notify the ++ // user/offer to download/? ++ ++ Output(PR_FALSE, ++ "Could not find compatible GRE between version %s and %s.\n", ++ range.lower, range.upper); ++ return 1; ++ } ++#ifdef XP_UNIX ++ // Using a symlinked greDir will fail during startup. Not sure why, but if ++ // we resolve the symlink, everything works as expected. ++ char resolved_greDir[MAXPATHLEN] = ""; ++ if (realpath(greDir, resolved_greDir) && *resolved_greDir) { ++ strncpy(greDir, resolved_greDir, MAXPATHLEN); ++ } ++#endif + } + + #ifdef XP_OS2 diff --git a/sources b/sources index 8dd1d26..c5104d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9f64a01e86a5d424e12a8e3305c5debe xulrunner-5.0.source.tar.bz2 +1840185865a1a8975df4a3db59080ddc xulrunner-6.0.source.tar.bz2 diff --git a/xulrunner-2.0-network-link-service.patch b/xulrunner-2.0-network-link-service.patch index 2199d83..b3243a9 100644 --- a/xulrunner-2.0-network-link-service.patch +++ b/xulrunner-2.0-network-link-service.patch @@ -1,7 +1,19 @@ -diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network-link-service xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp ---- xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network-link-service 2011-06-15 23:57:41.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp 2011-06-21 14:04:16.798060709 +0200 -@@ -165,6 +165,7 @@ PRInt16 gBadPortList[] = { +# HG changeset patch +# Parent 31879b88cc82c1f44e6a6c25a05aa2c70af22d7e +# User Martin Stransky +Bug 627672 - XPCOM component (libdbusservice.so) is not registered although it should be; r=cbiesinger + + + +diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp +--- a/netwerk/base/src/nsIOService.cpp ++++ b/netwerk/base/src/nsIOService.cpp +@@ -160,31 +160,33 @@ PRInt16 gBadPortList[] = { + 2049, // nfs + 4045, // lockd + 6000, // x11 + 0, // This MUST be zero so that we can populating the array + }; static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardown"; static const char kProfileChangeNetRestoreTopic[] = "profile-change-net-restore"; @@ -9,15 +21,33 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network- // Necko buffer cache nsIMemory* nsIOService::gBufferCache = nsnull; -@@ -180,6 +181,7 @@ nsIOService::nsIOService() + PRUint32 nsIOService::gDefaultSegmentSize = 4096; + PRUint32 nsIOService::gDefaultSegmentCount = 24; + + //////////////////////////////////////////////////////////////////////////////// + + nsIOService::nsIOService() + : mOffline(PR_TRUE) + , mOfflineForProfileChange(PR_FALSE) + , mManageOfflineStatus(PR_TRUE) , mSettingOffline(PR_FALSE) , mSetOfflineValue(PR_FALSE) , mShutdown(PR_FALSE) + , mNetworkLinkServiceInitialized(PR_FALSE) , mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY) , mContentSniffers(NS_CONTENT_SNIFFER_CATEGORY) + , mAutoDialEnabled(PR_FALSE) { -@@ -234,6 +236,7 @@ nsIOService::Init() + } + + nsresult + nsIOService::Init() +@@ -230,16 +232,17 @@ nsIOService::Init() + } + + // Register for profile change notifications + nsCOMPtr observerService = + mozilla::services::GetObserverService(); if (observerService) { observerService->AddObserver(this, kProfileChangeNetTeardownTopic, PR_TRUE); observerService->AddObserver(this, kProfileChangeNetRestoreTopic, PR_TRUE); @@ -25,7 +55,17 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network- observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE); observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, PR_TRUE); } -@@ -262,19 +265,9 @@ nsIOService::Init() + else + NS_WARNING("failed to get observer service"); + + NS_TIME_FUNCTION_MARK("Registered observers"); + +@@ -258,29 +261,19 @@ nsIOService::Init() + NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Was unable to allocate. No gBufferCache."); + CallQueryInterface(recyclingAllocator, &gBufferCache); + } + + NS_TIME_FUNCTION_MARK("Set up the recycling allocator"); gIOService = this; @@ -48,7 +88,17 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network- NS_TIME_FUNCTION_MARK("Set up network link service"); -@@ -309,6 +302,47 @@ nsIOService::InitializeSocketTransportSe + return NS_OK; + } + + + nsIOService::~nsIOService() +@@ -306,16 +299,57 @@ nsIOService::InitializeSocketTransportSe + rv = mSocketTransportService->Init(); + NS_ASSERTION(NS_SUCCEEDED(rv), "socket transport service init failed"); + mSocketTransportService->SetAutodialEnabled(mAutoDialEnabled); + } + return rv; } @@ -96,7 +146,17 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network- nsIOService* nsIOService::GetInstance() { if (!gIOService) { -@@ -682,6 +716,9 @@ nsIOService::NewChannel(const nsACString + gIOService = new nsIOService(); + if (!gIOService) + return nsnull; + NS_ADDREF(gIOService); + +@@ -689,16 +723,19 @@ nsIOService::NewChannel(const nsACString + if (NS_FAILED(rv)) return rv; + + return NewChannelFromURI(uri, result); + } + PRBool nsIOService::IsLinkUp() { @@ -106,7 +166,17 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network- if (!mNetworkLinkService) { // We cannot decide, assume the link is up return PR_TRUE; -@@ -960,6 +997,10 @@ nsIOService::Observe(nsISupports *subjec + } + + PRBool isLinkUp; + nsresult rv; + rv = mNetworkLinkService->GetIsLinkUp(&isLinkUp); +@@ -968,16 +1005,20 @@ nsIOService::Observe(nsISupports *subjec + if (mOfflineForProfileChange) { + mOfflineForProfileChange = PR_FALSE; + if (!mManageOfflineStatus || + NS_FAILED(TrackNetworkLinkStatusForOffline())) { + SetOffline(PR_FALSE); } } } @@ -117,7 +187,17 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network- else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { // Remember we passed XPCOM shutdown notification to prevent any // changes of the offline status from now. We must not allow going -@@ -1077,6 +1118,11 @@ NS_IMETHODIMP + // online after this point. + mShutdown = PR_TRUE; + + SetOffline(PR_TRUE); + +@@ -1085,32 +1126,40 @@ nsIOService::NewSimpleNestedURI(nsIURI* + NS_IF_ADDREF(*aResult = new nsSimpleNestedURI(safeURI)); + return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY; + } + + NS_IMETHODIMP nsIOService::SetManageOfflineStatus(PRBool aManage) { PRBool wasManaged = mManageOfflineStatus; mManageOfflineStatus = aManage; @@ -129,7 +209,16 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network- if (mManageOfflineStatus && !wasManaged) return TrackNetworkLinkStatusForOffline(); return NS_OK; -@@ -1093,6 +1139,9 @@ nsIOService::TrackNetworkLinkStatusForOf + } + + NS_IMETHODIMP + nsIOService::GetManageOfflineStatus(PRBool* aManage) { + *aManage = mManageOfflineStatus; + return NS_OK; + } + + nsresult + nsIOService::TrackNetworkLinkStatusForOffline() { NS_ASSERTION(mManageOfflineStatus, "Don't call this unless we're managing the offline status"); @@ -139,10 +228,20 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.cpp.network- if (!mNetworkLinkService) return NS_ERROR_FAILURE; -diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h.network-link-service xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h ---- xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h.network-link-service 2011-06-15 23:57:41.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h 2011-06-21 13:59:23.147215108 +0200 -@@ -134,6 +134,7 @@ private: + if (mShutdown) + return NS_ERROR_NOT_AVAILABLE; + + // check to make sure this won't collide with Autodial + if (mSocketTransportService) { +diff --git a/netwerk/base/src/nsIOService.h b/netwerk/base/src/nsIOService.h +--- a/netwerk/base/src/nsIOService.h ++++ b/netwerk/base/src/nsIOService.h +@@ -129,16 +129,17 @@ private: + nsIProtocolHandler* hdlr); + + // Prefs wrangling + NS_HIDDEN_(void) PrefsChanged(nsIPrefBranch *prefs, const char *pref = nsnull); + NS_HIDDEN_(void) GetPrefBranch(nsIPrefBranch2 **); NS_HIDDEN_(void) ParsePortList(nsIPrefBranch *prefBranch, const char *pref, PRBool remove); nsresult InitializeSocketTransportService(); @@ -150,7 +249,17 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h.network-li private: PRPackedBool mOffline; -@@ -151,6 +152,7 @@ private: + PRPackedBool mOfflineForProfileChange; + PRPackedBool mManageOfflineStatus; + + // Used to handle SetOffline() reentrancy. See the comment in + // SetOffline() for more details. +@@ -146,16 +147,17 @@ private: + PRPackedBool mSetOfflineValue; + + PRPackedBool mShutdown; + + nsCOMPtr mSocketTransportService; nsCOMPtr mDNSService; nsCOMPtr mProxyService; nsCOMPtr mNetworkLinkService; @@ -158,3 +267,8 @@ diff -up xulrunner-5.0/mozilla-release/netwerk/base/src/nsIOService.h.network-li // Cached protocol handlers nsWeakPtr mWeakHandler[NS_N(gScheme)]; + + // cached categories + nsCategoryCache mChannelEventSinks; + nsCategoryCache mContentSniffers; + diff --git a/xulrunner-2.0-secondary-jit.patch b/xulrunner-2.0-secondary-jit.patch deleted file mode 100644 index 4656129..0000000 --- a/xulrunner-2.0-secondary-jit.patch +++ /dev/null @@ -1,14 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=627668 - -diff -up xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit xulrunner-2.0/mozilla-central/js/src/Makefile.in ---- xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit 2010-11-04 21:05:48.000000000 +0100 -+++ xulrunner-2.0/mozilla-central/js/src/Makefile.in 2010-11-15 14:17:39.000000000 +0100 -@@ -371,7 +371,7 @@ CPPSRCS += checks.cc \ - # END enclude sources for V8 dtoa - ############################################# - --ifeq (,$(filter-out powerpc sparc,$(TARGET_CPU))) -+ifeq (,$(filter-out powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU))) - - VPATH += $(srcdir)/assembler \ - $(srcdir)/assembler/wtf \ diff --git a/xulrunner-5.0-secondary-ipc.patch b/xulrunner-6.0-secondary-ipc.patch similarity index 62% rename from xulrunner-5.0-secondary-ipc.patch rename to xulrunner-6.0-secondary-ipc.patch index a64dc4e..ed09f25 100644 --- a/xulrunner-5.0-secondary-ipc.patch +++ b/xulrunner-6.0-secondary-ipc.patch @@ -1,8 +1,6 @@ -Bug 668460 - Adds IPC build config for s390(x) and powerpc(64) - -diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc ---- xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc 2011-06-30 09:08:26.777844341 +0200 +diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc +--- xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-08-11 23:41:01.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc 2011-08-16 10:05:26.325449386 +0200 @@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path bool DataPack::Get(uint32_t resource_id, StringPiece* data) { // It won't be hard to make this endian-agnostic, but it's not worth @@ -19,18 +17,17 @@ diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.second DataPackEntry* target = reinterpret_cast( bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_, -diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h ---- xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h 2011-06-30 09:08:26.777844341 +0200 +diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h +--- xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-08-11 23:41:01.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h 2011-08-16 10:07:23.093899409 +0200 @@ -57,9 +57,24 @@ #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 #define WCHAR_T_IS_UNSIGNED 1 --#elif defined(__ppc__) +#elif defined(__powerpc64__) +#define ARCH_CPU_PPC64 1 +#define ARCH_CPU_64_BITS 1 -+#elif defined(__powerpc__) + #elif defined(__ppc__) || defined(__powerpc__) #define ARCH_CPU_PPC 1 #define ARCH_CPU_32_BITS 1 +#elif defined(__s390x__) @@ -48,9 +45,9 @@ diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/build/build_config.h.sec #else #error Please add support for your architecture in build/build_config.h #endif -diff -up xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h ---- xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-06-15 23:57:27.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-06-30 09:47:16.629029528 +0200 +diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h +--- xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-08-11 23:41:01.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-08-16 10:05:26.326449206 +0200 @@ -219,7 +219,8 @@ struct ParamTraits { } }; diff --git a/xulrunner.spec b/xulrunner.spec index 8bbcb08..96d3f8a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -57,8 +57,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 5.0 -Release: 5%{?pre_tag}%{?dist} +Version: 6.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -73,16 +73,15 @@ Source21: %{name}.sh.in Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch9: mozilla-build-sbrk.patch -Patch13: xulrunner-2.0-secondary-jit.patch Patch14: xulrunner-2.0-chromium-types.patch -Patch15: firefox-5.0-xulstub.patch +Patch15: firefox-6.0-xulstub.patch %if 0%{?fedora} <= 15 Patch16: add-gtkmozembed.patch %endif %if 0%{?fedora} > 15 Patch17: xulrunner-5.0-curl.patch %endif -Patch18: xulrunner-5.0-secondary-ipc.patch +Patch18: xulrunner-6.0-secondary-ipc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -91,11 +90,8 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches -Patch32: firefox-4.0-moz-app-launcher.patch -Patch33: firefox-4.0-gnome3.patch Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch -Patch36: xulrunner-omnijar-5.patch # --------------------------------------------------- @@ -206,9 +202,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch1 -p2 -b .build %patch9 -p2 -b .sbrk -%patch13 -p2 -b .secondary-jit %patch14 -p1 -b .chromium-types -%patch15 -p1 -R -b .xulstub +%patch15 -p2 -b .xulstub %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed %endif @@ -222,11 +217,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -%patch32 -p1 -b .moz-app-launcher -%patch33 -p1 -b .gnome3 -%patch34 -p2 -b .network-link-service +%patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 -%patch36 -p2 -b .omnijar %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -481,6 +473,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Aug 16 2011 Martin Stransky 6.0-1 +- 6.0 + * Thu Jun 30 2011 Martin Stransky 5.0-5 - Fixed build on powerpc(64) From 2272710ef8d2f7bb2dc99a4753fb549a2eb4daaf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 16 Aug 2011 11:11:35 +0200 Subject: [PATCH 190/486] Update to 6.0 - patch fix --- firefox-6.0-xulstub.patch | 45 +++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/firefox-6.0-xulstub.patch b/firefox-6.0-xulstub.patch index 586c2b5..07a731c 100644 --- a/firefox-6.0-xulstub.patch +++ b/firefox-6.0-xulstub.patch @@ -1,6 +1,6 @@ diff -up xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp ---- xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp.xulstub 2011-08-16 09:57:54.550206534 +0200 -+++ xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp 2011-08-16 09:57:54.550206534 +0200 +--- xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp.xulstub 2011-08-16 10:24:27.012660389 +0200 ++++ xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp 2011-08-16 10:24:27.012660389 +0200 @@ -0,0 +1,760 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** @@ -764,7 +764,7 @@ diff -up xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp.xulstub xulrunne +#endif // XP_WIN diff -up xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk --- xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk.xulstub 2011-08-11 23:41:32.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk 2011-08-16 09:57:54.551206436 +0200 ++++ xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk 2011-08-16 10:24:27.013660277 +0200 @@ -56,6 +56,7 @@ XPCOM_GLUE_SRC_LCPPSRCS = \ nsISupportsImpl.cpp \ nsMemory.cpp \ @@ -775,7 +775,7 @@ diff -up xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk.xulstub xulrunner-6.0/ nsQuickSort.cpp \ diff -up xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h --- xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h.xulstub 2011-08-11 23:41:32.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h 2011-08-16 09:57:54.553206240 +0200 ++++ xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h 2011-08-16 10:24:27.013660277 +0200 @@ -41,6 +41,54 @@ #include "nscore.h" @@ -833,7 +833,7 @@ diff -up xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h.xulst /** diff -up xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in --- xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in.xulstub 2011-08-11 23:41:33.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in 2011-08-16 09:57:54.560205553 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in 2011-08-16 10:24:27.014660167 +0200 @@ -69,6 +69,20 @@ endif CPPSRCS = nsXULRunnerApp.cpp @@ -856,8 +856,8 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in.xulstub xulrunn -I$(topsrcdir)/toolkit/xre \ -I$(topsrcdir)/toolkit/profile \ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h.xulstub 2011-08-16 09:57:54.569204670 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h 2011-08-16 09:57:54.569204670 +0200 +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h.xulstub 2011-08-16 10:24:27.015660057 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h 2011-08-16 10:24:27.015660057 +0200 @@ -0,0 +1,58 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -918,8 +918,8 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h.xulstub xul + +#endif // nsRegisterGRE_h__ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp.xulstub 2011-08-16 09:57:54.577203884 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp 2011-08-16 09:57:54.577203884 +0200 +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp.xulstub 2011-08-16 10:24:27.016659944 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp 2011-08-16 10:24:27.016659944 +0200 @@ -0,0 +1,272 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1194,8 +1194,8 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp.xulst + PR_Delete(regFile); +} diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp.xulstub 2011-08-16 09:57:54.610200648 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp 2011-08-16 09:57:54.611200550 +0200 +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp.xulstub 2011-08-16 10:24:27.017659831 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp 2011-08-16 10:24:27.017659831 +0200 @@ -0,0 +1,57 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1255,8 +1255,8 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp.xulst + fprintf(stderr, "Registration not implemented on this platform!\n"); +} diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp.xulstub 2011-08-16 09:57:54.619199765 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp 2011-08-16 09:57:54.619199765 +0200 +--- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp.xulstub 2011-08-16 10:24:27.018659716 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp 2011-08-16 10:24:27.018659716 +0200 @@ -0,0 +1,288 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1548,7 +1548,7 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp.xulstu +} diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp --- xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp.xulstub 2011-08-11 23:41:33.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp 2011-08-16 09:57:54.627198981 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp 2011-08-16 10:24:27.019659601 +0200 @@ -43,6 +43,7 @@ #include "nsXULAppAPI.h" @@ -1643,8 +1643,8 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp.xulstub if (argc != 2) { Usage(argv[0]); diff -up xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in.xulstub xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in ---- xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in.xulstub 2011-08-16 09:57:54.406220659 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in 2011-08-16 09:57:54.636198098 +0200 +--- xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in.xulstub 2011-08-16 10:24:26.996662200 +0200 ++++ xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in 2011-08-16 10:24:27.034657911 +0200 @@ -70,6 +70,19 @@ INSTALL_SDK = 1 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk @@ -1665,10 +1665,18 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in.xulstub x # Add pkg-config files to the install:: target pkg_config_files = \ +@@ -111,6 +124,7 @@ endif + -e "s|%includedir%|$(includedir)|" \ + -e "s|%idldir%|$(idldir)|" \ + -e "s|%sdkdir%|$(sdkdir)|" \ ++ -e "s|%libdir%|$(installdir)|" \ + -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ + -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ diff -up xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp --- xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub 2011-08-11 23:41:33.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp 2011-08-16 10:01:16.319912869 +0200 -@@ -409,9 +409,54 @@ main(int argc, char **argv) ++++ xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp 2011-08-16 11:10:02.509742103 +0200 +@@ -409,9 +409,55 @@ main(int argc, char **argv) } #endif if (!greFound) { @@ -1723,6 +1731,7 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub xulr + strncpy(greDir, resolved_greDir, MAXPATHLEN); + } +#endif ++ } } #ifdef XP_OS2 From b94c0a62d68d63b6fe16f5334d724ee6ba2c5078 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 16 Aug 2011 11:31:57 +0200 Subject: [PATCH 191/486] update to 6.0 - xulstup patch fix --- firefox-6.0-xulstub.patch | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/firefox-6.0-xulstub.patch b/firefox-6.0-xulstub.patch index 07a731c..de3566a 100644 --- a/firefox-6.0-xulstub.patch +++ b/firefox-6.0-xulstub.patch @@ -1642,37 +1642,6 @@ diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp.xulstub if (IsArg(argv[1], "gre-version")) { if (argc != 2) { Usage(argv[0]); -diff -up xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in.xulstub xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in ---- xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in.xulstub 2011-08-16 10:24:26.996662200 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/installer/Makefile.in 2011-08-16 10:24:27.034657911 +0200 -@@ -70,6 +70,19 @@ INSTALL_SDK = 1 - - include $(topsrcdir)/toolkit/mozapps/installer/packager.mk - -+$(MOZILLA_VERSION).system.conf: $(topsrcdir)/config/milestone.txt Makefile -+ printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \ -+ $(MOZILLA_VERSION) $(installdir) $(TARGET_XPCOM_ABI)> $@ -+ -+ifndef SKIP_GRE_REGISTRATION -+# to register xulrunner per-user, override this with $HOME/.gre.d -+regdir = /etc/gre.d -+ -+install:: $(MOZILLA_VERSION).system.conf -+ $(NSINSTALL) -D $(DESTDIR)$(regdir) -+ $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(regdir) -+endif -+ - # Add pkg-config files to the install:: target - - pkg_config_files = \ -@@ -111,6 +124,7 @@ endif - -e "s|%includedir%|$(includedir)|" \ - -e "s|%idldir%|$(idldir)|" \ - -e "s|%sdkdir%|$(sdkdir)|" \ -+ -e "s|%libdir%|$(installdir)|" \ - -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ - -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ - -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ diff -up xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp --- xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub 2011-08-11 23:41:33.000000000 +0200 +++ xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp 2011-08-16 11:10:02.509742103 +0200 From 65d60136295156cf294d3fe54c54e2d39511cbf7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 16 Aug 2011 12:18:47 +0200 Subject: [PATCH 192/486] Update to 5.0 - removed gre.conf stuff --- xulrunner.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 96d3f8a..21ced17 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -17,7 +17,7 @@ %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} %global tarballdir mozilla-release -%global gre_dir %{_sysconfdir}/gre.d +#%global gre_dir %{_sysconfdir}/gre.d # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -74,7 +74,7 @@ Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch9: mozilla-build-sbrk.patch Patch14: xulrunner-2.0-chromium-types.patch -Patch15: firefox-6.0-xulstub.patch +#Patch15: firefox-6.0-xulstub.patch %if 0%{?fedora} <= 15 Patch16: add-gtkmozembed.patch %endif @@ -203,7 +203,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch1 -p2 -b .build %patch9 -p2 -b .sbrk %patch14 -p1 -b .chromium-types -%patch15 -p2 -b .xulstub +#%patch15 -p2 -b .xulstub %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed %endif @@ -376,10 +376,10 @@ done popd # GRE stuff -MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` -%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ - $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} -chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} +#MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` +#%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ +# $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} +#chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d @@ -425,8 +425,8 @@ fi %files %defattr(-,root,root,-) %{_bindir}/xulrunner -%dir %{_sysconfdir}/gre.d -%{_sysconfdir}/gre.d/gre*.conf +#%dir %{_sysconfdir}/gre.d +#%{_sysconfdir}/gre.d/gre*.conf %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.txt From 11a265a34235bdcdfcd58e79b7a0fdf6a8b97195 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 16 Aug 2011 12:20:44 +0200 Subject: [PATCH 193/486] Update to 5.0 - mozilla-639554 --- mozilla-639554.patch | 15 +++++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 mozilla-639554.patch diff --git a/mozilla-639554.patch b/mozilla-639554.patch new file mode 100644 index 0000000..12d32b2 --- /dev/null +++ b/mozilla-639554.patch @@ -0,0 +1,15 @@ +--- a/toolkit/mozapps/installer/packager.mk ++++ b/toolkit/mozapps/installer/packager.mk +@@ -621,10 +621,12 @@ ifdef INSTALL_SDK # Here comes the hard + (cd $(DESTDIR)$(idldir) && tar -xf -) + # SDK directory is the libs + a bunch of symlinks + $(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/lib ++ $(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/bin + if test -f $(DIST)/include/xpcom-config.h; then \ + $(SYSINSTALL) $(IFLAGS1) $(DIST)/include/xpcom-config.h $(DESTDIR)$(sdkdir); \ + fi + (cd $(DIST)/sdk/lib && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/lib && tar -xf -) ++ (cd $(DIST)/sdk/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/bin && tar -xf -) + $(RM) -f $(DESTDIR)$(sdkdir)/lib $(DESTDIR)$(sdkdir)/bin $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/sdk/idl $(DESTDIR)$(sdkdir)/idl + ln -s $(sdkdir)/sdk/lib $(DESTDIR)$(sdkdir)/lib + ln -s $(installdir) $(DESTDIR)$(sdkdir)/bin diff --git a/xulrunner.spec b/xulrunner.spec index 96d3f8a..7b776f0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -92,6 +92,7 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch +Patch36: mozilla-639554.patch # --------------------------------------------------- @@ -219,6 +220,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 +%patch36 -p1 -b .639554 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 253d020ea66c3b2bf060f7add97246e19d9bcc5b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 16 Aug 2011 15:43:27 +0200 Subject: [PATCH 194/486] Removed missing files from spec --- xulrunner.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 191be32..cc26f25 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -344,8 +344,6 @@ popd %{__install} -p -c -m 755 dist/bin/xpcshell \ dist/bin/xpidl \ - dist/bin/xpt_dump \ - dist/bin/xpt_link \ $RPM_BUILD_ROOT/%{mozappdir} %{__rm} -rf $RPM_BUILD_ROOT/%{_includedir}/%{name}-%{gecko_dir_ver} @@ -454,6 +452,7 @@ fi %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %{mozappdir}/plugin-container +%{mozappdir}/hyphenation/* %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter @@ -469,8 +468,6 @@ fi %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell %{mozappdir}/xpidl -%{mozappdir}/xpt_dump -%{mozappdir}/xpt_link #--------------------------------------------------------------------- From 0aac89f41ee106b9136208d014ed0d5fb8ecbf65 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 16 Aug 2011 16:46:34 +0200 Subject: [PATCH 195/486] Removed unnecessary patch --- firefox-6.0-xulstub.patch | 1706 ------------------------------------- xulrunner.spec | 2 - 2 files changed, 1708 deletions(-) delete mode 100644 firefox-6.0-xulstub.patch diff --git a/firefox-6.0-xulstub.patch b/firefox-6.0-xulstub.patch deleted file mode 100644 index de3566a..0000000 --- a/firefox-6.0-xulstub.patch +++ /dev/null @@ -1,1706 +0,0 @@ -diff -up xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp ---- xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp.xulstub 2011-08-16 10:24:27.012660389 +0200 -+++ xulrunner-6.0/mozilla-release/xpcom/glue/nsGREGlue.cpp 2011-08-16 10:24:27.012660389 +0200 -@@ -0,0 +1,760 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is Mozilla Communicator. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corp. -+ * Portions created by the Initial Developer are Copyright (C) 2003 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Sean Su -+ * Benjamin Smedberg -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsXPCOMGlue.h" -+ -+#include "nsAutoPtr.h" -+#include "nsINIParser.h" -+#include "nsVersionComparator.h" -+#include "nsXPCOMPrivate.h" -+ -+#include -+#include -+#include -+#include -+ -+#ifdef XP_WIN32 -+# include -+# include -+# include -+# define snprintf _snprintf -+# define R_OK 04 -+#elif defined(XP_OS2) -+# define INCL_DOS -+# include -+#elif defined(XP_MACOSX) -+# include -+# include -+# include -+#elif defined(XP_UNIX) -+# include -+# include -+# include -+#endif -+ -+#include -+ -+/** -+ * Like strncat, appends a buffer to another buffer. This is where the -+ * similarity ends. Firstly, the "count" here is the total size of the buffer -+ * (not the number of chars to append. Secondly, the function returns PR_FALSE -+ * if the buffer is not long enough to hold the concatenated string. -+ */ -+static PRBool safe_strncat(char *dest, const char *append, PRUint32 count) -+{ -+ char *end = dest + count - 1; -+ -+ // skip to the end of dest -+ while (*dest) -+ ++dest; -+ -+ while (*append && dest < end) { -+ *dest = *append; -+ ++dest, ++append; -+ } -+ -+ *dest = '\0'; -+ -+ return *append == '\0'; -+} -+ -+#ifdef XP_WIN -+static PRBool -+CheckVersion(const PRUnichar* toCheck, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength); -+#endif -+static PRBool -+CheckVersion(const char* toCheck, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength); -+ -+ -+#if defined(XP_MACOSX) -+ -+static PRBool -+GRE_FindGREFramework(const char* rootPath, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char* buffer, PRUint32 buflen); -+ -+#elif defined(XP_UNIX) -+ -+static PRBool -+GRE_GetPathFromConfigDir(const char* dirname, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char* buffer, PRUint32 buflen); -+ -+static PRBool -+GRE_GetPathFromConfigFile(const char* filename, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char* buffer, PRUint32 buflen); -+ -+#elif defined(XP_WIN) -+ -+static PRBool -+GRE_GetPathFromRegKey(HKEY aRegKey, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char* buffer, PRUint32 buflen); -+ -+#endif -+ -+nsresult -+GRE_GetGREPathWithProperties(const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char *aBuffer, PRUint32 aBufLen) -+{ -+#ifdef TARGET_XPCOM_ABI -+ // append the ABI to the properties to match only binary -+ // compatible GREs -+ static const GREProperty kExtraProperty = -+ { "abi", TARGET_XPCOM_ABI }; -+ -+ nsAutoArrayPtr allProperties(new GREProperty[propertiesLength + 1]); -+ if (!allProperties) -+ return NS_ERROR_OUT_OF_MEMORY; -+ -+ for (PRUint32 i=0; i= aBufLen) -+ return NS_ERROR_FILE_NAME_TOO_LONG; -+ -+ strcpy(aBuffer, p); -+ -+ return NS_OK; -+ } -+ -+ // the Gecko bits that sit next to the application or in the LD_LIBRARY_PATH -+ env = getenv("USE_LOCAL_GRE"); -+ if (env && *env) { -+ *aBuffer = nsnull; -+ return NS_OK; -+ } -+ -+#ifdef XP_MACOSX -+ aBuffer[0] = '\0'; -+ -+ // Check the bundle first, for /Contents/Frameworks/XUL.framework/libxpcom.dylib -+ CFBundleRef appBundle = CFBundleGetMainBundle(); -+ if (appBundle) { -+ CFURLRef fwurl = CFBundleCopyPrivateFrameworksURL(appBundle); -+ CFURLRef absfwurl = nsnull; -+ if (fwurl) { -+ absfwurl = CFURLCopyAbsoluteURL(fwurl); -+ CFRelease(fwurl); -+ } -+ -+ if (absfwurl) { -+ CFURLRef xulurl = -+ CFURLCreateCopyAppendingPathComponent(NULL, absfwurl, -+ CFSTR(GRE_FRAMEWORK_NAME), -+ PR_TRUE); -+ -+ if (xulurl) { -+ CFURLRef xpcomurl = -+ CFURLCreateCopyAppendingPathComponent(NULL, xulurl, -+ CFSTR("libxpcom.dylib"), -+ PR_FALSE); -+ -+ if (xpcomurl) { -+ char tbuffer[MAXPATHLEN]; -+ -+ if (CFURLGetFileSystemRepresentation(xpcomurl, PR_TRUE, -+ (UInt8*) tbuffer, -+ sizeof(tbuffer)) && -+ access(tbuffer, R_OK | X_OK) == 0) { -+ if (!realpath(tbuffer, aBuffer)) { -+ aBuffer[0] = '\0'; -+ } -+ } -+ -+ CFRelease(xpcomurl); -+ } -+ -+ CFRelease(xulurl); -+ } -+ -+ CFRelease(absfwurl); -+ } -+ } -+ -+ if (aBuffer[0]) -+ return NS_OK; -+ -+ // Check ~/Library/Frameworks/XUL.framework/Versions//libxpcom.dylib -+ const char *home = getenv("HOME"); -+ if (home && *home && GRE_FindGREFramework(home, -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen)) { -+ return NS_OK; -+ } -+ -+ // Check /Library/Frameworks/XUL.framework/Versions//libxpcom.dylib -+ if (GRE_FindGREFramework("", -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen)) { -+ return NS_OK; -+ } -+ -+#elif defined(XP_UNIX) -+ env = getenv("MOZ_GRE_CONF"); -+ if (env && GRE_GetPathFromConfigFile(env, -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen)) { -+ return NS_OK; -+ } -+ -+ env = getenv("HOME"); -+ if (env && *env) { -+ char buffer[MAXPATHLEN]; -+ -+ // Look in ~/.gre.config -+ -+ snprintf(buffer, sizeof(buffer), -+ "%s" XPCOM_FILE_PATH_SEPARATOR GRE_CONF_NAME, env); -+ -+ if (GRE_GetPathFromConfigFile(buffer, -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen)) { -+ return NS_OK; -+ } -+ -+ // Look in ~/.gre.d/*.conf -+ -+ snprintf(buffer, sizeof(buffer), -+ "%s" XPCOM_FILE_PATH_SEPARATOR GRE_USER_CONF_DIR, env); -+ -+ if (GRE_GetPathFromConfigDir(buffer, -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen)) { -+ return NS_OK; -+ } -+ } -+ -+ // Look for a global /etc/gre.conf file -+ if (GRE_GetPathFromConfigFile(GRE_CONF_PATH, -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen)) { -+ return NS_OK; -+ } -+ -+ // Look for a group of config files in /etc/gre.d/ -+ if (GRE_GetPathFromConfigDir(GRE_CONF_DIR, -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen)) { -+ return NS_OK; -+ } -+ -+#elif defined(XP_WIN) -+ HKEY hRegKey = NULL; -+ -+ // A couple of key points here: -+ // 1. Note the usage of the "Software\\mozilla.org\\GRE" subkey - this allows -+ // us to have multiple versions of GREs on the same machine by having -+ // subkeys such as 1.0, 1.1, 2.0 etc. under it. -+ // 2. In this sample below we're looking for the location of GRE version 1.2 -+ // i.e. we're compatible with GRE 1.2 and we're trying to find it's install -+ // location. -+ // -+ // Please see http://www.mozilla.org/projects/embedding/GRE.html for -+ // more info. -+ // -+ if (::RegOpenKeyExW(HKEY_CURRENT_USER, GRE_WIN_REG_LOC, 0, -+ KEY_READ, &hRegKey) == ERROR_SUCCESS) { -+ PRBool ok = GRE_GetPathFromRegKey(hRegKey, -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen); -+ ::RegCloseKey(hRegKey); -+ -+ if (ok) -+ return NS_OK; -+ } -+ -+ if (::RegOpenKeyExW(HKEY_LOCAL_MACHINE, GRE_WIN_REG_LOC, 0, -+ KEY_ENUMERATE_SUB_KEYS, &hRegKey) == ERROR_SUCCESS) { -+ PRBool ok = GRE_GetPathFromRegKey(hRegKey, -+ versions, versionsLength, -+ allProperties, allPropertiesLength, -+ aBuffer, aBufLen); -+ ::RegCloseKey(hRegKey); -+ -+ if (ok) -+ return NS_OK; -+ } -+#endif -+ -+ return NS_ERROR_FAILURE; -+} -+ -+static PRBool -+CheckVersion(const char* toCheck, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength) -+{ -+ -+ for (const GREVersionRange *versionsEnd = versions + versionsLength; -+ versions < versionsEnd; -+ ++versions) { -+ PRInt32 c = NS_CompareVersions(toCheck, versions->lower); -+ if (c < 0) -+ continue; -+ -+ if (!c && !versions->lowerInclusive) -+ continue; -+ -+ c = NS_CompareVersions(toCheck, versions->upper); -+ if (c > 0) -+ continue; -+ -+ if (!c && !versions->upperInclusive) -+ continue; -+ -+ return PR_TRUE; -+ } -+ -+ return PR_FALSE; -+} -+ -+#ifdef XP_WIN -+ -+// Allocate an array of characters using new[], converting from UTF8 to UTF-16. -+// @note Use nsAutoArrayPtr for this result. -+ -+static PRUnichar* -+ConvertUTF8toNewUTF16(const char *cstr) -+{ -+ int len = MultiByteToWideChar(CP_UTF8, 0, cstr, -1, NULL, 0); -+ WCHAR *wstr = new WCHAR[len]; -+ MultiByteToWideChar(CP_UTF8, 0, cstr, -1, wstr, len); -+ return wstr; -+} -+ -+typedef nsAutoArrayPtr AutoWString; -+ -+static PRBool -+CheckVersion(const PRUnichar* toCheck, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength) -+{ -+ for (const GREVersionRange *versionsEnd = versions + versionsLength; -+ versions < versionsEnd; -+ ++versions) { -+ AutoWString wlower(ConvertUTF8toNewUTF16(versions->lower)); -+ PRInt32 c = NS_CompareVersions(toCheck, wlower); -+ if (c < 0) -+ continue; -+ -+ if (!c && !versions->lowerInclusive) -+ continue; -+ -+ AutoWString wupper(ConvertUTF8toNewUTF16(versions->upper)); -+ c = NS_CompareVersions(toCheck, wupper); -+ if (c > 0) -+ continue; -+ -+ if (!c && !versions->upperInclusive) -+ continue; -+ -+ return PR_TRUE; -+ } -+ -+ return PR_FALSE; -+} -+#endif -+ -+ -+#ifdef XP_MACOSX -+PRBool -+GRE_FindGREFramework(const char* rootPath, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char* buffer, PRUint32 buflen) -+{ -+ PRBool found = PR_FALSE; -+ -+ snprintf(buffer, buflen, -+ "%s/Library/Frameworks/" GRE_FRAMEWORK_NAME "/Versions", rootPath); -+ DIR *dir = opendir(buffer); -+ if (dir) { -+ struct dirent *entry; -+ while (!found && (entry = readdir(dir))) { -+ if (CheckVersion(entry->d_name, versions, versionsLength)) { -+ snprintf(buffer, buflen, -+ "%s/Library/Frameworks/" GRE_FRAMEWORK_NAME -+ "/Versions/%s/" XPCOM_DLL, rootPath, entry->d_name); -+ if (access(buffer, R_OK | X_OK) == 0) -+ found = PR_TRUE; -+ } -+ } -+ -+ closedir(dir); -+ } -+ -+ if (found) -+ return PR_TRUE; -+ -+ buffer[0] = '\0'; -+ return PR_FALSE; -+} -+ -+#elif defined(XP_UNIX) -+ -+static PRBool IsConfFile(const char *filename) -+{ -+ const char *dot = strrchr(filename, '.'); -+ -+ return (dot && strcmp(dot, ".conf") == 0); -+} -+ -+PRBool -+GRE_GetPathFromConfigDir(const char* dirname, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char* buffer, PRUint32 buflen) -+{ -+ // Open the directory provided and try to read any files in that -+ // directory that end with .conf. We look for an entry that might -+ // point to the GRE that we're interested in. -+ DIR *dir = opendir(dirname); -+ if (!dir) -+ return nsnull; -+ -+ PRBool found = PR_FALSE; -+ struct dirent *entry; -+ -+ while (!found && (entry = readdir(dir))) { -+ -+ // Only look for files that end in .conf -+ // IsConfFile will skip "." and ".." -+ if (!IsConfFile(entry->d_name)) -+ continue; -+ -+ char fullPath[MAXPATHLEN]; -+ snprintf(fullPath, sizeof(fullPath), "%s" XPCOM_FILE_PATH_SEPARATOR "%s", -+ dirname, entry->d_name); -+ -+ found = GRE_GetPathFromConfigFile(fullPath, -+ versions, versionsLength, -+ properties, propertiesLength, -+ buffer, buflen); -+ } -+ -+ closedir(dir); -+ -+ return found; -+} -+ -+#define READ_BUFFER_SIZE 1024 -+ -+struct INIClosure -+{ -+ nsINIParser *parser; -+ const GREVersionRange *versions; -+ PRUint32 versionsLength; -+ const GREProperty *properties; -+ PRUint32 propertiesLength; -+ char *pathBuffer; -+ PRUint32 buflen; -+ PRBool found; -+}; -+ -+static PRBool -+CheckINIHeader(const char *aHeader, void *aClosure) -+{ -+ nsresult rv; -+ -+ INIClosure *c = reinterpret_cast(aClosure); -+ -+ if (!CheckVersion(aHeader, c->versions, c->versionsLength)) -+ return PR_TRUE; -+ -+ const GREProperty *properties = c->properties; -+ const GREProperty *endProperties = properties + c->propertiesLength; -+ for (; properties < endProperties; ++properties) { -+ char buffer[MAXPATHLEN]; -+ rv = c->parser->GetString(aHeader, properties->property, -+ buffer, sizeof(buffer)); -+ if (NS_FAILED(rv)) -+ return PR_TRUE; -+ -+ if (strcmp(buffer, properties->value)) -+ return PR_TRUE; -+ } -+ -+ rv = c->parser->GetString(aHeader, "GRE_PATH", c->pathBuffer, c->buflen); -+ if (NS_FAILED(rv)) -+ return PR_TRUE; -+ -+ if (!safe_strncat(c->pathBuffer, "/" XPCOM_DLL, c->buflen) || -+ access(c->pathBuffer, R_OK)) -+ return PR_TRUE; -+ -+ // We found a good GRE! Stop looking. -+ c->found = PR_TRUE; -+ return PR_FALSE; -+} -+ -+PRBool -+GRE_GetPathFromConfigFile(const char* filename, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char* pathBuffer, PRUint32 buflen) -+{ -+ nsINIParser parser; -+ nsresult rv = parser.Init(filename); -+ if (NS_FAILED(rv)) -+ return PR_FALSE; -+ -+ INIClosure c = { -+ &parser, -+ versions, versionsLength, -+ properties, propertiesLength, -+ pathBuffer, buflen, -+ PR_FALSE -+ }; -+ -+ parser.GetSections(CheckINIHeader, &c); -+ return c.found; -+} -+ -+#elif defined(XP_WIN) -+ -+static PRBool -+CopyWithEnvExpansion(PRUnichar* aDest, const PRUnichar* aSource, PRUint32 aBufLen, -+ DWORD aType) -+{ -+ switch (aType) { -+ case REG_SZ: -+ if (wcslen(aSource) >= aBufLen) -+ return PR_FALSE; -+ -+ wcscpy(aDest, aSource); -+ return PR_TRUE; -+ -+ case REG_EXPAND_SZ: -+ if (ExpandEnvironmentStringsW(aSource, aDest, aBufLen) > aBufLen) -+ return PR_FALSE; -+ -+ return PR_TRUE; -+ }; -+ -+ // Whoops! We expected REG_SZ or REG_EXPAND_SZ, what happened here? -+ -+ return PR_FALSE; -+} -+ -+PRBool -+GRE_GetPathFromRegKey(HKEY aRegKey, -+ const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char* aBuffer, PRUint32 aBufLen) -+{ -+ // Formerly, GREs were registered at the registry key -+ // HKLM/Software/mozilla.org/GRE/ valuepair GreHome=Path. -+ // Nowadays, they are registered in any subkey of -+ // Software/mozilla.org/GRE, with the following valuepairs: -+ // Version= (REG_SZ) -+ // GreHome= (REG_SZ or REG_EXPAND_SZ) -+ // = (REG_SZ) -+ // -+ // Additional meta-info may be available in the future, including -+ // localization info and other information which might be pertinent -+ // to selecting one GRE over another. -+ // -+ // When a GRE is being registered, it should try to register itself at -+ // HKLM/Software/mozilla.org/GRE/ first, to preserve compatibility -+ // with older glue. If this key is already taken (i.e. there is more than -+ // one GRE of that version installed), it should append a unique number to -+ // the version, for example: -+ // 1.1 (already in use), 1.1_1, 1.1_2, etc... -+ -+ DWORD i = 0; -+ PRUnichar buffer[MAXPATHLEN + 1]; -+ -+ while (PR_TRUE) { -+ PRUnichar name[MAXPATHLEN + 1]; -+ DWORD nameLen = MAXPATHLEN; -+ if (::RegEnumKeyExW(aRegKey, i, name, &nameLen, NULL, NULL, NULL, NULL) != -+ ERROR_SUCCESS) { -+ break; -+ } -+ -+ HKEY subKey = NULL; -+ if (::RegOpenKeyExW(aRegKey, name, 0, KEY_QUERY_VALUE, &subKey) != -+ ERROR_SUCCESS) { -+ continue; -+ } -+ -+ PRUnichar version[40]; -+ DWORD versionlen = 40; -+ PRUnichar pathbuf[MAXPATHLEN + 1]; -+ DWORD pathlen; -+ DWORD pathtype; -+ -+ PRBool ok = PR_FALSE; -+ -+ if (::RegQueryValueExW(subKey, L"Version", NULL, NULL, -+ (BYTE*) version, &versionlen) == ERROR_SUCCESS && -+ CheckVersion(version, versions, versionsLength)) { -+ -+ ok = PR_TRUE; -+ const GREProperty *props = properties; -+ const GREProperty *propsEnd = properties + propertiesLength; -+ for (; ok && props < propsEnd; ++props) { -+ pathlen = MAXPATHLEN + 1; -+ -+ AutoWString wproperty(ConvertUTF8toNewUTF16(props->property)); -+ AutoWString wvalue(ConvertUTF8toNewUTF16(props->value)); -+ if (::RegQueryValueExW(subKey, wproperty, NULL, &pathtype, -+ (BYTE*) pathbuf, &pathlen) != ERROR_SUCCESS || -+ wcscmp(pathbuf, wvalue)) -+ ok = PR_FALSE; -+ } -+ -+ pathlen = sizeof(pathbuf); -+ if (ok && -+ (!::RegQueryValueExW(subKey, L"GreHome", NULL, &pathtype, -+ (BYTE*) pathbuf, &pathlen) == ERROR_SUCCESS || -+ !*pathbuf || -+ !CopyWithEnvExpansion(buffer, pathbuf, MAXPATHLEN, pathtype))) { -+ ok = PR_FALSE; -+ } -+ else if (!wcsncat(buffer, L"\\" LXPCOM_DLL, aBufLen) -+#ifdef WINCE -+ || (GetFileAttributesW(buffer) == INVALID_FILE_ATTRIBUTES) -+#else -+ || _waccess(buffer, R_OK) -+#endif -+ ) { -+ ok = PR_FALSE; -+ } -+ } -+ -+ RegCloseKey(subKey); -+ -+ if (ok) { -+ WideCharToMultiByte(CP_UTF8, 0, buffer, -1, aBuffer, aBufLen, NULL, NULL); -+ return PR_TRUE; -+ } -+ -+ ++i; -+ } -+ -+ aBuffer[0] = '\0'; -+ -+ return PR_FALSE; -+} -+#endif // XP_WIN -diff -up xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk ---- xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk.xulstub 2011-08-11 23:41:32.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xpcom/glue/objs.mk 2011-08-16 10:24:27.013660277 +0200 -@@ -56,6 +56,7 @@ XPCOM_GLUE_SRC_LCPPSRCS = \ - nsISupportsImpl.cpp \ - nsMemory.cpp \ - nsWeakReference.cpp \ -+ nsGREGlue.cpp \ - nsVersionComparator.cpp \ - nsTHashtable.cpp \ - nsQuickSort.cpp \ -diff -up xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h.xulstub xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h ---- xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h.xulstub 2011-08-11 23:41:32.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xpcom/glue/standalone/nsXPCOMGlue.h 2011-08-16 10:24:27.013660277 +0200 -@@ -41,6 +41,54 @@ - - #include "nscore.h" - -+class nsILocalFile; -+ -+/** -+ * The following function is available in both the standalone and -+ * dynamically linked versions of the glue. -+ */ -+ -+struct GREVersionRange { -+ const char *lower; -+ PRBool lowerInclusive; -+ const char *upper; -+ PRBool upperInclusive; -+}; -+ -+struct GREProperty { -+ const char *property; -+ const char *value; -+}; -+ -+/** -+ * Locate the path of the xpcom shared library from a GRE with specified -+ * properties. -+ * -+ * @param versions An array of version ranges: if any version range -+ * matches, the GRE is considered acceptable. -+ * @param versionsLength The length of the versions array. -+ * @param properties A null-terminated list of GRE property/value pairs -+ * which must all be satisfied. -+ * @param propertiesLength Length of the properties array. -+ * @param buffer A buffer to be filled with the appropriate path. If -+ * the "local" GRE is specified (via the USE_LOCAL_GRE -+ * environment variable, for example), this buffer -+ * will be set to the empty string. -+ * @param buflen The length of buffer. This must be at least -+ * PATH_MAX/MAXPATHLEN. -+ * @throws NS_ERROR_FAILURE if an appropriate GRE could not be found. -+ * @note The properties parameter is ignored on macintosh, because of the -+ * manner in which the XUL frameworks are installed by version. -+ * @note Currently this uses a "first-fit" algorithm, it does not select -+ * the newest available GRE. -+ */ -+extern "C" NS_COM_GLUE nsresult -+GRE_GetGREPathWithProperties(const GREVersionRange *versions, -+ PRUint32 versionsLength, -+ const GREProperty *properties, -+ PRUint32 propertiesLength, -+ char *buffer, PRUint32 buflen); -+ - #ifdef XPCOM_GLUE - - /** -diff -up xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in ---- xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in.xulstub 2011-08-11 23:41:33.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/Makefile.in 2011-08-16 10:24:27.014660167 +0200 -@@ -69,6 +69,20 @@ endif - - CPPSRCS = nsXULRunnerApp.cpp - -+ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) -+CPPSRCS += nsRegisterGREWin.cpp -+else -+ifeq (OS2,$(OS_ARCH)) -+CPPSRCS += nsRegisterGREVoid.cpp -+else -+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -+CPPSRCS += nsRegisterGREVoid.cpp -+else -+CPPSRCS += nsRegisterGREUnix.cpp -+endif -+endif -+endif -+ - LOCAL_INCLUDES += \ - -I$(topsrcdir)/toolkit/xre \ - -I$(topsrcdir)/toolkit/profile \ -diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h.xulstub 2011-08-16 10:24:27.015660057 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGRE.h 2011-08-16 10:24:27.015660057 +0200 -@@ -0,0 +1,58 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is Mozilla XULRunner. -+ * -+ * The Initial Developer of the Original Code is -+ * Benjamin Smedberg . -+ * -+ * Portions created by the Initial Developer are Copyright (C) 2005 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef nsRegisterGRE_h__ -+#define nsRegisterGRE_h__ -+ -+#include "nscore.h" -+#include "nsStringAPI.h" -+class nsIFile; -+struct GREProperty; -+ -+/** -+ * @return PR_TRUE on success -+ */ -+NS_HIDDEN_(PRBool) -+RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -+ const GREProperty *aProperties, PRUint32 aPropertiesLen, -+ const char *aGREMilestone); -+ -+NS_HIDDEN_(void) -+UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation, -+ const char *aGREMilestone); -+ -+#endif // nsRegisterGRE_h__ -diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp.xulstub 2011-08-16 10:24:27.016659944 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREUnix.cpp 2011-08-16 10:24:27.016659944 +0200 -@@ -0,0 +1,272 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is Mozilla XULRunner. -+ * -+ * The Initial Developer of the Original Code is -+ * Benjamin Smedberg . -+ * -+ * Portions created by the Initial Developer are Copyright (C) 2005 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsRegisterGRE.h" -+#include "nsXPCOMGlue.h" -+ -+#include "nsXPCOM.h" -+#include "nsIFile.h" -+#include "nsILocalFile.h" -+#include "mozilla/FileUtils.h" -+ -+#include "nsAppRunner.h" // for MAXPATHLEN -+#include "nsStringAPI.h" -+#include "nsINIParser.h" -+#include "nsCOMPtr.h" -+ -+#include "prio.h" -+#include "prprf.h" -+#include "prenv.h" -+ -+#include -+#include -+ -+// If we can't register .conf, we try to create a unique filename -+// by looping through _.conf, but if something is seriously wrong -+// we stop at 1000 -+#define UNIQ_LOOP_LIMIT 1000 -+ -+using namespace mozilla; -+ -+static const char kRegFileGlobal[] = "global.reginfo"; -+static const char kRegFileUser[] = "user.reginfo"; -+ -+static PRBool -+MakeConfFile(const char *regfile, const nsCString &greHome, -+ const GREProperty *aProperties, PRUint32 aPropertiesLen, -+ const char *aGREMilestone) -+{ -+ // If the file exists, don't create it again! -+ if (access(regfile, R_OK) == 0) -+ return PR_FALSE; -+ -+ PRBool ok = PR_TRUE; -+ -+ { // scope "fd" so that we can delete the file if something goes wrong -+ AutoFDClose fd = PR_Open(regfile, PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, -+ 0664); -+ if (!fd) -+ return PR_FALSE; -+ -+ static const char kHeader[] = -+ "# Registration file generated by xulrunner. Do not edit.\n\n" -+ "[%s]\n" -+ "GRE_PATH=%s\n"; -+ -+ if (PR_fprintf(fd, kHeader, aGREMilestone, greHome.get()) <= 0) -+ ok = PR_FALSE; -+ -+ for (PRUint32 i = 0; i < aPropertiesLen; ++i) { -+ if (PR_fprintf(fd, "%s=%s\n", -+ aProperties[i].property, aProperties[i].value) <= 0) -+ ok = PR_FALSE; -+ } -+ } -+ -+ if (!ok) -+ PR_Delete(regfile); -+ -+ return ok; -+} -+ -+ -+PRBool -+RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -+ const GREProperty *aProperties, PRUint32 aPropertiesLen, -+ const char *aGREMilestone) -+{ -+ // Register ourself in /etc/gre.d or ~/.gre.d/ and record what key we created -+ // for future unregistration. -+ -+ nsresult rv; -+ -+ char root[MAXPATHLEN] = "/etc/gre.d"; -+ -+ if (!aRegisterGlobally) { -+ char *home = PR_GetEnv("HOME"); -+ if (!home || !*home) -+ return PR_FALSE; -+ -+ PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); -+ } -+ -+ nsCString greHome; -+ rv = aLocation->GetNativePath(greHome); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ nsCOMPtr savedInfoFile; -+ aLocation->Clone(getter_AddRefs(savedInfoFile)); -+ nsCOMPtr localSaved(do_QueryInterface(savedInfoFile)); -+ if (!localSaved) -+ return PR_FALSE; -+ -+ const char *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; -+ localSaved->AppendNative(nsDependentCString(infoname)); -+ -+ AutoFDClose fd; -+ rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_RDWR, 0664, &fd); -+ // XXX report error? -+ if (NS_FAILED(rv)) -+ return PR_FALSE; -+ -+ char keyName[MAXPATHLEN]; -+ -+ PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); -+ if (r < 0) -+ return PR_FALSE; -+ -+ char regfile[MAXPATHLEN]; -+ -+ if (r > 0) { -+ keyName[r] = '\0'; -+ -+ PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, keyName); -+ -+ // There was already a .reginfo file, let's see if we are already -+ // registered. -+ if (access(regfile, R_OK) == 0) { -+ fprintf(stderr, "Warning: Configuration file '%s' already exists.\n" -+ "No action was performed.\n", regfile); -+ return PR_FALSE; -+ } -+ -+ rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd); -+ if (NS_FAILED(rv)) -+ return PR_FALSE; -+ } -+ -+ if (access(root, R_OK | X_OK) && -+ mkdir(root, 0775)) { -+ fprintf(stderr, "Error: could not create '%s'.\n", -+ root); -+ return PR_FALSE; -+ } -+ -+ PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, aGREMilestone); -+ if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen, -+ aGREMilestone)) { -+ PR_fprintf(fd, "%s", aGREMilestone); -+ return PR_TRUE; -+ } -+ -+ for (int i = 0; i < UNIQ_LOOP_LIMIT; ++i) { -+ static char buildID[30]; -+ sprintf(buildID, "%s_%i", aGREMilestone, i); -+ -+ PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, buildID); -+ -+ if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen, -+ aGREMilestone)) { -+ PR_Write(fd, buildID, strlen(buildID)); -+ return PR_TRUE; -+ } -+ } -+ -+ return PR_FALSE; -+} -+ -+void -+UnregisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -+ const char *aGREMilestone) -+{ -+ nsresult rv; -+ -+ char root[MAXPATHLEN] = "/etc/gre.d"; -+ -+ if (!aRegisterGlobally) { -+ char *home = PR_GetEnv("HOME"); -+ if (!home || !*home) -+ return; -+ -+ PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); -+ } -+ -+ nsCOMPtr savedInfoFile; -+ aLocation->Clone(getter_AddRefs(savedInfoFile)); -+ nsCOMPtr localSaved (do_QueryInterface(savedInfoFile)); -+ if (!localSaved) -+ return; -+ -+ const char *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; -+ localSaved->AppendNative(nsDependentCString(infoname)); -+ -+ PRFileDesc* fd = nsnull; -+ rv = localSaved->OpenNSPRFileDesc(PR_RDONLY, 0, &fd); -+ if (NS_FAILED(rv)) { -+ // XXX report error? -+ return; -+ } -+ -+ char keyName[MAXPATHLEN]; -+ PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); -+ PR_Close(fd); -+ -+ localSaved->Remove(PR_FALSE); -+ -+ if (r <= 0) -+ return; -+ -+ keyName[r] = '\0'; -+ -+ char regFile[MAXPATHLEN]; -+ PR_snprintf(regFile, MAXPATHLEN, "%s/%s.conf", root, keyName); -+ -+ nsCOMPtr lf; -+ rv = NS_NewNativeLocalFile(nsDependentCString(regFile), PR_FALSE, -+ getter_AddRefs(lf)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ nsINIParser p; -+ rv = p.Init(lf); -+ if (NS_FAILED(rv)) -+ return; -+ -+ rv = p.GetString(aGREMilestone, "GRE_PATH", root, MAXPATHLEN); -+ if (NS_FAILED(rv)) -+ return; -+ -+ rv = NS_NewNativeLocalFile(nsDependentCString(root), PR_TRUE, -+ getter_AddRefs(lf)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ PRBool eq; -+ if (NS_SUCCEEDED(aLocation->Equals(lf, &eq)) && eq) -+ PR_Delete(regFile); -+} -diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp.xulstub 2011-08-16 10:24:27.017659831 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREVoid.cpp 2011-08-16 10:24:27.017659831 +0200 -@@ -0,0 +1,57 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is Mozilla XULRunner. -+ * -+ * The Initial Developer of the Original Code is -+ * Benjamin Smedberg . -+ * -+ * Portions created by the Initial Developer are Copyright (C) 2005 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsRegisterGRE.h" -+ -+#include -+#include -+ -+int -+RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -+ const GREProperty *aProperties, PRUint32 aPropertiesLen, -+ const char *aGREMilestone) -+{ -+ fprintf(stderr, "Registration not implemented on this platform!\n"); -+ return 1; -+} -+ -+void -+UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation, -+ const char *aGREMilestone) -+{ -+ fprintf(stderr, "Registration not implemented on this platform!\n"); -+} -diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp.xulstub 2011-08-16 10:24:27.018659716 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsRegisterGREWin.cpp 2011-08-16 10:24:27.018659716 +0200 -@@ -0,0 +1,288 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is Mozilla XULRunner. -+ * -+ * The Initial Developer of the Original Code is -+ * Benjamin Smedberg . -+ * -+ * Portions created by the Initial Developer are Copyright (C) 2005 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsRegisterGRE.h" -+ -+#include "nsXPCOM.h" -+#include "nsIFile.h" -+#include "nsILocalFile.h" -+ -+#include "nsAppRunner.h" // for MAXPATHLEN -+#include "nsStringAPI.h" -+#include "nsXPCOMGlue.h" -+#include "nsCOMPtr.h" -+ -+#include "prio.h" -+ -+#include -+#include "malloc.h" -+ -+static const wchar_t kRegKeyRoot[] = L"Software\\mozilla.org\\GRE"; -+static const wchar_t kRegFileGlobal[] = L"global.reginfo"; -+static const wchar_t kRegFileUser[] = L"user.reginfo"; -+ -+static nsresult -+MakeVersionKey(HKEY root, const wchar_t* keyname, const nsString &grehome, -+ const GREProperty *aProperties, PRUint32 aPropertiesLen, -+ const wchar_t *aGREMilestone) -+{ -+ HKEY subkey; -+ DWORD disp; -+ -+ if (::RegCreateKeyExW(root, keyname, NULL, NULL, 0, KEY_WRITE, NULL, -+ &subkey, &disp) != ERROR_SUCCESS) -+ return NS_ERROR_FAILURE; -+ -+ if (disp != REG_CREATED_NEW_KEY) { -+ ::RegCloseKey(subkey); -+ return NS_ERROR_FAILURE; -+ } -+ -+ PRBool failed = PR_FALSE; -+ failed |= ::RegSetValueExW(subkey, L"Version", NULL, REG_SZ, -+ (BYTE*) aGREMilestone, -+ sizeof(PRUnichar) * (wcslen(aGREMilestone) + 1)) -+ != ERROR_SUCCESS; -+ failed |= ::RegSetValueExW(subkey, L"GreHome", NULL, REG_SZ, -+ (BYTE*) grehome.get(), -+ sizeof(PRUnichar) * (grehome.Length() + 1)) -+ != ERROR_SUCCESS; -+ -+ for (PRUint32 i = 0; i < aPropertiesLen; ++i) { -+ // Properties should be ascii only -+ NS_ConvertASCIItoUTF16 prop(aProperties[i].property); -+ NS_ConvertASCIItoUTF16 val(aProperties[i].value); -+ failed |= ::RegSetValueExW(subkey, prop.get(), NULL, REG_SZ, -+ (BYTE*) val.get(), -+ sizeof(wchar_t)*(val.Length()+1) -+ ) != ERROR_SUCCESS; -+ } -+ -+ ::RegCloseKey(subkey); -+ -+ if (failed) { -+ // we created a key but couldn't fill it properly: delete it -+ ::RegDeleteKeyW(root, keyname); -+ return NS_ERROR_FAILURE; -+ } -+ -+ return NS_OK; -+} -+ -+int -+RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, -+ const GREProperty *aProperties, PRUint32 aPropertiesLen, -+ const char *aGREMilestoneAscii) -+{ -+ // Register ourself in the windows registry, and record what key we created -+ // for future unregistration. -+ -+ nsresult rv; -+ PRBool irv; -+ int i; -+ NS_ConvertASCIItoUTF16 aGREMilestone(aGREMilestoneAscii); -+ nsString greHome; -+ rv = aLocation->GetPath(greHome); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ nsCOMPtr savedInfoFile; -+ aLocation->Clone(getter_AddRefs(savedInfoFile)); -+ nsCOMPtr localSaved(do_QueryInterface(savedInfoFile)); -+ if (!localSaved) -+ return PR_FALSE; -+ -+ const wchar_t *infoname = aRegisterGlobally ? kRegFileGlobal : kRegFileUser; -+ localSaved->Append(nsDependentString(infoname)); -+ -+ PRFileDesc* fd = nsnull; -+ rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_RDWR, 0664, &fd); -+ if (NS_FAILED(rv)) { -+ // XXX report error? -+ return PR_FALSE; -+ } -+ -+ HKEY rootKey = NULL; -+ wchar_t keyName[MAXPATHLEN]; -+ PRInt32 r; -+ -+ if (::RegCreateKeyExW(aRegisterGlobally ? HKEY_LOCAL_MACHINE : -+ HKEY_CURRENT_USER, -+ kRegKeyRoot, NULL, NULL, 0, KEY_WRITE, -+ NULL, &rootKey, NULL) != ERROR_SUCCESS) { -+ irv = PR_FALSE; -+ goto reg_end; -+ } -+ -+ r = PR_Read(fd, keyName, MAXPATHLEN); -+ if (r < 0) { -+ irv = PR_FALSE; -+ goto reg_end; -+ } -+ -+ if (r > 0) { -+ keyName[r] = '\0'; -+ -+ // There was already a .reginfo file, let's see if we are already -+ // registered. -+ HKEY existing = NULL; -+ if (::RegOpenKeyExW(rootKey, keyName, NULL, KEY_QUERY_VALUE, &existing) == -+ ERROR_SUCCESS) { -+ fprintf(stderr, "Warning: Registry key Software\\mozilla.org\\GRE\\%s already exists.\n" -+ "No action was performed.\n", -+ keyName); -+ irv = PR_FALSE; -+ goto reg_end; -+ } -+ -+ PR_Close(fd); -+ fd = nsnull; -+ -+ rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd); -+ if (NS_FAILED(rv)) { -+ // XXX report error? -+ irv = PR_FALSE; -+ goto reg_end; -+ } -+ } -+ -+ wcscpy(keyName, aGREMilestone.get()); -+ rv = MakeVersionKey(rootKey, keyName, greHome, aProperties, aPropertiesLen, -+ aGREMilestone.get()); -+ if (NS_SUCCEEDED(rv)) { -+ NS_ConvertUTF16toUTF8 keyNameAscii(keyName); -+ PR_Write(fd, keyNameAscii.get(), sizeof(char)*keyNameAscii.Length()); -+ irv = PR_TRUE; -+ goto reg_end; -+ } -+ -+ for (i = 0; i < 1000; ++i) { -+ swprintf(keyName, L"%s_%i", aGREMilestone.get(), i); -+ rv = MakeVersionKey(rootKey, keyName, greHome, -+ aProperties, aPropertiesLen, -+ aGREMilestone.get()); -+ if (NS_SUCCEEDED(rv)) { -+ NS_ConvertUTF16toUTF8 keyNameAscii(keyName); -+ PR_Write(fd, keyNameAscii.get(), sizeof(char)*keyNameAscii.Length()); -+ irv = PR_TRUE; -+ goto reg_end; -+ } -+ } -+ -+ irv = PR_FALSE; -+ -+reg_end: -+ if (fd) -+ PR_Close(fd); -+ -+ if (rootKey) -+ ::RegCloseKey(rootKey); -+ -+ return irv; -+} -+ -+void -+UnregisterXULRunner(PRBool aGlobal, nsIFile* aLocation, -+ const char *aGREMilestone) -+{ -+ nsCOMPtr savedInfoFile; -+ aLocation->Clone(getter_AddRefs(savedInfoFile)); -+ nsCOMPtr localSaved (do_QueryInterface(savedInfoFile)); -+ if (!localSaved) -+ return; -+ -+ const wchar_t *infoname = aGlobal ? kRegFileGlobal : kRegFileUser; -+ localSaved->Append(nsDependentString(infoname)); -+ -+ PRFileDesc* fd = nsnull; -+ nsresult rv = localSaved->OpenNSPRFileDesc(PR_RDONLY, 0, &fd); -+ if (NS_FAILED(rv)) { -+ // XXX report error? -+ return; -+ } -+ -+ wchar_t keyName[MAXPATHLEN]; -+ PRInt32 r = PR_Read(fd, keyName, MAXPATHLEN); -+ PR_Close(fd); -+ -+ localSaved->Remove(PR_FALSE); -+ -+ if (r <= 0) -+ return; -+ -+ keyName[r] = '\0'; -+ -+ HKEY rootKey = NULL; -+ if (::RegOpenKeyExW(aGlobal ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, -+ kRegKeyRoot, 0, KEY_READ, &rootKey) != ERROR_SUCCESS) -+ return; -+ -+ HKEY subKey = NULL; -+ if (::RegOpenKeyExW(rootKey, keyName, 0, KEY_READ, &subKey) == ERROR_SUCCESS) { -+ -+ char regpath[MAXPATHLEN]; -+ DWORD reglen = MAXPATHLEN; -+ -+ if (::RegQueryValueExW(subKey, L"GreHome", NULL, NULL, -+ (BYTE*) regpath, ®len) == ERROR_SUCCESS) { -+ -+ nsCOMPtr regpathfile; -+ rv = NS_NewNativeLocalFile(nsDependentCString(regpath), PR_FALSE, -+ getter_AddRefs(regpathfile)); -+ -+ PRBool eq; -+ if (NS_SUCCEEDED(rv) && -+ NS_SUCCEEDED(aLocation->Equals(regpathfile, &eq)) && !eq) { -+ // We think we registered for this key, but it doesn't point to -+ // us any more! -+ fprintf(stderr, "Warning: Registry key Software\\mozilla.org\\GRE\\%s points to\n" -+ "alternate path '%s'; unregistration was not successful.\n", -+ keyName, regpath); -+ -+ ::RegCloseKey(subKey); -+ ::RegCloseKey(rootKey); -+ -+ return; -+ } -+ } -+ -+ ::RegCloseKey(subKey); -+ } -+ -+ ::RegDeleteKeyW(rootKey, keyName); -+ ::RegCloseKey(rootKey); -+} -diff -up xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp ---- xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp.xulstub 2011-08-11 23:41:33.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/app/nsXULRunnerApp.cpp 2011-08-16 10:24:27.019659601 +0200 -@@ -43,6 +43,7 @@ - - #include "nsXULAppAPI.h" - #include "nsXPCOMGlue.h" -+#include "nsRegisterGRE.h" - #include "nsAppRunner.h" - #include "nsILocalFile.h" - #include "nsIXULAppInstall.h" -@@ -252,6 +253,16 @@ InstallXULApp(nsIFile* aXULRunnerDir, - return 0; - } - -+static const GREProperty kGREProperties[] = { -+ { "xulrunner", "true" } -+#ifdef TARGET_XPCOM_ABI -+ , { "abi", TARGET_XPCOM_ABI } -+#endif -+#ifdef MOZ_JAVAXPCOM -+ , { "javaxpcom", "1" } -+#endif -+}; -+ - class AutoAppData - { - public: -@@ -298,6 +309,67 @@ int main(int argc, char* argv[]) - if (NS_FAILED(rv)) - return 2; - -+ PRBool registerGlobal = IsArg(argv[1], "register-global"); -+ PRBool registerUser = IsArg(argv[1], "register-user"); -+ if (registerGlobal || registerUser) { -+ if (argc != 2) { -+ Usage(argv[0]); -+ return 1; -+ } -+ -+ nsCOMPtr regDir; -+ rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); -+ if (NS_FAILED(rv)) -+ return 2; -+ -+ return RegisterXULRunner(registerGlobal, regDir, -+ kGREProperties, -+ NS_ARRAY_LENGTH(kGREProperties), -+ milestone.get()) ? 0 : 2; -+ } -+ -+ registerGlobal = IsArg(argv[1], "unregister-global"); -+ registerUser = IsArg(argv[1], "unregister-user"); -+ if (registerGlobal || registerUser) { -+ if (argc != 2) { -+ Usage(argv[0]); -+ return 1; -+ } -+ -+ nsCOMPtr regDir; -+ rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir)); -+ if (NS_FAILED(rv)) -+ return 2; -+ -+ UnregisterXULRunner(registerGlobal, regDir, milestone.get()); -+ return 0; -+ } -+ -+ if (IsArg(argv[1], "find-gre")) { -+ if (argc != 3) { -+ Usage(argv[0]); -+ return 1; -+ } -+ -+ char path[MAXPATHLEN]; -+ static const GREVersionRange vr = { -+ argv[2], PR_TRUE, -+ argv[2], PR_TRUE -+ }; -+ static const GREProperty kProperties[] = { -+ { "xulrunner", "true" } -+ }; -+ -+ rv = GRE_GetGREPathWithProperties(&vr, 1, kProperties, -+ NS_ARRAY_LENGTH(kProperties), -+ path, sizeof(path)); -+ if (NS_FAILED(rv)) -+ return 1; -+ -+ printf("%s\n", path); -+ return 0; -+ } -+ - if (IsArg(argv[1], "gre-version")) { - if (argc != 2) { - Usage(argv[0]); -diff -up xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp ---- xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp.xulstub 2011-08-11 23:41:33.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/xulrunner/stub/nsXULStub.cpp 2011-08-16 11:10:02.509742103 +0200 -@@ -409,9 +409,55 @@ main(int argc, char **argv) - } - #endif - if (!greFound) { -- Output(PR_FALSE, "Could not find the Mozilla runtime.\n"); -- return 1; -- } -+ char minVersion[VERSION_MAXLEN]; -+ -+ // If a gecko maxVersion is not specified, we assume that the app uses only -+ // frozen APIs, and is therefore compatible with any xulrunner 1.x. -+ char maxVersion[VERSION_MAXLEN] = "1.*"; -+ -+ GREVersionRange range = { -+ minVersion, -+ PR_TRUE, -+ maxVersion, -+ PR_TRUE -+ }; -+ -+ rv = parser.GetString("Gecko", "MinVersion", minVersion, sizeof(minVersion)); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, -+ "The application.ini does not specify a [Gecko] MinVersion\n"); -+ return 1; -+ } -+ -+ rv = parser.GetString("Gecko", "MaxVersion", maxVersion, sizeof(maxVersion)); -+ if (NS_SUCCEEDED(rv)) -+ range.upperInclusive = PR_TRUE; -+ -+ static const GREProperty kProperties[] = { -+ { "xulrunner", "true" } -+ }; -+ -+ rv = GRE_GetGREPathWithProperties(&range, 1, -+ kProperties, NS_ARRAY_LENGTH(kProperties), -+ greDir, sizeof(greDir)); -+ if (NS_FAILED(rv)) { -+ // XXXbsmedberg: Do something much smarter here: notify the -+ // user/offer to download/? -+ -+ Output(PR_FALSE, -+ "Could not find compatible GRE between version %s and %s.\n", -+ range.lower, range.upper); -+ return 1; -+ } -+#ifdef XP_UNIX -+ // Using a symlinked greDir will fail during startup. Not sure why, but if -+ // we resolve the symlink, everything works as expected. -+ char resolved_greDir[MAXPATHLEN] = ""; -+ if (realpath(greDir, resolved_greDir) && *resolved_greDir) { -+ strncpy(greDir, resolved_greDir, MAXPATHLEN); -+ } -+#endif -+ } - } - - #ifdef XP_OS2 diff --git a/xulrunner.spec b/xulrunner.spec index cc26f25..1207eaf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,7 +74,6 @@ Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch9: mozilla-build-sbrk.patch Patch14: xulrunner-2.0-chromium-types.patch -#Patch15: firefox-6.0-xulstub.patch %if 0%{?fedora} <= 15 Patch16: add-gtkmozembed.patch %endif @@ -204,7 +203,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch1 -p2 -b .build %patch9 -p2 -b .sbrk %patch14 -p1 -b .chromium-types -#%patch15 -p2 -b .xulstub %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed %endif From 2c0bcefedd4d2ff9992cff839f30af7af5784732 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 16 Aug 2011 23:47:35 +0200 Subject: [PATCH 196/486] Updated gtkmozembed patch --- add-gtkmozembed.patch | 246 +++++++++++++++++++++--------------------- xulrunner.spec | 5 +- 2 files changed, 127 insertions(+), 124 deletions(-) diff --git a/add-gtkmozembed.patch b/add-gtkmozembed.patch index 027ff6f..f27f498 100644 --- a/add-gtkmozembed.patch +++ b/add-gtkmozembed.patch @@ -1,6 +1,6 @@ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-06-22 12:14:58.776816358 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in 2011-06-22 12:14:58.776816358 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-08-16 23:07:13.197298375 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in 2011-08-16 23:07:13.197298375 +0200 @@ -0,0 +1,54 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -56,9 +56,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmoze +endif + +include $(topsrcdir)/config/rules.mk -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-06-22 12:14:58.777816363 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-06-22 12:14:58.777816363 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-08-16 23:07:13.198298357 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-08-16 23:07:13.198298357 +0200 @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -313,9 +313,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificat + return NS_OK; +} + -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-06-22 12:14:58.778816368 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h 2011-06-22 12:14:58.778816368 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-08-16 23:07:13.199298339 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h 2011-08-16 23:07:13.199298339 +0200 @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -401,9 +401,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificat + nsCOMPtr mPIPStringBundle; +}; +#endif /* __EmbedCertificates_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-06-22 12:14:58.780816378 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-06-22 12:14:58.780816378 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-08-16 23:07:13.200298320 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-08-16 23:07:13.200298320 +0200 @@ -0,0 +1,156 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -561,9 +561,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentLis + return NS_ERROR_NOT_IMPLEMENTED; +} + -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-06-22 12:14:58.781816383 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h 2011-06-22 12:14:58.781816383 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-08-16 23:07:13.202298284 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h 2011-08-16 23:07:13.202298284 +0200 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -631,9 +631,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContentLis +}; + +#endif /* __EmbedContentListener_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-06-22 12:14:58.783816393 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-06-22 12:14:58.783816393 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-08-16 23:07:13.203298265 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-08-16 23:07:13.203298265 +0200 @@ -0,0 +1,618 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1253,9 +1253,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMen + mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; + return NS_OK; +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-06-22 12:14:58.784816398 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-06-22 12:14:58.784816398 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-08-16 23:07:13.204298246 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-08-16 23:07:13.204298246 +0200 @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1358,9 +1358,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMen + nsString mCtxDocTitle; +}; // class EmbedContextMenuInfo +#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-06-22 12:14:58.787816413 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-06-22 12:14:58.787816413 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-08-16 23:07:13.205298228 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-08-16 23:07:13.206298211 +0200 @@ -0,0 +1,304 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1666,9 +1666,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListe + } + return NS_OK; +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-06-22 12:14:58.788816418 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h 2011-06-22 12:14:58.789816423 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-08-16 23:07:13.206298211 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h 2011-08-16 23:07:13.206298211 +0200 @@ -0,0 +1,90 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1760,9 +1760,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListe +}; + +#endif /* __EmbedEventListener_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-06-22 12:14:58.790816428 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-06-22 12:14:58.790816428 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-08-16 23:07:13.207298194 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-08-16 23:07:13.207298194 +0200 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ @@ -1852,9 +1852,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.c + NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); + return docShell->GetContentViewer(aViewer); +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-06-22 12:14:58.791816433 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h 2011-06-22 12:14:58.791816433 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-08-16 23:07:13.208298176 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h 2011-08-16 23:07:13.208298176 +0200 @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -1923,9 +1923,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h +GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); + +#endif /* __EmbedTools_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-06-22 12:14:58.793816443 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-06-22 12:14:58.793816443 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-08-16 23:07:13.210298139 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-08-16 23:07:13.210298139 +0200 @@ -0,0 +1,983 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -2910,9 +2910,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cp + gtk_widget_destroy(sOffscreenWindow); + sOffscreenWindow = 0; +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-06-22 12:14:58.795816453 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h 2011-06-22 12:14:58.795816453 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-08-16 23:07:13.211298121 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h 2011-08-16 23:07:13.211298121 +0200 @@ -0,0 +1,188 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3102,9 +3102,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h. +}; + +#endif /* __EmbedPrivate_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-06-22 12:14:58.796816458 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp 2011-06-22 12:14:58.796816458 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-08-16 23:07:13.212298103 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp 2011-08-16 23:07:13.212298103 +0200 @@ -0,0 +1,215 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3321,9 +3321,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.c + + uri->GetSpec(aString); +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-06-22 12:14:58.798816468 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h 2011-06-22 12:14:58.798816468 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-08-16 23:07:13.214298067 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h 2011-08-16 23:07:13.214298067 +0200 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3391,9 +3391,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h +}; + +#endif /* __EmbedProgress_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-06-22 12:14:58.800816478 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-06-22 12:14:58.800816478 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-08-16 23:07:13.216298029 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-08-16 23:07:13.216298029 +0200 @@ -0,0 +1,411 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3806,9 +3806,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.c + } + } +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-06-22 12:14:58.801816483 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h 2011-06-22 12:14:58.801816483 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-08-16 23:07:13.217298011 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h 2011-08-16 23:07:13.217298011 +0200 @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3923,9 +3923,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h + GtkWidget *mComboBox; + GtkWidget *mCheckBox; +}; -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-06-22 12:14:58.803816493 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp 2011-06-22 12:14:58.803816493 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-08-16 23:07:13.218297994 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp 2011-08-16 23:07:13.218297994 +0200 @@ -0,0 +1,474 @@ +/* + * vim:ts=2:et:sw=2 @@ -4401,9 +4401,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp + + return rv; +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-06-22 12:14:58.806816508 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-06-22 12:14:58.806816508 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-08-16 23:07:13.219297976 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-08-16 23:07:13.219297976 +0200 @@ -0,0 +1,106 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4511,9 +4511,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCrea + + return NS_ERROR_FAILURE; +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-06-22 12:14:58.807816513 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-06-22 12:14:58.807816513 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-08-16 23:07:13.220297958 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-08-16 23:07:13.220297958 +0200 @@ -0,0 +1,54 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4569,9 +4569,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCrea +}; + +#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-06-22 12:14:58.805816503 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h 2011-06-22 12:14:58.805816503 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-08-16 23:07:13.221297940 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h 2011-08-16 23:07:13.221297940 +0200 @@ -0,0 +1,101 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4674,9 +4674,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.g + + +#endif /* __EmbedWindow_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-06-22 12:14:58.816816558 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-06-22 12:14:58.816816558 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-08-16 23:07:13.223297904 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-08-16 23:07:13.224297886 +0200 @@ -0,0 +1,1132 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5810,9 +5810,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cp + aNewEmbed, aChromeFlags); + +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-06-22 12:14:58.818816568 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-06-22 12:14:58.818816568 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-08-16 23:07:13.225297868 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-08-16 23:07:13.225297868 +0200 @@ -0,0 +1,116 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5930,9 +5930,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glu + return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); +} + -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-06-22 12:14:58.813816543 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h 2011-06-22 12:14:58.814816548 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-08-16 23:07:13.226297850 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h 2011-08-16 23:07:13.226297850 +0200 @@ -0,0 +1,287 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6221,9 +6221,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.g +#endif /* __cplusplus */ + +#endif /* gtkmozembed_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-06-22 12:14:58.820816578 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-06-22 12:14:58.821816583 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-08-16 23:07:13.227297831 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-08-16 23:07:13.227297831 +0200 @@ -0,0 +1,70 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6295,9 +6295,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_int + +#endif /* gtkmozembed_internal_h */ + -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-06-22 12:14:58.821816583 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-06-22 12:14:58.822816588 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-08-16 23:07:13.228297813 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-08-16 23:07:13.228297813 +0200 @@ -0,0 +1,34 @@ +BOOL:STRING +BOOL:STRING,STRING @@ -6333,9 +6333,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmars +BOOL:POINTER +VOID:POINTER +BOOL:STRING,STRING,POINTER -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-06-22 12:14:58.823816593 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-06-22 12:14:58.823816593 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-08-16 23:07:13.229297795 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-08-16 23:07:13.229297795 +0200 @@ -0,0 +1,91 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6428,9 +6428,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedpriv +#endif /* __cplusplus */ + +#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-06-22 12:14:58.809816523 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp 2011-06-22 12:14:58.809816523 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-08-16 23:07:13.230297777 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp 2011-08-16 23:07:13.230297777 +0200 @@ -0,0 +1,349 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6781,9 +6781,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptServic + NS_WARNING("Unexpected button flags"); + } +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-06-22 12:14:58.811816533 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h 2011-06-22 12:14:58.811816533 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-08-16 23:07:13.231297759 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h 2011-08-16 23:07:13.231297759 +0200 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6844,9 +6844,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/GtkPromptServic + void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, + const PRUnichar* aStringValue, nsAString &aLabel); +}; -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-06-22 12:14:58.812816538 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in 2011-06-22 12:14:58.812816538 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-08-16 23:07:13.232297741 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in 2011-08-16 23:07:13.232297741 +0200 @@ -0,0 +1,112 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -6960,9 +6960,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtk + +GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c + -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-06-22 12:14:58.824816598 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in 2011-06-22 12:14:58.824816598 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-08-16 23:07:13.233297723 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in 2011-08-16 23:07:13.233297723 +0200 @@ -0,0 +1,101 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -7065,9 +7065,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.g +DEFINES += -D_TIME_H=1 +endif +endif -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-06-22 12:14:58.828816618 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-06-22 12:14:58.829816623 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-08-16 23:07:13.234297704 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-08-16 23:07:13.234297704 +0200 @@ -0,0 +1,185 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -7254,9 +7254,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedC + gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); + g_free(text); +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-06-22 12:14:58.827816613 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-06-22 12:14:58.827816613 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-08-16 23:07:13.237297649 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-08-16 23:07:13.238297631 +0200 @@ -0,0 +1,1145 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8403,9 +8403,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed. + gtk_widget_set_sensitive(browser->forwardButton, FALSE); + } + -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-06-22 12:14:58.831816633 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-06-22 12:14:58.831816633 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-08-16 23:07:13.239297613 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-08-16 23:07:13.239297613 +0200 @@ -0,0 +1,142 @@ +/** simplemdi.c **/ +/* @@ -8549,9 +8549,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedM + gtk_main_quit(); + return(0); +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-06-22 12:14:58.832816638 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-06-22 12:14:58.832816638 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-08-16 23:07:13.239297613 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-08-16 23:07:13.239297613 +0200 @@ -0,0 +1,86 @@ +#include +#include @@ -8639,9 +8639,9 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedN + + return 0; +} -diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-06-22 12:14:58.833816643 +0200 -+++ xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-06-22 12:14:58.833816643 +0200 +diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp +--- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-08-16 23:07:13.240297595 +0200 ++++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-08-16 23:07:13.240297595 +0200 @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8752,10 +8752,10 @@ diff -up xulrunner-5.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedS + fprintf(stderr, "Can't fork.\n"); + } +} -diff -up xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in ---- xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed 2011-06-15 23:58:10.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in 2011-06-22 12:19:35.677237033 +0200 -@@ -77,6 +77,8 @@ CPPSRCS += dlldeps-xul.cpp +diff -up xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in +--- xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed 2011-08-11 23:41:30.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in 2011-08-16 23:07:13.241297577 +0200 +@@ -75,6 +75,8 @@ CPPSRCS += dlldeps-xul.cpp endif ifneq (,$(MOZ_ENABLE_GTK2)) @@ -8764,10 +8764,10 @@ diff -up xulrunner-5.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed x DEFINES += -DMOZ_ENABLE_GTK2 endif -diff -up xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh ---- xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-06-15 23:58:10.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh 2011-06-22 12:14:58.837816663 +0200 -@@ -554,6 +554,9 @@ MAKEFILES_embedding=" +diff -up xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh +--- xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-08-11 23:41:31.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh 2011-08-16 23:07:13.243297541 +0200 +@@ -552,6 +552,9 @@ MAKEFILES_embedding=" embedding/browser/activex/src/plugin/Makefile embedding/browser/build/Makefile embedding/browser/webBrowser/Makefile @@ -8777,10 +8777,10 @@ diff -up xulrunner-5.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed embedding/components/Makefile embedding/components/appstartup/Makefile embedding/components/appstartup/src/Makefile -diff -up xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk ---- xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed 2011-06-15 23:57:56.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk 2011-06-22 12:18:01.539746305 +0200 -@@ -234,6 +234,12 @@ endif +diff -up xulrunner-6.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-6.0/mozilla-release/toolkit/toolkit-tiers.mk +--- xulrunner-6.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed 2011-08-11 23:41:31.000000000 +0200 ++++ xulrunner-6.0/mozilla-release/toolkit/toolkit-tiers.mk 2011-08-16 23:22:29.002407174 +0200 +@@ -226,6 +226,12 @@ endif tier_platform_dirs += services/crypto/component @@ -8790,10 +8790,10 @@ diff -up xulrunner-5.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed xulr +endif +endif + - ifdef MOZ_ENABLE_LIBXUL tier_platform_dirs += startupcache - endif -@@ -286,4 +292,3 @@ tier_platform_dirs += testing/xpcshell + + ifdef APP_LIBXUL_STATICDIRS +@@ -272,4 +278,3 @@ tier_platform_dirs += testing/xpcshell tier_platform_dirs += testing/mozmill tier_platform_dirs += testing/tools/screenshot endif diff --git a/xulrunner.spec b/xulrunner.spec index 1207eaf..a32ac95 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -58,7 +58,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 6.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -470,6 +470,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Aug 16 2011 Martin Stransky 6.0-2 +- Updated gtkmozembed patch + * Tue Aug 16 2011 Martin Stransky 6.0-1 - 6.0 From 48dc385d9109cab4ad159c1acdaff1af9be021d7 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 31 Aug 2011 09:53:47 +0200 Subject: [PATCH 197/486] Distrust a specific Certificate Authority --- xulrunner-diginotar.patch | 324 ++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 7 +- 2 files changed, 330 insertions(+), 1 deletion(-) create mode 100644 xulrunner-diginotar.patch diff --git a/xulrunner-diginotar.patch b/xulrunner-diginotar.patch new file mode 100644 index 0000000..bf2a4d4 --- /dev/null +++ b/xulrunner-diginotar.patch @@ -0,0 +1,324 @@ + +# HG changeset patch +# User Kai Engert +# Date 1314714745 14400 +# Node ID d172106979730bdd967073f2c1e6188e708ca911 +# Parent 078215b4d425df355ae87f0ec47d66261ad58c5a +Bug 682927 - Dis-trust DigiNotar root certificate, all parts together; r=bsmith + +diff --git a/security/manager/ssl/src/nsIdentityChecking.cpp b/security/manager/ssl/src/nsIdentityChecking.cpp +--- a/security/manager/ssl/src/nsIdentityChecking.cpp ++++ b/security/manager/ssl/src/nsIdentityChecking.cpp +@@ -118,28 +118,16 @@ static struct nsMyTrustedEVInfo myTruste + SEC_OID_UNKNOWN, + "5F:43:E5:B1:BF:F8:78:8C:AC:1C:C7:CA:4A:9A:C6:22:2B:CC:34:C6", + "MDsxGDAWBgNVBAoTD0N5YmVydHJ1c3QsIEluYzEfMB0GA1UEAxMWQ3liZXJ0cnVz" + "dCBHbG9iYWwgUm9vdA==", + "BAAAAAABD4WqLUg=", + nsnull + }, + { +- // E=info@diginotar.nl,CN=DigiNotar Root CA,O=DigiNotar,C=NL +- "2.16.528.1.1001.1.1.1.12.6.1.1.1", +- "DigiNotar EV OID", +- SEC_OID_UNKNOWN, +- "C0:60:ED:44:CB:D8:81:BD:0E:F8:6C:0B:A2:87:DD:CF:81:67:47:8C", +- "MF8xCzAJBgNVBAYTAk5MMRIwEAYDVQQKEwlEaWdpTm90YXIxGjAYBgNVBAMTEURp" +- "Z2lOb3RhciBSb290IENBMSAwHgYJKoZIhvcNAQkBFhFpbmZvQGRpZ2lub3Rhci5u" +- "bA==", +- "DHbanJEMTiye/hXQWJM8TA==", +- nsnull +- }, +- { + // CN=SwissSign Gold CA - G2,O=SwissSign AG,C=CH + "2.16.756.1.89.1.2.1.1", + "SwissSign EV OID", + SEC_OID_UNKNOWN, + "D8:C5:38:8A:B7:30:1B:1B:6E:D4:7A:E6:45:25:3A:6F:9F:1A:27:61", + "MEUxCzAJBgNVBAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMT" + "FlN3aXNzU2lnbiBHb2xkIENBIC0gRzI=", + "ALtAHEP1Xk+w", + +diff --git a/security/manager/ssl/src/nsNSSCallbacks.cpp b/security/manager/ssl/src/nsNSSCallbacks.cpp +--- a/security/manager/ssl/src/nsNSSCallbacks.cpp ++++ b/security/manager/ssl/src/nsNSSCallbacks.cpp +@@ -1029,16 +1029,63 @@ static struct nsSerialBinaryBlacklistEnt + { 16, "\x3e\x75\xce\xd4\x6b\x69\x30\x21\x21\x88\x30\xae\x86\xa8\x2a\x71" }, + { 17, "\x00\xe9\x02\x8b\x95\x78\xe4\x15\xdc\x1a\x71\x0a\x2b\x88\x15\x44\x47" }, + { 17, "\x00\xd7\x55\x8f\xda\xf5\xf1\x10\x5b\xb2\x13\x28\x2b\x70\x77\x29\xa3" }, + { 16, "\x04\x7e\xcb\xe9\xfc\xa5\x5f\x7b\xd0\x9e\xae\x36\xe1\x0c\xae\x1e" }, + { 17, "\x00\xf5\xc8\x6a\xf3\x61\x62\xf1\x3a\x64\xf5\x4f\x6d\xc9\x58\x7c\x06" }, + { 0, 0 } // end marker + }; + ++// Bug 682927: Do not trust any DigiNotar-issued certificates. ++// We do this check after normal certificate validation because we do not ++// want to override a "revoked" OCSP response. ++PRErrorCode ++PSM_SSL_BlacklistDigiNotar(CERTCertificate * serverCert, ++ CERTCertList * serverCertChain) ++{ ++ PRBool isDigiNotarIssuedCert = PR_FALSE; ++ ++ for (CERTCertListNode *node = CERT_LIST_HEAD(serverCertChain); ++ !CERT_LIST_END(node, serverCertChain); ++ node = CERT_LIST_NEXT(node)) { ++ if (!node->cert->issuerName) ++ continue; ++ ++ if (strstr(node->cert->issuerName, "CN=DigiNotar")) { ++ isDigiNotarIssuedCert = PR_TRUE; ++ // Do not let the user override the error if the cert was ++ // chained from the "DigiNotar Root CA" cert and the cert was issued ++ // within the time window in which we think the mis-issuance(s) occurred. ++ if (strstr(node->cert->issuerName, "CN=DigiNotar Root CA")) { ++ PRTime cutoff = 0, notBefore = 0, notAfter = 0; ++ PRStatus status = PR_ParseTimeString("01-JUL-2011 00:00", PR_TRUE, &cutoff); ++ NS_ASSERTION(status == PR_SUCCESS, "PR_ParseTimeString failed"); ++ if (status != PR_SUCCESS || ++ CERT_GetCertTimes(serverCert, ¬Before, ¬After) != SECSuccess || ++ notBefore >= cutoff) { ++ return SEC_ERROR_REVOKED_CERTIFICATE; ++ } ++ } ++ } ++ ++ // By request of the Dutch government ++ if (!strcmp(node->cert->issuerName, ++ "CN=Staat der Nederlanden Root CA,O=Staat der Nederlanden,C=NL") && ++ CERT_LIST_END(CERT_LIST_NEXT(node), serverCertChain)) { ++ return 0; ++ } ++ } ++ ++ if (isDigiNotarIssuedCert) ++ return SEC_ERROR_UNTRUSTED_ISSUER; // user can override this ++ else ++ return 0; // No DigiNotor cert => carry on as normal ++} ++ ++ + SECStatus PR_CALLBACK AuthCertificateCallback(void* client_data, PRFileDesc* fd, + PRBool checksig, PRBool isServer) { + nsNSSShutDownPreventionLock locker; + + CERTCertificate *serverCert = SSL_PeerCertificate(fd); + CERTCertificateCleaner serverCertCleaner(serverCert); + + if (serverCert && +@@ -1074,40 +1121,54 @@ SECStatus PR_CALLBACK AuthCertificateCal + + if (server_cert_comparison_len == locked_cert_comparison_len && + !memcmp(server_cert_comparison_start, locked_cert_comparison_start, locked_cert_comparison_len)) { + PR_SetError(SEC_ERROR_REVOKED_CERTIFICATE, 0); + return SECFailure; + } + } + } +- ++ + SECStatus rv = PSM_SSL_PKIX_AuthCertificate(fd, serverCert, checksig, isServer); + + // We want to remember the CA certs in the temp db, so that the application can find the + // complete chain at any time it might need it. + // But we keep only those CA certs in the temp db, that we didn't already know. + + if (serverCert) { + nsNSSSocketInfo* infoObject = (nsNSSSocketInfo*) fd->higher->secret; + nsRefPtr status = infoObject->SSLStatus(); + nsRefPtr nsc; + + if (!status || !status->mServerCert) { + nsc = nsNSSCertificate::Create(serverCert); + } + +- if (SECSuccess == rv) { ++ CERTCertList *certList = nsnull; ++ if (rv == SECSuccess) { ++ certList = CERT_GetCertChainFromCert(serverCert, PR_Now(), certUsageSSLCA); ++ if (!certList) { ++ rv = SECFailure; ++ } else { ++ PRErrorCode blacklistErrorCode = PSM_SSL_BlacklistDigiNotar(serverCert, ++ certList); ++ if (blacklistErrorCode != 0) { ++ infoObject->SetCertIssuerBlacklisted(); ++ PORT_SetError(blacklistErrorCode); ++ rv = SECFailure; ++ } ++ } ++ } ++ ++ if (rv == SECSuccess) { + if (nsc) { + PRBool dummyIsEV; + nsc->GetIsExtendedValidation(&dummyIsEV); // the nsc object will cache the status + } + +- CERTCertList *certList = CERT_GetCertChainFromCert(serverCert, PR_Now(), certUsageSSLCA); +- + nsCOMPtr nssComponent; + + for (CERTCertListNode *node = CERT_LIST_HEAD(certList); + !CERT_LIST_END(node, certList); + node = CERT_LIST_NEXT(node)) { + + if (node->cert->slot) { + // This cert was found on a token, no need to remember it in the temp db. +@@ -1133,16 +1194,19 @@ SECStatus PR_CALLBACK AuthCertificateCal + PK11_ImportCert(slot, node->cert, CK_INVALID_HANDLE, + nickname, PR_FALSE); + PK11_FreeSlot(slot); + } + } + PR_FREEIF(nickname); + } + ++ } ++ ++ if (certList) { + CERT_DestroyCertList(certList); + } + + // The connection may get terminated, for example, if the server requires + // a client cert. Let's provide a minimal SSLStatus + // to the caller that contains at least the cert and its status. + if (!status) { + status = new nsSSLStatus(); +diff --git a/security/manager/ssl/src/nsNSSCallbacks.h b/security/manager/ssl/src/nsNSSCallbacks.h +--- a/security/manager/ssl/src/nsNSSCallbacks.h ++++ b/security/manager/ssl/src/nsNSSCallbacks.h +@@ -50,16 +50,19 @@ + + char* PR_CALLBACK + PK11PasswordPrompt(PK11SlotInfo *slot, PRBool retry, void* arg); + + void PR_CALLBACK HandshakeCallback(PRFileDesc *fd, void *client_data); + SECStatus PR_CALLBACK AuthCertificateCallback(void* client_data, PRFileDesc* fd, + PRBool checksig, PRBool isServer); + ++PRErrorCode PSM_SSL_BlacklistDigiNotar(CERTCertificate * serverCert, ++ CERTCertList * serverCertChain); ++ + SECStatus RegisterMyOCSPAIAInfoCallback(); + SECStatus UnregisterMyOCSPAIAInfoCallback(); + + class nsHTTPListener : public nsIStreamLoaderObserver + { + private: + // For XPCOM implementations that are not a base class for some other + // class, it is good practice to make the destructor non-virtual and +diff --git a/security/manager/ssl/src/nsNSSIOLayer.cpp b/security/manager/ssl/src/nsNSSIOLayer.cpp +--- a/security/manager/ssl/src/nsNSSIOLayer.cpp ++++ b/security/manager/ssl/src/nsNSSIOLayer.cpp +@@ -221,17 +221,18 @@ nsNSSSocketInfo::nsNSSSocketInfo() + mForSTARTTLS(PR_FALSE), + mHandshakePending(PR_TRUE), + mCanceled(PR_FALSE), + mHasCleartextPhase(PR_FALSE), + mHandshakeInProgress(PR_FALSE), + mAllowTLSIntoleranceTimeout(PR_TRUE), + mRememberClientAuthCertificate(PR_FALSE), + mHandshakeStartTime(0), +- mPort(0) ++ mPort(0), ++ mIsCertIssuerBlacklisted(PR_FALSE) + { + mThreadData = new nsSSLSocketThreadData; + } + + nsNSSSocketInfo::~nsNSSSocketInfo() + { + delete mThreadData; + +@@ -3437,16 +3438,20 @@ nsNSSBadCertHandler(void *arg, PRFileDes + cvout[0].value.pointer.log = verify_log; + cvout[1].type = cert_po_end; + + srv = CERT_PKIXVerifyCert(peerCert, certificateUsageSSLServer, + survivingParams->GetRawPointerForNSS(), + cvout, (void*)infoObject); + } + ++ if (infoObject->IsCertIssuerBlacklisted()) { ++ collected_errors |= nsICertOverrideService::ERROR_UNTRUSTED; ++ } ++ + // We ignore the result code of the cert verification. + // Either it is a failure, which is expected, and we'll process the + // verify log below. + // Or it is a success, then a domain mismatch is the only + // possible failure. + + CERTVerifyLogNode *i_node; + for (i_node = verify_log->head; i_node; i_node = i_node->next) +diff --git a/security/manager/ssl/src/nsNSSIOLayer.h b/security/manager/ssl/src/nsNSSIOLayer.h +--- a/security/manager/ssl/src/nsNSSIOLayer.h ++++ b/security/manager/ssl/src/nsNSSIOLayer.h +@@ -197,16 +197,22 @@ public: + + /* Set SSL Status values */ + nsresult SetSSLStatus(nsSSLStatus *aSSLStatus); + nsSSLStatus* SSLStatus() { return mSSLStatus; } + PRBool hasCertErrors(); + + PRStatus CloseSocketAndDestroy(); + ++ PRBool IsCertIssuerBlacklisted() const { ++ return mIsCertIssuerBlacklisted; ++ } ++ void SetCertIssuerBlacklisted() { ++ mIsCertIssuerBlacklisted = PR_TRUE; ++ } + protected: + nsCOMPtr mCallbacks; + PRFileDesc* mFd; + nsCOMPtr mCert; + nsCOMPtr mPreviousCert; // DocShellDependent + enum { + blocking_state_unknown, is_nonblocking_socket, is_blocking_socket + } mBlockingState; +@@ -224,16 +230,17 @@ protected: + PRPackedBool mCanceled; + PRPackedBool mHasCleartextPhase; + PRPackedBool mHandshakeInProgress; + PRPackedBool mAllowTLSIntoleranceTimeout; + PRPackedBool mRememberClientAuthCertificate; + PRIntervalTime mHandshakeStartTime; + PRInt32 mPort; + nsXPIDLCString mHostName; ++ PRErrorCode mIsCertIssuerBlacklisted; + + /* SSL Status */ + nsRefPtr mSSLStatus; + + nsresult ActivateSSL(); + + nsSSLSocketThreadData *mThreadData; + + +diff --git a/security/nss/lib/ckfw/builtins/nssckbi.h b/security/nss/lib/ckfw/builtins/nssckbi.h +--- a/security/nss/lib/ckfw/builtins/nssckbi.h ++++ b/security/nss/lib/ckfw/builtins/nssckbi.h +@@ -72,18 +72,18 @@ + * ... + * - NSS 3.29 branch: 250-255 + * + * NSS_BUILTINS_LIBRARY_VERSION_MINOR is a CK_BYTE. It's not clear + * whether we may use its full range (0-255) or only 0-99 because + * of the comment in the CK_VERSION type definition. + */ + #define NSS_BUILTINS_LIBRARY_VERSION_MAJOR 1 +-#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 83 +-#define NSS_BUILTINS_LIBRARY_VERSION "1.83" ++#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 85 ++#define NSS_BUILTINS_LIBRARY_VERSION "1.85" + + /* These version numbers detail the semantic changes to the ckfw engine. */ + #define NSS_BUILTINS_HARDWARE_VERSION_MAJOR 1 + #define NSS_BUILTINS_HARDWARE_VERSION_MINOR 0 + + /* These version numbers detail the semantic changes to ckbi itself + * (new PKCS #11 objects), etc. */ + #define NSS_BUILTINS_FIRMWARE_VERSION_MAJOR 1 + diff --git a/xulrunner.spec b/xulrunner.spec index a32ac95..a95b2a3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -58,7 +58,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 6.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -92,6 +92,7 @@ Patch24: crashreporter-remove-static.patch Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch Patch36: mozilla-639554.patch +Patch37: xulrunner-diginotar.patch # --------------------------------------------------- @@ -219,6 +220,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 %patch36 -p1 -b .639554 +%patch37 -p1 -b .diginotar %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -470,6 +472,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 31 2011 Jan Horak - 6.0-3 +- Distrust a specific Certificate Authority + * Tue Aug 16 2011 Martin Stransky 6.0-2 - Updated gtkmozembed patch From 8ce4bfee456ce7e4c7ff0f7a4d6e2da393741b48 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 6 Sep 2011 12:04:41 +0200 Subject: [PATCH 198/486] Update to 6.0.2 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6115316..fe04589 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-2.0.1.source.tar.bz2 /xulrunner-5.0.source.tar.bz2 /xulrunner-6.0.source.tar.bz2 +/xulrunner-6.0.2.source.tar.bz2 diff --git a/sources b/sources index c5104d1..263cbc1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1840185865a1a8975df4a3db59080ddc xulrunner-6.0.source.tar.bz2 +140ca0cfd57905139f8f71a527afb283 xulrunner-6.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index a95b2a3..21fc0f9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -57,8 +57,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 6.0 -Release: 3%{?pre_tag}%{?dist} +Version: 6.0.2 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -472,6 +472,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Sep 6 2011 Jan Horak - 6.0.2-1 +- Update to 6.0.2 + * Wed Aug 31 2011 Jan Horak - 6.0-3 - Distrust a specific Certificate Authority From d841c09d3c71fab9b1e86e7bd17cfb068f4316d3 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 6 Sep 2011 12:58:34 +0200 Subject: [PATCH 199/486] Removed DigiNoTar patch --- xulrunner-diginotar.patch | 324 -------------------------------------- xulrunner.spec | 2 - 2 files changed, 326 deletions(-) delete mode 100644 xulrunner-diginotar.patch diff --git a/xulrunner-diginotar.patch b/xulrunner-diginotar.patch deleted file mode 100644 index bf2a4d4..0000000 --- a/xulrunner-diginotar.patch +++ /dev/null @@ -1,324 +0,0 @@ - -# HG changeset patch -# User Kai Engert -# Date 1314714745 14400 -# Node ID d172106979730bdd967073f2c1e6188e708ca911 -# Parent 078215b4d425df355ae87f0ec47d66261ad58c5a -Bug 682927 - Dis-trust DigiNotar root certificate, all parts together; r=bsmith - -diff --git a/security/manager/ssl/src/nsIdentityChecking.cpp b/security/manager/ssl/src/nsIdentityChecking.cpp ---- a/security/manager/ssl/src/nsIdentityChecking.cpp -+++ b/security/manager/ssl/src/nsIdentityChecking.cpp -@@ -118,28 +118,16 @@ static struct nsMyTrustedEVInfo myTruste - SEC_OID_UNKNOWN, - "5F:43:E5:B1:BF:F8:78:8C:AC:1C:C7:CA:4A:9A:C6:22:2B:CC:34:C6", - "MDsxGDAWBgNVBAoTD0N5YmVydHJ1c3QsIEluYzEfMB0GA1UEAxMWQ3liZXJ0cnVz" - "dCBHbG9iYWwgUm9vdA==", - "BAAAAAABD4WqLUg=", - nsnull - }, - { -- // E=info@diginotar.nl,CN=DigiNotar Root CA,O=DigiNotar,C=NL -- "2.16.528.1.1001.1.1.1.12.6.1.1.1", -- "DigiNotar EV OID", -- SEC_OID_UNKNOWN, -- "C0:60:ED:44:CB:D8:81:BD:0E:F8:6C:0B:A2:87:DD:CF:81:67:47:8C", -- "MF8xCzAJBgNVBAYTAk5MMRIwEAYDVQQKEwlEaWdpTm90YXIxGjAYBgNVBAMTEURp" -- "Z2lOb3RhciBSb290IENBMSAwHgYJKoZIhvcNAQkBFhFpbmZvQGRpZ2lub3Rhci5u" -- "bA==", -- "DHbanJEMTiye/hXQWJM8TA==", -- nsnull -- }, -- { - // CN=SwissSign Gold CA - G2,O=SwissSign AG,C=CH - "2.16.756.1.89.1.2.1.1", - "SwissSign EV OID", - SEC_OID_UNKNOWN, - "D8:C5:38:8A:B7:30:1B:1B:6E:D4:7A:E6:45:25:3A:6F:9F:1A:27:61", - "MEUxCzAJBgNVBAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMT" - "FlN3aXNzU2lnbiBHb2xkIENBIC0gRzI=", - "ALtAHEP1Xk+w", - -diff --git a/security/manager/ssl/src/nsNSSCallbacks.cpp b/security/manager/ssl/src/nsNSSCallbacks.cpp ---- a/security/manager/ssl/src/nsNSSCallbacks.cpp -+++ b/security/manager/ssl/src/nsNSSCallbacks.cpp -@@ -1029,16 +1029,63 @@ static struct nsSerialBinaryBlacklistEnt - { 16, "\x3e\x75\xce\xd4\x6b\x69\x30\x21\x21\x88\x30\xae\x86\xa8\x2a\x71" }, - { 17, "\x00\xe9\x02\x8b\x95\x78\xe4\x15\xdc\x1a\x71\x0a\x2b\x88\x15\x44\x47" }, - { 17, "\x00\xd7\x55\x8f\xda\xf5\xf1\x10\x5b\xb2\x13\x28\x2b\x70\x77\x29\xa3" }, - { 16, "\x04\x7e\xcb\xe9\xfc\xa5\x5f\x7b\xd0\x9e\xae\x36\xe1\x0c\xae\x1e" }, - { 17, "\x00\xf5\xc8\x6a\xf3\x61\x62\xf1\x3a\x64\xf5\x4f\x6d\xc9\x58\x7c\x06" }, - { 0, 0 } // end marker - }; - -+// Bug 682927: Do not trust any DigiNotar-issued certificates. -+// We do this check after normal certificate validation because we do not -+// want to override a "revoked" OCSP response. -+PRErrorCode -+PSM_SSL_BlacklistDigiNotar(CERTCertificate * serverCert, -+ CERTCertList * serverCertChain) -+{ -+ PRBool isDigiNotarIssuedCert = PR_FALSE; -+ -+ for (CERTCertListNode *node = CERT_LIST_HEAD(serverCertChain); -+ !CERT_LIST_END(node, serverCertChain); -+ node = CERT_LIST_NEXT(node)) { -+ if (!node->cert->issuerName) -+ continue; -+ -+ if (strstr(node->cert->issuerName, "CN=DigiNotar")) { -+ isDigiNotarIssuedCert = PR_TRUE; -+ // Do not let the user override the error if the cert was -+ // chained from the "DigiNotar Root CA" cert and the cert was issued -+ // within the time window in which we think the mis-issuance(s) occurred. -+ if (strstr(node->cert->issuerName, "CN=DigiNotar Root CA")) { -+ PRTime cutoff = 0, notBefore = 0, notAfter = 0; -+ PRStatus status = PR_ParseTimeString("01-JUL-2011 00:00", PR_TRUE, &cutoff); -+ NS_ASSERTION(status == PR_SUCCESS, "PR_ParseTimeString failed"); -+ if (status != PR_SUCCESS || -+ CERT_GetCertTimes(serverCert, ¬Before, ¬After) != SECSuccess || -+ notBefore >= cutoff) { -+ return SEC_ERROR_REVOKED_CERTIFICATE; -+ } -+ } -+ } -+ -+ // By request of the Dutch government -+ if (!strcmp(node->cert->issuerName, -+ "CN=Staat der Nederlanden Root CA,O=Staat der Nederlanden,C=NL") && -+ CERT_LIST_END(CERT_LIST_NEXT(node), serverCertChain)) { -+ return 0; -+ } -+ } -+ -+ if (isDigiNotarIssuedCert) -+ return SEC_ERROR_UNTRUSTED_ISSUER; // user can override this -+ else -+ return 0; // No DigiNotor cert => carry on as normal -+} -+ -+ - SECStatus PR_CALLBACK AuthCertificateCallback(void* client_data, PRFileDesc* fd, - PRBool checksig, PRBool isServer) { - nsNSSShutDownPreventionLock locker; - - CERTCertificate *serverCert = SSL_PeerCertificate(fd); - CERTCertificateCleaner serverCertCleaner(serverCert); - - if (serverCert && -@@ -1074,40 +1121,54 @@ SECStatus PR_CALLBACK AuthCertificateCal - - if (server_cert_comparison_len == locked_cert_comparison_len && - !memcmp(server_cert_comparison_start, locked_cert_comparison_start, locked_cert_comparison_len)) { - PR_SetError(SEC_ERROR_REVOKED_CERTIFICATE, 0); - return SECFailure; - } - } - } -- -+ - SECStatus rv = PSM_SSL_PKIX_AuthCertificate(fd, serverCert, checksig, isServer); - - // We want to remember the CA certs in the temp db, so that the application can find the - // complete chain at any time it might need it. - // But we keep only those CA certs in the temp db, that we didn't already know. - - if (serverCert) { - nsNSSSocketInfo* infoObject = (nsNSSSocketInfo*) fd->higher->secret; - nsRefPtr status = infoObject->SSLStatus(); - nsRefPtr nsc; - - if (!status || !status->mServerCert) { - nsc = nsNSSCertificate::Create(serverCert); - } - -- if (SECSuccess == rv) { -+ CERTCertList *certList = nsnull; -+ if (rv == SECSuccess) { -+ certList = CERT_GetCertChainFromCert(serverCert, PR_Now(), certUsageSSLCA); -+ if (!certList) { -+ rv = SECFailure; -+ } else { -+ PRErrorCode blacklistErrorCode = PSM_SSL_BlacklistDigiNotar(serverCert, -+ certList); -+ if (blacklistErrorCode != 0) { -+ infoObject->SetCertIssuerBlacklisted(); -+ PORT_SetError(blacklistErrorCode); -+ rv = SECFailure; -+ } -+ } -+ } -+ -+ if (rv == SECSuccess) { - if (nsc) { - PRBool dummyIsEV; - nsc->GetIsExtendedValidation(&dummyIsEV); // the nsc object will cache the status - } - -- CERTCertList *certList = CERT_GetCertChainFromCert(serverCert, PR_Now(), certUsageSSLCA); -- - nsCOMPtr nssComponent; - - for (CERTCertListNode *node = CERT_LIST_HEAD(certList); - !CERT_LIST_END(node, certList); - node = CERT_LIST_NEXT(node)) { - - if (node->cert->slot) { - // This cert was found on a token, no need to remember it in the temp db. -@@ -1133,16 +1194,19 @@ SECStatus PR_CALLBACK AuthCertificateCal - PK11_ImportCert(slot, node->cert, CK_INVALID_HANDLE, - nickname, PR_FALSE); - PK11_FreeSlot(slot); - } - } - PR_FREEIF(nickname); - } - -+ } -+ -+ if (certList) { - CERT_DestroyCertList(certList); - } - - // The connection may get terminated, for example, if the server requires - // a client cert. Let's provide a minimal SSLStatus - // to the caller that contains at least the cert and its status. - if (!status) { - status = new nsSSLStatus(); -diff --git a/security/manager/ssl/src/nsNSSCallbacks.h b/security/manager/ssl/src/nsNSSCallbacks.h ---- a/security/manager/ssl/src/nsNSSCallbacks.h -+++ b/security/manager/ssl/src/nsNSSCallbacks.h -@@ -50,16 +50,19 @@ - - char* PR_CALLBACK - PK11PasswordPrompt(PK11SlotInfo *slot, PRBool retry, void* arg); - - void PR_CALLBACK HandshakeCallback(PRFileDesc *fd, void *client_data); - SECStatus PR_CALLBACK AuthCertificateCallback(void* client_data, PRFileDesc* fd, - PRBool checksig, PRBool isServer); - -+PRErrorCode PSM_SSL_BlacklistDigiNotar(CERTCertificate * serverCert, -+ CERTCertList * serverCertChain); -+ - SECStatus RegisterMyOCSPAIAInfoCallback(); - SECStatus UnregisterMyOCSPAIAInfoCallback(); - - class nsHTTPListener : public nsIStreamLoaderObserver - { - private: - // For XPCOM implementations that are not a base class for some other - // class, it is good practice to make the destructor non-virtual and -diff --git a/security/manager/ssl/src/nsNSSIOLayer.cpp b/security/manager/ssl/src/nsNSSIOLayer.cpp ---- a/security/manager/ssl/src/nsNSSIOLayer.cpp -+++ b/security/manager/ssl/src/nsNSSIOLayer.cpp -@@ -221,17 +221,18 @@ nsNSSSocketInfo::nsNSSSocketInfo() - mForSTARTTLS(PR_FALSE), - mHandshakePending(PR_TRUE), - mCanceled(PR_FALSE), - mHasCleartextPhase(PR_FALSE), - mHandshakeInProgress(PR_FALSE), - mAllowTLSIntoleranceTimeout(PR_TRUE), - mRememberClientAuthCertificate(PR_FALSE), - mHandshakeStartTime(0), -- mPort(0) -+ mPort(0), -+ mIsCertIssuerBlacklisted(PR_FALSE) - { - mThreadData = new nsSSLSocketThreadData; - } - - nsNSSSocketInfo::~nsNSSSocketInfo() - { - delete mThreadData; - -@@ -3437,16 +3438,20 @@ nsNSSBadCertHandler(void *arg, PRFileDes - cvout[0].value.pointer.log = verify_log; - cvout[1].type = cert_po_end; - - srv = CERT_PKIXVerifyCert(peerCert, certificateUsageSSLServer, - survivingParams->GetRawPointerForNSS(), - cvout, (void*)infoObject); - } - -+ if (infoObject->IsCertIssuerBlacklisted()) { -+ collected_errors |= nsICertOverrideService::ERROR_UNTRUSTED; -+ } -+ - // We ignore the result code of the cert verification. - // Either it is a failure, which is expected, and we'll process the - // verify log below. - // Or it is a success, then a domain mismatch is the only - // possible failure. - - CERTVerifyLogNode *i_node; - for (i_node = verify_log->head; i_node; i_node = i_node->next) -diff --git a/security/manager/ssl/src/nsNSSIOLayer.h b/security/manager/ssl/src/nsNSSIOLayer.h ---- a/security/manager/ssl/src/nsNSSIOLayer.h -+++ b/security/manager/ssl/src/nsNSSIOLayer.h -@@ -197,16 +197,22 @@ public: - - /* Set SSL Status values */ - nsresult SetSSLStatus(nsSSLStatus *aSSLStatus); - nsSSLStatus* SSLStatus() { return mSSLStatus; } - PRBool hasCertErrors(); - - PRStatus CloseSocketAndDestroy(); - -+ PRBool IsCertIssuerBlacklisted() const { -+ return mIsCertIssuerBlacklisted; -+ } -+ void SetCertIssuerBlacklisted() { -+ mIsCertIssuerBlacklisted = PR_TRUE; -+ } - protected: - nsCOMPtr mCallbacks; - PRFileDesc* mFd; - nsCOMPtr mCert; - nsCOMPtr mPreviousCert; // DocShellDependent - enum { - blocking_state_unknown, is_nonblocking_socket, is_blocking_socket - } mBlockingState; -@@ -224,16 +230,17 @@ protected: - PRPackedBool mCanceled; - PRPackedBool mHasCleartextPhase; - PRPackedBool mHandshakeInProgress; - PRPackedBool mAllowTLSIntoleranceTimeout; - PRPackedBool mRememberClientAuthCertificate; - PRIntervalTime mHandshakeStartTime; - PRInt32 mPort; - nsXPIDLCString mHostName; -+ PRErrorCode mIsCertIssuerBlacklisted; - - /* SSL Status */ - nsRefPtr mSSLStatus; - - nsresult ActivateSSL(); - - nsSSLSocketThreadData *mThreadData; - - -diff --git a/security/nss/lib/ckfw/builtins/nssckbi.h b/security/nss/lib/ckfw/builtins/nssckbi.h ---- a/security/nss/lib/ckfw/builtins/nssckbi.h -+++ b/security/nss/lib/ckfw/builtins/nssckbi.h -@@ -72,18 +72,18 @@ - * ... - * - NSS 3.29 branch: 250-255 - * - * NSS_BUILTINS_LIBRARY_VERSION_MINOR is a CK_BYTE. It's not clear - * whether we may use its full range (0-255) or only 0-99 because - * of the comment in the CK_VERSION type definition. - */ - #define NSS_BUILTINS_LIBRARY_VERSION_MAJOR 1 --#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 83 --#define NSS_BUILTINS_LIBRARY_VERSION "1.83" -+#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 85 -+#define NSS_BUILTINS_LIBRARY_VERSION "1.85" - - /* These version numbers detail the semantic changes to the ckfw engine. */ - #define NSS_BUILTINS_HARDWARE_VERSION_MAJOR 1 - #define NSS_BUILTINS_HARDWARE_VERSION_MINOR 0 - - /* These version numbers detail the semantic changes to ckbi itself - * (new PKCS #11 objects), etc. */ - #define NSS_BUILTINS_FIRMWARE_VERSION_MAJOR 1 - diff --git a/xulrunner.spec b/xulrunner.spec index 21fc0f9..dc9506a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -92,7 +92,6 @@ Patch24: crashreporter-remove-static.patch Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch Patch36: mozilla-639554.patch -Patch37: xulrunner-diginotar.patch # --------------------------------------------------- @@ -220,7 +219,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 %patch36 -p1 -b .639554 -%patch37 -p1 -b .diginotar %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 5be7aa1e3e2de74f824e616b24613514c400939a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 27 Sep 2011 11:21:00 +0200 Subject: [PATCH 200/486] Update to 7.0 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 11 ++++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index fe04589..7a4f626 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-5.0.source.tar.bz2 /xulrunner-6.0.source.tar.bz2 /xulrunner-6.0.2.source.tar.bz2 +/xulrunner-7.0.source.tar.bz2 diff --git a/sources b/sources index 263cbc1..2fcc07a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -140ca0cfd57905139f8f71a527afb283 xulrunner-6.0.2.source.tar.bz2 +673a015a23e3fefa18d80db68c8b9fc1 xulrunner-7.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index dc9506a..e31a3ee 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,6 +1,6 @@ # Minimal required versions -%global nspr_version 4.8.7 -%global nss_version 3.12.9 +%global nspr_version 4.8.8 +%global nss_version 3.12.10 %global cairo_version 1.6.0 %global freetype_version 2.1.9 %global sqlite_version 3.7.4 @@ -57,7 +57,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 6.0.2 +Version: 7.0 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -91,7 +91,6 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch -Patch36: mozilla-639554.patch # --------------------------------------------------- @@ -218,7 +217,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 -%patch36 -p1 -b .639554 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -470,6 +468,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Sep 27 2011 Jan Horak - 7.0-1 +- Update to 7.0 + * Tue Sep 6 2011 Jan Horak - 6.0.2-1 - Update to 6.0.2 From 9265c14f36f4b6f7ec90e3e976e0976ff37ab86d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 27 Sep 2011 17:13:03 +0200 Subject: [PATCH 201/486] Fixed patch and removed unpacked files --- add-gtkmozembed.patch | 240 +++++++++++++++++++++--------------------- xulrunner.spec | 2 - 2 files changed, 120 insertions(+), 122 deletions(-) diff --git a/add-gtkmozembed.patch b/add-gtkmozembed.patch index f27f498..388cc4f 100644 --- a/add-gtkmozembed.patch +++ b/add-gtkmozembed.patch @@ -1,6 +1,6 @@ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-08-16 23:07:13.197298375 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in 2011-08-16 23:07:13.197298375 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-09-02 14:32:09.591292225 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2011-09-02 14:32:09.591292225 +0200 @@ -0,0 +1,54 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -56,9 +56,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/Makefile.in.gtkmoze +endif + +include $(topsrcdir)/config/rules.mk -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-08-16 23:07:13.198298357 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-08-16 23:07:13.198298357 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-09-02 14:32:09.591292225 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-09-02 14:32:09.591292225 +0200 @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -313,9 +313,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificat + return NS_OK; +} + -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-08-16 23:07:13.199298339 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificates.h 2011-08-16 23:07:13.199298339 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-09-02 14:32:09.591292225 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2011-09-02 14:32:09.591292225 +0200 @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -401,9 +401,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedCertificat + nsCOMPtr mPIPStringBundle; +}; +#endif /* __EmbedCertificates_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-08-16 23:07:13.200298320 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-08-16 23:07:13.200298320 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-09-02 14:32:09.592292230 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-09-02 14:32:09.592292230 +0200 @@ -0,0 +1,156 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -561,9 +561,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentLis + return NS_ERROR_NOT_IMPLEMENTED; +} + -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-08-16 23:07:13.202298284 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentListener.h 2011-08-16 23:07:13.202298284 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-09-02 14:32:09.593292235 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2011-09-02 14:32:09.593292235 +0200 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -631,9 +631,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContentLis +}; + +#endif /* __EmbedContentListener_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-08-16 23:07:13.203298265 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-08-16 23:07:13.203298265 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-09-02 14:32:09.594292240 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-09-02 14:32:09.594292240 +0200 @@ -0,0 +1,618 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1253,9 +1253,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMen + mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; + return NS_OK; +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-08-16 23:07:13.204298246 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-08-16 23:07:13.204298246 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-09-02 14:32:09.595292245 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-09-02 14:32:09.595292245 +0200 @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1358,9 +1358,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedContextMen + nsString mCtxDocTitle; +}; // class EmbedContextMenuInfo +#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-08-16 23:07:13.205298228 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-08-16 23:07:13.206298211 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-09-02 14:32:09.596292250 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-09-02 14:32:09.596292250 +0200 @@ -0,0 +1,304 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1666,9 +1666,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListe + } + return NS_OK; +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-08-16 23:07:13.206298211 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListener.h 2011-08-16 23:07:13.206298211 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-09-02 14:32:09.596292250 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2011-09-02 14:32:09.596292250 +0200 @@ -0,0 +1,90 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1760,9 +1760,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedEventListe +}; + +#endif /* __EmbedEventListener_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-08-16 23:07:13.207298194 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-08-16 23:07:13.207298194 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-09-02 14:32:09.597292255 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-09-02 14:32:09.597292255 +0200 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ @@ -1852,9 +1852,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.c + NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); + return docShell->GetContentViewer(aViewer); +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-08-16 23:07:13.208298176 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h 2011-08-16 23:07:13.208298176 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-09-02 14:32:09.597292255 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2011-09-02 14:32:09.597292255 +0200 @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -1923,9 +1923,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedGtkTools.h +GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); + +#endif /* __EmbedTools_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-08-16 23:07:13.210298139 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-08-16 23:07:13.210298139 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-09-02 14:32:09.598292260 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-09-02 14:32:09.598292260 +0200 @@ -0,0 +1,983 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -2910,9 +2910,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.cp + gtk_widget_destroy(sOffscreenWindow); + sOffscreenWindow = 0; +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-08-16 23:07:13.211298121 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h 2011-08-16 23:07:13.211298121 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-09-02 14:32:09.598292260 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2011-09-02 15:25:27.671352254 +0200 @@ -0,0 +1,188 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -2962,7 +2962,7 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h. +// object. +#include "nsIWebBrowserChrome.h" +#include "nsIAppShell.h" -+#include "nsPIDOMEventTarget.h" ++#include "nsIDOMEventTarget.h" +#include "nsTArray.h" + +#include "gtkmozembedprivate.h" @@ -3102,9 +3102,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrivate.h. +}; + +#endif /* __EmbedPrivate_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-08-16 23:07:13.212298103 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.cpp 2011-08-16 23:07:13.212298103 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-09-02 14:32:09.599292265 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2011-09-02 14:32:09.599292265 +0200 @@ -0,0 +1,215 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3321,9 +3321,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.c + + uri->GetSpec(aString); +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-08-16 23:07:13.214298067 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h 2011-08-16 23:07:13.214298067 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-09-02 14:32:09.599292265 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2011-09-02 14:32:09.599292265 +0200 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3391,9 +3391,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedProgress.h +}; + +#endif /* __EmbedProgress_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-08-16 23:07:13.216298029 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-08-16 23:07:13.216298029 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-09-02 14:32:09.599292265 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-09-02 14:32:09.599292265 +0200 @@ -0,0 +1,411 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3806,9 +3806,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.c + } + } +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-08-16 23:07:13.217298011 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h 2011-08-16 23:07:13.217298011 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-09-02 14:32:09.600292270 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2011-09-02 14:32:09.600292270 +0200 @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3923,9 +3923,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedPrompter.h + GtkWidget *mComboBox; + GtkWidget *mCheckBox; +}; -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-08-16 23:07:13.218297994 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp 2011-08-16 23:07:13.218297994 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-09-02 14:32:09.600292270 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2011-09-02 14:32:09.600292270 +0200 @@ -0,0 +1,474 @@ +/* + * vim:ts=2:et:sw=2 @@ -4401,9 +4401,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.cpp + + return rv; +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-08-16 23:07:13.219297976 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-08-16 23:07:13.219297976 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-09-02 14:32:09.601292274 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-09-02 14:32:09.601292274 +0200 @@ -0,0 +1,106 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4511,9 +4511,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCrea + + return NS_ERROR_FAILURE; +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-08-16 23:07:13.220297958 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-08-16 23:07:13.220297958 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-09-02 14:32:09.601292274 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-09-02 14:32:09.601292274 +0200 @@ -0,0 +1,54 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4569,9 +4569,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindowCrea +}; + +#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-08-16 23:07:13.221297940 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h 2011-08-16 23:07:13.221297940 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-09-02 14:32:09.602292278 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2011-09-02 14:32:09.602292278 +0200 @@ -0,0 +1,101 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4674,9 +4674,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/EmbedWindow.h.g + + +#endif /* __EmbedWindow_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-08-16 23:07:13.223297904 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-08-16 23:07:13.224297886 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-09-02 14:32:09.603292283 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-09-02 14:32:09.603292283 +0200 @@ -0,0 +1,1132 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5810,9 +5810,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed2.cp + aNewEmbed, aChromeFlags); + +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-08-16 23:07:13.225297868 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-08-16 23:07:13.225297868 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-09-02 14:32:09.604292288 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-09-02 14:32:09.604292288 +0200 @@ -0,0 +1,116 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5930,9 +5930,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_glu + return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); +} + -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-08-16 23:07:13.226297850 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h 2011-08-16 23:07:13.226297850 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-09-02 14:32:09.604292288 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2011-09-02 14:32:09.604292288 +0200 @@ -0,0 +1,287 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6221,9 +6221,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed.h.g +#endif /* __cplusplus */ + +#endif /* gtkmozembed_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-08-16 23:07:13.227297831 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-08-16 23:07:13.227297831 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-09-02 14:32:09.605292293 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-09-02 14:32:09.605292293 +0200 @@ -0,0 +1,70 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6295,9 +6295,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembed_int + +#endif /* gtkmozembed_internal_h */ + -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-08-16 23:07:13.228297813 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-08-16 23:07:13.228297813 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-09-02 14:32:09.605292293 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-09-02 14:32:09.605292293 +0200 @@ -0,0 +1,34 @@ +BOOL:STRING +BOOL:STRING,STRING @@ -6333,9 +6333,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedmars +BOOL:POINTER +VOID:POINTER +BOOL:STRING,STRING,POINTER -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-08-16 23:07:13.229297795 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-08-16 23:07:13.229297795 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-09-02 14:32:09.606292298 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-09-02 14:32:09.606292298 +0200 @@ -0,0 +1,91 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6428,9 +6428,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/gtkmozembedpriv +#endif /* __cplusplus */ + +#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-08-16 23:07:13.230297777 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.cpp 2011-08-16 23:07:13.230297777 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-09-02 14:32:09.606292298 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2011-09-02 14:32:09.606292298 +0200 @@ -0,0 +1,349 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6781,9 +6781,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptServic + NS_WARNING("Unexpected button flags"); + } +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-08-16 23:07:13.231297759 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptService.h 2011-08-16 23:07:13.231297759 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-09-02 14:32:09.607292303 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2011-09-02 14:32:09.607292303 +0200 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6844,9 +6844,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/GtkPromptServic + void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, + const PRUnichar* aStringValue, nsAString &aLabel); +}; -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-08-16 23:07:13.232297741 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in 2011-08-16 23:07:13.232297741 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-09-02 14:32:09.607292303 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2011-09-02 14:32:09.607292303 +0200 @@ -0,0 +1,112 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -6960,9 +6960,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/src/Makefile.in.gtk + +GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c + -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-08-16 23:07:13.233297723 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in 2011-08-16 23:07:13.233297723 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-09-02 14:32:09.607292303 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2011-09-02 14:32:09.607292303 +0200 @@ -0,0 +1,101 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -7065,9 +7065,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/Makefile.in.g +DEFINES += -D_TIME_H=1 +endif +endif -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-08-16 23:07:13.234297704 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-08-16 23:07:13.234297704 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-09-02 14:32:09.608292308 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-09-02 14:32:09.608292308 +0200 @@ -0,0 +1,185 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -7254,9 +7254,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedC + gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); + g_free(text); +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-08-16 23:07:13.237297649 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-08-16 23:07:13.238297631 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-09-02 14:32:09.608292308 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-09-02 14:32:09.608292308 +0200 @@ -0,0 +1,1145 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8403,9 +8403,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbed. + gtk_widget_set_sensitive(browser->forwardButton, FALSE); + } + -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-08-16 23:07:13.239297613 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-08-16 23:07:13.239297613 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-09-02 14:32:09.609292313 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-09-02 14:32:09.609292313 +0200 @@ -0,0 +1,142 @@ +/** simplemdi.c **/ +/* @@ -8549,9 +8549,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedM + gtk_main_quit(); + return(0); +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-08-16 23:07:13.239297613 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-08-16 23:07:13.239297613 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-09-02 14:32:09.609292313 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-09-02 14:32:09.609292313 +0200 @@ -0,0 +1,86 @@ +#include +#include @@ -8639,9 +8639,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedN + + return 0; +} -diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-08-16 23:07:13.240297595 +0200 -+++ xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-08-16 23:07:13.240297595 +0200 +diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp +--- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-09-02 14:32:09.609292313 +0200 ++++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-09-02 14:32:09.609292313 +0200 @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8752,9 +8752,9 @@ diff -up xulrunner-6.0/mozilla-release/embedding/browser/gtk/tests/TestGtkEmbedS + fprintf(stderr, "Can't fork.\n"); + } +} -diff -up xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in ---- xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed 2011-08-11 23:41:30.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in 2011-08-16 23:07:13.241297577 +0200 +diff -up xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in +--- xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2011-08-31 21:16:33.000000000 +0200 ++++ xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in 2011-09-02 14:32:09.610292318 +0200 @@ -75,6 +75,8 @@ CPPSRCS += dlldeps-xul.cpp endif @@ -8764,11 +8764,11 @@ diff -up xulrunner-6.0/mozilla-release/toolkit/library/Makefile.in.gtkmozembed x DEFINES += -DMOZ_ENABLE_GTK2 endif -diff -up xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh ---- xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-08-11 23:41:31.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh 2011-08-16 23:07:13.243297541 +0200 -@@ -552,6 +552,9 @@ MAKEFILES_embedding=" - embedding/browser/activex/src/plugin/Makefile +diff -up xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh +--- xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-08-31 21:16:37.000000000 +0200 ++++ xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2011-09-02 14:32:09.610292318 +0200 +@@ -560,6 +560,9 @@ MAKEFILES_embedding=" + embedding/browser/Makefile embedding/browser/build/Makefile embedding/browser/webBrowser/Makefile + embedding/browser/gtk/Makefile @@ -8777,9 +8777,9 @@ diff -up xulrunner-6.0/mozilla-release/toolkit/toolkit-makefiles.sh.gtkmozembed embedding/components/Makefile embedding/components/appstartup/Makefile embedding/components/appstartup/src/Makefile -diff -up xulrunner-6.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-6.0/mozilla-release/toolkit/toolkit-tiers.mk ---- xulrunner-6.0/mozilla-release/toolkit/toolkit-tiers.mk.gtkmozembed 2011-08-11 23:41:31.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/toolkit/toolkit-tiers.mk 2011-08-16 23:22:29.002407174 +0200 +diff -up xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk +--- xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2011-08-31 21:16:37.000000000 +0200 ++++ xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk 2011-09-02 14:32:09.611292323 +0200 @@ -226,6 +226,12 @@ endif tier_platform_dirs += services/crypto/component diff --git a/xulrunner.spec b/xulrunner.spec index e31a3ee..23a5962 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -434,8 +434,6 @@ fi %ghost %{mozappdir}/components/xpti.dat %{mozappdir}/components/*.so %{mozappdir}/components/*.manifest -%dir %{mozappdir}/icons -%attr(644, root, root) %{mozappdir}/icons/* %{mozappdir}/omni.jar %{mozappdir}/plugins %{mozappdir}/*.so From c619e7c6d5f8594d2e2eb083ac35f96763b0cc5a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 30 Sep 2011 13:14:07 +0200 Subject: [PATCH 202/486] Update to 7.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7a4f626..283fcb2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-6.0.source.tar.bz2 /xulrunner-6.0.2.source.tar.bz2 /xulrunner-7.0.source.tar.bz2 +/xulrunner-7.0.1.source.tar.bz2 diff --git a/sources b/sources index 2fcc07a..703077e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -673a015a23e3fefa18d80db68c8b9fc1 xulrunner-7.0.source.tar.bz2 +5b212db48630ba93bb30ec63cca17f4d xulrunner-7.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 23a5962..7f60f67 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -57,7 +57,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 7.0 +Version: 7.0.1 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -466,6 +466,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 30 2011 Jan Horak - 7.0.1-1 +- Update to 7.0.1 + * Tue Sep 27 2011 Jan Horak - 7.0-1 - Update to 7.0 From 740114b3e28f97236f81287befabf88bf97ed60e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 10 Oct 2011 16:53:29 +0200 Subject: [PATCH 203/486] * Mon Oct 10 2011 Martin Stransky 7.0.1-2 - Removed GRE stuff - Removed xulrunner rpath (mozbz#686434) --- xulrunner.spec | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7f60f67..bd3caa5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -17,7 +17,6 @@ %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} %global tarballdir mozilla-release -#%global gre_dir %{_sysconfdir}/gre.d # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -26,13 +25,6 @@ %global enable_mozilla_crashreporter 0 %endif -%if %{__isa_bits} == 32 -%global gre_conf_file gre.conf -%endif -%if %{__isa_bits} == 64 -%global gre_conf_file gre64.conf -%endif - # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -52,13 +44,13 @@ %global gecko_verrel %{expand:%%{version}}-%{pre_name} %global pre_tag .%{pre_version} %else -%global gecko_verrel %{expand:%%{version}}-1 +%global gecko_verrel %{expand:%%{version}} %endif Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 7.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -269,7 +261,6 @@ MOZ_SMP_FLAGS=-j1 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 %endif -export LDFLAGS="-Wl,-rpath,%{mozappdir}" make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" # create debuginfo for crash-stats.mozilla.com @@ -371,12 +362,6 @@ for i in *.so; do done popd -# GRE stuff -#MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` -#%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ -# $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} -#chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} - # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d LD_CONF_FILE=xulrunner-%{__isa_bits}.conf @@ -421,8 +406,6 @@ fi %files %defattr(-,root,root,-) %{_bindir}/xulrunner -#%dir %{_sysconfdir}/gre.d -#%{_sysconfdir}/gre.d/gre*.conf %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.txt @@ -466,6 +449,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 10 2011 Martin Stransky 7.0.1-2 +- Removed GRE stuff +- Removed xulrunner rpath (mozbz#686434) + * Fri Sep 30 2011 Jan Horak - 7.0.1-1 - Update to 7.0.1 From b4c9d4da4804f14cb933c366a3dca613048df20f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 10 Oct 2011 16:59:12 +0200 Subject: [PATCH 204/486] * Mon Oct 10 2011 Martin Stransky 7.0.1-2 - Removed GRE stuff - Removed xulrunner rpath (mozbz#686434) --- xulrunner.spec | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7f60f67..bd3caa5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -17,7 +17,6 @@ %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} %global tarballdir mozilla-release -#%global gre_dir %{_sysconfdir}/gre.d # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -26,13 +25,6 @@ %global enable_mozilla_crashreporter 0 %endif -%if %{__isa_bits} == 32 -%global gre_conf_file gre.conf -%endif -%if %{__isa_bits} == 64 -%global gre_conf_file gre64.conf -%endif - # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -52,13 +44,13 @@ %global gecko_verrel %{expand:%%{version}}-%{pre_name} %global pre_tag .%{pre_version} %else -%global gecko_verrel %{expand:%%{version}}-1 +%global gecko_verrel %{expand:%%{version}} %endif Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 7.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -269,7 +261,6 @@ MOZ_SMP_FLAGS=-j1 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 %endif -export LDFLAGS="-Wl,-rpath,%{mozappdir}" make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" # create debuginfo for crash-stats.mozilla.com @@ -371,12 +362,6 @@ for i in *.so; do done popd -# GRE stuff -#MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` -#%{__mv} $RPM_BUILD_ROOT%{gre_dir}/$MOZILLA_GECKO_VERSION".system.conf" \ -# $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} -#chmod 644 $RPM_BUILD_ROOT%{gre_dir}/%{gre_conf_file} - # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d LD_CONF_FILE=xulrunner-%{__isa_bits}.conf @@ -421,8 +406,6 @@ fi %files %defattr(-,root,root,-) %{_bindir}/xulrunner -#%dir %{_sysconfdir}/gre.d -#%{_sysconfdir}/gre.d/gre*.conf %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.txt @@ -466,6 +449,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 10 2011 Martin Stransky 7.0.1-2 +- Removed GRE stuff +- Removed xulrunner rpath (mozbz#686434) + * Fri Sep 30 2011 Jan Horak - 7.0.1-1 - Update to 7.0.1 From 4e44d76599cabeed6a38b1da76cd30e833feb454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 11 Oct 2011 17:39:11 +0200 Subject: [PATCH 205/486] fix build on secondary arches --- mozilla-670719.patch | 53 ++++++++++++++++++++++++++++++++++ xulrunner-7.0.1-yarr-jit.patch | 44 ++++++++++++++++++++++++++++ xulrunner.spec | 10 ++++++- 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 mozilla-670719.patch create mode 100644 xulrunner-7.0.1-yarr-jit.patch diff --git a/mozilla-670719.patch b/mozilla-670719.patch new file mode 100644 index 0000000..afae907 --- /dev/null +++ b/mozilla-670719.patch @@ -0,0 +1,53 @@ +# HG changeset patch +# User Mike Hommey +# Date 1313846520 -7200 +# Node ID fdc3b63938f5a76d99c1e2bb12fd448465debc94 +# Parent 07a5a618ebe3f67b23100ceb1b51e92bb79be0cd +Bug 670719 - Only add -DENABLE_JIT=1 to CXXFLAGS if any of trace/method/yarr jit is enabled. + +diff --git a/js/src/Makefile.in b/js/src/Makefile.in +--- a/js/src/Makefile.in ++++ b/js/src/Makefile.in +@@ -433,16 +433,19 @@ CPPSRCS += \ + YarrPattern.cpp \ + YarrSyntaxChecker.cpp \ + $(NULL) + else + + ############################################### + # BEGIN include sources for the Nitro assembler + # ++ ++ENABLE_YARR_JIT = 1 ++ + VPATH += $(srcdir)/assembler \ + $(srcdir)/assembler/wtf \ + $(srcdir)/assembler/jit \ + $(srcdir)/assembler/assembler \ + $(srcdir)/methodjit \ + $(srcdir)/yarr \ + $(NONE) + +@@ -1070,17 +1073,21 @@ endif + + ############################################### + # BEGIN kludges for the Nitro assembler + # + + # Needed to "configure" it correctly. Unfortunately these + # flags wind up being applied to all code in js/src, not just + # the code in js/src/assembler. +-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 ++CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 ++ ++ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT)) ++CXXFLAGS += -DENABLE_JIT=1 ++endif + + INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr + + ifdef ENABLE_METHODJIT + # Build a standalone test program that exercises the assembler + # sources a bit. + TESTMAIN_OBJS = \ + Assertions.$(OBJ_SUFFIX) \ diff --git a/xulrunner-7.0.1-yarr-jit.patch b/xulrunner-7.0.1-yarr-jit.patch new file mode 100644 index 0000000..da64d0f --- /dev/null +++ b/xulrunner-7.0.1-yarr-jit.patch @@ -0,0 +1,44 @@ +diff -up xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h.yarr-jit xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h +--- xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h.yarr-jit 2011-09-28 22:24:50.000000000 +0200 ++++ xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h 2011-10-11 17:35:10.000000000 +0200 +@@ -491,7 +491,9 @@ RegExp::compileHelper(JSContext *cx, JSL + } + #endif + ++#if ENABLE_YARR_JIT + codeBlock.setFallBack(true); ++#endif + byteCode = JSC::Yarr::byteCompile(yarrPattern, cx->compartment->regExpAllocator).get(); + + return true; +diff -up xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h.yarr-jit xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h +--- xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h.yarr-jit 2011-09-28 22:24:52.000000000 +0200 ++++ xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h 2011-10-11 17:35:10.000000000 +0200 +@@ -50,7 +50,9 @@ + #include "jstl.h" + #include "vm/String.h" + #include "assembler/wtf/Platform.h" ++#if ENABLE_YARR_JIT + #include "assembler/jit/ExecutableAllocator.h" ++#endif + + namespace JSC { namespace Yarr { + +@@ -261,6 +263,8 @@ deleteAllValues(Vector &v) { + v.deleteAllValues(); + } + ++#if ENABLE_YARR_JIT ++ + /* + * Minimal JSGlobalData. This used by Yarr to get the allocator. + */ +@@ -272,6 +276,8 @@ class JSGlobalData { + : regexAllocator(regexAllocator) { } + }; + ++#endif ++ + /* + * Sentinel value used in Yarr. + */ diff --git a/xulrunner.spec b/xulrunner.spec index bd3caa5..5a6911e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 7.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -83,6 +83,9 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch +Patch36: mozilla-670719.patch +# backport from 8.0beta +Patch37: xulrunner-7.0.1-yarr-jit.patch # --------------------------------------------------- @@ -209,6 +212,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 +%patch36 -p1 -b .moz670719 +%patch37 -p2 -b .yarr-jit %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -449,6 +454,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 11 2011 Dan Horák 7.0.1-3 +- fix build on secondary arches + * Mon Oct 10 2011 Martin Stransky 7.0.1-2 - Removed GRE stuff - Removed xulrunner rpath (mozbz#686434) From 92d7ca8bd875cd650f15c29df471e28f74f92647 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 18 Oct 2011 10:51:19 +0200 Subject: [PATCH 206/486] Updated cairo dependency (rhbz#742853) --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 5a6911e..64648f2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,7 +1,7 @@ # Minimal required versions %global nspr_version 4.8.8 %global nss_version 3.12.10 -%global cairo_version 1.6.0 +%global cairo_version 1.10.2 %global freetype_version 2.1.9 %global sqlite_version 3.7.4 %global libnotify_version 0.7.0 @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 7.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -454,6 +454,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 18 2011 Martin Stransky 7.0.1-4 +- Updated cairo dependency (rhbz#742853) + * Tue Oct 11 2011 Dan Horák 7.0.1-3 - fix build on secondary arches From 18802c4c16918b51a0008544d6aea1a74da0c2ca Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 18 Oct 2011 11:20:02 +0200 Subject: [PATCH 207/486] =?UTF-8?q?*=20Tue=20Oct=2018=202011=20Ville=20Sky?= =?UTF-8?q?tt=C3=83=C2=A4=20=20-=207.0.1-5=20-=20Avoi?= =?UTF-8?q?d=20%%post/un=20shell=20invocations=20=20=20and=20dependencies?= =?UTF-8?q?=20(rhbz#736830).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xulrunner.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 64648f2..f2aa840 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 7.0.1 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -396,11 +396,9 @@ touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat #--------------------------------------------------------------------- -%post -/sbin/ldconfig +%post -p /sbin/ldconfig -%postun -/sbin/ldconfig +%postun -p /sbin/ldconfig %preun # is it a final removal? @@ -454,6 +452,10 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 18 2011 Ville Skyttä - 7.0.1-5 +- Avoid %%post/un shell invocations + and dependencies (rhbz#736830). + * Tue Oct 18 2011 Martin Stransky 7.0.1-4 - Updated cairo dependency (rhbz#742853) From 4ef9150f989c44aca8989d92d74c25c47ed4dcb6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 8 Nov 2011 09:51:57 +0100 Subject: [PATCH 208/486] update to 8.0 --- .gitignore | 1 + ...ozembed.patch => add-gtkmozembed-8.0.patch | 502 +++++++++--------- mozilla-686280.patch | 25 + mozilla-build-sbrk.patch | 24 - sources | 2 +- xulrunner-5.0-curl.patch | 44 -- xulrunner-7.0.1-yarr-jit.patch | 44 -- xulrunner.spec | 24 +- 8 files changed, 291 insertions(+), 375 deletions(-) rename add-gtkmozembed.patch => add-gtkmozembed-8.0.patch (93%) create mode 100644 mozilla-686280.patch delete mode 100644 mozilla-build-sbrk.patch delete mode 100644 xulrunner-5.0-curl.patch delete mode 100644 xulrunner-7.0.1-yarr-jit.patch diff --git a/.gitignore b/.gitignore index 283fcb2..b5d0931 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-6.0.2.source.tar.bz2 /xulrunner-7.0.source.tar.bz2 /xulrunner-7.0.1.source.tar.bz2 +/xulrunner-8.0.source.tar.bz2 diff --git a/add-gtkmozembed.patch b/add-gtkmozembed-8.0.patch similarity index 93% rename from add-gtkmozembed.patch rename to add-gtkmozembed-8.0.patch index 388cc4f..090f132 100644 --- a/add-gtkmozembed.patch +++ b/add-gtkmozembed-8.0.patch @@ -1,6 +1,6 @@ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-09-02 14:32:09.591292225 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2011-09-02 14:32:09.591292225 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-10-11 15:32:56.211500043 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2011-10-11 15:32:56.211500043 +0200 @@ -0,0 +1,54 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -56,9 +56,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembe +endif + +include $(topsrcdir)/config/rules.mk -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-09-02 14:32:09.591292225 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-09-02 14:32:09.591292225 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-10-11 15:32:56.212500050 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-10-11 15:32:56.212500050 +0200 @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -118,7 +118,7 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates. +#include "nsStringAPI.h" +#endif +#include "nsIPrompt.h" -+#include "nsIDOMWindowInternal.h" ++#include "nsIDOMWindow.h" +#include "nsIComponentManager.h" +#include "nsIServiceManager.h" +#include "nsIStringBundle.h" @@ -313,9 +313,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates. + return NS_OK; +} + -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-09-02 14:32:09.591292225 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2011-09-02 14:32:09.591292225 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-10-11 15:32:56.213500057 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2011-10-11 15:32:56.213500057 +0200 @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -401,9 +401,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates. + nsCOMPtr mPIPStringBundle; +}; +#endif /* __EmbedCertificates_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-09-02 14:32:09.592292230 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-09-02 14:32:09.592292230 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-10-11 15:32:56.214500063 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-10-11 15:32:56.214500063 +0200 @@ -0,0 +1,156 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -561,9 +561,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen + return NS_ERROR_NOT_IMPLEMENTED; +} + -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-09-02 14:32:09.593292235 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2011-09-02 14:32:09.593292235 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-10-11 15:32:56.217500082 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2011-10-11 15:32:56.217500082 +0200 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -631,9 +631,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen +}; + +#endif /* __EmbedContentListener_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-09-02 14:32:09.594292240 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-09-02 14:32:09.594292240 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-10-11 15:32:56.219500096 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-10-11 15:32:56.219500096 +0200 @@ -0,0 +1,618 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1253,9 +1253,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuIn + mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; + return NS_OK; +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-09-02 14:32:09.595292245 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-09-02 14:32:09.595292245 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-10-11 15:32:56.222500116 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-10-11 15:32:56.222500116 +0200 @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1358,10 +1358,10 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuIn + nsString mCtxDocTitle; +}; // class EmbedContextMenuInfo +#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-09-02 14:32:09.596292250 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-09-02 14:32:09.596292250 +0200 -@@ -0,0 +1,304 @@ +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-10-11 15:32:56.223500122 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-10-11 19:12:12.742427564 +0200 +@@ -0,0 +1,280 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * @@ -1417,15 +1417,7 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +{ +} + -+NS_IMPL_ADDREF(EmbedEventListener) -+NS_IMPL_RELEASE(EmbedEventListener) -+NS_INTERFACE_MAP_BEGIN(EmbedEventListener) -+ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMKeyListener) -+ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener) -+ NS_INTERFACE_MAP_ENTRY(nsIDOMKeyListener) -+ NS_INTERFACE_MAP_ENTRY(nsIDOMMouseListener) -+ NS_INTERFACE_MAP_ENTRY(nsIDOMUIListener) -+NS_INTERFACE_MAP_END ++NS_IMPL_ISUPPORTS1(EmbedEventListener, nsIDOMEventListener) + +nsresult +EmbedEventListener::Init(EmbedPrivate *aOwner) @@ -1435,24 +1427,14 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +} + +NS_IMETHODIMP -+EmbedEventListener::HandleEvent(nsIDOMEvent* aDOMEvent) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP +EmbedEventListener::KeyDown(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr keyEvent; -+ keyEvent = do_QueryInterface(aDOMEvent); -+ if (!keyEvent) -+ return NS_OK; + // Return FALSE to this function to mark the event as not + // consumed... + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_KEY_DOWN], 0, -+ (void *)keyEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1463,16 +1445,12 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::KeyUp(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr keyEvent; -+ keyEvent = do_QueryInterface(aDOMEvent); -+ if (!keyEvent) -+ return NS_OK; + // return FALSE to this function to mark this event as not + // consumed... + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_KEY_UP], 0, -+ (void *)keyEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1483,15 +1461,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::KeyPress(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr keyEvent; -+ keyEvent = do_QueryInterface(aDOMEvent); -+ if (!keyEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_KEY_PRESS], 0, -+ (void *)keyEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1502,15 +1476,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::MouseDown(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr mouseEvent; -+ mouseEvent = do_QueryInterface(aDOMEvent); -+ if (!mouseEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_MOUSE_DOWN], 0, -+ (void *)mouseEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1521,15 +1491,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::MouseUp(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr mouseEvent; -+ mouseEvent = do_QueryInterface(aDOMEvent); -+ if (!mouseEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_MOUSE_UP], 0, -+ (void *)mouseEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1540,15 +1506,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::MouseClick(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr mouseEvent; -+ mouseEvent = do_QueryInterface(aDOMEvent); -+ if (!mouseEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_MOUSE_CLICK], 0, -+ (void *)mouseEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1559,15 +1521,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::MouseDblClick(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr mouseEvent; -+ mouseEvent = do_QueryInterface(aDOMEvent); -+ if (!mouseEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_MOUSE_DBL_CLICK], 0, -+ (void *)mouseEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1578,15 +1536,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::MouseOver(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr mouseEvent; -+ mouseEvent = do_QueryInterface(aDOMEvent); -+ if (!mouseEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_MOUSE_OVER], 0, -+ (void *)mouseEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1597,15 +1551,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::MouseOut(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr mouseEvent; -+ mouseEvent = do_QueryInterface(aDOMEvent); -+ if (!mouseEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_MOUSE_OUT], 0, -+ (void *)mouseEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1616,14 +1566,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::Activate(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr uiEvent = do_QueryInterface(aDOMEvent); -+ if (!uiEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_ACTIVATE], 0, -+ (void *)uiEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1634,14 +1581,11 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::FocusIn(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr uiEvent = do_QueryInterface(aDOMEvent); -+ if (!uiEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_FOCUS_IN], 0, -+ (void *)uiEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); @@ -1652,24 +1596,56 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +NS_IMETHODIMP +EmbedEventListener::FocusOut(nsIDOMEvent* aDOMEvent) +{ -+ nsCOMPtr uiEvent = do_QueryInterface(aDOMEvent); -+ if (!uiEvent) -+ return NS_OK; + // Return TRUE from your signal handler to mark the event as consumed. + gint return_val = FALSE; + g_signal_emit(G_OBJECT(mOwner->mOwningWidget), + moz_embed_signals[DOM_FOCUS_OUT], 0, -+ (void *)uiEvent, &return_val); ++ (void *)aDOMEvent, &return_val); + if (return_val) { + aDOMEvent->StopPropagation(); + aDOMEvent->PreventDefault(); + } + return NS_OK; +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-09-02 14:32:09.596292250 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2011-09-02 14:32:09.596292250 +0200 -@@ -0,0 +1,90 @@ ++ ++NS_IMETHODIMP ++EmbedEventListener::HandleEvent(nsIDOMEvent* aDOMEvent) ++{ ++ nsAutoString eventType; ++ aDOMEvent->GetType(eventType); ++ ++ if (eventType.EqualsLiteral("keydown")) ++ return KeyDown(aDOMEvent); ++ else if (eventType.EqualsLiteral("keyup")) ++ return KeyUp(aDOMEvent); ++ else if (eventType.EqualsLiteral("keypress")) ++ return KeyPress(aDOMEvent); ++ else if (eventType.EqualsLiteral("mousedown")) ++ return MouseDown(aDOMEvent); ++ else if (eventType.EqualsLiteral("mouseup")) ++ return MouseUp(aDOMEvent); ++ else if (eventType.EqualsLiteral("click")) ++ return MouseClick(aDOMEvent); ++ else if (eventType.EqualsLiteral("dblclick")) ++ return MouseDblClick(aDOMEvent); ++ else if (eventType.EqualsLiteral("mouseover")) ++ return MouseOver(aDOMEvent); ++ else if (eventType.EqualsLiteral("mouseout")) ++ return MouseOut(aDOMEvent); ++ else if (eventType.EqualsLiteral("DOMActivate")) ++ return Activate(aDOMEvent); ++ else if (eventType.EqualsLiteral("DOMFocusIn")) ++ return FocusIn(aDOMEvent); ++ else if (eventType.EqualsLiteral("DOMFocusOut")) ++ return FocusOut(aDOMEvent); ++ ++ NS_ERROR("Unexpected event type"); ++ return NS_OK; ++} +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-10-11 15:32:56.225500136 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2011-10-11 16:13:11.417521103 +0200 +@@ -0,0 +1,89 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * @@ -1710,15 +1686,14 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +#ifndef __EmbedEventListener_h +#define __EmbedEventListener_h + -+#include "nsIDOMKeyListener.h" -+#include "nsIDOMMouseListener.h" -+#include "nsIDOMUIListener.h" ++//#include "nsIDOMKeyListener.h" ++//#include "nsIDOMMouseListener.h" ++//#include "nsIDOMUIListener.h" ++#include "nsIDOMEventListener.h" + +class EmbedPrivate; + -+class EmbedEventListener : public nsIDOMKeyListener, -+ public nsIDOMMouseListener, -+ public nsIDOMUIListener ++class EmbedEventListener : public nsIDOMEventListener +{ + public: + @@ -1760,9 +1735,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +}; + +#endif /* __EmbedEventListener_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-09-02 14:32:09.597292255 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-09-02 14:32:09.597292255 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-10-11 15:32:56.226500143 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-10-11 15:32:56.226500143 +0200 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ @@ -1852,9 +1827,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp. + NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); + return docShell->GetContentViewer(aViewer); +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-09-02 14:32:09.597292255 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2011-09-02 14:32:09.597292255 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-10-11 15:32:56.227500150 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2011-10-11 15:32:56.227500150 +0200 @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -1923,10 +1898,10 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gt +GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); + +#endif /* __EmbedTools_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-09-02 14:32:09.598292260 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-09-02 14:32:09.598292260 +0200 -@@ -0,0 +1,983 @@ +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-10-11 15:32:56.230500171 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-10-11 19:01:06.189128684 +0200 +@@ -0,0 +1,1016 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * @@ -1991,7 +1966,7 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g +// and when chrome windows finish loading +#include "nsIDOMWindow.h" +#include "nsPIDOMWindow.h" -+#include "nsIDOMWindowInternal.h" ++ + +// For seting scrollbar visibilty +#include "nsIDOMBarProp.h" @@ -2169,7 +2144,7 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g + // that this will be destroyed before we go out of scope. + mEventListener = new EmbedEventListener(); + mEventListenerGuard = -+ static_cast(static_cast(mEventListener)); ++ static_cast(static_cast(mEventListener)); + mEventListener->Init(this); + + // has the window creator service been set up? @@ -2758,30 +2733,48 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g + return; + + nsIDOMEventListener *eventListener = -+ static_cast(static_cast(mEventListener)); ++ static_cast(static_cast(mEventListener)); + + // add the key listener + nsresult rv; -+ rv = mEventTarget->AddEventListenerByIID(eventListener, -+ NS_GET_IID(nsIDOMKeyListener)); -+ if (NS_FAILED(rv)) { -+ NS_WARNING("Failed to add key listener\n"); -+ return; -+ } -+ -+ rv = mEventTarget->AddEventListenerByIID(eventListener, -+ NS_GET_IID(nsIDOMMouseListener)); -+ if (NS_FAILED(rv)) { -+ NS_WARNING("Failed to add mouse listener\n"); -+ return; -+ } -+ -+ rv = mEventTarget->AddEventListenerByIID(eventListener, -+ NS_GET_IID(nsIDOMUIListener)); -+ if (NS_FAILED(rv)) { -+ NS_WARNING("Failed to add UI listener\n"); -+ return; -+ } ++ ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keydown"), ++ eventListener, PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keyup"), ++ eventListener, PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keypress"), ++ eventListener, PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mousedown"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseup"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("click"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("dblclick"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseover"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseout"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMActivate"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMFocusIn"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); ++ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMFocusOut"), eventListener, ++ PR_FALSE, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv,); + + // ok, all set. + mListenersAttached = PR_TRUE; @@ -2794,30 +2787,45 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g + return; + + nsIDOMEventListener *eventListener = -+ static_cast(static_cast(mEventListener)); ++ static_cast(static_cast(mEventListener)); + + nsresult rv; -+ rv = mEventTarget->RemoveEventListenerByIID(eventListener, -+ NS_GET_IID(nsIDOMKeyListener)); -+ if (NS_FAILED(rv)) { -+ NS_WARNING("Failed to remove key listener\n"); -+ return; -+ } -+ -+ rv = -+ mEventTarget->RemoveEventListenerByIID(eventListener, -+ NS_GET_IID(nsIDOMMouseListener)); -+ if (NS_FAILED(rv)) { -+ NS_WARNING("Failed to remove mouse listener\n"); -+ return; -+ } -+ -+ rv = mEventTarget->RemoveEventListenerByIID(eventListener, -+ NS_GET_IID(nsIDOMUIListener)); -+ if (NS_FAILED(rv)) { -+ NS_WARNING("Failed to remove UI listener\n"); -+ return; -+ } ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keydown"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keyup"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keypress"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mousedown"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseup"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("click"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("dblclick"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseover"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseout"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMActivate"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMFocusIn"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); ++ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMFocusOut"), ++ eventListener, PR_FALSE); ++ NS_ENSURE_SUCCESS(rv, ); + + mListenersAttached = PR_FALSE; +} @@ -2910,9 +2918,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g + gtk_widget_destroy(sOffscreenWindow); + sOffscreenWindow = 0; +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-09-02 14:32:09.598292260 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2011-09-02 15:25:27.671352254 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-10-11 15:32:56.233500190 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2011-10-11 15:32:56.233500190 +0200 @@ -0,0 +1,188 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3102,9 +3110,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtk +}; + +#endif /* __EmbedPrivate_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-09-02 14:32:09.599292265 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2011-09-02 14:32:09.599292265 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-10-11 15:32:56.234500196 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2011-10-11 15:32:56.235500203 +0200 @@ -0,0 +1,215 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3321,9 +3329,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp. + + uri->GetSpec(aString); +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-09-02 14:32:09.599292265 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2011-09-02 14:32:09.599292265 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-10-11 15:32:56.235500203 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2011-10-11 15:32:56.235500203 +0200 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3391,9 +3399,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gt +}; + +#endif /* __EmbedProgress_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-09-02 14:32:09.599292265 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-09-02 14:32:09.599292265 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-10-11 15:32:56.237500217 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-10-11 15:32:56.237500217 +0200 @@ -0,0 +1,411 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3806,9 +3814,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp. + } + } +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-09-02 14:32:09.600292270 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2011-09-02 14:32:09.600292270 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-10-11 15:32:56.238500224 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2011-10-11 15:32:56.238500224 +0200 @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3923,9 +3931,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gt + GtkWidget *mComboBox; + GtkWidget *mCheckBox; +}; -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-09-02 14:32:09.600292270 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2011-09-02 14:32:09.600292270 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-10-11 15:32:56.243500258 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2011-10-11 15:32:56.243500258 +0200 @@ -0,0 +1,474 @@ +/* + * vim:ts=2:et:sw=2 @@ -4401,9 +4409,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gt + + return rv; +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-09-02 14:32:09.601292274 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-09-02 14:32:09.601292274 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-10-11 15:32:56.245500270 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-10-11 15:32:56.245500270 +0200 @@ -0,0 +1,106 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4511,9 +4519,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator + + return NS_ERROR_FAILURE; +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-09-02 14:32:09.601292274 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-09-02 14:32:09.601292274 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-10-11 15:32:56.246500277 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-10-11 15:32:56.246500277 +0200 @@ -0,0 +1,54 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4569,9 +4577,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator +}; + +#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-09-02 14:32:09.602292278 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2011-09-02 14:32:09.602292278 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-10-11 15:32:56.248500291 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2011-10-11 15:32:56.248500291 +0200 @@ -0,0 +1,101 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4674,9 +4682,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkm + + +#endif /* __EmbedWindow_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-09-02 14:32:09.603292283 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-09-02 14:32:09.603292283 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-10-11 15:32:56.250500305 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-10-11 15:32:56.250500305 +0200 @@ -0,0 +1,1132 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5810,9 +5818,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.g + aNewEmbed, aChromeFlags); + +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-09-02 14:32:09.604292288 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-09-02 14:32:09.604292288 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-10-11 15:32:56.253500325 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-10-11 15:32:56.253500325 +0200 @@ -0,0 +1,116 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5930,9 +5938,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.c + return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); +} + -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-09-02 14:32:09.604292288 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2011-09-02 14:32:09.604292288 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-10-11 15:32:56.255500339 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2011-10-11 15:32:56.255500339 +0200 @@ -0,0 +1,287 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6221,9 +6229,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkm +#endif /* __cplusplus */ + +#endif /* gtkmozembed_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-09-02 14:32:09.605292293 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-09-02 14:32:09.605292293 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-10-11 15:32:56.256500346 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-10-11 15:32:56.256500346 +0200 @@ -0,0 +1,70 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6295,9 +6303,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_intern + +#endif /* gtkmozembed_internal_h */ + -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-09-02 14:32:09.605292293 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-09-02 14:32:09.605292293 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-10-11 15:32:56.259500366 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-10-11 15:32:56.259500366 +0200 @@ -0,0 +1,34 @@ +BOOL:STRING +BOOL:STRING,STRING @@ -6333,9 +6341,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal +BOOL:POINTER +VOID:POINTER +BOOL:STRING,STRING,POINTER -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-09-02 14:32:09.606292298 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-09-02 14:32:09.606292298 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-10-11 15:32:56.262500386 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-10-11 15:32:56.262500386 +0200 @@ -0,0 +1,91 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6428,9 +6436,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate +#endif /* __cplusplus */ + +#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-09-02 14:32:09.606292298 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2011-09-02 14:32:09.606292298 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-10-11 15:32:56.264500398 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2011-10-11 15:32:56.264500398 +0200 @@ -0,0 +1,349 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6781,9 +6789,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c + NS_WARNING("Unexpected button flags"); + } +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-09-02 14:32:09.607292303 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2011-09-02 14:32:09.607292303 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-10-11 15:32:56.265500405 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2011-10-11 15:32:56.265500405 +0200 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6844,9 +6852,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h + void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, + const PRUnichar* aStringValue, nsAString &aLabel); +}; -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-09-02 14:32:09.607292303 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2011-09-02 14:32:09.607292303 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-10-11 15:32:56.268500426 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2011-10-11 15:32:56.268500426 +0200 @@ -0,0 +1,112 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -6960,9 +6968,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmoz + +GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c + -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-09-02 14:32:09.607292303 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2011-09-02 14:32:09.607292303 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-10-11 15:32:56.269500433 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2011-10-11 15:32:56.269500433 +0200 @@ -0,0 +1,101 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -7065,9 +7073,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkm +DEFINES += -D_TIME_H=1 +endif +endif -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-09-02 14:32:09.608292308 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-09-02 14:32:09.608292308 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-10-11 15:32:56.270500440 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-10-11 15:32:56.270500440 +0200 @@ -0,0 +1,185 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -7254,9 +7262,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChil + gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); + g_free(text); +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-09-02 14:32:09.608292308 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-09-02 14:32:09.608292308 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-10-11 15:32:56.275500472 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-10-11 15:32:56.275500472 +0200 @@ -0,0 +1,1145 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8403,9 +8411,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp + gtk_widget_set_sensitive(browser->forwardButton, FALSE); + } + -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-09-02 14:32:09.609292313 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-09-02 14:32:09.609292313 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-10-11 15:32:56.276500479 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-10-11 15:32:56.276500479 +0200 @@ -0,0 +1,142 @@ +/** simplemdi.c **/ +/* @@ -8549,9 +8557,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI. + gtk_main_quit(); + return(0); +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-09-02 14:32:09.609292313 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-09-02 14:32:09.609292313 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-10-11 15:32:56.277500486 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-10-11 15:32:56.277500486 +0200 @@ -0,0 +1,86 @@ +#include +#include @@ -8639,9 +8647,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNote + + return 0; +} -diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-09-02 14:32:09.609292313 +0200 -+++ xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-09-02 14:32:09.609292313 +0200 +diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp +--- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-10-11 15:32:56.279500500 +0200 ++++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-10-11 15:32:56.279500500 +0200 @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8752,9 +8760,9 @@ diff -up xulrunner-7.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSock + fprintf(stderr, "Can't fork.\n"); + } +} -diff -up xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in ---- xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2011-08-31 21:16:33.000000000 +0200 -+++ xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in 2011-09-02 14:32:09.610292318 +0200 +diff -up xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in +--- xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2011-10-07 02:59:21.000000000 +0200 ++++ xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in 2011-10-11 15:32:56.281500514 +0200 @@ -75,6 +75,8 @@ CPPSRCS += dlldeps-xul.cpp endif @@ -8764,10 +8772,10 @@ diff -up xulrunner-7.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulr DEFINES += -DMOZ_ENABLE_GTK2 endif -diff -up xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh ---- xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-08-31 21:16:37.000000000 +0200 -+++ xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2011-09-02 14:32:09.610292318 +0200 -@@ -560,6 +560,9 @@ MAKEFILES_embedding=" +diff -up xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh +--- xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-10-07 02:59:24.000000000 +0200 ++++ xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2011-10-11 15:32:56.283500528 +0200 +@@ -561,6 +561,9 @@ MAKEFILES_embedding=" embedding/browser/Makefile embedding/browser/build/Makefile embedding/browser/webBrowser/Makefile @@ -8777,10 +8785,10 @@ diff -up xulrunner-7.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xul embedding/components/Makefile embedding/components/appstartup/Makefile embedding/components/appstartup/src/Makefile -diff -up xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk ---- xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2011-08-31 21:16:37.000000000 +0200 -+++ xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk 2011-09-02 14:32:09.611292323 +0200 -@@ -226,6 +226,12 @@ endif +diff -up xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk +--- xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2011-10-07 02:59:24.000000000 +0200 ++++ xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk 2011-10-11 15:32:56.284500534 +0200 +@@ -223,6 +223,12 @@ endif tier_platform_dirs += services/crypto/component @@ -8793,7 +8801,7 @@ diff -up xulrunner-7.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunn tier_platform_dirs += startupcache ifdef APP_LIBXUL_STATICDIRS -@@ -272,4 +278,3 @@ tier_platform_dirs += testing/xpcshell +@@ -269,4 +275,3 @@ tier_platform_dirs += testing/xpcshell tier_platform_dirs += testing/mozmill tier_platform_dirs += testing/tools/screenshot endif diff --git a/mozilla-686280.patch b/mozilla-686280.patch new file mode 100644 index 0000000..95732bf --- /dev/null +++ b/mozilla-686280.patch @@ -0,0 +1,25 @@ +# HG changeset patch +# Parent f2a2adaaacba0f0b1d470430c4fb8f6fb6125fbf +# User Luke Wagner +Add in a const-stripper in order to resolve ambiguities + +diff --git a/js/src/jsutil.h b/js/src/jsutil.h +--- a/js/src/jsutil.h ++++ b/js/src/jsutil.h +@@ -819,13 +819,16 @@ class MoveRef { + operator T &() const { return *pointer; } + private: + T *pointer; + }; + + template + MoveRef Move(T &t) { return MoveRef(t); } + ++template ++MoveRef Move(const T &t) { return MoveRef(const_cast(t)); } ++ + } /* namespace js */ + + #endif /* defined(__cplusplus) */ + + #endif /* jsutil_h___ */ diff --git a/mozilla-build-sbrk.patch b/mozilla-build-sbrk.patch deleted file mode 100644 index 7e8f8c9..0000000 --- a/mozilla-build-sbrk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp.sbrk xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp ---- xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp.sbrk 2010-07-20 20:52:15.000000000 -0400 -+++ xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp 2010-07-28 10:21:51.905606001 -0400 -@@ -1118,7 +1118,7 @@ GC(JSContext *cx, uintN argc, jsval *vp) - char buf[256]; - JS_snprintf(buf, sizeof(buf), "before %lu, after %lu, break %08lx\n", - (unsigned long)preBytes, (unsigned long)cx->runtime->gcBytes, --#ifdef HAVE_SBRK -+#if 0 - (unsigned long)sbrk(0) - #else - 0 -diff -up xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp.sbrk xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp ---- xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp.sbrk 2010-07-20 20:52:20.000000000 -0400 -+++ xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp 2010-07-28 10:20:36.878606001 -0400 -@@ -540,7 +540,7 @@ GC(JSContext *cx, JSObject *obj, uintN a - JS_GC(cx); - fprintf(gOutFile, "before %lu, after %lu, break %08lx\n", - (unsigned long)preBytes, (unsigned long)rt->gcBytes, --#if defined(XP_UNIX) && !defined(__SYMBIAN32__) -+#if 0 //defined(XP_UNIX) && !defined(__SYMBIAN32__) - (unsigned long)sbrk(0) - #else - 0 diff --git a/sources b/sources index 703077e..9c8b87e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5b212db48630ba93bb30ec63cca17f4d xulrunner-7.0.1.source.tar.bz2 +9395a5be13da119bd8d53c3225e5d17c xulrunner-8.0.source.tar.bz2 diff --git a/xulrunner-5.0-curl.patch b/xulrunner-5.0-curl.patch deleted file mode 100644 index 6d40aa5..0000000 --- a/xulrunner-5.0-curl.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -up xulrunner-5.0/mozilla-release/config/system-headers.old xulrunner-5.0/mozilla-release/config/system-headers ---- xulrunner-5.0/mozilla-release/config/system-headers.old 2011-06-15 23:57:19.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/config/system-headers 2011-06-24 11:03:04.725787684 +0200 -@@ -207,7 +207,6 @@ ctime - ctype.h - curl/curl.h - curl/easy.h --curl/types.h - curses.h - cxxabi.h - DateTimeUtils.h -diff -up xulrunner-5.0/mozilla-release/js/src/config/system-headers.old xulrunner-5.0/mozilla-release/js/src/config/system-headers ---- xulrunner-5.0/mozilla-release/js/src/config/system-headers.old 2011-06-15 23:57:28.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/js/src/config/system-headers 2011-06-24 11:05:09.305688350 +0200 -@@ -207,7 +207,6 @@ ctime - ctype.h - curl/curl.h - curl/easy.h --curl/types.h - curses.h - cxxabi.h - DateTimeUtils.h -diff -up xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc.old xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc ---- xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc.old 2011-06-15 23:57:55.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc 2011-06-24 11:02:26.854732204 +0200 -@@ -33,7 +33,6 @@ - #include - #include - #include --#include - - namespace { - -diff -up xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc.old xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc ---- xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc.old 2011-06-15 23:57:55.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc 2011-06-24 11:02:08.801845273 +0200 -@@ -29,7 +29,6 @@ - - #include - #include --#include - #include - - #include diff --git a/xulrunner-7.0.1-yarr-jit.patch b/xulrunner-7.0.1-yarr-jit.patch deleted file mode 100644 index da64d0f..0000000 --- a/xulrunner-7.0.1-yarr-jit.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -up xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h.yarr-jit xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h ---- xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h.yarr-jit 2011-09-28 22:24:50.000000000 +0200 -+++ xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h 2011-10-11 17:35:10.000000000 +0200 -@@ -491,7 +491,9 @@ RegExp::compileHelper(JSContext *cx, JSL - } - #endif - -+#if ENABLE_YARR_JIT - codeBlock.setFallBack(true); -+#endif - byteCode = JSC::Yarr::byteCompile(yarrPattern, cx->compartment->regExpAllocator).get(); - - return true; -diff -up xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h.yarr-jit xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h ---- xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h.yarr-jit 2011-09-28 22:24:52.000000000 +0200 -+++ xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h 2011-10-11 17:35:10.000000000 +0200 -@@ -50,7 +50,9 @@ - #include "jstl.h" - #include "vm/String.h" - #include "assembler/wtf/Platform.h" -+#if ENABLE_YARR_JIT - #include "assembler/jit/ExecutableAllocator.h" -+#endif - - namespace JSC { namespace Yarr { - -@@ -261,6 +263,8 @@ deleteAllValues(Vector &v) { - v.deleteAllValues(); - } - -+#if ENABLE_YARR_JIT -+ - /* - * Minimal JSGlobalData. This used by Yarr to get the allocator. - */ -@@ -272,6 +276,8 @@ class JSGlobalData { - : regexAllocator(regexAllocator) { } - }; - -+#endif -+ - /* - * Sentinel value used in Yarr. - */ diff --git a/xulrunner.spec b/xulrunner.spec index f2aa840..34444fb 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -49,8 +49,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 7.0.1 -Release: 5%{?pre_tag}%{?dist} +Version: 8.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -64,13 +64,9 @@ Source21: %{name}.sh.in # build patches Patch0: xulrunner-version.patch Patch1: mozilla-build.patch -Patch9: mozilla-build-sbrk.patch Patch14: xulrunner-2.0-chromium-types.patch %if 0%{?fedora} <= 15 -Patch16: add-gtkmozembed.patch -%endif -%if 0%{?fedora} > 15 -Patch17: xulrunner-5.0-curl.patch +Patch16: add-gtkmozembed-8.0.patch %endif Patch18: xulrunner-6.0-secondary-ipc.patch @@ -84,8 +80,7 @@ Patch24: crashreporter-remove-static.patch Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch Patch36: mozilla-670719.patch -# backport from 8.0beta -Patch37: xulrunner-7.0.1-yarr-jit.patch +Patch37: mozilla-686280.patch # --------------------------------------------------- @@ -195,14 +190,10 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch %patch1 -p2 -b .build -%patch9 -p2 -b .sbrk %patch14 -p1 -b .chromium-types %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed %endif -%if 0%{?fedora} > 15 -%patch17 -p2 -b .curl -%endif %patch18 -p2 -b .secondary-ipc %patch20 -p2 -b .pk @@ -212,8 +203,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 -%patch36 -p1 -b .moz670719 -%patch37 -p2 -b .yarr-jit +%patch36 -p1 -b .670719 +%patch37 -p1 -b .686280 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -452,6 +443,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 7 2011 Martin Stransky 8.0-1 +- Updated to 8.0 + * Tue Oct 18 2011 Ville Skyttä - 7.0.1-5 - Avoid %%post/un shell invocations and dependencies (rhbz#736830). From 86ab3b2855cb5c96af5932a47dd1891de2227895 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 25 Nov 2011 13:04:24 +0100 Subject: [PATCH 209/486] s390(x) build fixes --- mozilla-589735.patch | 93 ++++++++++++++++++++++++++++++++++++++++++++ mozilla-680917.patch | 12 ++++++ xulrunner.spec | 21 ++++++++-- 3 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 mozilla-589735.patch create mode 100644 mozilla-680917.patch diff --git a/mozilla-589735.patch b/mozilla-589735.patch new file mode 100644 index 0000000..fdd34da --- /dev/null +++ b/mozilla-589735.patch @@ -0,0 +1,93 @@ +diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c +--- a/memory/jemalloc/jemalloc.c ++++ b/memory/jemalloc/jemalloc.c +@@ -2198,16 +2198,36 @@ pages_map_align(size_t size, int pfd, si + return (ret); + } + #endif + + static void * + pages_map(void *addr, size_t size, int pfd) + { + void *ret; ++#if defined(__ia64__) ++ /* ++ * The JS engine assumes that all allocated pointers have their high 17 bits clear, ++ * which ia64's mmap doesn't support directly. However, we can emulate it by passing ++ * mmap an "addr" parameter with those bits clear. The mmap will return that address, ++ * or the nearest available memory above that address, providing a near-guarantee ++ * that those bits are clear. If they are not, we return NULL below to indicate ++ * out-of-memory. ++ * ++ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual ++ * address space. ++ * ++ * See Bug 589735 for more information. ++ */ ++ bool check_placement = true; ++ if (addr == NULL) { ++ addr = (void*)0x0000070000000000; ++ check_placement = false; ++ } ++#endif + + /* + * We don't use MAP_FIXED here, because it can cause the *replacement* + * of existing mappings, and we only want to create new mappings. + */ + #ifdef MALLOC_PAGEFILE + if (pfd != -1) { + ret = mmap(addr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | +@@ -2217,34 +2237,52 @@ pages_map(void *addr, size_t size, int p + { + ret = mmap(addr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | + MAP_ANON, -1, 0); + } + assert(ret != NULL); + + if (ret == MAP_FAILED) + ret = NULL; ++#if defined(__ia64__) ++ /* ++ * If the allocated memory doesn't have its upper 17 bits clear, consider it ++ * as out of memory. ++ */ ++ else if ((long long)ret & 0xffff800000000000) { ++ munmap(ret, size); ++ ret = NULL; ++ } ++ /* If the caller requested a specific memory location, verify that's what mmap returned. */ ++ else if (check_placement && ret != addr) { ++#else + else if (addr != NULL && ret != addr) { ++#endif + /* + * We succeeded in mapping memory, but not in the right place. + */ + if (munmap(ret, size) == -1) { + char buf[STRERROR_BUF]; + + strerror_r(errno, buf, sizeof(buf)); + _malloc_message(_getprogname(), + ": (malloc) Error in munmap(): ", buf, "\n"); + if (opt_abort) + abort(); + } + ret = NULL; + } + ++#if defined(__ia64__) ++ assert(ret == NULL || (!check_placement && ret != NULL) ++ || (check_placement && ret == addr)); ++#else + assert(ret == NULL || (addr == NULL && ret != addr) + || (addr != NULL && ret == addr)); ++#endif + return (ret); + } + + static void + pages_unmap(void *addr, size_t size) + { + + if (munmap(addr, size) == -1) { diff --git a/mozilla-680917.patch b/mozilla-680917.patch new file mode 100644 index 0000000..b9b8859 --- /dev/null +++ b/mozilla-680917.patch @@ -0,0 +1,12 @@ +diff -up tip/js/src/yarr/BumpPointerAllocator.h.ia64-assert tip/js/src/yarr/BumpPointerAllocator.h +--- tip/js/src/yarr/BumpPointerAllocator.h.ia64-assert 2011-08-23 04:50:06.000000000 -0400 ++++ tip/js/src/yarr/BumpPointerAllocator.h 2011-08-23 04:50:12.000000000 -0400 +@@ -36,6 +36,8 @@ namespace WTF { + + #if WTF_CPU_SPARC + #define MINIMUM_BUMP_POOL_SIZE 0x2000 ++#elif WTF_CPU_IA64 ++#define MINIMUM_BUMP_POOL_SIZE 0x4000 + #else + #define MINIMUM_BUMP_POOL_SIZE 0x1000 + #endif diff --git a/xulrunner.spec b/xulrunner.spec index 34444fb..63abf16 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 8.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -81,6 +81,8 @@ Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch Patch36: mozilla-670719.patch Patch37: mozilla-686280.patch +Patch38: mozilla-589735.patch +Patch39: mozilla-680917.patch # --------------------------------------------------- @@ -205,6 +207,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch35 -p1 -b .NetworkManager09 %patch36 -p1 -b .670719 %patch37 -p1 -b .686280 +%patch38 -p1 -b .589735 +%patch39 -p1 -b .680917 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -212,9 +216,15 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %{__cat} %{SOURCE11} >> .mozconfig %endif -# Upstream bug filed without resolution -# for now make sure jit is not enabled on sparc64 -%ifarch sparc64 +# s390(x) fails to start with jemalloc enabled +%ifarch s390 s390x +echo "ac_add_options --disable-jemalloc" >> .mozconfig +%endif + +%ifnarch %{ix86} x86_64 +echo "ac_add_options --disable-methodjit" >> .mozconfig +echo "ac_add_options --disable-monoic" >> .mozconfig +echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif @@ -443,6 +453,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Nov 25 2011 Martin Stransky 8.0-2 +- s390 build fixes + * Mon Nov 7 2011 Martin Stransky 8.0-1 - Updated to 8.0 From 19e30bb8006f296ffff37c5f6802d1500b21338e Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 29 Nov 2011 15:28:06 +0100 Subject: [PATCH 210/486] Fixed s390x crash during installation --- mozilla-589735.patch | 93 -------------------------------------------- mozilla-680917.patch | 12 ------ mozilla-696393.patch | 71 +++++++++++++++++++++++++++++++++ xulrunner.spec | 9 ++--- 4 files changed, 75 insertions(+), 110 deletions(-) delete mode 100644 mozilla-589735.patch delete mode 100644 mozilla-680917.patch create mode 100644 mozilla-696393.patch diff --git a/mozilla-589735.patch b/mozilla-589735.patch deleted file mode 100644 index fdd34da..0000000 --- a/mozilla-589735.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c ---- a/memory/jemalloc/jemalloc.c -+++ b/memory/jemalloc/jemalloc.c -@@ -2198,16 +2198,36 @@ pages_map_align(size_t size, int pfd, si - return (ret); - } - #endif - - static void * - pages_map(void *addr, size_t size, int pfd) - { - void *ret; -+#if defined(__ia64__) -+ /* -+ * The JS engine assumes that all allocated pointers have their high 17 bits clear, -+ * which ia64's mmap doesn't support directly. However, we can emulate it by passing -+ * mmap an "addr" parameter with those bits clear. The mmap will return that address, -+ * or the nearest available memory above that address, providing a near-guarantee -+ * that those bits are clear. If they are not, we return NULL below to indicate -+ * out-of-memory. -+ * -+ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual -+ * address space. -+ * -+ * See Bug 589735 for more information. -+ */ -+ bool check_placement = true; -+ if (addr == NULL) { -+ addr = (void*)0x0000070000000000; -+ check_placement = false; -+ } -+#endif - - /* - * We don't use MAP_FIXED here, because it can cause the *replacement* - * of existing mappings, and we only want to create new mappings. - */ - #ifdef MALLOC_PAGEFILE - if (pfd != -1) { - ret = mmap(addr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | -@@ -2217,34 +2237,52 @@ pages_map(void *addr, size_t size, int p - { - ret = mmap(addr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | - MAP_ANON, -1, 0); - } - assert(ret != NULL); - - if (ret == MAP_FAILED) - ret = NULL; -+#if defined(__ia64__) -+ /* -+ * If the allocated memory doesn't have its upper 17 bits clear, consider it -+ * as out of memory. -+ */ -+ else if ((long long)ret & 0xffff800000000000) { -+ munmap(ret, size); -+ ret = NULL; -+ } -+ /* If the caller requested a specific memory location, verify that's what mmap returned. */ -+ else if (check_placement && ret != addr) { -+#else - else if (addr != NULL && ret != addr) { -+#endif - /* - * We succeeded in mapping memory, but not in the right place. - */ - if (munmap(ret, size) == -1) { - char buf[STRERROR_BUF]; - - strerror_r(errno, buf, sizeof(buf)); - _malloc_message(_getprogname(), - ": (malloc) Error in munmap(): ", buf, "\n"); - if (opt_abort) - abort(); - } - ret = NULL; - } - -+#if defined(__ia64__) -+ assert(ret == NULL || (!check_placement && ret != NULL) -+ || (check_placement && ret == addr)); -+#else - assert(ret == NULL || (addr == NULL && ret != addr) - || (addr != NULL && ret == addr)); -+#endif - return (ret); - } - - static void - pages_unmap(void *addr, size_t size) - { - - if (munmap(addr, size) == -1) { diff --git a/mozilla-680917.patch b/mozilla-680917.patch deleted file mode 100644 index b9b8859..0000000 --- a/mozilla-680917.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up tip/js/src/yarr/BumpPointerAllocator.h.ia64-assert tip/js/src/yarr/BumpPointerAllocator.h ---- tip/js/src/yarr/BumpPointerAllocator.h.ia64-assert 2011-08-23 04:50:06.000000000 -0400 -+++ tip/js/src/yarr/BumpPointerAllocator.h 2011-08-23 04:50:12.000000000 -0400 -@@ -36,6 +36,8 @@ namespace WTF { - - #if WTF_CPU_SPARC - #define MINIMUM_BUMP_POOL_SIZE 0x2000 -+#elif WTF_CPU_IA64 -+#define MINIMUM_BUMP_POOL_SIZE 0x4000 - #else - #define MINIMUM_BUMP_POOL_SIZE 0x1000 - #endif diff --git a/mozilla-696393.patch b/mozilla-696393.patch new file mode 100644 index 0000000..aed422c --- /dev/null +++ b/mozilla-696393.patch @@ -0,0 +1,71 @@ +diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp +--- mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 2011-11-04 22:34:23.000000000 +0100 ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp 2011-11-29 15:25:31.016899861 +0100 +@@ -200,56 +200,22 @@ invoke_copy_to_stack(PRUint32 paramCount + } + } + ++typedef nsresult (*vtable_func)(nsISupports *, PRUint32, PRUint32, PRUint32, PRUint32, double, double); ++ + EXPORT_XPCOM_API(nsresult) + NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, + PRUint32 paramCount, nsXPTCVariant* params) + { +- PRUint32 *vtable = *(PRUint32 **)that; +-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ +- PRUint32 method = vtable[methodIndex]; +-#else /* not G++ V3 ABI */ +- PRUint32 method = vtable[methodIndex + 2]; +-#endif /* G++ V3 ABI */ ++ vtable_func *vtable = *reinterpret_cast(that); ++ vtable_func method = vtable[methodIndex]; + PRUint32 overflow = invoke_count_words (paramCount, params); +- PRUint32 result; ++ PRUint32 *stack_space = reinterpret_cast(__builtin_alloca((overflow + 8 /* 4 32-bits gpr + 2 64-bits fpr */) * 4)); ++ ++ invoke_copy_to_stack(paramCount, params, stack_space, overflow); ++ ++ PRUint32 *d_gpr = stack_space + overflow; ++ double *d_fpr = reinterpret_cast(d_gpr + 4); + +- __asm__ __volatile__ +- ( +- "lr 7,15\n\t" +- "ahi 7,-32\n\t" +- +- "lr 3,%3\n\t" +- "sll 3,2\n\t" +- "lcr 3,3\n\t" +- "l 2,0(15)\n\t" +- "la 15,0(3,7)\n\t" +- "st 2,0(15)\n\t" +- +- "lr 2,%1\n\t" +- "lr 3,%2\n\t" +- "la 4,96(15)\n\t" +- "lr 5,%3\n\t" +- "basr 14,%4\n\t" +- +- "lr 2,%5\n\t" +- "ld 0,112(7)\n\t" +- "ld 2,120(7)\n\t" +- "lm 3,6,96(7)\n\t" +- "basr 14,%6\n\t" +- +- "la 15,32(7)\n\t" +- +- "lr %0,2\n\t" +- : "=r" (result) +- : "r" (paramCount), +- "r" (params), +- "r" (overflow), +- "a" (invoke_copy_to_stack), +- "a" (that), +- "a" (method) +- : "2", "3", "4", "5", "6", "7", "14", "cc", "memory", "%f0", "%f2" +- ); +- +- return result; ++ return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1]); + } + diff --git a/xulrunner.spec b/xulrunner.spec index 63abf16..ea9ef77 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -81,8 +81,8 @@ Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch Patch36: mozilla-670719.patch Patch37: mozilla-686280.patch -Patch38: mozilla-589735.patch -Patch39: mozilla-680917.patch +Patch38: mozilla-696393.patch + # --------------------------------------------------- @@ -207,8 +207,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch35 -p1 -b .NetworkManager09 %patch36 -p1 -b .670719 %patch37 -p1 -b .686280 -%patch38 -p1 -b .589735 -%patch39 -p1 -b .680917 +%patch38 -p1 -b .696393 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -453,7 +452,7 @@ fi #--------------------------------------------------------------------- %changelog -* Fri Nov 25 2011 Martin Stransky 8.0-2 +* Fri Nov 25 2011 Martin Stransky 8.0-3 - s390 build fixes * Mon Nov 7 2011 Martin Stransky 8.0-1 From 9e7af0f05dc83379e7d59434878ad6e928b81230 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 29 Nov 2011 15:31:24 +0100 Subject: [PATCH 211/486] Forgot to bump release --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ea9ef77..f5c4937 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 8.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet From d75019a09944bdd19b7a2f1d85c5756860c5835a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 2 Dec 2011 16:12:31 +0100 Subject: [PATCH 212/486] Fixed s390x patch by Martin Stransky --- mozilla-696393.patch | 78 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/mozilla-696393.patch b/mozilla-696393.patch index aed422c..66614ac 100644 --- a/mozilla-696393.patch +++ b/mozilla-696393.patch @@ -1,6 +1,6 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp ---- mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 2011-11-04 22:34:23.000000000 +0100 -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp 2011-11-29 15:25:31.016899861 +0100 +--- mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 2011-11-04 17:34:23.000000000 -0400 ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp 2011-12-01 12:25:09.947558444 -0500 @@ -200,56 +200,22 @@ invoke_copy_to_stack(PRUint32 paramCount } } @@ -69,3 +69,77 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390 + return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1]); } +diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp +--- mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 2011-11-04 17:34:23.000000000 -0400 ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp 2011-12-02 09:33:06.717556519 -0500 +@@ -194,59 +194,23 @@ invoke_copy_to_stack(PRUint32 paramCount + } + } + ++typedef nsresult (*vtable_func)(nsISupports *, PRUint64, PRUint64, PRUint64, PRUint64, double, double, double, double); ++ + EXPORT_XPCOM_API(nsresult) + NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, + PRUint32 paramCount, nsXPTCVariant* params) + { +- PRUint64 *vtable = *(PRUint64 **)that; +-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ +- PRUint64 method = vtable[methodIndex]; +-#else /* not G++ V3 ABI */ +- PRUint64 method = vtable[methodIndex + 2]; +-#endif /* G++ V3 ABI */ ++ vtable_func *vtable = *reinterpret_cast(that); ++ vtable_func method = vtable[methodIndex]; + PRUint64 overflow = invoke_count_words (paramCount, params); ++ PRUint64 *stack_space = reinterpret_cast(__builtin_alloca((overflow + 8 /* 4 64-bits gpr + 4 64-bits fpr */) * 8)); + PRUint64 result; + +- __asm__ __volatile__ +- ( +- "lgr 7,15\n\t" +- "aghi 7,-64\n\t" +- +- "lgr 3,%3\n\t" +- "sllg 3,3,3\n\t" +- "lcgr 3,3\n\t" +- "lg 2,0(15)\n\t" +- "la 15,0(3,7)\n\t" +- "stg 2,0(15)\n\t" +- +- "lgr 2,%1\n\t" +- "lgr 3,%2\n\t" +- "la 4,160(15)\n\t" +- "lgr 5,%3\n\t" +- "basr 14,%4\n\t" +- +- "lgr 2,%5\n\t" +- "ld 0,192(7)\n\t" +- "ld 2,200(7)\n\t" +- "ld 4,208(7)\n\t" +- "ld 6,216(7)\n\t" +- "lmg 3,6,160(7)\n\t" +- "basr 14,%6\n\t" +- +- "la 15,64(7)\n\t" +- +- "lgr %0,2\n\t" +- : "=r" (result) +- : "r" ((PRUint64)paramCount), +- "r" (params), +- "r" (overflow), +- "a" (invoke_copy_to_stack), +- "a" (that), +- "a" (method) +- : "2", "3", "4", "5", "6", "7", "14", "cc", "memory", +- "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7" +- ); +- +- return result; ++ invoke_copy_to_stack(paramCount, params, stack_space, overflow); ++ ++ PRUint64 *d_gpr = stack_space + overflow; ++ double *d_fpr = reinterpret_cast(d_gpr + 4); ++ ++ return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1], d_fpr[2], d_fpr[3]); + } + From 1b7aac2d529262dbf666f799f6722c35c8b98f44 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 6 Dec 2011 14:45:43 -0500 Subject: [PATCH 213/486] fix bug in npapi.h causing compile failures --- xulrunner-8.0-fix-maemo-checks-in-npapi.patch | 21 +++++++++++++++++++ xulrunner.spec | 8 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 xulrunner-8.0-fix-maemo-checks-in-npapi.patch diff --git a/xulrunner-8.0-fix-maemo-checks-in-npapi.patch b/xulrunner-8.0-fix-maemo-checks-in-npapi.patch new file mode 100644 index 0000000..99c9b7f --- /dev/null +++ b/xulrunner-8.0-fix-maemo-checks-in-npapi.patch @@ -0,0 +1,21 @@ +diff -up mozilla-release/dom/plugins/base/npapi.h.BAD mozilla-release/dom/plugins/base/npapi.h +--- mozilla-release/dom/plugins/base/npapi.h.BAD 2011-12-06 13:31:16.364405916 -0500 ++++ mozilla-release/dom/plugins/base/npapi.h 2011-12-06 13:31:47.131109006 -0500 +@@ -379,7 +379,7 @@ typedef enum { + , NPPVpluginCoreAnimationLayer = 1003 + #endif + +-#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) ++#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) + , NPPVpluginWindowlessLocalBool = 2002 + #endif + } NPPVariable; +@@ -432,7 +432,7 @@ typedef enum { + , NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports + CA model compositing */ + #endif +-#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) ++#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) + , NPNVSupportsWindowlessLocal = 2002 + #endif + } NPNVariable; diff --git a/xulrunner.spec b/xulrunner.spec index f5c4937..3097cbf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 8.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -82,6 +82,8 @@ Patch35: xulrunner-2.0-NetworkManager09.patch Patch36: mozilla-670719.patch Patch37: mozilla-686280.patch Patch38: mozilla-696393.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=707993 +Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch # --------------------------------------------------- @@ -208,6 +210,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch36 -p1 -b .670719 %patch37 -p1 -b .686280 %patch38 -p1 -b .696393 +%patch39 -p1 -b .707993 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -452,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 6 2011 Tom Callaway 8.0-4 +- fix bug in npapi.h causing compile failures + * Fri Nov 25 2011 Martin Stransky 8.0-3 - s390 build fixes From 87370169344c81d3cfb684f0df096864b937e154 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 6 Dec 2011 14:46:03 -0500 Subject: [PATCH 214/486] fix bug in npapi.h causing compile failures --- xulrunner-8.0-fix-maemo-checks-in-npapi.patch | 21 +++++++++++++++++++ xulrunner.spec | 8 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 xulrunner-8.0-fix-maemo-checks-in-npapi.patch diff --git a/xulrunner-8.0-fix-maemo-checks-in-npapi.patch b/xulrunner-8.0-fix-maemo-checks-in-npapi.patch new file mode 100644 index 0000000..99c9b7f --- /dev/null +++ b/xulrunner-8.0-fix-maemo-checks-in-npapi.patch @@ -0,0 +1,21 @@ +diff -up mozilla-release/dom/plugins/base/npapi.h.BAD mozilla-release/dom/plugins/base/npapi.h +--- mozilla-release/dom/plugins/base/npapi.h.BAD 2011-12-06 13:31:16.364405916 -0500 ++++ mozilla-release/dom/plugins/base/npapi.h 2011-12-06 13:31:47.131109006 -0500 +@@ -379,7 +379,7 @@ typedef enum { + , NPPVpluginCoreAnimationLayer = 1003 + #endif + +-#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) ++#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) + , NPPVpluginWindowlessLocalBool = 2002 + #endif + } NPPVariable; +@@ -432,7 +432,7 @@ typedef enum { + , NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports + CA model compositing */ + #endif +-#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) ++#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) + , NPNVSupportsWindowlessLocal = 2002 + #endif + } NPNVariable; diff --git a/xulrunner.spec b/xulrunner.spec index f5c4937..3097cbf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 8.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -82,6 +82,8 @@ Patch35: xulrunner-2.0-NetworkManager09.patch Patch36: mozilla-670719.patch Patch37: mozilla-686280.patch Patch38: mozilla-696393.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=707993 +Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch # --------------------------------------------------- @@ -208,6 +210,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch36 -p1 -b .670719 %patch37 -p1 -b .686280 %patch38 -p1 -b .696393 +%patch39 -p1 -b .707993 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -452,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 6 2011 Tom Callaway 8.0-4 +- fix bug in npapi.h causing compile failures + * Fri Nov 25 2011 Martin Stransky 8.0-3 - s390 build fixes From 24b44d7ae4103a0d015d21423199a6864e7daf97 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 6 Dec 2011 14:46:18 -0500 Subject: [PATCH 215/486] fix bug in npapi.h causing compile failures --- xulrunner.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index f5c4937..3097cbf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 8.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -82,6 +82,8 @@ Patch35: xulrunner-2.0-NetworkManager09.patch Patch36: mozilla-670719.patch Patch37: mozilla-686280.patch Patch38: mozilla-696393.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=707993 +Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch # --------------------------------------------------- @@ -208,6 +210,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch36 -p1 -b .670719 %patch37 -p1 -b .686280 %patch38 -p1 -b .696393 +%patch39 -p1 -b .707993 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -452,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 6 2011 Tom Callaway 8.0-4 +- fix bug in npapi.h causing compile failures + * Fri Nov 25 2011 Martin Stransky 8.0-3 - s390 build fixes From 664bec7287ce4d06cc9b774d663264fc2c360357 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 6 Dec 2011 14:57:27 -0500 Subject: [PATCH 216/486] fix bug in npapi.h causing compile failures --- xulrunner-8.0-fix-maemo-checks-in-npapi.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 xulrunner-8.0-fix-maemo-checks-in-npapi.patch diff --git a/xulrunner-8.0-fix-maemo-checks-in-npapi.patch b/xulrunner-8.0-fix-maemo-checks-in-npapi.patch new file mode 100644 index 0000000..99c9b7f --- /dev/null +++ b/xulrunner-8.0-fix-maemo-checks-in-npapi.patch @@ -0,0 +1,21 @@ +diff -up mozilla-release/dom/plugins/base/npapi.h.BAD mozilla-release/dom/plugins/base/npapi.h +--- mozilla-release/dom/plugins/base/npapi.h.BAD 2011-12-06 13:31:16.364405916 -0500 ++++ mozilla-release/dom/plugins/base/npapi.h 2011-12-06 13:31:47.131109006 -0500 +@@ -379,7 +379,7 @@ typedef enum { + , NPPVpluginCoreAnimationLayer = 1003 + #endif + +-#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) ++#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) + , NPPVpluginWindowlessLocalBool = 2002 + #endif + } NPPVariable; +@@ -432,7 +432,7 @@ typedef enum { + , NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports + CA model compositing */ + #endif +-#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) ++#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) + , NPNVSupportsWindowlessLocal = 2002 + #endif + } NPNVariable; From f4329e27201095bb379149283fd227ebc1076f7f Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 7 Dec 2011 13:11:15 +0100 Subject: [PATCH 217/486] Gnome 3 proxy honoured now: mozbz#682832 --- mozilla-682832-proxy.patch | 358 +++++++++++++++++++++++++++++++++++++ xulrunner.spec | 8 +- 2 files changed, 364 insertions(+), 2 deletions(-) create mode 100644 mozilla-682832-proxy.patch diff --git a/mozilla-682832-proxy.patch b/mozilla-682832-proxy.patch new file mode 100644 index 0000000..076b2a6 --- /dev/null +++ b/mozilla-682832-proxy.patch @@ -0,0 +1,358 @@ +diff -up mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp +--- mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 2011-11-04 22:34:19.000000000 +0100 ++++ mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp 2011-12-07 11:36:29.302312405 +0100 +@@ -42,6 +42,8 @@ + #include "nsMemory.h" + #include "prlink.h" + #include "nsComponentManagerUtils.h" ++#include "nsIMutableArray.h" ++#include "nsISupportsPrimitives.h" + + #include + #include +@@ -56,6 +58,7 @@ typedef struct _GVariant GVariant; + # define G_VARIANT_TYPE_STRING ((const GVariantType *) "s") + # define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o") + # define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g") ++# define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as") + #endif + + #define GSETTINGS_FUNCTIONS \ +@@ -68,6 +71,7 @@ typedef struct _GVariant GVariant; + FUNC(g_variant_get_int32, gint32, (GVariant* variant)) \ + FUNC(g_variant_get_boolean, gboolean, (GVariant* variant)) \ + FUNC(g_variant_get_string, const char *, (GVariant* value, gsize* length)) \ ++ FUNC(g_variant_get_strv, const char **, (GVariant* value, gsize* length)) \ + FUNC(g_variant_is_of_type, gboolean, (GVariant* value, const GVariantType* type)) \ + FUNC(g_variant_new_int32, GVariant *, (gint32 value)) \ + FUNC(g_variant_new_boolean, GVariant *, (gboolean value)) \ +@@ -91,6 +95,7 @@ GSETTINGS_FUNCTIONS + #define g_variant_get_int32 _g_variant_get_int32 + #define g_variant_get_boolean _g_variant_get_boolean + #define g_variant_get_string _g_variant_get_string ++#define g_variant_get_strv _g_variant_get_strv + #define g_variant_is_of_type _g_variant_is_of_type + #define g_variant_new_int32 _g_variant_new_int32 + #define g_variant_new_boolean _g_variant_new_boolean +@@ -263,6 +268,49 @@ nsGSettingsCollection::GetInt(const nsAC + return NS_OK; + } + ++NS_IMETHODIMP ++nsGSettingsCollection::GetStringList(const nsACString& aKey, nsIArray** aResult) ++{ ++ if (!KeyExists(aKey)) ++ return NS_ERROR_INVALID_ARG; ++ ++ nsCOMPtr items(do_CreateInstance(NS_ARRAY_CONTRACTID)); ++ if (!items) { ++ return NS_ERROR_OUT_OF_MEMORY; ++ } ++ ++ GVariant *value = g_settings_get_value(mSettings, ++ PromiseFlatCString(aKey).get()); ++ ++ if (!g_variant_is_of_type(value, G_VARIANT_TYPE_STRING_ARRAY)) { ++ g_variant_unref(value); ++ return NS_ERROR_FAILURE; ++ } ++ ++ const gchar ** gs_strings = g_variant_get_strv(value, NULL); ++ if (!gs_strings) { ++ // empty array ++ NS_ADDREF(*aResult = items); ++ g_variant_unref(value); ++ return NS_OK; ++ } ++ ++ const gchar** p_gs_strings = gs_strings; ++ while (*p_gs_strings != NULL) ++ { ++ nsCOMPtr obj(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID)); ++ if (obj) { ++ obj->SetData(nsDependentCString(*p_gs_strings)); ++ items->AppendElement(obj, false); ++ } ++ p_gs_strings++; ++ } ++ g_free(gs_strings); ++ NS_ADDREF(*aResult = items); ++ g_variant_unref(value); ++ return NS_OK; ++} ++ + nsresult + nsGSettingsService::Init() + { +diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +--- mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 2011-11-04 22:34:19.000000000 +0100 ++++ mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2011-12-07 11:40:48.432502399 +0100 +@@ -49,6 +49,7 @@ + #include "nsPrintfCString.h" + #include "nsNetUtil.h" + #include "nsISupportsPrimitives.h" ++#include "nsIGSettingsService.h" + + class nsUnixSystemProxySettings : public nsISystemProxySettings { + public: +@@ -62,9 +63,12 @@ private: + ~nsUnixSystemProxySettings() {} + + nsCOMPtr mGConf; ++ nsCOMPtr mGSettings; + PRBool IsProxyMode(const char* aMode); + nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult); + nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); ++ nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); ++ nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult); + }; + + NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings) +@@ -73,6 +77,7 @@ nsresult + nsUnixSystemProxySettings::Init() + { + mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); ++ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); + return NS_OK; + } + +@@ -87,14 +92,30 @@ nsUnixSystemProxySettings::IsProxyMode(c + nsresult + nsUnixSystemProxySettings::GetPACURI(nsACString& aResult) + { +- if (!mGConf || !IsProxyMode("auto")) { +- // Return an empty string in this case +- aResult.Truncate(); +- return NS_OK; ++ if (mGSettings) { ++ nsCOMPtr proxy_settings; ++ mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), ++ getter_AddRefs(proxy_settings)); ++ if (proxy_settings) { ++ nsCString proxyMode; ++ // Check if mode is auto ++ nsresult rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode); ++ if (rv == NS_OK && proxyMode.Equals("auto")) { ++ return proxy_settings->GetString(NS_LITERAL_CSTRING("autoconfig-url"), aResult); ++ } ++ /* The org.gnome.system.proxy schema has been found, but auto mode is not set. ++ * Don't try the GConf and return empty string. */ ++ aResult.Truncate(); ++ return NS_OK; ++ } + } +- +- return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"), +- aResult); ++ if (mGConf && IsProxyMode("auto")) { ++ return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"), ++ aResult); ++ } ++ // Return an empty string when auto mode is not set. ++ aResult.Truncate(); ++ return NS_OK; + } + + static PRBool +@@ -231,7 +252,38 @@ nsUnixSystemProxySettings::SetProxyResul + PRInt32 port; + rv = mGConf->GetInt(portKey, &port); + NS_ENSURE_SUCCESS(rv, rv); ++ ++ /* When port is 0, proxy is not considered as enabled even if host is set. */ ++ if (port == 0) ++ return NS_ERROR_FAILURE; ++ ++ SetProxyResult(aType, host, port, aResult); ++ return NS_OK; ++} ++ ++nsresult ++nsUnixSystemProxySettings::SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, ++ nsACString& aResult) ++{ ++ nsCOMPtr proxy_settings; ++ nsresult rv = mGSettings->GetCollectionForSchema(nsDependentCString(aKeyBase), ++ getter_AddRefs(proxy_settings)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ nsCAutoString host; ++ rv = proxy_settings->GetString(NS_LITERAL_CSTRING("host"), host); ++ NS_ENSURE_SUCCESS(rv, rv); ++ if (host.IsEmpty()) ++ return NS_ERROR_FAILURE; ++ ++ PRInt32 port; ++ rv = proxy_settings->GetInt(NS_LITERAL_CSTRING("port"), &port); ++ NS_ENSURE_SUCCESS(rv, rv); + ++ /* When port is 0, proxy is not considered as enabled even if host is set. */ ++ if (port == 0) ++ return NS_ERROR_FAILURE; ++ + SetProxyResult(aType, host, port, aResult); + return NS_OK; + } +@@ -271,17 +323,17 @@ static PRBool ConvertToIPV6Addr(const ns + PRIPv6Addr* aAddr) + { + PRNetAddr addr; ++ // try to convert hostname to IP + if (PR_StringToNetAddr(PromiseFlatCString(aName).get(), &addr) != PR_SUCCESS) + return PR_FALSE; + +- PRIPv6Addr ipv6; + // convert parsed address to IPv6 + if (addr.raw.family == PR_AF_INET) { + // convert to IPv4-mapped address +- PR_ConvertIPv4AddrToIPv6(addr.inet.ip, &ipv6); ++ PR_ConvertIPv4AddrToIPv6(addr.inet.ip, aAddr); + } else if (addr.raw.family == PR_AF_INET6) { + // copy the address +- memcpy(&ipv6, &addr.ipv6.ip, sizeof(PRIPv6Addr)); ++ memcpy(aAddr, &addr.ipv6.ip, sizeof(PRIPv6Addr)); + } else { + return PR_FALSE; + } +@@ -289,8 +341,8 @@ static PRBool ConvertToIPV6Addr(const ns + return PR_TRUE; + } + +-static PRBool GConfIgnoreHost(const nsACString& aIgnore, +- const nsACString& aHost) ++static bool HostIgnoredByProxy(const nsACString& aIgnore, ++ const nsACString& aHost) + { + if (aIgnore.Equals(aHost, nsCaseInsensitiveCStringComparator())) + return PR_TRUE; +@@ -321,8 +373,9 @@ static PRBool GConfIgnoreHost(const nsAC + slash = end; + } + ++ nsDependentCSubstring ignoreStripped(start, slash); + PRIPv6Addr ignoreAddr, hostAddr; +- if (!ConvertToIPV6Addr(aIgnore, &ignoreAddr) || ++ if (!ConvertToIPV6Addr(ignoreStripped, &ignoreAddr) || + !ConvertToIPV6Addr(aHost, &hostAddr)) + return PR_FALSE; + +@@ -355,7 +408,7 @@ nsUnixSystemProxySettings::GetProxyFromG + if (str) { + nsAutoString s; + if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) { +- if (GConfIgnoreHost(NS_ConvertUTF16toUTF8(s), aHost)) { ++ if (HostIgnoredByProxy(NS_ConvertUTF16toUTF8(s), aHost)) { + aResult.AppendLiteral("DIRECT"); + return NS_OK; + } +@@ -392,6 +445,71 @@ nsUnixSystemProxySettings::GetProxyFromG + } + + nsresult ++nsUnixSystemProxySettings::GetProxyFromGSettings(const nsACString& aScheme, ++ const nsACString& aHost, ++ PRInt32 aPort, ++ nsACString& aResult) ++{ ++ nsCOMPtr proxy_settings; ++ nsresult rv; ++ ++ rv = mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), ++ getter_AddRefs(proxy_settings)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ nsCString proxyMode; ++ rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ if (!proxyMode.Equals("manual")) { ++ aResult.AppendLiteral("DIRECT"); ++ return NS_OK; ++ } ++ ++ nsCOMPtr ignoreList; ++ if (NS_SUCCEEDED(proxy_settings->GetStringList(NS_LITERAL_CSTRING("ignore-hosts"), ++ getter_AddRefs(ignoreList))) && ignoreList) { ++ PRUint32 len = 0; ++ ignoreList->GetLength(&len); ++ for (PRUint32 i = 0; i < len; ++i) { ++ nsCOMPtr str = do_QueryElementAt(ignoreList, i); ++ if (str) { ++ nsCString s; ++ if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) { ++ if (HostIgnoredByProxy(s, aHost)) { ++ aResult.AppendLiteral("DIRECT"); ++ return NS_OK; ++ } ++ } ++ } ++ } ++ } ++ ++ if (aScheme.LowerCaseEqualsLiteral("http")) { ++ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult); ++ } else if (aScheme.LowerCaseEqualsLiteral("https")) { ++ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.https", "PROXY", aResult); ++ /* Try to use HTTP proxy when HTTPS proxy is not explicitly defined */ ++ if (rv != NS_OK) ++ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult); ++ } else if (aScheme.LowerCaseEqualsLiteral("ftp")) { ++ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.ftp", "PROXY", aResult); ++ } else { ++ rv = NS_ERROR_FAILURE; ++ } ++ if (rv != NS_OK) { ++ /* If proxy for scheme is not specified, use SOCKS proxy for all schemes */ ++ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.socks", "SOCKS", aResult); ++ } ++ ++ if (NS_FAILED(rv)) { ++ aResult.AppendLiteral("DIRECT"); ++ } ++ ++ return NS_OK; ++} ++ ++nsresult + nsUnixSystemProxySettings::GetProxyForURI(nsIURI* aURI, nsACString& aResult) + { + nsCAutoString scheme; +@@ -406,10 +524,15 @@ nsUnixSystemProxySettings::GetProxyForUR + rv = aURI->GetPort(&port); + NS_ENSURE_SUCCESS(rv, rv); + +- if (!mGConf) +- return GetProxyFromEnvironment(scheme, host, port, aResult); ++ if (mGSettings) { ++ rv = GetProxyFromGSettings(scheme, host, port, aResult); ++ if (rv == NS_OK) ++ return rv; ++ } ++ if (mGConf) ++ return GetProxyFromGConf(scheme, host, port, aResult); + +- return GetProxyFromGConf(scheme, host, port, aResult); ++ return GetProxyFromEnvironment(scheme, host, port, aResult); + } + + #define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\ +diff -up mozilla-release/xpcom/system/nsIGSettingsService.idl.682832 mozilla-release/xpcom/system/nsIGSettingsService.idl +--- mozilla-release/xpcom/system/nsIGSettingsService.idl.682832 2011-11-04 22:34:23.000000000 +0100 ++++ mozilla-release/xpcom/system/nsIGSettingsService.idl 2011-12-07 11:32:37.976256951 +0100 +@@ -39,7 +39,7 @@ + #include "nsISupports.idl" + #include "nsIArray.idl" + +-[scriptable, uuid(09637d3c-3c07-40b4-aff9-1d2a0f046f3c)] ++[scriptable, uuid(16d5b0ed-e756-4f1b-a8ce-9132e869acd8)] + interface nsIGSettingsCollection : nsISupports + { + void setString(in AUTF8String key, in AUTF8String value); +@@ -48,6 +48,7 @@ interface nsIGSettingsCollection : nsISu + AUTF8String getString(in AUTF8String key); + boolean getBoolean(in AUTF8String key); + long getInt(in AUTF8String key); ++ nsIArray getStringList(in AUTF8String key); + }; + + [scriptable, uuid(849c088b-57d1-4f24-b7b2-3dc4acb04c0a)] diff --git a/xulrunner.spec b/xulrunner.spec index 3097cbf..60c051d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,7 +50,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 8.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -84,7 +84,7 @@ Patch37: mozilla-686280.patch Patch38: mozilla-696393.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=707993 Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch - +Patch40: mozilla-682832-proxy.patch # --------------------------------------------------- @@ -211,6 +211,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch37 -p1 -b .686280 %patch38 -p1 -b .696393 %patch39 -p1 -b .707993 +%patch40 -p1 -b .682832 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -455,6 +456,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Dec 7 2011 Jan Horak - 8.0-5 +- Gnome 3 proxy settings are now honoured (mozbz#682832) + * Tue Dec 6 2011 Tom Callaway 8.0-4 - fix bug in npapi.h causing compile failures From f6111dd58d4392f05ca7ff454544ae43d58773e0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 Dec 2011 15:20:30 +0100 Subject: [PATCH 218/486] Updated to 9.0 Beta 5 --- ...bed-8.0.patch => add-gtkmozembed-9.0.patch | 280 ++++++++++-------- mozilla-193-pkgconfig.patch | 20 -- mozilla-670719.patch | 53 ---- mozilla-686280.patch | 25 -- mozilla-696393.patch | 58 ++-- ...patch => xulrunner-9.0-secondary-ipc.patch | 32 +- xulrunner.spec | 23 +- 7 files changed, 210 insertions(+), 281 deletions(-) rename add-gtkmozembed-8.0.patch => add-gtkmozembed-9.0.patch (94%) delete mode 100644 mozilla-670719.patch delete mode 100644 mozilla-686280.patch rename xulrunner-6.0-secondary-ipc.patch => xulrunner-9.0-secondary-ipc.patch (53%) diff --git a/add-gtkmozembed-8.0.patch b/add-gtkmozembed-9.0.patch similarity index 94% rename from add-gtkmozembed-8.0.patch rename to add-gtkmozembed-9.0.patch index 090f132..1ba11e4 100644 --- a/add-gtkmozembed-8.0.patch +++ b/add-gtkmozembed-9.0.patch @@ -1,6 +1,6 @@ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-10-11 15:32:56.211500043 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2011-10-11 15:32:56.211500043 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-12-09 14:55:38.370423755 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2011-12-09 14:55:38.370423755 +0100 @@ -0,0 +1,54 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -56,9 +56,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembe +endif + +include $(topsrcdir)/config/rules.mk -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-10-11 15:32:56.212500050 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-10-11 15:32:56.212500050 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-12-09 14:55:38.370423755 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-12-09 14:55:38.371423759 +0100 @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -313,9 +313,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates. + return NS_OK; +} + -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-10-11 15:32:56.213500057 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2011-10-11 15:32:56.213500057 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-12-09 14:55:38.371423759 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2011-12-09 14:55:38.371423759 +0100 @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -401,9 +401,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates. + nsCOMPtr mPIPStringBundle; +}; +#endif /* __EmbedCertificates_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-10-11 15:32:56.214500063 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-10-11 15:32:56.214500063 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-12-09 14:55:38.371423759 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-12-09 14:55:38.371423759 +0100 @@ -0,0 +1,156 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -561,9 +561,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen + return NS_ERROR_NOT_IMPLEMENTED; +} + -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-10-11 15:32:56.217500082 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2011-10-11 15:32:56.217500082 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-12-09 14:55:38.371423759 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2011-12-09 14:55:38.372423763 +0100 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -631,9 +631,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen +}; + +#endif /* __EmbedContentListener_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-10-11 15:32:56.219500096 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-10-11 15:32:56.219500096 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-12-09 14:55:38.372423763 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-12-09 14:55:38.372423763 +0100 @@ -0,0 +1,618 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1253,9 +1253,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuIn + mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; + return NS_OK; +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-10-11 15:32:56.222500116 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-10-11 15:32:56.222500116 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-12-09 14:55:38.372423763 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-12-09 14:55:38.372423763 +0100 @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1358,9 +1358,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuIn + nsString mCtxDocTitle; +}; // class EmbedContextMenuInfo +#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-10-11 15:32:56.223500122 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-10-11 19:12:12.742427564 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-12-09 14:55:38.373423767 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-12-09 14:55:38.373423767 +0100 @@ -0,0 +1,280 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1642,9 +1642,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener + NS_ERROR("Unexpected event type"); + return NS_OK; +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-10-11 15:32:56.225500136 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2011-10-11 16:13:11.417521103 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-12-09 14:55:38.373423767 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2011-12-09 14:55:38.373423767 +0100 @@ -0,0 +1,89 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1735,9 +1735,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +}; + +#endif /* __EmbedEventListener_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-10-11 15:32:56.226500143 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-10-11 15:32:56.226500143 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-12-09 14:55:38.374423771 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-12-09 14:55:38.374423771 +0100 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ @@ -1827,9 +1827,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp. + NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); + return docShell->GetContentViewer(aViewer); +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-10-11 15:32:56.227500150 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2011-10-11 15:32:56.227500150 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-12-09 14:55:38.375423775 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2011-12-09 14:55:38.375423775 +0100 @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -1898,9 +1898,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gt +GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); + +#endif /* __EmbedTools_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-10-11 15:32:56.230500171 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-10-11 19:01:06.189128684 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-12-09 14:55:38.375423775 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-12-09 14:55:38.375423775 +0100 @@ -0,0 +1,1016 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -2918,9 +2918,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g + gtk_widget_destroy(sOffscreenWindow); + sOffscreenWindow = 0; +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-10-11 15:32:56.233500190 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2011-10-11 15:32:56.233500190 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-12-09 14:55:38.376423779 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2011-12-09 14:55:38.376423779 +0100 @@ -0,0 +1,188 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3110,9 +3110,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtk +}; + +#endif /* __EmbedPrivate_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-10-11 15:32:56.234500196 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2011-10-11 15:32:56.235500203 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-12-09 14:55:38.376423779 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2011-12-09 14:55:38.376423779 +0100 @@ -0,0 +1,215 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3329,9 +3329,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp. + + uri->GetSpec(aString); +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-10-11 15:32:56.235500203 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2011-10-11 15:32:56.235500203 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-12-09 14:55:38.376423779 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2011-12-09 14:55:38.376423779 +0100 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3399,9 +3399,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gt +}; + +#endif /* __EmbedProgress_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-10-11 15:32:56.237500217 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-10-11 15:32:56.237500217 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-12-09 14:55:38.377423783 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-12-09 14:55:38.377423783 +0100 @@ -0,0 +1,411 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3814,9 +3814,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp. + } + } +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-10-11 15:32:56.238500224 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2011-10-11 15:32:56.238500224 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-12-09 14:55:38.377423783 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2011-12-09 14:55:38.377423783 +0100 @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3931,9 +3931,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gt + GtkWidget *mComboBox; + GtkWidget *mCheckBox; +}; -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-10-11 15:32:56.243500258 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2011-10-11 15:32:56.243500258 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-12-09 14:55:38.377423783 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2011-12-09 14:55:38.377423783 +0100 @@ -0,0 +1,474 @@ +/* + * vim:ts=2:et:sw=2 @@ -4409,9 +4409,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gt + + return rv; +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-10-11 15:32:56.245500270 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-10-11 15:32:56.245500270 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-12-09 14:55:38.378423787 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-12-09 14:55:38.378423787 +0100 @@ -0,0 +1,106 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4519,9 +4519,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator + + return NS_ERROR_FAILURE; +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-10-11 15:32:56.246500277 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-10-11 15:32:56.246500277 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-12-09 14:55:38.378423787 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-12-09 14:55:38.378423787 +0100 @@ -0,0 +1,54 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4577,9 +4577,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator +}; + +#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-10-11 15:32:56.248500291 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2011-10-11 15:32:56.248500291 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-12-09 14:55:38.378423787 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2011-12-09 14:55:38.378423787 +0100 @@ -0,0 +1,101 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4682,9 +4682,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkm + + +#endif /* __EmbedWindow_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-10-11 15:32:56.250500305 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-10-11 15:32:56.250500305 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-12-09 14:55:38.379423791 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-12-09 14:55:38.379423791 +0100 @@ -0,0 +1,1132 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5818,9 +5818,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.g + aNewEmbed, aChromeFlags); + +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-10-11 15:32:56.253500325 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-10-11 15:32:56.253500325 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-12-09 14:55:38.379423791 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-12-09 14:55:38.379423791 +0100 @@ -0,0 +1,116 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5938,9 +5938,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.c + return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); +} + -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-10-11 15:32:56.255500339 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2011-10-11 15:32:56.255500339 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-12-09 14:55:38.380423795 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2011-12-09 14:55:38.380423795 +0100 @@ -0,0 +1,287 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6229,9 +6229,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkm +#endif /* __cplusplus */ + +#endif /* gtkmozembed_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-10-11 15:32:56.256500346 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-10-11 15:32:56.256500346 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-12-09 14:55:38.380423795 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-12-09 14:55:38.380423795 +0100 @@ -0,0 +1,70 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6303,9 +6303,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_intern + +#endif /* gtkmozembed_internal_h */ + -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-10-11 15:32:56.259500366 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-10-11 15:32:56.259500366 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-12-09 14:55:38.380423795 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-12-09 14:55:38.380423795 +0100 @@ -0,0 +1,34 @@ +BOOL:STRING +BOOL:STRING,STRING @@ -6341,9 +6341,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal +BOOL:POINTER +VOID:POINTER +BOOL:STRING,STRING,POINTER -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-10-11 15:32:56.262500386 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-10-11 15:32:56.262500386 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-12-09 14:55:38.380423795 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-12-09 14:55:38.381423799 +0100 @@ -0,0 +1,91 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6436,9 +6436,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate +#endif /* __cplusplus */ + +#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-10-11 15:32:56.264500398 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2011-10-11 15:32:56.264500398 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-12-09 14:55:38.381423799 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2011-12-09 14:55:38.381423799 +0100 @@ -0,0 +1,349 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6789,9 +6789,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c + NS_WARNING("Unexpected button flags"); + } +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-10-11 15:32:56.265500405 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2011-10-11 15:32:56.265500405 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-12-09 14:55:38.381423799 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2011-12-09 14:55:38.381423799 +0100 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6852,9 +6852,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h + void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, + const PRUnichar* aStringValue, nsAString &aLabel); +}; -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-10-11 15:32:56.268500426 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2011-10-11 15:32:56.268500426 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-12-09 14:55:38.381423799 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2011-12-09 14:55:38.381423799 +0100 @@ -0,0 +1,112 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -6968,9 +6968,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmoz + +GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c + -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-10-11 15:32:56.269500433 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2011-10-11 15:32:56.269500433 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-12-09 14:55:38.382423803 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2011-12-09 14:55:38.382423803 +0100 @@ -0,0 +1,101 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -7073,9 +7073,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkm +DEFINES += -D_TIME_H=1 +endif +endif -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-10-11 15:32:56.270500440 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-10-11 15:32:56.270500440 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-12-09 14:55:38.382423803 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-12-09 14:55:38.382423803 +0100 @@ -0,0 +1,185 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -7262,9 +7262,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChil + gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); + g_free(text); +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-10-11 15:32:56.275500472 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-10-11 15:32:56.275500472 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-12-09 14:55:38.383423807 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-12-09 14:55:38.383423807 +0100 @@ -0,0 +1,1145 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8411,9 +8411,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp + gtk_widget_set_sensitive(browser->forwardButton, FALSE); + } + -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-10-11 15:32:56.276500479 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-10-11 15:32:56.276500479 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-12-09 14:55:38.383423807 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-12-09 14:55:38.383423807 +0100 @@ -0,0 +1,142 @@ +/** simplemdi.c **/ +/* @@ -8557,9 +8557,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI. + gtk_main_quit(); + return(0); +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-10-11 15:32:56.277500486 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-10-11 15:32:56.277500486 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-12-09 14:55:38.384423811 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-12-09 14:55:38.384423811 +0100 @@ -0,0 +1,86 @@ +#include +#include @@ -8647,9 +8647,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNote + + return 0; +} -diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-10-11 15:32:56.279500500 +0200 -+++ xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-10-11 15:32:56.279500500 +0200 +diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp +--- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-12-09 14:55:38.385423815 +0100 ++++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-12-09 14:55:38.385423815 +0100 @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8760,9 +8760,9 @@ diff -up xulrunner-8.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSock + fprintf(stderr, "Can't fork.\n"); + } +} -diff -up xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in ---- xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2011-10-07 02:59:21.000000000 +0200 -+++ xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in 2011-10-11 15:32:56.281500514 +0200 +diff -up xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in +--- xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2011-12-07 07:28:06.000000000 +0100 ++++ xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in 2011-12-09 14:55:38.385423815 +0100 @@ -75,6 +75,8 @@ CPPSRCS += dlldeps-xul.cpp endif @@ -8772,10 +8772,10 @@ diff -up xulrunner-8.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulr DEFINES += -DMOZ_ENABLE_GTK2 endif -diff -up xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh ---- xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-10-07 02:59:24.000000000 +0200 -+++ xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2011-10-11 15:32:56.283500528 +0200 -@@ -561,6 +561,9 @@ MAKEFILES_embedding=" +diff -up xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh +--- xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-12-07 07:28:07.000000000 +0100 ++++ xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2011-12-09 14:55:38.385423815 +0100 +@@ -555,6 +555,9 @@ MAKEFILES_embedding=" embedding/browser/Makefile embedding/browser/build/Makefile embedding/browser/webBrowser/Makefile @@ -8785,10 +8785,10 @@ diff -up xulrunner-8.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xul embedding/components/Makefile embedding/components/appstartup/Makefile embedding/components/appstartup/src/Makefile -diff -up xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk ---- xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2011-10-07 02:59:24.000000000 +0200 -+++ xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk 2011-10-11 15:32:56.284500534 +0200 -@@ -223,6 +223,12 @@ endif +diff -up xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk +--- xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2011-12-07 07:28:07.000000000 +0100 ++++ xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk 2011-12-09 14:55:38.386423819 +0100 +@@ -220,6 +220,12 @@ endif tier_platform_dirs += services/crypto/component @@ -8800,9 +8800,47 @@ diff -up xulrunner-8.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunn + tier_platform_dirs += startupcache - ifdef APP_LIBXUL_STATICDIRS -@@ -269,4 +275,3 @@ tier_platform_dirs += testing/xpcshell + tier_platform_dirs += js/ductwork +@@ -268,4 +274,3 @@ tier_platform_dirs += testing/xpcshell tier_platform_dirs += testing/mozmill tier_platform_dirs += testing/tools/screenshot endif - +diff -up xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in +--- xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2011-12-09 14:55:38.366423739 +0100 ++++ xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in 2011-12-09 14:55:38.386423819 +0100 +@@ -78,6 +78,8 @@ pkg_config_files = \ + libxul-embedding.pc \ + mozilla-js.pc \ + mozilla-plugin.pc \ ++ mozilla-gtkmozembed.pc \ ++ mozilla-gtkmozembed-embedding.pc \ + $(NULL) + + ifdef MOZ_NATIVE_NSPR +diff -up xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in +--- xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2011-12-09 14:55:38.386423819 +0100 ++++ xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2011-12-09 14:56:32.550629518 +0100 +@@ -0,0 +1,9 @@ ++prefix=%prefix% ++sdkdir=%sdkdir% ++includedir=%includedir% ++libdir=%libdir% ++ ++Name: mozilla-gtkembedmoz ++Description: Static version-independent Mozilla Embedding Widget for Gtk+ ++Version: %MOZILLA_VERSION% ++Requires: libxul-embedding = %MOZILLA_VERSION% +diff -up xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in +--- xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2011-12-09 14:55:38.387423823 +0100 ++++ xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2011-12-09 14:56:25.270603216 +0100 +@@ -0,0 +1,9 @@ ++prefix=%prefix% ++sdkdir=%sdkdir% ++includedir=%includedir% ++libdir=%libdir% ++ ++Name: mozilla-gtkembedmoz ++Description: Mozilla Embedding Widget for Gtk+ ++Version: %MOZILLA_VERSION% ++Requires: libxul = %MOZILLA_VERSION% diff --git a/mozilla-193-pkgconfig.patch b/mozilla-193-pkgconfig.patch index c17c89b..a867f22 100644 --- a/mozilla-193-pkgconfig.patch +++ b/mozilla-193-pkgconfig.patch @@ -51,23 +51,3 @@ diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk xu -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ -diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2010-08-16 11:07:52.000000000 +0200 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - - Name: mozilla-gtkembedmoz -diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed.pc.in ---- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/mozilla-gtkmozembed.pc.in 2010-08-16 11:07:52.000000000 +0200 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - - Name: mozilla-gtkembedmoz diff --git a/mozilla-670719.patch b/mozilla-670719.patch deleted file mode 100644 index afae907..0000000 --- a/mozilla-670719.patch +++ /dev/null @@ -1,53 +0,0 @@ -# HG changeset patch -# User Mike Hommey -# Date 1313846520 -7200 -# Node ID fdc3b63938f5a76d99c1e2bb12fd448465debc94 -# Parent 07a5a618ebe3f67b23100ceb1b51e92bb79be0cd -Bug 670719 - Only add -DENABLE_JIT=1 to CXXFLAGS if any of trace/method/yarr jit is enabled. - -diff --git a/js/src/Makefile.in b/js/src/Makefile.in ---- a/js/src/Makefile.in -+++ b/js/src/Makefile.in -@@ -433,16 +433,19 @@ CPPSRCS += \ - YarrPattern.cpp \ - YarrSyntaxChecker.cpp \ - $(NULL) - else - - ############################################### - # BEGIN include sources for the Nitro assembler - # -+ -+ENABLE_YARR_JIT = 1 -+ - VPATH += $(srcdir)/assembler \ - $(srcdir)/assembler/wtf \ - $(srcdir)/assembler/jit \ - $(srcdir)/assembler/assembler \ - $(srcdir)/methodjit \ - $(srcdir)/yarr \ - $(NONE) - -@@ -1070,17 +1073,21 @@ endif - - ############################################### - # BEGIN kludges for the Nitro assembler - # - - # Needed to "configure" it correctly. Unfortunately these - # flags wind up being applied to all code in js/src, not just - # the code in js/src/assembler. --CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 -+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -+ -+ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT)) -+CXXFLAGS += -DENABLE_JIT=1 -+endif - - INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr - - ifdef ENABLE_METHODJIT - # Build a standalone test program that exercises the assembler - # sources a bit. - TESTMAIN_OBJS = \ - Assertions.$(OBJ_SUFFIX) \ diff --git a/mozilla-686280.patch b/mozilla-686280.patch deleted file mode 100644 index 95732bf..0000000 --- a/mozilla-686280.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# Parent f2a2adaaacba0f0b1d470430c4fb8f6fb6125fbf -# User Luke Wagner -Add in a const-stripper in order to resolve ambiguities - -diff --git a/js/src/jsutil.h b/js/src/jsutil.h ---- a/js/src/jsutil.h -+++ b/js/src/jsutil.h -@@ -819,13 +819,16 @@ class MoveRef { - operator T &() const { return *pointer; } - private: - T *pointer; - }; - - template - MoveRef Move(T &t) { return MoveRef(t); } - -+template -+MoveRef Move(const T &t) { return MoveRef(const_cast(t)); } -+ - } /* namespace js */ - - #endif /* defined(__cplusplus) */ - - #endif /* jsutil_h___ */ diff --git a/mozilla-696393.patch b/mozilla-696393.patch index 66614ac..8859d97 100644 --- a/mozilla-696393.patch +++ b/mozilla-696393.patch @@ -1,7 +1,7 @@ -diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp ---- mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 2011-11-04 17:34:23.000000000 -0400 -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp 2011-12-01 12:25:09.947558444 -0500 -@@ -200,56 +200,22 @@ invoke_copy_to_stack(PRUint32 paramCount +diff -up xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp +--- xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 2011-12-07 07:28:08.000000000 +0100 ++++ xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp 2011-12-09 15:06:10.584998410 +0100 +@@ -200,52 +200,21 @@ invoke_copy_to_stack(PRUint32 paramCount } } @@ -12,22 +12,12 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390 PRUint32 paramCount, nsXPTCVariant* params) { - PRUint32 *vtable = *(PRUint32 **)that; --#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ - PRUint32 method = vtable[methodIndex]; --#else /* not G++ V3 ABI */ -- PRUint32 method = vtable[methodIndex + 2]; --#endif /* G++ V3 ABI */ + vtable_func *vtable = *reinterpret_cast(that); + vtable_func method = vtable[methodIndex]; PRUint32 overflow = invoke_count_words (paramCount, params); - PRUint32 result; -+ PRUint32 *stack_space = reinterpret_cast(__builtin_alloca((overflow + 8 /* 4 32-bits gpr + 2 64-bits fpr */) * 4)); -+ -+ invoke_copy_to_stack(paramCount, params, stack_space, overflow); -+ -+ PRUint32 *d_gpr = stack_space + overflow; -+ double *d_fpr = reinterpret_cast(d_gpr + 4); - +- - __asm__ __volatile__ - ( - "lr 7,15\n\t" @@ -39,19 +29,23 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390 - "l 2,0(15)\n\t" - "la 15,0(3,7)\n\t" - "st 2,0(15)\n\t" -- ++ PRUint32 *stack_space = reinterpret_cast(__builtin_alloca((overflow + 8 /* 4 32-bits gpr + 2 64-bits fpr */) * 4)); + - "lr 2,%1\n\t" - "lr 3,%2\n\t" - "la 4,96(15)\n\t" - "lr 5,%3\n\t" - "basr 14,%4\n\t" -- ++ invoke_copy_to_stack(paramCount, params, stack_space, overflow); + - "lr 2,%5\n\t" - "ld 0,112(7)\n\t" - "ld 2,120(7)\n\t" - "lm 3,6,96(7)\n\t" - "basr 14,%6\n\t" -- ++ PRUint32 *d_gpr = stack_space + overflow; ++ double *d_fpr = reinterpret_cast(d_gpr + 4); + - "la 15,32(7)\n\t" - - "lr %0,2\n\t" @@ -68,11 +62,11 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390 - return result; + return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1]); } - -diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp ---- mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 2011-11-04 17:34:23.000000000 -0400 -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp 2011-12-02 09:33:06.717556519 -0500 -@@ -194,59 +194,23 @@ invoke_copy_to_stack(PRUint32 paramCount +- +diff -up xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp +--- xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 2011-12-07 07:28:08.000000000 +0100 ++++ xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp 2011-12-09 15:07:07.609097348 +0100 +@@ -194,55 +194,22 @@ invoke_copy_to_stack(PRUint32 paramCount } } @@ -83,11 +77,7 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390 PRUint32 paramCount, nsXPTCVariant* params) { - PRUint64 *vtable = *(PRUint64 **)that; --#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ - PRUint64 method = vtable[methodIndex]; --#else /* not G++ V3 ABI */ -- PRUint64 method = vtable[methodIndex + 2]; --#endif /* G++ V3 ABI */ + vtable_func *vtable = *reinterpret_cast(that); + vtable_func method = vtable[methodIndex]; PRUint64 overflow = invoke_count_words (paramCount, params); @@ -111,7 +101,8 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390 - "la 4,160(15)\n\t" - "lgr 5,%3\n\t" - "basr 14,%4\n\t" -- ++ invoke_copy_to_stack(paramCount, params, stack_space, overflow); + - "lgr 2,%5\n\t" - "ld 0,192(7)\n\t" - "ld 2,200(7)\n\t" @@ -119,7 +110,9 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390 - "ld 6,216(7)\n\t" - "lmg 3,6,160(7)\n\t" - "basr 14,%6\n\t" -- ++ PRUint64 *d_gpr = stack_space + overflow; ++ double *d_fpr = reinterpret_cast(d_gpr + 4); + - "la 15,64(7)\n\t" - - "lgr %0,2\n\t" @@ -135,11 +128,6 @@ diff -up mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390 - ); - - return result; -+ invoke_copy_to_stack(paramCount, params, stack_space, overflow); -+ -+ PRUint64 *d_gpr = stack_space + overflow; -+ double *d_fpr = reinterpret_cast(d_gpr + 4); -+ + return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1], d_fpr[2], d_fpr[3]); } - +- diff --git a/xulrunner-6.0-secondary-ipc.patch b/xulrunner-9.0-secondary-ipc.patch similarity index 53% rename from xulrunner-6.0-secondary-ipc.patch rename to xulrunner-9.0-secondary-ipc.patch index ed09f25..062094b 100644 --- a/xulrunner-6.0-secondary-ipc.patch +++ b/xulrunner-9.0-secondary-ipc.patch @@ -1,6 +1,6 @@ -diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc ---- xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-08-11 23:41:01.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc 2011-08-16 10:05:26.325449386 +0200 +diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc +--- xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-12-07 07:27:43.000000000 +0100 ++++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc 2011-12-09 14:35:50.397220865 +0100 @@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path bool DataPack::Get(uint32_t resource_id, StringPiece* data) { // It won't be hard to make this endian-agnostic, but it's not worth @@ -17,10 +17,10 @@ diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.second DataPackEntry* target = reinterpret_cast( bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_, -diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h ---- xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-08-11 23:41:01.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h 2011-08-16 10:07:23.093899409 +0200 -@@ -57,9 +57,24 @@ +diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h +--- xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-12-07 07:27:43.000000000 +0100 ++++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h 2011-12-09 14:39:44.922231601 +0100 +@@ -59,11 +59,23 @@ #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 #define WCHAR_T_IS_UNSIGNED 1 @@ -30,6 +30,7 @@ diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h.sec #elif defined(__ppc__) || defined(__powerpc__) #define ARCH_CPU_PPC 1 #define ARCH_CPU_32_BITS 1 +-#elif defined(__sparc64__) +#elif defined(__s390x__) +#define ARCH_CPU_S390X 1 +#define ARCH_CPU_64_BITS 1 @@ -37,22 +38,21 @@ diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h.sec +#define ARCH_CPU_S390 1 +#define ARCH_CPU_32_BITS 1 +#elif defined(__sparc__) && !defined(__arch64) -+#define ARCH_CPU_SPARC 1 + #define ARCH_CPU_SPARC 1 +#define ARCH_CPU_32_BITS 1 +#elif defined(__sparc__) && defined(__arch64) +#define ARCH_CPU_SPARC64 1 -+#define ARCH_CPU_64_BITS 1 + #define ARCH_CPU_64_BITS 1 #else #error Please add support for your architecture in build/build_config.h - #endif -diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h ---- xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-08-11 23:41:01.000000000 +0200 -+++ xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-08-16 10:05:26.326449206 +0200 -@@ -219,7 +219,8 @@ struct ParamTraits { - } +diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h +--- xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-12-07 07:27:43.000000000 +0100 ++++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-12-09 14:40:59.602679278 +0100 +@@ -195,7 +195,8 @@ struct ParamTraits { }; + #endif --#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))) +-#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))) +// Although s390 is a 32-bit system it defines size_t as unsigned long +#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390)))) // There size_t is a synonym for |unsigned long| ... diff --git a/xulrunner.spec b/xulrunner.spec index 60c051d..43b0eec 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -12,11 +12,10 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 0 +%global beta_version 5 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} -%global tarballdir mozilla-release # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -31,14 +30,17 @@ %if %{alpha_version} > 0 %global pre_version a%{alpha_version} %global pre_name alpha%{alpha_version} +%global tarballdir mozilla-beta %endif %if %{beta_version} > 0 %global pre_version b%{beta_version} %global pre_name beta%{beta_version} +%global tarballdir mozilla-beta %endif %if %{rc_version} > 0 %global pre_version rc%{rc_version} %global pre_name rc%{rc_version} +%global tarballdir mozilla-release %endif %if %{defined pre_version} %global gecko_verrel %{expand:%%{version}}-%{pre_name} @@ -49,8 +51,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 8.0 -Release: 5%{?pre_tag}%{?dist} +Version: 9.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -66,9 +68,9 @@ Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch %if 0%{?fedora} <= 15 -Patch16: add-gtkmozembed-8.0.patch +Patch16: add-gtkmozembed-9.0.patch %endif -Patch18: xulrunner-6.0-secondary-ipc.patch +Patch18: xulrunner-9.0-secondary-ipc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -79,8 +81,6 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch34: xulrunner-2.0-network-link-service.patch Patch35: xulrunner-2.0-NetworkManager09.patch -Patch36: mozilla-670719.patch -Patch37: mozilla-686280.patch Patch38: mozilla-696393.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=707993 Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch @@ -207,9 +207,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch34 -p1 -b .network-link-service %patch35 -p1 -b .NetworkManager09 -%patch36 -p1 -b .670719 -%patch37 -p1 -b .686280 -%patch38 -p1 -b .696393 +%patch38 -p2 -b .696393 %patch39 -p1 -b .707993 %patch40 -p1 -b .682832 @@ -456,6 +454,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 9 2011 Martin Stransky 9.0-1.beta5 +- Updated to 9.0 Beta 5 + * Wed Dec 7 2011 Jan Horak - 8.0-5 - Gnome 3 proxy settings are now honoured (mozbz#682832) From e1d9c2b7bad917926a6cb2af42b3ff5c55bdf77e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 Dec 2011 15:46:39 +0100 Subject: [PATCH 219/486] new sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 9c8b87e..0134844 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9395a5be13da119bd8d53c3225e5d17c xulrunner-8.0.source.tar.bz2 +e0ca3b8f9f292f0f1f4d039567d6d9ac xulrunner-9.0b5.source.tar.bz2 From 77beb51d3d27a2dc66b7a449e2ce988f6962f0e7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 Dec 2011 16:32:36 +0100 Subject: [PATCH 220/486] secondary ipc patch fix --- xulrunner-9.0-secondary-ipc.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner-9.0-secondary-ipc.patch b/xulrunner-9.0-secondary-ipc.patch index 062094b..40ecfd5 100644 --- a/xulrunner-9.0-secondary-ipc.patch +++ b/xulrunner-9.0-secondary-ipc.patch @@ -54,7 +54,7 @@ diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_u -#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))) +// Although s390 is a 32-bit system it defines size_t as unsigned long -+#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390)))) ++#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390)))) // There size_t is a synonym for |unsigned long| ... template <> struct ParamTraits { From 357c2e6152c6279811b2fbd102787cf5f5315e54 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Dec 2011 15:41:20 +0100 Subject: [PATCH 221/486] build fix --- xulrunner.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 43b0eec..2b785e2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -337,7 +337,6 @@ install_file "js-config" popd %{__install} -p -c -m 755 dist/bin/xpcshell \ - dist/bin/xpidl \ $RPM_BUILD_ROOT/%{mozappdir} %{__rm} -rf $RPM_BUILD_ROOT/%{_includedir}/%{name}-%{gecko_dir_ver} @@ -449,7 +448,6 @@ fi %{_libdir}/%{name}-sdk-*/ %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell -%{mozappdir}/xpidl #--------------------------------------------------------------------- From cefd63cc07ff0948f8aedd73d1e4c24855e07b1a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 20 Dec 2011 10:22:28 +0100 Subject: [PATCH 222/486] Update to 9.0 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index b5d0931..399df0d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-7.0.source.tar.bz2 /xulrunner-7.0.1.source.tar.bz2 /xulrunner-8.0.source.tar.bz2 +/xulrunner-9.0.source.tar.bz2 diff --git a/sources b/sources index 0134844..eb3f414 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e0ca3b8f9f292f0f1f4d039567d6d9ac xulrunner-9.0b5.source.tar.bz2 +d8d0c8c79660752b02d9e9ab69a68f94 xulrunner-9.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 2b785e2..fba5db2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,6 +1,6 @@ # Minimal required versions %global nspr_version 4.8.8 -%global nss_version 3.12.10 +%global nss_version 3.13.1 %global cairo_version 1.10.2 %global freetype_version 2.1.9 %global sqlite_version 3.7.4 @@ -12,7 +12,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 5 +%global beta_version 0 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} @@ -27,6 +27,7 @@ # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) +%global tarballdir mozilla-release %if %{alpha_version} > 0 %global pre_version a%{alpha_version} %global pre_name alpha%{alpha_version} @@ -52,7 +53,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 9.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -452,6 +453,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 20 2011 Jan Horak - 9.0-2 +- Update to 9.0 + * Fri Dec 9 2011 Martin Stransky 9.0-1.beta5 - Updated to 9.0 Beta 5 From c6743363182bf6c353291e18d27032bb29965f98 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 20 Dec 2011 12:10:54 +0100 Subject: [PATCH 223/486] Removed system sqlite for f15 (sqlite is too old) --- xulrunner.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index fba5db2..824b50c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -3,7 +3,7 @@ %global nss_version 3.13.1 %global cairo_version 1.10.2 %global freetype_version 2.1.9 -%global sqlite_version 3.7.4 +%global sqlite_version 3.7.7.1 %global libnotify_version 0.7.0 # gecko_dir_ver should be set to the version in our directory names @@ -24,6 +24,12 @@ %global enable_mozilla_crashreporter 0 %endif +%if 0%{?fedora} <= 15 +%define system_sqlite 0 +%else +%define system_sqlite 1 +%endif + # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) @@ -105,7 +111,9 @@ BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: libXt-devel BuildRequires: libXrender-devel BuildRequires: hunspell-devel +%if %{?system_sqlite} BuildRequires: sqlite-devel >= %{sqlite_version} +%endif BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel >= %{libnotify_version} @@ -117,7 +125,9 @@ BuildRequires: libvpx-devel Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} +%if %{?system_sqlite} Requires: sqlite >= %{sqlite_build_version} +%endif Provides: gecko-libs = %{gecko_verrel} Provides: gecko-libs%{?_isa} = %{gecko_verrel} @@ -155,7 +165,9 @@ Requires: freetype-devel >= %{freetype_version} Requires: libXt-devel Requires: libXrender-devel Requires: hunspell-devel +%if %{?system_sqlite} Requires: sqlite-devel +%endif Requires: startup-notification-devel Requires: alsa-lib-devel Requires: libnotify-devel @@ -230,6 +242,11 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif +%if %{?system_sqlite} +echo "ac_add_options --enable-system-sqlite" >> .mozconfig +%else +echo "ac_add_options --disable-system-sqlite" >> .mozconfig +%endif #--------------------------------------------------------------------- %build From 6978f4c691c04c7f10e48e3e96e5f5a8c62f1ef5 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 20 Dec 2011 12:12:14 +0100 Subject: [PATCH 224/486] Removed system sqlite for f15 (sqlite is too old), removed from mozconfig --- xulrunner-mozconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 9391b82..3ec51d2 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -11,7 +11,6 @@ ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --with-system-libvpx ac_add_options --enable-system-hunspell -ac_add_options --enable-system-sqlite ac_add_options --enable-system-cairo ac_add_options --with-pthreads ac_add_options --disable-strip From 01d88c4028be8daaad24f7fb008ed91ba62df446 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 20 Dec 2011 12:25:31 +0100 Subject: [PATCH 225/486] Removed system sqlite for f15 --- xulrunner.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 824b50c..37e6621 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -252,12 +252,14 @@ echo "ac_add_options --disable-system-sqlite" >> .mozconfig %build # Do not proceed with build if the sqlite require would be broken: # make sure the minimum requirement is non-empty, ... +%if %{?system_sqlite} sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 # ... and that major number of the computed build-time version matches: case "%{sqlite_build_version}" in "$sqlite_version"*) ;; *) exit 1 ;; esac +%endif cd %{tarballdir} From 0f1f40efe942d67c3227ab1572528403f6e7ddd6 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 23 Dec 2011 08:02:29 +0100 Subject: [PATCH 226/486] Update to 9.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 399df0d..23ba704 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-7.0.1.source.tar.bz2 /xulrunner-8.0.source.tar.bz2 /xulrunner-9.0.source.tar.bz2 +/xulrunner-9.0.1.source.tar.bz2 diff --git a/sources b/sources index eb3f414..72a480b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d8d0c8c79660752b02d9e9ab69a68f94 xulrunner-9.0.source.tar.bz2 +7cf2bd379792a9b232267c6a79680566 xulrunner-9.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index fba5db2..8549343 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -52,8 +52,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 9.0 -Release: 2%{?pre_tag}%{?dist} +Version: 9.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -453,6 +453,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 23 2011 Jan Horak - 9.0.1-1 +- Update to 9.0.1 + * Tue Dec 20 2011 Jan Horak - 9.0-2 - Update to 9.0 From 4a6f9f89f0b04a9d63ec4c2a7e4dc528d1e9799f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 23 Dec 2011 14:28:05 +0000 Subject: [PATCH 227/486] Add compile options for ARM hfp/sfp - RHBZ #738509 --- xulrunner.spec | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 8549343..70f3391 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -53,7 +53,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 9.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -223,6 +223,21 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ echo "ac_add_options --disable-jemalloc" >> .mozconfig %endif +%ifarch arm7hl +echo "ac_add_options --with-arch=armv7-a" >> .mozconfig +echo "ac_add_options --with-float-abi=hard" >> .mozconfig +echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig +%endif +%ifarch arm7hnl +echo "ac_add_options --with-arch=armv7-a" >> .mozconfig +echo "ac_add_options --with-float-abi=hard" >> .mozconfig +echo "ac_add_options --with-fpu=neon" >> .mozconfig +%endif +%ifarch armv5tel +echo "ac_add_options --with-arch=armv5te" >> .mozconfig +echo "ac_add_options --with-float-abi=soft" >> .mozconfig +%endif + %ifnarch %{ix86} x86_64 echo "ac_add_options --disable-methodjit" >> .mozconfig echo "ac_add_options --disable-monoic" >> .mozconfig @@ -453,6 +468,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 23 2011 Peter Robinson - 9.0.1-2 +- Add compile options for ARM hfp/sfp - RHBZ #738509 + * Fri Dec 23 2011 Jan Horak - 9.0.1-1 - Update to 9.0.1 From 2f0001b55f7d50ba30f1b4c72d368e769f04cd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 4 Jan 2012 11:36:14 +0100 Subject: [PATCH 228/486] fix build on secondary arches (cherry-picked from 13afcd4c097c) --- xulrunner-9.0-secondary-build-fix.patch | 11 +++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 xulrunner-9.0-secondary-build-fix.patch diff --git a/xulrunner-9.0-secondary-build-fix.patch b/xulrunner-9.0-secondary-build-fix.patch new file mode 100644 index 0000000..fc1c1db --- /dev/null +++ b/xulrunner-9.0-secondary-build-fix.patch @@ -0,0 +1,11 @@ +diff -up xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp.orig xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp +--- xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp.orig 2012-01-04 11:06:39.000000000 +0100 ++++ xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp 2012-01-04 11:06:43.000000000 +0100 +@@ -50,7 +50,6 @@ + #include "jswatchpoint.h" + #include "jswrapper.h" + #include "assembler/wtf/Platform.h" +-#include "assembler/jit/ExecutableAllocator.h" + #include "yarr/BumpPointerAllocator.h" + #include "methodjit/MethodJIT.h" + #include "methodjit/PolyIC.h" diff --git a/xulrunner.spec b/xulrunner.spec index 70f3391..9ac1d72 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -53,7 +53,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 9.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -86,6 +86,8 @@ Patch38: mozilla-696393.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=707993 Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch Patch40: mozilla-682832-proxy.patch +# cherry-picked from 13afcd4c097c +Patch41: xulrunner-9.0-secondary-build-fix.patch # --------------------------------------------------- @@ -211,6 +213,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch38 -p2 -b .696393 %patch39 -p1 -b .707993 %patch40 -p1 -b .682832 +%patch41 -p2 -b .secondary-build %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -468,6 +471,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 04 2012 Dan Horák - 9.0.1-3 +- fix build on secondary arches (cherry-picked from 13afcd4c097c) + * Fri Dec 23 2011 Peter Robinson - 9.0.1-2 - Add compile options for ARM hfp/sfp - RHBZ #738509 From 816acb4940f9bf3320e12aecd02fec36007607a4 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jan 2012 22:06:16 -0600 Subject: [PATCH 229/486] add missing v from armv7hl and armv7hnl config options --- xulrunner.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 9ac1d72..51277cd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -53,7 +53,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 9.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -226,12 +226,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ echo "ac_add_options --disable-jemalloc" >> .mozconfig %endif -%ifarch arm7hl +%ifarch armv7hl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig %endif -%ifarch arm7hnl +%ifarch armv7hnl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=neon" >> .mozconfig @@ -471,6 +471,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 19 2012 Dennis Gilmore - 9.0.1-4 +- add missing v from armv7hl and armv7hnl config options + * Wed Jan 04 2012 Dan Horák - 9.0.1-3 - fix build on secondary arches (cherry-picked from 13afcd4c097c) From 11561c479f1bffe7fbaede7db7e19f58c8d92080 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Jan 2012 11:50:17 +0100 Subject: [PATCH 230/486] Update to 10.0 Beta 6 --- .gitignore | 1 + ...ed-9.0.patch => add-gtkmozembed-10.0.patch | 326 +++++++++--------- mozilla-libjpeg-turbo.patch | 34 -- sources | 2 + xulrunner-2.0-NetworkManager09.patch | 51 --- xulrunner-2.0-network-link-service.patch | 274 --------------- xulrunner-9.0-secondary-ipc.patch | 60 ---- 7 files changed, 166 insertions(+), 582 deletions(-) rename add-gtkmozembed-9.0.patch => add-gtkmozembed-10.0.patch (93%) delete mode 100644 mozilla-libjpeg-turbo.patch delete mode 100644 xulrunner-2.0-NetworkManager09.patch delete mode 100644 xulrunner-2.0-network-link-service.patch delete mode 100644 xulrunner-9.0-secondary-ipc.patch diff --git a/.gitignore b/.gitignore index 23ba704..f56d692 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-8.0.source.tar.bz2 /xulrunner-9.0.source.tar.bz2 /xulrunner-9.0.1.source.tar.bz2 +/xulrunner-10.0b6.source.tar.bz2 diff --git a/add-gtkmozembed-9.0.patch b/add-gtkmozembed-10.0.patch similarity index 93% rename from add-gtkmozembed-9.0.patch rename to add-gtkmozembed-10.0.patch index 1ba11e4..e5816dd 100644 --- a/add-gtkmozembed-9.0.patch +++ b/add-gtkmozembed-10.0.patch @@ -1,6 +1,6 @@ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2011-12-09 14:55:38.370423755 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2011-12-09 14:55:38.370423755 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2012-01-18 16:44:32.465289972 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2012-01-18 16:44:32.465289972 +0100 @@ -0,0 +1,54 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -56,9 +56,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembe +endif + +include $(topsrcdir)/config/rules.mk -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2011-12-09 14:55:38.370423755 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2011-12-09 14:55:38.371423759 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2012-01-18 16:44:32.466289972 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2012-01-18 16:44:32.466289972 +0100 @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -313,9 +313,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates. + return NS_OK; +} + -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2011-12-09 14:55:38.371423759 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2011-12-09 14:55:38.371423759 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2012-01-18 16:44:32.467289972 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2012-01-18 16:44:32.467289972 +0100 @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -401,9 +401,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates. + nsCOMPtr mPIPStringBundle; +}; +#endif /* __EmbedCertificates_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2011-12-09 14:55:38.371423759 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2011-12-09 14:55:38.371423759 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2012-01-18 16:44:32.468289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2012-01-19 10:10:40.325459303 +0100 @@ -0,0 +1,156 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -473,7 +473,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen + +NS_IMETHODIMP +EmbedContentListener::OnStartURIOpen(nsIURI *aURI, -+ PRBool *aAbortOpen) ++ bool *aAbortOpen) +{ + nsresult rv; + @@ -495,10 +495,10 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen + +NS_IMETHODIMP +EmbedContentListener::DoContent(const char *aContentType, -+ PRBool aIsContentPreferred, ++ bool aIsContentPreferred, + nsIRequest *aRequest, + nsIStreamListener **aContentHandler, -+ PRBool *aAbortProcess) ++ bool *aAbortProcess) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} @@ -506,7 +506,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen +NS_IMETHODIMP +EmbedContentListener::IsPreferred(const char *aContentType, + char **aDesiredContentType, -+ PRBool *aCanHandleContent) ++ bool *aCanHandleContent) +{ + return CanHandleContent(aContentType, PR_TRUE, aDesiredContentType, + aCanHandleContent); @@ -514,9 +514,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen + +NS_IMETHODIMP +EmbedContentListener::CanHandleContent(const char *aContentType, -+ PRBool aIsContentPreferred, ++ bool aIsContentPreferred, + char **aDesiredContentType, -+ PRBool *_retval) ++ bool *_retval) +{ + *_retval = PR_FALSE; + *aDesiredContentType = nsnull; @@ -561,9 +561,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen + return NS_ERROR_NOT_IMPLEMENTED; +} + -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2011-12-09 14:55:38.371423759 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2011-12-09 14:55:38.372423763 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2012-01-18 16:44:32.469289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2012-01-18 16:44:32.469289973 +0100 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -631,9 +631,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListen +}; + +#endif /* __EmbedContentListener_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2011-12-09 14:55:38.372423763 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2011-12-09 14:55:38.372423763 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2012-01-18 16:44:32.471289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2012-01-18 16:44:32.471289973 +0100 @@ -0,0 +1,618 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1253,9 +1253,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuIn + mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; + return NS_OK; +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2011-12-09 14:55:38.372423763 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2011-12-09 14:55:38.372423763 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2012-01-18 16:44:32.472289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2012-01-18 16:44:32.472289973 +0100 @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1358,9 +1358,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuIn + nsString mCtxDocTitle; +}; // class EmbedContextMenuInfo +#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2011-12-09 14:55:38.373423767 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2011-12-09 14:55:38.373423767 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2012-01-18 16:44:32.473289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2012-01-18 16:44:32.473289973 +0100 @@ -0,0 +1,280 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1642,9 +1642,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener + NS_ERROR("Unexpected event type"); + return NS_OK; +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2011-12-09 14:55:38.373423767 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2011-12-09 14:55:38.373423767 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2012-01-18 16:44:32.474289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2012-01-18 16:44:32.474289973 +0100 @@ -0,0 +1,89 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1735,9 +1735,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener +}; + +#endif /* __EmbedEventListener_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2011-12-09 14:55:38.374423771 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2011-12-09 14:55:38.374423771 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2012-01-18 16:44:32.476289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2012-01-18 16:44:32.476289973 +0100 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ @@ -1827,9 +1827,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp. + NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); + return docShell->GetContentViewer(aViewer); +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2011-12-09 14:55:38.375423775 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2011-12-09 14:55:38.375423775 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2012-01-18 16:44:32.476289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2012-01-18 16:44:32.477289973 +0100 @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -1898,9 +1898,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gt +GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); + +#endif /* __EmbedTools_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2011-12-09 14:55:38.375423775 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2011-12-09 14:55:38.375423775 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2012-01-18 16:44:32.478289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2012-01-19 10:08:33.847456417 +0100 @@ -0,0 +1,1016 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -2027,7 +2027,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g +} + +NS_IMETHODIMP -+GTKEmbedDirectoryProvider::GetFile(const char *aKey, PRBool *aPersist, ++GTKEmbedDirectoryProvider::GetFile(const char *aKey, bool *aPersist, + nsIFile* *aResult) +{ + if (EmbedPrivate::sAppFileLocProvider) { @@ -2518,7 +2518,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g + rv = sProfileDir->AppendNative(nsDependentCString(aName)); + + if (NS_SUCCEEDED(rv)) { -+ PRBool exists = PR_FALSE; ++ bool exists = PR_FALSE; + rv = sProfileDir->Exists(&exists); + if (!exists) + rv = sProfileDir->Create(nsIFile::DIRECTORY_TYPE, 0700); @@ -2662,7 +2662,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g + + // and since we're done loading show the window, assuming that the + // visibility flag has been set. -+ PRBool visibility; ++ bool visibility; + mWindow->GetVisibility(&visibility); + if (visibility) + mWindow->SetVisibility(PR_TRUE); @@ -2918,9 +2918,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.g + gtk_widget_destroy(sOffscreenWindow); + sOffscreenWindow = 0; +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2011-12-09 14:55:38.376423779 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2011-12-09 14:55:38.376423779 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2012-01-18 16:44:32.479289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2012-01-18 16:44:32.480289973 +0100 @@ -0,0 +1,188 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3110,9 +3110,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtk +}; + +#endif /* __EmbedPrivate_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2011-12-09 14:55:38.376423779 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2011-12-09 14:55:38.376423779 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2012-01-18 16:44:32.481289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2012-01-18 16:44:32.481289973 +0100 @@ -0,0 +1,215 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3329,9 +3329,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp. + + uri->GetSpec(aString); +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2011-12-09 14:55:38.376423779 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2011-12-09 14:55:38.376423779 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2012-01-18 16:44:32.483289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2012-01-18 16:44:32.483289973 +0100 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3399,9 +3399,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gt +}; + +#endif /* __EmbedProgress_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2011-12-09 14:55:38.377423783 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2011-12-09 14:55:38.377423783 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2012-01-18 16:44:32.484289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2012-01-19 10:42:07.334502360 +0100 @@ -0,0 +1,411 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3723,15 +3723,15 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp. +} + +void -+EmbedPrompter::GetCheckValue(PRBool *aValue) ++EmbedPrompter::GetCheckValue(bool *aValue) +{ -+ *aValue = mCheckValue; ++ *aValue = (bool)mCheckValue; +} + +void -+EmbedPrompter::GetConfirmValue(PRBool *aConfirmValue) ++EmbedPrompter::GetConfirmValue(bool *aConfirmValue) +{ -+ *aConfirmValue = mConfirmResult; ++ *aConfirmValue = (bool)mConfirmResult; +} + +void @@ -3814,9 +3814,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp. + } + } +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2011-12-09 14:55:38.377423783 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2011-12-09 14:55:38.377423783 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2012-01-18 16:44:32.485289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2012-01-19 10:42:24.478502751 +0100 @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3895,8 +3895,8 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gt + const PRUnichar* aButton2Label); + void SetItems(const PRUnichar **aItemArray, PRUint32 aCount); + -+ void GetCheckValue(PRBool *aValue); -+ void GetConfirmValue(PRBool *aConfirmValue); ++ void GetCheckValue(bool *aValue); ++ void GetConfirmValue(bool *aConfirmValue); + void GetTextValue(PRUnichar **aTextValue); + void GetUser(PRUnichar **aUser); + void GetPassword(PRUnichar **aPass); @@ -3931,9 +3931,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gt + GtkWidget *mComboBox; + GtkWidget *mCheckBox; +}; -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2011-12-09 14:55:38.377423783 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2011-12-09 14:55:38.377423783 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2012-01-18 16:44:32.487289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2012-01-19 10:09:43.082457998 +0100 @@ -0,0 +1,474 @@ +/* + * vim:ts=2:et:sw=2 @@ -4153,7 +4153,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gt +} + +NS_IMETHODIMP -+EmbedWindow::IsWindowModal(PRBool *_retval) ++EmbedWindow::IsWindowModal(bool *_retval) +{ + *_retval = mIsModal; + return NS_OK; @@ -4272,7 +4272,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gt +} + +NS_IMETHODIMP -+EmbedWindow::GetVisibility(PRBool *aVisibility) ++EmbedWindow::GetVisibility(bool *aVisibility) +{ + // XXX See bug 312998 + // Work around the problem that sometimes the window @@ -4286,7 +4286,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gt +} + +NS_IMETHODIMP -+EmbedWindow::SetVisibility(PRBool aVisibility) ++EmbedWindow::SetVisibility(bool aVisibility) +{ + // We always set the visibility so that if it's chrome and we finish + // the load we know that we have to show the window. @@ -4409,9 +4409,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gt + + return rv; +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2011-12-09 14:55:38.378423787 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2011-12-09 14:55:38.378423787 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2012-01-18 16:44:32.488289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2012-01-18 16:44:32.488289973 +0100 @@ -0,0 +1,106 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4519,9 +4519,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator + + return NS_ERROR_FAILURE; +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2011-12-09 14:55:38.378423787 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2011-12-09 14:55:38.378423787 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2012-01-18 16:44:32.488289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2012-01-18 16:44:32.488289973 +0100 @@ -0,0 +1,54 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4577,9 +4577,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator +}; + +#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2011-12-09 14:55:38.378423787 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2011-12-09 14:55:38.378423787 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2012-01-18 16:44:32.489289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2012-01-18 16:44:32.489289973 +0100 @@ -0,0 +1,101 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4682,9 +4682,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkm + + +#endif /* __EmbedWindow_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2011-12-09 14:55:38.379423791 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2011-12-09 14:55:38.379423791 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2012-01-18 16:44:32.491289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2012-01-19 10:06:52.015454094 +0100 @@ -0,0 +1,1132 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5395,7 +5395,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.g +gboolean +gtk_moz_embed_can_go_back(GtkMozEmbed *embed) +{ -+ PRBool retval = PR_FALSE; ++ bool retval = PR_FALSE; + EmbedPrivate *embedPrivate; + + g_return_val_if_fail ((embed != NULL), FALSE); @@ -5411,7 +5411,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.g +gboolean +gtk_moz_embed_can_go_forward(GtkMozEmbed *embed) +{ -+ PRBool retval = PR_FALSE; ++ bool retval = PR_FALSE; + EmbedPrivate *embedPrivate; + + g_return_val_if_fail ((embed != NULL), FALSE); @@ -5818,9 +5818,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.g + aNewEmbed, aChromeFlags); + +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2011-12-09 14:55:38.379423791 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2011-12-09 14:55:38.379423791 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2012-01-18 16:44:32.493289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2012-01-18 16:44:32.494289973 +0100 @@ -0,0 +1,116 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5938,9 +5938,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.c + return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); +} + -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2011-12-09 14:55:38.380423795 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2011-12-09 14:55:38.380423795 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2012-01-18 16:44:32.495289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2012-01-18 16:44:32.495289973 +0100 @@ -0,0 +1,287 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6229,9 +6229,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkm +#endif /* __cplusplus */ + +#endif /* gtkmozembed_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2011-12-09 14:55:38.380423795 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2011-12-09 14:55:38.380423795 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2012-01-18 16:44:32.495289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2012-01-18 16:44:32.495289973 +0100 @@ -0,0 +1,70 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6303,9 +6303,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_intern + +#endif /* gtkmozembed_internal_h */ + -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2011-12-09 14:55:38.380423795 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2011-12-09 14:55:38.380423795 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2012-01-18 16:44:32.496289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2012-01-18 16:44:32.496289973 +0100 @@ -0,0 +1,34 @@ +BOOL:STRING +BOOL:STRING,STRING @@ -6341,9 +6341,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal +BOOL:POINTER +VOID:POINTER +BOOL:STRING,STRING,POINTER -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2011-12-09 14:55:38.380423795 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2011-12-09 14:55:38.381423799 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2012-01-18 16:44:32.498289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2012-01-18 16:44:32.498289973 +0100 @@ -0,0 +1,91 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6436,9 +6436,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate +#endif /* __cplusplus */ + +#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2011-12-09 14:55:38.381423799 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2011-12-09 14:55:38.381423799 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2012-01-18 16:44:32.499289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2012-01-19 10:43:20.021504018 +0100 @@ -0,0 +1,349 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6516,7 +6516,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c +GtkPromptService::AlertCheck(nsIDOMWindow* aParent, + const PRUnichar* aDialogTitle, + const PRUnichar* aDialogText, -+ const PRUnichar* aCheckMsg, PRBool* aCheckValue) ++ const PRUnichar* aCheckMsg, bool* aCheckValue) +{ + NS_ENSURE_ARG_POINTER(aCheckValue); + @@ -6535,7 +6535,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c +NS_IMETHODIMP +GtkPromptService::Confirm(nsIDOMWindow* aParent, + const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, PRBool* aConfirm) ++ const PRUnichar* aDialogText, bool* aConfirm) +{ + EmbedPrompter prompter; + prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); @@ -6552,7 +6552,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c + const PRUnichar* aDialogTitle, + const PRUnichar* aDialogText, + const PRUnichar* aCheckMsg, -+ PRBool* aCheckValue, PRBool* aConfirm) ++ bool* aCheckValue, bool* aConfirm) +{ + NS_ENSURE_ARG_POINTER(aCheckValue); + @@ -6577,7 +6577,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c + const PRUnichar* aButton0Title, + const PRUnichar* aButton1Title, + const PRUnichar* aButton2Title, -+ const PRUnichar* aCheckMsg, PRBool* aCheckValue, ++ const PRUnichar* aCheckMsg, bool* aCheckValue, + PRInt32* aRetVal) +{ + EmbedPrompter prompter; @@ -6611,8 +6611,8 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c +NS_IMETHODIMP +GtkPromptService::Prompt(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, + const PRUnichar* aDialogText, PRUnichar** aValue, -+ const PRUnichar* aCheckMsg, PRBool* aCheckValue, -+ PRBool* aConfirm) ++ const PRUnichar* aCheckMsg, bool* aCheckValue, ++ bool* aConfirm) +{ + EmbedPrompter prompter; + prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); @@ -6644,8 +6644,8 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c + PRUnichar** aUsername, + PRUnichar** aPassword, + const PRUnichar* aCheckMsg, -+ PRBool* aCheckValue, -+ PRBool* aConfirm) ++ bool* aCheckValue, ++ bool* aConfirm) +{ + EmbedPrompter prompter; + prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); @@ -6681,7 +6681,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c + const PRUnichar* aDialogText, + PRUnichar** aPassword, + const PRUnichar* aCheckMsg, -+ PRBool* aCheckValue, PRBool* aConfirm) ++ bool* aCheckValue, bool* aConfirm) +{ + EmbedPrompter prompter; + prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); @@ -6710,7 +6710,7 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c +GtkPromptService::Select(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, + const PRUnichar* aDialogText, PRUint32 aCount, + const PRUnichar** aSelectList, PRInt32* outSelection, -+ PRBool* aConfirm) ++ bool* aConfirm) +{ + EmbedPrompter prompter; + prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Select").get()); @@ -6789,9 +6789,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.c + NS_WARNING("Unexpected button flags"); + } +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2011-12-09 14:55:38.381423799 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2011-12-09 14:55:38.381423799 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2012-01-18 16:44:32.500289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2012-01-18 16:44:32.500289973 +0100 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6852,9 +6852,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h + void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, + const PRUnichar* aStringValue, nsAString &aLabel); +}; -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2011-12-09 14:55:38.381423799 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2011-12-09 14:55:38.381423799 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2012-01-18 16:44:32.501289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2012-01-18 16:44:32.501289973 +0100 @@ -0,0 +1,112 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -6968,9 +6968,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmoz + +GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c + -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2011-12-09 14:55:38.382423803 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2011-12-09 14:55:38.382423803 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2012-01-18 16:44:32.502289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2012-01-18 16:44:32.502289973 +0100 @@ -0,0 +1,101 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -7073,9 +7073,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkm +DEFINES += -D_TIME_H=1 +endif +endif -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2011-12-09 14:55:38.382423803 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2011-12-09 14:55:38.382423803 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2012-01-18 16:44:32.504289973 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2012-01-18 16:44:32.716289979 +0100 @@ -0,0 +1,185 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -7262,9 +7262,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChil + gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); + g_free(text); +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2011-12-09 14:55:38.383423807 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2011-12-09 14:55:38.383423807 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2012-01-18 16:44:32.719289978 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2012-01-18 16:44:32.719289978 +0100 @@ -0,0 +1,1145 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8411,9 +8411,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp + gtk_widget_set_sensitive(browser->forwardButton, FALSE); + } + -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2011-12-09 14:55:38.383423807 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2011-12-09 14:55:38.383423807 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2012-01-18 16:44:32.789289981 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2012-01-18 16:44:32.789289981 +0100 @@ -0,0 +1,142 @@ +/** simplemdi.c **/ +/* @@ -8557,9 +8557,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI. + gtk_main_quit(); + return(0); +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2011-12-09 14:55:38.384423811 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2011-12-09 14:55:38.384423811 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2012-01-18 16:44:32.807289982 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2012-01-18 16:44:32.808289981 +0100 @@ -0,0 +1,86 @@ +#include +#include @@ -8647,9 +8647,9 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNote + + return 0; +} -diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2011-12-09 14:55:38.385423815 +0100 -+++ xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2011-12-09 14:55:38.385423815 +0100 +diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp +--- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2012-01-18 16:44:32.808289981 +0100 ++++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2012-01-18 16:44:32.808289981 +0100 @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8760,10 +8760,10 @@ diff -up xulrunner-9.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSock + fprintf(stderr, "Can't fork.\n"); + } +} -diff -up xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in ---- xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2011-12-07 07:28:06.000000000 +0100 -+++ xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in 2011-12-09 14:55:38.385423815 +0100 -@@ -75,6 +75,8 @@ CPPSRCS += dlldeps-xul.cpp +diff -up xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in +--- xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2012-01-11 18:15:04.000000000 +0100 ++++ xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in 2012-01-18 16:44:32.809289980 +0100 +@@ -73,6 +73,8 @@ CPPSRCS += dlldeps-xul.cpp endif ifneq (,$(MOZ_ENABLE_GTK2)) @@ -8772,10 +8772,10 @@ diff -up xulrunner-9.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulr DEFINES += -DMOZ_ENABLE_GTK2 endif -diff -up xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh ---- xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2011-12-07 07:28:07.000000000 +0100 -+++ xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2011-12-09 14:55:38.385423815 +0100 -@@ -555,6 +555,9 @@ MAKEFILES_embedding=" +diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh +--- xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2012-01-11 18:15:08.000000000 +0100 ++++ xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2012-01-18 16:44:32.810289980 +0100 +@@ -554,6 +554,9 @@ MAKEFILES_embedding=" embedding/browser/Makefile embedding/browser/build/Makefile embedding/browser/webBrowser/Makefile @@ -8783,12 +8783,12 @@ diff -up xulrunner-9.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xul + embedding/browser/gtk/src/Makefile + embedding/browser/gtk/tests/Makefile embedding/components/Makefile - embedding/components/appstartup/Makefile embedding/components/appstartup/src/Makefile -diff -up xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk ---- xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2011-12-07 07:28:07.000000000 +0100 -+++ xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk 2011-12-09 14:55:38.386423819 +0100 -@@ -220,6 +220,12 @@ endif + embedding/components/build/Makefile +diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk +--- xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2012-01-11 18:15:08.000000000 +0100 ++++ xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk 2012-01-18 16:44:32.811289981 +0100 +@@ -221,6 +221,12 @@ endif tier_platform_dirs += services/crypto/component @@ -8800,15 +8800,15 @@ diff -up xulrunner-9.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunn + tier_platform_dirs += startupcache - tier_platform_dirs += js/ductwork -@@ -268,4 +274,3 @@ tier_platform_dirs += testing/xpcshell - tier_platform_dirs += testing/mozmill + tier_platform_dirs += js/ductwork/debugger +@@ -268,4 +274,3 @@ tier_platform_dirs += testing/mochitest + tier_platform_dirs += testing/xpcshell tier_platform_dirs += testing/tools/screenshot endif - -diff -up xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in ---- xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2011-12-09 14:55:38.366423739 +0100 -+++ xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in 2011-12-09 14:55:38.386423819 +0100 +diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in +--- xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2012-01-18 16:44:32.403289971 +0100 ++++ xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in 2012-01-18 16:44:32.817289981 +0100 @@ -78,6 +78,8 @@ pkg_config_files = \ libxul-embedding.pc \ mozilla-js.pc \ @@ -8818,9 +8818,9 @@ diff -up xulrunner-9.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed $(NULL) ifdef MOZ_NATIVE_NSPR -diff -up xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2011-12-09 14:55:38.386423819 +0100 -+++ xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2011-12-09 14:56:32.550629518 +0100 +diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in +--- xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2012-01-18 16:44:32.812289981 +0100 ++++ xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2012-01-18 16:44:32.812289981 +0100 @@ -0,0 +1,9 @@ +prefix=%prefix% +sdkdir=%sdkdir% @@ -8831,9 +8831,9 @@ diff -up xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embe +Description: Static version-independent Mozilla Embedding Widget for Gtk+ +Version: %MOZILLA_VERSION% +Requires: libxul-embedding = %MOZILLA_VERSION% -diff -up xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in ---- xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2011-12-09 14:55:38.387423823 +0100 -+++ xulrunner-9.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2011-12-09 14:56:25.270603216 +0100 +diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in +--- xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2012-01-18 16:44:32.813289981 +0100 ++++ xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2012-01-18 16:44:32.813289981 +0100 @@ -0,0 +1,9 @@ +prefix=%prefix% +sdkdir=%sdkdir% diff --git a/mozilla-libjpeg-turbo.patch b/mozilla-libjpeg-turbo.patch deleted file mode 100644 index 54be1a1..0000000 --- a/mozilla-libjpeg-turbo.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp ---- xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo 2010-11-04 21:06:43.000000000 +0100 -+++ xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp 2010-11-12 12:39:08.047171412 +0100 -@@ -411,14 +411,6 @@ nsJPEGDecoder::WriteInternal(const char - return; /* I/O suspension */ - } - -- /* Force to use our YCbCr to Packed RGB converter when possible */ -- if (!mTransform && (mCMSMode != eCMSMode_All) && -- mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) { -- /* Special case for the most common case: transform from YCbCr direct into packed ARGB */ -- mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/ -- mInfo.cconvert->color_convert = ycc_rgb_convert_argb; -- } -- - /* If this is a progressive JPEG ... */ - mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; - } -@@ -563,15 +555,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s - PRUint32 *imageRow = ((PRUint32*)mImageData) + - (mInfo.output_scanline * mInfo.output_width); - -- if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) { -- /* Special case: scanline will be directly converted into packed ARGB */ -- if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) { -- *suspend = PR_TRUE; /* suspend */ -- break; -- } -- continue; /* all done for this row! */ -- } -- - JSAMPROW sampleRow = (JSAMPROW)imageRow; - if (mInfo.output_components == 3) { - /* Put the pixels at end of row to enable in-place expansion */ diff --git a/sources b/sources index 72a480b..4f07a6e 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ 7cf2bd379792a9b232267c6a79680566 xulrunner-9.0.1.source.tar.bz2 +7a6cc712d941052de20e482db3df229e xulrunner-10.0b5.source.tar.bz2 +36ee9582e5fedd118b2ae6d529c40320 xulrunner-10.0b6.source.tar.bz2 diff --git a/xulrunner-2.0-NetworkManager09.patch b/xulrunner-2.0-NetworkManager09.patch deleted file mode 100644 index 317a1b4..0000000 --- a/xulrunner-2.0-NetworkManager09.patch +++ /dev/null @@ -1,51 +0,0 @@ -https://bugzilla.mozilla.org/show_bug.cgi?id=639959 - ---- source/toolkit/system/dbus/nsNetworkManagerListener.cpp.foo 2011-03-08 14:26:28.167074923 -0600 -+++ source/toolkit/system/dbus/nsNetworkManagerListener.cpp 2011-03-08 14:30:54.260748294 -0600 -@@ -51,15 +51,13 @@ - #define NM_DBUS_SERVICE "org.freedesktop.NetworkManager" - #define NM_DBUS_PATH "/org/freedesktop/NetworkManager" - #define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager" --#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange" --typedef enum NMState --{ -- NM_STATE_UNKNOWN = 0, -- NM_STATE_ASLEEP, -- NM_STATE_CONNECTING, -- NM_STATE_CONNECTED, -- NM_STATE_DISCONNECTED --} NMState; -+#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange" /* Deprecated in 0.7.x */ -+#define NM_DBUS_SIGNAL_STATE_CHANGED "StateChanged" -+ -+#define NM_STATE_CONNECTED_OLD 3 -+#define NM_STATE_CONNECTED_LOCAL 50 -+#define NM_STATE_CONNECTED_SITE 60 -+#define NM_STATE_CONNECTED_GLOBAL 70 - - nsNetworkManagerListener::nsNetworkManagerListener() : - mLinkUp(PR_TRUE), mNetworkManagerActive(PR_FALSE), -@@ -174,7 +172,9 @@ - PRBool - nsNetworkManagerListener::HandleMessage(DBusMessage* message) { - if (dbus_message_is_signal(message, NM_DBUS_INTERFACE, -- NM_DBUS_SIGNAL_STATE_CHANGE)) { -+ NM_DBUS_SIGNAL_STATE_CHANGE) || -+ dbus_message_is_signal(message, NM_DBUS_INTERFACE, -+ NM_DBUS_SIGNAL_STATE_CHANGED)) { - UpdateNetworkStatus(message); - return PR_TRUE; - } -@@ -191,7 +191,10 @@ - mNetworkManagerActive = PR_TRUE; - - PRBool wasUp = mLinkUp; -- mLinkUp = result == NM_STATE_CONNECTED; -+ mLinkUp = (result == NM_STATE_CONNECTED_OLD) || -+ (result == NM_STATE_CONNECTED_LOCAL) || -+ (result == NM_STATE_CONNECTED_SITE) || -+ (result == NM_STATE_CONNECTED_GLOBAL); - if (wasUp == mLinkUp) - return; - - diff --git a/xulrunner-2.0-network-link-service.patch b/xulrunner-2.0-network-link-service.patch deleted file mode 100644 index b3243a9..0000000 --- a/xulrunner-2.0-network-link-service.patch +++ /dev/null @@ -1,274 +0,0 @@ -# HG changeset patch -# Parent 31879b88cc82c1f44e6a6c25a05aa2c70af22d7e -# User Martin Stransky -Bug 627672 - XPCOM component (libdbusservice.so) is not registered although it should be; r=cbiesinger - - - -diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp ---- a/netwerk/base/src/nsIOService.cpp -+++ b/netwerk/base/src/nsIOService.cpp -@@ -160,31 +160,33 @@ PRInt16 gBadPortList[] = { - 2049, // nfs - 4045, // lockd - 6000, // x11 - 0, // This MUST be zero so that we can populating the array - }; - - static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardown"; - static const char kProfileChangeNetRestoreTopic[] = "profile-change-net-restore"; -+static const char kStartupTopic[] = "profile-after-change"; - - // Necko buffer cache - nsIMemory* nsIOService::gBufferCache = nsnull; - PRUint32 nsIOService::gDefaultSegmentSize = 4096; - PRUint32 nsIOService::gDefaultSegmentCount = 24; - - //////////////////////////////////////////////////////////////////////////////// - - nsIOService::nsIOService() - : mOffline(PR_TRUE) - , mOfflineForProfileChange(PR_FALSE) - , mManageOfflineStatus(PR_TRUE) - , mSettingOffline(PR_FALSE) - , mSetOfflineValue(PR_FALSE) - , mShutdown(PR_FALSE) -+ , mNetworkLinkServiceInitialized(PR_FALSE) - , mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY) - , mContentSniffers(NS_CONTENT_SNIFFER_CATEGORY) - , mAutoDialEnabled(PR_FALSE) - { - } - - nsresult - nsIOService::Init() -@@ -230,16 +232,17 @@ nsIOService::Init() - } - - // Register for profile change notifications - nsCOMPtr observerService = - mozilla::services::GetObserverService(); - if (observerService) { - observerService->AddObserver(this, kProfileChangeNetTeardownTopic, PR_TRUE); - observerService->AddObserver(this, kProfileChangeNetRestoreTopic, PR_TRUE); -+ observerService->AddObserver(this, kStartupTopic, PR_TRUE); - observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE); - observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, PR_TRUE); - } - else - NS_WARNING("failed to get observer service"); - - NS_TIME_FUNCTION_MARK("Registered observers"); - -@@ -258,29 +261,19 @@ nsIOService::Init() - NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Was unable to allocate. No gBufferCache."); - CallQueryInterface(recyclingAllocator, &gBufferCache); - } - - NS_TIME_FUNCTION_MARK("Set up the recycling allocator"); - - gIOService = this; - -- // go into managed mode if we can, and chrome process -- if (XRE_GetProcessType() == GeckoProcessType_Default) -- mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID); -- -- if (!mNetworkLinkService) -- // We can't really determine if the machine has a usable network connection, -- // so let's cross our fingers! -- mManageOfflineStatus = PR_FALSE; -- -- if (mManageOfflineStatus) -- TrackNetworkLinkStatusForOffline(); -- else -- SetOffline(PR_FALSE); -+ // We can't really determine if the machine has a usable network connection, -+ // (mNetworkLinkService will be initialized later) so let's cross our fingers! -+ SetOffline(PR_FALSE); - - NS_TIME_FUNCTION_MARK("Set up network link service"); - - return NS_OK; - } - - - nsIOService::~nsIOService() -@@ -306,16 +299,57 @@ nsIOService::InitializeSocketTransportSe - rv = mSocketTransportService->Init(); - NS_ASSERTION(NS_SUCCEEDED(rv), "socket transport service init failed"); - mSocketTransportService->SetAutodialEnabled(mAutoDialEnabled); - } - - return rv; - } - -+nsresult -+nsIOService::InitializeNetworkLinkService() -+{ -+ NS_TIME_FUNCTION; -+ -+ nsresult rv = NS_OK; -+ -+ if (mNetworkLinkServiceInitialized) -+ return rv; -+ -+#if defined(MOZ_PLATFORM_MAEMO) -+ // libdbusservice fails to initialize on Maemo platform, see Bug 627672 -+ mNetworkLinkService = NULL; -+#else -+ // go into managed mode if we can, and chrome process -+ if (XRE_GetProcessType() == GeckoProcessType_Default) -+ { -+ mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID, &rv); -+ if (NS_FAILED(rv)) { -+ NS_WARNING("failed to get network link service"); -+ return rv; -+ } -+ } -+#endif -+ -+ mNetworkLinkServiceInitialized = PR_TRUE; -+ -+ if (!mNetworkLinkService) { -+ // We can't really determine if the machine has a usable network connection, -+ // so let's cross our fingers! -+ mManageOfflineStatus = PR_FALSE; -+ } -+ -+ if (mManageOfflineStatus) -+ TrackNetworkLinkStatusForOffline(); -+ else -+ SetOffline(PR_FALSE); -+ -+ return rv; -+} -+ - nsIOService* - nsIOService::GetInstance() { - if (!gIOService) { - gIOService = new nsIOService(); - if (!gIOService) - return nsnull; - NS_ADDREF(gIOService); - -@@ -689,16 +723,19 @@ nsIOService::NewChannel(const nsACString - if (NS_FAILED(rv)) return rv; - - return NewChannelFromURI(uri, result); - } - - PRBool - nsIOService::IsLinkUp() - { -+ NS_ASSERTION(mNetworkLinkServiceInitialized, -+ "network link service should be initialized"); -+ - if (!mNetworkLinkService) { - // We cannot decide, assume the link is up - return PR_TRUE; - } - - PRBool isLinkUp; - nsresult rv; - rv = mNetworkLinkService->GetIsLinkUp(&isLinkUp); -@@ -968,16 +1005,20 @@ nsIOService::Observe(nsISupports *subjec - if (mOfflineForProfileChange) { - mOfflineForProfileChange = PR_FALSE; - if (!mManageOfflineStatus || - NS_FAILED(TrackNetworkLinkStatusForOffline())) { - SetOffline(PR_FALSE); - } - } - } -+ else if (!strcmp(topic, kStartupTopic)) { -+ // Lazy initialization of network link service (see bug 620472) -+ InitializeNetworkLinkService(); -+ } - else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { - // Remember we passed XPCOM shutdown notification to prevent any - // changes of the offline status from now. We must not allow going - // online after this point. - mShutdown = PR_TRUE; - - SetOffline(PR_TRUE); - -@@ -1085,32 +1126,40 @@ nsIOService::NewSimpleNestedURI(nsIURI* - NS_IF_ADDREF(*aResult = new nsSimpleNestedURI(safeURI)); - return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY; - } - - NS_IMETHODIMP - nsIOService::SetManageOfflineStatus(PRBool aManage) { - PRBool wasManaged = mManageOfflineStatus; - mManageOfflineStatus = aManage; -+ -+ if (!mNetworkLinkServiceInitialized) { -+ InitializeNetworkLinkService(); -+ } -+ - if (mManageOfflineStatus && !wasManaged) - return TrackNetworkLinkStatusForOffline(); - return NS_OK; - } - - NS_IMETHODIMP - nsIOService::GetManageOfflineStatus(PRBool* aManage) { - *aManage = mManageOfflineStatus; - return NS_OK; - } - - nsresult - nsIOService::TrackNetworkLinkStatusForOffline() - { - NS_ASSERTION(mManageOfflineStatus, - "Don't call this unless we're managing the offline status"); -+ NS_ASSERTION(mNetworkLinkServiceInitialized, -+ "network link service should be set up"); -+ - if (!mNetworkLinkService) - return NS_ERROR_FAILURE; - - if (mShutdown) - return NS_ERROR_NOT_AVAILABLE; - - // check to make sure this won't collide with Autodial - if (mSocketTransportService) { -diff --git a/netwerk/base/src/nsIOService.h b/netwerk/base/src/nsIOService.h ---- a/netwerk/base/src/nsIOService.h -+++ b/netwerk/base/src/nsIOService.h -@@ -129,16 +129,17 @@ private: - nsIProtocolHandler* hdlr); - - // Prefs wrangling - NS_HIDDEN_(void) PrefsChanged(nsIPrefBranch *prefs, const char *pref = nsnull); - NS_HIDDEN_(void) GetPrefBranch(nsIPrefBranch2 **); - NS_HIDDEN_(void) ParsePortList(nsIPrefBranch *prefBranch, const char *pref, PRBool remove); - - nsresult InitializeSocketTransportService(); -+ nsresult InitializeNetworkLinkService(); - - private: - PRPackedBool mOffline; - PRPackedBool mOfflineForProfileChange; - PRPackedBool mManageOfflineStatus; - - // Used to handle SetOffline() reentrancy. See the comment in - // SetOffline() for more details. -@@ -146,16 +147,17 @@ private: - PRPackedBool mSetOfflineValue; - - PRPackedBool mShutdown; - - nsCOMPtr mSocketTransportService; - nsCOMPtr mDNSService; - nsCOMPtr mProxyService; - nsCOMPtr mNetworkLinkService; -+ PRPackedBool mNetworkLinkServiceInitialized; - - // Cached protocol handlers - nsWeakPtr mWeakHandler[NS_N(gScheme)]; - - // cached categories - nsCategoryCache mChannelEventSinks; - nsCategoryCache mContentSniffers; - diff --git a/xulrunner-9.0-secondary-ipc.patch b/xulrunner-9.0-secondary-ipc.patch deleted file mode 100644 index 40ecfd5..0000000 --- a/xulrunner-9.0-secondary-ipc.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc ---- xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-12-07 07:27:43.000000000 +0100 -+++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc 2011-12-09 14:35:50.397220865 +0100 -@@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path - bool DataPack::Get(uint32_t resource_id, StringPiece* data) { - // It won't be hard to make this endian-agnostic, but it's not worth - // bothering to do right now. --#if defined(__BYTE_ORDER) -- // Linux check -- COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN, -- datapack_assumes_little_endian); --#elif defined(__BIG_ENDIAN__) -- // Mac check -- #error DataPack assumes little endian --#endif -+#warning DoTheRightThingMakingThisEndianAgnostic! - - DataPackEntry* target = reinterpret_cast( - bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_, -diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h ---- xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-12-07 07:27:43.000000000 +0100 -+++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h 2011-12-09 14:39:44.922231601 +0100 -@@ -59,11 +59,23 @@ - #define ARCH_CPU_ARMEL 1 - #define ARCH_CPU_32_BITS 1 - #define WCHAR_T_IS_UNSIGNED 1 -+#elif defined(__powerpc64__) -+#define ARCH_CPU_PPC64 1 -+#define ARCH_CPU_64_BITS 1 - #elif defined(__ppc__) || defined(__powerpc__) - #define ARCH_CPU_PPC 1 - #define ARCH_CPU_32_BITS 1 --#elif defined(__sparc64__) -+#elif defined(__s390x__) -+#define ARCH_CPU_S390X 1 -+#define ARCH_CPU_64_BITS 1 -+#elif defined(__s390__) -+#define ARCH_CPU_S390 1 -+#define ARCH_CPU_32_BITS 1 -+#elif defined(__sparc__) && !defined(__arch64) - #define ARCH_CPU_SPARC 1 -+#define ARCH_CPU_32_BITS 1 -+#elif defined(__sparc__) && defined(__arch64) -+#define ARCH_CPU_SPARC64 1 - #define ARCH_CPU_64_BITS 1 - #else - #error Please add support for your architecture in build/build_config.h -diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h ---- xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-12-07 07:27:43.000000000 +0100 -+++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-12-09 14:40:59.602679278 +0100 -@@ -195,7 +195,8 @@ struct ParamTraits { - }; - #endif - --#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))) -+// Although s390 is a 32-bit system it defines size_t as unsigned long -+#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390)))) - // There size_t is a synonym for |unsigned long| ... - template <> - struct ParamTraits { From 79ebf32e1332ae91d7cc9adc2248b9c7514be53c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Jan 2012 11:53:00 +0100 Subject: [PATCH 231/486] Update to 10.0 Beta 6 --- mozilla-193-pkgconfig.patch | 21 ------ mozilla-682832-proxy.patch | 68 ++++++++++---------- mozilla-696393.patch | 65 ------------------- xulrunner-mozconfig | 1 - xulrunner.spec | 123 +++++++++++++++--------------------- 5 files changed, 84 insertions(+), 194 deletions(-) diff --git a/mozilla-193-pkgconfig.patch b/mozilla-193-pkgconfig.patch index a867f22..67ec302 100644 --- a/mozilla-193-pkgconfig.patch +++ b/mozilla-193-pkgconfig.patch @@ -1,24 +1,3 @@ -diff -up xulrunner-1.9.3.0/mozilla-central/config/autoconf.mk.in.pk xulrunner-1.9.3.0/mozilla-central/config/autoconf.mk.in ---- xulrunner-1.9.3.0/mozilla-central/config/autoconf.mk.in.pk 2010-08-06 03:09:27.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/config/autoconf.mk.in 2010-08-16 11:07:52.000000000 +0200 -@@ -58,14 +58,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ - bindir = @bindir@ --includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+includedir = @includedir@/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - libdir = @libdir@ - datadir = @datadir@ - mandir = @mandir@ --idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+idldir = $(datadir)/idl/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - - installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) -+sdkdir = $(libdir)/$(MOZ_APP_NAME)-sdk-$(MOZ_APP_VERSION) - - DIST = $(DEPTH)/dist - LIBXUL_SDK = @LIBXUL_SDK@ diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in --- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 +++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in 2010-08-16 11:12:32.000000000 +0200 diff --git a/mozilla-682832-proxy.patch b/mozilla-682832-proxy.patch index 076b2a6..0f643f9 100644 --- a/mozilla-682832-proxy.patch +++ b/mozilla-682832-proxy.patch @@ -1,7 +1,7 @@ -diff -up mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp ---- mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 2011-11-04 22:34:19.000000000 +0100 -+++ mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp 2011-12-07 11:36:29.302312405 +0100 -@@ -42,6 +42,8 @@ +diff -up xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp.682832 xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp +--- xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp.682832 2012-01-18 17:25:24.000000000 +0100 ++++ xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp 2012-01-23 15:40:14.803170842 +0100 +@@ -44,6 +44,8 @@ #include "nsMemory.h" #include "prlink.h" #include "nsComponentManagerUtils.h" @@ -10,7 +10,7 @@ diff -up mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 mozi #include #include -@@ -56,6 +58,7 @@ typedef struct _GVariant GVariant; +@@ -60,6 +62,7 @@ typedef struct _GVariant GVariant; # define G_VARIANT_TYPE_STRING ((const GVariantType *) "s") # define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o") # define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g") @@ -18,7 +18,7 @@ diff -up mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 mozi #endif #define GSETTINGS_FUNCTIONS \ -@@ -68,6 +71,7 @@ typedef struct _GVariant GVariant; +@@ -72,6 +75,7 @@ typedef struct _GVariant GVariant; FUNC(g_variant_get_int32, gint32, (GVariant* variant)) \ FUNC(g_variant_get_boolean, gboolean, (GVariant* variant)) \ FUNC(g_variant_get_string, const char *, (GVariant* value, gsize* length)) \ @@ -26,7 +26,7 @@ diff -up mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 mozi FUNC(g_variant_is_of_type, gboolean, (GVariant* value, const GVariantType* type)) \ FUNC(g_variant_new_int32, GVariant *, (gint32 value)) \ FUNC(g_variant_new_boolean, GVariant *, (gboolean value)) \ -@@ -91,6 +95,7 @@ GSETTINGS_FUNCTIONS +@@ -95,6 +99,7 @@ GSETTINGS_FUNCTIONS #define g_variant_get_int32 _g_variant_get_int32 #define g_variant_get_boolean _g_variant_get_boolean #define g_variant_get_string _g_variant_get_string @@ -34,7 +34,7 @@ diff -up mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 mozi #define g_variant_is_of_type _g_variant_is_of_type #define g_variant_new_int32 _g_variant_new_int32 #define g_variant_new_boolean _g_variant_new_boolean -@@ -263,6 +268,49 @@ nsGSettingsCollection::GetInt(const nsAC +@@ -267,6 +272,49 @@ nsGSettingsCollection::GetInt(const nsAC return NS_OK; } @@ -81,12 +81,12 @@ diff -up mozilla-release/toolkit/system/gnome/nsGSettingsService.cpp.682832 mozi + return NS_OK; +} + - nsresult - nsGSettingsService::Init() - { -diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp ---- mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 2011-11-04 22:34:19.000000000 +0100 -+++ mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2011-12-07 11:40:48.432502399 +0100 + // These types are local to nsGSettingsService::Init, but ISO C++98 doesn't + // allow a template (ArrayLength) to be instantiated based on a local type. + // Boo-urns! +diff -up xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +--- xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 2012-01-18 17:25:24.000000000 +0100 ++++ xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2012-01-23 15:39:23.083172529 +0100 @@ -49,6 +49,7 @@ #include "nsPrintfCString.h" #include "nsNetUtil.h" @@ -100,7 +100,7 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. nsCOMPtr mGConf; + nsCOMPtr mGSettings; - PRBool IsProxyMode(const char* aMode); + bool IsProxyMode(const char* aMode); nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult); nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); + nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); @@ -116,7 +116,7 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. return NS_OK; } -@@ -87,14 +92,30 @@ nsUnixSystemProxySettings::IsProxyMode(c +@@ -87,14 +92,31 @@ nsUnixSystemProxySettings::IsProxyMode(c nsresult nsUnixSystemProxySettings::GetPACURI(nsACString& aResult) { @@ -141,7 +141,7 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. + return NS_OK; + } } -- + - return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"), - aResult); + if (mGConf && IsProxyMode("auto")) { @@ -153,8 +153,8 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. + return NS_OK; } - static PRBool -@@ -231,7 +252,38 @@ nsUnixSystemProxySettings::SetProxyResul + static bool +@@ -231,7 +253,38 @@ nsUnixSystemProxySettings::SetProxyResul PRInt32 port; rv = mGConf->GetInt(portKey, &port); NS_ENSURE_SUCCESS(rv, rv); @@ -193,13 +193,13 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. SetProxyResult(aType, host, port, aResult); return NS_OK; } -@@ -271,17 +323,17 @@ static PRBool ConvertToIPV6Addr(const ns +@@ -271,17 +324,17 @@ static bool ConvertToIPV6Addr(const nsAC PRIPv6Addr* aAddr) { PRNetAddr addr; + // try to convert hostname to IP if (PR_StringToNetAddr(PromiseFlatCString(aName).get(), &addr) != PR_SUCCESS) - return PR_FALSE; + return false; - PRIPv6Addr ipv6; // convert parsed address to IPv6 @@ -212,20 +212,20 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. - memcpy(&ipv6, &addr.ipv6.ip, sizeof(PRIPv6Addr)); + memcpy(aAddr, &addr.ipv6.ip, sizeof(PRIPv6Addr)); } else { - return PR_FALSE; + return false; } -@@ -289,8 +341,8 @@ static PRBool ConvertToIPV6Addr(const ns - return PR_TRUE; +@@ -289,8 +342,8 @@ static bool ConvertToIPV6Addr(const nsAC + return true; } --static PRBool GConfIgnoreHost(const nsACString& aIgnore, +-static bool GConfIgnoreHost(const nsACString& aIgnore, - const nsACString& aHost) +static bool HostIgnoredByProxy(const nsACString& aIgnore, + const nsACString& aHost) { if (aIgnore.Equals(aHost, nsCaseInsensitiveCStringComparator())) - return PR_TRUE; -@@ -321,8 +373,9 @@ static PRBool GConfIgnoreHost(const nsAC + return true; +@@ -321,8 +374,9 @@ static bool GConfIgnoreHost(const nsACSt slash = end; } @@ -234,9 +234,9 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. - if (!ConvertToIPV6Addr(aIgnore, &ignoreAddr) || + if (!ConvertToIPV6Addr(ignoreStripped, &ignoreAddr) || !ConvertToIPV6Addr(aHost, &hostAddr)) - return PR_FALSE; + return false; -@@ -355,7 +408,7 @@ nsUnixSystemProxySettings::GetProxyFromG +@@ -355,7 +409,7 @@ nsUnixSystemProxySettings::GetProxyFromG if (str) { nsAutoString s; if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) { @@ -245,7 +245,7 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. aResult.AppendLiteral("DIRECT"); return NS_OK; } -@@ -392,6 +445,71 @@ nsUnixSystemProxySettings::GetProxyFromG +@@ -392,6 +446,71 @@ nsUnixSystemProxySettings::GetProxyFromG } nsresult @@ -317,7 +317,7 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. nsUnixSystemProxySettings::GetProxyForURI(nsIURI* aURI, nsACString& aResult) { nsCAutoString scheme; -@@ -406,10 +524,15 @@ nsUnixSystemProxySettings::GetProxyForUR +@@ -406,10 +525,15 @@ nsUnixSystemProxySettings::GetProxyForUR rv = aURI->GetPort(&port); NS_ENSURE_SUCCESS(rv, rv); @@ -336,9 +336,9 @@ diff -up mozilla-release/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp. } #define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\ -diff -up mozilla-release/xpcom/system/nsIGSettingsService.idl.682832 mozilla-release/xpcom/system/nsIGSettingsService.idl ---- mozilla-release/xpcom/system/nsIGSettingsService.idl.682832 2011-11-04 22:34:23.000000000 +0100 -+++ mozilla-release/xpcom/system/nsIGSettingsService.idl 2011-12-07 11:32:37.976256951 +0100 +diff -up xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl.682832 xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl +--- xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl.682832 2012-01-18 17:25:28.000000000 +0100 ++++ xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl 2012-01-23 15:32:29.890186340 +0100 @@ -39,7 +39,7 @@ #include "nsISupports.idl" #include "nsIArray.idl" diff --git a/mozilla-696393.patch b/mozilla-696393.patch index 8859d97..26c558f 100644 --- a/mozilla-696393.patch +++ b/mozilla-696393.patch @@ -1,68 +1,3 @@ -diff -up xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp ---- xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 2011-12-07 07:28:08.000000000 +0100 -+++ xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp 2011-12-09 15:06:10.584998410 +0100 -@@ -200,52 +200,21 @@ invoke_copy_to_stack(PRUint32 paramCount - } - } - -+typedef nsresult (*vtable_func)(nsISupports *, PRUint32, PRUint32, PRUint32, PRUint32, double, double); -+ - EXPORT_XPCOM_API(nsresult) - NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, - PRUint32 paramCount, nsXPTCVariant* params) - { -- PRUint32 *vtable = *(PRUint32 **)that; -- PRUint32 method = vtable[methodIndex]; -+ vtable_func *vtable = *reinterpret_cast(that); -+ vtable_func method = vtable[methodIndex]; - PRUint32 overflow = invoke_count_words (paramCount, params); -- PRUint32 result; -- -- __asm__ __volatile__ -- ( -- "lr 7,15\n\t" -- "ahi 7,-32\n\t" -- -- "lr 3,%3\n\t" -- "sll 3,2\n\t" -- "lcr 3,3\n\t" -- "l 2,0(15)\n\t" -- "la 15,0(3,7)\n\t" -- "st 2,0(15)\n\t" -+ PRUint32 *stack_space = reinterpret_cast(__builtin_alloca((overflow + 8 /* 4 32-bits gpr + 2 64-bits fpr */) * 4)); - -- "lr 2,%1\n\t" -- "lr 3,%2\n\t" -- "la 4,96(15)\n\t" -- "lr 5,%3\n\t" -- "basr 14,%4\n\t" -+ invoke_copy_to_stack(paramCount, params, stack_space, overflow); - -- "lr 2,%5\n\t" -- "ld 0,112(7)\n\t" -- "ld 2,120(7)\n\t" -- "lm 3,6,96(7)\n\t" -- "basr 14,%6\n\t" -+ PRUint32 *d_gpr = stack_space + overflow; -+ double *d_fpr = reinterpret_cast(d_gpr + 4); - -- "la 15,32(7)\n\t" -- -- "lr %0,2\n\t" -- : "=r" (result) -- : "r" (paramCount), -- "r" (params), -- "r" (overflow), -- "a" (invoke_copy_to_stack), -- "a" (that), -- "a" (method) -- : "2", "3", "4", "5", "6", "7", "14", "cc", "memory", "%f0", "%f2" -- ); -- -- return result; -+ return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1]); - } -- diff -up xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp --- xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 2011-12-07 07:28:08.000000000 +0100 +++ xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp 2011-12-09 15:07:07.609097348 +0100 diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 9391b82..3ec51d2 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -11,7 +11,6 @@ ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --with-system-libvpx ac_add_options --enable-system-hunspell -ac_add_options --enable-system-sqlite ac_add_options --enable-system-cairo ac_add_options --with-pthreads ac_add_options --disable-strip diff --git a/xulrunner.spec b/xulrunner.spec index 51277cd..cf81a0b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,21 +1,34 @@ +# Use system sqlite? +%if 0%{?fedora} <= 15 +%define system_sqlite 0 +%else +%define system_sqlite 1 +%endif + # Minimal required versions %global nspr_version 4.8.8 %global nss_version 3.13.1 %global cairo_version 1.10.2 %global freetype_version 2.1.9 -%global sqlite_version 3.7.4 %global libnotify_version 0.7.0 +%if %{?system_sqlite} +%global sqlite_version 3.7.7.1 +# The actual sqlite version (see #480989): +%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) +%endif + # gecko_dir_ver should be set to the version in our directory names # alpha_version should be set to the alpha number if using an alpha, 0 otherwise # beta_version should be set to the beta number if using a beta, 0 otherwise # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 0 +%global beta_version 6 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} +%global tarballdir mozilla-release # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -24,27 +37,21 @@ %global enable_mozilla_crashreporter 0 %endif -# The actual sqlite version (see #480989): -%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) - -%global tarballdir mozilla-release %if %{alpha_version} > 0 %global pre_version a%{alpha_version} -%global pre_name alpha%{alpha_version} %global tarballdir mozilla-beta %endif %if %{beta_version} > 0 %global pre_version b%{beta_version} -%global pre_name beta%{beta_version} %global tarballdir mozilla-beta %endif %if %{rc_version} > 0 %global pre_version rc%{rc_version} -%global pre_name rc%{rc_version} %global tarballdir mozilla-release %endif + %if %{defined pre_version} -%global gecko_verrel %{expand:%%{version}}-%{pre_name} +%global gecko_verrel %{expand:%%{version}}-%{pre_version} %global pre_tag .%{pre_version} %else %global gecko_verrel %{expand:%%{version}} @@ -52,8 +59,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 9.0.1 -Release: 4%{?pre_tag}%{?dist} +Version: 10.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -69,19 +76,15 @@ Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch %if 0%{?fedora} <= 15 -Patch16: add-gtkmozembed-9.0.patch +Patch16: add-gtkmozembed-10.0.patch %endif -Patch18: xulrunner-9.0-secondary-ipc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch21: mozilla-libjpeg-turbo.patch Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches -Patch34: xulrunner-2.0-network-link-service.patch -Patch35: xulrunner-2.0-NetworkManager09.patch Patch38: mozilla-696393.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=707993 Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch @@ -107,7 +110,6 @@ BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: libXt-devel BuildRequires: libXrender-devel BuildRequires: hunspell-devel -BuildRequires: sqlite-devel >= %{sqlite_version} BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel >= %{libnotify_version} @@ -119,9 +121,14 @@ BuildRequires: libvpx-devel Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} -Requires: sqlite >= %{sqlite_build_version} Provides: gecko-libs = %{gecko_verrel} Provides: gecko-libs%{?_isa} = %{gecko_verrel} +Conflicts: firefox < 3.6 + +%if %{?system_sqlite} +BuildRequires: sqlite-devel >= %{sqlite_version} +Requires: sqlite >= %{sqlite_build_version} +%endif %description XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM @@ -157,7 +164,9 @@ Requires: freetype-devel >= %{freetype_version} Requires: libXt-devel Requires: libXrender-devel Requires: hunspell-devel +%if %{?system_sqlite} Requires: sqlite-devel +%endif Requires: startup-notification-devel Requires: alsa-lib-devel Requires: libnotify-devel @@ -201,18 +210,14 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed %endif -%patch18 -p2 -b .secondary-ipc %patch20 -p2 -b .pk -%patch21 -p2 -b .jpeg-turbo %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -%patch34 -p1 -b .network-link-service -%patch35 -p1 -b .NetworkManager09 %patch38 -p2 -b .696393 %patch39 -p1 -b .707993 -%patch40 -p1 -b .682832 +%patch40 -p2 -b .682832 %patch41 -p2 -b .secondary-build %{__rm} -f .mozconfig @@ -221,6 +226,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %{__cat} %{SOURCE11} >> .mozconfig %endif +%if %{?system_sqlite} +echo "ac_add_options --enable-system-sqlite" >> .mozconfig +%else +echo "ac_add_options --disable-system-sqlite" >> .mozconfig +%endif + # s390(x) fails to start with jemalloc enabled %ifarch s390 s390x echo "ac_add_options --disable-jemalloc" >> .mozconfig @@ -251,6 +262,7 @@ echo "ac_add_options --disable-tracejit" >> .mozconfig #--------------------------------------------------------------------- %build +%if %{?system_sqlite} # Do not proceed with build if the sqlite require would be broken: # make sure the minimum requirement is non-empty, ... sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 @@ -259,6 +271,7 @@ case "%{sqlite_build_version}" in "$sqlite_version"*) ;; *) exit 1 ;; esac +%endif cd %{tarballdir} @@ -300,19 +313,11 @@ make buildsymbols %install cd %{tarballdir} -INTERNAL_APP_SDK_NAME=%{name}-sdk-%{gecko_dir_ver} -MOZ_APP_SDK_DIR=%{_libdir}/${INTERNAL_APP_SDK_NAME} - # set up our prefs before install, so it gets pulled in to omni.jar %{__cp} -p %{SOURCE12} dist/bin/defaults/pref/all-redhat.js DESTDIR=$RPM_BUILD_ROOT make install -%{__mkdir_p} $RPM_BUILD_ROOT/%{mozappdir} \ - $RPM_BUILD_ROOT%{_datadir}/idl/${INTERNAL_APP_SDK_NAME} \ - $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_SDK_NAME} -%{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications} - # Start script install %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} %{__cat} %{SOURCE21} | %{__sed} -e 's,XULRUNNER_VERSION,%{gecko_dir_ver},g' > \ @@ -321,14 +326,6 @@ DESTDIR=$RPM_BUILD_ROOT make install %{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config -# Prepare our devel package -%{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} -%{__mkdir_p} $RPM_BUILD_ROOT/%{_datadir}/idl/${INTERNAL_APP_SDK_NAME} -%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig - -%{__cp} -rL dist/include/* \ - $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} - # Copy pc files (for compatibility with 1.9.1) %{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul.pc \ $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-unstable.pc @@ -349,41 +346,18 @@ cat > ${genheader}.h << EOF EOF } -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_SDK_NAME} +INTERNAL_APP_NAME=%{name}-%{gecko_dir_ver} + +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} install_file "mozilla-config" -install_file "jsautocfg" install_file "js-config" popd -%{__install} -p -c -m 755 dist/bin/xpcshell \ - $RPM_BUILD_ROOT/%{mozappdir} - -%{__rm} -rf $RPM_BUILD_ROOT/%{_includedir}/%{name}-%{gecko_dir_ver} -%{__rm} -rf $RPM_BUILD_ROOT/%{_datadir}/idl/%{name}-%{gecko_dir_ver} - -%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/include -ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME} \ - $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/include - -%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/idl -ln -s %{_datadir}/idl/${INTERNAL_APP_SDK_NAME} \ - $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/idl - -%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/include -ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME} \ - $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/include - -%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/idl -ln -s %{_datadir}/idl/${INTERNAL_APP_SDK_NAME} \ - $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/idl - -find $RPM_BUILD_ROOT/%{_includedir} -type f -name "*.h" | xargs chmod 644 -find $RPM_BUILD_ROOT/%{_datadir}/idl -type f -name "*.idl" | xargs chmod 644 - -%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/lib/*.so -pushd $RPM_BUILD_ROOT%{mozappdir} +# Link libraries in sdk directory instead of copying them: +pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/lib for i in *.so; do - ln -s %{mozappdir}/$i $RPM_BUILD_ROOT${MOZ_APP_SDK_DIR}/sdk/lib/$i + rm $i + ln -s %{mozappdir}/$i $i done popd @@ -440,7 +414,7 @@ fi %ghost %{mozappdir}/components/xpti.dat %{mozappdir}/components/*.so %{mozappdir}/components/*.manifest -%{mozappdir}/omni.jar +%{mozappdir}/omni.ja %{mozappdir}/plugins %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client @@ -452,7 +426,6 @@ fi %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %{mozappdir}/plugin-container -%{mozappdir}/hyphenation/* %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter @@ -462,15 +435,19 @@ fi %files devel %defattr(-,root,root,-) +%dir %{_libdir}/%{name}-devel-* %{_datadir}/idl/%{name}*%{gecko_dir_ver} %{_includedir}/%{name}*%{gecko_dir_ver} -%{_libdir}/%{name}-sdk-*/ +%{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell #--------------------------------------------------------------------- %changelog +* Mon Jan 23 2012 Martin Stransky 10.0-1 +- Update to 10.0 Beta 6 + * Thu Jan 19 2012 Dennis Gilmore - 9.0.1-4 - add missing v from armv7hl and armv7hnl config options From b822772ed373e13a8f358e71798ab107d8d3ff15 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Jan 2012 12:03:07 +0100 Subject: [PATCH 232/486] Update to 10.0 Beta 6 - removed old sources --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index 4f07a6e..88de1ad 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -7cf2bd379792a9b232267c6a79680566 xulrunner-9.0.1.source.tar.bz2 -7a6cc712d941052de20e482db3df229e xulrunner-10.0b5.source.tar.bz2 36ee9582e5fedd118b2ae6d529c40320 xulrunner-10.0b6.source.tar.bz2 From 8fec9ed95d48021ecd848ff93a8aec0dfd782fe7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Jan 2012 14:02:48 +0100 Subject: [PATCH 233/486] added upstream build patch --- mozilla-706724.patch | 12 ++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 mozilla-706724.patch diff --git a/mozilla-706724.patch b/mozilla-706724.patch new file mode 100644 index 0000000..b0792ed --- /dev/null +++ b/mozilla-706724.patch @@ -0,0 +1,12 @@ +diff -up mozilla-beta/ipc/chromium/src/base/file_util.cc.old mozilla-beta/ipc/chromium/src/base/file_util.cc +--- mozilla-beta/ipc/chromium/src/base/file_util.cc.old 2012-01-25 13:48:11.000000000 +0100 ++++ mozilla-beta/ipc/chromium/src/base/file_util.cc 2012-01-25 13:52:25.096659244 +0100 +@@ -8,7 +8,7 @@ + #include + #endif + #include +-#if defined(ANDROID) ++#if defined(ANDROID) || defined(OS_POSIX) + #include + #endif + diff --git a/xulrunner.spec b/xulrunner.spec index cf81a0b..0054f32 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -91,6 +91,7 @@ Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch Patch40: mozilla-682832-proxy.patch # cherry-picked from 13afcd4c097c Patch41: xulrunner-9.0-secondary-build-fix.patch +Patch42: mozilla-706724.patch # --------------------------------------------------- @@ -219,6 +220,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch39 -p1 -b .707993 %patch40 -p2 -b .682832 %patch41 -p2 -b .secondary-build +%patch42 -p1 -b .706724 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 6a04c874e97f0a688e4a869472537394f51fbcfe Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Jan 2012 15:15:59 +0100 Subject: [PATCH 234/486] added a build patch --- mozilla-file.patch | 13 +++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 mozilla-file.patch diff --git a/mozilla-file.patch b/mozilla-file.patch new file mode 100644 index 0000000..ae08792 --- /dev/null +++ b/mozilla-file.patch @@ -0,0 +1,13 @@ +diff -up mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.old mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc +--- mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.old 2012-01-24 09:00:00.000000000 +0100 ++++ mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc 2012-01-25 15:10:53.716767823 +0100 +@@ -6,6 +6,9 @@ + + #include + #include ++#if defined(ANDROID) || defined(OS_POSIX) ++#include ++#endif + + #include "eintr_wrapper.h" + #include "base/logging.h" diff --git a/xulrunner.spec b/xulrunner.spec index 0054f32..99005b0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -92,6 +92,7 @@ Patch40: mozilla-682832-proxy.patch # cherry-picked from 13afcd4c097c Patch41: xulrunner-9.0-secondary-build-fix.patch Patch42: mozilla-706724.patch +Patch43: mozilla-file.patch # --------------------------------------------------- @@ -221,6 +222,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch40 -p2 -b .682832 %patch41 -p2 -b .secondary-build %patch42 -p1 -b .706724 +%patch43 -p1 -b .file %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 92f67d0c38207abbcbb4d9df82bcca5cc8cf2d25 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Jan 2012 15:31:29 +0100 Subject: [PATCH 235/486] added a build patch --- mozilla-file.patch | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/mozilla-file.patch b/mozilla-file.patch index ae08792..14b0182 100644 --- a/mozilla-file.patch +++ b/mozilla-file.patch @@ -1,6 +1,19 @@ -diff -up mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.old mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc ---- mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.old 2012-01-24 09:00:00.000000000 +0100 -+++ mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc 2012-01-25 15:10:53.716767823 +0100 +diff -up mozilla-beta/ipc/chromium/src/base/file_util_linux.cc.file mozilla-beta/ipc/chromium/src/base/file_util_linux.cc +--- mozilla-beta/ipc/chromium/src/base/file_util_linux.cc.file 2012-01-24 09:00:00.000000000 +0100 ++++ mozilla-beta/ipc/chromium/src/base/file_util_linux.cc 2012-01-25 15:30:43.707796295 +0100 +@@ -5,6 +5,9 @@ + #include "base/file_util.h" + + #include ++#if defined(ANDROID) || defined(OS_POSIX) ++#include ++#endif + + #include + #include +diff -up mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc +--- mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file 2012-01-24 09:00:00.000000000 +0100 ++++ mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc 2012-01-25 15:13:11.947771212 +0100 @@ -6,6 +6,9 @@ #include From bdde45548cda25100e804b1a73316945cedd8753 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Jan 2012 15:59:11 +0100 Subject: [PATCH 236/486] updated build patch --- mozilla-file.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mozilla-file.patch b/mozilla-file.patch index 14b0182..407ef2b 100644 --- a/mozilla-file.patch +++ b/mozilla-file.patch @@ -24,3 +24,15 @@ diff -up mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file mozill #include "eintr_wrapper.h" #include "base/logging.h" +diff -up mozilla-beta/ipc/chromium/src/base/time_posix.cc.file mozilla-beta/ipc/chromium/src/base/time_posix.cc +--- mozilla-beta/ipc/chromium/src/base/time_posix.cc.file 2012-01-24 09:00:00.000000000 +0100 ++++ mozilla-beta/ipc/chromium/src/base/time_posix.cc 2012-01-25 15:58:12.537834753 +0100 +@@ -8,7 +8,7 @@ + #include + #endif + #include +-#ifdef ANDROID ++#if defined(ANDROID) || defined(OS_POSIX) + #include + #else + #include From bb278defaa888e1caaf2540ce79183f574155ecc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Jan 2012 16:56:49 +0100 Subject: [PATCH 237/486] updated build patch --- mozilla-file.patch | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mozilla-file.patch b/mozilla-file.patch index 407ef2b..14b0182 100644 --- a/mozilla-file.patch +++ b/mozilla-file.patch @@ -24,15 +24,3 @@ diff -up mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file mozill #include "eintr_wrapper.h" #include "base/logging.h" -diff -up mozilla-beta/ipc/chromium/src/base/time_posix.cc.file mozilla-beta/ipc/chromium/src/base/time_posix.cc ---- mozilla-beta/ipc/chromium/src/base/time_posix.cc.file 2012-01-24 09:00:00.000000000 +0100 -+++ mozilla-beta/ipc/chromium/src/base/time_posix.cc 2012-01-25 15:58:12.537834753 +0100 -@@ -8,7 +8,7 @@ - #include - #endif - #include --#ifdef ANDROID -+#if defined(ANDROID) || defined(OS_POSIX) - #include - #else - #include From 69d464142cd464f30a2d938dfbb847e2554edec4 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 30 Jan 2012 13:43:17 -0500 Subject: [PATCH 238/486] rebuild for libvpx 1.0.0 --- mozilla-722127.patch | 74 ++++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 13 ++++++-- 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 mozilla-722127.patch diff --git a/mozilla-722127.patch b/mozilla-722127.patch new file mode 100644 index 0000000..63a9e0a --- /dev/null +++ b/mozilla-722127.patch @@ -0,0 +1,74 @@ +# HG changeset patch +# Parent 0a6f3638cdaba9d3b5ef2eef73a42b2a167dc52a +# User ojab +Bug 722127 - Build --with-system-libvpx is broken for libvpx-1.0.0 + +diff -up xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-10.0/mozilla-beta/configure.in +--- xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 2012-01-24 02:59:49.000000000 -0500 ++++ xulrunner-10.0/mozilla-beta/configure.in 2012-01-30 13:11:22.303053551 -0500 +@@ -5616,20 +5616,20 @@ if test -n "$MOZ_WEBM"; then + [MOZ_NATIVE_LIBVPX_DEC_TEST=1], + ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])) + if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then +- AC_MSG_CHECKING([for libvpx version >= v0.9.7]) +- dnl We need at least v0.9.7 to fix several crash bugs (for which we +- dnl had local patches prior to v0.9.7). ++ AC_MSG_CHECKING([for libvpx version >= v1.0.0]) ++ dnl We need at least v1.0.0 to fix several crash bugs (for which we ++ dnl had local patches prior to v1.0.0). + dnl + dnl This is a terrible test for the library version, but we don't + dnl have a good one. There is no version number in a public header, + dnl and testing the headers still doesn't guarantee we link against + dnl the right version. While we could call vpx_codec_version() at + dnl run-time, that would break cross-compiling. There are no +- dnl additional exported symbols between the v0.9.7 release and the +- dnl v0.9.6 one to check for. ++ dnl additional exported decoder symbols between the v1.0.0 release ++ dnl and the v0.9.7 one to check for. + AC_TRY_COMPILE([ + #include +- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) ++ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS) + #error "test failed." + #endif + ], +@@ -5639,7 +5639,7 @@ if test -n "$MOZ_WEBM"; then + MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include" + MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"], + [AC_MSG_RESULT([no]) +- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])]) ++ AC_MSG_ERROR([--with-system-libvpx requested but it is not v1.0.0 or later])]) + fi + CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS +diff -up xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 xulrunner-10.0/mozilla-beta/configure +--- xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 2012-01-30 13:11:47.805847514 -0500 ++++ xulrunner-10.0/mozilla-beta/configure 2012-01-30 13:14:07.818716354 -0500 +@@ -17727,14 +17727,14 @@ else + fi + + if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then +- echo $ac_n "checking for libvpx version >= v0.9.7""... $ac_c" 1>&6 +-echo "configure:17732: checking for libvpx version >= v0.9.7" >&5 ++ echo $ac_n "checking for libvpx version >= v1.0.0""... $ac_c" 1>&6 ++echo "configure:17732: checking for libvpx version >= v1.0.0" >&5 + cat > conftest.$ac_ext < +- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) ++ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS) + #error "test failed." + #endif + +@@ -17753,7 +17753,7 @@ else + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +- { echo "configure: error: --with-system-libvpx requested but it is not v0.9.7 or later" 1>&2; exit 1; } ++ { echo "configure: error: --with-system-libvpx requested but it is not v1.0.0 or later" 1>&2; exit 1; } + fi + rm -f conftest* + fi diff --git a/xulrunner.spec b/xulrunner.spec index 99005b0..3ae8373 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -11,6 +11,7 @@ %global cairo_version 1.10.2 %global freetype_version 2.1.9 %global libnotify_version 0.7.0 +%global libvpx_version 1.0.0 %if %{?system_sqlite} %global sqlite_version 3.7.7.1 @@ -60,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 10.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -93,6 +94,10 @@ Patch40: mozilla-682832-proxy.patch Patch41: xulrunner-9.0-secondary-build-fix.patch Patch42: mozilla-706724.patch Patch43: mozilla-file.patch +# Needed to detect/use libvpx-1.0.0 +# https://bugzilla.mozilla.org/show_bug.cgi?id=722127 +Patch44: mozilla-722127.patch + # --------------------------------------------------- @@ -118,7 +123,7 @@ BuildRequires: libnotify-devel >= %{libnotify_version} BuildRequires: mesa-libGL-devel BuildRequires: yasm BuildRequires: libcurl-devel -BuildRequires: libvpx-devel +BuildRequires: libvpx-devel >= %{libvpx_version} Requires: mozilla-filesystem Requires: nspr >= %{nspr_version} @@ -223,6 +228,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch41 -p2 -b .secondary-build %patch42 -p1 -b .706724 %patch43 -p1 -b .file +%patch44 -p2 -b .vpx1.0.0 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -449,6 +455,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jan 30 2012 Tom Callaway 10.0-2 +- rebuild against libvpx 1.0.0 (and BR 1.0.0 or greater) + * Mon Jan 23 2012 Martin Stransky 10.0-1 - Update to 10.0 Beta 6 From 39c23474f1dfa98713f65194a9e9ea448cd97e8c Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 30 Jan 2012 17:10:16 -0500 Subject: [PATCH 239/486] fix issues with ftbfs in rawhide --- xulrunner-10.0-gcc47.patch | 25 +++++++++++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 xulrunner-10.0-gcc47.patch diff --git a/xulrunner-10.0-gcc47.patch b/xulrunner-10.0-gcc47.patch new file mode 100644 index 0000000..91a948a --- /dev/null +++ b/xulrunner-10.0-gcc47.patch @@ -0,0 +1,25 @@ +diff -up mozilla-beta/ipc/chromium/src/base/time_posix.cc.gcc47 mozilla-beta/ipc/chromium/src/base/time_posix.cc +--- mozilla-beta/ipc/chromium/src/base/time_posix.cc.gcc47 2012-01-24 03:00:00.000000000 -0500 ++++ mozilla-beta/ipc/chromium/src/base/time_posix.cc 2012-01-30 14:12:49.198472212 -0500 +@@ -14,6 +14,8 @@ + #include + #endif + ++#include ++ + #include + + #include "base/basictypes.h" +diff -up mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-beta/toolkit/crashreporter/client/Makefile.in +--- mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-01-30 14:41:14.475441039 -0500 ++++ mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-01-30 14:43:03.587646656 -0500 +@@ -69,6 +69,9 @@ CPPSRCS = \ + $(STDCXX_COMPAT) \ + $(NULL) + ++# Needed for moz_free ++LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc ++ + ifeq ($(OS_ARCH),WINNT) + CPPSRCS += crashreporter_win.cpp + LIBS += \ diff --git a/xulrunner.spec b/xulrunner.spec index 3ae8373..1b9c643 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 10.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -79,6 +79,8 @@ Patch14: xulrunner-2.0-chromium-types.patch %if 0%{?fedora} <= 15 Patch16: add-gtkmozembed-10.0.patch %endif +Patch17: xulrunner-10.0-gcc47.patch + # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -217,6 +219,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed %endif +%patch17 -p1 -b .gcc47 %patch20 -p2 -b .pk %patch23 -p1 -b .wmclass @@ -455,6 +458,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jan 30 2012 Tom Callaway 10.0-3 +- fix issues causing ftbfs in rawhide + * Mon Jan 30 2012 Tom Callaway 10.0-2 - rebuild against libvpx 1.0.0 (and BR 1.0.0 or greater) From 8862da623933e1b5224ef727fd407ec18332c240 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 31 Jan 2012 10:01:48 +0100 Subject: [PATCH 240/486] Fixed fedora 15 spec --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 322c1b3..1b9c643 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -275,6 +275,7 @@ echo "ac_add_options --disable-tracejit" >> .mozconfig #--------------------------------------------------------------------- %build +%if %{?system_sqlite} # Do not proceed with build if the sqlite require would be broken: # make sure the minimum requirement is non-empty, ... sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 From ac664fef2779d84a6e9581b30ed905658c5d1411 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 31 Jan 2012 11:10:20 +0100 Subject: [PATCH 241/486] Update to 10.0 final --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f56d692..2e88d56 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-9.0.source.tar.bz2 /xulrunner-9.0.1.source.tar.bz2 /xulrunner-10.0b6.source.tar.bz2 +/xulrunner-10.0.source.tar.bz2 diff --git a/sources b/sources index 88de1ad..f9d33d7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -36ee9582e5fedd118b2ae6d529c40320 xulrunner-10.0b6.source.tar.bz2 +13c61203ccfa583e5a54b4dc22f41233 xulrunner-10.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 1b9c643..ba55f1b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 6 +%global beta_version 0 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 10.0 -Release: 3%{?pre_tag}%{?dist} +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -458,6 +458,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 31 2012 Jan Horak - 10.0-1 +- Update to 10.0 + * Mon Jan 30 2012 Tom Callaway 10.0-3 - fix issues causing ftbfs in rawhide From 2dfca3c343b1734fc253184907403662143adba8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 31 Jan 2012 12:10:48 +0100 Subject: [PATCH 242/486] Fixed nspr version --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ba55f1b..676beb0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -6,7 +6,7 @@ %endif # Minimal required versions -%global nspr_version 4.8.8 +%global nspr_version 4.8.9 %global nss_version 3.13.1 %global cairo_version 1.10.2 %global freetype_version 2.1.9 From 5acc2c9e63471a92de943bf4d08c41c9198fe8de Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 9 Feb 2012 09:08:00 +0100 Subject: [PATCH 243/486] Update to 10.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2e88d56..944f4cc 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-9.0.1.source.tar.bz2 /xulrunner-10.0b6.source.tar.bz2 /xulrunner-10.0.source.tar.bz2 +/xulrunner-10.0.1.source.tar.bz2 diff --git a/sources b/sources index f9d33d7..0c40318 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -13c61203ccfa583e5a54b4dc22f41233 xulrunner-10.0.source.tar.bz2 +265c53120fd923c742164b0002ebbf6c xulrunner-10.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 676beb0..4e98cb0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -60,7 +60,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 10.0 +Version: 10.0.1 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -458,6 +458,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Feb 9 2012 Jan Horak - 10.0.1-1 +- Update to 10.0.1 + * Tue Jan 31 2012 Jan Horak - 10.0-1 - Update to 10.0 From 0b7487b59bebcf43b1fe39986b3077951ed5d492 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 14 Feb 2012 16:07:40 +0100 Subject: [PATCH 244/486] Allow network manager to handle the offline status --- xulrunner-redhat-default-prefs.js | 2 ++ xulrunner.spec | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xulrunner-redhat-default-prefs.js b/xulrunner-redhat-default-prefs.js index 7177d9b..15a1e2a 100644 --- a/xulrunner-redhat-default-prefs.js +++ b/xulrunner-redhat-default-prefs.js @@ -4,3 +4,5 @@ pref("general.smoothScroll", true); pref("intl.locale.matchOS", true); pref("network.manage-offline-status", true); pref("toolkit.storage.synchronous", 0); +pref("toolkit.networkmanager.disable", false); +pref("offline.autoDetect", true); diff --git a/xulrunner.spec b/xulrunner.spec index 4e98cb0..49da3f8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 10.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -458,6 +458,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 14 2012 Martin Stransky - 10.0.1-2 +- Allow network manager to handle the offline status + * Thu Feb 9 2012 Jan Horak - 10.0.1-1 - Update to 10.0.1 From b01ac6acd67d5133e6e9d57917c1995cf12058f0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Feb 2012 12:43:58 +0100 Subject: [PATCH 245/486] Added fix for mozbz#727401 --- mozilla-727401.patch | 38 ++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 8 ++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 mozilla-727401.patch diff --git a/mozilla-727401.patch b/mozilla-727401.patch new file mode 100644 index 0000000..df7ff6d --- /dev/null +++ b/mozilla-727401.patch @@ -0,0 +1,38 @@ +# HG changeset patch +# User Benjamin Smedberg +# Date 1329314881 18000 +# Node ID 355163c56ea5ad5037ac6da754252aaea67d2217 +# Parent 81f6b9cbb2a92ac08d1ccc0c1b44d6a5c28f6e2a +Bug 727401 - import libpng overflow patch from http://codereview.chromium.org/9363013 + +diff --git a/media/libpng/pngrutil.c b/media/libpng/pngrutil.c +--- a/media/libpng/pngrutil.c ++++ b/media/libpng/pngrutil.c +@@ -396,18 +396,25 @@ png_decompress_chunk(png_structp png_ptr + #if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \ + defined(PNG_USER_CHUNK_MALLOC_MAX) + else + #endif + if (expanded_size > 0) + { + /* Success (maybe) - really uncompress the chunk. */ + png_size_t new_size = 0; +- png_charp text = png_malloc_warn(png_ptr, +- prefix_size + expanded_size + 1); ++ png_charp text = NULL; ++ /* Need to check for both truncation (64-bit platforms) and integer ++ * overflow. ++ */ ++ if (prefix_size + expanded_size > prefix_size && ++ prefix_size + expanded_size < 0xffffffffU) ++ { ++ text = png_malloc_warn(png_ptr, prefix_size + expanded_size + 1); ++ } + + if (text != NULL) + { + png_memcpy(text, png_ptr->chunkdata, prefix_size); + new_size = png_inflate(png_ptr, + (png_bytep)(png_ptr->chunkdata + prefix_size), + chunklength - prefix_size, + (png_bytep)(text + prefix_size), expanded_size); diff --git a/xulrunner.spec b/xulrunner.spec index 49da3f8..cea743f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 10.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,7 +99,7 @@ Patch43: mozilla-file.patch # Needed to detect/use libvpx-1.0.0 # https://bugzilla.mozilla.org/show_bug.cgi?id=722127 Patch44: mozilla-722127.patch - +Patch45: mozilla-727401.patch # --------------------------------------------------- @@ -232,6 +232,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch42 -p1 -b .706724 %patch43 -p1 -b .file %patch44 -p2 -b .vpx1.0.0 +%patch45 -p1 -b .727401 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -458,6 +459,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 16 2012 Martin Stransky - 10.0.1-3 +- Added fix for mozbz#727401 + * Tue Feb 14 2012 Martin Stransky - 10.0.1-2 - Allow network manager to handle the offline status From d13e1f57a107020f2a8ad8a9d8952c1b91796931 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 27 Feb 2012 12:31:48 +0100 Subject: [PATCH 246/486] Added fix from rhbz#796929 - xulrunner doesn't compile on ARM --- mozilla-724615.patch | 24 ++++++++++++++++++++++++ xulrunner.spec | 10 +++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 mozilla-724615.patch diff --git a/mozilla-724615.patch b/mozilla-724615.patch new file mode 100644 index 0000000..cc78c1b --- /dev/null +++ b/mozilla-724615.patch @@ -0,0 +1,24 @@ +# HG changeset patch +# Parent 6292e55419d1730a2e88a56fd30b2440ce0b393a +# User Raúl Porcel +Bug XXXXXX - Fix TARGET_CPU usage on ARM + + +diff --git a/xpcom/glue/objs.mk b/xpcom/glue/objs.mk +--- a/xpcom/glue/objs.mk ++++ b/xpcom/glue/objs.mk +@@ -71,13 +71,13 @@ XPCOM_GLUENS_SRC_LCPPSRCS = \ + SSE.cpp \ + unused.cpp \ + nsProxyRelease.cpp \ + nsTextFormatter.cpp \ + GenericFactory.cpp \ + FileUtils.cpp \ + $(NULL) + +-ifeq (arm,$(TARGET_CPU)) ++ifneq (,$(filter arm%,$(TARGET_CPU))) + XPCOM_GLUENS_SRC_LCPPSRCS += arm.cpp + endif + + XPCOM_GLUENS_SRC_CPPSRCS = $(addprefix $(topsrcdir)/xpcom/glue/,$(XPCOM_GLUENS_SRC_LCPPSRCS)) diff --git a/xulrunner.spec b/xulrunner.spec index cea743f..abb8931 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 10.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -100,6 +100,7 @@ Patch43: mozilla-file.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=722127 Patch44: mozilla-722127.patch Patch45: mozilla-727401.patch +Patch46: mozilla-724615.patch # --------------------------------------------------- @@ -233,6 +234,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch43 -p1 -b .file %patch44 -p2 -b .vpx1.0.0 %patch45 -p1 -b .727401 +%patch46 -p1 -b .724615 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -255,15 +257,18 @@ echo "ac_add_options --disable-jemalloc" >> .mozconfig echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig +echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif %ifarch armv7hnl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=neon" >> .mozconfig +echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif %ifarch armv5tel echo "ac_add_options --with-arch=armv5te" >> .mozconfig echo "ac_add_options --with-float-abi=soft" >> .mozconfig +echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif %ifnarch %{ix86} x86_64 @@ -459,6 +464,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 27 2012 Martin Stransky - 10.0.1-4 +- Added fix from rhbz#796929 - xulrunner doesn't compile on ARM + * Tue Feb 16 2012 Martin Stransky - 10.0.1-3 - Added fix for mozbz#727401 From 4376a141ad44b67f34a6e181cf256c3cbd6e43f9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 1 Mar 2012 11:41:57 +0100 Subject: [PATCH 247/486] Removed yasm dependency --- xulrunner.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index abb8931..5158b86 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -124,7 +124,6 @@ BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: libnotify-devel >= %{libnotify_version} BuildRequires: mesa-libGL-devel -BuildRequires: yasm BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} From 0a9b6b4f83ce8001e67a1138e76d0571709ace9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 9 Mar 2012 13:48:44 +0100 Subject: [PATCH 248/486] Add fix for secondary arches from mozb#691898 --- mozilla-691898.patch | 285 +++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 7 +- 2 files changed, 291 insertions(+), 1 deletion(-) create mode 100644 mozilla-691898.patch diff --git a/mozilla-691898.patch b/mozilla-691898.patch new file mode 100644 index 0000000..dab2016 --- /dev/null +++ b/mozilla-691898.patch @@ -0,0 +1,285 @@ +From: Mike Hommey +Date: Sat, 24 Dec 2011 09:56:58 +0100 +Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where + YARR JIT is not supported + +--- + js/src/Makefile.in | 21 +++++++++++++-------- + js/src/vm/RegExpObject-inl.h | 28 ++++++---------------------- + js/src/vm/RegExpObject.cpp | 36 ------------------------------------ + js/src/vm/RegExpObject.h | 27 ++++++--------------------- + js/src/yarr/wtfbridge.h | 2 -- + 5 files changed, 25 insertions(+), 89 deletions(-) + +diff --git a/js/src/Makefile.in b/js/src/Makefile.in +index fc48cbd..49f0bdc 100644 +--- a/js/src/Makefile.in ++++ b/js/src/Makefile.in +@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \ + + ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU))) + +-VPATH += $(srcdir)/yarr/pcre \ ++VPATH += $(srcdir)/assembler \ ++ $(srcdir)/assembler/wtf \ ++ $(srcdir)/yarr \ + $(NULL) + + CPPSRCS += \ +- pcre_compile.cpp \ +- pcre_exec.cpp \ +- pcre_tables.cpp \ +- pcre_xclass.cpp \ +- pcre_ucp_searchfuncs.cpp \ ++ Assertions.cpp \ ++ OSAllocatorOS2.cpp \ ++ OSAllocatorPosix.cpp \ ++ OSAllocatorWin.cpp \ ++ PageBlock.cpp \ ++ YarrInterpreter.cpp \ ++ YarrPattern.cpp \ ++ YarrSyntaxChecker.cpp \ + $(NULL) + else + +@@ -1015,10 +1020,10 @@ endif + # Needed to "configure" it correctly. Unfortunately these + # flags wind up being applied to all code in js/src, not just + # the code in js/src/assembler. +-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 ++CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 + + ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT)) +-CXXFLAGS += -DENABLE_JIT=1 ++CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1 + endif + + INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr +diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h +index 5f7817d..91108a7 100644 +--- a/js/src/vm/RegExpObject-inl.h ++++ b/js/src/vm/RegExpObject-inl.h +@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt + return RetType(self); + } + ++#if ENABLE_YARR_JIT + /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ + inline bool + RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) +@@ -337,12 +338,12 @@ RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) + return true; + #endif + } ++#endif + + inline bool + RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, + uintN *parenCount, RegExpFlag flags) + { +-#if ENABLE_YARR_JIT + /* Parse the pattern. */ + ErrorCode yarrError; + YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), +@@ -359,7 +360,7 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream * + * case we have to bytecode compile it. + */ + +-#ifdef JS_METHODJIT ++#if ENABLE_YARR_JIT && defined(JS_METHODJIT) + if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { + if (!cx->compartment->ensureJaegerCompartmentExists(cx)) + return false; +@@ -371,21 +372,11 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream * + } + #endif + ++#if ENABLE_YARR_JIT + codeBlock.setFallBack(true); ++#endif + byteCode = byteCompile(yarrPattern, cx->compartment->regExpAllocator).get(); + return true; +-#else /* !defined(ENABLE_YARR_JIT) */ +- int error = 0; +- compiled = jsRegExpCompile(pattern.chars(), pattern.length(), +- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase, +- multiline() ? JSRegExpMultiline : JSRegExpSingleLine, +- parenCount, &error); +- if (error) { +- reportPCREError(cx, error); +- return false; +- } +- return true; +-#endif + } + + inline bool +@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz + else + result = JSC::Yarr::execute(codeBlock, chars, start, length, output); + #else +- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount); ++ result = JSC::Yarr::interpret(byteCode, chars, start, length, output); + #endif + + if (result == -1) + return Success_NotFound; + +-#if !ENABLE_YARR_JIT +- if (result < 0) { +- reportPCREError(cx, result); +- return Error; +- } +-#endif +- + JS_ASSERT(result >= 0); + return Success; + } +diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp +index f75c6a5..7631dd5 100644 +--- a/js/src/vm/RegExpObject.cpp ++++ b/js/src/vm/RegExpObject.cpp +@@ -251,7 +251,6 @@ Class js::RegExpClass = { + NULL /* trace */ + }; + +-#if ENABLE_YARR_JIT + void + RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) + { +@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err + } + } + +-#else /* !ENABLE_YARR_JIT */ +- +-void +-RegExpPrivateCode::reportPCREError(JSContext *cx, int error) +-{ +-#define REPORT(msg_) \ +- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \ +- return +- switch (error) { +- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); +- case 1: REPORT(JSMSG_TRAILING_SLASH); +- case 2: REPORT(JSMSG_TRAILING_SLASH); +- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 4: REPORT(JSMSG_BAD_QUANTIFIER); +- case 5: REPORT(JSMSG_BAD_QUANTIFIER); +- case 6: REPORT(JSMSG_BAD_CLASS_RANGE); +- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 8: REPORT(JSMSG_BAD_CLASS_RANGE); +- case 9: REPORT(JSMSG_BAD_QUANTIFIER); +- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); +- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); +- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 14: REPORT(JSMSG_MISSING_PAREN); +- case 15: REPORT(JSMSG_BAD_BACKREF); +- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- default: +- JS_NOT_REACHED("Precondition violation: unknown PCRE error code."); +- } +-#undef REPORT +-} +-#endif /* ENABLE_YARR_JIT */ +- + bool + js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut) + { +diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h +index 1449d56..279f3c0 100644 +--- a/js/src/vm/RegExpObject.h ++++ b/js/src/vm/RegExpObject.h +@@ -49,8 +49,6 @@ + #include "yarr/Yarr.h" + #if ENABLE_YARR_JIT + #include "yarr/YarrJIT.h" +-#else +-#include "yarr/pcre/pcre.h" + #endif + + namespace js { +@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed rep); + /* Abstracts away the gross |RegExpPrivate| backend details. */ + class RegExpPrivateCode + { +-#if ENABLE_YARR_JIT + typedef JSC::Yarr::BytecodePattern BytecodePattern; + typedef JSC::Yarr::ErrorCode ErrorCode; ++ typedef JSC::Yarr::YarrPattern YarrPattern; ++#if ENABLE_YARR_JIT + typedef JSC::Yarr::JSGlobalData JSGlobalData; + typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock; +- typedef JSC::Yarr::YarrPattern YarrPattern; + + /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */ + YarrCodeBlock codeBlock; +- BytecodePattern *byteCode; +-#else +- JSRegExp *compiled; + #endif ++ BytecodePattern *byteCode; + + public: + RegExpPrivateCode() + : + #if ENABLE_YARR_JIT + codeBlock(), +- byteCode(NULL) +-#else +- compiled(NULL) + #endif ++ byteCode(NULL) + { } + + ~RegExpPrivateCode() { + #if ENABLE_YARR_JIT + codeBlock.release(); ++#endif + if (byteCode) + Foreground::delete_(byteCode); +-#else +- if (compiled) +- jsRegExpFree(compiled); +-#endif + } + + #if ENABLE_YARR_JIT + static inline bool isJITRuntimeEnabled(JSContext *cx); +- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); +-#else +- void reportPCREError(JSContext *cx, int error); + #endif ++ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); + + inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, + RegExpFlag flags); +@@ -205,11 +194,7 @@ class RegExpPrivateCode + int *output, size_t outputCount); + + static size_t getOutputSize(size_t pairCount) { +-#if ENABLE_YARR_JIT + return pairCount * 2; +-#else +- return pairCount * 3; /* Should be x2, but PCRE has... needs. */ +-#endif + } + }; + +diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h +index ac41d08..fb8eb86 100644 +--- a/js/src/yarr/wtfbridge.h ++++ b/js/src/yarr/wtfbridge.h +@@ -49,9 +49,7 @@ + #include "jsprvtd.h" + #include "vm/String.h" + #include "assembler/wtf/Platform.h" +-#if ENABLE_YARR_JIT + #include "assembler/jit/ExecutableAllocator.h" +-#endif + + namespace JSC { namespace Yarr { + diff --git a/xulrunner.spec b/xulrunner.spec index 5158b86..511187a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 10.0.1 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -101,6 +101,7 @@ Patch43: mozilla-file.patch Patch44: mozilla-722127.patch Patch45: mozilla-727401.patch Patch46: mozilla-724615.patch +Patch47: mozilla-691898.patch # --------------------------------------------------- @@ -234,6 +235,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch44 -p2 -b .vpx1.0.0 %patch45 -p1 -b .727401 %patch46 -p1 -b .724615 +%patch47 -p1 -b .691898 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -463,6 +465,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Mar 09 2012 Dan Horák - 10.0.1-5 +- Add fix for secondary arches from mozb#691898 + * Mon Feb 27 2012 Martin Stransky - 10.0.1-4 - Added fix from rhbz#796929 - xulrunner doesn't compile on ARM From fe9b61df01daa05906d2c1dfd265f8cc25210355 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 Mar 2012 17:26:29 +0100 Subject: [PATCH 249/486] Update to FF11B7, spec fixes, enabled debug builds --- ...d-10.0.patch => add-gtkmozembed-11.0.patch | 268 +++++++------ mozilla-682832-proxy.patch | 358 ------------------ mozilla-696393.patch | 68 ---- mozilla-722127.patch | 36 +- mozilla-727401.patch | 38 -- mozilla-build.patch | 27 +- xulrunner-9.0-secondary-build-fix.patch | 11 - xulrunner.spec | 79 ++-- 8 files changed, 218 insertions(+), 667 deletions(-) rename add-gtkmozembed-10.0.patch => add-gtkmozembed-11.0.patch (94%) delete mode 100644 mozilla-682832-proxy.patch delete mode 100644 mozilla-696393.patch delete mode 100644 mozilla-727401.patch delete mode 100644 xulrunner-9.0-secondary-build-fix.patch diff --git a/add-gtkmozembed-10.0.patch b/add-gtkmozembed-11.0.patch similarity index 94% rename from add-gtkmozembed-10.0.patch rename to add-gtkmozembed-11.0.patch index e5816dd..3747ebb 100644 --- a/add-gtkmozembed-10.0.patch +++ b/add-gtkmozembed-11.0.patch @@ -1,6 +1,6 @@ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2012-01-18 16:44:32.465289972 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2012-01-18 16:44:32.465289972 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2012-03-09 15:19:22.248678665 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2012-03-09 15:19:22.248678665 +0100 @@ -0,0 +1,54 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -56,9 +56,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozemb +endif + +include $(topsrcdir)/config/rules.mk -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2012-01-18 16:44:32.466289972 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2012-01-18 16:44:32.466289972 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2012-03-09 15:19:22.248678665 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2012-03-09 15:19:22.248678665 +0100 @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -313,9 +313,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates + return NS_OK; +} + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2012-01-18 16:44:32.467289972 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2012-01-18 16:44:32.467289972 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2012-03-09 15:19:22.249678670 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2012-03-09 15:19:22.249678670 +0100 @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -401,9 +401,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates + nsCOMPtr mPIPStringBundle; +}; +#endif /* __EmbedCertificates_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2012-01-18 16:44:32.468289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2012-01-19 10:10:40.325459303 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2012-03-09 15:19:22.249678670 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2012-03-09 15:19:22.249678670 +0100 @@ -0,0 +1,156 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -561,9 +561,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListe + return NS_ERROR_NOT_IMPLEMENTED; +} + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2012-01-18 16:44:32.469289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2012-01-18 16:44:32.469289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2012-03-09 15:19:22.250678675 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2012-03-09 15:19:22.250678675 +0100 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -631,9 +631,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListe +}; + +#endif /* __EmbedContentListener_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2012-01-18 16:44:32.471289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2012-01-18 16:44:32.471289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2012-03-09 15:19:22.251678680 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2012-03-09 15:19:22.251678680 +0100 @@ -0,0 +1,618 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1253,9 +1253,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuI + mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; + return NS_OK; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2012-01-18 16:44:32.472289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2012-01-18 16:44:32.472289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2012-03-09 15:19:22.251678680 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2012-03-09 15:19:22.251678680 +0100 @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1358,9 +1358,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuI + nsString mCtxDocTitle; +}; // class EmbedContextMenuInfo +#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2012-01-18 16:44:32.473289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2012-01-18 16:44:32.473289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2012-03-09 15:19:22.252678684 +0100 @@ -0,0 +1,280 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1642,9 +1642,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListene + NS_ERROR("Unexpected event type"); + return NS_OK; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2012-01-18 16:44:32.474289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2012-01-18 16:44:32.474289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2012-03-09 15:19:22.252678684 +0100 @@ -0,0 +1,89 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1735,9 +1735,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListene +}; + +#endif /* __EmbedEventListener_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2012-01-18 16:44:32.476289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2012-01-18 16:44:32.476289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2012-03-09 15:19:22.253678688 +0100 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ @@ -1827,9 +1827,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp + NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); + return docShell->GetContentViewer(aViewer); +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2012-01-18 16:44:32.476289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2012-01-18 16:44:32.477289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2012-03-09 15:19:22.253678688 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2012-03-09 15:19:22.253678688 +0100 @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -1898,9 +1898,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.g +GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); + +#endif /* __EmbedTools_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2012-01-18 16:44:32.478289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2012-01-19 10:08:33.847456417 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2012-03-09 15:19:22.254678693 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2012-03-09 15:19:22.254678693 +0100 @@ -0,0 +1,1016 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -2918,9 +2918,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp. + gtk_widget_destroy(sOffscreenWindow); + sOffscreenWindow = 0; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2012-01-18 16:44:32.479289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2012-01-18 16:44:32.480289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2012-03-09 15:19:22.255678699 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2012-03-09 15:19:22.255678699 +0100 @@ -0,0 +1,188 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3110,10 +3110,10 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gt +}; + +#endif /* __EmbedPrivate_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2012-01-18 16:44:32.481289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2012-01-18 16:44:32.481289973 +0100 -@@ -0,0 +1,215 @@ +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2012-03-09 15:19:22.255678699 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2012-03-09 15:48:33.580516368 +0100 +@@ -0,0 +1,216 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * @@ -3253,7 +3253,8 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp +NS_IMETHODIMP +EmbedProgress::OnLocationChange(nsIWebProgress *aWebProgress, + nsIRequest *aRequest, -+ nsIURI *aLocation) ++ nsIURI *aLocation, ++ PRUint32 aFlags) +{ + nsCAutoString newURI; + NS_ENSURE_ARG_POINTER(aLocation); @@ -3329,9 +3330,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp + + uri->GetSpec(aString); +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2012-01-18 16:44:32.483289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2012-01-18 16:44:32.483289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2012-03-09 15:19:22.256678705 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2012-03-09 15:19:22.256678705 +0100 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3399,9 +3400,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.g +}; + +#endif /* __EmbedProgress_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2012-01-18 16:44:32.484289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2012-01-19 10:42:07.334502360 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2012-03-09 15:19:22.256678705 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2012-03-09 15:19:22.256678705 +0100 @@ -0,0 +1,411 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3814,9 +3815,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp + } + } +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2012-01-18 16:44:32.485289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2012-01-19 10:42:24.478502751 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2012-03-09 15:19:22.257678710 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2012-03-09 15:19:22.257678710 +0100 @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3931,9 +3932,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.g + GtkWidget *mComboBox; + GtkWidget *mCheckBox; +}; -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2012-01-18 16:44:32.487289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2012-01-19 10:09:43.082457998 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2012-03-09 15:19:22.258678715 +0100 @@ -0,0 +1,474 @@ +/* + * vim:ts=2:et:sw=2 @@ -4409,9 +4410,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.g + + return rv; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2012-01-18 16:44:32.488289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2012-01-18 16:44:32.488289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2012-03-09 15:19:22.258678715 +0100 @@ -0,0 +1,106 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4519,9 +4520,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreato + + return NS_ERROR_FAILURE; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2012-01-18 16:44:32.488289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2012-01-18 16:44:32.488289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2012-03-09 15:19:22.258678715 +0100 @@ -0,0 +1,54 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4577,9 +4578,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreato +}; + +#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2012-01-18 16:44:32.489289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2012-01-18 16:44:32.489289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2012-03-09 15:19:22.259678720 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2012-03-09 15:19:22.259678720 +0100 @@ -0,0 +1,101 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4682,9 +4683,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtk + + +#endif /* __EmbedWindow_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2012-01-18 16:44:32.491289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2012-01-19 10:06:52.015454094 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2012-03-09 15:19:22.260678725 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2012-03-09 15:19:22.260678725 +0100 @@ -0,0 +1,1132 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5818,9 +5819,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp. + aNewEmbed, aChromeFlags); + +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2012-01-18 16:44:32.493289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2012-01-18 16:44:32.494289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2012-03-09 15:19:22.261678730 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2012-03-09 15:19:22.261678730 +0100 @@ -0,0 +1,116 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5938,9 +5939,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue. + return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); +} + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2012-01-18 16:44:32.495289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2012-01-18 16:44:32.495289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2012-03-09 15:19:22.261678730 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2012-03-09 15:19:22.261678730 +0100 @@ -0,0 +1,287 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6229,9 +6230,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtk +#endif /* __cplusplus */ + +#endif /* gtkmozembed_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2012-01-18 16:44:32.495289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2012-01-18 16:44:32.495289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2012-03-09 15:19:22.262678735 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2012-03-09 15:19:22.262678735 +0100 @@ -0,0 +1,70 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6303,9 +6304,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_inter + +#endif /* gtkmozembed_internal_h */ + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2012-01-18 16:44:32.496289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2012-01-18 16:44:32.496289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2012-03-09 15:19:22.262678735 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2012-03-09 15:19:22.262678735 +0100 @@ -0,0 +1,34 @@ +BOOL:STRING +BOOL:STRING,STRING @@ -6341,9 +6342,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarsha +BOOL:POINTER +VOID:POINTER +BOOL:STRING,STRING,POINTER -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2012-01-18 16:44:32.498289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2012-01-18 16:44:32.498289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2012-03-09 15:19:22.263678740 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2012-03-09 15:19:22.263678740 +0100 @@ -0,0 +1,91 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6436,9 +6437,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivat +#endif /* __cplusplus */ + +#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2012-01-18 16:44:32.499289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2012-01-19 10:43:20.021504018 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2012-03-09 15:19:22.263678740 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2012-03-09 15:19:22.263678740 +0100 @@ -0,0 +1,349 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6789,9 +6790,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService. + NS_WARNING("Unexpected button flags"); + } +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2012-01-18 16:44:32.500289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2012-01-18 16:44:32.500289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2012-03-09 15:19:22.264678745 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2012-03-09 15:19:22.264678745 +0100 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6852,9 +6853,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService. + void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, + const PRUnichar* aStringValue, nsAString &aLabel); +}; -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2012-01-18 16:44:32.501289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2012-01-18 16:44:32.501289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2012-03-09 15:19:22.264678745 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2012-03-09 15:19:22.264678745 +0100 @@ -0,0 +1,112 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -6968,9 +6969,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmo + +GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2012-01-18 16:44:32.502289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2012-01-18 16:44:32.502289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2012-03-09 15:19:22.265678750 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2012-03-09 15:19:22.265678750 +0100 @@ -0,0 +1,101 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -7073,9 +7074,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtk +DEFINES += -D_TIME_H=1 +endif +endif -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2012-01-18 16:44:32.504289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2012-01-18 16:44:32.716289979 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2012-03-09 15:19:22.265678750 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2012-03-09 15:19:22.265678750 +0100 @@ -0,0 +1,185 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -7262,9 +7263,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChi + gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); + g_free(text); +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2012-01-18 16:44:32.719289978 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2012-01-18 16:44:32.719289978 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2012-03-09 15:19:22.266678755 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2012-03-09 15:19:22.266678755 +0100 @@ -0,0 +1,1145 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8411,9 +8412,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cp + gtk_widget_set_sensitive(browser->forwardButton, FALSE); + } + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2012-01-18 16:44:32.789289981 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2012-01-18 16:44:32.789289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2012-03-09 15:19:22.267678760 +0100 @@ -0,0 +1,142 @@ +/** simplemdi.c **/ +/* @@ -8557,9 +8558,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI + gtk_main_quit(); + return(0); +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2012-01-18 16:44:32.807289982 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2012-01-18 16:44:32.808289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2012-03-09 15:19:22.267678760 +0100 @@ -0,0 +1,86 @@ +#include +#include @@ -8647,9 +8648,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNot + + return 0; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2012-01-18 16:44:32.808289981 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2012-01-18 16:44:32.808289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2012-03-09 15:19:22.267678760 +0100 @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8760,9 +8761,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSoc + fprintf(stderr, "Can't fork.\n"); + } +} -diff -up xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in ---- xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2012-01-11 18:15:04.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in 2012-01-18 16:44:32.809289980 +0100 +diff -up xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in +--- xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2012-03-09 01:40:05.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in 2012-03-09 15:19:22.268678765 +0100 @@ -73,6 +73,8 @@ CPPSRCS += dlldeps-xul.cpp endif @@ -8772,10 +8773,10 @@ diff -up xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xul DEFINES += -DMOZ_ENABLE_GTK2 endif -diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh ---- xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2012-01-11 18:15:08.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2012-01-18 16:44:32.810289980 +0100 -@@ -554,6 +554,9 @@ MAKEFILES_embedding=" +diff -up xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh +--- xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2012-03-09 01:40:06.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2012-03-09 15:19:22.268678765 +0100 +@@ -438,6 +438,9 @@ MAKEFILES_embedding=" embedding/browser/Makefile embedding/browser/build/Makefile embedding/browser/webBrowser/Makefile @@ -8785,10 +8786,10 @@ diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xu embedding/components/Makefile embedding/components/appstartup/src/Makefile embedding/components/build/Makefile -diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk ---- xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2012-01-11 18:15:08.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk 2012-01-18 16:44:32.811289981 +0100 -@@ -221,6 +221,12 @@ endif +diff -up xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk +--- xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2012-03-09 01:40:06.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk 2012-03-09 15:19:22.269678770 +0100 +@@ -220,6 +220,12 @@ endif tier_platform_dirs += services/crypto/component @@ -8801,15 +8802,10 @@ diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrun tier_platform_dirs += startupcache tier_platform_dirs += js/ductwork/debugger -@@ -268,4 +274,3 @@ tier_platform_dirs += testing/mochitest - tier_platform_dirs += testing/xpcshell - tier_platform_dirs += testing/tools/screenshot - endif -- -diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in ---- xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2012-01-18 16:44:32.403289971 +0100 -+++ xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in 2012-01-18 16:44:32.817289981 +0100 -@@ -78,6 +78,8 @@ pkg_config_files = \ +diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in +--- xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2012-03-09 15:19:22.240678626 +0100 ++++ xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in 2012-03-09 15:19:22.275678799 +0100 +@@ -80,6 +80,8 @@ pkg_config_files = \ libxul-embedding.pc \ mozilla-js.pc \ mozilla-plugin.pc \ @@ -8818,9 +8814,9 @@ diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed $(NULL) ifdef MOZ_NATIVE_NSPR -diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2012-01-18 16:44:32.812289981 +0100 -+++ xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2012-01-18 16:44:32.812289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in +--- xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2012-03-09 15:19:22.270678775 +0100 ++++ xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2012-03-09 15:19:22.270678775 +0100 @@ -0,0 +1,9 @@ +prefix=%prefix% +sdkdir=%sdkdir% @@ -8831,9 +8827,9 @@ diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-emb +Description: Static version-independent Mozilla Embedding Widget for Gtk+ +Version: %MOZILLA_VERSION% +Requires: libxul-embedding = %MOZILLA_VERSION% -diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in ---- xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2012-01-18 16:44:32.813289981 +0100 -+++ xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2012-01-18 16:44:32.813289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in +--- xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2012-03-09 15:19:22.270678775 +0100 ++++ xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2012-03-09 15:19:22.270678775 +0100 @@ -0,0 +1,9 @@ +prefix=%prefix% +sdkdir=%sdkdir% diff --git a/mozilla-682832-proxy.patch b/mozilla-682832-proxy.patch deleted file mode 100644 index 0f643f9..0000000 --- a/mozilla-682832-proxy.patch +++ /dev/null @@ -1,358 +0,0 @@ -diff -up xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp.682832 xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp ---- xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp.682832 2012-01-18 17:25:24.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp 2012-01-23 15:40:14.803170842 +0100 -@@ -44,6 +44,8 @@ - #include "nsMemory.h" - #include "prlink.h" - #include "nsComponentManagerUtils.h" -+#include "nsIMutableArray.h" -+#include "nsISupportsPrimitives.h" - - #include - #include -@@ -60,6 +62,7 @@ typedef struct _GVariant GVariant; - # define G_VARIANT_TYPE_STRING ((const GVariantType *) "s") - # define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o") - # define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g") -+# define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as") - #endif - - #define GSETTINGS_FUNCTIONS \ -@@ -72,6 +75,7 @@ typedef struct _GVariant GVariant; - FUNC(g_variant_get_int32, gint32, (GVariant* variant)) \ - FUNC(g_variant_get_boolean, gboolean, (GVariant* variant)) \ - FUNC(g_variant_get_string, const char *, (GVariant* value, gsize* length)) \ -+ FUNC(g_variant_get_strv, const char **, (GVariant* value, gsize* length)) \ - FUNC(g_variant_is_of_type, gboolean, (GVariant* value, const GVariantType* type)) \ - FUNC(g_variant_new_int32, GVariant *, (gint32 value)) \ - FUNC(g_variant_new_boolean, GVariant *, (gboolean value)) \ -@@ -95,6 +99,7 @@ GSETTINGS_FUNCTIONS - #define g_variant_get_int32 _g_variant_get_int32 - #define g_variant_get_boolean _g_variant_get_boolean - #define g_variant_get_string _g_variant_get_string -+#define g_variant_get_strv _g_variant_get_strv - #define g_variant_is_of_type _g_variant_is_of_type - #define g_variant_new_int32 _g_variant_new_int32 - #define g_variant_new_boolean _g_variant_new_boolean -@@ -267,6 +272,49 @@ nsGSettingsCollection::GetInt(const nsAC - return NS_OK; - } - -+NS_IMETHODIMP -+nsGSettingsCollection::GetStringList(const nsACString& aKey, nsIArray** aResult) -+{ -+ if (!KeyExists(aKey)) -+ return NS_ERROR_INVALID_ARG; -+ -+ nsCOMPtr items(do_CreateInstance(NS_ARRAY_CONTRACTID)); -+ if (!items) { -+ return NS_ERROR_OUT_OF_MEMORY; -+ } -+ -+ GVariant *value = g_settings_get_value(mSettings, -+ PromiseFlatCString(aKey).get()); -+ -+ if (!g_variant_is_of_type(value, G_VARIANT_TYPE_STRING_ARRAY)) { -+ g_variant_unref(value); -+ return NS_ERROR_FAILURE; -+ } -+ -+ const gchar ** gs_strings = g_variant_get_strv(value, NULL); -+ if (!gs_strings) { -+ // empty array -+ NS_ADDREF(*aResult = items); -+ g_variant_unref(value); -+ return NS_OK; -+ } -+ -+ const gchar** p_gs_strings = gs_strings; -+ while (*p_gs_strings != NULL) -+ { -+ nsCOMPtr obj(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID)); -+ if (obj) { -+ obj->SetData(nsDependentCString(*p_gs_strings)); -+ items->AppendElement(obj, false); -+ } -+ p_gs_strings++; -+ } -+ g_free(gs_strings); -+ NS_ADDREF(*aResult = items); -+ g_variant_unref(value); -+ return NS_OK; -+} -+ - // These types are local to nsGSettingsService::Init, but ISO C++98 doesn't - // allow a template (ArrayLength) to be instantiated based on a local type. - // Boo-urns! -diff -up xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp ---- xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 2012-01-18 17:25:24.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2012-01-23 15:39:23.083172529 +0100 -@@ -49,6 +49,7 @@ - #include "nsPrintfCString.h" - #include "nsNetUtil.h" - #include "nsISupportsPrimitives.h" -+#include "nsIGSettingsService.h" - - class nsUnixSystemProxySettings : public nsISystemProxySettings { - public: -@@ -62,9 +63,12 @@ private: - ~nsUnixSystemProxySettings() {} - - nsCOMPtr mGConf; -+ nsCOMPtr mGSettings; - bool IsProxyMode(const char* aMode); - nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult); - nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); -+ nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); -+ nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult); - }; - - NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings) -@@ -73,6 +77,7 @@ nsresult - nsUnixSystemProxySettings::Init() - { - mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); -+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); - return NS_OK; - } - -@@ -87,14 +92,31 @@ nsUnixSystemProxySettings::IsProxyMode(c - nsresult - nsUnixSystemProxySettings::GetPACURI(nsACString& aResult) - { -- if (!mGConf || !IsProxyMode("auto")) { -- // Return an empty string in this case -- aResult.Truncate(); -- return NS_OK; -+ if (mGSettings) { -+ nsCOMPtr proxy_settings; -+ mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), -+ getter_AddRefs(proxy_settings)); -+ if (proxy_settings) { -+ nsCString proxyMode; -+ // Check if mode is auto -+ nsresult rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode); -+ if (rv == NS_OK && proxyMode.Equals("auto")) { -+ return proxy_settings->GetString(NS_LITERAL_CSTRING("autoconfig-url"), aResult); -+ } -+ /* The org.gnome.system.proxy schema has been found, but auto mode is not set. -+ * Don't try the GConf and return empty string. */ -+ aResult.Truncate(); -+ return NS_OK; -+ } - } - -- return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"), -- aResult); -+ if (mGConf && IsProxyMode("auto")) { -+ return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"), -+ aResult); -+ } -+ // Return an empty string when auto mode is not set. -+ aResult.Truncate(); -+ return NS_OK; - } - - static bool -@@ -231,7 +253,38 @@ nsUnixSystemProxySettings::SetProxyResul - PRInt32 port; - rv = mGConf->GetInt(portKey, &port); - NS_ENSURE_SUCCESS(rv, rv); -+ -+ /* When port is 0, proxy is not considered as enabled even if host is set. */ -+ if (port == 0) -+ return NS_ERROR_FAILURE; -+ -+ SetProxyResult(aType, host, port, aResult); -+ return NS_OK; -+} -+ -+nsresult -+nsUnixSystemProxySettings::SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, -+ nsACString& aResult) -+{ -+ nsCOMPtr proxy_settings; -+ nsresult rv = mGSettings->GetCollectionForSchema(nsDependentCString(aKeyBase), -+ getter_AddRefs(proxy_settings)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCAutoString host; -+ rv = proxy_settings->GetString(NS_LITERAL_CSTRING("host"), host); -+ NS_ENSURE_SUCCESS(rv, rv); -+ if (host.IsEmpty()) -+ return NS_ERROR_FAILURE; -+ -+ PRInt32 port; -+ rv = proxy_settings->GetInt(NS_LITERAL_CSTRING("port"), &port); -+ NS_ENSURE_SUCCESS(rv, rv); - -+ /* When port is 0, proxy is not considered as enabled even if host is set. */ -+ if (port == 0) -+ return NS_ERROR_FAILURE; -+ - SetProxyResult(aType, host, port, aResult); - return NS_OK; - } -@@ -271,17 +324,17 @@ static bool ConvertToIPV6Addr(const nsAC - PRIPv6Addr* aAddr) - { - PRNetAddr addr; -+ // try to convert hostname to IP - if (PR_StringToNetAddr(PromiseFlatCString(aName).get(), &addr) != PR_SUCCESS) - return false; - -- PRIPv6Addr ipv6; - // convert parsed address to IPv6 - if (addr.raw.family == PR_AF_INET) { - // convert to IPv4-mapped address -- PR_ConvertIPv4AddrToIPv6(addr.inet.ip, &ipv6); -+ PR_ConvertIPv4AddrToIPv6(addr.inet.ip, aAddr); - } else if (addr.raw.family == PR_AF_INET6) { - // copy the address -- memcpy(&ipv6, &addr.ipv6.ip, sizeof(PRIPv6Addr)); -+ memcpy(aAddr, &addr.ipv6.ip, sizeof(PRIPv6Addr)); - } else { - return false; - } -@@ -289,8 +342,8 @@ static bool ConvertToIPV6Addr(const nsAC - return true; - } - --static bool GConfIgnoreHost(const nsACString& aIgnore, -- const nsACString& aHost) -+static bool HostIgnoredByProxy(const nsACString& aIgnore, -+ const nsACString& aHost) - { - if (aIgnore.Equals(aHost, nsCaseInsensitiveCStringComparator())) - return true; -@@ -321,8 +374,9 @@ static bool GConfIgnoreHost(const nsACSt - slash = end; - } - -+ nsDependentCSubstring ignoreStripped(start, slash); - PRIPv6Addr ignoreAddr, hostAddr; -- if (!ConvertToIPV6Addr(aIgnore, &ignoreAddr) || -+ if (!ConvertToIPV6Addr(ignoreStripped, &ignoreAddr) || - !ConvertToIPV6Addr(aHost, &hostAddr)) - return false; - -@@ -355,7 +409,7 @@ nsUnixSystemProxySettings::GetProxyFromG - if (str) { - nsAutoString s; - if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) { -- if (GConfIgnoreHost(NS_ConvertUTF16toUTF8(s), aHost)) { -+ if (HostIgnoredByProxy(NS_ConvertUTF16toUTF8(s), aHost)) { - aResult.AppendLiteral("DIRECT"); - return NS_OK; - } -@@ -392,6 +446,71 @@ nsUnixSystemProxySettings::GetProxyFromG - } - - nsresult -+nsUnixSystemProxySettings::GetProxyFromGSettings(const nsACString& aScheme, -+ const nsACString& aHost, -+ PRInt32 aPort, -+ nsACString& aResult) -+{ -+ nsCOMPtr proxy_settings; -+ nsresult rv; -+ -+ rv = mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), -+ getter_AddRefs(proxy_settings)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCString proxyMode; -+ rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (!proxyMode.Equals("manual")) { -+ aResult.AppendLiteral("DIRECT"); -+ return NS_OK; -+ } -+ -+ nsCOMPtr ignoreList; -+ if (NS_SUCCEEDED(proxy_settings->GetStringList(NS_LITERAL_CSTRING("ignore-hosts"), -+ getter_AddRefs(ignoreList))) && ignoreList) { -+ PRUint32 len = 0; -+ ignoreList->GetLength(&len); -+ for (PRUint32 i = 0; i < len; ++i) { -+ nsCOMPtr str = do_QueryElementAt(ignoreList, i); -+ if (str) { -+ nsCString s; -+ if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) { -+ if (HostIgnoredByProxy(s, aHost)) { -+ aResult.AppendLiteral("DIRECT"); -+ return NS_OK; -+ } -+ } -+ } -+ } -+ } -+ -+ if (aScheme.LowerCaseEqualsLiteral("http")) { -+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult); -+ } else if (aScheme.LowerCaseEqualsLiteral("https")) { -+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.https", "PROXY", aResult); -+ /* Try to use HTTP proxy when HTTPS proxy is not explicitly defined */ -+ if (rv != NS_OK) -+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult); -+ } else if (aScheme.LowerCaseEqualsLiteral("ftp")) { -+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.ftp", "PROXY", aResult); -+ } else { -+ rv = NS_ERROR_FAILURE; -+ } -+ if (rv != NS_OK) { -+ /* If proxy for scheme is not specified, use SOCKS proxy for all schemes */ -+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.socks", "SOCKS", aResult); -+ } -+ -+ if (NS_FAILED(rv)) { -+ aResult.AppendLiteral("DIRECT"); -+ } -+ -+ return NS_OK; -+} -+ -+nsresult - nsUnixSystemProxySettings::GetProxyForURI(nsIURI* aURI, nsACString& aResult) - { - nsCAutoString scheme; -@@ -406,10 +525,15 @@ nsUnixSystemProxySettings::GetProxyForUR - rv = aURI->GetPort(&port); - NS_ENSURE_SUCCESS(rv, rv); - -- if (!mGConf) -- return GetProxyFromEnvironment(scheme, host, port, aResult); -+ if (mGSettings) { -+ rv = GetProxyFromGSettings(scheme, host, port, aResult); -+ if (rv == NS_OK) -+ return rv; -+ } -+ if (mGConf) -+ return GetProxyFromGConf(scheme, host, port, aResult); - -- return GetProxyFromGConf(scheme, host, port, aResult); -+ return GetProxyFromEnvironment(scheme, host, port, aResult); - } - - #define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\ -diff -up xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl.682832 xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl ---- xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl.682832 2012-01-18 17:25:28.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl 2012-01-23 15:32:29.890186340 +0100 -@@ -39,7 +39,7 @@ - #include "nsISupports.idl" - #include "nsIArray.idl" - --[scriptable, uuid(09637d3c-3c07-40b4-aff9-1d2a0f046f3c)] -+[scriptable, uuid(16d5b0ed-e756-4f1b-a8ce-9132e869acd8)] - interface nsIGSettingsCollection : nsISupports - { - void setString(in AUTF8String key, in AUTF8String value); -@@ -48,6 +48,7 @@ interface nsIGSettingsCollection : nsISu - AUTF8String getString(in AUTF8String key); - boolean getBoolean(in AUTF8String key); - long getInt(in AUTF8String key); -+ nsIArray getStringList(in AUTF8String key); - }; - - [scriptable, uuid(849c088b-57d1-4f24-b7b2-3dc4acb04c0a)] diff --git a/mozilla-696393.patch b/mozilla-696393.patch deleted file mode 100644 index 26c558f..0000000 --- a/mozilla-696393.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -up xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp ---- xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 2011-12-07 07:28:08.000000000 +0100 -+++ xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp 2011-12-09 15:07:07.609097348 +0100 -@@ -194,55 +194,22 @@ invoke_copy_to_stack(PRUint32 paramCount - } - } - -+typedef nsresult (*vtable_func)(nsISupports *, PRUint64, PRUint64, PRUint64, PRUint64, double, double, double, double); -+ - EXPORT_XPCOM_API(nsresult) - NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, - PRUint32 paramCount, nsXPTCVariant* params) - { -- PRUint64 *vtable = *(PRUint64 **)that; -- PRUint64 method = vtable[methodIndex]; -+ vtable_func *vtable = *reinterpret_cast(that); -+ vtable_func method = vtable[methodIndex]; - PRUint64 overflow = invoke_count_words (paramCount, params); -+ PRUint64 *stack_space = reinterpret_cast(__builtin_alloca((overflow + 8 /* 4 64-bits gpr + 4 64-bits fpr */) * 8)); - PRUint64 result; - -- __asm__ __volatile__ -- ( -- "lgr 7,15\n\t" -- "aghi 7,-64\n\t" -- -- "lgr 3,%3\n\t" -- "sllg 3,3,3\n\t" -- "lcgr 3,3\n\t" -- "lg 2,0(15)\n\t" -- "la 15,0(3,7)\n\t" -- "stg 2,0(15)\n\t" -- -- "lgr 2,%1\n\t" -- "lgr 3,%2\n\t" -- "la 4,160(15)\n\t" -- "lgr 5,%3\n\t" -- "basr 14,%4\n\t" -+ invoke_copy_to_stack(paramCount, params, stack_space, overflow); - -- "lgr 2,%5\n\t" -- "ld 0,192(7)\n\t" -- "ld 2,200(7)\n\t" -- "ld 4,208(7)\n\t" -- "ld 6,216(7)\n\t" -- "lmg 3,6,160(7)\n\t" -- "basr 14,%6\n\t" -+ PRUint64 *d_gpr = stack_space + overflow; -+ double *d_fpr = reinterpret_cast(d_gpr + 4); - -- "la 15,64(7)\n\t" -- -- "lgr %0,2\n\t" -- : "=r" (result) -- : "r" ((PRUint64)paramCount), -- "r" (params), -- "r" (overflow), -- "a" (invoke_copy_to_stack), -- "a" (that), -- "a" (method) -- : "2", "3", "4", "5", "6", "7", "14", "cc", "memory", -- "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7" -- ); -- -- return result; -+ return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1], d_fpr[2], d_fpr[3]); - } -- diff --git a/mozilla-722127.patch b/mozilla-722127.patch index 63a9e0a..f86fcae 100644 --- a/mozilla-722127.patch +++ b/mozilla-722127.patch @@ -1,12 +1,7 @@ -# HG changeset patch -# Parent 0a6f3638cdaba9d3b5ef2eef73a42b2a167dc52a -# User ojab -Bug 722127 - Build --with-system-libvpx is broken for libvpx-1.0.0 - -diff -up xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-10.0/mozilla-beta/configure.in ---- xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 2012-01-24 02:59:49.000000000 -0500 -+++ xulrunner-10.0/mozilla-beta/configure.in 2012-01-30 13:11:22.303053551 -0500 -@@ -5616,20 +5616,20 @@ if test -n "$MOZ_WEBM"; then +diff -up xulrunner-11.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-11.0/mozilla-beta/configure.in +--- xulrunner-11.0/mozilla-beta/configure.in.vpx1.0.0 2012-03-09 01:39:31.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/configure.in 2012-03-09 15:03:51.246031329 +0100 +@@ -5710,20 +5710,20 @@ if test -n "$MOZ_WEBM"; then [MOZ_NATIVE_LIBVPX_DEC_TEST=1], ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])) if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then @@ -33,7 +28,7 @@ diff -up xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-10.0/mozill #error "test failed." #endif ], -@@ -5639,7 +5639,7 @@ if test -n "$MOZ_WEBM"; then +@@ -5734,7 +5734,7 @@ if test -n "$MOZ_WEBM"; then MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include" MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"], [AC_MSG_RESULT([no]) @@ -42,19 +37,19 @@ diff -up xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-10.0/mozill fi CFLAGS=$_SAVE_CFLAGS LDFLAGS=$_SAVE_LDFLAGS -diff -up xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 xulrunner-10.0/mozilla-beta/configure ---- xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 2012-01-30 13:11:47.805847514 -0500 -+++ xulrunner-10.0/mozilla-beta/configure 2012-01-30 13:14:07.818716354 -0500 -@@ -17727,14 +17727,14 @@ else +diff -up xulrunner-11.0/mozilla-beta/configure.vpx1.0.0 xulrunner-11.0/mozilla-beta/configure +--- xulrunner-11.0/mozilla-beta/configure.vpx1.0.0 2012-03-09 01:58:50.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/configure 2012-03-09 15:15:42.537585632 +0100 +@@ -17761,14 +17761,14 @@ else fi if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then - echo $ac_n "checking for libvpx version >= v0.9.7""... $ac_c" 1>&6 --echo "configure:17732: checking for libvpx version >= v0.9.7" >&5 +-echo "configure:17766: checking for libvpx version >= v0.9.7" >&5 + echo $ac_n "checking for libvpx version >= v1.0.0""... $ac_c" 1>&6 -+echo "configure:17732: checking for libvpx version >= v1.0.0" >&5 ++echo "configure:17766: checking for libvpx version >= v1.0.0" >&5 cat > conftest.$ac_ext < @@ -63,7 +58,7 @@ diff -up xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 xulrunner-10.0/mozilla-b #error "test failed." #endif -@@ -17753,7 +17753,7 @@ else +@@ -17791,7 +17791,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -72,3 +67,8 @@ diff -up xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 xulrunner-10.0/mozilla-b fi rm -f conftest* fi +@@ -25794,4 +25794,3 @@ if cmp -s config/autoconf.mk config/auto + else + rm -f config/autoconf.mk.orig 2> /dev/null + fi +- diff --git a/mozilla-727401.patch b/mozilla-727401.patch deleted file mode 100644 index df7ff6d..0000000 --- a/mozilla-727401.patch +++ /dev/null @@ -1,38 +0,0 @@ -# HG changeset patch -# User Benjamin Smedberg -# Date 1329314881 18000 -# Node ID 355163c56ea5ad5037ac6da754252aaea67d2217 -# Parent 81f6b9cbb2a92ac08d1ccc0c1b44d6a5c28f6e2a -Bug 727401 - import libpng overflow patch from http://codereview.chromium.org/9363013 - -diff --git a/media/libpng/pngrutil.c b/media/libpng/pngrutil.c ---- a/media/libpng/pngrutil.c -+++ b/media/libpng/pngrutil.c -@@ -396,18 +396,25 @@ png_decompress_chunk(png_structp png_ptr - #if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \ - defined(PNG_USER_CHUNK_MALLOC_MAX) - else - #endif - if (expanded_size > 0) - { - /* Success (maybe) - really uncompress the chunk. */ - png_size_t new_size = 0; -- png_charp text = png_malloc_warn(png_ptr, -- prefix_size + expanded_size + 1); -+ png_charp text = NULL; -+ /* Need to check for both truncation (64-bit platforms) and integer -+ * overflow. -+ */ -+ if (prefix_size + expanded_size > prefix_size && -+ prefix_size + expanded_size < 0xffffffffU) -+ { -+ text = png_malloc_warn(png_ptr, prefix_size + expanded_size + 1); -+ } - - if (text != NULL) - { - png_memcpy(text, png_ptr->chunkdata, prefix_size); - new_size = png_inflate(png_ptr, - (png_bytep)(png_ptr->chunkdata + prefix_size), - chunklength - prefix_size, - (png_bytep)(text + prefix_size), expanded_size); diff --git a/mozilla-build.patch b/mozilla-build.patch index 065ca9f..be1ba4b 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,7 +1,7 @@ -diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in ---- xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build 2010-08-06 03:09:27.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in 2010-08-16 10:49:10.000000000 +0200 -@@ -181,7 +181,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +diff -up mozilla-beta/security/manager/Makefile.in.build mozilla-beta/security/manager/Makefile.in +--- mozilla-beta/security/manager/Makefile.in.build 2012-03-09 01:39:56.000000000 +0100 ++++ mozilla-beta/security/manager/Makefile.in 2012-03-09 13:56:28.612328083 +0100 +@@ -174,7 +174,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 @@ -9,15 +9,14 @@ diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build xu DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" ifndef MOZ_NATIVE_SQLITE DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3 -diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in.build xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in ---- xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in.build 2010-08-06 03:09:17.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in 2010-08-16 10:46:22.000000000 +0200 -@@ -113,8 +113,6 @@ CSRCS += md4.c - +diff -up mozilla-beta/security/manager/ssl/src/Makefile.in.build mozilla-beta/security/manager/ssl/src/Makefile.in +--- mozilla-beta/security/manager/ssl/src/Makefile.in.build 2012-03-09 01:39:56.000000000 +0100 ++++ mozilla-beta/security/manager/ssl/src/Makefile.in 2012-03-09 13:57:37.055657208 +0100 +@@ -116,7 +116,6 @@ CSRCS += md4.c EXTRA_DEPS = $(NSS_DEP_LIBS) --DEFINES += -DNSS_ENABLE_ECC -- - # Use local includes because they are inserted before INCLUDES - # so that Mozilla's nss.h is used, not glibc's - LOCAL_INCLUDES += $(NSS_CFLAGS) + DEFINES += \ +- -DNSS_ENABLE_ECC \ + -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ + -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \ + $(NULL) diff --git a/xulrunner-9.0-secondary-build-fix.patch b/xulrunner-9.0-secondary-build-fix.patch deleted file mode 100644 index fc1c1db..0000000 --- a/xulrunner-9.0-secondary-build-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp.orig xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp ---- xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp.orig 2012-01-04 11:06:39.000000000 +0100 -+++ xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp 2012-01-04 11:06:43.000000000 +0100 -@@ -50,7 +50,6 @@ - #include "jswatchpoint.h" - #include "jswrapper.h" - #include "assembler/wtf/Platform.h" --#include "assembler/jit/ExecutableAllocator.h" - #include "yarr/BumpPointerAllocator.h" - #include "methodjit/MethodJIT.h" - #include "methodjit/PolyIC.h" diff --git a/xulrunner.spec b/xulrunner.spec index 511187a..b5ef968 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,3 +1,6 @@ +# Use system nspr/nss? +%define system_nss 1 + # Use system sqlite? %if 0%{?fedora} <= 15 %define system_sqlite 0 @@ -5,14 +8,20 @@ %define system_sqlite 1 %endif +# Build as a debug package? +%define debug_build 0 + # Minimal required versions -%global nspr_version 4.8.9 -%global nss_version 3.13.1 %global cairo_version 1.10.2 %global freetype_version 2.1.9 %global libnotify_version 0.7.0 %global libvpx_version 1.0.0 +%if %{?system_nss} +%global nspr_version 4.9 +%global nss_version 3.13.3 +%endif + %if %{?system_sqlite} %global sqlite_version 3.7.7.1 # The actual sqlite version (see #480989): @@ -25,11 +34,11 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 0 +%global beta_version 7 %global rc_version 0 -%global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} -%global tarballdir mozilla-release +%global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} +%global tarballdir mozilla-release # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -60,8 +69,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 10.0.1 -Release: 5%{?pre_tag}%{?dist} +Version: 11.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -77,9 +86,9 @@ Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch %if 0%{?fedora} <= 15 -Patch16: add-gtkmozembed-10.0.patch +Patch16: add-gtkmozembed-11.0.patch %endif -Patch17: xulrunner-10.0-gcc47.patch +Patch17: xulrunner-10.0-gcc47.patch # Fedora specific patches @@ -88,25 +97,22 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches -Patch38: mozilla-696393.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=707993 Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch -Patch40: mozilla-682832-proxy.patch -# cherry-picked from 13afcd4c097c -Patch41: xulrunner-9.0-secondary-build-fix.patch Patch42: mozilla-706724.patch Patch43: mozilla-file.patch # Needed to detect/use libvpx-1.0.0 # https://bugzilla.mozilla.org/show_bug.cgi?id=722127 -Patch44: mozilla-722127.patch -Patch45: mozilla-727401.patch -Patch46: mozilla-724615.patch -Patch47: mozilla-691898.patch +Patch44: mozilla-722127.patch +Patch46: mozilla-724615.patch +Patch47: mozilla-691898.patch # --------------------------------------------------- +%if %{?system_nss} BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} +%endif BuildRequires: cairo-devel >= %{cairo_version} BuildRequires: libpng-devel BuildRequires: libjpeg-devel @@ -129,8 +135,10 @@ BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} Requires: mozilla-filesystem +%if %{?system_nss} Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} +%endif Provides: gecko-libs = %{gecko_verrel} Provides: gecko-libs%{?_isa} = %{gecko_verrel} Conflicts: firefox < 3.6 @@ -159,8 +167,10 @@ Provides: gecko-devel-unstable = %{gecko_verrel} Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} Requires: xulrunner = %{version}-%{release} +%if %{?system_nss} Requires: nspr-devel >= %{nspr_version} Requires: nss-devel >= %{nss_version} +%endif Requires: cairo-devel >= %{cairo_version} Requires: libjpeg-devel Requires: zip @@ -215,7 +225,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ > version.patch %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch -%patch1 -p2 -b .build +%patch1 -p1 -b .build %patch14 -p1 -b .chromium-types %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed @@ -226,16 +236,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -%patch38 -p2 -b .696393 %patch39 -p1 -b .707993 -%patch40 -p2 -b .682832 -%patch41 -p2 -b .secondary-build %patch42 -p1 -b .706724 %patch43 -p1 -b .file %patch44 -p2 -b .vpx1.0.0 -%patch45 -p1 -b .727401 %patch46 -p1 -b .724615 -%patch47 -p1 -b .691898 +#%patch47 -p1 -b .691898 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -243,12 +249,28 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %{__cat} %{SOURCE11} >> .mozconfig %endif +%if %{?system_nss} +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +%else +echo "ac_add_options --without-system-nspr" >> .mozconfig +echo "ac_add_options --without-system-nss" >> .mozconfig +%endif + %if %{?system_sqlite} echo "ac_add_options --enable-system-sqlite" >> .mozconfig %else echo "ac_add_options --disable-system-sqlite" >> .mozconfig %endif +%if %{?debug_build} +echo "ac_add_options --enable-debug" >> .mozconfig +echo "ac_add_options --disable-optimize" >> .mozconfig +%else +echo "ac_add_options --disable-debug" >> .mozconfig +echo "ac_add_options --enable-optimize" >> .mozconfig +%endif + # s390(x) fails to start with jemalloc enabled %ifarch s390 s390x echo "ac_add_options --disable-jemalloc" >> .mozconfig @@ -304,6 +326,9 @@ cd %{tarballdir} # MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') +%if %{?debug_build} +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') +%endif export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS @@ -318,6 +343,7 @@ MOZ_SMP_FLAGS=-j1 RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 +[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 %endif make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" @@ -446,7 +472,9 @@ fi %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %{mozappdir}/plugin-container - +%if !%{?system_nss} +%{mozappdir}/*.chk +%endif %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter %{mozappdir}/crashreporter.ini @@ -465,6 +493,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Mar 9 2012 Martin Stransky - 11.0-1 +- Update to 11.0 Beta 7 + * Fri Mar 09 2012 Dan Horák - 10.0.1-5 - Add fix for secondary arches from mozb#691898 From 9997ea141fc04096bc75ce30d1d8409442373beb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 Mar 2012 17:37:58 +0100 Subject: [PATCH 250/486] uploaded sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 944f4cc..dd86c36 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-10.0b6.source.tar.bz2 /xulrunner-10.0.source.tar.bz2 /xulrunner-10.0.1.source.tar.bz2 +/xulrunner-11.0b7.source.tar.bz2 diff --git a/sources b/sources index 0c40318..d9db3ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -265c53120fd923c742164b0002ebbf6c xulrunner-10.0.1.source.tar.bz2 +d0eb493d47f16671b1641804d97f7de7 xulrunner-11.0b7.source.tar.bz2 From 59fb4d58f01f864e86fcfebca27230e573c5913d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Mar 2012 08:53:44 +0100 Subject: [PATCH 251/486] Update to 11.0 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dd86c36..8f76403 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-10.0.source.tar.bz2 /xulrunner-10.0.1.source.tar.bz2 /xulrunner-11.0b7.source.tar.bz2 +/xulrunner-11.0.source.tar.bz2 diff --git a/sources b/sources index d9db3ba..af22379 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d0eb493d47f16671b1641804d97f7de7 xulrunner-11.0b7.source.tar.bz2 +4b07acf47857aff72776d805409cdd1b xulrunner-11.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index b5ef968..64ab629 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -34,7 +34,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 7 +%global beta_version 0 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} @@ -70,7 +70,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 11.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -493,6 +493,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 13 2012 Martin Stransky - 11.0-2 +- Update to 11.0 + * Fri Mar 9 2012 Martin Stransky - 11.0-1 - Update to 11.0 Beta 7 From abd4283f868f68bebba62181c5cf2f975a12f412 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Mar 2012 12:29:41 +0100 Subject: [PATCH 252/486] Added libvpx-devel dependency --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 64ab629..5dd02c1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -191,6 +191,7 @@ Requires: startup-notification-devel Requires: alsa-lib-devel Requires: libnotify-devel Requires: mesa-libGL-devel +Requires: libvpx-devel >= %{libvpx_version} %description devel This package contains the libraries amd header files that are needed From ec258c0766db21fd2eaeb3aa1c1baaacf6b994f1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Mar 2012 12:34:25 +0100 Subject: [PATCH 253/486] Added libvpx-devel dependency --- xulrunner.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 5dd02c1..53c3c0a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -70,7 +70,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 11.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -494,8 +494,9 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Mar 13 2012 Martin Stransky - 11.0-2 +* Tue Mar 13 2012 Martin Stransky - 11.0-3 - Update to 11.0 +- Fixed libvpx-devel dependency * Fri Mar 9 2012 Martin Stransky - 11.0-1 - Update to 11.0 Beta 7 From 3ea068df02642e63371d2ad8c93c796aecd42216 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Mar 2012 13:12:27 +0100 Subject: [PATCH 254/486] system nss/nspr is set in spec now --- xulrunner-mozconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 3ec51d2..b58f39e 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -4,8 +4,6 @@ ac_add_options --prefix="$PREFIX" ac_add_options --libdir="$LIBDIR" -ac_add_options --with-system-nspr -ac_add_options --with-system-nss ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-bz2 From 88357e6d51ae35e96ee9715f6d2955c494adb0c0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Mar 2012 13:13:32 +0100 Subject: [PATCH 255/486] debug/optimize is set in spec now --- xulrunner-mozconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index b58f39e..c9f0b8c 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -15,8 +15,6 @@ ac_add_options --disable-strip ac_add_options --disable-tests ac_add_options --disable-mochitest ac_add_options --disable-installer -ac_add_options --disable-debug -ac_add_options --enable-optimize ac_add_options --enable-xinerama ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-pango From 4f0069f46427cca93756c4929d0e618794cabd11 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 28 Mar 2012 12:38:06 +0200 Subject: [PATCH 256/486] Fixed Source0 URL --- xulrunner.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 53c3c0a..40b6321 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,7 @@ Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -# You can get sources at ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pre_ver}/source -Source0: %{name}-%{version}%{?pre_version}.source.tar.bz2 +Source0: ftp://ftp.mozilla.org/pub/%{name}/releases/%{version}%{?pre_version}/source/%{name}-%{version}%{?pre_version}.source.tar.bz2 Source10: %{name}-mozconfig Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js From 7b2b7ae0ecdcbca0e53deff86b51cd974b1773d8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 09:59:07 +0200 Subject: [PATCH 257/486] Update to 12.0 --- .gitignore | 1 + sources | 2 +- wmclass.patch | 29 ----------------------------- xulrunner.spec | 9 +++++---- 4 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 wmclass.patch diff --git a/.gitignore b/.gitignore index 8f76403..1f743ac 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-10.0.1.source.tar.bz2 /xulrunner-11.0b7.source.tar.bz2 /xulrunner-11.0.source.tar.bz2 +/xulrunner-12.0.source.tar.bz2 diff --git a/sources b/sources index af22379..d040718 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b07acf47857aff72776d805409cdd1b xulrunner-11.0.source.tar.bz2 +80c3e5927274de7f181fb5f931ac5fd4 xulrunner-12.0.source.tar.bz2 diff --git a/wmclass.patch b/wmclass.patch deleted file mode 100644 index 5fe76ac..0000000 --- a/wmclass.patch +++ /dev/null @@ -1,29 +0,0 @@ -# -# Online Desktop expects WMCLASS to match the .desktop file -# Since renaming the .desktop file is bad, work around this here -# - -diff -up ./widget/src/gtk2/nsWindow.cpp.wmclass ./widget/src/gtk2/nsWindow.cpp ---- ./widget/src/gtk2/nsWindow.cpp.wmclass 2010-10-25 11:33:21.649433261 -0700 -+++ ./widget/src/gtk2/nsWindow.cpp 2010-10-25 11:36:19.864431870 -0700 -@@ -3738,6 +3738,10 @@ nsWindow::Create(nsIWidget *aPare - GetBrandName(brandName); - NS_ConvertUTF16toUTF8 cBrand(brandName); - -+ if (brandName.EqualsLiteral("Minefield")) { -+ cBrand.Assign("Firefox"); -+ } -+ - if (mWindowType == eWindowType_dialog) { - mShell = gtk_window_new(GTK_WINDOW_TOPLEVEL); - SetDefaultIcon(); -@@ -4109,6 +4113,9 @@ nsWindow::SetWindowClass(const nsAString - #ifdef MOZ_X11 - nsXPIDLString brandName; - GetBrandName(brandName); -+ if (brandName.EqualsLiteral("Minefield")) { -+ brandName.AssignLiteral("Firefox"); -+ } - - XClassHint *class_hint = XAllocClassHint(); - if (!class_hint) diff --git a/xulrunner.spec b/xulrunner.spec index 40b6321..42c7d1a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -69,8 +69,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 11.0 -Release: 3%{?pre_tag}%{?dist} +Version: 12.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -92,7 +92,6 @@ Patch17: xulrunner-10.0-gcc47.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches @@ -233,7 +232,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch17 -p1 -b .gcc47 %patch20 -p2 -b .pk -%patch23 -p1 -b .wmclass %patch24 -p1 -b .static %patch39 -p1 -b .707993 @@ -493,6 +491,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Apr 24 2012 Martin Stransky - 12.0-1 +- Update to 12.0 + * Tue Mar 13 2012 Martin Stransky - 11.0-3 - Update to 11.0 - Fixed libvpx-devel dependency From df71757668a22d9b672bdc7fa92d209a2ea42559 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 10:19:29 +0200 Subject: [PATCH 258/486] Added switch for system cairo --- xulrunner-mozconfig | 1 - xulrunner.spec | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index c9f0b8c..bed6ee5 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -9,7 +9,6 @@ ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --with-system-libvpx ac_add_options --enable-system-hunspell -ac_add_options --enable-system-cairo ac_add_options --with-pthreads ac_add_options --disable-strip ac_add_options --disable-tests diff --git a/xulrunner.spec b/xulrunner.spec index 42c7d1a..9419930 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -8,6 +8,9 @@ %define system_sqlite 1 %endif +# Use system cairo? +%define system_cairo 1 + # Build as a debug package? %define debug_build 0 @@ -111,7 +114,9 @@ Patch47: mozilla-691898.patch BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} %endif +%if %{?system_cairo} BuildRequires: cairo-devel >= %{cairo_version} +%endif BuildRequires: libpng-devel BuildRequires: libjpeg-devel BuildRequires: zip @@ -169,7 +174,9 @@ Requires: xulrunner = %{version}-%{release} Requires: nspr-devel >= %{nspr_version} Requires: nss-devel >= %{nss_version} %endif +%if %{?system_cairo} Requires: cairo-devel >= %{cairo_version} +%endif Requires: libjpeg-devel Requires: zip Requires: bzip2-devel @@ -261,6 +268,12 @@ echo "ac_add_options --enable-system-sqlite" >> .mozconfig echo "ac_add_options --disable-system-sqlite" >> .mozconfig %endif +%if %{?system_cairo} +echo "ac_add_options --enable-system-cairo" >> .mozconfig +%else +echo "ac_add_options --disable-system-cairo" >> .mozconfig +%endif + %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig From 9d408492238d7bcc318b6548d8fa71ee03cb2b3b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 10:34:59 +0200 Subject: [PATCH 259/486] removed already merged patches --- mozilla-706724.patch | 12 ------- mozilla-722127.patch | 74 -------------------------------------------- xulrunner.spec | 6 ---- 3 files changed, 92 deletions(-) delete mode 100644 mozilla-706724.patch delete mode 100644 mozilla-722127.patch diff --git a/mozilla-706724.patch b/mozilla-706724.patch deleted file mode 100644 index b0792ed..0000000 --- a/mozilla-706724.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-beta/ipc/chromium/src/base/file_util.cc.old mozilla-beta/ipc/chromium/src/base/file_util.cc ---- mozilla-beta/ipc/chromium/src/base/file_util.cc.old 2012-01-25 13:48:11.000000000 +0100 -+++ mozilla-beta/ipc/chromium/src/base/file_util.cc 2012-01-25 13:52:25.096659244 +0100 -@@ -8,7 +8,7 @@ - #include - #endif - #include --#if defined(ANDROID) -+#if defined(ANDROID) || defined(OS_POSIX) - #include - #endif - diff --git a/mozilla-722127.patch b/mozilla-722127.patch deleted file mode 100644 index f86fcae..0000000 --- a/mozilla-722127.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff -up xulrunner-11.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-11.0/mozilla-beta/configure.in ---- xulrunner-11.0/mozilla-beta/configure.in.vpx1.0.0 2012-03-09 01:39:31.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/configure.in 2012-03-09 15:03:51.246031329 +0100 -@@ -5710,20 +5710,20 @@ if test -n "$MOZ_WEBM"; then - [MOZ_NATIVE_LIBVPX_DEC_TEST=1], - ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])) - if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then -- AC_MSG_CHECKING([for libvpx version >= v0.9.7]) -- dnl We need at least v0.9.7 to fix several crash bugs (for which we -- dnl had local patches prior to v0.9.7). -+ AC_MSG_CHECKING([for libvpx version >= v1.0.0]) -+ dnl We need at least v1.0.0 to fix several crash bugs (for which we -+ dnl had local patches prior to v1.0.0). - dnl - dnl This is a terrible test for the library version, but we don't - dnl have a good one. There is no version number in a public header, - dnl and testing the headers still doesn't guarantee we link against - dnl the right version. While we could call vpx_codec_version() at - dnl run-time, that would break cross-compiling. There are no -- dnl additional exported symbols between the v0.9.7 release and the -- dnl v0.9.6 one to check for. -+ dnl additional exported decoder symbols between the v1.0.0 release -+ dnl and the v0.9.7 one to check for. - AC_TRY_COMPILE([ - #include -- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) -+ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS) - #error "test failed." - #endif - ], -@@ -5734,7 +5734,7 @@ if test -n "$MOZ_WEBM"; then - MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include" - MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"], - [AC_MSG_RESULT([no]) -- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])]) -+ AC_MSG_ERROR([--with-system-libvpx requested but it is not v1.0.0 or later])]) - fi - CFLAGS=$_SAVE_CFLAGS - LDFLAGS=$_SAVE_LDFLAGS -diff -up xulrunner-11.0/mozilla-beta/configure.vpx1.0.0 xulrunner-11.0/mozilla-beta/configure ---- xulrunner-11.0/mozilla-beta/configure.vpx1.0.0 2012-03-09 01:58:50.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/configure 2012-03-09 15:15:42.537585632 +0100 -@@ -17761,14 +17761,14 @@ else - fi - - if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then -- echo $ac_n "checking for libvpx version >= v0.9.7""... $ac_c" 1>&6 --echo "configure:17766: checking for libvpx version >= v0.9.7" >&5 -+ echo $ac_n "checking for libvpx version >= v1.0.0""... $ac_c" 1>&6 -+echo "configure:17766: checking for libvpx version >= v1.0.0" >&5 - cat > conftest.$ac_ext < -- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) -+ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS) - #error "test failed." - #endif - -@@ -17791,7 +17791,7 @@ else - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -- { echo "configure: error: --with-system-libvpx requested but it is not v0.9.7 or later" 1>&2; exit 1; } -+ { echo "configure: error: --with-system-libvpx requested but it is not v1.0.0 or later" 1>&2; exit 1; } - fi - rm -f conftest* - fi -@@ -25794,4 +25794,3 @@ if cmp -s config/autoconf.mk config/auto - else - rm -f config/autoconf.mk.orig 2> /dev/null - fi -- diff --git a/xulrunner.spec b/xulrunner.spec index 9419930..e589d6a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -100,11 +100,7 @@ Patch24: crashreporter-remove-static.patch # Upstream patches # https://bugzilla.mozilla.org/show_bug.cgi?id=707993 Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch -Patch42: mozilla-706724.patch Patch43: mozilla-file.patch -# Needed to detect/use libvpx-1.0.0 -# https://bugzilla.mozilla.org/show_bug.cgi?id=722127 -Patch44: mozilla-722127.patch Patch46: mozilla-724615.patch Patch47: mozilla-691898.patch @@ -242,9 +238,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch24 -p1 -b .static %patch39 -p1 -b .707993 -%patch42 -p1 -b .706724 %patch43 -p1 -b .file -%patch44 -p2 -b .vpx1.0.0 %patch46 -p1 -b .724615 #%patch47 -p1 -b .691898 From 07f2ed7a2f76565c6633b08c13308ae0942004a7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 10:51:07 +0200 Subject: [PATCH 260/486] without system cairo --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index e589d6a..94d7441 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -9,7 +9,7 @@ %endif # Use system cairo? -%define system_cairo 1 +%define system_cairo 0 # Build as a debug package? %define debug_build 0 From a74f3223d9720bb42ba7502085e56fc6efd9fc42 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 11:29:38 +0200 Subject: [PATCH 261/486] Disable system sqlite for Fedora17 and older --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 94d7441..701000e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -2,7 +2,7 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} <= 15 +%if 0%{?fedora} <= 17 %define system_sqlite 0 %else %define system_sqlite 1 From 197f33837a316fb5966ec8dfa637a30bb2e0ecbb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 30 Apr 2012 15:44:19 +0200 Subject: [PATCH 262/486] Enable ppc(64) paralell builds (rhbz#816612) --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 701000e..00917f1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -343,7 +343,7 @@ export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 +%ifarch %{ix86} x86_64 ppc ppc64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -498,6 +498,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 30 2012 Martin Stransky - 12.0-2 +- Enable ppc(64) paralell builds (rhbz#816612) + * Tue Apr 24 2012 Martin Stransky - 12.0-1 - Update to 12.0 From 07e7918b8116ce14b69a28637f0b40d1f61745f2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 4 May 2012 15:58:37 +0200 Subject: [PATCH 263/486] Added requires for nss-static (rhbz#717247) --- xulrunner.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 00917f1..0e19672 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -109,6 +109,7 @@ Patch47: mozilla-691898.patch %if %{?system_nss} BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} +BuildRequires: nss-static >= %{nss_version} %endif %if %{?system_cairo} BuildRequires: cairo-devel >= %{cairo_version} @@ -498,6 +499,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 4 2012 Martin Stransky - 12.0-3 +- Added requires for nss-static (rhbz#717247) + * Mon Apr 30 2012 Martin Stransky - 12.0-2 - Enable ppc(64) paralell builds (rhbz#816612) From d9f854b6c30094a3cd86f05aa71a11e95c4c7bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 4 May 2012 16:55:08 +0200 Subject: [PATCH 264/486] Added new patch for 691898 - backport from trunk - Added build fix for secondary arches --- mozilla-691898.patch | 304 ++++++++++++++++----------------- xulrunner-12.0-secondary.patch | 43 +++++ xulrunner.spec | 12 +- 3 files changed, 204 insertions(+), 155 deletions(-) create mode 100644 xulrunner-12.0-secondary.patch diff --git a/mozilla-691898.patch b/mozilla-691898.patch index dab2016..71220a7 100644 --- a/mozilla-691898.patch +++ b/mozilla-691898.patch @@ -1,153 +1,64 @@ -From: Mike Hommey -Date: Sat, 24 Dec 2011 09:56:58 +0100 -Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where - YARR JIT is not supported - ---- - js/src/Makefile.in | 21 +++++++++++++-------- - js/src/vm/RegExpObject-inl.h | 28 ++++++---------------------- - js/src/vm/RegExpObject.cpp | 36 ------------------------------------ - js/src/vm/RegExpObject.h | 27 ++++++--------------------- - js/src/yarr/wtfbridge.h | 2 -- - 5 files changed, 25 insertions(+), 89 deletions(-) - -diff --git a/js/src/Makefile.in b/js/src/Makefile.in -index fc48cbd..49f0bdc 100644 ---- a/js/src/Makefile.in -+++ b/js/src/Makefile.in -@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \ +diff -up xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h +--- xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-04-21 00:03:53.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-05-04 10:23:50.000000000 +0200 +@@ -445,8 +445,6 @@ public: + { + sync_instruction_memory((caddr_t)code, size); + } +-#else +- #error "The cacheFlush support is missing on this platform." + #endif - ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU))) + private: +diff -up xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-12.0/mozilla-release/js/src/Makefile.in +--- xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 2012-04-21 00:03:53.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/Makefile.in 2012-05-04 11:09:57.000000000 +0200 +@@ -349,20 +349,23 @@ CPPSRCS += checks.cc \ + # END enclude sources for V8 dtoa + ############################################# + +-# For architectures without YARR JIT, PCRE is faster than the YARR +-# interpreter (bug 684559). +- + ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) -VPATH += $(srcdir)/yarr/pcre \ -+VPATH += $(srcdir)/assembler \ -+ $(srcdir)/assembler/wtf \ -+ $(srcdir)/yarr \ ++VPATH += $(srcdir)/assembler \ ++ $(srcdir)/assembler/wtf \ ++ $(srcdir)/assembler/jit \ ++ $(srcdir)/yarr \ $(NULL) - CPPSRCS += \ +-CPPSRCS += \ - pcre_compile.cpp \ - pcre_exec.cpp \ - pcre_tables.cpp \ - pcre_xclass.cpp \ - pcre_ucp_searchfuncs.cpp \ -+ Assertions.cpp \ -+ OSAllocatorOS2.cpp \ -+ OSAllocatorPosix.cpp \ -+ OSAllocatorWin.cpp \ -+ PageBlock.cpp \ -+ YarrInterpreter.cpp \ -+ YarrPattern.cpp \ -+ YarrSyntaxChecker.cpp \ ++CPPSRCS += ExecutableAllocator.cpp \ ++ ExecutableAllocatorPosix.cpp \ ++ OSAllocatorOS2.cpp \ ++ OSAllocatorPosix.cpp \ ++ OSAllocatorWin.cpp \ ++ PageBlock.cpp \ ++ YarrInterpreter.cpp \ ++ YarrPattern.cpp \ ++ YarrSyntaxChecker.cpp \ $(NULL) else -@@ -1015,10 +1020,10 @@ endif - # Needed to "configure" it correctly. Unfortunately these - # flags wind up being applied to all code in js/src, not just - # the code in js/src/assembler. --CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 - - ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT)) --CXXFLAGS += -DENABLE_JIT=1 -+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1 - endif - - INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr -diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h -index 5f7817d..91108a7 100644 ---- a/js/src/vm/RegExpObject-inl.h -+++ b/js/src/vm/RegExpObject-inl.h -@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt - return RetType(self); - } - -+#if ENABLE_YARR_JIT - /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ - inline bool - RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) -@@ -337,12 +338,12 @@ RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) - return true; - #endif - } -+#endif - - inline bool - RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, - uintN *parenCount, RegExpFlag flags) - { --#if ENABLE_YARR_JIT - /* Parse the pattern. */ - ErrorCode yarrError; - YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), -@@ -359,7 +360,7 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream * - * case we have to bytecode compile it. - */ - --#ifdef JS_METHODJIT -+#if ENABLE_YARR_JIT && defined(JS_METHODJIT) - if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { - if (!cx->compartment->ensureJaegerCompartmentExists(cx)) - return false; -@@ -371,21 +372,11 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream * - } - #endif - -+#if ENABLE_YARR_JIT - codeBlock.setFallBack(true); -+#endif - byteCode = byteCompile(yarrPattern, cx->compartment->regExpAllocator).get(); - return true; --#else /* !defined(ENABLE_YARR_JIT) */ -- int error = 0; -- compiled = jsRegExpCompile(pattern.chars(), pattern.length(), -- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase, -- multiline() ? JSRegExpMultiline : JSRegExpSingleLine, -- parenCount, &error); -- if (error) { -- reportPCREError(cx, error); -- return false; -- } -- return true; --#endif - } - - inline bool -@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz - else - result = JSC::Yarr::execute(codeBlock, chars, start, length, output); - #else -- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount); -+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output); - #endif - - if (result == -1) - return Success_NotFound; - --#if !ENABLE_YARR_JIT -- if (result < 0) { -- reportPCREError(cx, result); -- return Error; -- } --#endif -- - JS_ASSERT(result >= 0); - return Success; - } -diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp -index f75c6a5..7631dd5 100644 ---- a/js/src/vm/RegExpObject.cpp -+++ b/js/src/vm/RegExpObject.cpp -@@ -251,7 +251,6 @@ Class js::RegExpClass = { - NULL /* trace */ +diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp +--- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-04-21 00:03:56.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp 2012-05-04 11:13:37.000000000 +0200 +@@ -392,7 +392,6 @@ Class js::RegExpClass = { + regexp_trace }; -#if ENABLE_YARR_JIT void RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) { -@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err +@@ -424,42 +423,6 @@ RegExpPrivateCode::reportYarrError(JSCon } } @@ -161,9 +72,9 @@ index f75c6a5..7631dd5 100644 - return - switch (error) { - case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); +- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); - case 1: REPORT(JSMSG_TRAILING_SLASH); -- case 2: REPORT(JSMSG_TRAILING_SLASH); +- case 2: REPORT(JSMSG_TRAILING_SLASH); - case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - case 4: REPORT(JSMSG_BAD_QUANTIFIER); - case 5: REPORT(JSMSG_BAD_QUANTIFIER); @@ -184,25 +95,28 @@ index f75c6a5..7631dd5 100644 - } -#undef REPORT -} +- -#endif /* ENABLE_YARR_JIT */ - bool js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut) { -diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h -index 1449d56..279f3c0 100644 ---- a/js/src/vm/RegExpObject.h -+++ b/js/src/vm/RegExpObject.h -@@ -49,8 +49,6 @@ +diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h +--- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-04-21 00:03:56.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h 2012-05-04 11:20:17.000000000 +0200 +@@ -51,10 +51,8 @@ #include "yarr/Yarr.h" #if ENABLE_YARR_JIT #include "yarr/YarrJIT.h" +-#include "yarr/YarrSyntaxChecker.h" -#else -#include "yarr/pcre/pcre.h" #endif ++#include "yarr/YarrSyntaxChecker.h" namespace js { -@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed rep); + +@@ -242,68 +240,51 @@ static const jschar GreedyStarChars[] = /* Abstracts away the gross |RegExpPrivate| backend details. */ class RegExpPrivateCode { @@ -244,21 +158,29 @@ index 1449d56..279f3c0 100644 -#else - if (compiled) - jsRegExpFree(compiled); +-#endif + } + + static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { +-#if ENABLE_YARR_JIT + ErrorCode error = JSC::Yarr::checkSyntax(*source); + if (error == JSC::Yarr::NoError) + return true; + + reportYarrError(cx, tokenStream, error); + return false; +-#else +-# error "Syntax checking not implemented for !ENABLE_YARR_JIT" -#endif } #if ENABLE_YARR_JIT static inline bool isJITRuntimeEnabled(JSContext *cx); -- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); +- static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); -#else -- void reportPCREError(JSContext *cx, int error); +- static void reportPCREError(JSContext *cx, int error); #endif -+ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); - - inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, - RegExpFlag flags); -@@ -205,11 +194,7 @@ class RegExpPrivateCode - int *output, size_t outputCount); ++ static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); static size_t getOutputSize(size_t pairCount) { -#if ENABLE_YARR_JIT @@ -267,12 +189,90 @@ index 1449d56..279f3c0 100644 - return pairCount * 3; /* Should be x2, but PCRE has... needs. */ -#endif } - }; -diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h -index ac41d08..fb8eb86 100644 ---- a/js/src/yarr/wtfbridge.h -+++ b/js/src/yarr/wtfbridge.h + inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, +diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h +--- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-04-21 00:03:56.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-05-04 11:17:01.000000000 +0200 +@@ -357,6 +357,7 @@ detail::RegExpPrivate::create(JSContext + return RetType(priv); + } + ++#if ENABLE_YARR_JIT + /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ + inline bool + detail::RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) +@@ -367,12 +368,12 @@ detail::RegExpPrivateCode::isJITRuntimeE + return true; + #endif + } ++#endif + + inline bool + detail::RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, + uintN *parenCount, RegExpFlag flags) + { +-#if ENABLE_YARR_JIT + /* Parse the pattern. */ + ErrorCode yarrError; + YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), +@@ -389,7 +390,7 @@ detail::RegExpPrivateCode::compile(JSCon + * case we have to bytecode compile it. + */ + +-#ifdef JS_METHODJIT ++#if ENABLE_YARR_JIT && defined(JS_METHODJIT) + if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { + JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); + if (!execAlloc) { +@@ -410,21 +411,11 @@ detail::RegExpPrivateCode::compile(JSCon + return false; + } + ++#if ENABLE_YARR_JIT + codeBlock.setFallBack(true); ++#endif + byteCode = byteCompile(yarrPattern, bumpAlloc).get(); + return true; +-#else /* !defined(ENABLE_YARR_JIT) */ +- int error = 0; +- compiled = jsRegExpCompile(pattern.chars(), pattern.length(), +- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase, +- multiline() ? JSRegExpMultiline : JSRegExpSingleLine, +- parenCount, &error); +- if (error) { +- reportPCREError(cx, error); +- return false; +- } +- return true; +-#endif + } + + inline bool +@@ -466,19 +457,12 @@ detail::RegExpPrivateCode::execute(JSCon + else + result = JSC::Yarr::execute(codeBlock, chars, start, length, output); + #else +- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount); ++ result = JSC::Yarr::interpret(byteCode, chars, start, length, output); + #endif + + if (result == -1) + return RegExpRunStatus_Success_NotFound; + +-#if !ENABLE_YARR_JIT +- if (result < 0) { +- reportPCREError(cx, result); +- return RegExpRunStatus_Error; +- } +-#endif +- + JS_ASSERT(result >= 0); + return RegExpRunStatus_Success; + } +diff -up xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h +--- xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-04-21 00:03:56.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h 2012-05-04 10:23:50.000000000 +0200 @@ -49,9 +49,7 @@ #include "jsprvtd.h" #include "vm/String.h" diff --git a/xulrunner-12.0-secondary.patch b/xulrunner-12.0-secondary.patch new file mode 100644 index 0000000..e9b32d2 --- /dev/null +++ b/xulrunner-12.0-secondary.patch @@ -0,0 +1,43 @@ +diff -up xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h.secondary xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h +--- xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h.secondary 2012-05-04 14:56:50.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h 2012-05-04 14:59:27.000000000 +0200 +@@ -124,8 +124,12 @@ LinuxKernelMemoryBarrierFunc pLinuxKerne + # error "Memory clobber not supported for your compiler." + # endif + #else ++#ifdef __GNUC__ ++# define STORE_SEQUENCER() __sync_synchronize(); ++#else + # error "Memory clobber not supported for your platform." + #endif ++#endif + + // Returns a handdle to pass on exit. This can check that we are popping the + // correct callstack. +diff -up xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h.secondary xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h +--- xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h.secondary 2012-05-04 14:59:35.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h 2012-05-04 14:59:49.000000000 +0200 +@@ -41,23 +41,11 @@ + #ifndef V8_SUPPORT_H_ + #define V8_SUPPORT_H_ + +-#if defined(_M_X64) || defined(__x86_64__) +-#define V8_HOST_ARCH_X64 1 +-#elif defined(_M_IX86) || defined(__i386__) || defined(__i386) +-#define V8_HOST_ARCH_IA32 1 +-#elif defined(__ARMEL__) +-#define V8_HOST_ARCH_ARM 1 +-#else +-#warning Please add support for your architecture in chromium_types.h +-#endif +- + typedef int32_t Atomic32; + +-#if defined(V8_HOST_ARCH_X64) || defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_ARM) + inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { + *ptr = value; + } +-#endif + + + const int kMaxInt = 0x7FFFFFFF; diff --git a/xulrunner.spec b/xulrunner.spec index 0e19672..d5c44da 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -91,6 +91,7 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch16: add-gtkmozembed-11.0.patch %endif Patch17: xulrunner-10.0-gcc47.patch +Patch18: xulrunner-12.0-secondary.patch # Fedora specific patches @@ -234,6 +235,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch16 -p2 -b .gtkmozembed %endif %patch17 -p1 -b .gcc47 +%patch18 -p2 -b .secondary %patch20 -p2 -b .pk %patch24 -p1 -b .static @@ -241,7 +243,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch39 -p1 -b .707993 %patch43 -p1 -b .file %patch46 -p1 -b .724615 -#%patch47 -p1 -b .691898 +%patch47 -p2 -b .691898 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -499,7 +501,11 @@ fi #--------------------------------------------------------------------- %changelog -* Mon May 4 2012 Martin Stransky - 12.0-3 +* Fri May 4 2012 Dan Horák - 12.0-4 +- Added new patch for 691898 - backport from trunk +- Added build fix for secondary arches + +* Fri May 4 2012 Martin Stransky - 12.0-3 - Added requires for nss-static (rhbz#717247) * Mon Apr 30 2012 Martin Stransky - 12.0-2 From bb57e42f22d1e459900ce8502703be674848d3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 7 May 2012 13:26:43 +0200 Subject: [PATCH 265/486] Used backported upstream patch from mozb#734335 for fixing the sps profiler build - Fixed build of jemalloc on ppc (patch by Gustavo Luiz Duarte/IBM) --- mozilla-734335.patch | 212 ++++++++++++++++++++++++++++++ xulrunner-12.0-jemalloc-ppc.patch | 14 ++ xulrunner-12.0-secondary.patch | 43 ------ xulrunner.spec | 13 +- 4 files changed, 236 insertions(+), 46 deletions(-) create mode 100644 mozilla-734335.patch create mode 100644 xulrunner-12.0-jemalloc-ppc.patch delete mode 100644 xulrunner-12.0-secondary.patch diff --git a/mozilla-734335.patch b/mozilla-734335.patch new file mode 100644 index 0000000..1b7670b --- /dev/null +++ b/mozilla-734335.patch @@ -0,0 +1,212 @@ +diff -up xulrunner-12.0/mozilla-release/configure.in.734335 xulrunner-12.0/mozilla-release/configure.in +--- xulrunner-12.0/mozilla-release/configure.in.734335 2012-04-20 18:03:44.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/configure.in 2012-05-07 04:40:57.526363561 -0400 +@@ -2124,10 +2124,33 @@ fi + dnl ======================================================== + dnl SPS Profiler + dnl ======================================================== +-MOZ_ARG_ENABLE_BOOL(sps, +-[ --enable-sps Enable sps profiling tool.], +- MOZ_ENABLE_PROFILER_SPS=1, +- MOZ_ENABLE_PROFILER_SPS= ) ++MOZ_ENABLE_PROFILER_SPS=1 ++ ++case "${OS_TARGET}" in ++Android) ++ case "${CPU_ARCH}" in ++ x86 | arm) ;; ++ *) ++ MOZ_ENABLE_PROFILER_SPS= ++ esac ++ ;; ++Linux) ++ case "${CPU_ARCH}" in ++ x86 | x86_64) ;; ++ *) ++ MOZ_ENABLE_PROFILER_SPS= ++ esac ++ ;; ++WINNT|Darwin) ;; ++*) ++ MOZ_ENABLE_PROFILER_SPS= ++ ;; ++esac ++ ++MOZ_ARG_DISABLE_BOOL(sps, ++[ --disable-sps Disable sps profiling tool.], ++ MOZ_ENABLE_PROFILER_SPS=, ++ MOZ_ENABLE_PROFILER_SPS=1) + if test -n "$MOZ_ENABLE_PROFILER_SPS"; then + AC_DEFINE(MOZ_ENABLE_PROFILER_SPS) + fi +diff -up xulrunner-12.0/mozilla-release/configure.734335 xulrunner-12.0/mozilla-release/configure +--- xulrunner-12.0/mozilla-release/configure.734335 2012-05-07 04:49:48.696360057 -0400 ++++ xulrunner-12.0/mozilla-release/configure 2012-05-07 04:50:10.396360262 -0400 +@@ -119,7 +119,7 @@ ac_help="$ac_help + ac_help="$ac_help + --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof). Implies --enable-profiling." + ac_help="$ac_help +- --enable-sps Enable sps profiling tool." ++ --disable-sps Disable sps profiling tool." + ac_help="$ac_help + --enable-shark Enable shark remote profiling. Implies --enable-profiling." + ac_help="$ac_help +@@ -7255,13 +7255,36 @@ EOF + + fi + ++MOZ_ENABLE_PROFILER_SPS=1 ++ ++case "${OS_TARGET}" in ++Android) ++ case "${CPU_ARCH}" in ++ x86 | arm) ;; ++ *) ++ MOZ_ENABLE_PROFILER_SPS= ++ esac ++ ;; ++Linux) ++ case "${CPU_ARCH}" in ++ x86 | x86_64) ;; ++ *) ++ MOZ_ENABLE_PROFILER_SPS= ++ esac ++ ;; ++WINNT|Darwin) ;; ++*) ++ MOZ_ENABLE_PROFILER_SPS= ++ ;; ++esac ++ + # Check whether --enable-sps or --disable-sps was given. + if test "${enable_sps+set}" = set; then + enableval="$enable_sps" +- if test "$enableval" = "yes"; then ++ if test "$enableval" = "no"; then ++ MOZ_ENABLE_PROFILER_SPS= ++ elif test "$enableval" = "yes"; then + MOZ_ENABLE_PROFILER_SPS=1 +- elif test "$enableval" = "no"; then +- MOZ_ENABLE_PROFILER_SPS= + else + { echo "configure: error: Option, sps, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +diff -up xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in.734335 xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in +--- xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in.734335 2012-04-20 18:04:09.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in 2012-05-07 04:40:57.526363561 -0400 +@@ -315,7 +315,9 @@ endif + + STATIC_LIBS += thebes gl ycbcr + ++ifdef MOZ_ENABLE_PROFILER_SPS + COMPONENT_LIBS += profiler ++endif + + ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) + COMPONENT_LIBS += widget_windows +diff -up xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp.734335 xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp +--- xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp.734335 2012-04-20 18:04:09.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp 2012-05-07 04:40:57.526363561 -0400 +@@ -198,6 +198,12 @@ + #endif + #endif + ++#if defined(MOZ_ENABLE_PROFILER_SPS) ++#define PROFILER_MODULE MODULE(nsProfilerModule) ++#else ++#define PROFILER_MODULE ++#endif ++ + #define XUL_MODULES \ + MODULE(nsUConvModule) \ + MODULE(nsI18nModule) \ +@@ -214,7 +220,7 @@ + MODULE(nsWindowDataSourceModule) \ + MODULE(nsParserModule) \ + MODULE(nsGfxModule) \ +- MODULE(nsProfilerModule) \ ++ PROFILER_MODULE \ + WIDGET_MODULES \ + MODULE(nsImageLib2Module) \ + ICON_MODULE \ +diff -up xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in.734335 xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in +--- xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in.734335 2012-04-20 18:04:10.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in 2012-05-07 04:40:57.526363561 -0400 +@@ -48,8 +48,10 @@ VPATH = \ + + include $(DEPTH)/config/autoconf.mk + +-EXPORTS = \ +- sampler.h \ ++EXPORTS = sampler.h ++ ++ifdef MOZ_ENABLE_PROFILER_SPS ++EXPORTS += \ + sps_sampler.h \ + thread_helper.h \ + $(NULL) +@@ -68,6 +70,7 @@ IS_COMPONENT = 1 + CPPSRCS = \ + nsProfilerFactory.cpp \ + nsProfiler.cpp \ ++ TableTicker.cpp \ + $(NULL) + + XPIDLSRCS = \ +@@ -79,42 +82,31 @@ EXTRA_JS_MODULES = \ + $(NULL) + + ifneq (,$(filter Android Linux,$(OS_TARGET))) +- +-DEFINES += -DMOZ_ENABLE_PROFILER_SPS +- + CPPSRCS += \ + shared-libraries-linux.cc \ + platform-linux.cc \ +- TableTicker.cpp \ + $(NULL) + endif ++ + ifeq ($(OS_TARGET),Darwin) + # For now we use platform-linux.cc because we can't unwind + # another thread on mac using backtrace(), the implementation + # for platform-macosx.cc is in the hg history and should be + # used when we can stackwalk using a thread handle. +- +-DEFINES += -DMOZ_ENABLE_PROFILER_SPS +- + CPPSRCS += \ + shared-libraries-macos.cc \ + platform-linux.cc \ +- TableTicker.cpp \ + $(NULL) + endif + + ifeq ($(OS_TARGET),WINNT) +- +-DEFINES += -DMOZ_ENABLE_PROFILER_SPS +- + CPPSRCS += \ + shared-libraries-win32.cc \ + platform-win32.cc \ +- TableTicker.cpp \ + $(NULL) + endif + +- ++endif + + include $(topsrcdir)/config/rules.mk + +diff -up xulrunner-12.0/mozilla-release/tools/profiler/sampler.h.734335 xulrunner-12.0/mozilla-release/tools/profiler/sampler.h +--- xulrunner-12.0/mozilla-release/tools/profiler/sampler.h.734335 2012-04-20 18:04:10.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/tools/profiler/sampler.h 2012-05-07 04:40:57.526363561 -0400 +@@ -78,7 +78,7 @@ + #define SAMPLER_H + + // Redefine the macros for platforms where SPS is supported. +-#if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN) ++#ifdef MOZ_ENABLE_PROFILER_SPS + + #include "sps_sampler.h" + diff --git a/xulrunner-12.0-jemalloc-ppc.patch b/xulrunner-12.0-jemalloc-ppc.patch new file mode 100644 index 0000000..036f560 --- /dev/null +++ b/xulrunner-12.0-jemalloc-ppc.patch @@ -0,0 +1,14 @@ +Index: xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c +=================================================================== +--- xulrunner-11.0.orig/mozilla-release/memory/jemalloc/jemalloc.c ++++ xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c +@@ -1089,7 +1089,9 @@ static unsigned ncpus; + * controlling the malloc behavior are defined as compile-time constants + * for best performance and cannot be altered at runtime. + */ ++#if !(defined(__powerpc__)) + #define MALLOC_STATIC_SIZES 1 ++#endif + + #ifdef MALLOC_STATIC_SIZES + diff --git a/xulrunner-12.0-secondary.patch b/xulrunner-12.0-secondary.patch deleted file mode 100644 index e9b32d2..0000000 --- a/xulrunner-12.0-secondary.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h.secondary xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h ---- xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h.secondary 2012-05-04 14:56:50.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h 2012-05-04 14:59:27.000000000 +0200 -@@ -124,8 +124,12 @@ LinuxKernelMemoryBarrierFunc pLinuxKerne - # error "Memory clobber not supported for your compiler." - # endif - #else -+#ifdef __GNUC__ -+# define STORE_SEQUENCER() __sync_synchronize(); -+#else - # error "Memory clobber not supported for your platform." - #endif -+#endif - - // Returns a handdle to pass on exit. This can check that we are popping the - // correct callstack. -diff -up xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h.secondary xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h ---- xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h.secondary 2012-05-04 14:59:35.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h 2012-05-04 14:59:49.000000000 +0200 -@@ -41,23 +41,11 @@ - #ifndef V8_SUPPORT_H_ - #define V8_SUPPORT_H_ - --#if defined(_M_X64) || defined(__x86_64__) --#define V8_HOST_ARCH_X64 1 --#elif defined(_M_IX86) || defined(__i386__) || defined(__i386) --#define V8_HOST_ARCH_IA32 1 --#elif defined(__ARMEL__) --#define V8_HOST_ARCH_ARM 1 --#else --#warning Please add support for your architecture in chromium_types.h --#endif -- - typedef int32_t Atomic32; - --#if defined(V8_HOST_ARCH_X64) || defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_ARM) - inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { - *ptr = value; - } --#endif - - - const int kMaxInt = 0x7FFFFFFF; diff --git a/xulrunner.spec b/xulrunner.spec index d5c44da..51dd573 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -91,7 +91,8 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch16: add-gtkmozembed-11.0.patch %endif Patch17: xulrunner-10.0-gcc47.patch -Patch18: xulrunner-12.0-secondary.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 +Patch18: xulrunner-12.0-jemalloc-ppc.patch # Fedora specific patches @@ -104,6 +105,7 @@ Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch Patch43: mozilla-file.patch Patch46: mozilla-724615.patch Patch47: mozilla-691898.patch +Patch48: mozilla-734335.patch # --------------------------------------------------- @@ -235,7 +237,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch16 -p2 -b .gtkmozembed %endif %patch17 -p1 -b .gcc47 -%patch18 -p2 -b .secondary +%patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk %patch24 -p1 -b .static @@ -244,6 +246,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch43 -p1 -b .file %patch46 -p1 -b .724615 %patch47 -p2 -b .691898 +%patch48 -p2 -b .734335 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -501,6 +504,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 7 2012 Dan Horák - 12.0-5 +- Used backported upstream patch from mozb#734335 for fixing the sps profiler build +- Fixed build of jemalloc on ppc (patch by Gustavo Luiz Duarte/IBM) + * Fri May 4 2012 Dan Horák - 12.0-4 - Added new patch for 691898 - backport from trunk - Added build fix for secondary arches From 9ccd78f5a81ca7c84a8381e99b473a39e0f07914 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 May 2012 09:25:02 +0200 Subject: [PATCH 266/486] Added workaround for ppc(64) - mozbz#746112 --- mozilla-746112.patch | 35 +++++++++++++++++++++++++++++++++++ xulrunner.spec | 11 ++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 mozilla-746112.patch diff --git a/mozilla-746112.patch b/mozilla-746112.patch new file mode 100644 index 0000000..765f993 --- /dev/null +++ b/mozilla-746112.patch @@ -0,0 +1,35 @@ +Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h +=================================================================== +--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h ++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h +@@ -167,7 +167,7 @@ struct ByteTerm { + inputPosition = inputPos; + } + +- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) ++ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(false) +@@ -188,7 +188,7 @@ struct ByteTerm { + atom.quantityCount = 1; + } + +- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) ++ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(invert) +Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h +=================================================================== +--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h ++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h +@@ -171,7 +171,7 @@ struct PatternTerm { + quantityCount = 1; + } + +- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) ++ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(invert) diff --git a/xulrunner.spec b/xulrunner.spec index 51dd573..86b9913 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -106,6 +106,9 @@ Patch43: mozilla-file.patch Patch46: mozilla-724615.patch Patch47: mozilla-691898.patch Patch48: mozilla-734335.patch +%ifarch ppc ppc64 +Patch49: mozilla-746112.patch +%endif # --------------------------------------------------- @@ -247,6 +250,9 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch46 -p1 -b .724615 %patch47 -p2 -b .691898 %patch48 -p2 -b .734335 +%ifarch ppc ppc64 +%patch49 -p2 -b .746112 +%endif %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -504,6 +510,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 28 2012 Martin Stransky - 12.0-6 +- Added workaround for ppc(64) - mozbz#746112 + * Mon May 7 2012 Dan Horák - 12.0-5 - Used backported upstream patch from mozb#734335 for fixing the sps profiler build - Fixed build of jemalloc on ppc (patch by Gustavo Luiz Duarte/IBM) From d88f0a6b832a12803c50e051d50c2b82577300cb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 31 May 2012 14:23:02 +0200 Subject: [PATCH 267/486] More ppc(64) fixes - mozbz#746112 --- mozilla-746112-1.patch | 18 ++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 mozilla-746112-1.patch diff --git a/mozilla-746112-1.patch b/mozilla-746112-1.patch new file mode 100644 index 0000000..928d775 --- /dev/null +++ b/mozilla-746112-1.patch @@ -0,0 +1,18 @@ +diff -up mozilla-esr10/js/src/jsgcchunk.cpp.old mozilla-esr10/js/src/jsgcchunk.cpp +--- mozilla-esr10/js/src/jsgcchunk.cpp.old 2012-03-03 04:28:25.000000000 +0100 ++++ mozilla-esr10/js/src/jsgcchunk.cpp 2012-04-18 10:11:55.123376498 +0200 +@@ -366,9 +366,14 @@ CommitMemory(void *addr, size_t size) + bool + DecommitMemory(void *addr, size_t size) + { ++// A workaround for Bug 746112 - endless loop on ppc64 ++#if !(defined(__powerpc__)) + JS_ASSERT(uintptr_t(addr) % 4096UL == 0); + int result = madvise(addr, size, MADV_DONTNEED); + return result != -1; ++#else ++ return true; ++#endif + } + #else + # error "No CommitMemory defined on this platform." diff --git a/xulrunner.spec b/xulrunner.spec index 86b9913..b0d47fa 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -108,6 +108,7 @@ Patch47: mozilla-691898.patch Patch48: mozilla-734335.patch %ifarch ppc ppc64 Patch49: mozilla-746112.patch +Patch50: mozilla-746112-1.patch %endif # --------------------------------------------------- @@ -252,6 +253,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch48 -p2 -b .734335 %ifarch ppc ppc64 %patch49 -p2 -b .746112 +%patch50 -p1 -b .746112-1 %endif %{__rm} -f .mozconfig @@ -510,6 +512,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 28 2012 Martin Stransky - 12.0-7 +- More ppc(64) fixes - mozbz#746112 + * Mon May 28 2012 Martin Stransky - 12.0-6 - Added workaround for ppc(64) - mozbz#746112 From fa53a9add9ee9e0131c3dcaa6930ba1fd59fac36 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 4 Jun 2012 10:55:40 +0200 Subject: [PATCH 268/486] Update to 13.0 --- .gitignore | 1 + mozilla-691898.patch | 201 +++++++++-------- mozilla-724615.patch | 24 -- mozilla-734335.patch | 212 ------------------ mozilla-746112-1.patch | 18 -- mozilla-file.patch | 26 --- sources | 2 +- xulrunner-10.0-gcc47.patch | 12 - xulrunner-8.0-fix-maemo-checks-in-npapi.patch | 21 -- xulrunner.spec | 18 +- 10 files changed, 109 insertions(+), 426 deletions(-) delete mode 100644 mozilla-724615.patch delete mode 100644 mozilla-734335.patch delete mode 100644 mozilla-746112-1.patch delete mode 100644 mozilla-file.patch delete mode 100644 xulrunner-8.0-fix-maemo-checks-in-npapi.patch diff --git a/.gitignore b/.gitignore index 1f743ac..6fe5798 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-11.0b7.source.tar.bz2 /xulrunner-11.0.source.tar.bz2 /xulrunner-12.0.source.tar.bz2 +/xulrunner-13.0.source.tar.bz2 diff --git a/mozilla-691898.patch b/mozilla-691898.patch index 71220a7..441862d 100644 --- a/mozilla-691898.patch +++ b/mozilla-691898.patch @@ -1,7 +1,7 @@ -diff -up xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h ---- xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-04-21 00:03:53.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-05-04 10:23:50.000000000 +0200 -@@ -445,8 +445,6 @@ public: +diff -up xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h +--- xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-06-01 14:04:02.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-06-04 10:43:23.694175924 +0200 +@@ -467,8 +467,6 @@ public: { sync_instruction_memory((caddr_t)code, size); } @@ -10,10 +10,10 @@ diff -up xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator #endif private: -diff -up xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-12.0/mozilla-release/js/src/Makefile.in ---- xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 2012-04-21 00:03:53.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/Makefile.in 2012-05-04 11:09:57.000000000 +0200 -@@ -349,20 +349,23 @@ CPPSRCS += checks.cc \ +diff -up xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-13.0/mozilla-release/js/src/Makefile.in +--- xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 2012-06-01 14:04:02.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/Makefile.in 2012-06-04 10:45:57.023808537 +0200 +@@ -337,20 +337,23 @@ CPPSRCS += checks.cc \ # END enclude sources for V8 dtoa ############################################# @@ -47,25 +47,30 @@ diff -up xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-12.0 $(NULL) else -diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp ---- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-04-21 00:03:56.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp 2012-05-04 11:13:37.000000000 +0200 -@@ -392,7 +392,6 @@ Class js::RegExpClass = { - regexp_trace - }; +@@ -918,4 +921,3 @@ endif + # + # END kludges for the Nitro assembler + ############################################### +- +diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp +--- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-06-01 14:04:05.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp 2012-06-04 10:43:23.695175928 +0200 +@@ -167,7 +167,6 @@ MatchPairs::checkAgainst(size_t inputLen + + /* detail::RegExpCode */ -#if ENABLE_YARR_JIT void - RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) + RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) { -@@ -424,42 +423,6 @@ RegExpPrivateCode::reportYarrError(JSCon +@@ -199,46 +198,9 @@ RegExpCode::reportYarrError(JSContext *c } } -#else /* !ENABLE_YARR_JIT */ - -void --RegExpPrivateCode::reportPCREError(JSContext *cx, int error) +-RegExpCode::reportPCREError(JSContext *cx, int error) -{ -#define REPORT(msg_) \ - JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \ @@ -99,11 +104,69 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun -#endif /* ENABLE_YARR_JIT */ - bool - js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut) + RegExpCode::compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags) { -diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h ---- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-04-21 00:03:56.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h 2012-05-04 11:20:17.000000000 +0200 +-#if ENABLE_YARR_JIT + /* Parse the pattern. */ + ErrorCode yarrError; + YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), +@@ -255,7 +217,7 @@ RegExpCode::compile(JSContext *cx, JSLin + * case we have to bytecode compile it. + */ + +-#ifdef JS_METHODJIT ++#if ENABLE_YARR_JIT && defined(JS_METHODJIT) + if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { + JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); + if (!execAlloc) { +@@ -276,21 +238,11 @@ RegExpCode::compile(JSContext *cx, JSLin + return false; + } + ++#if ENABLE_YARR_JIT + codeBlock.setFallBack(true); ++#endif + byteCode = byteCompile(yarrPattern, bumpAlloc).get(); + return true; +-#else /* !defined(ENABLE_YARR_JIT) */ +- int error = 0; +- compiled = jsRegExpCompile(pattern.chars(), pattern.length(), +- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase, +- multiline() ? JSRegExpMultiline : JSRegExpSingleLine, +- parenCount, &error); +- if (error) { +- reportPCREError(cx, error); +- return false; +- } +- return true; +-#endif + } + + RegExpRunStatus +@@ -305,19 +257,12 @@ RegExpCode::execute(JSContext *cx, const + else + result = JSC::Yarr::execute(codeBlock, chars, start, length, output); + #else +- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount); ++ result = JSC::Yarr::interpret(byteCode, chars, start, length, output); + #endif + + if (result == -1) + return RegExpRunStatus_Success_NotFound; + +-#if !ENABLE_YARR_JIT +- if (result < 0) { +- reportPCREError(cx, result); +- return RegExpRunStatus_Error; +- } +-#endif +- + JS_ASSERT(result >= 0); + return RegExpRunStatus_Success; + } +diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h +--- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-06-01 14:04:05.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h 2012-06-04 10:47:03.609081248 +0200 @@ -51,10 +51,8 @@ #include "yarr/Yarr.h" #if ENABLE_YARR_JIT @@ -114,11 +177,11 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne #endif +#include "yarr/YarrSyntaxChecker.h" - namespace js { + /* + * JavaScript Regular Expressions +@@ -112,68 +110,51 @@ namespace detail { -@@ -242,68 +240,51 @@ static const jschar GreedyStarChars[] = - /* Abstracts away the gross |RegExpPrivate| backend details. */ - class RegExpPrivateCode + class RegExpCode { -#if ENABLE_YARR_JIT typedef JSC::Yarr::BytecodePattern BytecodePattern; @@ -138,7 +201,7 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne + BytecodePattern *byteCode; public: - RegExpPrivateCode() + RegExpCode() : #if ENABLE_YARR_JIT codeBlock(), @@ -149,7 +212,7 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne + byteCode(NULL) { } - ~RegExpPrivateCode() { + ~RegExpCode() { #if ENABLE_YARR_JIT codeBlock.release(); +#endif @@ -190,89 +253,29 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne -#endif } - inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, -diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h ---- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-04-21 00:03:56.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-05-04 11:17:01.000000000 +0200 -@@ -357,6 +357,7 @@ detail::RegExpPrivate::create(JSContext - return RetType(priv); + bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); +diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h +--- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-06-01 14:04:05.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-06-04 10:43:23.695175928 +0200 +@@ -137,6 +137,7 @@ RegExpObject::setSticky(bool enabled) + setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled)); } +#if ENABLE_YARR_JIT /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ inline bool - detail::RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) -@@ -367,12 +368,12 @@ detail::RegExpPrivateCode::isJITRuntimeE + detail::RegExpCode::isJITRuntimeEnabled(JSContext *cx) +@@ -147,6 +148,7 @@ detail::RegExpCode::isJITRuntimeEnabled( return true; #endif } +#endif inline bool - detail::RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, - uintN *parenCount, RegExpFlag flags) - { --#if ENABLE_YARR_JIT - /* Parse the pattern. */ - ErrorCode yarrError; - YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), -@@ -389,7 +390,7 @@ detail::RegExpPrivateCode::compile(JSCon - * case we have to bytecode compile it. - */ - --#ifdef JS_METHODJIT -+#if ENABLE_YARR_JIT && defined(JS_METHODJIT) - if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { - JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); - if (!execAlloc) { -@@ -410,21 +411,11 @@ detail::RegExpPrivateCode::compile(JSCon - return false; - } - -+#if ENABLE_YARR_JIT - codeBlock.setFallBack(true); -+#endif - byteCode = byteCompile(yarrPattern, bumpAlloc).get(); - return true; --#else /* !defined(ENABLE_YARR_JIT) */ -- int error = 0; -- compiled = jsRegExpCompile(pattern.chars(), pattern.length(), -- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase, -- multiline() ? JSRegExpMultiline : JSRegExpSingleLine, -- parenCount, &error); -- if (error) { -- reportPCREError(cx, error); -- return false; -- } -- return true; --#endif - } - - inline bool -@@ -466,19 +457,12 @@ detail::RegExpPrivateCode::execute(JSCon - else - result = JSC::Yarr::execute(codeBlock, chars, start, length, output); - #else -- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount); -+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output); - #endif - - if (result == -1) - return RegExpRunStatus_Success_NotFound; - --#if !ENABLE_YARR_JIT -- if (result < 0) { -- reportPCREError(cx, result); -- return RegExpRunStatus_Error; -- } --#endif -- - JS_ASSERT(result >= 0); - return RegExpRunStatus_Success; - } -diff -up xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h ---- xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-04-21 00:03:56.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h 2012-05-04 10:23:50.000000000 +0200 + RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g) +diff -up xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h +--- xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-06-01 14:04:05.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h 2012-06-04 10:43:23.696175932 +0200 @@ -49,9 +49,7 @@ #include "jsprvtd.h" #include "vm/String.h" diff --git a/mozilla-724615.patch b/mozilla-724615.patch deleted file mode 100644 index cc78c1b..0000000 --- a/mozilla-724615.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# Parent 6292e55419d1730a2e88a56fd30b2440ce0b393a -# User Raúl Porcel -Bug XXXXXX - Fix TARGET_CPU usage on ARM - - -diff --git a/xpcom/glue/objs.mk b/xpcom/glue/objs.mk ---- a/xpcom/glue/objs.mk -+++ b/xpcom/glue/objs.mk -@@ -71,13 +71,13 @@ XPCOM_GLUENS_SRC_LCPPSRCS = \ - SSE.cpp \ - unused.cpp \ - nsProxyRelease.cpp \ - nsTextFormatter.cpp \ - GenericFactory.cpp \ - FileUtils.cpp \ - $(NULL) - --ifeq (arm,$(TARGET_CPU)) -+ifneq (,$(filter arm%,$(TARGET_CPU))) - XPCOM_GLUENS_SRC_LCPPSRCS += arm.cpp - endif - - XPCOM_GLUENS_SRC_CPPSRCS = $(addprefix $(topsrcdir)/xpcom/glue/,$(XPCOM_GLUENS_SRC_LCPPSRCS)) diff --git a/mozilla-734335.patch b/mozilla-734335.patch deleted file mode 100644 index 1b7670b..0000000 --- a/mozilla-734335.patch +++ /dev/null @@ -1,212 +0,0 @@ -diff -up xulrunner-12.0/mozilla-release/configure.in.734335 xulrunner-12.0/mozilla-release/configure.in ---- xulrunner-12.0/mozilla-release/configure.in.734335 2012-04-20 18:03:44.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/configure.in 2012-05-07 04:40:57.526363561 -0400 -@@ -2124,10 +2124,33 @@ fi - dnl ======================================================== - dnl SPS Profiler - dnl ======================================================== --MOZ_ARG_ENABLE_BOOL(sps, --[ --enable-sps Enable sps profiling tool.], -- MOZ_ENABLE_PROFILER_SPS=1, -- MOZ_ENABLE_PROFILER_SPS= ) -+MOZ_ENABLE_PROFILER_SPS=1 -+ -+case "${OS_TARGET}" in -+Android) -+ case "${CPU_ARCH}" in -+ x86 | arm) ;; -+ *) -+ MOZ_ENABLE_PROFILER_SPS= -+ esac -+ ;; -+Linux) -+ case "${CPU_ARCH}" in -+ x86 | x86_64) ;; -+ *) -+ MOZ_ENABLE_PROFILER_SPS= -+ esac -+ ;; -+WINNT|Darwin) ;; -+*) -+ MOZ_ENABLE_PROFILER_SPS= -+ ;; -+esac -+ -+MOZ_ARG_DISABLE_BOOL(sps, -+[ --disable-sps Disable sps profiling tool.], -+ MOZ_ENABLE_PROFILER_SPS=, -+ MOZ_ENABLE_PROFILER_SPS=1) - if test -n "$MOZ_ENABLE_PROFILER_SPS"; then - AC_DEFINE(MOZ_ENABLE_PROFILER_SPS) - fi -diff -up xulrunner-12.0/mozilla-release/configure.734335 xulrunner-12.0/mozilla-release/configure ---- xulrunner-12.0/mozilla-release/configure.734335 2012-05-07 04:49:48.696360057 -0400 -+++ xulrunner-12.0/mozilla-release/configure 2012-05-07 04:50:10.396360262 -0400 -@@ -119,7 +119,7 @@ ac_help="$ac_help - ac_help="$ac_help - --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof). Implies --enable-profiling." - ac_help="$ac_help -- --enable-sps Enable sps profiling tool." -+ --disable-sps Disable sps profiling tool." - ac_help="$ac_help - --enable-shark Enable shark remote profiling. Implies --enable-profiling." - ac_help="$ac_help -@@ -7255,13 +7255,36 @@ EOF - - fi - -+MOZ_ENABLE_PROFILER_SPS=1 -+ -+case "${OS_TARGET}" in -+Android) -+ case "${CPU_ARCH}" in -+ x86 | arm) ;; -+ *) -+ MOZ_ENABLE_PROFILER_SPS= -+ esac -+ ;; -+Linux) -+ case "${CPU_ARCH}" in -+ x86 | x86_64) ;; -+ *) -+ MOZ_ENABLE_PROFILER_SPS= -+ esac -+ ;; -+WINNT|Darwin) ;; -+*) -+ MOZ_ENABLE_PROFILER_SPS= -+ ;; -+esac -+ - # Check whether --enable-sps or --disable-sps was given. - if test "${enable_sps+set}" = set; then - enableval="$enable_sps" -- if test "$enableval" = "yes"; then -+ if test "$enableval" = "no"; then -+ MOZ_ENABLE_PROFILER_SPS= -+ elif test "$enableval" = "yes"; then - MOZ_ENABLE_PROFILER_SPS=1 -- elif test "$enableval" = "no"; then -- MOZ_ENABLE_PROFILER_SPS= - else - { echo "configure: error: Option, sps, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -diff -up xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in.734335 xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in ---- xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in.734335 2012-04-20 18:04:09.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in 2012-05-07 04:40:57.526363561 -0400 -@@ -315,7 +315,9 @@ endif - - STATIC_LIBS += thebes gl ycbcr - -+ifdef MOZ_ENABLE_PROFILER_SPS - COMPONENT_LIBS += profiler -+endif - - ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) - COMPONENT_LIBS += widget_windows -diff -up xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp.734335 xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp ---- xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp.734335 2012-04-20 18:04:09.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp 2012-05-07 04:40:57.526363561 -0400 -@@ -198,6 +198,12 @@ - #endif - #endif - -+#if defined(MOZ_ENABLE_PROFILER_SPS) -+#define PROFILER_MODULE MODULE(nsProfilerModule) -+#else -+#define PROFILER_MODULE -+#endif -+ - #define XUL_MODULES \ - MODULE(nsUConvModule) \ - MODULE(nsI18nModule) \ -@@ -214,7 +220,7 @@ - MODULE(nsWindowDataSourceModule) \ - MODULE(nsParserModule) \ - MODULE(nsGfxModule) \ -- MODULE(nsProfilerModule) \ -+ PROFILER_MODULE \ - WIDGET_MODULES \ - MODULE(nsImageLib2Module) \ - ICON_MODULE \ -diff -up xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in.734335 xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in ---- xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in.734335 2012-04-20 18:04:10.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in 2012-05-07 04:40:57.526363561 -0400 -@@ -48,8 +48,10 @@ VPATH = \ - - include $(DEPTH)/config/autoconf.mk - --EXPORTS = \ -- sampler.h \ -+EXPORTS = sampler.h -+ -+ifdef MOZ_ENABLE_PROFILER_SPS -+EXPORTS += \ - sps_sampler.h \ - thread_helper.h \ - $(NULL) -@@ -68,6 +70,7 @@ IS_COMPONENT = 1 - CPPSRCS = \ - nsProfilerFactory.cpp \ - nsProfiler.cpp \ -+ TableTicker.cpp \ - $(NULL) - - XPIDLSRCS = \ -@@ -79,42 +82,31 @@ EXTRA_JS_MODULES = \ - $(NULL) - - ifneq (,$(filter Android Linux,$(OS_TARGET))) -- --DEFINES += -DMOZ_ENABLE_PROFILER_SPS -- - CPPSRCS += \ - shared-libraries-linux.cc \ - platform-linux.cc \ -- TableTicker.cpp \ - $(NULL) - endif -+ - ifeq ($(OS_TARGET),Darwin) - # For now we use platform-linux.cc because we can't unwind - # another thread on mac using backtrace(), the implementation - # for platform-macosx.cc is in the hg history and should be - # used when we can stackwalk using a thread handle. -- --DEFINES += -DMOZ_ENABLE_PROFILER_SPS -- - CPPSRCS += \ - shared-libraries-macos.cc \ - platform-linux.cc \ -- TableTicker.cpp \ - $(NULL) - endif - - ifeq ($(OS_TARGET),WINNT) -- --DEFINES += -DMOZ_ENABLE_PROFILER_SPS -- - CPPSRCS += \ - shared-libraries-win32.cc \ - platform-win32.cc \ -- TableTicker.cpp \ - $(NULL) - endif - -- -+endif - - include $(topsrcdir)/config/rules.mk - -diff -up xulrunner-12.0/mozilla-release/tools/profiler/sampler.h.734335 xulrunner-12.0/mozilla-release/tools/profiler/sampler.h ---- xulrunner-12.0/mozilla-release/tools/profiler/sampler.h.734335 2012-04-20 18:04:10.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/tools/profiler/sampler.h 2012-05-07 04:40:57.526363561 -0400 -@@ -78,7 +78,7 @@ - #define SAMPLER_H - - // Redefine the macros for platforms where SPS is supported. --#if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN) -+#ifdef MOZ_ENABLE_PROFILER_SPS - - #include "sps_sampler.h" - diff --git a/mozilla-746112-1.patch b/mozilla-746112-1.patch deleted file mode 100644 index 928d775..0000000 --- a/mozilla-746112-1.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up mozilla-esr10/js/src/jsgcchunk.cpp.old mozilla-esr10/js/src/jsgcchunk.cpp ---- mozilla-esr10/js/src/jsgcchunk.cpp.old 2012-03-03 04:28:25.000000000 +0100 -+++ mozilla-esr10/js/src/jsgcchunk.cpp 2012-04-18 10:11:55.123376498 +0200 -@@ -366,9 +366,14 @@ CommitMemory(void *addr, size_t size) - bool - DecommitMemory(void *addr, size_t size) - { -+// A workaround for Bug 746112 - endless loop on ppc64 -+#if !(defined(__powerpc__)) - JS_ASSERT(uintptr_t(addr) % 4096UL == 0); - int result = madvise(addr, size, MADV_DONTNEED); - return result != -1; -+#else -+ return true; -+#endif - } - #else - # error "No CommitMemory defined on this platform." diff --git a/mozilla-file.patch b/mozilla-file.patch deleted file mode 100644 index 14b0182..0000000 --- a/mozilla-file.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up mozilla-beta/ipc/chromium/src/base/file_util_linux.cc.file mozilla-beta/ipc/chromium/src/base/file_util_linux.cc ---- mozilla-beta/ipc/chromium/src/base/file_util_linux.cc.file 2012-01-24 09:00:00.000000000 +0100 -+++ mozilla-beta/ipc/chromium/src/base/file_util_linux.cc 2012-01-25 15:30:43.707796295 +0100 -@@ -5,6 +5,9 @@ - #include "base/file_util.h" - - #include -+#if defined(ANDROID) || defined(OS_POSIX) -+#include -+#endif - - #include - #include -diff -up mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc ---- mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file 2012-01-24 09:00:00.000000000 +0100 -+++ mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc 2012-01-25 15:13:11.947771212 +0100 -@@ -6,6 +6,9 @@ - - #include - #include -+#if defined(ANDROID) || defined(OS_POSIX) -+#include -+#endif - - #include "eintr_wrapper.h" - #include "base/logging.h" diff --git a/sources b/sources index d040718..3c6eae1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -80c3e5927274de7f181fb5f931ac5fd4 xulrunner-12.0.source.tar.bz2 +f50ca7656eec47030b396f39075fa980 xulrunner-13.0.source.tar.bz2 diff --git a/xulrunner-10.0-gcc47.patch b/xulrunner-10.0-gcc47.patch index 91a948a..093357b 100644 --- a/xulrunner-10.0-gcc47.patch +++ b/xulrunner-10.0-gcc47.patch @@ -1,15 +1,3 @@ -diff -up mozilla-beta/ipc/chromium/src/base/time_posix.cc.gcc47 mozilla-beta/ipc/chromium/src/base/time_posix.cc ---- mozilla-beta/ipc/chromium/src/base/time_posix.cc.gcc47 2012-01-24 03:00:00.000000000 -0500 -+++ mozilla-beta/ipc/chromium/src/base/time_posix.cc 2012-01-30 14:12:49.198472212 -0500 -@@ -14,6 +14,8 @@ - #include - #endif - -+#include -+ - #include - - #include "base/basictypes.h" diff -up mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-beta/toolkit/crashreporter/client/Makefile.in --- mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-01-30 14:41:14.475441039 -0500 +++ mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-01-30 14:43:03.587646656 -0500 diff --git a/xulrunner-8.0-fix-maemo-checks-in-npapi.patch b/xulrunner-8.0-fix-maemo-checks-in-npapi.patch deleted file mode 100644 index 99c9b7f..0000000 --- a/xulrunner-8.0-fix-maemo-checks-in-npapi.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up mozilla-release/dom/plugins/base/npapi.h.BAD mozilla-release/dom/plugins/base/npapi.h ---- mozilla-release/dom/plugins/base/npapi.h.BAD 2011-12-06 13:31:16.364405916 -0500 -+++ mozilla-release/dom/plugins/base/npapi.h 2011-12-06 13:31:47.131109006 -0500 -@@ -379,7 +379,7 @@ typedef enum { - , NPPVpluginCoreAnimationLayer = 1003 - #endif - --#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) -+#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) - , NPPVpluginWindowlessLocalBool = 2002 - #endif - } NPPVariable; -@@ -432,7 +432,7 @@ typedef enum { - , NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports - CA model compositing */ - #endif --#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) -+#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)) - , NPNVSupportsWindowlessLocal = 2002 - #endif - } NPNVariable; diff --git a/xulrunner.spec b/xulrunner.spec index b0d47fa..2dc9514 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 12.0 -Release: 7%{?pre_tag}%{?dist} +Version: 13.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -100,15 +100,9 @@ Patch20: mozilla-193-pkgconfig.patch Patch24: crashreporter-remove-static.patch # Upstream patches -# https://bugzilla.mozilla.org/show_bug.cgi?id=707993 -Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch -Patch43: mozilla-file.patch -Patch46: mozilla-724615.patch Patch47: mozilla-691898.patch -Patch48: mozilla-734335.patch %ifarch ppc ppc64 Patch49: mozilla-746112.patch -Patch50: mozilla-746112-1.patch %endif # --------------------------------------------------- @@ -246,14 +240,9 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch20 -p2 -b .pk %patch24 -p1 -b .static -%patch39 -p1 -b .707993 -%patch43 -p1 -b .file -%patch46 -p1 -b .724615 %patch47 -p2 -b .691898 -%patch48 -p2 -b .734335 %ifarch ppc ppc64 %patch49 -p2 -b .746112 -%patch50 -p1 -b .746112-1 %endif %{__rm} -f .mozconfig @@ -512,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jun 4 2012 Martin Stransky - 13.0-1 +- Update to 13.0 + * Mon May 28 2012 Martin Stransky - 12.0-7 - More ppc(64) fixes - mozbz#746112 From 1a4c9e57406a0ce866e18c1fa9f1ddaf1e8d3c05 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 4 Jun 2012 16:59:44 +0200 Subject: [PATCH 269/486] fixed build errors --- xulrunner-mozconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index bed6ee5..7852dd4 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -40,4 +40,4 @@ export MOZ_UA_BUILDID=20100101 mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 -mk_add_options MOZ_OBJDIR=@TOPSRCDIR@ +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir From 463948894493650faa8881628d16e1dec541c91b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 5 Jun 2012 11:03:04 +0200 Subject: [PATCH 270/486] build patch and fix --- mozilla-nspr-build.patch | 12 ++++++++++++ xulrunner.spec | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 mozilla-nspr-build.patch diff --git a/mozilla-nspr-build.patch b/mozilla-nspr-build.patch new file mode 100644 index 0000000..c3f285a --- /dev/null +++ b/mozilla-nspr-build.patch @@ -0,0 +1,12 @@ +diff -up mozilla-release/hal/sandbox/PHal.ipdl.old mozilla-release/hal/sandbox/PHal.ipdl +--- mozilla-release/hal/sandbox/PHal.ipdl.old 2012-06-01 14:04:00.000000000 +0200 ++++ mozilla-release/hal/sandbox/PHal.ipdl 2012-06-05 09:15:02.524408100 +0200 +@@ -39,7 +39,7 @@ + + include protocol PContent; + include protocol PBrowser; +-include "nspr/prtime.h"; ++include "prtime.h"; + include "mozilla/HalSensor.h"; + include "mozilla/HalTypes.h"; + diff --git a/xulrunner.spec b/xulrunner.spec index 2dc9514..81af527 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -93,6 +93,7 @@ Patch16: add-gtkmozembed-11.0.patch Patch17: xulrunner-10.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-12.0-jemalloc-ppc.patch +Patch19: mozilla-nspr-build.patch # Fedora specific patches @@ -236,6 +237,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %endif %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc +%patch19 -p1 -b .nspr %patch20 -p2 -b .pk %patch24 -p1 -b .static @@ -359,7 +361,7 @@ make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SE # create debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} #cd %{moz_objdir} -make buildsymbols +make -C objdir buildsymbols %endif #--------------------------------------------------------------------- From 549acf31d173ba1b21faff9404596c8732f5d70f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 5 Jun 2012 12:20:20 +0200 Subject: [PATCH 271/486] objdir build fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 81af527..d15128a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -370,7 +370,7 @@ make -C objdir buildsymbols cd %{tarballdir} # set up our prefs before install, so it gets pulled in to omni.jar -%{__cp} -p %{SOURCE12} dist/bin/defaults/pref/all-redhat.js +%{__cp} -p %{SOURCE12} objdir/dist/bin/defaults/pref/all-redhat.js DESTDIR=$RPM_BUILD_ROOT make install From 99112db19b2a099cd4cb80ca237018109486e9d4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 5 Jun 2012 13:10:07 +0200 Subject: [PATCH 272/486] more build fixed --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d15128a..6053824 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -372,7 +372,7 @@ cd %{tarballdir} # set up our prefs before install, so it gets pulled in to omni.jar %{__cp} -p %{SOURCE12} objdir/dist/bin/defaults/pref/all-redhat.js -DESTDIR=$RPM_BUILD_ROOT make install +DESTDIR=$RPM_BUILD_ROOT make -C objdir install # Start script install %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} @@ -441,7 +441,7 @@ touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat # Add debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} %{__mkdir_p} $RPM_BUILD_ROOT/%{moz_debug_dir} -%{__cp} dist/%{symbols_file_name} $RPM_BUILD_ROOT/%{moz_debug_dir} +%{__cp} objdir/dist/%{symbols_file_name} $RPM_BUILD_ROOT/%{moz_debug_dir} %endif #--------------------------------------------------------------------- From df3636d28e79d658c40c1599e3c15a248da88289 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 6 Jun 2012 09:44:48 +0200 Subject: [PATCH 273/486] src.rpm should include all patches --- xulrunner.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 6053824..92da823 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 13.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,9 +102,7 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch47: mozilla-691898.patch -%ifarch ppc ppc64 Patch49: mozilla-746112.patch -%endif # --------------------------------------------------- @@ -503,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 5 2012 Martin Stransky - 13.0-2 +- src.rpm should include all patches + * Mon Jun 4 2012 Martin Stransky - 13.0-1 - Update to 13.0 From a10f0bc4e5c80e16862c0b5e9da99d7110489967 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Sat, 16 Jun 2012 22:48:47 +0200 Subject: [PATCH 274/486] Update to 13.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6fe5798..9bc38c3 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-11.0.source.tar.bz2 /xulrunner-12.0.source.tar.bz2 /xulrunner-13.0.source.tar.bz2 +/xulrunner-13.0.1.source.tar.bz2 diff --git a/sources b/sources index 3c6eae1..24bac32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f50ca7656eec47030b396f39075fa980 xulrunner-13.0.source.tar.bz2 +82deadb501c7fc0e9fa6b025f51f05a1 xulrunner-13.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 92da823..69e9bff 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 13.0 -Release: 2%{?pre_tag}%{?dist} +Version: 13.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -501,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Jun 16 2012 Jan Horak - 13.0.1-1 +- Update to 13.0.1 + * Wed Jun 5 2012 Martin Stransky - 13.0-2 - src.rpm should include all patches From c6ada0ca369f8bd0e41bb040c9e4984e3c86ea1d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 19 Jun 2012 15:18:56 +0200 Subject: [PATCH 275/486] Fixed changelog encoding --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 69e9bff..908b24e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -597,7 +597,7 @@ fi * Mon Nov 7 2011 Martin Stransky 8.0-1 - Updated to 8.0 -* Tue Oct 18 2011 Ville Skyttä - 7.0.1-5 +* Tue Oct 18 2011 Ville Skyttä - 7.0.1-5 - Avoid %%post/un shell invocations and dependencies (rhbz#736830). From 65af9bcf035ee869f290cb07ab0c1d7421dd9a8b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jul 2012 13:51:53 +0200 Subject: [PATCH 276/486] Update to 14.0.1 --- .gitignore | 1 + mozilla-691898.patch | 62 ++++++++++++++++++++-------------------- mozilla-nspr-build.patch | 12 -------- sources | 2 +- xulrunner.spec | 8 +++--- 5 files changed, 37 insertions(+), 48 deletions(-) delete mode 100644 mozilla-nspr-build.patch diff --git a/.gitignore b/.gitignore index 9bc38c3..2b12764 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-12.0.source.tar.bz2 /xulrunner-13.0.source.tar.bz2 /xulrunner-13.0.1.source.tar.bz2 +/xulrunner-14.0.1.source.tar.bz2 diff --git a/mozilla-691898.patch b/mozilla-691898.patch index 441862d..d138d84 100644 --- a/mozilla-691898.patch +++ b/mozilla-691898.patch @@ -1,7 +1,7 @@ -diff -up xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h ---- xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-06-01 14:04:02.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-06-04 10:43:23.694175924 +0200 -@@ -467,8 +467,6 @@ public: +diff -up xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h +--- xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-07-13 23:42:56.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-07-16 13:46:03.512655482 +0200 +@@ -468,8 +468,6 @@ public: { sync_instruction_memory((caddr_t)code, size); } @@ -10,12 +10,12 @@ diff -up xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator #endif private: -diff -up xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-13.0/mozilla-release/js/src/Makefile.in ---- xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 2012-06-01 14:04:02.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/Makefile.in 2012-06-04 10:45:57.023808537 +0200 -@@ -337,20 +337,23 @@ CPPSRCS += checks.cc \ - # END enclude sources for V8 dtoa - ############################################# +diff -up xulrunner-14.0.1/mozilla-release/js/src/Makefile.in.691898 xulrunner-14.0.1/mozilla-release/js/src/Makefile.in +--- xulrunner-14.0.1/mozilla-release/js/src/Makefile.in.691898 2012-07-13 23:42:56.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/Makefile.in 2012-07-16 13:48:34.039399155 +0200 +@@ -320,20 +320,22 @@ endif + + endif -# For architectures without YARR JIT, PCRE is faster than the YARR -# interpreter (bug 684559). @@ -23,11 +23,11 @@ diff -up xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-13.0 ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) -VPATH += $(srcdir)/yarr/pcre \ +- $(NULL) +VPATH += $(srcdir)/assembler \ + $(srcdir)/assembler/wtf \ + $(srcdir)/assembler/jit \ + $(srcdir)/yarr \ - $(NULL) -CPPSRCS += \ - pcre_compile.cpp \ @@ -47,15 +47,15 @@ diff -up xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-13.0 $(NULL) else -@@ -918,4 +921,3 @@ endif +@@ -903,4 +905,3 @@ endif # # END kludges for the Nitro assembler ############################################### - -diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp ---- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-06-01 14:04:05.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp 2012-06-04 10:43:23.695175928 +0200 -@@ -167,7 +167,6 @@ MatchPairs::checkAgainst(size_t inputLen +diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp +--- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-07-13 23:42:59.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp 2012-07-16 13:46:03.897657354 +0200 +@@ -168,7 +168,6 @@ MatchPairs::checkAgainst(size_t inputLen /* detail::RegExpCode */ @@ -63,7 +63,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun void RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) { -@@ -199,46 +198,9 @@ RegExpCode::reportYarrError(JSContext *c +@@ -200,46 +199,9 @@ RegExpCode::reportYarrError(JSContext *c } } @@ -110,7 +110,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun /* Parse the pattern. */ ErrorCode yarrError; YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), -@@ -255,7 +217,7 @@ RegExpCode::compile(JSContext *cx, JSLin +@@ -256,7 +218,7 @@ RegExpCode::compile(JSContext *cx, JSLin * case we have to bytecode compile it. */ @@ -119,7 +119,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); if (!execAlloc) { -@@ -276,21 +238,11 @@ RegExpCode::compile(JSContext *cx, JSLin +@@ -277,21 +239,11 @@ RegExpCode::compile(JSContext *cx, JSLin return false; } @@ -143,7 +143,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun } RegExpRunStatus -@@ -305,19 +257,12 @@ RegExpCode::execute(JSContext *cx, const +@@ -306,19 +258,12 @@ RegExpCode::execute(JSContext *cx, const else result = JSC::Yarr::execute(codeBlock, chars, start, length, output); #else @@ -164,10 +164,10 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun JS_ASSERT(result >= 0); return RegExpRunStatus_Success; } -diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h ---- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-06-01 14:04:05.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h 2012-06-04 10:47:03.609081248 +0200 -@@ -51,10 +51,8 @@ +diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h +--- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-07-13 23:42:59.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h 2012-07-16 13:46:03.897657354 +0200 +@@ -52,10 +52,8 @@ #include "yarr/Yarr.h" #if ENABLE_YARR_JIT #include "yarr/YarrJIT.h" @@ -179,7 +179,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne /* * JavaScript Regular Expressions -@@ -112,68 +110,51 @@ namespace detail { +@@ -113,68 +111,51 @@ namespace detail { class RegExpCode { @@ -254,9 +254,9 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne } bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); -diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h ---- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-06-01 14:04:05.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-06-04 10:43:23.695175928 +0200 +diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h +--- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-07-13 23:42:59.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-07-16 13:46:03.898657360 +0200 @@ -137,6 +137,7 @@ RegExpObject::setSticky(bool enabled) setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled)); } @@ -273,9 +273,9 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulr inline bool RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g) -diff -up xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h ---- xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-06-01 14:04:05.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h 2012-06-04 10:43:23.696175932 +0200 +diff -up xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h +--- xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-07-13 23:42:59.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h 2012-07-16 13:46:03.898657360 +0200 @@ -49,9 +49,7 @@ #include "jsprvtd.h" #include "vm/String.h" diff --git a/mozilla-nspr-build.patch b/mozilla-nspr-build.patch deleted file mode 100644 index c3f285a..0000000 --- a/mozilla-nspr-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-release/hal/sandbox/PHal.ipdl.old mozilla-release/hal/sandbox/PHal.ipdl ---- mozilla-release/hal/sandbox/PHal.ipdl.old 2012-06-01 14:04:00.000000000 +0200 -+++ mozilla-release/hal/sandbox/PHal.ipdl 2012-06-05 09:15:02.524408100 +0200 -@@ -39,7 +39,7 @@ - - include protocol PContent; - include protocol PBrowser; --include "nspr/prtime.h"; -+include "prtime.h"; - include "mozilla/HalSensor.h"; - include "mozilla/HalTypes.h"; - diff --git a/sources b/sources index 24bac32..d02897c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -82deadb501c7fc0e9fa6b025f51f05a1 xulrunner-13.0.1.source.tar.bz2 +c2f884f0f6c41c65cf20f678a1ee7191 xulrunner-14.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 908b24e..ba9086c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,7 +72,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 13.0.1 +Version: 14.0.1 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -93,8 +93,6 @@ Patch16: add-gtkmozembed-11.0.patch Patch17: xulrunner-10.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-12.0-jemalloc-ppc.patch -Patch19: mozilla-nspr-build.patch - # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -235,7 +233,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %endif %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc -%patch19 -p1 -b .nspr %patch20 -p2 -b .pk %patch24 -p1 -b .static @@ -501,6 +498,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 16 2012 Jan Horak - 14.0.1-1 +- Update to 14.0.1 + * Sat Jun 16 2012 Jan Horak - 13.0.1-1 - Update to 13.0.1 From fce8fe8fc97c886093cadd34d570ecd382258ec4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jul 2012 14:19:32 +0200 Subject: [PATCH 277/486] build fixes --- xulrunner.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index ba9086c..377917b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -456,7 +456,6 @@ fi %{_bindir}/xulrunner %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE -%doc %attr(644, root, root) %{mozappdir}/README.txt %{mozappdir}/chrome %{mozappdir}/chrome.manifest %{mozappdir}/dictionaries @@ -469,7 +468,6 @@ fi %{mozappdir}/plugins %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client -%{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub From c1548b50086691b3e00b54e406f2e7183c0ffb0a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jul 2012 15:20:59 +0200 Subject: [PATCH 278/486] build fixes --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 377917b..43ecebd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -491,12 +491,12 @@ fi %{_includedir}/%{name}*%{gecko_dir_ver} %{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc -%{mozappdir}/xpcshell +#%{mozappdir}/xpcshell #--------------------------------------------------------------------- %changelog -* Mon Jul 16 2012 Jan Horak - 14.0.1-1 +* Mon Jul 16 2012 Martin Stransky - 14.0.1-1 - Update to 14.0.1 * Sat Jun 16 2012 Jan Horak - 13.0.1-1 From 9e952990a788798c961de44e4af9eda36cf40078 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jul 2012 15:39:40 +0200 Subject: [PATCH 279/486] Build fix --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 43ecebd..1a46056 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -456,6 +456,7 @@ fi %{_bindir}/xulrunner %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE +%doc %attr(644, root, root) %{mozappdir}/README.xulrunner %{mozappdir}/chrome %{mozappdir}/chrome.manifest %{mozappdir}/dictionaries From b85c7e35ed25531dd9a40fdb720f124916945bf9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jul 2012 00:12:39 +0200 Subject: [PATCH 280/486] Ship xpcshell again --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 1a46056..533d16c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -424,6 +424,9 @@ EOF # Copy over the LICENSE %{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir} +# Install xpcshell +%{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} + # Use the system hunspell dictionaries %{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries @@ -492,7 +495,7 @@ fi %{_includedir}/%{name}*%{gecko_dir_ver} %{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc -#%{mozappdir}/xpcshell +%{mozappdir}/xpcshell #--------------------------------------------------------------------- From b9ad0d4eade562699cc88cbfc7421955557a9350 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jul 2012 00:15:36 +0200 Subject: [PATCH 281/486] release up --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 533d16c..2bdb8a2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -500,7 +500,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Jul 16 2012 Martin Stransky - 14.0.1-1 +* Mon Jul 16 2012 Martin Stransky - 14.0.1-2 - Update to 14.0.1 * Sat Jun 16 2012 Jan Horak - 13.0.1-1 From 06cf9cd3b78b65ec8475dabf4389fd7d6f4d414c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jul 2012 14:23:23 +0200 Subject: [PATCH 282/486] More build fixes --- xulrunner.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2bdb8a2..2235e2e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -427,6 +427,9 @@ EOF # Install xpcshell %{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} +# Install run-mozilla.sh +%{__cp} objdir/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{mozappdir} + # Use the system hunspell dictionaries %{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries @@ -472,6 +475,7 @@ fi %{mozappdir}/plugins %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client +%{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub @@ -500,7 +504,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Jul 16 2012 Martin Stransky - 14.0.1-2 +* Mon Jul 16 2012 Martin Stransky - 14.0.1-3 - Update to 14.0.1 * Sat Jun 16 2012 Jan Horak - 13.0.1-1 From 3aa28f2c42dd466bad418cae1cbbe64d94a73437 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 22 Jul 2012 02:23:43 -0500 Subject: [PATCH 283/486] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2235e2e..fd2d880 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -504,6 +504,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 14.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Mon Jul 16 2012 Martin Stransky - 14.0.1-3 - Update to 14.0.1 From e59ccef1abf5813a7b76b20c1c0181809ffa4b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 25 Jul 2012 13:24:16 +0200 Subject: [PATCH 284/486] Added fix for secondary arches - mozbz#750620 --- mozilla-750620.patch | 33 +++++++++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 mozilla-750620.patch diff --git a/mozilla-750620.patch b/mozilla-750620.patch new file mode 100644 index 0000000..c8c6d10 --- /dev/null +++ b/mozilla-750620.patch @@ -0,0 +1,33 @@ +# HG changeset patch +# User Mike Hommey +# Date 1337607752 -7200 +# Node ID 93093285af6065c441a806e97ca8f79225a158c6 +# Parent 87c452c6444eecd226a30458e735d0cfaad714fd +Bug 750620 - Declare double conversion correctness for more architectures + +diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h +--- a/mfbt/double-conversion/utils.h ++++ b/mfbt/double-conversion/utils.h +@@ -48,17 +48,21 @@ + // An easy way to test if the floating-point operations are correct is to + // evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then + // the result is equal to 89255e-22. + // The best way to test this, is to create a division-function and to compare + // the output of the division with the expected result. (Inlining must be + // disabled.) + // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) + #if defined(_M_X64) || defined(__x86_64__) || \ +- defined(__ARMEL__) || \ ++ defined(__ARMEL__) || defined(__avr32__) || \ ++ defined(__hppa__) || defined(__ia64__) || \ ++ defined(__mips__) || defined(__powerpc__) || \ ++ defined(__sparc__) || defined(__s390__) || \ ++ defined(__SH4__) || defined(__alpha__) || \ + defined(_MIPS_ARCH_MIPS32R2) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(_M_IX86) || defined(__i386__) + #if defined(_WIN32) + // Windows uses a 64bit wide floating point stack. + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #else + #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS diff --git a/xulrunner.spec b/xulrunner.spec index fd2d880..c41a56f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -101,6 +101,7 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch47: mozilla-691898.patch Patch49: mozilla-746112.patch +Patch50: mozilla-750620.patch # --------------------------------------------------- @@ -241,6 +242,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %ifarch ppc ppc64 %patch49 -p2 -b .746112 %endif +%patch50 -p1 -b .750620 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -504,6 +506,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 25 2012 Dan Horák - 14.0.1-5 +- Added fix for secondary arches - mozbz#750620 + * Sun Jul 22 2012 Fedora Release Engineering - 14.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 050d36943a12dd20a73e874174cecedcd24c762d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 9 Aug 2012 15:39:55 +0200 Subject: [PATCH 285/486] Added fix for mozbz#709732 - color profiles --- mozilla-709732-gfx-icc-profile-fix.patch | 21 +++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 mozilla-709732-gfx-icc-profile-fix.patch diff --git a/mozilla-709732-gfx-icc-profile-fix.patch b/mozilla-709732-gfx-icc-profile-fix.patch new file mode 100644 index 0000000..7e268d0 --- /dev/null +++ b/mozilla-709732-gfx-icc-profile-fix.patch @@ -0,0 +1,21 @@ +diff -r dd29535bac5f gfx/thebes/gfxPlatformGtk.cpp +--- a/gfx/thebes/gfxPlatformGtk.cpp Sat May 05 20:22:53 2012 -0700 ++++ b/gfx/thebes/gfxPlatformGtk.cpp Wed May 09 11:42:21 2012 +0200 +@@ -538,16 +538,10 @@ + if (iccAtom) { + // read once to get size, once for the data + if (Success == XGetWindowProperty(dpy, root, iccAtom, +- 0, 0 /* length */, ++ 0, INT_MAX /* length */, + False, AnyPropertyType, + &retAtom, &retFormat, &retLength, + &retAfter, &retProperty)) { +- XGetWindowProperty(dpy, root, iccAtom, +- 0, retLength, +- False, AnyPropertyType, +- &retAtom, &retFormat, &retLength, +- &retAfter, &retProperty); +- + qcms_profile* profile = NULL; + + if (retLength > 0) diff --git a/xulrunner.spec b/xulrunner.spec index c41a56f..5f5dfd1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,6 +102,7 @@ Patch24: crashreporter-remove-static.patch Patch47: mozilla-691898.patch Patch49: mozilla-746112.patch Patch50: mozilla-750620.patch +Patch51: mozilla-709732-gfx-icc-profile-fix.patch # --------------------------------------------------- @@ -243,6 +244,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch49 -p2 -b .746112 %endif %patch50 -p1 -b .750620 +%patch51 -p1 -b .709732 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -506,6 +508,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Aug 9 2012 Jan Horak - 14.0.1-6 +- Added fix for mozbz#709732 + * Wed Jul 25 2012 Dan Horák - 14.0.1-5 - Added fix for secondary arches - mozbz#750620 From f86b2101162168629647a961e312fa4acf2f6452 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 Aug 2012 13:46:10 +0200 Subject: [PATCH 286/486] Update to xulrunner 15b6 --- crashreporter-remove-static.patch | 11 -- mozilla-691898.patch | 288 ------------------------------ mozilla-750620.patch | 33 ---- xulrunner-10.0-gcc47.patch | 13 -- xulrunner-15.0-gcc47.patch | 13 ++ xulrunner.spec | 20 +-- 6 files changed, 21 insertions(+), 357 deletions(-) delete mode 100644 crashreporter-remove-static.patch delete mode 100644 mozilla-691898.patch delete mode 100644 mozilla-750620.patch delete mode 100644 xulrunner-10.0-gcc47.patch create mode 100644 xulrunner-15.0-gcc47.patch diff --git a/crashreporter-remove-static.patch b/crashreporter-remove-static.patch deleted file mode 100644 index b94d165..0000000 --- a/crashreporter-remove-static.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up comm-1.9.2/mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in.static comm-1.9.2/mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in ---- mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in.static 2010-06-23 19:47:11.000000000 +0200 -+++ mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in 2010-07-12 15:51:41.000000000 +0200 -@@ -64,6 +64,6 @@ FORCE_USE_PIC = 1 - - #XXX: bug 554854 causes us to be unable to run binaries on the build slaves - # due to them having an older libstdc++ --HOST_LDFLAGS += -static -+#HOST_LDFLAGS += -static - - include $(topsrcdir)/config/rules.mk diff --git a/mozilla-691898.patch b/mozilla-691898.patch deleted file mode 100644 index d138d84..0000000 --- a/mozilla-691898.patch +++ /dev/null @@ -1,288 +0,0 @@ -diff -up xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h ---- xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-07-13 23:42:56.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-07-16 13:46:03.512655482 +0200 -@@ -468,8 +468,6 @@ public: - { - sync_instruction_memory((caddr_t)code, size); - } --#else -- #error "The cacheFlush support is missing on this platform." - #endif - - private: -diff -up xulrunner-14.0.1/mozilla-release/js/src/Makefile.in.691898 xulrunner-14.0.1/mozilla-release/js/src/Makefile.in ---- xulrunner-14.0.1/mozilla-release/js/src/Makefile.in.691898 2012-07-13 23:42:56.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/Makefile.in 2012-07-16 13:48:34.039399155 +0200 -@@ -320,20 +320,22 @@ endif - - endif - --# For architectures without YARR JIT, PCRE is faster than the YARR --# interpreter (bug 684559). -- - ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) - --VPATH += $(srcdir)/yarr/pcre \ -- $(NULL) -+VPATH += $(srcdir)/assembler \ -+ $(srcdir)/assembler/wtf \ -+ $(srcdir)/assembler/jit \ -+ $(srcdir)/yarr \ - --CPPSRCS += \ -- pcre_compile.cpp \ -- pcre_exec.cpp \ -- pcre_tables.cpp \ -- pcre_xclass.cpp \ -- pcre_ucp_searchfuncs.cpp \ -+CPPSRCS += ExecutableAllocator.cpp \ -+ ExecutableAllocatorPosix.cpp \ -+ OSAllocatorOS2.cpp \ -+ OSAllocatorPosix.cpp \ -+ OSAllocatorWin.cpp \ -+ PageBlock.cpp \ -+ YarrInterpreter.cpp \ -+ YarrPattern.cpp \ -+ YarrSyntaxChecker.cpp \ - $(NULL) - else - -@@ -903,4 +905,3 @@ endif - # - # END kludges for the Nitro assembler - ############################################### -- -diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp ---- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-07-13 23:42:59.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp 2012-07-16 13:46:03.897657354 +0200 -@@ -168,7 +168,6 @@ MatchPairs::checkAgainst(size_t inputLen - - /* detail::RegExpCode */ - --#if ENABLE_YARR_JIT - void - RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) - { -@@ -200,46 +199,9 @@ RegExpCode::reportYarrError(JSContext *c - } - } - --#else /* !ENABLE_YARR_JIT */ -- --void --RegExpCode::reportPCREError(JSContext *cx, int error) --{ --#define REPORT(msg_) \ -- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \ -- return -- switch (error) { -- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); -- case 1: REPORT(JSMSG_TRAILING_SLASH); -- case 2: REPORT(JSMSG_TRAILING_SLASH); -- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 4: REPORT(JSMSG_BAD_QUANTIFIER); -- case 5: REPORT(JSMSG_BAD_QUANTIFIER); -- case 6: REPORT(JSMSG_BAD_CLASS_RANGE); -- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 8: REPORT(JSMSG_BAD_CLASS_RANGE); -- case 9: REPORT(JSMSG_BAD_QUANTIFIER); -- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); -- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); -- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 14: REPORT(JSMSG_MISSING_PAREN); -- case 15: REPORT(JSMSG_BAD_BACKREF); -- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- default: -- JS_NOT_REACHED("Precondition violation: unknown PCRE error code."); -- } --#undef REPORT --} -- --#endif /* ENABLE_YARR_JIT */ -- - bool - RegExpCode::compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags) - { --#if ENABLE_YARR_JIT - /* Parse the pattern. */ - ErrorCode yarrError; - YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), -@@ -256,7 +218,7 @@ RegExpCode::compile(JSContext *cx, JSLin - * case we have to bytecode compile it. - */ - --#ifdef JS_METHODJIT -+#if ENABLE_YARR_JIT && defined(JS_METHODJIT) - if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { - JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); - if (!execAlloc) { -@@ -277,21 +239,11 @@ RegExpCode::compile(JSContext *cx, JSLin - return false; - } - -+#if ENABLE_YARR_JIT - codeBlock.setFallBack(true); -+#endif - byteCode = byteCompile(yarrPattern, bumpAlloc).get(); - return true; --#else /* !defined(ENABLE_YARR_JIT) */ -- int error = 0; -- compiled = jsRegExpCompile(pattern.chars(), pattern.length(), -- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase, -- multiline() ? JSRegExpMultiline : JSRegExpSingleLine, -- parenCount, &error); -- if (error) { -- reportPCREError(cx, error); -- return false; -- } -- return true; --#endif - } - - RegExpRunStatus -@@ -306,19 +258,12 @@ RegExpCode::execute(JSContext *cx, const - else - result = JSC::Yarr::execute(codeBlock, chars, start, length, output); - #else -- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount); -+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output); - #endif - - if (result == -1) - return RegExpRunStatus_Success_NotFound; - --#if !ENABLE_YARR_JIT -- if (result < 0) { -- reportPCREError(cx, result); -- return RegExpRunStatus_Error; -- } --#endif -- - JS_ASSERT(result >= 0); - return RegExpRunStatus_Success; - } -diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h ---- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-07-13 23:42:59.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h 2012-07-16 13:46:03.897657354 +0200 -@@ -52,10 +52,8 @@ - #include "yarr/Yarr.h" - #if ENABLE_YARR_JIT - #include "yarr/YarrJIT.h" --#include "yarr/YarrSyntaxChecker.h" --#else --#include "yarr/pcre/pcre.h" - #endif -+#include "yarr/YarrSyntaxChecker.h" - - /* - * JavaScript Regular Expressions -@@ -113,68 +111,51 @@ namespace detail { - - class RegExpCode - { --#if ENABLE_YARR_JIT - typedef JSC::Yarr::BytecodePattern BytecodePattern; - typedef JSC::Yarr::ErrorCode ErrorCode; -+ typedef JSC::Yarr::YarrPattern YarrPattern; -+#if ENABLE_YARR_JIT - typedef JSC::Yarr::JSGlobalData JSGlobalData; - typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock; -- typedef JSC::Yarr::YarrPattern YarrPattern; - - /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */ - YarrCodeBlock codeBlock; -- BytecodePattern *byteCode; --#else -- JSRegExp *compiled; - #endif -+ BytecodePattern *byteCode; - - public: - RegExpCode() - : - #if ENABLE_YARR_JIT - codeBlock(), -- byteCode(NULL) --#else -- compiled(NULL) - #endif -+ byteCode(NULL) - { } - - ~RegExpCode() { - #if ENABLE_YARR_JIT - codeBlock.release(); -+#endif - if (byteCode) - Foreground::delete_(byteCode); --#else -- if (compiled) -- jsRegExpFree(compiled); --#endif - } - - static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { --#if ENABLE_YARR_JIT - ErrorCode error = JSC::Yarr::checkSyntax(*source); - if (error == JSC::Yarr::NoError) - return true; - - reportYarrError(cx, tokenStream, error); - return false; --#else --# error "Syntax checking not implemented for !ENABLE_YARR_JIT" --#endif - } - - #if ENABLE_YARR_JIT - static inline bool isJITRuntimeEnabled(JSContext *cx); -- static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); --#else -- static void reportPCREError(JSContext *cx, int error); - #endif -+ static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); - - static size_t getOutputSize(size_t pairCount) { --#if ENABLE_YARR_JIT - return pairCount * 2; --#else -- return pairCount * 3; /* Should be x2, but PCRE has... needs. */ --#endif - } - - bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); -diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h ---- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-07-13 23:42:59.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-07-16 13:46:03.898657360 +0200 -@@ -137,6 +137,7 @@ RegExpObject::setSticky(bool enabled) - setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled)); - } - -+#if ENABLE_YARR_JIT - /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ - inline bool - detail::RegExpCode::isJITRuntimeEnabled(JSContext *cx) -@@ -147,6 +148,7 @@ detail::RegExpCode::isJITRuntimeEnabled( - return true; - #endif - } -+#endif - - inline bool - RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g) -diff -up xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h ---- xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-07-13 23:42:59.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h 2012-07-16 13:46:03.898657360 +0200 -@@ -49,9 +49,7 @@ - #include "jsprvtd.h" - #include "vm/String.h" - #include "assembler/wtf/Platform.h" --#if ENABLE_YARR_JIT - #include "assembler/jit/ExecutableAllocator.h" --#endif - - namespace JSC { namespace Yarr { - diff --git a/mozilla-750620.patch b/mozilla-750620.patch deleted file mode 100644 index c8c6d10..0000000 --- a/mozilla-750620.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset patch -# User Mike Hommey -# Date 1337607752 -7200 -# Node ID 93093285af6065c441a806e97ca8f79225a158c6 -# Parent 87c452c6444eecd226a30458e735d0cfaad714fd -Bug 750620 - Declare double conversion correctness for more architectures - -diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -48,17 +48,21 @@ - // An easy way to test if the floating-point operations are correct is to - // evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then - // the result is equal to 89255e-22. - // The best way to test this, is to create a division-function and to compare - // the output of the division with the expected result. (Inlining must be - // disabled.) - // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) - #if defined(_M_X64) || defined(__x86_64__) || \ -- defined(__ARMEL__) || \ -+ defined(__ARMEL__) || defined(__avr32__) || \ -+ defined(__hppa__) || defined(__ia64__) || \ -+ defined(__mips__) || defined(__powerpc__) || \ -+ defined(__sparc__) || defined(__s390__) || \ -+ defined(__SH4__) || defined(__alpha__) || \ - defined(_MIPS_ARCH_MIPS32R2) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) - #if defined(_WIN32) - // Windows uses a 64bit wide floating point stack. - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #else - #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS diff --git a/xulrunner-10.0-gcc47.patch b/xulrunner-10.0-gcc47.patch deleted file mode 100644 index 093357b..0000000 --- a/xulrunner-10.0-gcc47.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-beta/toolkit/crashreporter/client/Makefile.in ---- mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-01-30 14:41:14.475441039 -0500 -+++ mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-01-30 14:43:03.587646656 -0500 -@@ -69,6 +69,9 @@ CPPSRCS = \ - $(STDCXX_COMPAT) \ - $(NULL) - -+# Needed for moz_free -+LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc -+ - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += crashreporter_win.cpp - LIBS += \ diff --git a/xulrunner-15.0-gcc47.patch b/xulrunner-15.0-gcc47.patch new file mode 100644 index 0000000..0d44796 --- /dev/null +++ b/xulrunner-15.0-gcc47.patch @@ -0,0 +1,13 @@ +diff -up xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in +--- xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-08-15 07:48:31.000000000 +0200 ++++ xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-08-20 15:05:41.782947739 +0200 +@@ -34,6 +34,9 @@ CPPSRCS = \ + crashreporter.cpp \ + $(NULL) + ++# Needed for moz_free ++LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc ++ + ifeq ($(OS_ARCH),WINNT) + CPPSRCS += crashreporter_win.cpp + LIBS += \ diff --git a/xulrunner.spec b/xulrunner.spec index 5f5dfd1..b2f458c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -37,7 +37,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 0 +%global beta_version 6 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 14.0.1 -Release: 6%{?pre_tag}%{?dist} +Version: 15.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -90,18 +90,15 @@ Patch14: xulrunner-2.0-chromium-types.patch %if 0%{?fedora} <= 15 Patch16: add-gtkmozembed-11.0.patch %endif -Patch17: xulrunner-10.0-gcc47.patch +Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-12.0-jemalloc-ppc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch24: crashreporter-remove-static.patch # Upstream patches -Patch47: mozilla-691898.patch Patch49: mozilla-746112.patch -Patch50: mozilla-750620.patch Patch51: mozilla-709732-gfx-icc-profile-fix.patch # --------------------------------------------------- @@ -233,17 +230,14 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed %endif -%patch17 -p1 -b .gcc47 +%patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk -%patch24 -p1 -b .static -%patch47 -p2 -b .691898 %ifarch ppc ppc64 %patch49 -p2 -b .746112 %endif -%patch50 -p1 -b .750620 %patch51 -p1 -b .709732 %{__rm} -f .mozconfig @@ -481,7 +475,6 @@ fi %{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner -%{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list @@ -508,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 22 2012 Martin Stransky - 15.0-1 +- Update to 15.0 + * Thu Aug 9 2012 Jan Horak - 14.0.1-6 - Added fix for mozbz#709732 From 82b4e04984366d2df5b91b4a78a788f11b3805f6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 Aug 2012 14:01:43 +0200 Subject: [PATCH 287/486] Upload sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2b12764..1a12022 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-13.0.source.tar.bz2 /xulrunner-13.0.1.source.tar.bz2 /xulrunner-14.0.1.source.tar.bz2 +/xulrunner-15.0b6.source.tar.bz2 diff --git a/sources b/sources index d02897c..4aefc72 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c2f884f0f6c41c65cf20f678a1ee7191 xulrunner-14.0.1.source.tar.bz2 +d6d4a53d1d679fa938690d96489e502a xulrunner-15.0b6.source.tar.bz2 From 66f5e7a063ab0e656f39d59abde108c8aa4d32e7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 27 Aug 2012 14:02:51 +0200 Subject: [PATCH 288/486] Update to XL15 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1a12022..b6c7dcd 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-13.0.1.source.tar.bz2 /xulrunner-14.0.1.source.tar.bz2 /xulrunner-15.0b6.source.tar.bz2 +/xulrunner-15.0.source.tar.bz2 diff --git a/sources b/sources index 4aefc72..6beccc0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d6d4a53d1d679fa938690d96489e502a xulrunner-15.0b6.source.tar.bz2 +64220887a349515f16e5aa990acb4db3 xulrunner-15.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index b2f458c..8e41152 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -37,7 +37,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 6 +%global beta_version 0 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} From d91ee1f4f73da3a389c6724bd2326180c673128e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 27 Aug 2012 14:04:02 +0200 Subject: [PATCH 289/486] Update to XL15 --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 8e41152..09fe6f1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 15.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -501,7 +501,7 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Aug 22 2012 Martin Stransky - 15.0-1 +* Wed Aug 22 2012 Martin Stransky - 15.0-2 - Update to 15.0 * Thu Aug 9 2012 Jan Horak - 14.0.1-6 From 7d3b8c5fc25714241175a1db30cd46f55c9925a9 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 11 Sep 2012 17:27:00 +0200 Subject: [PATCH 290/486] Update to 15.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b6c7dcd..8e15dcd 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-14.0.1.source.tar.bz2 /xulrunner-15.0b6.source.tar.bz2 /xulrunner-15.0.source.tar.bz2 +/xulrunner-15.0.1.source.tar.bz2 diff --git a/sources b/sources index 6beccc0..a219e0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -64220887a349515f16e5aa990acb4db3 xulrunner-15.0.source.tar.bz2 +743ba71fbce7b32023405db02d44143f xulrunner-15.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 09fe6f1..2a0a533 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 15.0 -Release: 2%{?pre_tag}%{?dist} +Version: 15.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -501,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Sep 11 2012 Jan Horak - 15.0.1-1 +- Update to 15.0.1 + * Wed Aug 22 2012 Martin Stransky - 15.0-2 - Update to 15.0 From 97e7825fe32632a8aa4ecb05e259b78b5fb44665 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 14 Sep 2012 22:04:41 +0200 Subject: [PATCH 291/486] Added build flags for second arches --- xulrunner.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2a0a533..6be9d8c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 15.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -332,8 +332,16 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif +%ifarch s390 +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') +%endif +%ifarch s390 %{arm} ppc +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +%endif + export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS +export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' @@ -501,6 +509,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 14 2012 Martin Stransky - 15.0.1-2 +- Added build flags for second arches + * Tue Sep 11 2012 Jan Horak - 15.0.1-1 - Update to 15.0.1 From 69e49742a5ab72108df259212cc999894666f120 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 17 Sep 2012 16:51:36 +0200 Subject: [PATCH 292/486] Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 --- add-gtkmozembed-11.0.patch | 8842 ------------------------------------ rhbz-855919.patch | 19 + xulrunner.spec | 13 +- 3 files changed, 25 insertions(+), 8849 deletions(-) delete mode 100644 add-gtkmozembed-11.0.patch create mode 100644 rhbz-855919.patch diff --git a/add-gtkmozembed-11.0.patch b/add-gtkmozembed-11.0.patch deleted file mode 100644 index 3747ebb..0000000 --- a/add-gtkmozembed-11.0.patch +++ /dev/null @@ -1,8842 +0,0 @@ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2012-03-09 15:19:22.248678665 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2012-03-09 15:19:22.248678665 +0100 -@@ -0,0 +1,54 @@ -+# -+# ***** BEGIN LICENSE BLOCK ***** -+# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+# -+# The contents of this file are subject to the Mozilla Public License Version -+# 1.1 (the "License"); you may not use this file except in compliance with -+# the License. You may obtain a copy of the License at -+# http://www.mozilla.org/MPL/ -+# -+# Software distributed under the License is distributed on an "AS IS" basis, -+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+# for the specific language governing rights and limitations under the -+# License. -+# -+# The Original Code is the Mozilla browser. -+# -+# The Initial Developer of the Original Code is -+# Christopher Blizzard. -+# Portions created by the Initial Developer are Copyright (C) 1999 -+# the Initial Developer. All Rights Reserved. -+# -+# Contributor(s): -+# Christopher Blizzard -+# -+# Alternatively, the contents of this file may be used under the terms of -+# either the GNU General Public License Version 2 or later (the "GPL"), or -+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+# in which case the provisions of the GPL or the LGPL are applicable instead -+# of those above. If you wish to allow use of your version of this file only -+# under the terms of either the GPL or the LGPL, and not to allow others to -+# use your version of this file under the terms of the MPL, indicate your -+# decision by deleting the provisions above and replace them with the notice -+# and other provisions required by the GPL or the LGPL. If you do not delete -+# the provisions above, a recipient may use your version of this file under -+# the terms of any one of the MPL, the GPL or the LGPL. -+# -+# ***** END LICENSE BLOCK ***** -+ -+DEPTH = ../../.. -+topsrcdir = @top_srcdir@ -+srcdir = @srcdir@ -+VPATH = @srcdir@ -+ -+include $(DEPTH)/config/autoconf.mk -+ -+MODULE = gtkembedmoz -+ -+DIRS=src -+ -+ifdef ENABLE_TESTS -+TOOL_DIRS += tests -+endif -+ -+include $(topsrcdir)/config/rules.mk -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2012-03-09 15:19:22.248678665 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2012-03-09 15:19:22.248678665 +0100 -@@ -0,0 +1,253 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Terry Hayes -+ * Javier Delgadillo -+ * Oleg Romashin -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+/** -+ * Derived from nsNSSDialogs http://landfill.mozilla.org/mxr-test/seamonkey/source/security/manager/pki/src/nsNSSDialogs.cpp -+ */ -+#include -+#include "nsIURI.h" -+#include "EmbedPrivate.h" -+#include "nsServiceManagerUtils.h" -+#include "nsIWebNavigationInfo.h" -+#include "nsDocShellCID.h" -+#include "nsCOMPtr.h" -+#ifdef MOZILLA_INTERNAL_API -+#include "nsString.h" -+#include "nsXPIDLString.h" -+#include "nsReadableUtils.h" -+#else -+#include "nsStringAPI.h" -+#endif -+#include "nsIPrompt.h" -+#include "nsIDOMWindow.h" -+#include "nsIComponentManager.h" -+#include "nsIServiceManager.h" -+#include "nsIStringBundle.h" -+#include "nsIInterfaceRequestor.h" -+#include "nsIInterfaceRequestorUtils.h" -+#include "nsIX509Cert.h" -+#include "nsIX509CertDB.h" -+#include "nsIDateTimeFormat.h" -+#include "nsDateTimeFormatCID.h" -+#include "EmbedCertificates.h" -+#include "nsIKeygenThread.h" -+#include "nsIX509CertValidity.h" -+#include "nsICRLInfo.h" -+#include "gtkmozembed.h" -+ -+#define PIPSTRING_BUNDLE_URL "chrome://pippki/locale/pippki.properties" -+ -+EmbedCertificates::EmbedCertificates(void) -+{ -+} -+ -+EmbedCertificates::~EmbedCertificates() -+{ -+} -+ -+NS_IMPL_THREADSAFE_ADDREF(EmbedCertificates) -+NS_IMPL_THREADSAFE_RELEASE(EmbedCertificates) -+NS_INTERFACE_MAP_BEGIN(EmbedCertificates) -+NS_INTERFACE_MAP_ENTRY(nsITokenPasswordDialogs) -+NS_INTERFACE_MAP_ENTRY(nsICertificateDialogs) -+NS_INTERFACE_MAP_ENTRY(nsIClientAuthDialogs) -+NS_INTERFACE_MAP_ENTRY(nsICertPickDialogs) -+NS_INTERFACE_MAP_ENTRY(nsITokenDialogs) -+NS_INTERFACE_MAP_ENTRY(nsIGeneratingKeypairInfoDialogs) -+NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCryptoDialogs) -+NS_INTERFACE_MAP_END -+ -+nsresult -+EmbedCertificates::Init(void) -+{ -+ nsresult rv; -+ nsCOMPtr service = -+ do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); -+ if (NS_FAILED(rv)) return NS_OK; -+ rv = service->CreateBundle(PIPSTRING_BUNDLE_URL, -+ getter_AddRefs(mPIPStringBundle)); -+ return NS_OK; -+} -+ -+nsresult -+EmbedCertificates::SetPassword(nsIInterfaceRequestor *ctx, -+ const PRUnichar *tokenName, PRBool* _canceled) -+{ -+ *_canceled = PR_FALSE; -+ return NS_OK; -+} -+ -+nsresult -+EmbedCertificates::GetPassword(nsIInterfaceRequestor *ctx, -+ const PRUnichar *tokenName, -+ PRUnichar **_password, -+ PRBool* _canceled) -+{ -+ *_canceled = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, -+ nsIX509Cert *cert, -+ PRUint32 *_trust, -+ PRBool *_retval) -+{ -+ // If an implementation chooses not to implement UI for displaying -+ // the cert and asking the user for confirmation, -+ // then this function must return PR_FALSE. -+ *_retval = PR_FALSE; -+ *_trust = nsIX509CertDB::UNTRUSTED; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::NotifyCACertExists(nsIInterfaceRequestor *ctx) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::ChooseCertificate( -+ nsIInterfaceRequestor *ctx, -+ const PRUnichar *cn, -+ const PRUnichar *organization, -+ const PRUnichar *issuer, -+ const PRUnichar **certNickList, -+ const PRUnichar **certDetailsList, -+ PRUint32 count, -+ PRInt32 *selectedIndex, -+ PRBool *canceled) -+{ -+ *canceled = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::PickCertificate( -+ nsIInterfaceRequestor *ctx, -+ const PRUnichar **certNickList, -+ const PRUnichar **certDetailsList, -+ PRUint32 count, -+ PRInt32 *selectedIndex, -+ PRBool *canceled) -+{ -+ *canceled = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::SetPKCS12FilePassword( -+ nsIInterfaceRequestor *ctx, -+ nsAString &_password, -+ PRBool *_retval) -+{ -+ /* The person who wrote this method implementation did -+ * not read the contract. -+ */ -+ *_retval = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::GetPKCS12FilePassword( -+ nsIInterfaceRequestor *ctx, -+ nsAString &_password, -+ PRBool *_retval) -+{ -+ /* The person who wrote this method implementation did -+ * not read the contract. -+ */ -+ *_retval = PR_FALSE; -+ return NS_OK; -+} -+ -+/* void viewCert (in nsIX509Cert cert); */ -+NS_IMETHODIMP -+EmbedCertificates::ViewCert( -+ nsIInterfaceRequestor *ctx, -+ nsIX509Cert *cert) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::DisplayGeneratingKeypairInfo(nsIInterfaceRequestor *aCtx, nsIKeygenThread *runnable) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::ChooseToken( -+ nsIInterfaceRequestor *aCtx, -+ const PRUnichar **aTokenList, -+ PRUint32 aCount, -+ PRUnichar **aTokenChosen, -+ PRBool *aCanceled) -+{ -+ *aCanceled = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::DisplayProtectedAuth( -+ nsIInterfaceRequestor *aCtx, -+ nsIProtectedAuthThread *runnable) -+{ -+ return NS_OK; -+} -+ -+/* boolean ConfirmKeyEscrow (in nsIX509Cert escrowAuthority); */ -+NS_IMETHODIMP -+EmbedCertificates::ConfirmKeyEscrow(nsIX509Cert *escrowAuthority, PRBool *_retval) -+{ -+ // If an implementation chooses not to implement UI that asks the user for -+ // confirmation to hand out the private key, -+ // then this function must return PR_FALSE. -+ *_retval = PR_FALSE; -+ return NS_OK; -+} -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2012-03-09 15:19:22.249678670 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2012-03-09 15:19:22.249678670 +0100 -@@ -0,0 +1,84 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 et cindent: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Terry Hayes -+ * Javier Delgadillo -+ * Oleg Romashin -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+/** -+ * Derived from nsNSSDialogs http://landfill.mozilla.org/mxr-test/seamonkey/source/security/manager/pki/src/nsNSSDialogs.h -+ */ -+#ifndef __EmbedCertificates_h -+#define __EmbedCertificates_h -+#include "nsITokenPasswordDialogs.h" -+#include "nsICertificateDialogs.h" -+#include "nsIClientAuthDialogs.h" -+#include "nsICertPickDialogs.h" -+#include "nsITokenDialogs.h" -+#include "nsIDOMCryptoDialogs.h" -+#include "nsIGenKeypairInfoDlg.h" -+#include "nsCOMPtr.h" -+#include "nsIStringBundle.h" -+#define EMBED_CERTIFICATES_CID \ -+ { 0x518e071f, 0x1dd2, 0x11b2, \ -+ { 0x93, 0x7e, 0xc4, 0x5f, 0x14, 0xde, 0xf7, 0x78 }} -+#define EMBED_CERTIFICATES_DESCRIPTION "Certificates Listener Impl" -+class EmbedPrivate; -+class EmbedCertificates -+: public nsITokenPasswordDialogs, -+ public nsICertificateDialogs, -+ public nsIClientAuthDialogs, -+ public nsICertPickDialogs, -+ public nsITokenDialogs, -+ public nsIDOMCryptoDialogs, -+ public nsIGeneratingKeypairInfoDialogs -+{ -+ public: -+ NS_DECL_ISUPPORTS -+ NS_DECL_NSITOKENPASSWORDDIALOGS -+ NS_DECL_NSICERTIFICATEDIALOGS -+ NS_DECL_NSICLIENTAUTHDIALOGS -+ NS_DECL_NSICERTPICKDIALOGS -+ NS_DECL_NSITOKENDIALOGS -+ NS_DECL_NSIDOMCRYPTODIALOGS -+ NS_DECL_NSIGENERATINGKEYPAIRINFODIALOGS -+ EmbedCertificates(); -+ virtual ~EmbedCertificates(); -+ nsresult Init(void); -+ protected: -+ nsCOMPtr mPIPStringBundle; -+}; -+#endif /* __EmbedCertificates_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2012-03-09 15:19:22.249678670 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2012-03-09 15:19:22.249678670 +0100 -@@ -0,0 +1,156 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsIURI.h" -+ -+#include "EmbedContentListener.h" -+#include "EmbedPrivate.h" -+ -+#include "nsServiceManagerUtils.h" -+#include "nsIWebNavigationInfo.h" -+#include "nsDocShellCID.h" -+ -+EmbedContentListener::EmbedContentListener(void) -+{ -+ mOwner = nsnull; -+} -+ -+EmbedContentListener::~EmbedContentListener() -+{ -+} -+ -+NS_IMPL_ISUPPORTS2(EmbedContentListener, -+ nsIURIContentListener, -+ nsISupportsWeakReference) -+ -+nsresult -+EmbedContentListener::Init(EmbedPrivate *aOwner) -+{ -+ mOwner = aOwner; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::OnStartURIOpen(nsIURI *aURI, -+ bool *aAbortOpen) -+{ -+ nsresult rv; -+ -+ nsCAutoString specString; -+ rv = aURI->GetSpec(specString); -+ -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[OPEN_URI], 0, -+ specString.get(), &return_val); -+ -+ *aAbortOpen = return_val; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::DoContent(const char *aContentType, -+ bool aIsContentPreferred, -+ nsIRequest *aRequest, -+ nsIStreamListener **aContentHandler, -+ bool *aAbortProcess) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::IsPreferred(const char *aContentType, -+ char **aDesiredContentType, -+ bool *aCanHandleContent) -+{ -+ return CanHandleContent(aContentType, PR_TRUE, aDesiredContentType, -+ aCanHandleContent); -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::CanHandleContent(const char *aContentType, -+ bool aIsContentPreferred, -+ char **aDesiredContentType, -+ bool *_retval) -+{ -+ *_retval = PR_FALSE; -+ *aDesiredContentType = nsnull; -+ -+ if (aContentType) { -+ nsCOMPtr webNavInfo( -+ do_GetService(NS_WEBNAVIGATION_INFO_CONTRACTID)); -+ if (webNavInfo) { -+ PRUint32 canHandle; -+ nsresult rv = -+ webNavInfo->IsTypeSupported(nsDependentCString(aContentType), -+ mOwner ? mOwner->mNavigation.get() : nsnull, -+ &canHandle); -+ NS_ENSURE_SUCCESS(rv, rv); -+ *_retval = (canHandle != nsIWebNavigationInfo::UNSUPPORTED); -+ } -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::GetLoadCookie(nsISupports **aLoadCookie) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::SetLoadCookie(nsISupports *aLoadCookie) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::GetParentContentListener(nsIURIContentListener **aParent) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::SetParentContentListener(nsIURIContentListener *aParent) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2012-03-09 15:19:22.250678675 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2012-03-09 15:19:22.250678675 +0100 -@@ -0,0 +1,66 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef __EmbedContentListener_h -+#define __EmbedContentListener_h -+ -+#include "nsIURIContentListener.h" -+#include "nsWeakReference.h" -+ -+class EmbedPrivate; -+ -+class EmbedContentListener : public nsIURIContentListener, -+ public nsSupportsWeakReference -+{ -+ public: -+ -+ EmbedContentListener(); -+ virtual ~EmbedContentListener(); -+ -+ nsresult Init (EmbedPrivate *aOwner); -+ -+ NS_DECL_ISUPPORTS -+ -+ NS_DECL_NSIURICONTENTLISTENER -+ -+ private: -+ -+ EmbedPrivate *mOwner; -+ -+}; -+ -+#endif /* __EmbedContentListener_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2012-03-09 15:19:22.251678680 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2012-03-09 15:19:22.251678680 +0100 -@@ -0,0 +1,618 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Oleg Romashin. -+ * Portions created by the Initial Developer are Copyright (C) 2006 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Oleg Romashin -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+#include "EmbedContextMenuInfo.h" -+#include "nsIImageLoadingContent.h" -+#include "imgILoader.h" -+#include "nsIDOMDocument.h" -+#include "nsIDOMHTMLDocument.h" -+#include "nsIDOMHTMLElement.h" -+#include "nsIDOMHTMLHtmlElement.h" -+#include "nsIDOMHTMLAnchorElement.h" -+#include "nsIDOMHTMLImageElement.h" -+#include "nsIDOMHTMLAreaElement.h" -+#include "nsIDOMHTMLLinkElement.h" -+#include "nsIDOMDocumentView.h" -+#include "nsIDOMAbstractView.h" -+#include "nsIDOMViewCSS.h" -+#include "nsIDOMCSSStyleDeclaration.h" -+#include "nsIDOMCSSValue.h" -+#include "nsIDOMCSSPrimitiveValue.h" -+#include "nsNetUtil.h" -+#include "nsUnicharUtils.h" -+#include "nsIDOMMouseEvent.h" -+#include "nsIDOMNSEvent.h" -+#include "nsIDOMWindow.h" -+#include "nsIDOMWindowCollection.h" -+#include "nsIWebBrowser.h" -+#include "nsIContent.h" -+#include "nsIPresShell.h" -+#include "nsIFormControl.h" -+#include "nsIDOMNSHTMLTextAreaElement.h" -+#include "nsIDOMHTMLInputElement.h" -+#include "nsIDOMHTMLTextAreaElement.h" -+#include "nsIDOMNSHTMLDocument.h" -+#include "nsIDOMNodeList.h" -+#include "nsISelection.h" -+#include "nsIDocument.h" -+#include "EmbedPrivate.h" -+#include -+#include -+#include -+#include -+#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) -+#include "nsIFrame.h" -+#endif -+ -+//***************************************************************************** -+// class EmbedContextMenuInfo -+//***************************************************************************** -+EmbedContextMenuInfo::EmbedContextMenuInfo(EmbedPrivate *aOwner) : mCtxFrameNum(-1), mEmbedCtxType(0) -+{ -+ mOwner = aOwner; -+ mEventNode = nsnull; -+ mCtxDocument = nsnull; -+ mNSHHTMLElement = nsnull; -+ mNSHHTMLElementSc = nsnull; -+ mCtxEvent = nsnull; -+ mEventNode = nsnull; -+ mFormRect = nsIntRect(0,0,0,0); -+} -+ -+EmbedContextMenuInfo::~EmbedContextMenuInfo(void) -+{ -+ mEventNode = nsnull; -+ mCtxDocument = nsnull; -+ mNSHHTMLElement = nsnull; -+ mNSHHTMLElementSc = nsnull; -+ mCtxEvent = nsnull; -+ mEventNode = nsnull; -+} -+ -+NS_IMPL_ADDREF(EmbedContextMenuInfo) -+NS_IMPL_RELEASE(EmbedContextMenuInfo) -+NS_INTERFACE_MAP_BEGIN(EmbedContextMenuInfo) -+NS_INTERFACE_MAP_ENTRY(nsISupports) -+NS_INTERFACE_MAP_END -+ -+nsresult -+EmbedContextMenuInfo::SetFrameIndex() -+{ -+ nsCOMPtr frames; -+ mCtxDomWindow->GetFrames(getter_AddRefs(frames)); -+ nsCOMPtr currentWindow; -+ PRUint32 frameCount = 0; -+ frames->GetLength(&frameCount); -+ for (unsigned int i= 0; i < frameCount; i++) { -+ frames->Item(i, getter_AddRefs(currentWindow)); -+ nsCOMPtr currentDoc; -+ currentWindow->GetDocument(getter_AddRefs(currentDoc)); -+ if (currentDoc == mCtxDocument) { -+ mCtxFrameNum = i; -+ mCtxDomWindow = currentWindow; -+ nsCOMPtr doc = do_QueryInterface(currentDoc); -+ if (doc) -+ doc->GetTitle(mCtxDocTitle); -+ return NS_OK; -+ } -+ } -+ return NS_ERROR_FAILURE; -+} -+ -+nsresult -+EmbedContextMenuInfo::GetFormControlType(nsIDOMEvent* aEvent) -+{ -+ if (!aEvent) -+ return NS_OK; -+ nsCOMPtr nsevent(do_QueryInterface(aEvent)); -+ nsCOMPtr target; -+ nsevent->GetOriginalTarget(getter_AddRefs(target)); -+ // mOrigTarget = target; -+ if (SetFormControlType(target)) { -+ nsCOMPtr eventNode = do_QueryInterface(target); -+ if (!eventNode) -+ return NS_OK; -+ //Frame Stuff -+ nsCOMPtr domDoc; -+ nsresult rv = eventNode->GetOwnerDocument(getter_AddRefs(domDoc)); -+ if (!NS_SUCCEEDED(rv) || !domDoc) { -+ return NS_OK; -+ } -+ mEventNode = eventNode; -+ mCtxDocument = domDoc; -+ nsCOMPtr doc = do_QueryInterface(mCtxDocument); -+ if (!doc) -+ return NS_OK; -+ nsIPresShell *presShell = doc->GetShell(); -+ if (!presShell) -+ return NS_OK; -+ nsCOMPtr tgContent = do_QueryInterface(mEventTarget); -+ nsIFrame* frame = nsnull; -+#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) -+ frame = tgContent->GetDocument() == presShell->GetDocument() ? -+ tgContent->GetPrimaryFrame() : nsnull; -+ if (frame) -+ mFormRect = frame->GetScreenRectExternal(); -+#endif -+ return NS_OK; -+ } -+ return NS_ERROR_FAILURE; -+} -+ -+nsresult -+EmbedContextMenuInfo::SetFormControlType(nsIDOMEventTarget *originalTarget) -+{ -+ nsresult rv = NS_ERROR_FAILURE; -+ nsCOMPtr targetContent = do_QueryInterface(originalTarget); -+ mCtxFormType = 0; -+ if (targetContent && targetContent->IsNodeOfType(nsIContent::eHTML_FORM_CONTROL)) { -+ nsCOMPtr formControl(do_QueryInterface(targetContent)); -+ if (formControl) { -+ mCtxFormType = formControl->GetType(); -+ rv = NS_OK; -+ //#ifdef MOZ_LOGGING -+ switch (mCtxFormType) { -+ case NS_FORM_BUTTON_BUTTON: -+ break; -+ case NS_FORM_BUTTON_RESET: -+ break; -+ case NS_FORM_BUTTON_SUBMIT: -+ break; -+ case NS_FORM_INPUT_BUTTON: -+ break; -+ case NS_FORM_INPUT_CHECKBOX: -+ break; -+ case NS_FORM_INPUT_FILE: -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ break; -+ case NS_FORM_INPUT_HIDDEN: -+ break; -+ case NS_FORM_INPUT_RESET: -+ break; -+ case NS_FORM_INPUT_IMAGE: -+ break; -+ case NS_FORM_INPUT_PASSWORD: -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IPASSWORD; -+ break; -+ case NS_FORM_INPUT_RADIO: -+ break; -+ case NS_FORM_INPUT_SUBMIT: -+ break; -+ case NS_FORM_INPUT_EMAIL: -+ case NS_FORM_INPUT_SEARCH: -+ case NS_FORM_INPUT_TEXT: -+ case NS_FORM_INPUT_TEL: -+ case NS_FORM_INPUT_URL: -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ break; -+ case NS_FORM_LABEL: -+ break; -+ case NS_FORM_SELECT: -+ break; -+ case NS_FORM_TEXTAREA: -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ break; -+ case NS_FORM_OBJECT: -+ break; -+ case NS_FORM_OUTPUT: -+ break; -+ default: -+ break; -+ } -+ if (mEmbedCtxType & GTK_MOZ_EMBED_CTX_INPUT) { -+ PRBool rdonly = PR_FALSE; -+ if (mCtxFormType == NS_FORM_TEXTAREA) { -+ nsCOMPtr input; -+ input = do_QueryInterface(mEventNode, &rv); -+ if (!NS_FAILED(rv) && input) -+ rv = input->GetReadOnly(&rdonly); -+ if (!NS_FAILED(rv) && rdonly) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_ROINPUT; -+ } -+ } else { -+ nsCOMPtr input; -+ input = do_QueryInterface(mEventNode, &rv); -+ if (!NS_FAILED(rv) && input) -+ rv = input->GetReadOnly(&rdonly); -+ if (!NS_FAILED(rv) && rdonly) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_ROINPUT; -+ } -+ } -+ } -+ //#endif -+ } -+ } -+ return rv; -+} -+ -+const char* -+EmbedContextMenuInfo::GetSelectedText() -+{ -+ nsString cString; -+ nsresult rv = NS_ERROR_FAILURE; -+ if (mCtxFormType != 0 && mEventNode) { -+ PRInt32 TextLength = 0, selStart = 0, selEnd = 0; -+ if (mCtxFormType == NS_FORM_INPUT_TEXT || mCtxFormType == NS_FORM_INPUT_FILE) { -+ nsCOMPtr nsinput = do_QueryInterface(mEventNode, &rv); -+ if (NS_SUCCEEDED(rv) && nsinput) -+ nsinput->GetTextLength(&TextLength); -+ if (TextLength > 0) { -+ nsinput->GetSelectionEnd(&selEnd); -+ nsinput->GetSelectionStart(&selStart); -+ if (selStart < selEnd || mCtxFormType == NS_FORM_INPUT_FILE) { -+ nsCOMPtr input = do_QueryInterface(mEventNode, &rv); -+ rv = input->GetValue(cString); -+ } -+ } -+ } else if (mCtxFormType == NS_FORM_TEXTAREA) { -+ nsCOMPtr nsinput = do_QueryInterface(mEventNode, &rv); -+ if (NS_SUCCEEDED(rv) && nsinput) -+ nsinput->GetTextLength(&TextLength); -+ if (TextLength > 0) { -+ nsinput->GetSelectionStart(&selStart); -+ nsinput->GetSelectionEnd(&selEnd); -+ if (selStart < selEnd) { -+ nsCOMPtr input = do_QueryInterface(mEventNode, &rv); -+ rv = input->GetValue(cString); -+ } -+ } -+ } -+ if (NS_SUCCEEDED(rv) && !cString.IsEmpty()) { -+ if (selStart < selEnd) { -+ cString.Cut(0, selStart); -+ cString.Cut(selEnd-selStart, TextLength); -+ } -+ rv = NS_OK; -+ } -+ } else if (mCtxDocument) { -+ nsCOMPtr htmlDoc = do_QueryInterface(mCtxDocument, &rv); -+ if (NS_FAILED(rv) || !htmlDoc) -+ return nsnull; -+ rv = htmlDoc->GetSelection(cString); -+ if (NS_FAILED(rv) || cString.IsEmpty()) -+ return nsnull; -+ rv = NS_OK; -+ } -+ if (rv == NS_OK) { -+ return NS_ConvertUTF16toUTF8(cString).get(); -+ } -+ return nsnull; -+} -+ -+nsresult -+EmbedContextMenuInfo::CheckDomImageElement(nsIDOMNode *node, nsString& aHref, -+ PRInt32 *aWidth, PRInt32 *aHeight) -+{ -+ nsresult rv = NS_ERROR_FAILURE; -+ nsCOMPtr image = -+ do_QueryInterface(node, &rv); -+ if (image) { -+ rv = image->GetSrc(aHref); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ rv = image->GetWidth(aWidth); -+ rv = image->GetHeight(aHeight); -+ rv = NS_OK; -+ } -+ return rv; -+} -+ -+nsresult -+EmbedContextMenuInfo::GetImageRequest(imgIRequest **aRequest, nsIDOMNode *aDOMNode) -+{ -+ NS_ENSURE_ARG(aDOMNode); -+ NS_ENSURE_ARG_POINTER(aRequest); -+ -+ // Get content -+ nsCOMPtr content(do_QueryInterface(aDOMNode)); -+ NS_ENSURE_TRUE(content, NS_ERROR_FAILURE); -+ -+ return content->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST, -+ aRequest); -+} -+ -+nsresult -+EmbedContextMenuInfo::CheckDomHtmlNode(nsIDOMNode *aNode) -+{ -+ nsresult rv = NS_ERROR_FAILURE; -+ nsString uTag; -+ PRUint16 dnode_type; -+ -+ nsCOMPtr node; -+ if (!aNode && mEventNode) -+ node = mEventNode; -+ nsCOMPtr element = do_QueryInterface(node, &rv); -+ if (!element) { -+ element = do_QueryInterface(mOrigNode, &rv); -+ if (element) { -+ node = mOrigNode; -+ element = do_QueryInterface(node, &rv); -+ } -+ } -+ -+ rv = node->GetNodeType(&dnode_type); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ -+ if (!((nsIDOMNode::ELEMENT_NODE == dnode_type) && element)) { -+ return rv; -+ } -+ nsCOMPtr nodeElement = do_QueryInterface(node, &rv); -+ if (NS_SUCCEEDED(rv) && nodeElement) { -+ mNSHHTMLElement = nodeElement; -+ } else { -+ mNSHHTMLElement = nsnull; -+ } -+ rv = element->GetLocalName(uTag); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ if (uTag.LowerCaseEqualsLiteral("object")) { -+ } -+ else if (uTag.LowerCaseEqualsLiteral("html")) { -+ } -+ else if (uTag.LowerCaseEqualsLiteral("a")) { -+ nsCOMPtr anchor = do_QueryInterface(node); -+ anchor->GetHref(mCtxHref); -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_LINK; -+ if (anchor && !mCtxHref.IsEmpty()) { -+ if (mCtxHref.LowerCaseEqualsLiteral("text/smartbookmark")) { -+ nsCOMPtr childNode; -+ node->GetFirstChild(getter_AddRefs(childNode)); -+ if (childNode) { -+ PRInt32 width, height; -+ rv = CheckDomImageElement(node, mCtxImgHref, &width, &height); -+ if (NS_SUCCEEDED(rv)) -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IMAGE; -+ } -+ } else if (StringBeginsWith(mCtxHref, NS_LITERAL_STRING("mailto:"))) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_EMAIL; -+ } -+ } -+ } -+ else if (uTag.LowerCaseEqualsLiteral("area")) { -+ nsCOMPtr area = do_QueryInterface(node, &rv); -+ if (NS_SUCCEEDED(rv) && area) { -+ PRBool aNoHref = PR_FALSE; -+ rv = area->GetNoHref(&aNoHref); -+ if (!aNoHref) -+ rv = area->GetHref(mCtxHref); -+ else -+ rv = area->GetTarget(mCtxHref); -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_LINK; -+ rv = NS_OK; -+ } -+ } -+ else if (uTag.LowerCaseEqualsLiteral("img")) { -+ PRInt32 width, height; -+ rv = CheckDomImageElement(node, mCtxImgHref, &width, &height); -+ if (NS_SUCCEEDED(rv)) -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IMAGE; -+ } else { -+ rv = NS_ERROR_FAILURE; -+ } -+ return rv; -+} -+ -+nsresult -+EmbedContextMenuInfo::UpdateContextData(void *aEvent) -+{ -+ NS_ENSURE_ARG_POINTER(aEvent); -+ nsresult rv; -+ nsCOMPtr event = do_QueryInterface((nsISupports*)aEvent, &rv); -+ if (NS_FAILED(rv) || !event) -+ return NS_ERROR_FAILURE; -+ return UpdateContextData(event); -+} -+ -+nsresult -+EmbedContextMenuInfo::GetElementForScroll(nsIDOMEvent *aEvent) -+{ -+ if (!aEvent) return NS_ERROR_UNEXPECTED; -+ nsCOMPtr nsevent(do_QueryInterface(aEvent)); -+ nsCOMPtr target; -+ nsevent->GetOriginalTarget(getter_AddRefs(target)); -+ if (!target) return NS_ERROR_UNEXPECTED; -+ nsCOMPtr targetDOMNode(do_QueryInterface(target)); -+ if (!targetDOMNode) return NS_ERROR_UNEXPECTED; -+ nsCOMPtr targetDOMDocument; -+ targetDOMNode->GetOwnerDocument(getter_AddRefs(targetDOMDocument)); -+ if (!targetDOMDocument) return NS_ERROR_UNEXPECTED; -+ return GetElementForScroll(targetDOMDocument); -+} -+ -+nsresult -+EmbedContextMenuInfo::GetElementForScroll(nsIDOMDocument *targetDOMDocument) -+{ -+ nsCOMPtr targetDOMElement; -+ targetDOMDocument->GetDocumentElement(getter_AddRefs(targetDOMElement)); -+ if (!targetDOMElement) return NS_ERROR_UNEXPECTED; -+ nsString bodyName(NS_LITERAL_STRING("body")); -+ nsCOMPtr bodyList; -+ targetDOMElement->GetElementsByTagName(bodyName, getter_AddRefs(bodyList)); -+ PRUint32 i = 0; -+ bodyList->GetLength(&i); -+ if (i) { -+ nsCOMPtr domBodyNode; -+ bodyList->Item(0, getter_AddRefs(domBodyNode)); -+ if (!domBodyNode) return NS_ERROR_UNEXPECTED; -+ mNSHHTMLElementSc = do_QueryInterface(domBodyNode); -+ if (!mNSHHTMLElementSc) return NS_ERROR_UNEXPECTED; -+ } -+ return NS_OK; -+} -+ -+nsresult -+EmbedContextMenuInfo::UpdateContextData(nsIDOMEvent *aDOMEvent) -+{ -+ if (mCtxEvent == aDOMEvent) -+ return NS_OK; -+ -+ nsresult rv = nsnull; -+ mCtxEvent = aDOMEvent; -+ NS_ENSURE_ARG_POINTER(mCtxEvent); -+ -+ PRUint16 eventphase; -+ mCtxEvent->GetEventPhase(&eventphase); -+ if (!eventphase) { -+ mCtxEvent = nsnull; -+ return NS_ERROR_FAILURE; -+ } -+ -+ nsCOMPtr originalTarget = nsnull; -+ nsCOMPtr originalNode = nsnull; -+ -+ nsCOMPtr aEvent = do_QueryInterface(mCtxEvent, &rv); -+ if (NS_FAILED(rv) || !aEvent) -+ return NS_OK; -+ -+ nsCOMPtr mouseEvent(do_QueryInterface(mCtxEvent, &rv)); -+ if (mouseEvent) { -+ ((nsIDOMMouseEvent*)mouseEvent)->GetClientX(&mX); -+ ((nsIDOMMouseEvent*)mouseEvent)->GetClientY(&mY); -+ } -+ -+ if (aEvent) -+ rv = aEvent->GetOriginalTarget(getter_AddRefs(originalTarget)); -+ originalNode = do_QueryInterface(originalTarget); -+ if (NS_FAILED(rv) || !originalNode) -+ return NS_ERROR_NULL_POINTER; -+ -+ // nsresult SelText = mOwner->ClipBoardAction(GTK_MOZ_EMBED_CAN_COPY); -+ if (originalNode == mOrigNode) -+ return NS_OK; -+ -+ mEmbedCtxType = GTK_MOZ_EMBED_CTX_NONE; -+ mOrigNode = originalNode; -+ if (mOrigNode) { -+ nsString SOrigNode; -+ mOrigNode->GetNodeName(SOrigNode); -+ if (SOrigNode.EqualsLiteral("#document")) -+ return NS_OK; -+ if (SOrigNode.EqualsLiteral("xul:thumb") -+ || SOrigNode.EqualsLiteral("xul:slider") -+ || SOrigNode.EqualsLiteral("xul:scrollbarbutton") -+ || SOrigNode.EqualsLiteral("xul:vbox") -+ || SOrigNode.EqualsLiteral("xul:spacer")) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_XUL; -+ return NS_OK; -+ } -+ } -+ if (mCtxEvent) -+ rv = mCtxEvent->GetTarget(getter_AddRefs(mEventTarget)); -+ if (NS_FAILED(rv) || !mEventTarget) { -+ return NS_OK; -+ } -+ nsCOMPtr eventNode = do_QueryInterface(mEventTarget, &rv); -+ mEventNode = eventNode; -+ //Frame Stuff -+ nsCOMPtr domDoc; -+ if (mEventNode) -+ rv = mEventNode->GetOwnerDocument(getter_AddRefs(domDoc)); -+ if (!NS_SUCCEEDED(rv) || !domDoc) { -+ // return NS_OK; -+ } -+ if (NS_SUCCEEDED(rv) && domDoc && mCtxDocument != domDoc) { -+ mCtxDocument = domDoc; -+ mNSHHTMLElementSc = nsnull; -+ mCtxDocument->GetDocumentURI(mCtxURI); -+ NS_ENSURE_ARG_POINTER(mOwner); -+ nsCOMPtr webBrowser; -+ mOwner->mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ webBrowser->GetContentDOMWindow(getter_AddRefs(mCtxDomWindow)); -+ nsCOMPtr mainDocument; -+ mCtxDomWindow->GetDocument(getter_AddRefs(mainDocument)); -+ if (!mainDocument) { -+ return NS_OK; -+ } -+ mCtxFrameNum = -1; -+ if (mainDocument != domDoc) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IFRAME; -+ SetFrameIndex(); -+ } -+ } -+ nsCOMPtr targetDOMElement; -+ mCtxDocument->GetDocumentElement(getter_AddRefs(targetDOMElement)); -+ if (!targetDOMElement) return NS_ERROR_UNEXPECTED; -+ nsCOMPtr htmlDoc = do_QueryInterface(mCtxDocument); -+ if (htmlDoc) { -+ nsString DMode; -+ htmlDoc->GetDesignMode(DMode); -+ if (DMode.EqualsLiteral("on")) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_RICHEDIT; -+ } -+ } -+ nsCOMPtr doc = do_QueryInterface(mCtxDocument); -+ if (!doc) -+ return NS_OK; -+ nsIPresShell *presShell = doc->GetShell(); -+ if (!presShell) -+ return NS_OK; -+ nsCOMPtr tgContent = do_QueryInterface(mEventTarget); -+ nsIFrame* frame = nsnull; -+#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) -+ if (mEmbedCtxType & GTK_MOZ_EMBED_CTX_RICHEDIT) -+ frame = presShell->GetRootFrame(); -+ else if (tgContent->GetDocument() == presShell->GetDocument()) { -+ frame = tgContent->GetPrimaryFrame(); -+ } -+ if (frame) { -+ mFormRect = frame->GetScreenRectExternal(); -+ } -+#endif -+ if (NS_SUCCEEDED(SetFormControlType(mEventTarget))) { -+ return NS_OK; -+ } -+ CheckDomHtmlNode(); -+ nsCOMPtr node = mEventNode; -+ nsCOMPtr parentNode; -+ node->GetParentNode(getter_AddRefs(parentNode)); -+ node = parentNode; -+ while (node) { -+ if (NS_FAILED(CheckDomHtmlNode())) -+ break; -+ node->GetParentNode(getter_AddRefs(parentNode)); -+ node = parentNode; -+ } -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; -+ return NS_OK; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2012-03-09 15:19:22.251678680 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2012-03-09 15:19:22.251678680 +0100 -@@ -0,0 +1,101 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ -+/* -+ * ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is the Mozilla browser. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Oleg Romashin. -+ * Portions created by the Initial Developer are Copyright (C) 2006 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Oleg Romashin -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+#ifndef EmbedContextMenuInfo_h__ -+#define EmbedContextMenuInfo_h__ -+#include "nsCOMPtr.h" -+#include "nsIDOMNode.h" -+#include "nsIDOMEvent.h" -+#include "imgIContainer.h" -+#include "imgIRequest.h" -+#include "nsIDOMEventTarget.h" -+#include "nsRect.h" -+// for strings -+#ifdef MOZILLA_INTERNAL_API -+#include "nsXPIDLString.h" -+#include "nsReadableUtils.h" -+#endif -+#include "EmbedWindow.h" -+#include "nsIDOMNSHTMLElement.h" -+//***************************************************************************** -+// class EmbedContextMenuInfo -+// -+//***************************************************************************** -+class EmbedContextMenuInfo : public nsISupports -+{ -+public: -+ EmbedContextMenuInfo(EmbedPrivate *aOwner); -+ virtual ~EmbedContextMenuInfo(void); -+ NS_DECL_ISUPPORTS -+ nsresult GetFormControlType(nsIDOMEvent *aDOMEvent); -+ nsresult UpdateContextData(nsIDOMEvent *aDOMEvent); -+ nsresult UpdateContextData(void *aEvent); -+ const char* GetSelectedText(); -+ nsresult GetElementForScroll(nsIDOMDocument *targetDOMDocument); -+ nsresult GetElementForScroll(nsIDOMEvent *aEvent); -+ nsresult CheckDomImageElement(nsIDOMNode *node, nsString& aHref, -+ PRInt32 *aWidth, PRInt32 *aHeight); -+ nsresult GetImageRequest(imgIRequest **aRequest, nsIDOMNode *aDOMNode); -+ nsString GetCtxDocTitle(void) { return mCtxDocTitle; } -+ -+ -+ PRInt32 mX, mY, mObjWidth, mObjHeight, mCtxFrameNum; -+ nsString mCtxURI, mCtxHref, mCtxImgHref; -+ PRUint32 mEmbedCtxType; -+ PRInt32 mCtxFormType; -+ nsCOMPtr mEventNode; -+ nsCOMPtr mEventTarget; -+ nsCOMPtrmCtxDocument; -+ nsIntRect mFormRect; -+ nsCOMPtr mCtxDomWindow; -+ nsCOMPtr mCtxEvent; -+ nsCOMPtr mNSHHTMLElement; -+ nsCOMPtr mNSHHTMLElementSc; -+private: -+ nsresult SetFrameIndex(); -+ nsresult SetFormControlType(nsIDOMEventTarget *originalTarget); -+ nsresult CheckDomHtmlNode(nsIDOMNode *aNode = nsnull); -+ -+ EmbedPrivate *mOwner; -+ nsCOMPtr mOrigNode; -+ nsString mCtxDocTitle; -+}; // class EmbedContextMenuInfo -+#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2012-03-09 15:19:22.252678684 +0100 -@@ -0,0 +1,280 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsCOMPtr.h" -+#include "nsIDOMMouseEvent.h" -+ -+#include "nsIDOMKeyEvent.h" -+#include "nsIDOMUIEvent.h" -+ -+#include "EmbedEventListener.h" -+#include "EmbedPrivate.h" -+ -+EmbedEventListener::EmbedEventListener(void) -+{ -+ mOwner = nsnull; -+} -+ -+EmbedEventListener::~EmbedEventListener() -+{ -+} -+ -+NS_IMPL_ISUPPORTS1(EmbedEventListener, nsIDOMEventListener) -+ -+nsresult -+EmbedEventListener::Init(EmbedPrivate *aOwner) -+{ -+ mOwner = aOwner; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::KeyDown(nsIDOMEvent* aDOMEvent) -+{ -+ // Return FALSE to this function to mark the event as not -+ // consumed... -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_KEY_DOWN], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::KeyUp(nsIDOMEvent* aDOMEvent) -+{ -+ // return FALSE to this function to mark this event as not -+ // consumed... -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_KEY_UP], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::KeyPress(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_KEY_PRESS], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseDown(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_DOWN], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseUp(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_UP], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseClick(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_CLICK], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseDblClick(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_DBL_CLICK], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseOver(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_OVER], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseOut(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_OUT], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::Activate(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_ACTIVATE], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::FocusIn(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_FOCUS_IN], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::FocusOut(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_FOCUS_OUT], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::HandleEvent(nsIDOMEvent* aDOMEvent) -+{ -+ nsAutoString eventType; -+ aDOMEvent->GetType(eventType); -+ -+ if (eventType.EqualsLiteral("keydown")) -+ return KeyDown(aDOMEvent); -+ else if (eventType.EqualsLiteral("keyup")) -+ return KeyUp(aDOMEvent); -+ else if (eventType.EqualsLiteral("keypress")) -+ return KeyPress(aDOMEvent); -+ else if (eventType.EqualsLiteral("mousedown")) -+ return MouseDown(aDOMEvent); -+ else if (eventType.EqualsLiteral("mouseup")) -+ return MouseUp(aDOMEvent); -+ else if (eventType.EqualsLiteral("click")) -+ return MouseClick(aDOMEvent); -+ else if (eventType.EqualsLiteral("dblclick")) -+ return MouseDblClick(aDOMEvent); -+ else if (eventType.EqualsLiteral("mouseover")) -+ return MouseOver(aDOMEvent); -+ else if (eventType.EqualsLiteral("mouseout")) -+ return MouseOut(aDOMEvent); -+ else if (eventType.EqualsLiteral("DOMActivate")) -+ return Activate(aDOMEvent); -+ else if (eventType.EqualsLiteral("DOMFocusIn")) -+ return FocusIn(aDOMEvent); -+ else if (eventType.EqualsLiteral("DOMFocusOut")) -+ return FocusOut(aDOMEvent); -+ -+ NS_ERROR("Unexpected event type"); -+ return NS_OK; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2012-03-09 15:19:22.252678684 +0100 -@@ -0,0 +1,89 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef __EmbedEventListener_h -+#define __EmbedEventListener_h -+ -+//#include "nsIDOMKeyListener.h" -+//#include "nsIDOMMouseListener.h" -+//#include "nsIDOMUIListener.h" -+#include "nsIDOMEventListener.h" -+ -+class EmbedPrivate; -+ -+class EmbedEventListener : public nsIDOMEventListener -+{ -+ public: -+ -+ EmbedEventListener(); -+ virtual ~EmbedEventListener(); -+ -+ nsresult Init(EmbedPrivate *aOwner); -+ -+ NS_DECL_ISUPPORTS -+ -+ // nsIDOMEventListener -+ -+ NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent); -+ -+ // nsIDOMKeyListener -+ -+ NS_IMETHOD KeyDown(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD KeyUp(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD KeyPress(nsIDOMEvent* aDOMEvent); -+ -+ // nsIDOMMouseListener -+ -+ NS_IMETHOD MouseDown(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseUp(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseClick(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseDblClick(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseOver(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseOut(nsIDOMEvent* aDOMEvent); -+ -+ // nsIDOMUIListener -+ -+ NS_IMETHOD Activate(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD FocusIn(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD FocusOut(nsIDOMEvent* aDOMEvent); -+ -+ private: -+ -+ EmbedPrivate *mOwner; -+}; -+ -+#endif /* __EmbedEventListener_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2012-03-09 15:19:22.253678688 +0100 -@@ -0,0 +1,88 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Oleg Romashin. -+ * Portions created by the Initial Developer are Copyright (C) 2006 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Oleg Romashin -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "EmbedGtkTools.h" -+#ifndef MOZILLA_INTERNAL_API -+#include "nsServiceManagerUtils.h" -+#endif -+#include "EmbedPrivate.h" -+ -+GtkWidget * GetGtkWidgetForDOMWindow(nsIDOMWindow* aDOMWindow) -+{ -+ nsCOMPtr wwatch = do_GetService("@mozilla.org/embedcomp/window-watcher;1"); -+ if (!aDOMWindow) -+ return NULL; -+ nsCOMPtr chrome; -+ wwatch->GetChromeForWindow(aDOMWindow, getter_AddRefs(chrome)); -+ if (!chrome) { -+ return GTK_WIDGET(EmbedCommon::GetAnyLiveWidget()); -+ } -+ -+ nsCOMPtr siteWindow = nsnull; -+ siteWindow = do_QueryInterface(chrome); -+ -+ if (!siteWindow) { -+ return GTK_WIDGET(EmbedCommon::GetAnyLiveWidget()); -+ } -+ -+ GtkWidget* parentWidget; -+ siteWindow->GetSiteWindow((void**)&parentWidget); -+ if (GTK_IS_WIDGET(parentWidget)) -+ return parentWidget; -+ return NULL; -+} -+ -+GtkWindow * GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow) -+{ -+ GtkWidget* parentWidget = GetGtkWidgetForDOMWindow(aDOMWindow); -+ if (!parentWidget) -+ return NULL; -+ GtkWidget* gtkWin = gtk_widget_get_toplevel(parentWidget); -+ if (GTK_WIDGET_TOPLEVEL(gtkWin)) -+ return GTK_WINDOW(gtkWin); -+ return NULL; -+} -+ -+nsresult GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer) -+{ -+ g_return_val_if_fail(webBrowser, NS_ERROR_FAILURE); -+ nsCOMPtr docShell(do_GetInterface((nsISupports*)webBrowser)); -+ NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); -+ return docShell->GetContentViewer(aViewer); -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2012-03-09 15:19:22.253678688 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2012-03-09 15:19:22.253678688 +0100 -@@ -0,0 +1,67 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 et cindent: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Oleg Romashin. -+ * Portions created by the Initial Developer are Copyright (C) 2006 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Oleg Romashin -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+#ifndef __EmbedTools_h -+#define __EmbedTools_h -+ -+#include "nsCOMPtr.h" -+#ifdef MOZILLA_INTERNAL_API -+#include "nsString.h" -+#else -+#include "nsStringAPI.h" -+#endif -+#include "nsIDOMWindow.h" -+#include "nsIWindowWatcher.h" -+#include "nsIWebBrowserChrome.h" -+#include "nsIEmbeddingSiteWindow.h" -+#include "nsIServiceManager.h" -+#include "nsIContentViewer.h" -+#include "nsIDocShell.h" -+#include "nsIInterfaceRequestorUtils.h" -+#include -+ -+GtkWidget* -+GetGtkWidgetForDOMWindow(nsIDOMWindow* aDOMWindow); -+ -+GtkWindow* -+GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow); -+ -+nsresult -+GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); -+ -+#endif /* __EmbedTools_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2012-03-09 15:19:22.254678693 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2012-03-09 15:19:22.254678693 +0100 -@@ -0,0 +1,1016 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsIDocShell.h" -+#include "nsIWebProgress.h" -+#include "nsIWidget.h" -+#include "nsCRT.h" -+#include "nsNetUtil.h" -+#include "nsIWebBrowserStream.h" -+#include "nsIWebBrowserFocus.h" -+#include "nsIDirectoryService.h" -+#include "nsAppDirectoryServiceDefs.h" -+ -+// for do_GetInterface -+#include "nsIInterfaceRequestor.h" -+// for do_CreateInstance -+#include "nsIComponentManager.h" -+#include "nsComponentManagerUtils.h" -+ -+// for initializing our window watcher service -+#include "nsIWindowWatcher.h" -+ -+#include "nsILocalFile.h" -+ -+#include "nsXULAppAPI.h" -+ -+// all of the crap that we need for event listeners -+// and when chrome windows finish loading -+#include "nsIDOMWindow.h" -+#include "nsPIDOMWindow.h" -+ -+ -+// For seting scrollbar visibilty -+#include "nsIDOMBarProp.h" -+ -+// all of our local includes -+#include "EmbedPrivate.h" -+#include "EmbedWindow.h" -+#include "EmbedProgress.h" -+#include "EmbedContentListener.h" -+#include "EmbedEventListener.h" -+#include "EmbedWindowCreator.h" -+#include "GtkPromptService.h" -+ -+#include "mozilla/ModuleUtils.h" -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+#include "nsIAccessibilityService.h" -+#include "nsIAccessible.h" -+#include "nsIDOMDocument.h" -+#endif -+ -+PRUint32 EmbedPrivate::sWidgetCount = 0; -+ -+char *EmbedPrivate::sPath = nsnull; -+char *EmbedPrivate::sCompPath = nsnull; -+nsTArray *EmbedPrivate::sWindowList = nsnull; -+nsILocalFile *EmbedPrivate::sProfileDir = nsnull; -+nsISupports *EmbedPrivate::sProfileLock = nsnull; -+GtkWidget *EmbedPrivate::sOffscreenWindow = 0; -+GtkWidget *EmbedPrivate::sOffscreenFixed = 0; -+ -+nsIDirectoryServiceProvider *EmbedPrivate::sAppFileLocProvider = nsnull; -+ -+class GTKEmbedDirectoryProvider : public nsIDirectoryServiceProvider2 -+{ -+public: -+ NS_DECL_ISUPPORTS_INHERITED -+ NS_DECL_NSIDIRECTORYSERVICEPROVIDER -+ NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 -+}; -+ -+static const GTKEmbedDirectoryProvider kDirectoryProvider; -+ -+NS_IMPL_QUERY_INTERFACE2(GTKEmbedDirectoryProvider, -+ nsIDirectoryServiceProvider, -+ nsIDirectoryServiceProvider2) -+ -+NS_IMETHODIMP_(nsrefcnt) -+GTKEmbedDirectoryProvider::AddRef() -+{ -+ return 1; -+} -+ -+NS_IMETHODIMP_(nsrefcnt) -+GTKEmbedDirectoryProvider::Release() -+{ -+ return 1; -+} -+ -+NS_IMETHODIMP -+GTKEmbedDirectoryProvider::GetFile(const char *aKey, bool *aPersist, -+ nsIFile* *aResult) -+{ -+ if (EmbedPrivate::sAppFileLocProvider) { -+ nsresult rv = EmbedPrivate::sAppFileLocProvider->GetFile(aKey, aPersist, -+ aResult); -+ if (NS_SUCCEEDED(rv)) -+ return rv; -+ } -+ -+ if (EmbedPrivate::sProfileDir && (!strcmp(aKey, NS_APP_USER_PROFILE_50_DIR) -+ || !strcmp(aKey, NS_APP_PROFILE_DIR_STARTUP))) { -+ *aPersist = PR_TRUE; -+ return EmbedPrivate::sProfileDir->Clone(aResult); -+ } -+ -+ return NS_ERROR_FAILURE; -+} -+ -+NS_IMETHODIMP -+GTKEmbedDirectoryProvider::GetFiles(const char *aKey, -+ nsISimpleEnumerator* *aResult) -+{ -+ nsCOMPtr -+ dp2(do_QueryInterface(EmbedPrivate::sAppFileLocProvider)); -+ -+ if (!dp2) -+ return NS_ERROR_FAILURE; -+ -+ return dp2->GetFiles(aKey, aResult); -+} -+ -+#define NS_PROMPTSERVICE_CID \ -+ {0x95611356, 0xf583, 0x46f5, {0x81, 0xff, 0x4b, 0x3e, 0x01, 0x62, 0xc6, 0x19}} -+ -+NS_GENERIC_FACTORY_CONSTRUCTOR(GtkPromptService) -+NS_DEFINE_NAMED_CID(NS_PROMPTSERVICE_CID); -+ -+static const mozilla::Module::CIDEntry kDefaultPromptCIDs[] = { -+ { &kNS_PROMPTSERVICE_CID, false, NULL, GtkPromptServiceConstructor }, -+ { NULL } -+}; -+ -+static const mozilla::Module::ContractIDEntry kDefaultPromptContracts[] = { -+ { "@mozilla.org/embedcomp/prompt-service;1", &kNS_PROMPTSERVICE_CID }, -+ { NULL } -+}; -+ -+static const mozilla::Module kDefaultPromptModule = { -+ mozilla::Module::kVersion, -+ kDefaultPromptCIDs, -+ kDefaultPromptContracts -+}; -+ -+EmbedPrivate::EmbedPrivate(void) -+{ -+ mOwningWidget = nsnull; -+ mWindow = nsnull; -+ mProgress = nsnull; -+ mContentListener = nsnull; -+ mEventListener = nsnull; -+ mChromeMask = nsIWebBrowserChrome::CHROME_ALL; -+ mIsChrome = PR_FALSE; -+ mChromeLoaded = PR_FALSE; -+ mListenersAttached = PR_FALSE; -+ mMozWindowWidget = 0; -+ mIsDestroyed = PR_FALSE; -+ -+ PushStartup(); -+ if (!sWindowList) { -+ sWindowList = new nsTArray(); -+ } -+ sWindowList->AppendElement(this); -+} -+ -+EmbedPrivate::~EmbedPrivate() -+{ -+ sWindowList->RemoveElement(this); -+ PopStartup(); -+} -+ -+nsresult -+EmbedPrivate::Init(GtkMozEmbed *aOwningWidget) -+{ -+ // are we being re-initialized? -+ if (mOwningWidget) -+ return NS_OK; -+ -+ // hang on with a reference to the owning widget -+ mOwningWidget = aOwningWidget; -+ -+ // Create our embed window, and create an owning reference to it and -+ // initialize it. It is assumed that this window will be destroyed -+ // when we go out of scope. -+ mWindow = new EmbedWindow(); -+ mWindowGuard = static_cast(mWindow); -+ mWindow->Init(this); -+ -+ // Create our progress listener object, make an owning reference, -+ // and initialize it. It is assumed that this progress listener -+ // will be destroyed when we go out of scope. -+ mProgress = new EmbedProgress(); -+ mProgressGuard = static_cast -+ (mProgress); -+ mProgress->Init(this); -+ -+ // Create our content listener object, initialize it and attach it. -+ // It is assumed that this will be destroyed when we go out of -+ // scope. -+ mContentListener = new EmbedContentListener(); -+ mContentListenerGuard = static_cast(static_cast(mContentListener)); -+ mContentListener->Init(this); -+ -+ // Create our key listener object and initialize it. It is assumed -+ // that this will be destroyed before we go out of scope. -+ mEventListener = new EmbedEventListener(); -+ mEventListenerGuard = -+ static_cast(static_cast(mEventListener)); -+ mEventListener->Init(this); -+ -+ // has the window creator service been set up? -+ static int initialized = PR_FALSE; -+ // Set up our window creator ( only once ) -+ if (!initialized) { -+ // We set this flag here instead of on success. If it failed we -+ // don't want to keep trying and leaking window creator objects. -+ initialized = PR_TRUE; -+ -+ // create our local object -+ EmbedWindowCreator *creator = new EmbedWindowCreator(); -+ nsCOMPtr windowCreator; -+ windowCreator = static_cast(creator); -+ -+ // Attach it via the watcher service -+ nsCOMPtr watcher = do_GetService(NS_WINDOWWATCHER_CONTRACTID); -+ if (watcher) -+ watcher->SetWindowCreator(windowCreator); -+ } -+ return NS_OK; -+} -+ -+nsresult -+EmbedPrivate::Realize(PRBool *aAlreadyRealized) -+{ -+ -+ *aAlreadyRealized = PR_FALSE; -+ -+ // create the offscreen window if we have to -+ EnsureOffscreenWindow(); -+ -+ // Have we ever been initialized before? If so then just reparent -+ // from the offscreen window. -+ if (mMozWindowWidget) { -+ gtk_widget_reparent(mMozWindowWidget, GTK_WIDGET(mOwningWidget)); -+ *aAlreadyRealized = PR_TRUE; -+ return NS_OK; -+ } -+ -+ // Get the nsIWebBrowser object for our embedded window. -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // get a handle on the navigation object -+ mNavigation = do_QueryInterface(webBrowser); -+ -+ // Create our session history object and tell the navigation object -+ // to use it. We need to do this before we create the web browser -+ // window. -+ mSessionHistory = do_CreateInstance(NS_SHISTORY_CONTRACTID); -+ mNavigation->SetSessionHistory(mSessionHistory); -+ -+ // create the window -+ mWindow->CreateWindow(); -+ -+ // bind the progress listener to the browser object -+ nsCOMPtr supportsWeak; -+ supportsWeak = do_QueryInterface(mProgressGuard); -+ nsCOMPtr weakRef; -+ supportsWeak->GetWeakReference(getter_AddRefs(weakRef)); -+ webBrowser->AddWebBrowserListener(weakRef, -+ NS_GET_IID(nsIWebProgressListener)); -+ -+ // set ourselves as the parent uri content listener -+ nsCOMPtr uriListener; -+ uriListener = do_QueryInterface(mContentListenerGuard); -+ webBrowser->SetParentURIContentListener(uriListener); -+ -+ // save the window id of the newly created window -+ nsCOMPtr mozWidget; -+ mWindow->mBaseWindow->GetMainWidget(getter_AddRefs(mozWidget)); -+ // get the native drawing area -+ GdkWindow *tmp_window = -+ static_cast( -+ mozWidget->GetNativeData(NS_NATIVE_WINDOW)); -+ // and, thanks to superwin we actually need the parent of that. -+ tmp_window = gdk_window_get_parent(tmp_window); -+ // save the widget ID - it should be the mozarea of the window. -+ gpointer data = nsnull; -+ gdk_window_get_user_data(tmp_window, &data); -+ mMozWindowWidget = static_cast(data); -+ -+ // Apply the current chrome mask -+ ApplyChromeMask(); -+ -+ return NS_OK; -+} -+ -+void -+EmbedPrivate::Unrealize(void) -+{ -+ // reparent to our offscreen window -+ gtk_widget_reparent(mMozWindowWidget, sOffscreenFixed); -+} -+ -+void -+EmbedPrivate::Show(void) -+{ -+ // Get the nsIWebBrowser object for our embedded window. -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // and set the visibility on the thing -+ nsCOMPtr baseWindow = do_QueryInterface(webBrowser); -+ baseWindow->SetVisibility(PR_TRUE); -+} -+ -+void -+EmbedPrivate::Hide(void) -+{ -+ // Get the nsIWebBrowser object for our embedded window. -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // and set the visibility on the thing -+ nsCOMPtr baseWindow = do_QueryInterface(webBrowser); -+ baseWindow->SetVisibility(PR_FALSE); -+} -+ -+void -+EmbedPrivate::Resize(PRUint32 aWidth, PRUint32 aHeight) -+{ -+ mWindow->SetDimensions(nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER, -+ 0, 0, aWidth, aHeight); -+} -+ -+void -+EmbedPrivate::Destroy(void) -+{ -+ // This flag might have been set from -+ // EmbedWindow::DestroyBrowserWindow() as well if someone used a -+ // window.close() or something or some other script action to close -+ // the window. No harm setting it again. -+ mIsDestroyed = PR_TRUE; -+ -+ // Get the nsIWebBrowser object for our embedded window. -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // Release our progress listener -+ nsCOMPtr supportsWeak; -+ supportsWeak = do_QueryInterface(mProgressGuard); -+ nsCOMPtr weakRef; -+ supportsWeak->GetWeakReference(getter_AddRefs(weakRef)); -+ webBrowser->RemoveWebBrowserListener(weakRef, -+ NS_GET_IID(nsIWebProgressListener)); -+ weakRef = nsnull; -+ supportsWeak = nsnull; -+ -+ // Release our content listener -+ webBrowser->SetParentURIContentListener(nsnull); -+ mContentListenerGuard = nsnull; -+ mContentListener = nsnull; -+ -+ // Now that we have removed the listener, release our progress -+ // object -+ mProgressGuard = nsnull; -+ mProgress = nsnull; -+ -+ // detach our event listeners and release the event receiver -+ DetachListeners(); -+ if (mEventTarget) -+ mEventTarget = nsnull; -+ -+ // destroy our child window -+ mWindow->ReleaseChildren(); -+ -+ // release navigation -+ mNavigation = nsnull; -+ -+ // release session history -+ mSessionHistory = nsnull; -+ -+ mOwningWidget = nsnull; -+ -+ mMozWindowWidget = 0; -+} -+ -+void -+EmbedPrivate::SetURI(const char *aURI) -+{ -+ mURI.Assign(aURI); -+} -+ -+void -+EmbedPrivate::LoadCurrentURI(void) -+{ -+ if (mURI.Length()) { -+ nsCOMPtr piWin; -+ GetPIDOMWindow(getter_AddRefs(piWin)); -+ -+ nsAutoPopupStatePusher popupStatePusher(piWin, openAllowed); -+ -+ mNavigation->LoadURI(NS_ConvertUTF8toUTF16(mURI).get(), // URI string -+ nsIWebNavigation::LOAD_FLAGS_NONE | // Load flags -+ nsIWebNavigation::LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP, // Allow keyword.URL.. functionality -+ nsnull, // Referring URI -+ nsnull, // Post data -+ nsnull); // extra headers -+ } -+} -+ -+void -+EmbedPrivate::Reload(PRUint32 reloadFlags) -+{ -+ /* Use the session history if it is available, this -+ * allows framesets to reload correctly */ -+ nsCOMPtr wn; -+ -+ if (mSessionHistory) { -+ wn = do_QueryInterface(mSessionHistory); -+ } -+ if (!wn) -+ wn = mNavigation; -+ -+ if (wn) -+ wn->Reload(reloadFlags); -+} -+ -+ -+void -+EmbedPrivate::ApplyChromeMask() -+{ -+ if (mWindow) { -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ nsCOMPtr domWindow; -+ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); -+ if (domWindow) { -+ -+ nsCOMPtr scrollbars; -+ domWindow->GetScrollbars(getter_AddRefs(scrollbars)); -+ if (scrollbars) { -+ -+ scrollbars->SetVisible -+ (mChromeMask & nsIWebBrowserChrome::CHROME_SCROLLBARS ? -+ PR_TRUE : PR_FALSE); -+ } -+ } -+ } -+} -+ -+ -+void -+EmbedPrivate::SetChromeMask(PRUint32 aChromeMask) -+{ -+ mChromeMask = aChromeMask; -+ -+ ApplyChromeMask(); -+} -+ -+ -+/* static */ -+void -+EmbedPrivate::PushStartup(void) -+{ -+ // increment the number of widgets -+ sWidgetCount++; -+ -+ // if this is the first widget, fire up xpcom -+ if (sWidgetCount == 1) { -+ nsresult rv; -+ -+ nsCOMPtr binDir; -+ if (sCompPath) { -+ rv = NS_NewNativeLocalFile(nsDependentCString(sCompPath), 1, getter_AddRefs(binDir)); -+ if (NS_FAILED(rv)) -+ return; -+ } -+ -+ const char *grePath = sPath; -+ -+ if (!grePath) -+ grePath = getenv("MOZILLA_FIVE_HOME"); -+ -+ if (!grePath) -+ return; -+ -+ nsCOMPtr greDir; -+ rv = NS_NewNativeLocalFile(nsDependentCString(grePath), PR_TRUE, -+ getter_AddRefs(greDir)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ if (sProfileDir && !sProfileLock) { -+ rv = XRE_LockProfileDirectory(sProfileDir, -+ &sProfileLock); -+ if (NS_FAILED(rv)) return; -+ } -+ -+ rv = XRE_InitEmbedding2(greDir, binDir, -+ const_cast(&kDirectoryProvider)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ if (sProfileDir) -+ XRE_NotifyProfile(); -+ -+ RegisterAppComponents(); -+ } -+} -+ -+/* static */ -+void -+EmbedPrivate::PopStartup(void) -+{ -+ sWidgetCount--; -+ if (sWidgetCount == 0) { -+ -+ // destroy the offscreen window -+ DestroyOffscreenWindow(); -+ -+ // we no longer need a reference to the DirectoryServiceProvider -+ if (sAppFileLocProvider) { -+ NS_RELEASE(sAppFileLocProvider); -+ sAppFileLocProvider = nsnull; -+ } -+ -+ // shut down XPCOM/Embedding -+ XRE_TermEmbedding(); -+ -+ NS_IF_RELEASE(sProfileLock); -+ NS_IF_RELEASE(sProfileDir); -+ } -+} -+ -+/* static */ -+void EmbedPrivate::SetPath(const char *aPath) -+{ -+ if (sPath) -+ free(sPath); -+ if (aPath) -+ sPath = strdup(aPath); -+ else -+ sPath = nsnull; -+} -+ -+/* static */ -+void -+EmbedPrivate::SetCompPath(const char *aPath) -+{ -+ if (sCompPath) -+ free(sCompPath); -+ if (aPath) -+ sCompPath = strdup(aPath); -+ else -+ sCompPath = nsnull; -+} -+ -+/* static */ -+void -+EmbedPrivate::SetProfilePath(const char *aDir, const char *aName) -+{ -+ if (sProfileDir) { -+ if (sWidgetCount) { -+ NS_ERROR("Cannot change profile directory during run."); -+ return; -+ } -+ -+ NS_RELEASE(sProfileDir); -+ NS_RELEASE(sProfileLock); -+ } -+ -+ nsresult rv = -+ NS_NewNativeLocalFile(nsDependentCString(aDir), PR_TRUE, &sProfileDir); -+ -+ if (NS_SUCCEEDED(rv) && aName) -+ rv = sProfileDir->AppendNative(nsDependentCString(aName)); -+ -+ if (NS_SUCCEEDED(rv)) { -+ bool exists = PR_FALSE; -+ rv = sProfileDir->Exists(&exists); -+ if (!exists) -+ rv = sProfileDir->Create(nsIFile::DIRECTORY_TYPE, 0700); -+ rv = XRE_LockProfileDirectory(sProfileDir, &sProfileLock); -+ } -+ -+ if (NS_SUCCEEDED(rv)) { -+ if (sWidgetCount) -+ XRE_NotifyProfile(); -+ -+ return; -+ } -+ -+ NS_WARNING("Failed to lock profile."); -+ -+ // Failed -+ NS_IF_RELEASE(sProfileDir); -+ NS_IF_RELEASE(sProfileLock); -+} -+ -+void -+EmbedPrivate::SetDirectoryServiceProvider(nsIDirectoryServiceProvider * appFileLocProvider) -+{ -+ if (sAppFileLocProvider) -+ NS_RELEASE(sAppFileLocProvider); -+ -+ if (appFileLocProvider) { -+ sAppFileLocProvider = appFileLocProvider; -+ NS_ADDREF(sAppFileLocProvider); -+ } -+} -+ -+nsresult -+EmbedPrivate::OpenStream(const char *aBaseURI, const char *aContentType) -+{ -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ nsCOMPtr wbStream = do_QueryInterface(webBrowser); -+ if (!wbStream) return NS_ERROR_FAILURE; -+ -+ nsCOMPtr uri; -+ nsresult rv = NS_NewURI(getter_AddRefs(uri), aBaseURI); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ rv = wbStream->OpenStream(uri, nsDependentCString(aContentType)); -+ return rv; -+} -+ -+nsresult -+EmbedPrivate::AppendToStream(const PRUint8 *aData, PRUint32 aLen) -+{ -+ // Attach listeners to this document since in some cases we don't -+ // get updates for content added this way. -+ ContentStateChange(); -+ -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ nsCOMPtr wbStream = do_QueryInterface(webBrowser); -+ if (!wbStream) return NS_ERROR_FAILURE; -+ -+ return wbStream->AppendToStream(aData, aLen); -+} -+ -+nsresult -+EmbedPrivate::CloseStream(void) -+{ -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ nsCOMPtr wbStream = do_QueryInterface(webBrowser); -+ if (!wbStream) return NS_ERROR_FAILURE; -+ -+ return wbStream->CloseStream(); -+} -+ -+/* static */ -+EmbedPrivate * -+EmbedPrivate::FindPrivateForBrowser(nsIWebBrowserChrome *aBrowser) -+{ -+ if (!sWindowList) -+ return nsnull; -+ -+ // Get the number of browser windows. -+ PRInt32 count = sWindowList->Length(); -+ // This function doesn't get called very often at all ( only when -+ // creating a new window ) so it's OK to walk the list of open -+ // windows. -+ for (int i = 0; i < count; i++) { -+ EmbedPrivate *tmpPrivate = sWindowList->ElementAt(i); -+ // get the browser object for that window -+ nsIWebBrowserChrome *chrome = static_cast( -+ tmpPrivate->mWindow); -+ if (chrome == aBrowser) -+ return tmpPrivate; -+ } -+ -+ return nsnull; -+} -+ -+void -+EmbedPrivate::ContentStateChange(void) -+{ -+ -+ // we don't attach listeners to chrome -+ if (mListenersAttached && !mIsChrome) -+ return; -+ -+ GetListener(); -+ -+ if (!mEventTarget) -+ return; -+ -+ AttachListeners(); -+ -+} -+ -+void -+EmbedPrivate::ContentFinishedLoading(void) -+{ -+ if (mIsChrome) { -+ // We're done loading. -+ mChromeLoaded = PR_TRUE; -+ -+ // get the web browser -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // get the content DOM window for that web browser -+ nsCOMPtr domWindow; -+ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); -+ if (!domWindow) { -+ NS_WARNING("no dom window in content finished loading\n"); -+ return; -+ } -+ -+ // resize the content -+ domWindow->SizeToContent(); -+ -+ // and since we're done loading show the window, assuming that the -+ // visibility flag has been set. -+ bool visibility; -+ mWindow->GetVisibility(&visibility); -+ if (visibility) -+ mWindow->SetVisibility(PR_TRUE); -+ } -+} -+ -+void -+EmbedPrivate::ChildFocusIn(void) -+{ -+ if (mIsDestroyed) -+ return; -+ -+ nsresult rv; -+ nsCOMPtr webBrowser; -+ rv = mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ nsCOMPtr webBrowserFocus(do_QueryInterface(webBrowser)); -+ if (!webBrowserFocus) -+ return; -+ -+ webBrowserFocus->Activate(); -+} -+ -+void -+EmbedPrivate::ChildFocusOut(void) -+{ -+ if (mIsDestroyed) -+ return; -+ -+ nsresult rv; -+ nsCOMPtr webBrowser; -+ rv = mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ nsCOMPtr webBrowserFocus(do_QueryInterface(webBrowser)); -+ if (!webBrowserFocus) -+ return; -+ -+ webBrowserFocus->Deactivate(); -+} -+ -+// Get the event listener for the chrome event handler. -+ -+void -+EmbedPrivate::GetListener(void) -+{ -+ if (mEventTarget) -+ return; -+ -+ nsCOMPtr piWin; -+ GetPIDOMWindow(getter_AddRefs(piWin)); -+ -+ if (!piWin) -+ return; -+ -+ mEventTarget = do_QueryInterface(piWin->GetChromeEventHandler()); -+} -+ -+// attach key and mouse event listeners -+ -+void -+EmbedPrivate::AttachListeners(void) -+{ -+ if (!mEventTarget || mListenersAttached) -+ return; -+ -+ nsIDOMEventListener *eventListener = -+ static_cast(static_cast(mEventListener)); -+ -+ // add the key listener -+ nsresult rv; -+ -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keydown"), -+ eventListener, PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keyup"), -+ eventListener, PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keypress"), -+ eventListener, PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mousedown"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseup"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("click"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("dblclick"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseover"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseout"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMActivate"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMFocusIn"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMFocusOut"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ -+ // ok, all set. -+ mListenersAttached = PR_TRUE; -+} -+ -+void -+EmbedPrivate::DetachListeners(void) -+{ -+ if (!mListenersAttached || !mEventTarget) -+ return; -+ -+ nsIDOMEventListener *eventListener = -+ static_cast(static_cast(mEventListener)); -+ -+ nsresult rv; -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keydown"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keyup"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keypress"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mousedown"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseup"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("click"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("dblclick"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseover"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseout"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMActivate"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMFocusIn"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMFocusOut"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ -+ mListenersAttached = PR_FALSE; -+} -+ -+nsresult -+EmbedPrivate::GetPIDOMWindow(nsPIDOMWindow **aPIWin) -+{ -+ *aPIWin = nsnull; -+ -+ // get the web browser -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // get the content DOM window for that web browser -+ nsCOMPtr domWindow; -+ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); -+ if (!domWindow) -+ return NS_ERROR_FAILURE; -+ -+ // get the private DOM window -+ nsCOMPtr domWindowPrivate = do_QueryInterface(domWindow); -+ // and the root window for that DOM window -+ *aPIWin = domWindowPrivate->GetPrivateRoot(); -+ -+ if (*aPIWin) { -+ NS_ADDREF(*aPIWin); -+ return NS_OK; -+ } -+ -+ return NS_ERROR_FAILURE; -+ -+} -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+void * -+EmbedPrivate::GetAtkObjectForCurrentDocument() -+{ -+ if (!mNavigation) -+ return nsnull; -+ -+ nsCOMPtr accService = -+ do_GetService("@mozilla.org/accessibilityService;1"); -+ if (accService) { -+ //get current document -+ nsCOMPtr domDoc; -+ mNavigation->GetDocument(getter_AddRefs(domDoc)); -+ NS_ENSURE_TRUE(domDoc, nsnull); -+ -+ nsCOMPtr domNode(do_QueryInterface(domDoc)); -+ NS_ENSURE_TRUE(domNode, nsnull); -+ -+ nsCOMPtr acc; -+ accService->GetAccessibleFor(domNode, getter_AddRefs(acc)); -+ NS_ENSURE_TRUE(acc, nsnull); -+ -+ void *atkObj = nsnull; -+ if (NS_SUCCEEDED(acc->GetNativeInterface(&atkObj))) -+ return atkObj; -+ } -+ return nsnull; -+} -+#endif /* MOZ_ACCESSIBILITY_ATK */ -+ -+/* static */ -+void -+EmbedPrivate::RegisterAppComponents(void) -+{ -+ XRE_AddStaticComponent(&kDefaultPromptModule); -+} -+ -+/* static */ -+void -+EmbedPrivate::EnsureOffscreenWindow(void) -+{ -+ if (sOffscreenWindow) -+ return; -+ sOffscreenWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); -+ gtk_widget_realize(sOffscreenWindow); -+ sOffscreenFixed = gtk_fixed_new(); -+ gtk_container_add(GTK_CONTAINER(sOffscreenWindow), sOffscreenFixed); -+ gtk_widget_realize(sOffscreenFixed); -+} -+ -+/* static */ -+void -+EmbedPrivate::DestroyOffscreenWindow(void) -+{ -+ if (!sOffscreenWindow) -+ return; -+ gtk_widget_destroy(sOffscreenWindow); -+ sOffscreenWindow = 0; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2012-03-09 15:19:22.255678699 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2012-03-09 15:19:22.255678699 +0100 -@@ -0,0 +1,188 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef __EmbedPrivate_h -+#define __EmbedPrivate_h -+ -+#include "nsCOMPtr.h" -+#include "nsStringGlue.h" -+#include "nsIWebNavigation.h" -+#include "nsISHistory.h" -+// for our one function that gets the EmbedPrivate via the chrome -+// object. -+#include "nsIWebBrowserChrome.h" -+#include "nsIAppShell.h" -+#include "nsIDOMEventTarget.h" -+#include "nsTArray.h" -+ -+#include "gtkmozembedprivate.h" -+ -+class EmbedProgress; -+class EmbedWindow; -+class EmbedContentListener; -+class EmbedEventListener; -+ -+class nsPIDOMWindow; -+class nsIDirectoryServiceProvider; -+ -+class EmbedPrivate { -+ -+ public: -+ -+ EmbedPrivate(); -+ ~EmbedPrivate(); -+ -+ nsresult Init (GtkMozEmbed *aOwningWidget); -+ nsresult Realize (PRBool *aAlreadRealized); -+ void Unrealize (void); -+ void Show (void); -+ void Hide (void); -+ void Resize (PRUint32 aWidth, PRUint32 aHeight); -+ void Destroy (void); -+ void SetURI (const char *aURI); -+ void LoadCurrentURI (void); -+ void Reload (PRUint32 reloadFlags); -+ -+ void SetChromeMask (PRUint32 chromeMask); -+ void ApplyChromeMask (); -+ -+ static void PushStartup (void); -+ static void PopStartup (void); -+ static void SetPath (const char *aPath); -+ static void SetCompPath (const char *aPath); -+ static void SetProfilePath (const char *aDir, const char *aName); -+ static void SetDirectoryServiceProvider (nsIDirectoryServiceProvider * appFileLocProvider); -+ -+ nsresult OpenStream (const char *aBaseURI, const char *aContentType); -+ nsresult AppendToStream (const PRUint8 *aData, PRUint32 aLen); -+ nsresult CloseStream (void); -+ -+ // This function will find the specific EmbedPrivate object for a -+ // given nsIWebBrowserChrome. -+ static EmbedPrivate *FindPrivateForBrowser(nsIWebBrowserChrome *aBrowser); -+ -+ // This is an upcall that will come from the progress listener -+ // whenever there is a content state change. We need this so we can -+ // attach event listeners. -+ void ContentStateChange (void); -+ -+ // This is an upcall from the progress listener when content is -+ // finished loading. We have this so that if it's chrome content -+ // that we can size to content properly and show ourselves if -+ // visibility is set. -+ void ContentFinishedLoading(void); -+ -+ // these are when the widget itself gets focus in and focus out -+ // events -+ void ChildFocusIn (void); -+ void ChildFocusOut(void); -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+ void *GetAtkObjectForCurrentDocument(); -+#endif -+ -+ GtkMozEmbed *mOwningWidget; -+ -+ // all of the objects that we own -+ EmbedWindow *mWindow; -+ nsCOMPtr mWindowGuard; -+ EmbedProgress *mProgress; -+ nsCOMPtr mProgressGuard; -+ EmbedContentListener *mContentListener; -+ nsCOMPtr mContentListenerGuard; -+ EmbedEventListener *mEventListener; -+ nsCOMPtr mEventListenerGuard; -+ -+ nsCOMPtr mNavigation; -+ nsCOMPtr mSessionHistory; -+ -+ // our event receiver -+ nsCOMPtr mEventTarget; -+ -+ // the currently loaded uri -+ nsCString mURI; -+ -+ // the number of widgets that have been created -+ static PRUint32 sWidgetCount; -+ // the path to the GRE -+ static char *sPath; -+ // the path to components -+ static char *sCompPath; -+ // the appshell we have created -+ static nsIAppShell *sAppShell; -+ // the list of all open windows -+ static nsTArray *sWindowList; -+ // what is our profile path? -+ static nsILocalFile *sProfileDir; -+ static nsISupports *sProfileLock; -+ -+ static nsIDirectoryServiceProvider * sAppFileLocProvider; -+ -+ // chrome mask -+ PRUint32 mChromeMask; -+ // is this a chrome window? -+ PRBool mIsChrome; -+ // has the chrome finished loading? -+ PRBool mChromeLoaded; -+ // saved window ID for reparenting later -+ GtkWidget *mMozWindowWidget; -+ // has someone called Destroy() on us? -+ PRBool mIsDestroyed; -+ -+ private: -+ -+ // is the chrome listener attached yet? -+ PRBool mListenersAttached; -+ -+ void GetListener (void); -+ void AttachListeners(void); -+ void DetachListeners(void); -+ -+ // this will get the PIDOMWindow for this widget -+ nsresult GetPIDOMWindow (nsPIDOMWindow **aPIWin); -+ -+ static void RegisterAppComponents(); -+ -+ // offscreen window methods and the offscreen widget -+ static void EnsureOffscreenWindow(void); -+ static void DestroyOffscreenWindow(void); -+ static GtkWidget *sOffscreenWindow; -+ static GtkWidget *sOffscreenFixed; -+ -+}; -+ -+#endif /* __EmbedPrivate_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2012-03-09 15:19:22.255678699 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2012-03-09 15:48:33.580516368 +0100 -@@ -0,0 +1,216 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "EmbedProgress.h" -+ -+#include "nsIChannel.h" -+#include "nsIWebProgress.h" -+#include "nsIDOMWindow.h" -+ -+#include "nsIURI.h" -+ -+EmbedProgress::EmbedProgress(void) -+{ -+ mOwner = nsnull; -+} -+ -+EmbedProgress::~EmbedProgress() -+{ -+} -+ -+NS_IMPL_ISUPPORTS2(EmbedProgress, -+ nsIWebProgressListener, -+ nsISupportsWeakReference) -+ -+nsresult -+EmbedProgress::Init(EmbedPrivate *aOwner) -+{ -+ mOwner = aOwner; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnStateChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ PRUint32 aStateFlags, -+ nsresult aStatus) -+{ -+ // give the widget a chance to attach any listeners -+ mOwner->ContentStateChange(); -+ // if we've got the start flag, emit the signal -+ if ((aStateFlags & GTK_MOZ_EMBED_FLAG_IS_NETWORK) && -+ (aStateFlags & GTK_MOZ_EMBED_FLAG_START)) -+ { -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[NET_START], 0); -+ } -+ -+ // get the uri for this request -+ nsCAutoString uriString; -+ RequestToURIString(aRequest, uriString); -+ -+ // is it the same as the current URI? -+ if (mOwner->mURI.Equals(uriString)) -+ { -+ // for people who know what they are doing -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[NET_STATE], 0, -+ aStateFlags, aStatus); -+ } -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[NET_STATE_ALL], 0, -+ uriString.get(), -+ (gint)aStateFlags, (gint)aStatus); -+ // and for stop, too -+ if ((aStateFlags & GTK_MOZ_EMBED_FLAG_IS_NETWORK) && -+ (aStateFlags & GTK_MOZ_EMBED_FLAG_STOP)) -+ { -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[NET_STOP], 0); -+ // let our owner know that the load finished -+ mOwner->ContentFinishedLoading(); -+ } -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnProgressChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ PRInt32 aCurSelfProgress, -+ PRInt32 aMaxSelfProgress, -+ PRInt32 aCurTotalProgress, -+ PRInt32 aMaxTotalProgress) -+{ -+ -+ nsCAutoString uriString; -+ RequestToURIString(aRequest, uriString); -+ -+ // is it the same as the current uri? -+ if (mOwner->mURI.Equals(uriString)) { -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[PROGRESS], 0, -+ aCurTotalProgress, aMaxTotalProgress); -+ } -+ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[PROGRESS_ALL], 0, -+ uriString.get(), -+ aCurTotalProgress, aMaxTotalProgress); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnLocationChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ nsIURI *aLocation, -+ PRUint32 aFlags) -+{ -+ nsCAutoString newURI; -+ NS_ENSURE_ARG_POINTER(aLocation); -+ aLocation->GetSpec(newURI); -+ -+ // Make sure that this is the primary frame change and not -+ // just a subframe. -+ PRBool isSubFrameLoad = PR_FALSE; -+ if (aWebProgress) { -+ nsCOMPtr domWindow; -+ nsCOMPtr topDomWindow; -+ -+ aWebProgress->GetDOMWindow(getter_AddRefs(domWindow)); -+ -+ // get the root dom window -+ if (domWindow) -+ domWindow->GetTop(getter_AddRefs(topDomWindow)); -+ -+ if (domWindow != topDomWindow) -+ isSubFrameLoad = PR_TRUE; -+ } -+ -+ if (!isSubFrameLoad) { -+ mOwner->SetURI(newURI.get()); -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[LOCATION], 0); -+ } -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnStatusChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ nsresult aStatus, -+ const PRUnichar *aMessage) -+{ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[STATUS_CHANGE], 0, -+ static_cast(aRequest), -+ static_cast(aStatus), -+ static_cast(aMessage)); -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnSecurityChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ PRUint32 aState) -+{ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[SECURITY_CHANGE], 0, -+ static_cast(aRequest), -+ aState); -+ return NS_OK; -+} -+ -+/* static */ -+void -+EmbedProgress::RequestToURIString(nsIRequest *aRequest, nsACString &aString) -+{ -+ // is it a channel -+ nsCOMPtr channel; -+ channel = do_QueryInterface(aRequest); -+ if (!channel) -+ return; -+ -+ nsCOMPtr uri; -+ channel->GetURI(getter_AddRefs(uri)); -+ if (!uri) -+ return; -+ -+ uri->GetSpec(aString); -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2012-03-09 15:19:22.256678705 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2012-03-09 15:19:22.256678705 +0100 -@@ -0,0 +1,66 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef __EmbedProgress_h -+#define __EmbedProgress_h -+ -+#include "nsIWebProgressListener.h" -+#include "nsWeakReference.h" -+#include "EmbedPrivate.h" -+ -+class EmbedProgress : public nsIWebProgressListener, -+ public nsSupportsWeakReference -+{ -+ public: -+ EmbedProgress(); -+ virtual ~EmbedProgress(); -+ -+ nsresult Init(EmbedPrivate *aOwner); -+ -+ NS_DECL_ISUPPORTS -+ -+ NS_DECL_NSIWEBPROGRESSLISTENER -+ -+ private: -+ -+ static void RequestToURIString (nsIRequest *aRequest, nsACString &aString); -+ -+ EmbedPrivate *mOwner; -+ -+}; -+ -+#endif /* __EmbedProgress_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2012-03-09 15:19:22.256678705 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2012-03-09 15:19:22.256678705 +0100 -@@ -0,0 +1,411 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=4: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2003 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Brian Ryner -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "EmbedPrompter.h" -+ -+enum { -+ INCLUDE_USERNAME = 1 << 0, -+ INCLUDE_PASSWORD = 1 << 1, -+ INCLUDE_CHECKBOX = 1 << 2, -+ INCLUDE_CANCEL = 1 << 3 -+}; -+ -+struct DialogDescription { -+ int flags; -+ const gchar* icon; -+}; -+ -+// This table contains the optional widgets and icons associated with -+// each type of dialog. -+ -+static const DialogDescription DialogTable[] = { -+ { 0, GTK_STOCK_DIALOG_WARNING }, // ALERT -+ { INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_WARNING }, // ALERT_CHECK -+ { INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // CONFIRM -+ { INCLUDE_CHECKBOX | -+ INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // CONFIRM_CHECK -+ { INCLUDE_CANCEL | -+ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT -+ { INCLUDE_CANCEL | -+ INCLUDE_USERNAME | -+ INCLUDE_PASSWORD | -+ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT_USER_PASS -+ { INCLUDE_CANCEL | -+ INCLUDE_PASSWORD | -+ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT_PASS -+ { INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // SELECT -+ { INCLUDE_CANCEL | -+ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION } // UNIVERSAL -+}; -+ -+EmbedPrompter::EmbedPrompter(void) -+ : mCheckValue(PR_FALSE), -+ mItemList(nsnull), -+ mItemCount(0), -+ mButtonPressed(0), -+ mConfirmResult(PR_FALSE), -+ mSelectedItem(0), -+ mWindow(NULL), -+ mUserField(NULL), -+ mPassField(NULL), -+ mTextField(NULL), -+ mComboBox(NULL), -+ mCheckBox(NULL) -+{ -+} -+ -+EmbedPrompter::~EmbedPrompter(void) -+{ -+ if (mItemList) -+ delete[] mItemList; -+} -+ -+nsresult -+EmbedPrompter::Create(PromptType aType, GtkWindow* aParentWindow) -+{ -+ mWindow = gtk_dialog_new_with_buttons(mTitle.get(), aParentWindow, -+ (GtkDialogFlags)0, -+ NULL); -+ -+ // only add the dialog to the window group if the parent already has a window group, -+ // so as not to break app's expectations about modal dialogs. -+ if (aParentWindow && aParentWindow->group) { -+ gtk_window_group_add_window (aParentWindow->group, GTK_WINDOW (mWindow)); -+ } -+ -+ // gtk will resize this for us as necessary -+ gtk_window_set_default_size(GTK_WINDOW(mWindow), 100, 50); -+ -+ // this HBox will contain the icon, and a vbox which contains the -+ // dialog text and other widgets. -+ GtkWidget* dialogHBox = gtk_hbox_new(FALSE, 12); -+ -+ -+ // Set up dialog properties according to the GNOME HIG -+ // (http://developer.gnome.org/projects/gup/hig/1.0/windows.html#alert-windows) -+ -+ gtk_container_set_border_width(GTK_CONTAINER(mWindow), 6); -+ gtk_dialog_set_has_separator(GTK_DIALOG(mWindow), FALSE); -+ gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(mWindow)->vbox), 12); -+ gtk_container_set_border_width(GTK_CONTAINER(dialogHBox), 6); -+ -+ -+ // This is the VBox which will contain the label and other controls. -+ GtkWidget* contentsVBox = gtk_vbox_new(FALSE, 12); -+ -+ // get the stock icon for this dialog and put it in the box -+ const gchar* iconDesc = DialogTable[aType].icon; -+ GtkWidget* icon = gtk_image_new_from_stock(iconDesc, GTK_ICON_SIZE_DIALOG); -+ gtk_misc_set_alignment(GTK_MISC(icon), 0.5, 0.0); -+ gtk_box_pack_start(GTK_BOX(dialogHBox), icon, FALSE, FALSE, 0); -+ -+ // now pack the label into the vbox -+ GtkWidget* label = gtk_label_new(mMessageText.get()); -+ gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); -+ gtk_label_set_selectable(GTK_LABEL(label), TRUE); -+ gtk_box_pack_start(GTK_BOX(contentsVBox), label, FALSE, FALSE, 0); -+ -+ int widgetFlags = DialogTable[aType].flags; -+ -+ if (widgetFlags & (INCLUDE_USERNAME | INCLUDE_PASSWORD)) { -+ -+ // If we're creating a username and/or password field, make an hbox -+ // which will contain two vboxes, one for the labels and one for the -+ // text fields. This will let us line up the textfields. -+ -+ GtkWidget* userPassHBox = gtk_hbox_new(FALSE, 12); -+ GtkWidget* userPassLabels = gtk_vbox_new(TRUE, 6); -+ GtkWidget* userPassFields = gtk_vbox_new(TRUE, 6); -+ -+ if (widgetFlags & INCLUDE_USERNAME) { -+ GtkWidget* userLabel = gtk_label_new("User Name:"); -+ gtk_box_pack_start(GTK_BOX(userPassLabels), userLabel, FALSE, -+ FALSE, 0); -+ -+ mUserField = gtk_entry_new(); -+ -+ if (!mUser.IsEmpty()) -+ gtk_entry_set_text(GTK_ENTRY(mUserField), mUser.get()); -+ -+ gtk_entry_set_activates_default(GTK_ENTRY(mUserField), TRUE); -+ -+ gtk_box_pack_start(GTK_BOX(userPassFields), mUserField, FALSE, -+ FALSE, 0); -+ } -+ if (widgetFlags & INCLUDE_PASSWORD) { -+ GtkWidget* passLabel = gtk_label_new("Password:"); -+ gtk_box_pack_start(GTK_BOX(userPassLabels), passLabel, FALSE, -+ FALSE, 0); -+ -+ mPassField = gtk_entry_new(); -+ -+ if (!mPass.IsEmpty()) -+ gtk_entry_set_text(GTK_ENTRY(mPassField), mPass.get()); -+ -+ gtk_entry_set_visibility(GTK_ENTRY(mPassField), FALSE); -+ gtk_entry_set_activates_default(GTK_ENTRY(mPassField), TRUE); -+ -+ gtk_box_pack_start(GTK_BOX(userPassFields), mPassField, FALSE, -+ FALSE, 0); -+ } -+ -+ gtk_box_pack_start(GTK_BOX(userPassHBox), userPassLabels, FALSE, -+ FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(userPassHBox), userPassFields, FALSE, -+ FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(contentsVBox), userPassHBox, FALSE, FALSE, 0); -+ } -+ -+ if (aType == TYPE_PROMPT) { -+ mTextField = gtk_entry_new(); -+ -+ if (!mTextValue.IsEmpty()) -+ gtk_entry_set_text(GTK_ENTRY(mTextField), mTextValue.get()); -+ -+ gtk_entry_set_activates_default(GTK_ENTRY(mTextField), TRUE); -+ -+ gtk_box_pack_start(GTK_BOX(contentsVBox), mTextField, FALSE, FALSE, 0); -+ } -+ -+ // Add a checkbox -+ if ((widgetFlags & INCLUDE_CHECKBOX) && !mCheckMessage.IsEmpty()) { -+ mCheckBox = gtk_check_button_new_with_label(mCheckMessage.get()); -+ -+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mCheckBox), -+ mCheckValue); -+ gtk_label_set_line_wrap(GTK_LABEL(gtk_bin_get_child(GTK_BIN(mCheckBox))), -+ TRUE); -+ -+ gtk_box_pack_start(GTK_BOX(contentsVBox), mCheckBox, FALSE, FALSE, 0); -+ } -+ -+ // Add a dropdown menu -+ if (aType == TYPE_SELECT) { -+ // Build up a GtkComboBox containing the items -+ GtkWidget* mComboBox = gtk_combo_box_new_text(); -+ for (PRUint32 i = 0; i < mItemCount; ++i) { -+ gtk_combo_box_append_text(GTK_COMBO_BOX(mComboBox), mItemList[i].get()); -+ } -+ gtk_box_pack_start(GTK_BOX(contentsVBox), mComboBox, FALSE, FALSE, 0); -+ } -+ -+ if (aType == TYPE_UNIVERSAL) { -+ // Create buttons based on the flags passed in. -+ for (PRUint32 i = EMBED_MAX_BUTTONS; i-- > 0; ) { -+ if (!mButtonLabels[i].IsEmpty()) -+ gtk_dialog_add_button(GTK_DIALOG(mWindow), -+ mButtonLabels[i].get(), i); -+ } -+ gtk_dialog_set_default_response(GTK_DIALOG(mWindow), 0); -+ } else { -+ // Create standard ok and cancel buttons -+ if (widgetFlags & INCLUDE_CANCEL) -+ gtk_dialog_add_button(GTK_DIALOG(mWindow), GTK_STOCK_CANCEL, -+ GTK_RESPONSE_CANCEL); -+ -+ GtkWidget* okButton = gtk_dialog_add_button(GTK_DIALOG(mWindow), -+ GTK_STOCK_OK, -+ GTK_RESPONSE_ACCEPT); -+ gtk_widget_grab_default(okButton); -+ } -+ -+ // Pack the contentsVBox into the dialogHBox and the dialog. -+ gtk_box_pack_start(GTK_BOX(dialogHBox), contentsVBox, FALSE, FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mWindow)->vbox), dialogHBox, FALSE, -+ FALSE, 0); -+ -+ return NS_OK; -+} -+ -+void -+EmbedPrompter::SetTitle(const PRUnichar *aTitle) -+{ -+ mTitle.Assign(NS_ConvertUTF16toUTF8(aTitle)); -+} -+ -+void -+EmbedPrompter::SetTextValue(const PRUnichar *aTextValue) -+{ -+ mTextValue.Assign(NS_ConvertUTF16toUTF8(aTextValue)); -+} -+ -+void -+EmbedPrompter::SetCheckMessage(const PRUnichar *aMessage) -+{ -+ mCheckMessage.Assign(NS_ConvertUTF16toUTF8(aMessage)); -+} -+ -+void -+EmbedPrompter::SetMessageText(const PRUnichar *aMessageText) -+{ -+ mMessageText.Assign(NS_ConvertUTF16toUTF8(aMessageText)); -+} -+ -+void -+EmbedPrompter::SetUser(const PRUnichar *aUser) -+{ -+ mUser.Assign(NS_ConvertUTF16toUTF8(aUser)); -+} -+ -+void -+EmbedPrompter::SetPassword(const PRUnichar *aPass) -+{ -+ mPass.Assign(NS_ConvertUTF16toUTF8(aPass)); -+} -+ -+void -+EmbedPrompter::SetCheckValue(const PRBool aValue) -+{ -+ mCheckValue = aValue; -+} -+ -+void -+EmbedPrompter::SetItems(const PRUnichar** aItemArray, PRUint32 aCount) -+{ -+ if (mItemList) -+ delete[] mItemList; -+ -+ mItemCount = aCount; -+ mItemList = new nsCString[aCount]; -+ for (PRUint32 i = 0; i < aCount; ++i) -+ mItemList[i].Assign(NS_ConvertUTF16toUTF8(aItemArray[i])); -+} -+ -+void -+EmbedPrompter::SetButtons(const PRUnichar* aButton0Label, -+ const PRUnichar* aButton1Label, -+ const PRUnichar* aButton2Label) -+{ -+ mButtonLabels[0].Assign(NS_ConvertUTF16toUTF8(aButton0Label)); -+ mButtonLabels[1].Assign(NS_ConvertUTF16toUTF8(aButton1Label)); -+ mButtonLabels[2].Assign(NS_ConvertUTF16toUTF8(aButton2Label)); -+} -+ -+void -+EmbedPrompter::GetCheckValue(bool *aValue) -+{ -+ *aValue = (bool)mCheckValue; -+} -+ -+void -+EmbedPrompter::GetConfirmValue(bool *aConfirmValue) -+{ -+ *aConfirmValue = (bool)mConfirmResult; -+} -+ -+void -+EmbedPrompter::GetTextValue(PRUnichar **aTextValue) -+{ -+ *aTextValue = ToNewUnicode(NS_ConvertUTF8toUTF16(mTextValue)); -+} -+ -+void -+EmbedPrompter::GetUser(PRUnichar **aUser) -+{ -+ *aUser = ToNewUnicode(NS_ConvertUTF8toUTF16(mUser)); -+} -+ -+void -+EmbedPrompter::GetPassword(PRUnichar **aPass) -+{ -+ *aPass = ToNewUnicode(NS_ConvertUTF8toUTF16(mPass)); -+} -+ -+void -+EmbedPrompter::GetSelectedItem(PRInt32 *aIndex) -+{ -+ *aIndex = mSelectedItem; -+} -+ -+void -+EmbedPrompter::GetButtonPressed(PRInt32 *aButton) -+{ -+ *aButton = mButtonPressed; -+} -+ -+void -+EmbedPrompter::Run(void) -+{ -+ gtk_widget_show_all(mWindow); -+ gint response = gtk_dialog_run(GTK_DIALOG(mWindow)); -+ switch (response) { -+ case GTK_RESPONSE_NONE: -+ case GTK_RESPONSE_CANCEL: -+ case GTK_RESPONSE_DELETE_EVENT: -+ mConfirmResult = PR_FALSE; -+ break; -+ case GTK_RESPONSE_ACCEPT: -+ mConfirmResult = PR_TRUE; -+ SaveDialogValues(); -+ break; -+ default: -+ mButtonPressed = response; -+ SaveDialogValues(); -+ } -+ -+ gtk_widget_destroy(mWindow); -+} -+ -+void -+EmbedPrompter::SaveDialogValues() -+{ -+ if (mUserField) -+ mUser.Assign(gtk_entry_get_text(GTK_ENTRY(mUserField))); -+ -+ if (mPassField) -+ mPass.Assign(gtk_entry_get_text(GTK_ENTRY(mPassField))); -+ -+ if (mCheckBox) -+ mCheckValue = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mCheckBox)); -+ -+ if (mTextField) -+ mTextValue.Assign(gtk_entry_get_text(GTK_ENTRY(mTextField))); -+ -+ if (mComboBox) -+ { -+ gchar *str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(mComboBox)); -+ for (PRUint32 i = 0; i < mItemCount; ++i) { -+ if(mItemList[i].Equals(str)) -+ { -+ mSelectedItem = i; -+ break; -+ } -+ } -+ } -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2012-03-09 15:19:22.257678710 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2012-03-09 15:19:22.257678710 +0100 -@@ -0,0 +1,113 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=4: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * Brian Ryner -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsStringGlue.h" -+#include -+ -+#define EMBED_MAX_BUTTONS 3 -+ -+class EmbedPrompter { -+ -+public: -+ -+ EmbedPrompter(); -+ ~EmbedPrompter(); -+ -+ enum PromptType { -+ TYPE_ALERT, -+ TYPE_ALERT_CHECK, -+ TYPE_CONFIRM, -+ TYPE_CONFIRM_CHECK, -+ TYPE_PROMPT, -+ TYPE_PROMPT_USER_PASS, -+ TYPE_PROMPT_PASS, -+ TYPE_SELECT, -+ TYPE_UNIVERSAL -+ }; -+ -+ nsresult Create(PromptType aType, GtkWindow* aParentWindow); -+ void SetTitle(const PRUnichar *aTitle); -+ void SetTextValue (const PRUnichar *aTextValue); -+ void SetCheckMessage(const PRUnichar *aCheckMessage); -+ void SetCheckValue(const PRBool aValue); -+ void SetMessageText(const PRUnichar *aMessageText); -+ void SetUser(const PRUnichar *aUser); -+ void SetPassword(const PRUnichar *aPass); -+ void SetButtons(const PRUnichar* aButton0Label, -+ const PRUnichar* aButton1Label, -+ const PRUnichar* aButton2Label); -+ void SetItems(const PRUnichar **aItemArray, PRUint32 aCount); -+ -+ void GetCheckValue(bool *aValue); -+ void GetConfirmValue(bool *aConfirmValue); -+ void GetTextValue(PRUnichar **aTextValue); -+ void GetUser(PRUnichar **aUser); -+ void GetPassword(PRUnichar **aPass); -+ void GetButtonPressed(PRInt32 *aButton); -+ void GetSelectedItem(PRInt32 *aIndex); -+ -+ void Run(void); -+ -+private: -+ -+ void SaveDialogValues(); -+ -+ nsCString mTitle; -+ nsCString mMessageText; -+ nsCString mTextValue; -+ nsCString mCheckMessage; -+ PRBool mCheckValue; -+ nsCString mUser; -+ nsCString mPass; -+ nsCString mButtonLabels[EMBED_MAX_BUTTONS]; -+ nsCString *mItemList; -+ PRUint32 mItemCount; -+ -+ PRInt32 mButtonPressed; -+ PRBool mConfirmResult; -+ PRInt32 mSelectedItem; -+ -+ GtkWidget *mWindow; -+ GtkWidget *mUserField; -+ GtkWidget *mPassField; -+ GtkWidget *mTextField; -+ GtkWidget *mComboBox; -+ GtkWidget *mCheckBox; -+}; -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2012-03-09 15:19:22.258678715 +0100 -@@ -0,0 +1,474 @@ -+/* -+ * vim:ts=2:et:sw=2 -+ * -+ * ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsCWebBrowser.h" -+#include "nsIComponentManager.h" -+#include "nsComponentManagerUtils.h" -+#include "nsIDocShellTreeItem.h" -+#include "nsIWidget.h" -+ -+#include "EmbedWindow.h" -+#include "EmbedPrivate.h" -+#include "EmbedPrompter.h" -+ -+GtkWidget *EmbedWindow::sTipWindow = nsnull; -+ -+EmbedWindow::EmbedWindow(void) -+{ -+ mOwner = nsnull; -+ mVisibility = PR_FALSE; -+ mIsModal = PR_FALSE; -+} -+ -+EmbedWindow::~EmbedWindow(void) -+{ -+ ExitModalEventLoop(PR_FALSE); -+} -+ -+nsresult -+EmbedWindow::Init(EmbedPrivate *aOwner) -+{ -+ // save our owner for later -+ mOwner = aOwner; -+ -+ // create our nsIWebBrowser object and set up some basic defaults. -+ mWebBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID); -+ if (!mWebBrowser) -+ return NS_ERROR_FAILURE; -+ -+ mWebBrowser->SetContainerWindow(static_cast(this)); -+ -+ nsCOMPtr item = do_QueryInterface(mWebBrowser); -+ item->SetItemType(nsIDocShellTreeItem::typeContentWrapper); -+ -+ return NS_OK; -+} -+ -+nsresult -+EmbedWindow::CreateWindow(void) -+{ -+ nsresult rv; -+ GtkWidget *ownerAsWidget = GTK_WIDGET(mOwner->mOwningWidget); -+ -+ // Get the base window interface for the web browser object and -+ // create the window. -+ mBaseWindow = do_QueryInterface(mWebBrowser); -+ rv = mBaseWindow->InitWindow(GTK_WIDGET(mOwner->mOwningWidget), -+ nsnull, -+ 0, 0, -+ ownerAsWidget->allocation.width, -+ ownerAsWidget->allocation.height); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ rv = mBaseWindow->Create(); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ return NS_OK; -+} -+ -+void -+EmbedWindow::ReleaseChildren(void) -+{ -+ ExitModalEventLoop(PR_FALSE); -+ -+ mBaseWindow->Destroy(); -+ mBaseWindow = 0; -+ mWebBrowser = 0; -+} -+ -+// nsISupports -+ -+NS_IMPL_ADDREF(EmbedWindow) -+NS_IMPL_RELEASE(EmbedWindow) -+ -+NS_INTERFACE_MAP_BEGIN(EmbedWindow) -+ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWebBrowserChrome) -+ NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome) -+ NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChromeFocus) -+ NS_INTERFACE_MAP_ENTRY(nsIEmbeddingSiteWindow) -+ NS_INTERFACE_MAP_ENTRY(nsITooltipListener) -+ NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) -+NS_INTERFACE_MAP_END -+ -+// nsIWebBrowserChrome -+ -+NS_IMETHODIMP -+EmbedWindow::SetStatus(PRUint32 aStatusType, const PRUnichar *aStatus) -+{ -+ switch (aStatusType) { -+ case STATUS_SCRIPT: -+ { -+ mJSStatus = aStatus; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[JS_STATUS], 0); -+ } -+ break; -+ case STATUS_SCRIPT_DEFAULT: -+ // Gee, that's nice. -+ break; -+ case STATUS_LINK: -+ { -+ mLinkMessage = aStatus; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[LINK_MESSAGE], 0); -+ } -+ break; -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetWebBrowser(nsIWebBrowser **aWebBrowser) -+{ -+ *aWebBrowser = mWebBrowser; -+ NS_IF_ADDREF(*aWebBrowser); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetWebBrowser(nsIWebBrowser *aWebBrowser) -+{ -+ mWebBrowser = aWebBrowser; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetChromeFlags(PRUint32 *aChromeFlags) -+{ -+ *aChromeFlags = mOwner->mChromeMask; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetChromeFlags(PRUint32 aChromeFlags) -+{ -+ mOwner->SetChromeMask(aChromeFlags); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::DestroyBrowserWindow(void) -+{ -+ // mark the owner as destroyed so it won't emit events anymore. -+ mOwner->mIsDestroyed = PR_TRUE; -+ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DESTROY_BROWSER], 0); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) -+{ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[SIZE_TO], 0, aCX, aCY); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::ShowAsModal(void) -+{ -+ mIsModal = PR_TRUE; -+ GtkWidget *toplevel; -+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ gtk_grab_add(toplevel); -+ gtk_main(); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::IsWindowModal(bool *_retval) -+{ -+ *_retval = mIsModal; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::ExitModalEventLoop(nsresult aStatus) -+{ -+ if (mIsModal) { -+ GtkWidget *toplevel; -+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ gtk_grab_remove(toplevel); -+ mIsModal = PR_FALSE; -+ gtk_main_quit(); -+ } -+ return NS_OK; -+} -+ -+// nsIWebBrowserChromeFocus -+ -+NS_IMETHODIMP -+EmbedWindow::FocusNextElement() -+{ -+ GtkWidget *toplevel; -+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ if (!GTK_WIDGET_TOPLEVEL(toplevel)) -+ return NS_OK; -+ -+ g_signal_emit_by_name(G_OBJECT(toplevel), "move_focus", -+ GTK_DIR_TAB_FORWARD); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::FocusPrevElement() -+{ -+ GtkWidget *toplevel; -+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ if (!GTK_WIDGET_TOPLEVEL(toplevel)) -+ return NS_OK; -+ -+ g_signal_emit_by_name(G_OBJECT(toplevel), "move_focus", -+ GTK_DIR_TAB_BACKWARD); -+ return NS_OK; -+} -+ -+// nsIEmbeddingSiteWindow -+ -+NS_IMETHODIMP -+EmbedWindow::SetDimensions(PRUint32 aFlags, PRInt32 aX, PRInt32 aY, -+ PRInt32 aCX, PRInt32 aCY) -+{ -+ if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION && -+ (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER))) { -+ return mBaseWindow->SetPositionAndSize(aX, aY, aCX, aCY, PR_TRUE); -+ } -+ else if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION) { -+ return mBaseWindow->SetPosition(aX, aY); -+ } -+ else if (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER)) { -+ return mBaseWindow->SetSize(aCX, aCY, PR_TRUE); -+ } -+ return NS_ERROR_INVALID_ARG; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetDimensions(PRUint32 aFlags, PRInt32 *aX, -+ PRInt32 *aY, PRInt32 *aCX, PRInt32 *aCY) -+{ -+ if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION && -+ (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER))) { -+ return mBaseWindow->GetPositionAndSize(aX, aY, aCX, aCY); -+ } -+ else if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION) { -+ return mBaseWindow->GetPosition(aX, aY); -+ } -+ else if (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER)) { -+ return mBaseWindow->GetSize(aCX, aCY); -+ } -+ return NS_ERROR_INVALID_ARG; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetFocus(void) -+{ -+ // XXX might have to do more here. -+ return mBaseWindow->SetFocus(); -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetTitle(PRUnichar **aTitle) -+{ -+ *aTitle = ToNewUnicode(mTitle); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetTitle(const PRUnichar *aTitle) -+{ -+ mTitle = aTitle; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[TITLE], 0); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetSiteWindow(void **aSiteWindow) -+{ -+ GtkWidget *ownerAsWidget (GTK_WIDGET(mOwner->mOwningWidget)); -+ *aSiteWindow = static_cast(ownerAsWidget); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetVisibility(bool *aVisibility) -+{ -+ // XXX See bug 312998 -+ // Work around the problem that sometimes the window -+ // is already visible even though mVisibility isn't true -+ // yet. -+ *aVisibility = mVisibility || -+ (!mOwner->mIsChrome && -+ mOwner->mOwningWidget && -+ GTK_WIDGET_MAPPED(mOwner->mOwningWidget)); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetVisibility(bool aVisibility) -+{ -+ // We always set the visibility so that if it's chrome and we finish -+ // the load we know that we have to show the window. -+ mVisibility = aVisibility; -+ -+ // if this is a chrome window and the chrome hasn't finished loading -+ // yet then don't show the window yet. -+ if (mOwner->mIsChrome && !mOwner->mChromeLoaded) -+ return NS_OK; -+ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[VISIBILITY], 0, -+ aVisibility); -+ return NS_OK; -+} -+ -+// nsITooltipListener -+ -+static gint -+tooltips_paint_window(GtkWidget *window) -+{ -+ // draw tooltip style border around the text -+ gtk_paint_flat_box(window->style, window->window, -+ GTK_STATE_NORMAL, GTK_SHADOW_OUT, -+ NULL, window, "tooltip", -+ 0, 0, -+ window->allocation.width, window->allocation.height); -+ -+ return FALSE; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, -+ const PRUnichar *aTipText) -+{ -+ nsAutoString tipText ( aTipText ); -+ -+ const char* tipString = ToNewUTF8String(tipText); -+ -+ if (sTipWindow) -+ gtk_widget_destroy(sTipWindow); -+ -+ // get the root origin for this content window -+ nsCOMPtr mainWidget; -+ mBaseWindow->GetMainWidget(getter_AddRefs(mainWidget)); -+ GdkWindow *window; -+ window = static_cast(mainWidget->GetNativeData(NS_NATIVE_WINDOW)); -+ gint root_x, root_y; -+ gdk_window_get_origin(window, &root_x, &root_y); -+ -+ // XXX work around until I can get pink to figure out why -+ // tooltips vanish if they show up right at the origin of the -+ // cursor. -+ root_y += 10; -+ -+ sTipWindow = gtk_window_new(GTK_WINDOW_POPUP); -+ gtk_widget_set_app_paintable(sTipWindow, TRUE); -+ gtk_window_set_resizable(GTK_WINDOW(sTipWindow), TRUE); -+ // needed to get colors + fonts etc correctly -+ gtk_widget_set_name(sTipWindow, "gtk-tooltips"); -+ gtk_window_set_type_hint(GTK_WINDOW(sTipWindow), GDK_WINDOW_TYPE_HINT_TOOLTIP); -+ -+ // set up the popup window as a transient of the widget. -+ GtkWidget *toplevel_window; -+ toplevel_window = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ if (!GTK_WINDOW(toplevel_window)) { -+ NS_ERROR("no gtk window in hierarchy!"); -+ return NS_ERROR_FAILURE; -+ } -+ gtk_window_set_transient_for(GTK_WINDOW(sTipWindow), -+ GTK_WINDOW(toplevel_window)); -+ -+ // realize the widget -+ gtk_widget_realize(sTipWindow); -+ -+ g_signal_connect(G_OBJECT(sTipWindow), "expose_event", -+ G_CALLBACK(tooltips_paint_window), NULL); -+ -+ // set up the label for the tooltip -+ GtkWidget *label = gtk_label_new(tipString); -+ // wrap automatically -+ gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); -+ gtk_container_add(GTK_CONTAINER(sTipWindow), label); -+ gtk_container_set_border_width(GTK_CONTAINER(sTipWindow), 4); -+ // set the coords for the widget -+ gtk_widget_set_uposition(sTipWindow, aXCoords + root_x, -+ aYCoords + root_y); -+ -+ // and show it. -+ gtk_widget_show_all(sTipWindow); -+ -+ NS_Free( (void*)tipString ); -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::OnHideTooltip(void) -+{ -+ if (sTipWindow) -+ gtk_widget_destroy(sTipWindow); -+ sTipWindow = NULL; -+ return NS_OK; -+} -+ -+// nsIInterfaceRequestor -+ -+NS_IMETHODIMP -+EmbedWindow::GetInterface(const nsIID &aIID, void** aInstancePtr) -+{ -+ nsresult rv; -+ -+ rv = QueryInterface(aIID, aInstancePtr); -+ -+ // pass it up to the web browser object -+ if (NS_FAILED(rv) || !*aInstancePtr) { -+ nsCOMPtr ir = do_QueryInterface(mWebBrowser); -+ return ir->GetInterface(aIID, aInstancePtr); -+ } -+ -+ return rv; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2012-03-09 15:19:22.258678715 +0100 -@@ -0,0 +1,106 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. Portions created by Christopher Blizzard are Copyright (C) Christopher Blizzard. All Rights Reserved. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "EmbedWindowCreator.h" -+#include "EmbedPrivate.h" -+#include "EmbedWindow.h" -+ -+// in order to create orphaned windows -+#include "gtkmozembedprivate.h" -+ -+EmbedWindowCreator::EmbedWindowCreator(void) -+{ -+} -+ -+EmbedWindowCreator::~EmbedWindowCreator() -+{ -+} -+ -+NS_IMPL_ISUPPORTS1(EmbedWindowCreator, nsIWindowCreator) -+ -+NS_IMETHODIMP -+EmbedWindowCreator::CreateChromeWindow(nsIWebBrowserChrome *aParent, -+ PRUint32 aChromeFlags, -+ nsIWebBrowserChrome **_retval) -+{ -+ NS_ENSURE_ARG_POINTER(_retval); -+ -+ GtkMozEmbed *newEmbed = nsnull; -+ -+ // No parent? Ask via the singleton object instead. -+ if (!aParent) { -+ gtk_moz_embed_single_create_window(&newEmbed, -+ (guint)aChromeFlags); -+ } -+ else { -+ // Find the EmbedPrivate object for this web browser chrome object. -+ EmbedPrivate *embedPrivate = EmbedPrivate::FindPrivateForBrowser(aParent); -+ -+ if (!embedPrivate) -+ return NS_ERROR_FAILURE; -+ -+ g_signal_emit(G_OBJECT(embedPrivate->mOwningWidget), -+ moz_embed_signals[NEW_WINDOW], 0, -+ &newEmbed, (guint)aChromeFlags); -+ -+ } -+ -+ // check to make sure that we made a new window -+ if (!newEmbed) -+ return NS_ERROR_FAILURE; -+ -+ // The window _must_ be realized before we pass it back to the -+ // function that created it. Functions that create new windows -+ // will do things like GetDocShell() and the widget has to be -+ // realized before that can happen. -+ gtk_widget_realize(GTK_WIDGET(newEmbed)); -+ -+ EmbedPrivate *newEmbedPrivate = static_cast(newEmbed->data); -+ -+ // set the chrome flag on the new window if it's a chrome open -+ if (aChromeFlags & nsIWebBrowserChrome::CHROME_OPENAS_CHROME) -+ newEmbedPrivate->mIsChrome = PR_TRUE; -+ -+ *_retval = static_cast(newEmbedPrivate->mWindow); -+ -+ if (*_retval) { -+ NS_ADDREF(*_retval); -+ return NS_OK; -+ } -+ -+ return NS_ERROR_FAILURE; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2012-03-09 15:19:22.258678715 +0100 -@@ -0,0 +1,54 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef __EmbedWindowCreator_h -+#define __EmbedWindowCreator_h -+ -+#include -+ -+class EmbedWindowCreator : public nsIWindowCreator -+{ -+ public: -+ EmbedWindowCreator(); -+ virtual ~EmbedWindowCreator(); -+ -+ NS_DECL_ISUPPORTS -+ NS_DECL_NSIWINDOWCREATOR -+ -+}; -+ -+#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2012-03-09 15:19:22.259678720 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2012-03-09 15:19:22.259678720 +0100 -@@ -0,0 +1,101 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef __EmbedWindow_h -+#define __EmbedWindow_h -+ -+#include "nsIWebBrowserChrome.h" -+#include "nsIWebBrowserChromeFocus.h" -+#include "nsIEmbeddingSiteWindow.h" -+#include "nsITooltipListener.h" -+#include "nsISupports.h" -+#include "nsIWebBrowser.h" -+#include "nsIBaseWindow.h" -+#include "nsIInterfaceRequestor.h" -+#include "nsCOMPtr.h" -+#include "nsStringGlue.h" -+ -+#include -+ -+class EmbedPrivate; -+ -+class EmbedWindow : public nsIWebBrowserChrome, -+ public nsIWebBrowserChromeFocus, -+ public nsIEmbeddingSiteWindow, -+ public nsITooltipListener, -+ public nsIInterfaceRequestor -+{ -+ -+ public: -+ -+ EmbedWindow(); -+ virtual ~EmbedWindow(); -+ -+ nsresult Init (EmbedPrivate *aOwner); -+ nsresult CreateWindow (void); -+ void ReleaseChildren (void); -+ -+ NS_DECL_ISUPPORTS -+ -+ NS_DECL_NSIWEBBROWSERCHROME -+ -+ NS_DECL_NSIWEBBROWSERCHROMEFOCUS -+ -+ NS_DECL_NSIEMBEDDINGSITEWINDOW -+ -+ NS_DECL_NSITOOLTIPLISTENER -+ -+ NS_DECL_NSIINTERFACEREQUESTOR -+ -+ nsString mTitle; -+ nsString mJSStatus; -+ nsString mLinkMessage; -+ -+ nsCOMPtr mBaseWindow; // [OWNER] -+ -+private: -+ -+ EmbedPrivate *mOwner; -+ nsCOMPtr mWebBrowser; // [OWNER] -+ static GtkWidget *sTipWindow; -+ PRBool mVisibility; -+ PRBool mIsModal; -+ -+}; -+ -+ -+#endif /* __EmbedWindow_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2012-03-09 15:19:22.260678725 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2012-03-09 15:19:22.260678725 +0100 -@@ -0,0 +1,1132 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. Portions created by Christopher Blizzard are Copyright (C) Christopher Blizzard. All Rights Reserved. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * Ramiro Estrugo -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include -+ -+#include "gtkmozembed.h" -+#include "gtkmozembedprivate.h" -+#include "gtkmozembed_internal.h" -+ -+#include "EmbedPrivate.h" -+#include "EmbedWindow.h" -+ -+// so we can do our get_nsIWebBrowser later... -+#include "nsIWebBrowser.h" -+ -+#include "gtkmozembedmarshal.h" -+ -+#define NEW_TOOLKIT_STRING(x) g_strdup(NS_ConvertUTF16toUTF8(x).get()) -+#define GET_OBJECT_CLASS_TYPE(x) G_OBJECT_CLASS_TYPE(x) -+ -+class nsIDirectoryServiceProvider; -+ -+// class and instance initialization -+ -+static void -+gtk_moz_embed_class_init(GtkMozEmbedClass *klass); -+ -+static void -+gtk_moz_embed_init(GtkMozEmbed *embed); -+ -+// GtkObject methods -+ -+static void -+gtk_moz_embed_destroy(GtkObject *object); -+ -+// GtkWidget methods -+ -+static void -+gtk_moz_embed_realize(GtkWidget *widget); -+ -+static void -+gtk_moz_embed_unrealize(GtkWidget *widget); -+ -+static void -+gtk_moz_embed_size_allocate(GtkWidget *widget, GtkAllocation *allocation); -+ -+static void -+gtk_moz_embed_map(GtkWidget *widget); -+ -+static void -+gtk_moz_embed_unmap(GtkWidget *widget); -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+static AtkObject* gtk_moz_embed_get_accessible (GtkWidget *widget); -+#endif -+ -+static gint -+handle_child_focus_in(GtkWidget *aWidget, -+ GdkEventFocus *aGdkFocusEvent, -+ GtkMozEmbed *aEmbed); -+ -+static gint -+handle_child_focus_out(GtkWidget *aWidget, -+ GdkEventFocus *aGdkFocusEvent, -+ GtkMozEmbed *aEmbed); -+ -+// globals for this type of widget -+ -+static GtkBinClass *embed_parent_class; -+ -+guint moz_embed_signals[EMBED_LAST_SIGNAL] = { 0 }; -+ -+// GtkObject + class-related functions -+ -+GType -+gtk_moz_embed_get_type(void) -+{ -+ static GType moz_embed_type = 0; -+ if (moz_embed_type == 0) -+ { -+ const GTypeInfo our_info = -+ { -+ sizeof(GtkMozEmbedClass), -+ NULL, /* base_init */ -+ NULL, /* base_finalize */ -+ (GClassInitFunc)gtk_moz_embed_class_init, -+ NULL, -+ NULL, /* class_data */ -+ sizeof(GtkMozEmbed), -+ 0, /* n_preallocs */ -+ (GInstanceInitFunc)gtk_moz_embed_init, -+ }; -+ -+ moz_embed_type = g_type_register_static(GTK_TYPE_BIN, -+ "GtkMozEmbed", -+ &our_info, -+ (GTypeFlags)0); -+ } -+ -+ return moz_embed_type; -+} -+ -+static void -+gtk_moz_embed_class_init(GtkMozEmbedClass *klass) -+{ -+ GtkContainerClass *container_class; -+ GtkWidgetClass *widget_class; -+ GtkObjectClass *object_class; -+ -+ container_class = GTK_CONTAINER_CLASS(klass); -+ widget_class = GTK_WIDGET_CLASS(klass); -+ object_class = GTK_OBJECT_CLASS(klass); -+ -+ embed_parent_class = (GtkBinClass *)g_type_class_peek(gtk_bin_get_type()); -+ -+ widget_class->realize = gtk_moz_embed_realize; -+ widget_class->unrealize = gtk_moz_embed_unrealize; -+ widget_class->size_allocate = gtk_moz_embed_size_allocate; -+ widget_class->map = gtk_moz_embed_map; -+ widget_class->unmap = gtk_moz_embed_unmap; -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+ widget_class->get_accessible = gtk_moz_embed_get_accessible; -+#endif -+ -+ object_class->destroy = gtk_moz_embed_destroy; -+ -+ // set up our signals -+ -+ moz_embed_signals[LINK_MESSAGE] = -+ g_signal_new("link_message", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, link_message), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[JS_STATUS] = -+ g_signal_new("js_status", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, js_status), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[LOCATION] = -+ g_signal_new("location", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, location), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[TITLE] = -+ g_signal_new("title", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, title), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[PROGRESS] = -+ g_signal_new("progress", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, progress), -+ NULL, NULL, -+ gtkmozembed_VOID__INT_INT, -+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); -+ moz_embed_signals[PROGRESS_ALL] = -+ g_signal_new("progress_all", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, progress_all), -+ NULL, NULL, -+ gtkmozembed_VOID__STRING_INT_INT, -+ G_TYPE_NONE, 3, -+ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE, -+ G_TYPE_INT, G_TYPE_INT); -+ moz_embed_signals[NET_STATE] = -+ g_signal_new("net_state", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, net_state), -+ NULL, NULL, -+ gtkmozembed_VOID__INT_UINT, -+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT); -+ moz_embed_signals[NET_STATE_ALL] = -+ g_signal_new("net_state_all", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, net_state_all), -+ NULL, NULL, -+ gtkmozembed_VOID__STRING_INT_UINT, -+ G_TYPE_NONE, 3, -+ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE, -+ G_TYPE_INT, G_TYPE_UINT); -+ moz_embed_signals[NET_START] = -+ g_signal_new("net_start", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, net_start), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[NET_STOP] = -+ g_signal_new("net_stop", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, net_stop), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[NEW_WINDOW] = -+ g_signal_new("new_window", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, new_window), -+ NULL, NULL, -+ gtkmozembed_VOID__POINTER_UINT, -+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); -+ moz_embed_signals[VISIBILITY] = -+ g_signal_new("visibility", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, visibility), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__BOOLEAN, -+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN); -+ moz_embed_signals[DESTROY_BROWSER] = -+ g_signal_new("destroy_browser", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, destroy_brsr), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[OPEN_URI] = -+ g_signal_new("open_uri", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, open_uri), -+ NULL, NULL, -+ gtkmozembed_BOOL__STRING, -+ G_TYPE_BOOLEAN, 1, G_TYPE_STRING | -+ G_SIGNAL_TYPE_STATIC_SCOPE); -+ moz_embed_signals[SIZE_TO] = -+ g_signal_new("size_to", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, size_to), -+ NULL, NULL, -+ gtkmozembed_VOID__INT_INT, -+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); -+ moz_embed_signals[DOM_KEY_DOWN] = -+ g_signal_new("dom_key_down", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_down), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_KEY_PRESS] = -+ g_signal_new("dom_key_press", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_press), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_KEY_UP] = -+ g_signal_new("dom_key_up", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_up), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_DOWN] = -+ g_signal_new("dom_mouse_down", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_down), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_UP] = -+ g_signal_new("dom_mouse_up", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_up), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_CLICK] = -+ g_signal_new("dom_mouse_click", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_click), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_DBL_CLICK] = -+ g_signal_new("dom_mouse_dbl_click", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_dbl_click), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_OVER] = -+ g_signal_new("dom_mouse_over", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_over), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_OUT] = -+ g_signal_new("dom_mouse_out", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_out), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[SECURITY_CHANGE] = -+ g_signal_new("security_change", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, security_change), -+ NULL, NULL, -+ gtkmozembed_VOID__POINTER_UINT, -+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); -+ moz_embed_signals[STATUS_CHANGE] = -+ g_signal_new("status_change", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, status_change), -+ NULL, NULL, -+ gtkmozembed_VOID__POINTER_INT_POINTER, -+ G_TYPE_NONE, 3, -+ G_TYPE_POINTER, G_TYPE_INT, G_TYPE_POINTER); -+ moz_embed_signals[DOM_ACTIVATE] = -+ g_signal_new("dom_activate", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_activate), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_FOCUS_IN] = -+ g_signal_new("dom_focus_in", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_focus_in), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_FOCUS_OUT] = -+ g_signal_new("dom_focus_out", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_focus_out), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+} -+ -+static void -+gtk_moz_embed_init(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *priv = new EmbedPrivate(); -+ embed->data = priv; -+ gtk_widget_set_name(GTK_WIDGET(embed), "gtkmozembed"); -+ -+ GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(embed), GTK_NO_WINDOW); -+} -+ -+GtkWidget * -+gtk_moz_embed_new(void) -+{ -+ return GTK_WIDGET(g_object_new(GTK_TYPE_MOZ_EMBED, NULL)); -+} -+ -+// GtkObject methods -+ -+static void -+gtk_moz_embed_destroy(GtkObject *object) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(object != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(object)); -+ -+ embed = GTK_MOZ_EMBED(object); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate) { -+ -+ // Destroy the widget only if it's been Init()ed. -+ if(embedPrivate->mMozWindowWidget != 0) { -+ embedPrivate->Destroy(); -+ } -+ -+ delete embedPrivate; -+ embed->data = NULL; -+ } -+} -+ -+// GtkWidget methods -+ -+static void -+gtk_moz_embed_realize(GtkWidget *widget) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ GdkWindowAttr attributes; -+ gint attributes_mask; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); -+ -+ attributes.window_type = GDK_WINDOW_CHILD; -+ attributes.x = widget->allocation.x; -+ attributes.y = widget->allocation.y; -+ attributes.width = widget->allocation.width; -+ attributes.height = widget->allocation.height; -+ attributes.wclass = GDK_INPUT_OUTPUT; -+ attributes.visual = gtk_widget_get_visual (widget); -+ attributes.colormap = gtk_widget_get_colormap (widget); -+ attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; -+ -+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; -+ -+ widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), -+ &attributes, attributes_mask); -+ gdk_window_set_user_data (widget->window, embed); -+ -+ widget->style = gtk_style_attach (widget->style, widget->window); -+ gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); -+ -+ // initialize the window -+ nsresult rv; -+ rv = embedPrivate->Init(embed); -+ g_return_if_fail(NS_SUCCEEDED(rv)); -+ -+ PRBool alreadyRealized = PR_FALSE; -+ rv = embedPrivate->Realize(&alreadyRealized); -+ g_return_if_fail(NS_SUCCEEDED(rv)); -+ -+ // if we're already realized we don't need to hook up to anything below -+ if (alreadyRealized) -+ return; -+ -+ if (embedPrivate->mURI.Length()) -+ embedPrivate->LoadCurrentURI(); -+ -+ // connect to the focus out event for the child -+ GtkWidget *child_widget = GTK_BIN(widget)->child; -+ g_signal_connect_object(G_OBJECT(child_widget), -+ "focus_out_event", -+ G_CALLBACK(handle_child_focus_out), -+ embed, -+ G_CONNECT_AFTER); -+ g_signal_connect_object(G_OBJECT(child_widget), -+ "focus_in_event", -+ G_CALLBACK(handle_child_focus_in), -+ embed, -+ G_CONNECT_AFTER); -+} -+ -+static void -+gtk_moz_embed_unrealize(GtkWidget *widget) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate) { -+ embedPrivate->Unrealize(); -+ } -+ -+ if (GTK_WIDGET_CLASS(embed_parent_class)->unrealize) -+ (* GTK_WIDGET_CLASS(embed_parent_class)->unrealize)(widget); -+} -+ -+static void -+gtk_moz_embed_size_allocate(GtkWidget *widget, GtkAllocation *allocation) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ widget->allocation = *allocation; -+ -+ if (GTK_WIDGET_REALIZED(widget)) -+ { -+ gdk_window_move_resize(widget->window, -+ allocation->x, allocation->y, -+ allocation->width, allocation->height); -+ embedPrivate->Resize(allocation->width, allocation->height); -+ } -+} -+ -+static void -+gtk_moz_embed_map(GtkWidget *widget) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED); -+ -+ embedPrivate->Show(); -+ -+ gdk_window_show(widget->window); -+ -+} -+ -+static void -+gtk_moz_embed_unmap(GtkWidget *widget) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED); -+ -+ gdk_window_hide(widget->window); -+ -+ embedPrivate->Hide(); -+} -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+static AtkObject* -+gtk_moz_embed_get_accessible (GtkWidget *widget) -+{ -+ g_return_val_if_fail(widget != NULL, NULL); -+ g_return_val_if_fail(GTK_IS_MOZ_EMBED(widget), NULL); -+ -+ GtkMozEmbed *embed = GTK_MOZ_EMBED(widget);; -+ EmbedPrivate *embedPrivate = (EmbedPrivate *)embed->data; -+ return static_cast( -+ embedPrivate->GetAtkObjectForCurrentDocument()); -+} -+#endif /* MOZ_ACCESSIBILITY_ATK */ -+ -+static gint -+handle_child_focus_in(GtkWidget *aWidget, -+ GdkEventFocus *aGdkFocusEvent, -+ GtkMozEmbed *aEmbed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ embedPrivate = (EmbedPrivate *)aEmbed->data; -+ -+ embedPrivate->ChildFocusIn(); -+ -+ return FALSE; -+} -+ -+static gint -+handle_child_focus_out(GtkWidget *aWidget, -+ GdkEventFocus *aGdkFocusEvent, -+ GtkMozEmbed *aEmbed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ embedPrivate = (EmbedPrivate *)aEmbed->data; -+ -+ embedPrivate->ChildFocusOut(); -+ -+ return FALSE; -+} -+ -+// Widget methods -+ -+void -+gtk_moz_embed_push_startup(void) -+{ -+ EmbedPrivate::PushStartup(); -+} -+ -+void -+gtk_moz_embed_pop_startup(void) -+{ -+ EmbedPrivate::PopStartup(); -+} -+ -+void -+gtk_moz_embed_set_path(const char *aPath) -+{ -+ EmbedPrivate::SetPath(aPath); -+} -+ -+void -+gtk_moz_embed_set_comp_path(const char *aPath) -+{ -+ EmbedPrivate::SetCompPath(aPath); -+} -+ -+void -+gtk_moz_embed_set_profile_path(const char *aDir, const char *aName) -+{ -+ EmbedPrivate::SetProfilePath(aDir, aName); -+} -+ -+void -+gtk_moz_embed_set_directory_service_provider(nsIDirectoryServiceProvider *appFileLocProvider) { -+ EmbedPrivate::SetDirectoryServiceProvider(appFileLocProvider); -+} -+ -+void -+gtk_moz_embed_load_url(GtkMozEmbed *embed, const char *url) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(embed != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ embedPrivate->SetURI(url); -+ -+ // If the widget is realized, load the URI. If it isn't then we -+ // will load it later. -+ if (GTK_WIDGET_REALIZED(embed)) -+ embedPrivate->LoadCurrentURI(); -+} -+ -+void -+gtk_moz_embed_stop_load(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(embed != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->Stop(nsIWebNavigation::STOP_ALL); -+} -+ -+gboolean -+gtk_moz_embed_can_go_back(GtkMozEmbed *embed) -+{ -+ bool retval = PR_FALSE; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), FALSE); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), FALSE); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->GetCanGoBack(&retval); -+ return retval; -+} -+ -+gboolean -+gtk_moz_embed_can_go_forward(GtkMozEmbed *embed) -+{ -+ bool retval = PR_FALSE; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), FALSE); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), FALSE); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->GetCanGoForward(&retval); -+ return retval; -+} -+ -+void -+gtk_moz_embed_go_back(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->GoBack(); -+} -+ -+void -+gtk_moz_embed_go_forward(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->GoForward(); -+} -+ -+void -+gtk_moz_embed_render_data(GtkMozEmbed *embed, const char *data, -+ guint32 len, const char *base_uri, -+ const char *mime_type) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ embedPrivate->OpenStream(base_uri, mime_type); -+ embedPrivate->AppendToStream((const PRUint8*)data, len); -+ embedPrivate->CloseStream(); -+} -+ -+void -+gtk_moz_embed_open_stream(GtkMozEmbed *embed, const char *base_uri, -+ const char *mime_type) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ embedPrivate->OpenStream(base_uri, mime_type); -+} -+ -+void gtk_moz_embed_append_data(GtkMozEmbed *embed, const char *data, -+ guint32 len) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ embedPrivate->AppendToStream((const PRUint8*)data, len); -+} -+ -+void -+gtk_moz_embed_close_stream(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ embedPrivate->CloseStream(); -+} -+ -+char * -+gtk_moz_embed_get_link_message(GtkMozEmbed *embed) -+{ -+ char *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (char *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mLinkMessage); -+ -+ return retval; -+} -+ -+char * -+gtk_moz_embed_get_js_status(GtkMozEmbed *embed) -+{ -+ char *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (char *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mJSStatus); -+ -+ return retval; -+} -+ -+char * -+gtk_moz_embed_get_title(GtkMozEmbed *embed) -+{ -+ char *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (char *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mTitle); -+ -+ return retval; -+} -+ -+char * -+gtk_moz_embed_get_location(GtkMozEmbed *embed) -+{ -+ char *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (char *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (!embedPrivate->mURI.IsEmpty()) -+ retval = g_strdup(embedPrivate->mURI.get()); -+ -+ return retval; -+} -+ -+void -+gtk_moz_embed_reload(GtkMozEmbed *embed, gint32 flags) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ PRUint32 reloadFlags = 0; -+ -+ // map the external API to the internal web navigation API. -+ switch (flags) { -+ case GTK_MOZ_EMBED_FLAG_RELOADNORMAL: -+ reloadFlags = 0; -+ break; -+ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE: -+ reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE; -+ break; -+ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXY: -+ reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY; -+ break; -+ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXYANDCACHE: -+ reloadFlags = (nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY | -+ nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE); -+ break; -+ case GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE: -+ reloadFlags = nsIWebNavigation::LOAD_FLAGS_CHARSET_CHANGE; -+ break; -+ default: -+ reloadFlags = 0; -+ break; -+ } -+ -+ embedPrivate->Reload(reloadFlags); -+} -+ -+void -+gtk_moz_embed_set_chrome_mask(GtkMozEmbed *embed, guint32 flags) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ embedPrivate->SetChromeMask(flags); -+} -+ -+guint32 -+gtk_moz_embed_get_chrome_mask(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), 0); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), 0); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ return embedPrivate->mChromeMask; -+} -+ -+void -+gtk_moz_embed_get_nsIWebBrowser (GtkMozEmbed *embed, nsIWebBrowser **retval) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ embedPrivate->mWindow->GetWebBrowser(retval); -+} -+ -+PRUnichar * -+gtk_moz_embed_get_title_unichar (GtkMozEmbed *embed) -+{ -+ PRUnichar *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = ToNewUnicode(embedPrivate->mWindow->mTitle); -+ -+ return retval; -+} -+ -+PRUnichar * -+gtk_moz_embed_get_js_status_unichar (GtkMozEmbed *embed) -+{ -+ PRUnichar *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = ToNewUnicode(embedPrivate->mWindow->mJSStatus); -+ -+ return retval; -+} -+ -+PRUnichar * -+gtk_moz_embed_get_link_message_unichar (GtkMozEmbed *embed) -+{ -+ PRUnichar *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = ToNewUnicode(embedPrivate->mWindow->mLinkMessage); -+ -+ return retval; -+} -+ -+// class and instance initialization -+ -+static void -+gtk_moz_embed_single_class_init(GtkMozEmbedSingleClass *klass); -+ -+static void -+gtk_moz_embed_single_init(GtkMozEmbedSingle *embed); -+ -+GtkMozEmbedSingle * -+gtk_moz_embed_single_new(void); -+ -+enum { -+ NEW_WINDOW_ORPHAN, -+ SINGLE_LAST_SIGNAL -+}; -+ -+guint moz_embed_single_signals[SINGLE_LAST_SIGNAL] = { 0 }; -+ -+// GtkObject + class-related functions -+ -+GType -+gtk_moz_embed_single_get_type(void) -+{ -+ static GType moz_embed_single_type = 0; -+ if (moz_embed_single_type == 0) -+ { -+ const GTypeInfo our_info = -+ { -+ sizeof(GtkMozEmbedClass), -+ NULL, /* base_init */ -+ NULL, /* base_finalize */ -+ (GClassInitFunc)gtk_moz_embed_single_class_init, -+ NULL, -+ NULL, /* class_data */ -+ sizeof(GtkMozEmbed), -+ 0, /* n_preallocs */ -+ (GInstanceInitFunc)gtk_moz_embed_single_init, -+ }; -+ -+ moz_embed_single_type = g_type_register_static(GTK_TYPE_OBJECT, -+ "GtkMozEmbedSingle", -+ &our_info, -+ (GTypeFlags)0); -+ } -+ -+ return moz_embed_single_type; -+} -+ -+static void -+gtk_moz_embed_single_class_init(GtkMozEmbedSingleClass *klass) -+{ -+ GtkObjectClass *object_class; -+ -+ object_class = GTK_OBJECT_CLASS(klass); -+ -+ // set up our signals -+ -+ moz_embed_single_signals[NEW_WINDOW_ORPHAN] = -+ g_signal_new("new_window_orphan", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedSingleClass, new_window_orphan), -+ NULL, NULL, -+ gtkmozembed_VOID__POINTER_UINT, -+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); -+ -+} -+ -+static void -+gtk_moz_embed_single_init(GtkMozEmbedSingle *embed) -+{ -+ // this is a placeholder for later in case we need to stash data at -+ // a later data and maintain backwards compatibility. -+ embed->data = nsnull; -+} -+ -+GtkMozEmbedSingle * -+gtk_moz_embed_single_new(void) -+{ -+ return (GtkMozEmbedSingle *)g_object_new(GTK_TYPE_MOZ_EMBED_SINGLE, NULL); -+} -+ -+GtkMozEmbedSingle * -+gtk_moz_embed_single_get(void) -+{ -+ static GtkMozEmbedSingle *singleton_object = nsnull; -+ if (!singleton_object) -+ { -+ singleton_object = gtk_moz_embed_single_new(); -+ } -+ -+ return singleton_object; -+} -+ -+// our callback from the window creator service -+void -+gtk_moz_embed_single_create_window(GtkMozEmbed **aNewEmbed, -+ guint aChromeFlags) -+{ -+ GtkMozEmbedSingle *single = gtk_moz_embed_single_get(); -+ -+ *aNewEmbed = nsnull; -+ -+ if (!single) -+ return; -+ -+ g_signal_emit(G_OBJECT(single), -+ moz_embed_single_signals[NEW_WINDOW_ORPHAN], 0, -+ aNewEmbed, aChromeFlags); -+ -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2012-03-09 15:19:22.261678730 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2012-03-09 15:19:22.261678730 +0100 -@@ -0,0 +1,116 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is Mozilla embedding. -+ * -+ * The Initial Developer of the Original Code is -+ * Benjamin Smedberg . -+ * -+ * Portions created by the Initial Developer are Copyright (C) 2005 -+ * the Mozilla Foundation . All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+// This file is an implementation file, meant to be #included in a -+// single C++ file of an embedding application. It is called after -+// XPCOMGlueStartup to glue the gtkmozembed functions. -+ -+#include "gtkmozembed.h" -+#include "gtkmozembed_internal.h" -+#include "nsXPCOMGlue.h" -+ -+#ifndef XPCOM_GLUE -+#error This file only makes sense when XPCOM_GLUE is defined. -+#endif -+ -+#define GTKMOZEMBED_FUNCTIONS \ -+ GTKF(gtk_moz_embed_get_type) \ -+ GTKF(gtk_moz_embed_new) \ -+ GTKF(gtk_moz_embed_push_startup) \ -+ GTKF(gtk_moz_embed_pop_startup) \ -+ GTKF(gtk_moz_embed_set_path) \ -+ GTKF(gtk_moz_embed_set_comp_path) \ -+ GTKF(gtk_moz_embed_set_profile_path) \ -+ GTKF(gtk_moz_embed_load_url) \ -+ GTKF(gtk_moz_embed_stop_load) \ -+ GTKF(gtk_moz_embed_can_go_back) \ -+ GTKF(gtk_moz_embed_can_go_forward) \ -+ GTKF(gtk_moz_embed_go_back) \ -+ GTKF(gtk_moz_embed_go_forward) \ -+ GTKF(gtk_moz_embed_render_data) \ -+ GTKF(gtk_moz_embed_open_stream) \ -+ GTKF(gtk_moz_embed_append_data) \ -+ GTKF(gtk_moz_embed_close_stream) \ -+ GTKF(gtk_moz_embed_get_link_message) \ -+ GTKF(gtk_moz_embed_get_js_status) \ -+ GTKF(gtk_moz_embed_get_title) \ -+ GTKF(gtk_moz_embed_get_location) \ -+ GTKF(gtk_moz_embed_reload) \ -+ GTKF(gtk_moz_embed_set_chrome_mask) \ -+ GTKF(gtk_moz_embed_get_chrome_mask) \ -+ GTKF(gtk_moz_embed_single_get_type) \ -+ GTKF(gtk_moz_embed_single_get) -+ -+#define GTKMOZEMBED_FUNCTIONS_INTERNAL \ -+ GTKF(gtk_moz_embed_get_nsIWebBrowser) \ -+ GTKF(gtk_moz_embed_get_title_unichar) \ -+ GTKF(gtk_moz_embed_get_js_status_unichar) \ -+ GTKF(gtk_moz_embed_get_link_message_unichar) \ -+ GTKF(gtk_moz_embed_set_directory_service_provider) -+ -+#define GTKF(fname) fname##Type fname; -+ -+GTKMOZEMBED_FUNCTIONS -+GTKMOZEMBED_FUNCTIONS_INTERNAL -+ -+#undef GTKF -+ -+#define GTKF(fname) { #fname, (NSFuncPtr*) &fname }, -+ -+static const nsDynamicFunctionLoad GtkSymbols[] = { -+GTKMOZEMBED_FUNCTIONS -+ { nsnull, nsnull } -+}; -+ -+static const nsDynamicFunctionLoad GtkSymbolsInternal[] = { -+GTKMOZEMBED_FUNCTIONS_INTERNAL -+ { nsnull, nsnull } -+}; -+#undef GTKF -+ -+static nsresult -+GTKEmbedGlueStartup() -+{ -+ return XPCOMGlueLoadXULFunctions(GtkSymbols); -+} -+ -+static nsresult -+GTKEmbedGlueStartupInternal() -+{ -+ return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); -+} -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2012-03-09 15:19:22.261678730 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2012-03-09 15:19:22.261678730 +0100 -@@ -0,0 +1,287 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * Ramiro Estrugo -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef gtkmozembed_h -+#define gtkmozembed_h -+ -+#include -+#include -+ -+#ifdef MOZILLA_CLIENT -+#include "nscore.h" -+#else /* MOZILLA_CLIENT */ -+#ifndef nscore_h__ -+/* Because this header may be included from files which not part of the mozilla -+ build system, define macros from nscore.h */ -+ -+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) -+#define NS_HIDDEN __attribute__((visibility("hidden"))) -+#else -+#define NS_HIDDEN -+#endif -+ -+#define NS_FROZENCALL -+#define NS_EXPORT_(type) type -+#define NS_IMPORT_(type) type -+#endif /* nscore_h__ */ -+#endif /* MOZILLA_CLIENT */ -+ -+#ifdef XPCOM_GLUE -+ -+#define GTKMOZEMBED_API(type, name, params) \ -+ typedef type (NS_FROZENCALL * name##Type) params; \ -+ extern name##Type name NS_HIDDEN; -+ -+#else /* XPCOM_GLUE */ -+ -+#ifdef _IMPL_GTKMOZEMBED -+#define GTKMOZEMBED_API(type, name, params) NS_EXPORT_(type) name params; -+#else -+#define GTKMOZEMBED_API(type,name, params) NS_IMPORT_(type) name params; -+#endif -+ -+#endif /* XPCOM_GLUE */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+#define GTK_TYPE_MOZ_EMBED (gtk_moz_embed_get_type()) -+#define GTK_MOZ_EMBED(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_MOZ_EMBED, GtkMozEmbed) -+#define GTK_MOZ_EMBED_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_MOZ_EMBED, GtkMozEmbedClass) -+#define GTK_IS_MOZ_EMBED(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_MOZ_EMBED) -+#define GTK_IS_MOZ_EMBED_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_MOZ_EMBED) -+ -+typedef struct _GtkMozEmbed GtkMozEmbed; -+typedef struct _GtkMozEmbedClass GtkMozEmbedClass; -+ -+struct _GtkMozEmbed -+{ -+ GtkBin bin; -+ void *data; -+}; -+ -+struct _GtkMozEmbedClass -+{ -+ GtkBinClass parent_class; -+ -+ void (* link_message) (GtkMozEmbed *embed); -+ void (* js_status) (GtkMozEmbed *embed); -+ void (* location) (GtkMozEmbed *embed); -+ void (* title) (GtkMozEmbed *embed); -+ void (* progress) (GtkMozEmbed *embed, gint curprogress, -+ gint maxprogress); -+ void (* progress_all) (GtkMozEmbed *embed, const char *aURI, -+ gint curprogress, gint maxprogress); -+ void (* net_state) (GtkMozEmbed *embed, gint state, guint status); -+ void (* net_state_all) (GtkMozEmbed *embed, const char *aURI, -+ gint state, guint status); -+ void (* net_start) (GtkMozEmbed *embed); -+ void (* net_stop) (GtkMozEmbed *embed); -+ void (* new_window) (GtkMozEmbed *embed, GtkMozEmbed **newEmbed, -+ guint chromemask); -+ void (* visibility) (GtkMozEmbed *embed, gboolean visibility); -+ void (* destroy_brsr) (GtkMozEmbed *embed); -+ gint (* open_uri) (GtkMozEmbed *embed, const char *aURI); -+ void (* size_to) (GtkMozEmbed *embed, gint width, gint height); -+ gint (* dom_key_down) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_key_press) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_key_up) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_down) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_up) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_click) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_dbl_click) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_over) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_out) (GtkMozEmbed *embed, gpointer dom_event); -+ void (* security_change) (GtkMozEmbed *embed, gpointer request, -+ guint state); -+ void (* status_change) (GtkMozEmbed *embed, gpointer request, -+ gint status, gpointer message); -+ gint (* dom_activate) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_focus_in) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_focus_out) (GtkMozEmbed *embed, gpointer dom_event); -+}; -+ -+GTKMOZEMBED_API(GType, gtk_moz_embed_get_type, (void)) -+GTKMOZEMBED_API(GtkWidget*, gtk_moz_embed_new, (void)) -+GTKMOZEMBED_API(void, gtk_moz_embed_push_startup, (void)) -+GTKMOZEMBED_API(void, gtk_moz_embed_pop_startup, (void)) -+ -+/* Tell gtkmozembed where the gtkmozembed libs live. If this is not specified, -+ The MOZILLA_FIVE_HOME environment variable is checked. */ -+GTKMOZEMBED_API(void, gtk_moz_embed_set_path, (const char *aPath)) -+ -+GTKMOZEMBED_API(void, gtk_moz_embed_set_comp_path, (const char *aPath)) -+GTKMOZEMBED_API(void, gtk_moz_embed_set_profile_path, (const char *aDir, -+ const char *aName)) -+GTKMOZEMBED_API(void, gtk_moz_embed_load_url, (GtkMozEmbed *embed, -+ const char *url)) -+GTKMOZEMBED_API(void, gtk_moz_embed_stop_load, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(gboolean, gtk_moz_embed_can_go_back, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(gboolean, gtk_moz_embed_can_go_forward, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(void, gtk_moz_embed_go_back, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(void, gtk_moz_embed_go_forward, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(void, gtk_moz_embed_render_data, (GtkMozEmbed *embed, -+ const char *data, -+ guint32 len, -+ const char *base_uri, -+ const char *mime_type)) -+GTKMOZEMBED_API(void, gtk_moz_embed_open_stream, (GtkMozEmbed *embed, -+ const char *base_uri, -+ const char *mime_type)) -+GTKMOZEMBED_API(void, gtk_moz_embed_append_data, (GtkMozEmbed *embed, -+ const char *data, -+ guint32 len)) -+GTKMOZEMBED_API(void, gtk_moz_embed_close_stream, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(char*, gtk_moz_embed_get_link_message, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(char*, gtk_moz_embed_get_js_status, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(char*, gtk_moz_embed_get_title, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(char*, gtk_moz_embed_get_location, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(void, gtk_moz_embed_reload, (GtkMozEmbed *embed, -+ gint32 flags)) -+GTKMOZEMBED_API(void, gtk_moz_embed_set_chrome_mask, (GtkMozEmbed *embed, -+ guint32 flags)) -+GTKMOZEMBED_API(guint32, gtk_moz_embed_get_chrome_mask, (GtkMozEmbed *embed)) -+ -+/* These are straight out of nsIWebProgressListener.h */ -+ -+typedef enum -+{ -+ GTK_MOZ_EMBED_FLAG_START = 1, -+ GTK_MOZ_EMBED_FLAG_REDIRECTING = 2, -+ GTK_MOZ_EMBED_FLAG_TRANSFERRING = 4, -+ GTK_MOZ_EMBED_FLAG_NEGOTIATING = 8, -+ GTK_MOZ_EMBED_FLAG_STOP = 16, -+ -+ GTK_MOZ_EMBED_FLAG_IS_REQUEST = 65536, -+ GTK_MOZ_EMBED_FLAG_IS_DOCUMENT = 131072, -+ GTK_MOZ_EMBED_FLAG_IS_NETWORK = 262144, -+ GTK_MOZ_EMBED_FLAG_IS_WINDOW = 524288, -+ -+ GTK_MOZ_EMBED_FLAG_RESTORING = 16777216 -+} GtkMozEmbedProgressFlags; -+ -+/* These are from various networking headers */ -+ -+typedef enum -+{ -+ /* NS_ERROR_UNKNOWN_HOST */ -+ GTK_MOZ_EMBED_STATUS_FAILED_DNS = 2152398878U, -+ /* NS_ERROR_CONNECTION_REFUSED */ -+ GTK_MOZ_EMBED_STATUS_FAILED_CONNECT = 2152398861U, -+ /* NS_ERROR_NET_TIMEOUT */ -+ GTK_MOZ_EMBED_STATUS_FAILED_TIMEOUT = 2152398862U, -+ /* NS_BINDING_ABORTED */ -+ GTK_MOZ_EMBED_STATUS_FAILED_USERCANCELED = 2152398850U -+} GtkMozEmbedStatusFlags; -+ -+/* These used to be straight out of nsIWebNavigation.h until the API -+ changed. Now there's a mapping table that maps these values to the -+ internal values. */ -+ -+typedef enum -+{ -+ GTK_MOZ_EMBED_FLAG_RELOADNORMAL = 0, -+ GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE = 1, -+ GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXY = 2, -+ GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXYANDCACHE = 3, -+ GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE = 4 -+} GtkMozEmbedReloadFlags; -+ -+/* These are straight out of nsIWebBrowserChrome.h */ -+ -+typedef enum -+{ -+ GTK_MOZ_EMBED_FLAG_DEFAULTCHROME = 1U, -+ GTK_MOZ_EMBED_FLAG_WINDOWBORDERSON = 2U, -+ GTK_MOZ_EMBED_FLAG_WINDOWCLOSEON = 4U, -+ GTK_MOZ_EMBED_FLAG_WINDOWRESIZEON = 8U, -+ GTK_MOZ_EMBED_FLAG_MENUBARON = 16U, -+ GTK_MOZ_EMBED_FLAG_TOOLBARON = 32U, -+ GTK_MOZ_EMBED_FLAG_LOCATIONBARON = 64U, -+ GTK_MOZ_EMBED_FLAG_STATUSBARON = 128U, -+ GTK_MOZ_EMBED_FLAG_PERSONALTOOLBARON = 256U, -+ GTK_MOZ_EMBED_FLAG_SCROLLBARSON = 512U, -+ GTK_MOZ_EMBED_FLAG_TITLEBARON = 1024U, -+ GTK_MOZ_EMBED_FLAG_EXTRACHROMEON = 2048U, -+ GTK_MOZ_EMBED_FLAG_ALLCHROME = 4094U, -+ GTK_MOZ_EMBED_FLAG_WINDOWRAISED = 33554432U, -+ GTK_MOZ_EMBED_FLAG_WINDOWLOWERED = 67108864U, -+ GTK_MOZ_EMBED_FLAG_CENTERSCREEN = 134217728U, -+ GTK_MOZ_EMBED_FLAG_DEPENDENT = 268435456U, -+ GTK_MOZ_EMBED_FLAG_MODAL = 536870912U, -+ GTK_MOZ_EMBED_FLAG_OPENASDIALOG = 1073741824U, -+ GTK_MOZ_EMBED_FLAG_OPENASCHROME = 2147483648U -+} GtkMozEmbedChromeFlags; -+ -+/* this is a singleton object that you can hook up to to get signals -+ that are not handed out on a per widget basis. */ -+ -+#define GTK_TYPE_MOZ_EMBED_SINGLE (gtk_moz_embed_single_get_type()) -+#define GTK_MOZ_EMBED_SINGLE(obj) GTK_CHECK_CAST((obj), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingle) -+#define GTK_MOZ_EMBED_SINGLE_CLASS(klass) GTK_CHEK_CLASS_CAST((klass), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingleClass) -+#define GTK_IS_MOZ_EMBED_SINGLE(obj) GTK_CHECK_TYPE((obj), GTK_TYPE_MOZ_EMBED_SINGLE) -+#define GTK_IS_MOZ_EMBED_SINGLE_CLASS(klass) GTK_CHECK_CLASS_TYPE((klass), GTK_TYPE_MOZ_EMBED) -+#define GTK_MOZ_EMBED_SINGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingleClass)) -+ -+typedef struct _GtkMozEmbedSingle GtkMozEmbedSingle; -+typedef struct _GtkMozEmbedSingleClass GtkMozEmbedSingleClass; -+ -+struct _GtkMozEmbedSingle -+{ -+ GtkObject object; -+ void *data; -+}; -+ -+struct _GtkMozEmbedSingleClass -+{ -+ GtkObjectClass parent_class; -+ -+ void (* new_window_orphan) (GtkMozEmbedSingle *embed, -+ GtkMozEmbed **newEmbed, -+ guint chromemask); -+}; -+ -+GTKMOZEMBED_API(GType, gtk_moz_embed_single_get_type, (void)) -+GTKMOZEMBED_API(GtkMozEmbedSingle *, gtk_moz_embed_single_get, (void)) -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif /* gtkmozembed_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2012-03-09 15:19:22.262678735 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2012-03-09 15:19:22.262678735 +0100 -@@ -0,0 +1,70 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef gtkmozembed_internal_h -+#define gtkmozembed_internal_h -+ -+#include "nsIWebBrowser.h" -+#include "nsXPCOM.h" -+ -+struct nsModuleComponentInfo; -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+GTKMOZEMBED_API(void, -+ gtk_moz_embed_get_nsIWebBrowser, (GtkMozEmbed *embed, -+ nsIWebBrowser **retval)) -+GTKMOZEMBED_API(PRUnichar*, -+ gtk_moz_embed_get_title_unichar, (GtkMozEmbed *embed)) -+ -+GTKMOZEMBED_API(PRUnichar*, -+ gtk_moz_embed_get_js_status_unichar, (GtkMozEmbed *embed)) -+ -+GTKMOZEMBED_API(PRUnichar*, -+ gtk_moz_embed_get_link_message_unichar, (GtkMozEmbed *embed)) -+ -+GTKMOZEMBED_API(void, -+ gtk_moz_embed_set_directory_service_provider, (nsIDirectoryServiceProvider *appFileLocProvider)) -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif /* gtkmozembed_internal_h */ -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2012-03-09 15:19:22.262678735 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2012-03-09 15:19:22.262678735 +0100 -@@ -0,0 +1,34 @@ -+BOOL:STRING -+BOOL:STRING,STRING -+BOOL:STRING,STRING,POINTER -+BOOL:STRING,STRING,POINTER,INT -+BOOL:STRING,STRING,POINTER,POINTER,STRING,POINTER -+BOOL:STRING,STRING,POINTER,STRING,POINTER -+BOOL:STRING,STRING,STRING,POINTER -+INT:STRING,INT,INT,INT,INT,INT -+INT:STRING,STRING,INT,INT,INT,INT -+INT:STRING,STRING,UINT,STRING,STRING,STRING,STRING,POINTER -+INT:VOID -+STRING:STRING,STRING -+VOID:BOOL -+VOID:INT,INT -+VOID:INT,INT,BOOL -+VOID:INT,STRING -+VOID:INT,STRING,STRING -+VOID:INT,UINT -+VOID:POINTER,INT,POINTER -+VOID:POINTER,INT,STRING,STRING,STRING,STRING,STRING,BOOLEAN,INT -+VOID:POINTER,STRING,BOOL,BOOL -+VOID:STRING,INT,INT -+VOID:STRING,INT,UINT -+VOID:STRING,STRING -+VOID:STRING,STRING,POINTER -+VOID:STRING,STRING,STRING,ULONG,INT -+VOID:STRING,STRING,STRING,POINTER -+VOID:UINT,INT,INT,STRING,STRING,STRING,STRING -+VOID:ULONG,ULONG,ULONG -+VOID:POINTER,UINT -+BOOL:POINTER,UINT -+BOOL:POINTER -+VOID:POINTER -+BOOL:STRING,STRING,POINTER -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2012-03-09 15:19:22.263678740 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2012-03-09 15:19:22.263678740 +0100 -@@ -0,0 +1,91 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#ifndef gtkmozembedprivate_h -+#define gtkmozembedprivate_h -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+#include "gtkmozembed.h" -+ -+/* signals */ -+ -+enum { -+ LINK_MESSAGE, -+ JS_STATUS, -+ LOCATION, -+ TITLE, -+ PROGRESS, -+ PROGRESS_ALL, -+ NET_STATE, -+ NET_STATE_ALL, -+ NET_START, -+ NET_STOP, -+ NEW_WINDOW, -+ VISIBILITY, -+ DESTROY_BROWSER, -+ OPEN_URI, -+ SIZE_TO, -+ DOM_KEY_DOWN, -+ DOM_KEY_PRESS, -+ DOM_KEY_UP, -+ DOM_MOUSE_DOWN, -+ DOM_MOUSE_UP, -+ DOM_MOUSE_CLICK, -+ DOM_MOUSE_DBL_CLICK, -+ DOM_MOUSE_OVER, -+ DOM_MOUSE_OUT, -+ SECURITY_CHANGE, -+ STATUS_CHANGE, -+ DOM_ACTIVATE, -+ DOM_FOCUS_IN, -+ DOM_FOCUS_OUT, -+ EMBED_LAST_SIGNAL -+}; -+ -+extern guint moz_embed_signals[EMBED_LAST_SIGNAL]; -+ -+extern void gtk_moz_embed_single_create_window(GtkMozEmbed **aNewEmbed, -+ guint aChromeFlags); -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2012-03-09 15:19:22.263678740 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2012-03-09 15:19:22.263678740 +0100 -@@ -0,0 +1,349 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=4: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2003 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Brian Ryner -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "GtkPromptService.h" -+#include "EmbedPrompter.h" -+#include "nsStringGlue.h" -+#include "nsIWindowWatcher.h" -+#include "nsIWebBrowserChrome.h" -+#include "nsIEmbeddingSiteWindow.h" -+#include "nsCOMPtr.h" -+#include "nsIServiceManager.h" -+#include "nsServiceManagerUtils.h" -+ -+GtkPromptService::GtkPromptService() -+{ -+} -+ -+GtkPromptService::~GtkPromptService() -+{ -+} -+ -+NS_IMPL_ISUPPORTS1(GtkPromptService, nsIPromptService) -+ -+NS_IMETHODIMP -+GtkPromptService::Alert(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Alert").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.Create(EmbedPrompter::TYPE_ALERT, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::AlertCheck(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ const PRUnichar* aCheckMsg, bool* aCheckValue) -+{ -+ NS_ENSURE_ARG_POINTER(aCheckValue); -+ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Alert").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetCheckMessage(aCheckMsg); -+ prompter.SetCheckValue(*aCheckValue); -+ prompter.Create(EmbedPrompter::TYPE_ALERT_CHECK, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ prompter.GetCheckValue(aCheckValue); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::Confirm(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.Create(EmbedPrompter::TYPE_CONFIRM, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ prompter.GetConfirmValue(aConfirm); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::ConfirmCheck(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ const PRUnichar* aCheckMsg, -+ bool* aCheckValue, bool* aConfirm) -+{ -+ NS_ENSURE_ARG_POINTER(aCheckValue); -+ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetCheckMessage(aCheckMsg); -+ prompter.SetCheckValue(*aCheckValue); -+ prompter.Create(EmbedPrompter::TYPE_CONFIRM_CHECK, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ prompter.GetCheckValue(aCheckValue); -+ prompter.GetConfirmValue(aConfirm); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::ConfirmEx(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ PRUint32 aButtonFlags, -+ const PRUnichar* aButton0Title, -+ const PRUnichar* aButton1Title, -+ const PRUnichar* aButton2Title, -+ const PRUnichar* aCheckMsg, bool* aCheckValue, -+ PRInt32* aRetVal) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); -+ prompter.SetMessageText(aDialogText); -+ -+ nsAutoString button0Label, button1Label, button2Label; -+ GetButtonLabel(aButtonFlags, BUTTON_POS_0, aButton0Title, button0Label); -+ GetButtonLabel(aButtonFlags, BUTTON_POS_1, aButton1Title, button1Label); -+ GetButtonLabel(aButtonFlags, BUTTON_POS_2, aButton2Title, button2Label); -+ prompter.SetButtons(button0Label.get(), button1Label.get(), -+ button2Label.get()); -+ -+ if (aCheckMsg) -+ prompter.SetCheckMessage(aCheckMsg); -+ if (aCheckValue) -+ prompter.SetCheckValue(*aCheckValue); -+ -+ prompter.Create(EmbedPrompter::TYPE_UNIVERSAL, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ -+ if (aCheckValue) -+ prompter.GetCheckValue(aCheckValue); -+ -+ prompter.GetButtonPressed(aRetVal); -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::Prompt(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, PRUnichar** aValue, -+ const PRUnichar* aCheckMsg, bool* aCheckValue, -+ bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetTextValue(*aValue); -+ if (aCheckMsg) -+ prompter.SetCheckMessage(aCheckMsg); -+ if (aCheckValue) -+ prompter.SetCheckValue(*aCheckValue); -+ -+ prompter.Create(EmbedPrompter::TYPE_PROMPT, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ if (aCheckValue) -+ prompter.GetCheckValue(aCheckValue); -+ prompter.GetConfirmValue(aConfirm); -+ if (*aConfirm) { -+ if (*aValue) -+ NS_Free(*aValue); -+ prompter.GetTextValue(aValue); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::PromptUsernameAndPassword(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ PRUnichar** aUsername, -+ PRUnichar** aPassword, -+ const PRUnichar* aCheckMsg, -+ bool* aCheckValue, -+ bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetUser(*aUsername); -+ prompter.SetPassword(*aPassword); -+ if (aCheckMsg) -+ prompter.SetCheckMessage(aCheckMsg); -+ if (aCheckValue) -+ prompter.SetCheckValue(*aCheckValue); -+ -+ prompter.Create(EmbedPrompter::TYPE_PROMPT_USER_PASS, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ if (aCheckValue) -+ prompter.GetCheckValue(aCheckValue); -+ prompter.GetConfirmValue(aConfirm); -+ if (*aConfirm) { -+ if (*aUsername) -+ NS_Free(*aUsername); -+ prompter.GetUser(aUsername); -+ -+ if (*aPassword) -+ NS_Free(*aPassword); -+ prompter.GetPassword(aPassword); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::PromptPassword(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ PRUnichar** aPassword, -+ const PRUnichar* aCheckMsg, -+ bool* aCheckValue, bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetPassword(*aPassword); -+ if (aCheckMsg) -+ prompter.SetCheckMessage(aCheckMsg); -+ if (aCheckValue) -+ prompter.SetCheckValue(*aCheckValue); -+ -+ prompter.Create(EmbedPrompter::TYPE_PROMPT_PASS, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ if (aCheckValue) -+ prompter.GetCheckValue(aCheckValue); -+ prompter.GetConfirmValue(aConfirm); -+ if (*aConfirm) { -+ if (*aPassword) -+ NS_Free(*aPassword); -+ prompter.GetPassword(aPassword); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::Select(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, PRUint32 aCount, -+ const PRUnichar** aSelectList, PRInt32* outSelection, -+ bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Select").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetItems(aSelectList, aCount); -+ prompter.Create(EmbedPrompter::TYPE_SELECT, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ prompter.GetSelectedItem(outSelection); -+ prompter.GetConfirmValue(aConfirm); -+ return NS_OK; -+} -+ -+GtkWindow* -+GtkPromptService::GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow) -+{ -+ nsCOMPtr wwatch = do_GetService("@mozilla.org/embedcomp/window-watcher;1"); -+ -+ if (!aDOMWindow) -+ return NULL; -+ -+ nsCOMPtr chrome; -+ wwatch->GetChromeForWindow(aDOMWindow, getter_AddRefs(chrome)); -+ nsCOMPtr siteWindow = do_QueryInterface(chrome); -+ -+ if (!siteWindow) -+ return NULL; -+ -+ GtkWidget* parentWidget; -+ siteWindow->GetSiteWindow((void**)&parentWidget); -+ -+ if (!parentWidget) -+ return NULL; -+ -+ GtkWidget* gtkWin = gtk_widget_get_toplevel(parentWidget); -+ if (GTK_WIDGET_TOPLEVEL(gtkWin)) -+ return GTK_WINDOW(gtkWin); -+ -+ return NULL; -+} -+ -+void -+GtkPromptService::GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, -+ const PRUnichar* aStringValue, -+ nsAString& aLabel) -+{ -+ PRUint32 posFlag = (aFlags & (255 * aPos)) / aPos; -+ switch (posFlag) { -+ case 0: -+ break; -+ case BUTTON_TITLE_OK: -+ aLabel.AssignLiteral(GTK_STOCK_OK); -+ break; -+ case BUTTON_TITLE_CANCEL: -+ aLabel.AssignLiteral(GTK_STOCK_CANCEL); -+ break; -+ case BUTTON_TITLE_YES: -+ aLabel.AssignLiteral(GTK_STOCK_YES); -+ break; -+ case BUTTON_TITLE_NO: -+ aLabel.AssignLiteral(GTK_STOCK_NO); -+ break; -+ case BUTTON_TITLE_SAVE: -+ aLabel.AssignLiteral(GTK_STOCK_SAVE); -+ break; -+ case BUTTON_TITLE_DONT_SAVE: -+ aLabel.AssignLiteral("Don't Save"); -+ break; -+ case BUTTON_TITLE_REVERT: -+ aLabel.AssignLiteral("Revert"); -+ break; -+ case BUTTON_TITLE_IS_STRING: -+ aLabel = aStringValue; -+ break; -+ default: -+ NS_WARNING("Unexpected button flags"); -+ } -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2012-03-09 15:19:22.264678745 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2012-03-09 15:19:22.264678745 +0100 -@@ -0,0 +1,59 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=4: */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 2003 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Brian Ryner -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsIPromptService.h" -+#include "nsStringGlue.h" -+#include -+ -+class nsIDOMWindow; -+ -+class GtkPromptService : public nsIPromptService -+{ -+public: -+ GtkPromptService(); -+ virtual ~GtkPromptService(); -+ -+ NS_DECL_ISUPPORTS -+ NS_DECL_NSIPROMPTSERVICE -+ -+private: -+ GtkWindow* GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow); -+ void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, -+ const PRUnichar* aStringValue, nsAString &aLabel); -+}; -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2012-03-09 15:19:22.264678745 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2012-03-09 15:19:22.264678745 +0100 -@@ -0,0 +1,112 @@ -+# -+# ***** BEGIN LICENSE BLOCK ***** -+# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+# -+# The contents of this file are subject to the Mozilla Public License Version -+# 1.1 (the "License"); you may not use this file except in compliance with -+# the License. You may obtain a copy of the License at -+# http://www.mozilla.org/MPL/ -+# -+# Software distributed under the License is distributed on an "AS IS" basis, -+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+# for the specific language governing rights and limitations under the -+# License. -+# -+# The Original Code is the Mozilla browser. -+# -+# The Initial Developer of the Original Code is -+# Christopher Blizzard. -+# Portions created by the Initial Developer are Copyright (C) 1999 -+# the Initial Developer. All Rights Reserved. -+# -+# Contributor(s): -+# Christopher Blizzard -+# -+# Alternatively, the contents of this file may be used under the terms of -+# either the GNU General Public License Version 2 or later (the "GPL"), or -+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+# in which case the provisions of the GPL or the LGPL are applicable instead -+# of those above. If you wish to allow use of your version of this file only -+# under the terms of either the GPL or the LGPL, and not to allow others to -+# use your version of this file under the terms of the MPL, indicate your -+# decision by deleting the provisions above and replace them with the notice -+# and other provisions required by the GPL or the LGPL. If you do not delete -+# the provisions above, a recipient may use your version of this file under -+# the terms of any one of the MPL, the GPL or the LGPL. -+# -+# ***** END LICENSE BLOCK ***** -+ -+DEPTH = ../../../.. -+topsrcdir = @top_srcdir@ -+srcdir = @srcdir@ -+VPATH = @srcdir@ -+ -+include $(DEPTH)/config/autoconf.mk -+ -+MODULE = gtkembedmoz -+LIBRARY_NAME = gtkembedmoz -+LIBXUL_LIBRARY = 1 -+FORCE_STATIC_LIB = 1 -+DEFINES += -DIMPL_XREAPI -+ -+ -+ -+CPPSRCS = \ -+ gtkmozembed2.cpp \ -+ EmbedPrivate.cpp \ -+ EmbedWindow.cpp \ -+ EmbedProgress.cpp \ -+ EmbedContentListener.cpp \ -+ EmbedEventListener.cpp \ -+ EmbedWindowCreator.cpp \ -+ $(NULL) -+ -+ifdef MOZ_ENABLE_GTK2 -+CSRCS = \ -+ gtkmozembedmarshal.c -+CPPSRCS += \ -+ EmbedPrompter.cpp \ -+ GtkPromptService.cpp -+endif -+ -+LOCAL_INCLUDES += \ -+ -I. \ -+ $(NULL) -+ -+include $(topsrcdir)/config/config.mk -+ -+EXPORTS = \ -+ gtkmozembed.h \ -+ gtkmozembed_glue.cpp \ -+ gtkmozembed_internal.h -+ -+include $(topsrcdir)/config/rules.mk -+ -+ifeq ($(OS_ARCH), SunOS) -+ifndef GNU_CC -+# When using Sun's WorkShop compiler, including -+# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h -+# causes most of these compiles to fail with: -+# line 29: Error: Multiple declaration for std::tm. -+# So, this gets around the problem. -+DEFINES += -D_TIME_H=1 -+endif -+endif -+ -+CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) -+CFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) -+DEFINES += -D_IMPL_GTKMOZEMBED -+ -+MARSHAL_FILE = gtkmozembedmarshal -+MARSHAL_PREFIX = gtkmozembed -+ -+$(MARSHAL_FILE).h: $(MARSHAL_FILE).list -+ glib-genmarshal --prefix=$(MARSHAL_PREFIX) $(srcdir)/$(MARSHAL_FILE).list --skip-source --header > $@ -+ -+$(MARSHAL_FILE).c: $(MARSHAL_FILE).list $(MARSHAL_FILE).h -+ glib-genmarshal --prefix=$(MARSHAL_PREFIX) $(srcdir)/$(MARSHAL_FILE).list --skip-source --body > $@ -+ -+gtkmozembed2.$(OBJ_SUFFIX): $(MARSHAL_FILE).h -+ -+GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2012-03-09 15:19:22.265678750 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2012-03-09 15:19:22.265678750 +0100 -@@ -0,0 +1,101 @@ -+# -+# ***** BEGIN LICENSE BLOCK ***** -+# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+# -+# The contents of this file are subject to the Mozilla Public License Version -+# 1.1 (the "License"); you may not use this file except in compliance with -+# the License. You may obtain a copy of the License at -+# http://www.mozilla.org/MPL/ -+# -+# Software distributed under the License is distributed on an "AS IS" basis, -+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+# for the specific language governing rights and limitations under the -+# License. -+# -+# The Original Code is the Mozilla browser. -+# -+# The Initial Developer of the Original Code is -+# Christopher Blizzard. -+# Portions created by the Initial Developer are Copyright (C) 1999 -+# the Initial Developer. All Rights Reserved. -+# -+# Contributor(s): -+# Christopher Blizzard -+# -+# Alternatively, the contents of this file may be used under the terms of -+# either the GNU General Public License Version 2 or later (the "GPL"), or -+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+# in which case the provisions of the GPL or the LGPL are applicable instead -+# of those above. If you wish to allow use of your version of this file only -+# under the terms of either the GPL or the LGPL, and not to allow others to -+# use your version of this file under the terms of the MPL, indicate your -+# decision by deleting the provisions above and replace them with the notice -+# and other provisions required by the GPL or the LGPL. If you do not delete -+# the provisions above, a recipient may use your version of this file under -+# the terms of any one of the MPL, the GPL or the LGPL. -+# -+# ***** END LICENSE BLOCK ***** -+ -+DEPTH = ../../../.. -+topsrcdir = @top_srcdir@ -+srcdir = @srcdir@ -+VPATH = @srcdir@ -+ -+include $(DEPTH)/config/autoconf.mk -+ -+MODULE = gtkembedmoz -+ -+CPPSRCS = \ -+ TestGtkEmbed.cpp \ -+ TestGtkEmbedNotebook.cpp -+ -+ifdef MOZ_X11 -+CPPSRCS += TestGtkEmbedSocket.cpp \ -+ TestGtkEmbedChild.cpp -+endif -+ -+SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=) -+ -+# ENABLE_GNOME=1 -+ -+ifdef ENABLE_GNOME -+CPPSRCS += TestGtkEmbedMDI.cpp -+endif -+ -+ifdef MOZ_ENABLE_GTK2 -+LIBS += \ -+ $(XLDFLAGS) \ -+ $(XLIBS) \ -+ $(NULL) -+endif -+ -+include $(topsrcdir)/config/config.mk -+ -+include $(topsrcdir)/config/rules.mk -+ -+LIBS += $(XPCOM_STANDALONE_GLUE_LDOPTS) -+ -+DEFINES += -DXPCOM_GLUE -+STL_FLAGS = -+ -+CXXFLAGS += $(MOZ_GTK2_CFLAGS) -+ -+ifdef ENABLE_GNOME -+CXXFLAGS += `gnome-config --cflags gnomeui` -+EXTRA_LIBS += `gnome-config --libs gnomeui` -+endif -+ -+EXTRA_LIBS += \ -+ $(TK_LIBS) \ -+ $(NULL) -+ -+ifeq ($(OS_ARCH), SunOS) -+ifndef GNU_CC -+# When using Sun's WorkShop compiler, including -+# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h -+# causes most of these compiles to fail with: -+# line 29: Error: Multiple declaration for std::tm. -+# So, this gets around the problem. -+DEFINES += -D_TIME_H=1 -+endif -+endif -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2012-03-09 15:19:22.265678750 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2012-03-09 15:19:22.265678750 +0100 -@@ -0,0 +1,185 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "gtkmozembed.h" -+#include -+#include -+#include -+#include -+ -+#include "nsStringAPI.h" -+#include "gtkmozembed_glue.cpp" -+ -+int (*old_handler) (Display *, XErrorEvent *); -+ -+int error_handler (Display *d, XErrorEvent *e) -+{ -+ if ((e->error_code == BadWindow) || (e->error_code == BadDrawable)) -+ { -+ XID resourceid = e->resourceid; -+ GdkWindow *window = gdk_window_lookup (resourceid); -+ -+ if (window) -+ { -+ if (!g_dataset_get_data (window, "bonobo-error")) -+ { -+ g_dataset_set_data_full (window, "bonobo-error", -+ g_new (gint, 1), -+ (GDestroyNotify)g_free); -+ -+ g_warning ("Error accessing window %ld", resourceid); -+ } -+ } -+ return 0; -+ } -+ else -+ { -+ return (*old_handler)(d, e); -+ } -+} -+ -+void -+load_page(gpointer data); -+ -+GtkWidget *embed = 0; -+GtkWidget *entry = 0; -+ -+int -+main(int argc, char **argv) -+{ -+ guint32 xid; -+ -+ GtkWidget *window; -+ GtkWidget *hbox; -+ GtkWidget *vbox; -+ GtkWidget *button; -+ -+ gtk_init(&argc, &argv); -+ -+ static const GREVersionRange greVersion = { -+ "1.9a", PR_TRUE, -+ "2", PR_TRUE -+ }; -+ -+ char xpcomPath[PATH_MAX]; -+ -+ nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, -+ xpcomPath, sizeof(xpcomPath)); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find a compatible GRE.\n"); -+ return 1; -+ } -+ -+ rv = XPCOMGlueStartup(xpcomPath); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't start XPCOM."); -+ return 1; -+ } -+ -+ rv = GTKEmbedGlueStartup(); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); -+ return 1; -+ } -+ -+ char *lastSlash = strrchr(xpcomPath, '/'); -+ if (lastSlash) -+ *lastSlash = '\0'; -+ -+ gtk_moz_embed_set_path(xpcomPath); -+ -+ old_handler = XSetErrorHandler (error_handler); -+ -+ if (argc < 2) { -+ fprintf(stderr, "Usage: TestGtkEmbedChild WINDOW_ID\n"); -+ exit(1); -+ } -+ -+ xid = strtol (argv[1], (char **)NULL, 0); -+ -+ if (xid == 0) { -+ fprintf(stderr, "Invalid window id '%s'\n", argv[1]); -+ exit(1); -+ } -+ -+ window = gtk_plug_new(xid); -+ -+ g_signal_connect(GTK_OBJECT(window), "destroy", -+ G_CALLBACK(gtk_main_quit), NULL); -+ -+ gtk_container_set_border_width(GTK_CONTAINER(window), 0); -+ -+ vbox = gtk_vbox_new (FALSE, 0); -+ gtk_container_add(GTK_CONTAINER(window), vbox); -+ gtk_widget_show(vbox); -+ -+ hbox = gtk_hbox_new (FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); -+ gtk_widget_show (hbox); -+ -+ entry = gtk_entry_new (); -+ gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); -+ gtk_widget_show (entry); -+ -+ button = gtk_button_new_with_label("Load"); -+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); -+ gtk_widget_show(button); -+ -+ g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(load_page), NULL); -+ -+ embed = gtk_moz_embed_new(); -+ gtk_box_pack_start(GTK_BOX(vbox), embed, TRUE, TRUE, 0); -+ gtk_widget_set_size_request(embed, 200, 200); -+ gtk_widget_show(embed); -+ -+ gtk_widget_show(window); -+ -+ gtk_main(); -+ -+ fprintf(stderr, "exiting.\n"); -+ -+ return 0; -+} -+ -+void -+load_page(gpointer data) -+{ -+ gchar *text = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); -+ g_print("load url %s\n", text); -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); -+ g_free(text); -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2012-03-09 15:19:22.266678755 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2012-03-09 15:19:22.266678755 +0100 -@@ -0,0 +1,1145 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "gtkmozembed.h" -+#include -+#include -+#include -+#include -+ -+// mozilla specific headers -+#include "nsIDOMKeyEvent.h" -+#include "nsIDOMMouseEvent.h" -+#include "nsIDOMUIEvent.h" -+ -+#include "nsCOMPtr.h" -+#include "nsISupportsUtils.h" -+#include "nsServiceManagerUtils.h" -+#include "nsIObserverService.h" -+ -+#include "nsStringAPI.h" -+#include "gtkmozembed_glue.cpp" -+ -+typedef struct _TestGtkBrowser { -+ GtkWidget *topLevelWindow; -+ GtkWidget *topLevelVBox; -+ GtkWidget *menuBar; -+ GtkWidget *fileMenuItem; -+ GtkWidget *fileMenu; -+ GtkWidget *fileOpenNewBrowser; -+ GtkWidget *fileStream; -+ GtkWidget *fileMemory; -+ GtkWidget *fileClose; -+ GtkWidget *fileQuit; -+ GtkWidget *toolbarHBox; -+ GtkWidget *toolbar; -+ GtkWidget *backButton; -+ GtkWidget *stopButton; -+ GtkWidget *forwardButton; -+ GtkWidget *reloadButton; -+ GtkWidget *urlEntry; -+ GtkWidget *mozEmbed; -+ GtkWidget *progressAreaHBox; -+ GtkWidget *progressBar; -+ GtkWidget *statusAlign; -+ GtkWidget *statusBar; -+ const char *statusMessage; -+ int loadPercent; -+ int bytesLoaded; -+ int maxBytesLoaded; -+ char *tempMessage; -+ gboolean menuBarOn; -+ gboolean toolBarOn; -+ gboolean locationBarOn; -+ gboolean statusBarOn; -+ -+} TestGtkBrowser; -+ -+// the list of browser windows currently open -+GList *browser_list = g_list_alloc(); -+ -+static TestGtkBrowser *new_gtk_browser (guint32 chromeMask); -+static void set_browser_visibility (TestGtkBrowser *browser, -+ gboolean visibility); -+ -+static int num_browsers = 0; -+ -+// callbacks from the UI -+static void back_clicked_cb (GtkButton *button, -+ TestGtkBrowser *browser); -+static void stop_clicked_cb (GtkButton *button, -+ TestGtkBrowser *browser); -+static void forward_clicked_cb (GtkButton *button, -+ TestGtkBrowser *browser); -+static void reload_clicked_cb (GtkButton *button, -+ TestGtkBrowser *browser); -+static void url_activate_cb (GtkEditable *widget, -+ TestGtkBrowser *browser); -+static void menu_open_new_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static void menu_stream_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static void menu_memory_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static void menu_close_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static void menu_quit_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static gboolean delete_cb (GtkWidget *widget, GdkEventAny *event, -+ TestGtkBrowser *browser); -+static void destroy_cb (GtkWidget *widget, -+ TestGtkBrowser *browser); -+ -+// callbacks from the widget -+static void location_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void title_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void load_started_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void load_finished_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void net_state_change_cb (GtkMozEmbed *embed, gint flags, -+ guint status, TestGtkBrowser *browser); -+static void net_state_change_all_cb (GtkMozEmbed *embed, const char *uri, -+ gint flags, guint status, -+ TestGtkBrowser *browser); -+static void progress_change_cb (GtkMozEmbed *embed, gint cur, gint max, -+ TestGtkBrowser *browser); -+static void progress_change_all_cb (GtkMozEmbed *embed, const char *uri, -+ gint cur, gint max, -+ TestGtkBrowser *browser); -+static void link_message_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void js_status_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void new_window_cb (GtkMozEmbed *embed, -+ GtkMozEmbed **retval, guint chromemask, -+ TestGtkBrowser *browser); -+static void visibility_cb (GtkMozEmbed *embed, -+ gboolean visibility, -+ TestGtkBrowser *browser); -+static void destroy_brsr_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static gint open_uri_cb (GtkMozEmbed *embed, const char *uri, -+ TestGtkBrowser *browser); -+static void size_to_cb (GtkMozEmbed *embed, gint width, -+ gint height, TestGtkBrowser *browser); -+static gint dom_key_down_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_key_press_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_key_up_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_down_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_up_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_dbl_click_cb (GtkMozEmbed *embed, -+ nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_over_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_out_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_activate_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_focus_in_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_focus_out_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser); -+ -+// callbacks from the singleton object -+static void new_window_orphan_cb (GtkMozEmbedSingle *embed, -+ GtkMozEmbed **retval, guint chromemask, -+ gpointer data); -+ -+// some utility functions -+static void update_status_bar_text (TestGtkBrowser *browser); -+static void update_temp_message (TestGtkBrowser *browser, -+ const char *message); -+static void update_nav_buttons (TestGtkBrowser *browser); -+ -+int -+main(int argc, char **argv) -+{ -+ gtk_set_locale(); -+ gtk_init(&argc, &argv); -+ -+ static const GREVersionRange greVersion = { -+ "1.9a", PR_TRUE, -+ "2", PR_TRUE -+ }; -+ -+ char xpcomPath[PATH_MAX]; -+ -+ nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, -+ xpcomPath, sizeof(xpcomPath)); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find a compatible GRE.\n"); -+ return 1; -+ } -+ -+ rv = XPCOMGlueStartup(xpcomPath); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't start XPCOM."); -+ return 1; -+ } -+ -+ rv = GTKEmbedGlueStartup(); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); -+ return 1; -+ } -+ -+ char *lastSlash = strrchr(xpcomPath, '/'); -+ if (lastSlash) -+ *lastSlash = '\0'; -+ -+ gtk_moz_embed_set_path(xpcomPath); -+ -+ char *home_path; -+ char *full_path; -+ home_path = getenv("HOME"); -+ if (!home_path) { -+ fprintf(stderr, "Failed to get HOME\n"); -+ exit(1); -+ } -+ -+ full_path = g_strdup_printf("%s/%s", home_path, ".TestGtkEmbed"); -+ -+ gtk_moz_embed_set_profile_path(full_path, "TestGtkEmbed"); -+ -+ TestGtkBrowser *browser = new_gtk_browser(GTK_MOZ_EMBED_FLAG_DEFAULTCHROME); -+ -+ // set our minimum size -+ gtk_widget_set_size_request(browser->mozEmbed, 400, 400); -+ -+ set_browser_visibility(browser, TRUE); -+ -+ if (argc > 1) -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser->mozEmbed), argv[1]); -+ -+ // get the singleton object and hook up to its new window callback -+ // so we can create orphaned windows. -+ -+ GtkMozEmbedSingle *single; -+ -+ single = gtk_moz_embed_single_get(); -+ if (!single) { -+ fprintf(stderr, "Failed to get singleton embed object!\n"); -+ exit(1); -+ } -+ -+ g_signal_connect(GTK_OBJECT(single), "new_window_orphan", -+ G_CALLBACK(new_window_orphan_cb), NULL); -+ -+ gtk_moz_embed_push_startup(); -+ gtk_main(); -+ gtk_moz_embed_pop_startup(); -+} -+ -+static TestGtkBrowser * -+new_gtk_browser(guint32 chromeMask) -+{ -+ guint32 actualChromeMask = chromeMask; -+ TestGtkBrowser *browser = 0; -+ -+ num_browsers++; -+ -+ browser = g_new0(TestGtkBrowser, 1); -+ -+ browser_list = g_list_prepend(browser_list, browser); -+ -+ browser->menuBarOn = FALSE; -+ browser->toolBarOn = FALSE; -+ browser->locationBarOn = FALSE; -+ browser->statusBarOn = FALSE; -+ -+ g_print("new_gtk_browser\n"); -+ -+ if (chromeMask == GTK_MOZ_EMBED_FLAG_DEFAULTCHROME) -+ actualChromeMask = GTK_MOZ_EMBED_FLAG_ALLCHROME; -+ -+ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_MENUBARON) -+ { -+ browser->menuBarOn = TRUE; -+ g_print("\tmenu bar\n"); -+ } -+ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_TOOLBARON) -+ { -+ browser->toolBarOn = TRUE; -+ g_print("\ttool bar\n"); -+ } -+ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_LOCATIONBARON) -+ { -+ browser->locationBarOn = TRUE; -+ g_print("\tlocation bar\n"); -+ } -+ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_STATUSBARON) -+ { -+ browser->statusBarOn = TRUE; -+ g_print("\tstatus bar\n"); -+ } -+ -+ // create our new toplevel window -+ browser->topLevelWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); -+ // new vbox -+ browser->topLevelVBox = gtk_vbox_new(FALSE, 0); -+ // add it to the toplevel window -+ gtk_container_add(GTK_CONTAINER(browser->topLevelWindow), -+ browser->topLevelVBox); -+ // create our menu bar -+ browser->menuBar = gtk_menu_bar_new(); -+ // create the file menu -+ browser->fileMenuItem = gtk_menu_item_new_with_label("File"); -+ browser->fileMenu = gtk_menu_new(); -+ gtk_menu_item_set_submenu (GTK_MENU_ITEM(browser->fileMenuItem), -+ browser->fileMenu); -+ -+ browser->fileOpenNewBrowser = -+ gtk_menu_item_new_with_label("Open New Browser"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileOpenNewBrowser); -+ -+ browser->fileStream = -+ gtk_menu_item_new_with_label("Test Stream"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileStream); -+ -+ browser->fileMemory = -+ gtk_menu_item_new_with_label("Release Memory"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileMemory); -+ -+ browser->fileClose = -+ gtk_menu_item_new_with_label("Close"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileClose); -+ -+ browser->fileQuit = -+ gtk_menu_item_new_with_label("Quit"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileQuit); -+ -+ // append it -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU_BAR(browser->menuBar), -+ browser->fileMenuItem); -+ -+ // add it to the vbox -+ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), -+ browser->menuBar, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ // create the hbox that will contain the toolbar and the url text entry bar -+ browser->toolbarHBox = gtk_hbox_new(FALSE, 0); -+ // add that hbox to the vbox -+ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), -+ browser->toolbarHBox, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ // new horiz toolbar with buttons + icons -+ browser->toolbar = gtk_toolbar_new(); -+ gtk_toolbar_set_orientation(GTK_TOOLBAR(browser->toolbar), -+ GTK_ORIENTATION_HORIZONTAL); -+ gtk_toolbar_set_style(GTK_TOOLBAR(browser->toolbar), -+ GTK_TOOLBAR_BOTH); -+ -+ // add it to the hbox -+ gtk_box_pack_start(GTK_BOX(browser->toolbarHBox), browser->toolbar, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ // new back button -+ browser->backButton = -+ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), -+ "Back", -+ "Go Back", -+ "Go Back", -+ 0, // XXX replace with icon -+ G_CALLBACK(back_clicked_cb), -+ browser); -+ // new stop button -+ browser->stopButton = -+ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), -+ "Stop", -+ "Stop", -+ "Stop", -+ 0, // XXX replace with icon -+ G_CALLBACK(stop_clicked_cb), -+ browser); -+ // new forward button -+ browser->forwardButton = -+ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), -+ "Forward", -+ "Forward", -+ "Forward", -+ 0, // XXX replace with icon -+ G_CALLBACK(forward_clicked_cb), -+ browser); -+ // new reload button -+ browser->reloadButton = -+ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), -+ "Reload", -+ "Reload", -+ "Reload", -+ 0, // XXX replace with icon -+ G_CALLBACK(reload_clicked_cb), -+ browser); -+ // create the url text entry -+ browser->urlEntry = gtk_entry_new(); -+ // add it to the hbox -+ gtk_box_pack_start(GTK_BOX(browser->toolbarHBox), browser->urlEntry, -+ TRUE, // expand -+ TRUE, // fill -+ 0); // padding -+ // create our new gtk moz embed widget -+ browser->mozEmbed = gtk_moz_embed_new(); -+ gtk_moz_embed_push_startup(); -+ // add it to the toplevel vbox -+ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->mozEmbed, -+ TRUE, // expand -+ TRUE, // fill -+ 0); // padding -+ // create the new hbox for the progress area -+ browser->progressAreaHBox = gtk_hbox_new(FALSE, 0); -+ // add it to the vbox -+ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->progressAreaHBox, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ // create our new progress bar -+ browser->progressBar = gtk_progress_bar_new(); -+ // add it to the hbox -+ gtk_box_pack_start(GTK_BOX(browser->progressAreaHBox), browser->progressBar, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ -+ // create our status area and the alignment object that will keep it -+ // from expanding -+ browser->statusAlign = gtk_alignment_new(0, 0, 1, 1); -+ gtk_widget_set_size_request(browser->statusAlign, 1, -1); -+ // create the status bar -+ browser->statusBar = gtk_statusbar_new(); -+ gtk_container_add(GTK_CONTAINER(browser->statusAlign), browser->statusBar); -+ // add it to the hbox -+ gtk_box_pack_start(GTK_BOX(browser->progressAreaHBox), browser->statusAlign, -+ TRUE, // expand -+ TRUE, // fill -+ 0); // padding -+ // by default none of the buttons are marked as sensitive. -+ gtk_widget_set_sensitive(browser->backButton, FALSE); -+ gtk_widget_set_sensitive(browser->stopButton, FALSE); -+ gtk_widget_set_sensitive(browser->forwardButton, FALSE); -+ gtk_widget_set_sensitive(browser->reloadButton, FALSE); -+ -+ // catch the destruction of the toplevel window -+ g_signal_connect(GTK_OBJECT(browser->topLevelWindow), "delete_event", -+ G_CALLBACK(delete_cb), browser); -+ -+ // hook up the activate signal to the right callback -+ g_signal_connect(GTK_OBJECT(browser->urlEntry), "activate", -+ G_CALLBACK(url_activate_cb), browser); -+ -+ // hook up to the open new browser activation -+ g_signal_connect(GTK_OBJECT(browser->fileOpenNewBrowser), "activate", -+ G_CALLBACK(menu_open_new_cb), browser); -+ // hook up to the stream test -+ g_signal_connect(GTK_OBJECT(browser->fileStream), "activate", -+ G_CALLBACK(menu_stream_cb), browser); -+ // hook up the memory pressure release function -+ g_signal_connect(GTK_OBJECT(browser->fileMemory), "activate", -+ G_CALLBACK(menu_memory_cb), browser); -+ // close this window -+ g_signal_connect(GTK_OBJECT(browser->fileClose), "activate", -+ G_CALLBACK(menu_close_cb), browser); -+ // quit the application -+ g_signal_connect(GTK_OBJECT(browser->fileQuit), "activate", -+ G_CALLBACK(menu_quit_cb), browser); -+ -+ // hook up the location change to update the urlEntry -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "location", -+ G_CALLBACK(location_changed_cb), browser); -+ // hook up the title change to update the window title -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "title", -+ G_CALLBACK(title_changed_cb), browser); -+ // hook up the start and stop signals -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_start", -+ G_CALLBACK(load_started_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_stop", -+ G_CALLBACK(load_finished_cb), browser); -+ // hook up to the change in network status -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_state", -+ G_CALLBACK(net_state_change_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_state_all", -+ G_CALLBACK(net_state_change_all_cb), browser); -+ // hookup to changes in progress -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "progress", -+ G_CALLBACK(progress_change_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "progress_all", -+ G_CALLBACK(progress_change_all_cb), browser); -+ // hookup to changes in over-link message -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "link_message", -+ G_CALLBACK(link_message_cb), browser); -+ // hookup to changes in js status message -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "js_status", -+ G_CALLBACK(js_status_cb), browser); -+ // hookup to see whenever a new window is requested -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "new_window", -+ G_CALLBACK(new_window_cb), browser); -+ // hookup to any requested visibility changes -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "visibility", -+ G_CALLBACK(visibility_cb), browser); -+ // hookup to the signal that says that the browser requested to be -+ // destroyed -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "destroy_browser", -+ G_CALLBACK(destroy_brsr_cb), browser); -+ // hookup to the signal that is called when someone clicks on a link -+ // to load a new uri -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "open_uri", -+ G_CALLBACK(open_uri_cb), browser); -+ // this signal is emitted when there's a request to change the -+ // containing browser window to a certain height, like with width -+ // and height args for a window.open in javascript -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "size_to", -+ G_CALLBACK(size_to_cb), browser); -+ // key event signals -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_down", -+ G_CALLBACK(dom_key_down_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_press", -+ G_CALLBACK(dom_key_press_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_up", -+ G_CALLBACK(dom_key_up_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_down", -+ G_CALLBACK(dom_mouse_down_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_up", -+ G_CALLBACK(dom_mouse_up_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_click", -+ G_CALLBACK(dom_mouse_click_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_dbl_click", -+ G_CALLBACK(dom_mouse_dbl_click_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_over", -+ G_CALLBACK(dom_mouse_over_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_out", -+ G_CALLBACK(dom_mouse_out_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_activate", -+ G_CALLBACK(dom_activate_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_focus_in", -+ G_CALLBACK(dom_focus_in_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_focus_out", -+ G_CALLBACK(dom_focus_out_cb), browser); -+ // hookup to when the window is destroyed -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "destroy", -+ G_CALLBACK(destroy_cb), browser); -+ -+ // set the chrome type so it's stored in the object -+ gtk_moz_embed_set_chrome_mask(GTK_MOZ_EMBED(browser->mozEmbed), -+ actualChromeMask); -+ -+ return browser; -+} -+ -+void -+set_browser_visibility (TestGtkBrowser *browser, gboolean visibility) -+{ -+ if (!visibility) -+ { -+ gtk_widget_hide(browser->topLevelWindow); -+ return; -+ } -+ -+ if (browser->menuBarOn) -+ gtk_widget_show_all(browser->menuBar); -+ else -+ gtk_widget_hide_all(browser->menuBar); -+ -+ // since they are on the same line here... -+ if (browser->toolBarOn || browser->locationBarOn) -+ gtk_widget_show_all(browser->toolbarHBox); -+ else -+ gtk_widget_hide_all(browser->toolbarHBox); -+ -+ if (browser->statusBarOn) -+ gtk_widget_show_all(browser->progressAreaHBox); -+ else -+ gtk_widget_hide_all(browser->progressAreaHBox); -+ -+ gtk_widget_show(browser->mozEmbed); -+ gtk_widget_show(browser->topLevelVBox); -+ gtk_widget_show(browser->topLevelWindow); -+} -+ -+void -+back_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ gtk_moz_embed_go_back(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+stop_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ g_print("stop_clicked_cb\n"); -+ gtk_moz_embed_stop_load(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+forward_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ g_print("forward_clicked_cb\n"); -+ gtk_moz_embed_go_forward(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+reload_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ g_print("reload_clicked_cb\n"); -+ GdkModifierType state = (GdkModifierType)0; -+ gint x, y; -+ gdk_window_get_pointer(NULL, &x, &y, &state); -+ -+ gtk_moz_embed_reload(GTK_MOZ_EMBED(browser->mozEmbed), -+ (state & GDK_SHIFT_MASK) ? -+ GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE : -+ GTK_MOZ_EMBED_FLAG_RELOADNORMAL); -+} -+ -+void -+stream_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ const char *data; -+ const char *data2; -+ data = "Hi"; -+ data2 = " there\n"; -+ g_print("stream_clicked_cb\n"); -+ gtk_moz_embed_open_stream(GTK_MOZ_EMBED(browser->mozEmbed), -+ "file://", "text/html"); -+ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), -+ data, strlen(data)); -+ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), -+ data2, strlen(data2)); -+ gtk_moz_embed_close_stream(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+url_activate_cb (GtkEditable *widget, TestGtkBrowser *browser) -+{ -+ gchar *text = gtk_editable_get_chars(widget, 0, -1); -+ g_print("loading url %s\n", text); -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser->mozEmbed), text); -+ g_free(text); -+} -+ -+void -+menu_open_new_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ g_print("opening new browser.\n"); -+ TestGtkBrowser *newBrowser = -+ new_gtk_browser(GTK_MOZ_EMBED_FLAG_DEFAULTCHROME); -+ gtk_widget_set_size_request(newBrowser->mozEmbed, 400, 400); -+ set_browser_visibility(newBrowser, TRUE); -+} -+ -+void -+menu_stream_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ g_print("menu_stream_cb\n"); -+ const char *data; -+ const char *data2; -+ data = "Hi"; -+ data2 = " there\n"; -+ g_print("stream_clicked_cb\n"); -+ gtk_moz_embed_open_stream(GTK_MOZ_EMBED(browser->mozEmbed), -+ "file://", "text/html"); -+ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), -+ data, strlen(data)); -+ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), -+ data2, strlen(data2)); -+ gtk_moz_embed_close_stream(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+menu_memory_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ g_print("menu_memory_cb\n"); -+ nsCOMPtr os = do_GetService("@mozilla.org/observer-service;1"); -+ if (!os) -+ return; -+ -+ // Compact like you mean it. We do this three times to give the -+ // cycle collector a chance to try and reclaim as much as we can. -+ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); -+ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); -+ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); -+} -+ -+void -+menu_close_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ gtk_widget_destroy(browser->topLevelWindow); -+} -+ -+void -+menu_quit_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ TestGtkBrowser *tmpBrowser; -+ GList *tmp_list = browser_list; -+ tmpBrowser = (TestGtkBrowser *)tmp_list->data; -+ while (tmpBrowser) { -+ tmp_list = tmp_list->next; -+ gtk_widget_destroy(tmpBrowser->topLevelWindow); -+ tmpBrowser = (TestGtkBrowser *)tmp_list->data; -+ } -+} -+ -+gboolean -+delete_cb(GtkWidget *widget, GdkEventAny *event, TestGtkBrowser *browser) -+{ -+ g_print("delete_cb\n"); -+ gtk_widget_destroy(widget); -+ return TRUE; -+} -+ -+static gboolean -+idle_quit(void*) -+{ -+ gtk_main_quit(); -+ return FALSE; -+} -+ -+static gboolean -+idle_pop(void*) -+{ -+ gtk_moz_embed_pop_startup(); -+ return FALSE; -+} -+ -+void -+destroy_cb (GtkWidget *widget, TestGtkBrowser *browser) -+{ -+ GList *tmp_list; -+ g_print("destroy_cb\n"); -+ num_browsers--; -+ tmp_list = g_list_find(browser_list, browser); -+ browser_list = g_list_remove_link(browser_list, tmp_list); -+ if (browser->tempMessage) -+ g_free(browser->tempMessage); -+ g_idle_add(idle_pop, NULL); -+ if (num_browsers == 0) -+ g_idle_add (idle_quit, NULL); -+} -+ -+void -+location_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ char *newLocation; -+ int newPosition = 0; -+ g_print("location_changed_cb\n"); -+ newLocation = gtk_moz_embed_get_location(embed); -+ if (newLocation) -+ { -+ gtk_editable_delete_text(GTK_EDITABLE(browser->urlEntry), 0, -1); -+ gtk_editable_insert_text(GTK_EDITABLE(browser->urlEntry), -+ newLocation, strlen(newLocation), &newPosition); -+ g_free(newLocation); -+ } -+ else -+ g_print("failed to get location!\n"); -+ // always make sure to clear the tempMessage. it might have been -+ // set from the link before a click and we wouldn't have gotten the -+ // callback to unset it. -+ update_temp_message(browser, 0); -+ // update the nav buttons on a location change -+ update_nav_buttons(browser); -+} -+ -+void -+title_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ char *newTitle; -+ g_print("title_changed_cb\n"); -+ newTitle = gtk_moz_embed_get_title(embed); -+ if (newTitle) -+ { -+ gtk_window_set_title(GTK_WINDOW(browser->topLevelWindow), newTitle); -+ g_free(newTitle); -+ } -+ -+} -+ -+void -+load_started_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ g_print("load_started_cb\n"); -+ gtk_widget_set_sensitive(browser->stopButton, TRUE); -+ gtk_widget_set_sensitive(browser->reloadButton, FALSE); -+ browser->loadPercent = 0; -+ browser->bytesLoaded = 0; -+ browser->maxBytesLoaded = 0; -+ update_status_bar_text(browser); -+} -+ -+void -+load_finished_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ g_print("load_finished_cb\n"); -+ gtk_widget_set_sensitive(browser->stopButton, FALSE); -+ gtk_widget_set_sensitive(browser->reloadButton, TRUE); -+ browser->loadPercent = 0; -+ browser->bytesLoaded = 0; -+ browser->maxBytesLoaded = 0; -+ update_status_bar_text(browser); -+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(browser->progressBar), 0); -+} -+ -+ -+void -+net_state_change_cb (GtkMozEmbed *embed, gint flags, guint status, -+ TestGtkBrowser *browser) -+{ -+ g_print("net_state_change_cb %d\n", flags); -+ if (flags & GTK_MOZ_EMBED_FLAG_IS_REQUEST) { -+ if (flags & GTK_MOZ_EMBED_FLAG_REDIRECTING) -+ browser->statusMessage = "Redirecting to site..."; -+ else if (flags & GTK_MOZ_EMBED_FLAG_TRANSFERRING) -+ browser->statusMessage = "Transferring data from site..."; -+ else if (flags & GTK_MOZ_EMBED_FLAG_NEGOTIATING) -+ browser->statusMessage = "Waiting for authorization..."; -+ } -+ -+ if (status == GTK_MOZ_EMBED_STATUS_FAILED_DNS) -+ browser->statusMessage = "Site not found."; -+ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_CONNECT) -+ browser->statusMessage = "Failed to connect to site."; -+ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_TIMEOUT) -+ browser->statusMessage = "Failed due to connection timeout."; -+ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_USERCANCELED) -+ browser->statusMessage = "User canceled connecting to site."; -+ -+ if (flags & GTK_MOZ_EMBED_FLAG_IS_DOCUMENT) { -+ if (flags & GTK_MOZ_EMBED_FLAG_START) -+ browser->statusMessage = "Loading site..."; -+ else if (flags & GTK_MOZ_EMBED_FLAG_STOP) -+ browser->statusMessage = "Done."; -+ } -+ -+ update_status_bar_text(browser); -+ -+} -+ -+void net_state_change_all_cb (GtkMozEmbed *embed, const char *uri, -+ gint flags, guint status, -+ TestGtkBrowser *browser) -+{ -+ // g_print("net_state_change_all_cb %s %d %d\n", uri, flags, status); -+} -+ -+void progress_change_cb (GtkMozEmbed *embed, gint cur, gint max, -+ TestGtkBrowser *browser) -+{ -+ g_print("progress_change_cb cur %d max %d\n", cur, max); -+ -+ // avoid those pesky divide by zero errors -+ if (max < 1) -+ { -+ browser->loadPercent = 0; -+ browser->bytesLoaded = cur; -+ browser->maxBytesLoaded = 0; -+ update_status_bar_text(browser); -+ } -+ else -+ { -+ browser->bytesLoaded = cur; -+ browser->maxBytesLoaded = max; -+ if (cur > max) -+ browser->loadPercent = 100; -+ else -+ browser->loadPercent = (cur * 100) / max; -+ update_status_bar_text(browser); -+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(browser->progressBar), -+ browser->loadPercent / 100.0); -+ } -+ -+} -+ -+void progress_change_all_cb (GtkMozEmbed *embed, const char *uri, -+ gint cur, gint max, -+ TestGtkBrowser *browser) -+{ -+ //g_print("progress_change_all_cb %s cur %d max %d\n", uri, cur, max); -+} -+ -+void -+link_message_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ char *message; -+ g_print("link_message_cb\n"); -+ message = gtk_moz_embed_get_link_message(embed); -+ if (!message || !*message) -+ update_temp_message(browser, 0); -+ else -+ update_temp_message(browser, message); -+ if (message) -+ g_free(message); -+} -+ -+void -+js_status_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ char *message; -+ g_print("js_status_cb\n"); -+ message = gtk_moz_embed_get_js_status(embed); -+ if (!message || !*message) -+ update_temp_message(browser, 0); -+ else -+ update_temp_message(browser, message); -+ if (message) -+ g_free(message); -+} -+ -+void -+new_window_cb (GtkMozEmbed *embed, GtkMozEmbed **newEmbed, guint chromemask, TestGtkBrowser *browser) -+{ -+ g_print("new_window_cb\n"); -+ g_print("embed is %p chromemask is %d\n", (void *)embed, chromemask); -+ TestGtkBrowser *newBrowser = new_gtk_browser(chromemask); -+ gtk_widget_set_size_request(newBrowser->mozEmbed, 400, 400); -+ *newEmbed = GTK_MOZ_EMBED(newBrowser->mozEmbed); -+ g_print("new browser is %p\n", (void *)*newEmbed); -+} -+ -+void -+visibility_cb (GtkMozEmbed *embed, gboolean visibility, TestGtkBrowser *browser) -+{ -+ g_print("visibility_cb %d\n", visibility); -+ set_browser_visibility(browser, visibility); -+} -+ -+void -+destroy_brsr_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ g_print("destroy_brsr_cb\n"); -+ gtk_widget_destroy(browser->topLevelWindow); -+} -+ -+gint -+open_uri_cb (GtkMozEmbed *embed, const char *uri, TestGtkBrowser *browser) -+{ -+ g_print("open_uri_cb %s\n", uri); -+ -+ // interrupt this test load -+ if (!strcmp(uri, "http://people.redhat.com/blizzard/monkeys.txt")) -+ return TRUE; -+ // don't interrupt anything -+ return FALSE; -+} -+ -+void -+size_to_cb (GtkMozEmbed *embed, gint width, gint height, -+ TestGtkBrowser *browser) -+{ -+ g_print("*** size_to_cb %d %d\n", width, height); -+ gtk_widget_set_size_request(browser->mozEmbed, width, height); -+} -+ -+gint dom_key_down_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser) -+{ -+ PRUint32 keyCode = 0; -+ // g_print("dom_key_down_cb\n"); -+ event->GetKeyCode(&keyCode); -+ // g_print("key code is %d\n", keyCode); -+ return NS_OK; -+} -+ -+gint dom_key_press_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser) -+{ -+ PRUint32 keyCode = 0; -+ // g_print("dom_key_press_cb\n"); -+ event->GetCharCode(&keyCode); -+ // g_print("char code is %d\n", keyCode); -+ return NS_OK; -+} -+ -+gint dom_key_up_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser) -+{ -+ PRUint32 keyCode = 0; -+ // g_print("dom_key_up_cb\n"); -+ event->GetKeyCode(&keyCode); -+ // g_print("key code is %d\n", keyCode); -+ return NS_OK; -+} -+ -+gint dom_mouse_down_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ // g_print("dom_mouse_down_cb\n"); -+ return NS_OK; -+ } -+ -+gint dom_mouse_up_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ // g_print("dom_mouse_up_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_mouse_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ // g_print("dom_mouse_click_cb\n"); -+ PRUint16 button; -+ event->GetButton(&button); -+ printf("button was %d\n", button); -+ return NS_OK; -+} -+ -+gint dom_mouse_dbl_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ // g_print("dom_mouse_dbl_click_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_mouse_over_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_mouse_over_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_mouse_out_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_mouse_out_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_activate_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_activate_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_focus_in_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_focus_in_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_focus_out_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_focus_out_cb\n"); -+ return NS_OK; -+} -+ -+void new_window_orphan_cb (GtkMozEmbedSingle *embed, -+ GtkMozEmbed **retval, guint chromemask, -+ gpointer data) -+{ -+ g_print("new_window_orphan_cb\n"); -+ g_print("chromemask is %d\n", chromemask); -+ TestGtkBrowser *newBrowser = new_gtk_browser(chromemask); -+ *retval = GTK_MOZ_EMBED(newBrowser->mozEmbed); -+ g_print("new browser is %p\n", (void *)*retval); -+} -+ -+// utility functions -+ -+void -+update_status_bar_text(TestGtkBrowser *browser) -+{ -+ gchar message[256]; -+ -+ gtk_statusbar_pop(GTK_STATUSBAR(browser->statusBar), 1); -+ if (browser->tempMessage) -+ gtk_statusbar_push(GTK_STATUSBAR(browser->statusBar), 1, browser->tempMessage); -+ else -+ { -+ if (browser->loadPercent) -+ { -+ g_snprintf(message, 255, "%s (%d%% complete, %d bytes of %d loaded)", browser->statusMessage, browser->loadPercent, browser->bytesLoaded, browser->maxBytesLoaded); -+ } -+ else if (browser->bytesLoaded) -+ { -+ g_snprintf(message, 255, "%s (%d bytes loaded)", browser->statusMessage, browser->bytesLoaded); -+ } -+ else if (browser->statusMessage == NULL) -+ { -+ g_snprintf(message, 255, " "); -+ } -+ else -+ { -+ g_snprintf(message, 255, "%s", browser->statusMessage); -+ } -+ gtk_statusbar_push(GTK_STATUSBAR(browser->statusBar), 1, message); -+ } -+} -+ -+void -+update_temp_message(TestGtkBrowser *browser, const char *message) -+{ -+ if (browser->tempMessage) -+ g_free(browser->tempMessage); -+ if (message) -+ browser->tempMessage = g_strdup(message); -+ else -+ browser->tempMessage = 0; -+ // now that we've updated the temp message, redraw the status bar -+ update_status_bar_text(browser); -+} -+ -+ -+void -+update_nav_buttons (TestGtkBrowser *browser) -+{ -+ gboolean can_go_back; -+ gboolean can_go_forward; -+ can_go_back = gtk_moz_embed_can_go_back(GTK_MOZ_EMBED(browser->mozEmbed)); -+ can_go_forward = gtk_moz_embed_can_go_forward(GTK_MOZ_EMBED(browser->mozEmbed)); -+ if (can_go_back) -+ gtk_widget_set_sensitive(browser->backButton, TRUE); -+ else -+ gtk_widget_set_sensitive(browser->backButton, FALSE); -+ if (can_go_forward) -+ gtk_widget_set_sensitive(browser->forwardButton, TRUE); -+ else -+ gtk_widget_set_sensitive(browser->forwardButton, FALSE); -+ } -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2012-03-09 15:19:22.267678760 +0100 -@@ -0,0 +1,142 @@ -+/** simplemdi.c **/ -+/* -+ * Sample code from "GNOME/GTK+ Programming Bible" by Arthur Griffith -+ * Modified by Kevin Gibbs (kgibbs@stanford.edu) to provide sample of -+ * GtkMozEmbed realization/unrealization crashes. -+ * -+ * To get a fatal crash, simply run the program, click on the "Mozilla" -+ * tab to display the MozEmbed widget, and then try to drag that MDI tab -+ * off to a new window. -+ * -+ * Although this test might seem elaborate, it is really only a convenient -+ * to create a situation where the widget is realized, unrealized, and -+ * realized again at some point. (Dragging the MDI tab off to a new window -+ * causes all widgets to be unrealized in the old window, and then realized -+ * again in the new window.) -+ */ -+ -+#include -+#include "gtkmozembed.h" -+ -+// Testing flags -+// -+ -+// Define this flag to have the test program use the gtkmozembed widget. -+// Without this flag, mozilla is never loaded in the program, and a simple -+// widget is used in place of the mozembed widget. -+#define USE_MOZILLA_TEST -+ -+// Define this flag to have a simpler test than the usual one. The normal -+// test builds a notebook inside of each MDI view, with one page being a label -+// and the other page being a browser widget. The simpler test does not -+// build a notebook and simply puts the browser widget in the MDI view itself. -+// Currently, this test is not very interesting, since for some reason all -+// the webshells just create and destroy themselves. (???) -+//#define SIMPLER_TEST -+ -+// Define this flag to use a GnomePixmap instead of a GtkLabel as the -+// replacement for the gtkmozembed widget when USE_MOZILLA_TEST is -+// undefined. This is to stress test the program a bit more by providing a -+// replacement widget slightly more complex than GtkLabel. -+// (Has no effect when USE_MOZILLA_TEST is defined.) -+#define SAMPLE_PIXMAP -+ -+ -+gint eventDelete(GtkWidget *widget, -+ GdkEvent *event,gpointer data); -+gint eventDestroy(GtkWidget *widget, -+ GdkEvent *event,gpointer data); -+ -+static void addChild(GtkObject *mdi,gchar *name); -+static GtkWidget *setLabel(GnomeMDIChild *child, -+ GtkWidget *currentLabel,gpointer data); -+static GtkWidget *createView(GnomeMDIChild *child, -+ gpointer data); -+ -+int main(int argc,char *argv[]) -+{ -+ GtkObject *mdi; -+ -+ gnome_init("simplemdi","1.0",argc,argv); -+ mdi = gnome_mdi_new("simplemdi","Simple MDI"); -+ gtk_signal_connect(mdi,"destroy", -+ GTK_SIGNAL_FUNC(eventDestroy),NULL); -+ -+ addChild(mdi,"First"); -+ addChild(mdi,"Second"); -+ addChild(mdi,"Third"); -+ addChild(mdi,"Last"); -+ -+ gnome_mdi_set_mode(GNOME_MDI(mdi),GNOME_MDI_NOTEBOOK); -+ //gnome_mdi_open_toplevel(GNOME_MDI(mdi)); -+ -+ gtk_main(); -+ exit(0); -+} -+static void addChild(GtkObject *mdi,gchar *name) -+{ -+ GnomeMDIGenericChild *child; -+ -+ child = gnome_mdi_generic_child_new(name); -+ gnome_mdi_add_child(GNOME_MDI(mdi), -+ GNOME_MDI_CHILD(child)); -+ -+ gnome_mdi_generic_child_set_view_creator(child, -+ createView,name); -+ gnome_mdi_generic_child_set_label_func(child,setLabel, -+ NULL); -+ gnome_mdi_add_view(GNOME_MDI(mdi), -+ GNOME_MDI_CHILD(child)); -+} -+static GtkWidget *createView(GnomeMDIChild *child, -+ gpointer data) -+{ -+#ifdef USE_MOZILLA_TEST -+ GtkWidget *browser = gtk_moz_embed_new(); -+#else -+#ifndef SAMPLE_PIXMAP -+ GtkWidget *browser = gtk_label_new("lynx 0.01a"); -+#else -+ /* Another example -- */ -+ GtkWidget *browser = -+ gnome_pixmap_new_from_file("/usr/share/pixmaps/emacs.png"); -+#endif /* SAMPLE_PIXMAP */ -+#endif /* USE_MOZILLA_TEST */ -+ -+ GtkWidget *notebook = gtk_notebook_new(); -+ char str[80]; -+ -+ sprintf(str,"View of the\n%s widget",(gchar *)data); -+ -+#ifdef USE_MOZILLA_TEST -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser), "http://www.mozilla.org"); -+#endif /* USE_MOZILLA_TEST */ -+ -+#ifndef SIMPLER_TEST -+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), gtk_label_new(str), -+ gtk_label_new("Label")); -+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), browser, -+ gtk_label_new("Mozilla")); -+ gtk_widget_show_all(notebook); -+ return (notebook); -+#else -+ gtk_widget_show(browser); -+ return (browser); -+#endif /* SIMPLER_TEST */ -+} -+ -+static GtkWidget *setLabel(GnomeMDIChild *child, -+ GtkWidget *currentLabel,gpointer data) -+{ -+ if(currentLabel == NULL) -+ return(gtk_label_new(child->name)); -+ -+ gtk_label_set_text(GTK_LABEL(currentLabel), -+ child->name); -+ return(currentLabel); -+} -+gint eventDestroy(GtkWidget *widget, -+ GdkEvent *event,gpointer data) { -+ gtk_main_quit(); -+ return(0); -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2012-03-09 15:19:22.267678760 +0100 -@@ -0,0 +1,86 @@ -+#include -+#include -+#include -+#include "nsStringAPI.h" -+#include "gtkmozembed_glue.cpp" -+ -+int main(int argc, char *argv[]) -+{ -+ GtkWidget *window; -+ GtkWidget *label; -+ GtkWidget *mozembed; -+ GtkWidget *container; -+ char *url; -+ -+ gtk_init(&argc, &argv); -+ -+ static const GREVersionRange greVersion = { -+ "1.9a", PR_TRUE, -+ "2", PR_TRUE -+ }; -+ -+ char xpcomPath[PATH_MAX]; -+ -+ nsresult rv = -+ GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, -+ xpcomPath, sizeof(xpcomPath)); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find a compatible GRE.\n"); -+ return 1; -+ } -+ -+ rv = XPCOMGlueStartup(xpcomPath); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't start XPCOM."); -+ return 1; -+ } -+ -+ rv = GTKEmbedGlueStartup(); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); -+ return 1; -+ } -+ -+ char *lastSlash = strrchr(xpcomPath, '/'); -+ if (lastSlash) -+ *lastSlash = '\0'; -+ -+ gtk_moz_embed_set_path(xpcomPath); -+ -+ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); -+ -+ container = gtk_notebook_new(); -+ mozembed = gtk_moz_embed_new(); -+ label = gtk_label_new("Can you see this message?\n" -+ "Once you switch to mozembed page " -+ "you never see this message."); -+ -+ g_signal_connect(GTK_OBJECT(mozembed), "destroy", -+ G_CALLBACK(gtk_main_quit), -+NULL); -+ -+ gtk_container_add(GTK_CONTAINER(window), container); -+ -+ gtk_notebook_append_page(GTK_NOTEBOOK(container), -+ label, -+ gtk_label_new("gtk label")); -+ -+ gtk_notebook_append_page(GTK_NOTEBOOK(container), -+ mozembed, -+ gtk_label_new("mozembed")); -+ -+ -+ -+ -+ gtk_widget_set_size_request(window, 400, 300); -+ gtk_widget_show(mozembed); -+ gtk_widget_show(label); -+ gtk_widget_show_all(window); -+ -+ url = (argc > 1) ? argv[1] : (char *)"localhost"; -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(mozembed), url); -+ -+ gtk_main(); -+ -+ return 0; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2012-03-09 15:19:22.267678760 +0100 -@@ -0,0 +1,109 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+GtkWidget *toplevel_window = 0; -+GtkWidget *button = 0; -+GtkWidget *vbox = 0; -+GtkWidget *gtk_socket = 0; -+ -+void -+insert_mozilla(gpointer data); -+ -+int -+main(int argc, char **argv) -+{ -+ gtk_init(&argc, &argv); -+ -+ toplevel_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); -+ -+ g_signal_connect(GTK_OBJECT(toplevel_window), "destroy", -+ G_CALLBACK(exit), NULL); -+ -+ vbox = gtk_vbox_new(FALSE, 0); -+ gtk_container_add(GTK_CONTAINER(toplevel_window), vbox); -+ gtk_widget_show(vbox); -+ -+ button = gtk_button_new_with_label("Insert Mozilla"); -+ -+ gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); -+ gtk_widget_show(button); -+ -+ g_signal_connect(GTK_OBJECT(button), "clicked", -+ G_CALLBACK(insert_mozilla), NULL); -+ -+ gtk_widget_show(toplevel_window); -+ -+ gtk_main(); -+ -+ return 0; -+} -+ -+void -+insert_mozilla(gpointer data) -+{ -+ char buffer[20]; -+ int pid; -+ -+ if (gtk_socket) -+ return; -+ -+ gtk_socket = gtk_socket_new(); -+ gtk_box_pack_start(GTK_BOX(vbox), gtk_socket, TRUE, TRUE, 0); -+ gtk_widget_show(gtk_socket); -+ -+ sprintf(buffer, "%#lx", GDK_WINDOW_XWINDOW(gtk_socket->window)); -+ -+ gdk_flush(); -+ -+ if ((pid = fork()) == 0) { /* child */ -+ execl("./TestGtkEmbedChild", "./TestGtkEmbedChild", buffer, NULL); -+ fprintf(stderr, "can't exec child\n"); -+ _exit(1); -+ } -+ else if (pid > 0) { /* parent */ -+ } -+ else { -+ fprintf(stderr, "Can't fork.\n"); -+ } -+} -diff -up xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in ---- xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2012-03-09 01:40:05.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in 2012-03-09 15:19:22.268678765 +0100 -@@ -73,6 +73,8 @@ CPPSRCS += dlldeps-xul.cpp - endif - - ifneq (,$(MOZ_ENABLE_GTK2)) -+SHARED_LIBRARY_LIBS += \ -+ $(DEPTH)/embedding/browser/gtk/src/$(LIB_PREFIX)gtkembedmoz.$(LIB_SUFFIX) - DEFINES += -DMOZ_ENABLE_GTK2 - endif - -diff -up xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh ---- xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2012-03-09 01:40:06.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2012-03-09 15:19:22.268678765 +0100 -@@ -438,6 +438,9 @@ MAKEFILES_embedding=" - embedding/browser/Makefile - embedding/browser/build/Makefile - embedding/browser/webBrowser/Makefile -+ embedding/browser/gtk/Makefile -+ embedding/browser/gtk/src/Makefile -+ embedding/browser/gtk/tests/Makefile - embedding/components/Makefile - embedding/components/appstartup/src/Makefile - embedding/components/build/Makefile -diff -up xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk ---- xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2012-03-09 01:40:06.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk 2012-03-09 15:19:22.269678770 +0100 -@@ -220,6 +220,12 @@ endif - - tier_platform_dirs += services/crypto/component - -+ifndef BUILD_STATIC_LIBS -+ifneq (,$(MOZ_ENABLE_GTK2)) -+tier_platform_dirs += embedding/browser/gtk -+endif -+endif -+ - tier_platform_dirs += startupcache - - tier_platform_dirs += js/ductwork/debugger -diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in ---- xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2012-03-09 15:19:22.240678626 +0100 -+++ xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in 2012-03-09 15:19:22.275678799 +0100 -@@ -80,6 +80,8 @@ pkg_config_files = \ - libxul-embedding.pc \ - mozilla-js.pc \ - mozilla-plugin.pc \ -+ mozilla-gtkmozembed.pc \ -+ mozilla-gtkmozembed-embedding.pc \ - $(NULL) - - ifdef MOZ_NATIVE_NSPR -diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2012-03-09 15:19:22.270678775 +0100 -+++ xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2012-03-09 15:19:22.270678775 +0100 -@@ -0,0 +1,9 @@ -+prefix=%prefix% -+sdkdir=%sdkdir% -+includedir=%includedir% -+libdir=%libdir% -+ -+Name: mozilla-gtkembedmoz -+Description: Static version-independent Mozilla Embedding Widget for Gtk+ -+Version: %MOZILLA_VERSION% -+Requires: libxul-embedding = %MOZILLA_VERSION% -diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in ---- xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2012-03-09 15:19:22.270678775 +0100 -+++ xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2012-03-09 15:19:22.270678775 +0100 -@@ -0,0 +1,9 @@ -+prefix=%prefix% -+sdkdir=%sdkdir% -+includedir=%includedir% -+libdir=%libdir% -+ -+Name: mozilla-gtkembedmoz -+Description: Mozilla Embedding Widget for Gtk+ -+Version: %MOZILLA_VERSION% -+Requires: libxul = %MOZILLA_VERSION% diff --git a/rhbz-855919.patch b/rhbz-855919.patch new file mode 100644 index 0000000..5315f57 --- /dev/null +++ b/rhbz-855919.patch @@ -0,0 +1,19 @@ +Index: mozilla-release/js/src/gc/Memory.cpp +=================================================================== +--- mozilla-release.orig/js/src/gc/Memory.cpp ++++ mozilla-release/js/src/gc/Memory.cpp +@@ -348,9 +348,14 @@ UnmapPages(void *p, size_t size) + bool + MarkPagesUnused(void *p, size_t size) + { ++// A workaround for Bug 746112 - endless loop on ppc64 ++#if !(defined(__powerpc__)) + JS_ASSERT(uintptr_t(p) % PageSize == 0); + int result = madvise(p, size, MADV_DONTNEED); + return result != -1; ++#else ++ return true; ++#endif + } + + bool diff --git a/xulrunner.spec b/xulrunner.spec index 6be9d8c..b9943d5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 15.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -87,9 +87,6 @@ Source21: %{name}.sh.in Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch -%if 0%{?fedora} <= 15 -Patch16: add-gtkmozembed-11.0.patch -%endif Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-12.0-jemalloc-ppc.patch @@ -100,6 +97,7 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch49: mozilla-746112.patch Patch51: mozilla-709732-gfx-icc-profile-fix.patch +Patch52: rhbz-855919.patch # --------------------------------------------------- @@ -227,9 +225,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch1 -p1 -b .build %patch14 -p1 -b .chromium-types -%if 0%{?fedora} <= 15 -%patch16 -p2 -b .gtkmozembed -%endif %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc @@ -237,6 +232,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %ifarch ppc ppc64 %patch49 -p2 -b .746112 +%patch52 -p1 -b .855919 %endif %patch51 -p1 -b .709732 @@ -509,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 17 2012 Martin Stransky - 15.0.1-3 +- Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 + * Fri Sep 14 2012 Martin Stransky - 15.0.1-2 - Added build flags for second arches From 00bca4036206c89cb5d2ad038be841fb92b0777f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 18 Sep 2012 13:15:45 +0200 Subject: [PATCH 293/486] removed unused patch --- xulrunner-omnijar-5.patch | 1324 ------------------------------------- 1 file changed, 1324 deletions(-) delete mode 100644 xulrunner-omnijar-5.patch diff --git a/xulrunner-omnijar-5.patch b/xulrunner-omnijar-5.patch deleted file mode 100644 index 4cf2ac2..0000000 --- a/xulrunner-omnijar-5.patch +++ /dev/null @@ -1,1324 +0,0 @@ -# HG changeset patch -# Parent a7dea879b4b445a23186f438900562155bb39e99 -Bug 620931 part 1 - Use chrome manifest to register resource://gre-resources/ - -diff -up xulrunner-5.0/mozilla-release/browser/locales/Makefile.in.omnijar xulrunner-5.0/mozilla-release/browser/locales/Makefile.in ---- xulrunner-5.0/mozilla-release/browser/locales/Makefile.in.omnijar 2011-06-15 23:57:18.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/browser/locales/Makefile.in 2011-06-21 13:16:56.434904620 +0200 -@@ -186,7 +186,7 @@ libs-%: - @$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1 - @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 - @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 -- @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1 -+ @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR) BOTH_MANIFESTS=1 - @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 - - -diff -up xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp.omnijar xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp ---- xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp.omnijar 2011-06-15 23:57:27.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp 2011-06-21 12:46:33.537167186 +0200 -@@ -492,16 +492,19 @@ GeckoChildProcessHost::PerformAsyncLaunc - - childArgv.insert(childArgv.end(), aExtraOpts.begin(), aExtraOpts.end()); - --#ifdef MOZ_OMNIJAR - // Make sure the child process can find the omnijar - // See XRE_InitCommandLine in nsAppRunner.cpp -- nsCAutoString omnijarPath; -- if (mozilla::OmnijarPath()) { -- mozilla::OmnijarPath()->GetNativePath(omnijarPath); -- childArgv.push_back("-omnijar"); -- childArgv.push_back(omnijarPath.get()); -+ nsCAutoString path; -+ nsCOMPtr file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE); -+ if (file && NS_SUCCEEDED(file->GetNativePath(path))) { -+ childArgv.push_back("-grebase"); -+ childArgv.push_back(path.get()); -+ } -+ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP); -+ if (file && NS_SUCCEEDED(file->GetNativePath(path))) { -+ childArgv.push_back("-appbase"); -+ childArgv.push_back(path.get()); - } --#endif - - childArgv.push_back(pidstring); - -@@ -604,16 +607,19 @@ GeckoChildProcessHost::PerformAsyncLaunc - - cmdLine.AppendLooseValue(std::wstring(mGroupId.get())); - --#ifdef MOZ_OMNIJAR - // Make sure the child process can find the omnijar - // See XRE_InitCommandLine in nsAppRunner.cpp -- nsAutoString omnijarPath; -- if (mozilla::OmnijarPath()) { -- mozilla::OmnijarPath()->GetPath(omnijarPath); -- cmdLine.AppendLooseValue(UTF8ToWide("-omnijar")); -- cmdLine.AppendLooseValue(omnijarPath.get()); -+ nsAutoString path; -+ nsCOMPtr file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE); -+ if (file && NS_SUCCEEDED(file->GetPath(path))) { -+ cmdLine.AppendLooseValue(UTF8ToWide("-grebase")); -+ cmdLine.AppendLooseValue(path.get()); -+ } -+ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP); -+ if (file && NS_SUCCEEDED(file->GetPath(path))) { -+ cmdLine.AppendLooseValue(UTF8ToWide("-appbase")); -+ cmdLine.AppendLooseValue(path.get()); - } --#endif - - cmdLine.AppendLooseValue(UTF8ToWide(pidstring)); - -diff -up xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp.omnijar xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp ---- xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp.omnijar 2011-06-15 23:57:31.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp 2011-06-21 13:34:03.057293901 +0200 -@@ -86,6 +86,7 @@ - #include "nsILocalFileWin.h" - #endif - #include "xpcprivate.h" -+#include "nsIResProtocolHandler.h" - - #ifdef MOZ_ENABLE_LIBXUL - #include "mozilla/scache/StartupCache.h" -@@ -626,24 +627,11 @@ mozJSComponentLoader::LoadModuleFromJAR( - #if !defined(XPCONNECT_STANDALONE) - nsresult rv; - -- nsCAutoString fullSpec; -- --#ifdef MOZ_OMNIJAR -- PRBool equal; -- rv = aJarFile->Equals(mozilla::OmnijarPath(), &equal); -- if (NS_SUCCEEDED(rv) && equal) { -- fullSpec = "resource://gre/"; -- } else { --#endif -- nsCAutoString fileSpec; -- NS_GetURLSpecFromActualFile(aJarFile, fileSpec); -- fullSpec = "jar:"; -- fullSpec += fileSpec; -- fullSpec += "!/"; --#ifdef MOZ_OMNIJAR -- } --#endif -- -+ nsCAutoString fullSpec, fileSpec; -+ NS_GetURLSpecFromActualFile(aJarFile, fileSpec); -+ fullSpec = "jar:"; -+ fullSpec += fileSpec; -+ fullSpec += "!/"; - fullSpec += aComponentPath; - - nsCOMPtr uri; -@@ -827,47 +815,129 @@ class JSPrincipalsHolder - JSPrincipals *mPrincipals; - }; - -+static const char baseName[2][5] = { "gre/", "app/" }; -+ -+static inline PRBool -+canonicalizeBase(nsCAutoString &spec, nsACString &out, mozilla::Omnijar::Type aType) -+{ -+ nsCAutoString base; -+ nsresult rv = mozilla::Omnijar::GetURIString(aType, base); -+ -+ if (NS_FAILED(rv) || !base.Length()) -+ return PR_FALSE; -+ -+ if (base.Compare(spec.get(), PR_FALSE, base.Length())) -+ return PR_FALSE; -+ -+ out.Append("/resource/"); -+ out.Append(baseName[aType]); -+ out.Append(Substring(spec, base.Length())); -+ return PR_TRUE; -+} -+ - /** - * PathifyURI transforms mozilla .js uris into useful zip paths - * to make it makes it easier to manipulate startup cache entries - * using standard zip tools. - * Transformations applied: -- * * jsloader/ prefix is used to group mozJSComponentLoader cache entries in -+ * * jsloader/ prefix is used to group mozJSComponentLoader cache entries in - * a top-level zip directory. -- * * In MOZ_OMNIJAR case resource:/// and resource://gre/ URIs refer to the same path -- * so treat both of them as resource://gre/ -+ * * resource:// URIs are resolved to their corresponding file/jar URI to -+ * canonicalize resources URIs other than gre and app. -+ * * Paths under GRE or APP directory have their base path replaced with -+ * resource/gre or resource/app to avoid depending on install location. -+ * * jar:file:///path/to/file.jar!/sub/path urls are replaced with -+ * /path/to/file.jar/sub/path - * * .bin suffix is added to the end of the path to indicate that jsloader/ entries - * are binary representations of JS source. - * For example: -- * resource://gre/modules/XPCOMUtils.jsm becomes -- * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin -+ * resource://gre/modules/XPCOMUtils.jsm or -+ * file://$GRE_DIR/modules/XPCOMUtils.jsm or -+ * jar:file://$GRE_DIR/omni.jar!/modules/XPCOMUtils.jsm become -+ * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin -+ * file://$PROFILE_DIR/extensions/{uuid}/components/component.js becomes -+ * jsloader/$PROFILE_DIR/extensions/%7Buuid%7D/components/component.js.bin -+ * jar:file://$PROFILE_DIR/extensions/some.xpi!/components/component.js becomes -+ * jsloader/$PROFILE_DIR/extensions/some.xpi/components/component.js.bin - */ - static nsresult - PathifyURI(nsIURI *in, nsACString &out) - { -- out = "jsloader/"; -- nsCAutoString scheme; -- nsresult rv = in->GetScheme(scheme); -- NS_ENSURE_SUCCESS(rv, rv); -- out.Append(scheme); -- nsCAutoString host; -- // OK for GetHost to fail since it's not implemented sometimes -- in->GetHost(host); --#ifdef MOZ_OMNIJAR -- if (scheme.Equals("resource") && host.Length() == 0){ -- host = "gre"; -- } --#endif -- if (host.Length()) { -- out.Append("/"); -- out.Append(host); -- } -- nsCAutoString path; -- rv = in->GetPath(path); -- NS_ENSURE_SUCCESS(rv, rv); -- out.Append(path); -- out.Append(".bin"); -- return NS_OK; -+ PRBool equals; -+ nsresult rv; -+ nsCOMPtr uri = in; -+ nsCAutoString spec; -+ -+ out = "jsloader"; -+ -+ // Resolve resource:// URIs. At the end of this if/else block, we -+ // have both spec and uri variables identifying the same URI. -+ if (NS_SUCCEEDED(in->SchemeIs("resource", &equals)) && equals) { -+ nsCOMPtr ioService = do_GetIOService(&rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCOMPtr ph; -+ rv = ioService->GetProtocolHandler("resource", getter_AddRefs(ph)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCOMPtr irph(do_QueryInterface(ph, &rv)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = irph->ResolveURI(in, spec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = ioService->NewURI(spec, nsnull, nsnull, getter_AddRefs(uri)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } else { -+ rv = in->GetSpec(spec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } -+ -+ if (!canonicalizeBase(spec, out, mozilla::Omnijar::GRE) && -+ !canonicalizeBase(spec, out, mozilla::Omnijar::APP)) { -+ if (NS_SUCCEEDED(uri->SchemeIs("file", &equals)) && equals) { -+ nsCOMPtr baseFileURL; -+ baseFileURL = do_QueryInterface(uri, &rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCAutoString path; -+ rv = baseFileURL->GetPath(path); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ out.Append(path); -+ } else if (NS_SUCCEEDED(uri->SchemeIs("jar", &equals)) && equals) { -+ nsCOMPtr jarURI = do_QueryInterface(uri, &rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCOMPtr jarFileURI; -+ rv = jarURI->GetJARFile(getter_AddRefs(jarFileURI)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCOMPtr jarFileURL; -+ jarFileURL = do_QueryInterface(jarFileURI, &rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCAutoString path; -+ rv = jarFileURL->GetPath(path); -+ NS_ENSURE_SUCCESS(rv, rv); -+ out.Append(path); -+ -+ rv = jarURI->GetJAREntry(path); -+ NS_ENSURE_SUCCESS(rv, rv); -+ out.Append("/"); -+ out.Append(path); -+ } else { // Very unlikely -+ nsCAutoString spec; -+ rv = uri->GetSpec(spec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ out.Append("/"); -+ out.Append(spec); -+ } -+ } -+ -+ out.Append(".bin"); -+ return NS_OK; - } - - /* static */ -diff -up xulrunner-5.0/mozilla-release/layout/style/jar.mn.omnijar xulrunner-5.0/mozilla-release/layout/style/jar.mn ---- xulrunner-5.0/mozilla-release/layout/style/jar.mn.omnijar 2011-06-15 23:57:39.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/layout/style/jar.mn 2011-06-21 12:46:33.530167305 +0200 -@@ -6,3 +6,5 @@ toolkit.jar: - * res/forms.css (forms.css) - res/arrow.gif (arrow.gif) - res/arrowd.gif (arrowd.gif) -+ -+% resource gre-resources %res/ -diff -up xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp.omnijar xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp ---- xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp.omnijar 2011-06-15 23:58:10.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp 2011-06-21 13:23:23.829895163 +0200 -@@ -177,16 +177,14 @@ nsJAR::Open(nsIFile* zipFile) - mOuterZipEntry.Truncate(); - mOpened = PR_TRUE; - --#ifdef MOZ_OMNIJAR - // The omnijar is special, it is opened early on and closed late - // this avoids reopening it -- PRBool equals; -- nsresult rv = zipFile->Equals(mozilla::OmnijarPath(), &equals); -- if (NS_SUCCEEDED(rv) && equals) { -- mZip = mozilla::OmnijarReader(); -+ nsZipArchive *zip = mozilla::Omnijar::GetReader(zipFile); -+ if (zip) { -+ mZip = zip; - return NS_OK; - } --#endif -+ - return mZip->OpenArchive(zipFile); - } - -@@ -235,13 +233,13 @@ nsJAR::Close() - mGlobalStatus = JAR_MANIFEST_NOT_PARSED; - mTotalItemsInManifest = 0; - --#ifdef MOZ_OMNIJAR -- if (mZip == mozilla::OmnijarReader()) { -+ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) || -+ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP))) { - mZip.forget(); - mZip = new nsZipArchive(); - return NS_OK; - } --#endif -+ - return mZip->CloseArchive(); - } - -@@ -392,12 +390,11 @@ nsJAR::GetCertificatePrincipal(const cha - return NS_ERROR_NULL_POINTER; - *aPrincipal = nsnull; - --#ifdef MOZ_OMNIJAR - // Don't check signatures in the omnijar - this is only - // interesting for extensions/XPIs. -- if (mZip == mozilla::OmnijarReader()) -+ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) || -+ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP))) - return NS_OK; --#endif - - //-- Parse the manifest - nsresult rv = ParseManifest(); -diff -up xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp.omnijar xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp ---- xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp.omnijar 2011-06-15 23:57:41.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp 2011-06-21 12:46:33.545167043 +0200 -@@ -70,10 +70,8 @@ - - #include "nsITimelineService.h" - --#ifdef MOZ_OMNIJAR - #include "mozilla/Omnijar.h" - #include "nsZipArchive.h" --#endif - - // Definitions - #define INITIAL_PREF_FILES 10 -@@ -784,30 +782,6 @@ static nsresult pref_LoadPrefsInDirList( - return NS_OK; - } - --//---------------------------------------------------------------------------------------- --// Initialize default preference JavaScript buffers from --// appropriate TEXT resources --//---------------------------------------------------------------------------------------- --static nsresult pref_InitDefaults() --{ -- nsCOMPtr greprefsFile; -- nsresult rv; -- -- rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js")); -- NS_ENSURE_SUCCESS(rv, rv); -- -- rv = openPrefFile(greprefsFile); -- if (NS_FAILED(rv)) { -- NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?"); -- } -- -- return NS_OK; --} -- --#ifdef MOZ_OMNIJAR - static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name) - { - nsZipItemPtr manifest(jarReader, name, true); -@@ -821,77 +795,121 @@ static nsresult pref_ReadPrefFromJar(nsZ - return rv; - } - --static nsresult pref_InitAppDefaultsFromOmnijar() -+//---------------------------------------------------------------------------------------- -+// Initialize default preference JavaScript buffers from -+// appropriate TEXT resources -+//---------------------------------------------------------------------------------------- -+static nsresult pref_InitInitialObjects() - { - nsresult rv; - -- nsZipArchive* jarReader = mozilla::OmnijarReader(); -- if (!jarReader) -- return pref_InitDefaults(); -- -- rv = pref_ReadPrefFromJar(jarReader, "greprefs.js"); -- NS_ENSURE_SUCCESS(rv, rv); -+ // In omni.jar case, we load the following prefs: -+ // - jar:$gre/omni.jar!/greprefs.js -+ // - jar:$gre/omni.jar!/defaults/pref/*.js -+ // In non omni.jar case, we load: -+ // - $gre/greprefs.js -+ // -+ // When $app == $gre, we additionally load, in all cases: -+ // - $gre/defaults/pref/*.js -+ // This is kept for bug 591866 (channel-prefs.js should not be in omni.jar). -+ // We load all files instead of channel-prefs.js only to have the same -+ // behaviour as $app != $gre. -+ // -+ // When $app != $gre, we additionally load, in omni.jar case: -+ // - jar:$app/omni.jar!/defaults/preferences/*.js -+ // - $app/defaults/preferences/*.js -+ // and in non omni.jar case: -+ // - $app/defaults/preferences/*.js - - nsZipFind *findPtr; -- rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); -- NS_ENSURE_SUCCESS(rv, rv); -- -- nsAutoPtr find(findPtr); -- -+ nsAutoPtr find; - nsTArray prefEntries; - const char *entryName; - PRUint16 entryNameLen; -- while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { -- prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); -- } - -- prefEntries.Sort(); -- for (PRUint32 i = prefEntries.Length(); i--; ) { -- rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); -- if (NS_FAILED(rv)) -- NS_WARNING("Error parsing preferences."); -- } -+ nsZipArchive* jarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE); -+ if (jarReader) { -+ // Load jar:$gre/omni.jar!/greprefs.js -+ rv = pref_ReadPrefFromJar(jarReader, "greprefs.js"); -+ NS_ENSURE_SUCCESS(rv, rv); - -- return NS_OK; --} --#endif -+ // Load jar:$gre/omni.jar!/defaults/pref/*.js -+ rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); -+ NS_ENSURE_SUCCESS(rv, rv); - --static nsresult pref_InitInitialObjects() --{ -- nsresult rv; -+ find = findPtr; -+ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { -+ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); -+ } - -- // first we parse the GRE default prefs. This also works if we're not using a GRE, --#ifdef MOZ_OMNIJAR -- rv = pref_InitAppDefaultsFromOmnijar(); --#else -- rv = pref_InitDefaults(); --#endif -- NS_ENSURE_SUCCESS(rv, rv); -+ prefEntries.Sort(); -+ for (PRUint32 i = prefEntries.Length(); i--; ) { -+ rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); -+ if (NS_FAILED(rv)) -+ NS_WARNING("Error parsing preferences."); -+ } -+ } else { -+ // Load $gre/greprefs.js -+ nsCOMPtr greprefsFile; -+ rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile)); -+ NS_ENSURE_SUCCESS(rv, rv); - -- nsCOMPtr defaultPrefDir; -- // now parse the "application" default preferences -- rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); -- NS_ENSURE_SUCCESS(rv, rv); -+ rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js")); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = openPrefFile(greprefsFile); -+ if (NS_FAILED(rv)) -+ NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?"); -+ } -+ -+ if (!mozilla::Omnijar::HasOmnijar(mozilla::Omnijar::APP)) { -+ // Load $gre/defaults/pref/*.js -+ nsCOMPtr defaultPrefDir; -+ -+ rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); -+ NS_ENSURE_SUCCESS(rv, rv); - -- /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ -- static const char* specialFiles[] = { -+ /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ -+ static const char* specialFiles[] = { - #if defined(XP_MAC) || defined(XP_MACOSX) - "macprefs.js" - #elif defined(XP_WIN) - "winpref.js" - #elif defined(XP_UNIX) - "unix.js" --#if defined(_AIX) -+#if defined(VMS) -+ , "openvms.js" -+#elif defined(_AIX) - , "aix.js" - #endif - #elif defined(XP_OS2) - "os2pref.js" -+#elif defined(XP_BEOS) -+ "beos.js" - #endif -- }; -+ }; - -- rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); -- if (NS_FAILED(rv)) { -- NS_WARNING("Error parsing application default preferences."); -+ rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); -+ if (NS_FAILED(rv)) -+ NS_WARNING("Error parsing application default preferences."); -+ } -+ -+ // Load jar:$app/omni.jar!/defaults/preferences/*.js -+ nsZipArchive *appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP); -+ if (appJarReader) { -+ rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr); -+ NS_ENSURE_SUCCESS(rv, rv); -+ find = findPtr; -+ prefEntries.Clear(); -+ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { -+ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); -+ } -+ prefEntries.Sort(); -+ for (PRUint32 i = prefEntries.Length(); i--; ) { -+ rv = pref_ReadPrefFromJar(appJarReader, prefEntries[i].get()); -+ if (NS_FAILED(rv)) -+ NS_WARNING("Error parsing preferences."); -+ } - } - - rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST); -diff -up xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp.omnijar xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp ---- xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp.omnijar 2011-06-15 23:57:50.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp 2011-06-21 13:30:07.167653046 +0200 -@@ -76,8 +76,8 @@ static nsResProtocolHandler *gResHandler - static PRLogModuleInfo *gResLog; - #endif - -+#define kAPP NS_LITERAL_CSTRING("app") - #define kGRE NS_LITERAL_CSTRING("gre") --#define kGRE_RESOURCES NS_LITERAL_CSTRING("gre-resources") - - //---------------------------------------------------------------------------- - // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution -@@ -155,20 +155,6 @@ nsResProtocolHandler::~nsResProtocolHand - } - - nsresult --nsResProtocolHandler::AddSpecialDir(const char* aSpecialDir, const nsACString& aSubstitution) --{ -- nsCOMPtr file; -- nsresult rv = NS_GetSpecialDirectory(aSpecialDir, getter_AddRefs(file)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- nsCOMPtr uri; -- rv = mIOService->NewFileURI(file, getter_AddRefs(uri)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- return SetSubstitution(aSubstitution, uri); --} -- --nsresult - nsResProtocolHandler::Init() - { - if (!mSubstitutions.Init(32)) -@@ -179,38 +165,39 @@ nsResProtocolHandler::Init() - mIOService = do_GetIOService(&rv); - NS_ENSURE_SUCCESS(rv, rv); - --#ifdef MOZ_OMNIJAR -- nsCOMPtr omniJar(mozilla::OmnijarPath()); -- if (omniJar) -- return Init(omniJar); --#endif -+ nsCAutoString appURI, greURI; -+ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::APP, appURI); -+ NS_ENSURE_SUCCESS(rv, rv); -+ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::GRE, greURI); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ // -+ // make resource:/// point to the application directory or omnijar -+ // -+ nsCOMPtr uri; -+ rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI); -+ NS_ENSURE_SUCCESS(rv, rv); - -- // these entries should be kept in sync with the omnijar Init function -+ rv = SetSubstitution(EmptyCString(), uri); -+ NS_ENSURE_SUCCESS(rv, rv); - - // -- // make resource:/// point to the application directory -+ // make resource://app/ point to the application directory or omnijar - // -- rv = AddSpecialDir(NS_OS_CURRENT_PROCESS_DIR, EmptyCString()); -+ rv = SetSubstitution(kAPP, uri); - NS_ENSURE_SUCCESS(rv, rv); - - // - // make resource://gre/ point to the GRE directory - // -- rv = AddSpecialDir(NS_GRE_DIR, kGRE); -+ if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0. -+ rv = NS_NewURI(getter_AddRefs(uri), greURI); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } -+ -+ rv = SetSubstitution(kGRE, uri); - NS_ENSURE_SUCCESS(rv, rv); - -- // make resource://gre-resources/ point to gre toolkit[.jar]/res -- nsCOMPtr greURI; -- nsCOMPtr greResURI; -- GetSubstitution(kGRE, getter_AddRefs(greURI)); --#ifdef MOZ_CHROME_FILE_FORMAT_JAR -- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "jar:chrome/toolkit.jar!/res/"); --#else -- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "chrome/toolkit/res/"); --#endif -- rv = mIOService->NewURI(strGRE_RES_URL, nsnull, greURI, -- getter_AddRefs(greResURI)); -- SetSubstitution(kGRE_RESOURCES, greResURI); - //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir... - // but once I finish multiple chrome registration I'm not sure that it is needed - -@@ -220,40 +207,6 @@ nsResProtocolHandler::Init() - return rv; - } - --#ifdef MOZ_OMNIJAR --nsresult --nsResProtocolHandler::Init(nsIFile *aOmniJar) --{ -- nsresult rv; -- nsCOMPtr uri; -- nsCAutoString omniJarSpec; -- NS_GetURLSpecFromActualFile(aOmniJar, omniJarSpec, mIOService); -- -- nsCAutoString urlStr("jar:"); -- urlStr += omniJarSpec; -- urlStr += "!/"; -- -- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- // these entries should be kept in sync with the normal Init function -- -- // resource:/// points to jar:omni.jar!/ -- SetSubstitution(EmptyCString(), uri); -- -- // resource://gre/ points to jar:omni.jar!/ -- SetSubstitution(kGRE, uri); -- -- urlStr += "chrome/toolkit/res/"; -- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- // resource://gre-resources/ points to jar:omni.jar!/chrome/toolkit/res/ -- SetSubstitution(kGRE_RESOURCES, uri); -- return NS_OK; --} --#endif -- - static PLDHashOperator - EnumerateSubstitution(const nsACString& aKey, - nsIURI* aURI, -diff -up xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp.omnijar xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp ---- xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp.omnijar 2011-06-15 23:57:54.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp 2011-06-21 13:10:46.687518879 +0200 -@@ -250,17 +250,26 @@ StartupCache::GetBuffer(const char* id, - } - } - --#ifdef MOZ_OMNIJAR -- if (mozilla::OmnijarReader()) { -+ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::APP)) { - // no need to checksum omnijarred entries -- nsZipItemPtr zipItem(mozilla::OmnijarReader(), id); -+ nsZipItemPtr zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::APP), id); - if (zipItem) { - *outbuf = zipItem.Forget(); - *length = zipItem.Length(); - return NS_OK; - } - } --#endif -+ -+ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) { -+ // no need to checksum omnijarred entries -+ nsZipItemPtr zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE), id); -+ if (zipItem) { -+ *outbuf = zipItem.Forget(); -+ *length = zipItem.Length(); -+ return NS_OK; -+ } -+ } -+ - return NS_ERROR_NOT_AVAILABLE; - } - -diff -up xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk.omnijar xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk ---- xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk.omnijar 2011-06-15 23:58:10.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk 2011-06-21 12:46:33.535167224 +0200 -@@ -397,7 +397,7 @@ OMNIJAR_FILES = \ - - NON_OMNIJAR_FILES += \ - chrome/icons/\* \ -- defaults/pref/channel-prefs.js \ -+ $(PREF_DIR)/channel-prefs.js \ - res/cursors/\* \ - res/MainMenu.nib/\* \ - $(NULL) -diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp ---- xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp.omnijar 2011-06-15 23:57:56.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp 2011-06-21 13:20:33.307973388 +0200 -@@ -3877,25 +3877,35 @@ XRE_InitCommandLine(int aArgc, char* aAr - delete[] canonArgs; - #endif - --#ifdef MOZ_OMNIJAR -- const char *omnijarPath = nsnull; -- ArgResult ar = CheckArg("omnijar", PR_FALSE, &omnijarPath); -+ const char *path = nsnull; -+ ArgResult ar = CheckArg("grebase", PR_FALSE, &path); - if (ar == ARG_BAD) { -- PR_fprintf(PR_STDERR, "Error: argument -omnijar requires an omnijar path\n"); -+ PR_fprintf(PR_STDERR, "Error: argument -grebase requires a path argument\n"); - return NS_ERROR_FAILURE; - } - -- if (!omnijarPath) -+ if (!path) - return rv; - -- nsCOMPtr omnijar; -- rv = NS_NewNativeLocalFile(nsDependentCString(omnijarPath), PR_TRUE, -- getter_AddRefs(omnijar)); -- if (NS_SUCCEEDED(rv)) -- mozilla::SetOmnijar(omnijar); --#endif -+ nsCOMPtr greBase; -+ rv = XRE_GetFileFromPath(path, getter_AddRefs(greBase)); -+ if (NS_FAILED(rv)) -+ return rv; - -- return rv; -+ ar = CheckArg("appbase", PR_FALSE, &path); -+ if (ar == ARG_BAD) { -+ PR_fprintf(PR_STDERR, "Error: argument -appbase requires a path argument\n"); -+ return NS_ERROR_FAILURE; -+ } -+ -+ nsCOMPtr appBase; -+ if (path) { -+ rv = XRE_GetFileFromPath(path, getter_AddRefs(appBase)); -+ if (NS_FAILED(rv)) -+ return rv; -+ } -+ -+ return mozilla::Omnijar::SetBase(greBase, appBase); - } - - nsresult -diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp ---- xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp.omnijar 2011-06-15 23:57:56.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp 2011-06-21 12:46:33.558166809 +0200 -@@ -512,9 +512,7 @@ XRE_InitChildProcess(int aArgc, - // Allow ProcessChild to clean up after itself before going out of - // scope and being deleted - process->CleanUp(); --#ifdef MOZ_OMNIJAR -- mozilla::SetOmnijar(nsnull); --#endif -+ mozilla::Omnijar::SetBase(nsnull, nsnull); - } - } - -diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp ---- xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp.omnijar 2011-06-15 23:57:57.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp 2011-06-21 12:46:33.575166505 +0200 -@@ -301,9 +301,6 @@ nsXREDirProvider::GetFile(const char* aP - if (NS_SUCCEEDED(rv)) - file = lf; - } -- else if (!strcmp(aProperty, "resource:app")) { -- rv = GetAppDir()->Clone(getter_AddRefs(file)); -- } - - else if (!strcmp(aProperty, NS_APP_PROFILE_DIR_STARTUP) && mProfileDir) { - return mProfileDir->Clone(aFile); -diff -up xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in ---- xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in.omnijar 2011-06-15 23:57:58.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in 2011-06-21 12:46:33.560166773 +0200 -@@ -69,6 +69,7 @@ CPPSRCS = \ - nsXPComInit.cpp \ - nsXPCOMStrings.cpp \ - Services.cpp \ -+ Omnijar.cpp \ - $(NULL) - - ifndef MOZ_ENABLE_LIBXUL -@@ -77,10 +78,6 @@ CPPSRCS += dlldeps.cpp - endif - endif - --ifdef MOZ_OMNIJAR --CPPSRCS += Omnijar.cpp --endif -- - SHARED_LIBRARY_LIBS = \ - $(DEPTH)/chrome/src/$(LIB_PREFIX)chrome_s.$(LIB_SUFFIX) \ - ../ds/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \ -diff -up xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp ---- xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp.omnijar 2011-06-15 23:58:00.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp 2011-06-21 13:15:00.545014024 +0200 -@@ -457,25 +457,25 @@ NS_InitXPCOM2(nsIServiceManager* *result - if (NS_FAILED(rv)) return rv; - } - --#ifdef MOZ_OMNIJAR - NS_TIME_FUNCTION_MARK("Next: Omnijar init"); - -- if (!mozilla::OmnijarPath()) { -- nsCOMPtr omnijar; -+ if (!mozilla::Omnijar::IsInitialized()) { -+ nsCOMPtr greDir, appDir; - nsCOMPtr file; - -- rv = NS_ERROR_FAILURE; - nsDirectoryService::gService->Get(NS_GRE_DIR, - NS_GET_IID(nsIFile), -+ getter_AddRefs(file)); -+ greDir = do_QueryInterface(file); -+ -+ nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, -+ NS_GET_IID(nsIFile), - getter_AddRefs(file)); -- if (file) -- rv = file->Append(NS_LITERAL_STRING("omni.jar")); -- if (NS_SUCCEEDED(rv)) -- omnijar = do_QueryInterface(file); -- if (NS_SUCCEEDED(rv)) -- mozilla::SetOmnijar(omnijar); -+ appDir = do_QueryInterface(file); -+ -+ rv = mozilla::Omnijar::SetBase(greDir, appDir); -+ NS_ENSURE_SUCCESS(rv, rv); - } --#endif - - if ((sCommandLineWasInitialized = !CommandLine::IsInitialized())) { - NS_TIME_FUNCTION_MARK("Next: IPC command line init"); -@@ -755,9 +755,7 @@ ShutdownXPCOM(nsIServiceManager* servMgr - sExitManager = nsnull; - } - --#ifdef MOZ_OMNIJAR -- mozilla::SetOmnijar(nsnull); --#endif -+ mozilla::Omnijar::SetBase(nsnull, nsnull); - - NS_LogTerm(); - -diff -up xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp ---- xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp.omnijar 2011-06-15 23:57:58.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp 2011-06-21 12:46:33.563166721 +0200 -@@ -21,6 +21,7 @@ - * - * Contributor(s): - * Michael Wu -+ * Mike Hommey - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or -@@ -38,64 +39,170 @@ - - #include "Omnijar.h" - --#include "nsILocalFile.h" --#include "nsXULAppAPI.h" -+#include "nsIFile.h" - #include "nsZipArchive.h" -+#include "nsNetUtil.h" - --static nsILocalFile* sOmnijarPath = nsnull; --static nsZipArchive* sOmnijarReader = nsnull; -+namespace mozilla { - --static void --SetupReader() -+nsIFile *Omnijar::sPath[2] = { nsnull, nsnull }; -+PRBool Omnijar::sIsOmnijar[2] = { PR_FALSE, PR_FALSE }; -+ -+#ifdef MOZ_ENABLE_LIBXUL -+nsZipArchive *Omnijar::sReader[2] = { nsnull, nsnull }; -+#endif -+ -+static already_AddRefed -+ComputePath(nsIFile *aPath, PRBool &aIsOmnijar) - { -- if (!sOmnijarPath) { -- return; -- } -+ PRBool isDir; -+ aIsOmnijar = PR_FALSE; -+ if (!aPath || NS_FAILED(aPath->IsDirectory(&isDir)) || !isDir) -+ return nsnull; -+ -+ nsCOMPtr path; -+#ifdef MOZ_ENABLE_LIBXUL -+ // Search for omni.jar in the given directory -+ if (!isDir || NS_FAILED(aPath->Clone(getter_AddRefs(path)))) -+ return nsnull; -+ -+ if (NS_FAILED(path->AppendNative(NS_LITERAL_CSTRING("omni.jar")))) -+ return nsnull; -+ -+ if (NS_FAILED(path->Exists(&aIsOmnijar))) -+ return nsnull; -+#endif - -- nsZipArchive* zipReader = new nsZipArchive(); -- if (!zipReader) { -- NS_IF_RELEASE(sOmnijarPath); -- return; -+ if (!aIsOmnijar && NS_FAILED(aPath->Clone(getter_AddRefs(path)))) -+ return nsnull; -+ -+ return path.forget(); -+} -+ -+nsresult -+Omnijar::SetBase(nsIFile *aGrePath, nsIFile *aAppPath) -+{ -+ NS_ABORT_IF_FALSE(aGrePath || !aAppPath, "Omnijar::SetBase(NULL, something) call forbidden"); -+ -+#ifdef MOZ_ENABLE_LIBXUL -+ if (sReader[GRE]) { -+ sReader[GRE]->CloseArchive(); -+ delete sReader[GRE]; -+ } -+ if (sReader[APP]) { -+ sReader[APP]->CloseArchive(); -+ delete sReader[APP]; - } -+ sReader[APP] = sReader[GRE] = nsnull; -+#endif - -- if (NS_FAILED(zipReader->OpenArchive(sOmnijarPath))) { -- delete zipReader; -- NS_IF_RELEASE(sOmnijarPath); -- return; -+ nsresult rv; -+ PRBool equals; -+ if (aAppPath) { -+ rv = aAppPath->Equals(aGrePath, &equals); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } else { -+ equals = PR_TRUE; - } - -- sOmnijarReader = zipReader; -+ nsCOMPtr grePath = ComputePath(aGrePath, sIsOmnijar[GRE]); -+ nsCOMPtr appPath = ComputePath(equals ? nsnull : aAppPath, sIsOmnijar[APP]); -+ -+ NS_IF_RELEASE(sPath[GRE]); -+ sPath[GRE] = grePath; -+ NS_IF_ADDREF(sPath[GRE]); -+ -+ NS_IF_RELEASE(sPath[APP]); -+ sPath[APP] = appPath; -+ NS_IF_ADDREF(sPath[APP]); -+ -+ return NS_OK; - } - --nsILocalFile* --mozilla::OmnijarPath() -+already_AddRefed -+Omnijar::GetBase(Type aType) - { -- if (!sOmnijarReader) -- SetupReader(); -+ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); -+ -+ if (!sIsOmnijar[aType]) { -+ NS_IF_ADDREF(sPath[aType]); -+ return sPath[aType]; -+ } - -- return sOmnijarPath; -+ nsCOMPtr file, path; -+ if (NS_FAILED(sPath[aType]->Clone(getter_AddRefs(file)))) -+ return nsnull; -+ -+ if (NS_FAILED(file->GetParent(getter_AddRefs(path)))) -+ return nsnull; -+ return path.forget(); - } - --nsZipArchive* --mozilla::OmnijarReader() -+#ifdef MOZ_ENABLE_LIBXUL -+nsZipArchive * -+Omnijar::GetReader(Type aType) - { -- if (!sOmnijarReader) -- SetupReader(); -+ if (!sIsOmnijar[aType]) -+ return nsnull; - -- return sOmnijarReader; -+ if (sReader[aType]) -+ return sReader[aType]; -+ -+ nsZipArchive* zipReader = new nsZipArchive(); -+ if (!zipReader) -+ return nsnull; -+ -+ if (NS_FAILED(zipReader->OpenArchive(sPath[aType]))) { -+ delete zipReader; -+ return nsnull; -+ } -+ -+ return (sReader[aType] = zipReader); - } - --void --mozilla::SetOmnijar(nsILocalFile* aPath) -+nsZipArchive * -+Omnijar::GetReader(nsIFile *aPath) - { -- NS_IF_RELEASE(sOmnijarPath); -- if (sOmnijarReader) { -- sOmnijarReader->CloseArchive(); -- delete sOmnijarReader; -- sOmnijarReader = nsnull; -+ PRBool equals; -+ nsresult rv; -+ -+ if (sIsOmnijar[GRE]) { -+ rv = sPath[GRE]->Equals(aPath, &equals); -+ if (NS_SUCCEEDED(rv) && equals) -+ return GetReader(GRE); - } -+ if (sIsOmnijar[APP]) { -+ rv = sPath[APP]->Equals(aPath, &equals); -+ if (NS_SUCCEEDED(rv) && equals) -+ return GetReader(APP); -+ } -+ return nsnull; -+} -+#endif -+ -+nsresult -+Omnijar::GetURIString(Type aType, nsCString &result) -+{ -+ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); - -- sOmnijarPath = aPath; -- NS_IF_ADDREF(sOmnijarPath); -+ result = ""; -+ -+ if ((aType == APP) && (!sPath[APP])) -+ return NS_OK; -+ -+ nsCAutoString omniJarSpec; -+ nsresult rv = NS_GetURLSpecFromActualFile(sPath[aType], omniJarSpec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (sIsOmnijar[aType]) { -+ result = "jar:"; -+ result += omniJarSpec; -+ result += "!"; -+ } else { -+ result = omniJarSpec; -+ } -+ result += "/"; -+ return NS_OK; - } - -+} /* namespace mozilla */ -diff -up xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h ---- xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h.omnijar 2011-06-15 23:57:58.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h 2011-06-21 12:46:33.564166703 +0200 -@@ -21,6 +21,7 @@ - * - * Contributor(s): - * Michael Wu -+ * Mike Hommey - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or -@@ -39,24 +40,132 @@ - #ifndef mozilla_Omnijar_h - #define mozilla_Omnijar_h - --class nsILocalFile; --class nsZipArchive; -+#include "nscore.h" -+#include "nsTArray.h" -+#include "nsCOMPtr.h" -+#include "nsString.h" - --#ifdef MOZ_OMNIJAR -+class nsIFile; -+class nsZipArchive; -+class nsIURI; - - namespace mozilla { - -+#ifdef MOZ_ENABLE_LIBXUL -+#define OMNIJAR_EXPORT -+#else -+#define OMNIJAR_EXPORT NS_EXPORT -+#endif -+ -+class OMNIJAR_EXPORT Omnijar { -+private: -+/** -+ * Store an nsIFile for either a base directory when there is no omni.jar, -+ * or omni.jar itself. We can store two paths here, one for GRE -+ * (corresponding to resource://gre/) and one for APP -+ * (corresponding to resource:/// and resource://app/), but only -+ * store one when both point to the same location (unified). -+ */ -+static nsIFile *sPath[2]; - /** -- * This returns the path to the omnijar. -- * If the omnijar isn't available, this function will return null. -- * Callers should fallback to flat packaging if null. -- */ --nsILocalFile *OmnijarPath(); --nsZipArchive *OmnijarReader(); --void SetOmnijar(nsILocalFile* aPath); -+ * Store whether the corresponding sPath is an omni.jar or a directory -+ */ -+static PRBool sIsOmnijar[2]; - --} /* namespace mozilla */ -+#ifdef MOZ_ENABLE_LIBXUL -+/** -+ * Cached nsZipArchives for the corresponding sPath -+ */ -+static nsZipArchive *sReader[2]; -+#endif -+ -+public: -+enum Type { -+ GRE = 0, -+ APP = 1 -+}; -+ -+/** -+ * Returns whether SetBase has been called at least once with -+ * a valid nsIFile -+ */ -+static PRBool -+IsInitialized() -+{ -+ // GRE path is always set after initialization. -+ return sPath[0] != nsnull; -+} -+ -+/** -+ * Sets the base directories for GRE and APP. APP base directory -+ * may be nsnull, in case the APP and GRE directories are the same. -+ */ -+static nsresult SetBase(nsIFile *aGrePath, nsIFile *aAppPath); -+ -+/** -+ * Returns an nsIFile pointing to the omni.jar file for GRE or APP. -+ * Returns nsnull when there is no corresponding omni.jar. -+ * Also returns nsnull for APP in the unified case. -+ */ -+static already_AddRefed -+GetPath(Type aType) -+{ -+ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); -+ -+ if (sIsOmnijar[aType]) { -+ NS_IF_ADDREF(sPath[aType]); -+ return sPath[aType]; -+ } -+ return nsnull; -+} -+ -+/** -+ * Returns whether GRE or APP use an omni.jar. Returns PR_False when -+ * using an omni.jar in the unified case. -+ */ -+static PRBool -+HasOmnijar(Type aType) -+{ -+ return sIsOmnijar[aType]; -+} -+ -+/** -+ * Returns the base directory for GRE or APP. In the unified case, -+ * returns nsnull for APP. -+ */ -+static already_AddRefed GetBase(Type aType); -+ -+/** -+ * Returns a nsZipArchive pointer for the omni.jar file for GRE or -+ * APP. Returns nsnull in the same cases GetPath() would. -+ */ -+#ifdef MOZ_ENABLE_LIBXUL -+static nsZipArchive *GetReader(Type aType); -+#else -+static nsZipArchive *GetReader(Type aType) { return nsnull; } -+#endif - --#endif /* MOZ_OMNIJAR */ -+/** -+ * Returns a nsZipArchive pointer for the given path IAOI the given -+ * path is the omni.jar for either GRE or APP. -+ */ -+#ifdef MOZ_ENABLE_LIBXUL -+static nsZipArchive *GetReader(nsIFile *aPath); -+#else -+static nsZipArchive *GetReader(nsIFile *aPath) { return nsnull; } -+#endif -+ -+/** -+ * Returns the URI string corresponding to the omni.jar or directory -+ * for GRE or APP. i.e. jar:/path/to/omni.jar!/ for omni.jar and -+ * /path/to/base/dir/ otherwise. Returns an empty string for APP in -+ * the unified case. -+ * The returned URI is guaranteed to end with a slash. -+ */ -+static nsresult GetURIString(Type aType, nsCString &result); -+ -+}; /* class Omnijar */ -+ -+} /* namespace mozilla */ - - #endif /* mozilla_Omnijar_h */ -diff -up xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp ---- xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp.omnijar 2011-06-15 23:58:01.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp 2011-06-21 12:46:33.569166613 +0200 -@@ -174,8 +174,6 @@ NS_DEFINE_CID(kCategoryManagerCID, NS_CA - #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) do {} while (0) - #endif - --#define kOMNIJAR_PREFIX NS_LITERAL_CSTRING("resource:///") -- - nsresult - nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) const - { -@@ -385,14 +383,20 @@ nsresult nsComponentManagerImpl::Init() - for (PRUint32 i = 0; i < sStaticModules->Length(); ++i) - RegisterModule((*sStaticModules)[i], NULL); - --#ifdef MOZ_OMNIJAR -- if (mozilla::OmnijarPath()) { -- nsCOMPtr omnijarReader = new nsJAR(); -- rv = omnijarReader->Open(mozilla::OmnijarPath()); -- if (NS_SUCCEEDED(rv)) -- RegisterJarManifest(omnijarReader, "chrome.manifest", false); -+ nsCOMPtr appOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::APP); -+ if (appOmnijar) { -+ cl = sModuleLocations->InsertElementAt(1); // Insert after greDir -+ cl->type = NS_COMPONENT_LOCATION; -+ cl->location = do_QueryInterface(appOmnijar); -+ cl->jar = true; -+ } -+ nsCOMPtr greOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::GRE); -+ if (greOmnijar) { -+ cl = sModuleLocations->InsertElementAt(0); -+ cl->type = NS_COMPONENT_LOCATION; -+ cl->location = do_QueryInterface(greOmnijar); -+ cl->jar = true; - } --#endif - - for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) { - ComponentLocation& l = sModuleLocations->ElementAt(i); -@@ -407,15 +411,6 @@ nsresult nsComponentManagerImpl::Init() - RegisterJarManifest(reader, "chrome.manifest", false); - } - --#ifdef MOZ_OMNIJAR -- if (mozilla::OmnijarPath()) { -- cl = sModuleLocations->InsertElementAt(0); -- cl->type = NS_COMPONENT_LOCATION; -- cl->location = mozilla::OmnijarPath(); -- cl->jar = true; -- } --#endif -- - nsCategoryManager::GetSingleton()->SuppressNotifications(false); - - mStatus = NORMAL; -diff -up xulrunner-5.0/mozilla-release/xulrunner/confvars.sh.omnijar xulrunner-5.0/mozilla-release/xulrunner/confvars.sh ---- xulrunner-5.0/mozilla-release/xulrunner/confvars.sh.omnijar 2011-06-15 23:58:02.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xulrunner/confvars.sh 2011-06-21 12:46:33.578166451 +0200 -@@ -41,6 +41,7 @@ MOZ_APP_DISPLAYNAME=XULRunner - MOZ_UPDATER=1 - MOZ_XULRUNNER=1 - MOZ_ENABLE_LIBXUL=1 -+MOZ_CHROME_FILE_FORMAT=omni - MOZ_STATIC_BUILD_UNSUPPORTED=1 - MOZ_APP_VERSION=$MOZILLA_VERSION - if test "$MOZ_STORAGE"; then From 0602e084761007f6cd2bb941b41c06b75c6cf720 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 27 Sep 2012 11:20:00 +0200 Subject: [PATCH 294/486] Rebuild with gcc to fix rhbz#830017 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index b9943d5..084125f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 15.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Sep 27 2012 Jan Horak - 15.0.1-4 +- Rebuild with latest gcc to fix rhbz#830017 + * Mon Sep 17 2012 Martin Stransky - 15.0.1-3 - Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 From 8e6cfdbad45a53d4878bf0fce7ba9ba553f0b79b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 8 Oct 2012 15:21:29 +0200 Subject: [PATCH 295/486] Update to 16.0 --- .gitignore | 1 + sources | 2 +- ...malloc-ppc.patch => xulrunner-16.0-jemalloc-ppc.patch | 4 ++-- xulrunner.spec | 9 ++++++--- 4 files changed, 10 insertions(+), 6 deletions(-) rename xulrunner-12.0-jemalloc-ppc.patch => xulrunner-16.0-jemalloc-ppc.patch (75%) diff --git a/.gitignore b/.gitignore index 8e15dcd..6c160f4 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-15.0b6.source.tar.bz2 /xulrunner-15.0.source.tar.bz2 /xulrunner-15.0.1.source.tar.bz2 +/xulrunner-16.0.source.tar.bz2 diff --git a/sources b/sources index a219e0f..b813249 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -743ba71fbce7b32023405db02d44143f xulrunner-15.0.1.source.tar.bz2 +04cbefaebaf77693bacd11145ece104f xulrunner-16.0.source.tar.bz2 diff --git a/xulrunner-12.0-jemalloc-ppc.patch b/xulrunner-16.0-jemalloc-ppc.patch similarity index 75% rename from xulrunner-12.0-jemalloc-ppc.patch rename to xulrunner-16.0-jemalloc-ppc.patch index 036f560..896a2c0 100644 --- a/xulrunner-12.0-jemalloc-ppc.patch +++ b/xulrunner-16.0-jemalloc-ppc.patch @@ -1,7 +1,7 @@ Index: xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c =================================================================== ---- xulrunner-11.0.orig/mozilla-release/memory/jemalloc/jemalloc.c -+++ xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c +--- xulrunner-11.0.orig/mozilla-release/memory/mozjemalloc/jemalloc.c ++++ xulrunner-11.0/mozilla-release/memory/mozjemalloc/jemalloc.c @@ -1089,7 +1089,9 @@ static unsigned ncpus; * controlling the malloc behavior are defined as compile-time constants * for best performance and cannot be altered at runtime. diff --git a/xulrunner.spec b/xulrunner.spec index b9943d5..e558412 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 15.0.1 -Release: 3%{?pre_tag}%{?dist} +Version: 16.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -89,7 +89,7 @@ Patch1: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 -Patch18: xulrunner-12.0-jemalloc-ppc.patch +Patch18: xulrunner-16.0-jemalloc-ppc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 1 2012 Martin Stransky - 16.1-1 +- Update to 16.0 + * Mon Sep 17 2012 Martin Stransky - 15.0.1-3 - Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 From 8518ced4d26139fdfc6cdc9532b024c32b27125e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 8 Oct 2012 15:42:57 +0200 Subject: [PATCH 296/486] changelog fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index e558412..3e861cc 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -505,7 +505,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Oct 1 2012 Martin Stransky - 16.1-1 +* Mon Oct 8 2012 Martin Stransky - 16.0-1 - Update to 16.0 * Mon Sep 17 2012 Martin Stransky - 15.0.1-3 From 18ce54b15db648c3dfa920a0e6081eb5d1d0e093 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 Oct 2012 11:50:05 +0200 Subject: [PATCH 297/486] build fixes --- xulrunner-install-dir.patch | 23 +++++++++++++++++++++++ xulrunner-version.patch | 13 ------------- xulrunner.spec | 11 ++++------- 3 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 xulrunner-install-dir.patch delete mode 100644 xulrunner-version.patch diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch new file mode 100644 index 0000000..e788fa0 --- /dev/null +++ b/xulrunner-install-dir.patch @@ -0,0 +1,23 @@ +diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/config/baseconfig.mk +--- mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/config/baseconfig.mk 2012-09-26 10:13:45.258240426 +0200 +@@ -2,7 +2,7 @@ INCLUDED_AUTOCONF_MK = 1 + + includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) + idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME) + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + DIST = $(DEPTH)/dist + +diff -up mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk +--- mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk 2012-09-26 10:14:07.353351833 +0200 +@@ -1,6 +1,6 @@ + INCLUDED_AUTOCONF_MK = 1 + +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME) + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + + ifneq (,$(filter /%,$(TOP_DIST))) diff --git a/xulrunner-version.patch b/xulrunner-version.patch deleted file mode 100644 index d08bde9..0000000 --- a/xulrunner-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mozilla/toolkit/mozapps/update/src/updater/module.ver mozilla/toolkit/mozapps/update/src/updater/module -diff -up mozilla/xulrunner/installer/Makefile.in.ver mozilla/xulrunner/installer/Makefile.in ---- mozilla/xulrunner/installer/Makefile.in.ver 2007-12-14 09:51:34.000000000 +0100 -+++ mozilla/xulrunner/installer/Makefile.in 2007-12-14 09:52:03.000000000 +0100 -@@ -44,6 +44,8 @@ VPATH = @srcdir@ - - include $(DEPTH)/config/autoconf.mk - -+MOZ_APP_VERSION="__RPM_VERSION_INTERNAL__" -+ - NO_PKG_FILES = \ - xulrunner-config \ - regchrome* \ diff --git a/xulrunner.spec b/xulrunner.spec index 3e861cc..b04a358 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -35,12 +35,12 @@ # alpha_version should be set to the alpha number if using an alpha, 0 otherwise # beta_version should be set to the beta number if using a beta, 0 otherwise # rc_version should be set to the RC number if using an RC, 0 otherwise -%global gecko_dir_ver 2 +%global gecko_dir_ver %{version} %global alpha_version 0 %global beta_version 0 %global rc_version 0 -%global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} +%global mozappdir %{_libdir}/%{name} %global tarballdir mozilla-release # crash reporter work only on x86/x86_64 @@ -84,8 +84,8 @@ Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in # build patches -Patch0: xulrunner-version.patch Patch1: mozilla-build.patch +Patch2: xulrunner-install-dir.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 @@ -219,11 +219,8 @@ debug %{name}, you want to install %{name}-debuginfo instead. %setup -q -c cd %{tarballdir} -sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ - > version.patch -%{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch - %patch1 -p1 -b .build +%patch2 -p1 %patch14 -p1 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc From b8688eeff32afad3ac9bbd84dec40d9651d52a63 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 10 Oct 2012 11:00:08 +0200 Subject: [PATCH 298/486] Fixed xulrunner launch script --- xulrunner.sh.in | 10 +++++----- xulrunner.spec | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/xulrunner.sh.in b/xulrunner.sh.in index 8f76b27..534b840 100644 --- a/xulrunner.sh.in +++ b/xulrunner.sh.in @@ -46,17 +46,17 @@ case $XUL_ARCH in ;; esac -if [ ! -x $XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner ]; then - if [ ! -x $SECONDARY_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner ]; then - echo "Error: $XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner not found" +if [ ! -x $XUL_LIB_DIR/xulrunner/xulrunner ]; then + if [ ! -x $SECONDARY_LIB_DIR/xulrunner/xulrunner ]; then + echo "Error: $XUL_LIB_DIR/xulrunner/xulrunner not found" if [ -d $SECONDARY_LIB_DIR ]; then - echo " $SECONDARY_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner not found" + echo " $SECONDARY_LIB_DIR/xulrunner/xulrunner not found" fi exit 1 fi XUL_LIB_DIR="$SECONDARY_LIB_DIR" fi -XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION" +XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner" XUL_PROGRAM="$XUL_DIST_BIN/xulrunner" ## diff --git a/xulrunner.spec b/xulrunner.spec index b04a358..d273c01 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 16.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -502,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 10 2012 Martin Stransky - 16.0-2 +- Fixed xulrunner launch script + * Mon Oct 8 2012 Martin Stransky - 16.0-1 - Update to 16.0 From b2e14f89dfb9e52cfdfa3a800ab6fb69bf071743 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 11 Oct 2012 13:58:24 +0200 Subject: [PATCH 299/486] Update to 16.0.1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index b813249..e2b1e9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -04cbefaebaf77693bacd11145ece104f xulrunner-16.0.source.tar.bz2 +78e641c67dc4a40cb3f48fce3e782d41 xulrunner-16.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index d273c01..e7a4e06 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 16.0 -Release: 2%{?pre_tag}%{?dist} +Version: 16.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -502,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tru Oct 11 2012 Martin Stransky - 16.0.1-1 +- Update to 16.0.1 + * Mon Oct 10 2012 Martin Stransky - 16.0-2 - Fixed xulrunner launch script From 7dba846d6daf85f4df585c44ca6385d1f04afc04 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 11 Oct 2012 14:00:29 +0200 Subject: [PATCH 300/486] Update to 16.0.1 --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index e7a4e06..ab60250 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -502,7 +502,7 @@ fi #--------------------------------------------------------------------- %changelog -* Tru Oct 11 2012 Martin Stransky - 16.0.1-1 +* Thu Oct 11 2012 Martin Stransky - 16.0.1-1 - Update to 16.0.1 * Mon Oct 10 2012 Martin Stransky - 16.0-2 From 9d9eab78e3cfb440b51b671f1af9bd92dd20e3bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 11 Oct 2012 22:15:12 +0200 Subject: [PATCH 301/486] fix sed expression --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ab60250..9433aa6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -326,7 +326,7 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" From bd4d14bb3f58958bcce4768009c69cb1540ab52b Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 16 Oct 2012 08:39:34 +0200 Subject: [PATCH 302/486] Fixed required nspr and nss version --- xulrunner.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 9433aa6..80af3ad 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,8 +21,8 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9 -%global nss_version 3.13.3 +%global nspr_version 4.9.2 +%global nss_version 3.13.5 %endif %if %{?system_sqlite} @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 16.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -502,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 16 2012 Jan Horak - 16.0.1-2 +- Fixed required nss and nspr version + * Thu Oct 11 2012 Martin Stransky - 16.0.1-1 - Update to 16.0.1 From 16f7721ec9acc7430180f362125a04e24e3d351d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 16 Oct 2012 09:32:13 +0200 Subject: [PATCH 303/486] Use nss and nspr version from buildroot --- xulrunner.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 80af3ad..dbbfb32 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,12 +21,12 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9.2 -%global nss_version 3.13.5 +%global nspr_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) +%global nss_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif %if %{?system_sqlite} -%global sqlite_version 3.7.7.1 +%global sqlite_version 3.7.13 # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) %endif From ec23a95c1f74bdcbc31174e7b5d3bdcbe8d8dc71 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 16 Oct 2012 10:50:07 +0200 Subject: [PATCH 304/486] Use nss and nspr version from buildroot --- xulrunner.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index dbbfb32..580cb11 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,8 +21,10 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) +%global nspr_version 4.9.2 +%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) +%global nss_version 3.13.5 +%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif %if %{?system_sqlite} @@ -131,8 +133,8 @@ BuildRequires: libvpx-devel >= %{libvpx_version} Requires: mozilla-filesystem %if %{?system_nss} -Requires: nspr >= %{nspr_version} -Requires: nss >= %{nss_version} +Requires: nspr >= %{nspr_build_version} +Requires: nss >= %{nss_build_version} %endif Provides: gecko-libs = %{gecko_verrel} Provides: gecko-libs%{?_isa} = %{gecko_verrel} @@ -163,8 +165,8 @@ Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} Requires: xulrunner = %{version}-%{release} %if %{?system_nss} -Requires: nspr-devel >= %{nspr_version} -Requires: nss-devel >= %{nss_version} +Requires: nspr-devel >= %{nspr_build_version} +Requires: nss-devel >= %{nss_build_version} %endif %if %{?system_cairo} Requires: cairo-devel >= %{cairo_version} From 795c85db24166ff3817e92095378b4b9f715f8a0 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 26 Oct 2012 10:56:43 +0200 Subject: [PATCH 305/486] Update to 16.0.2 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6c160f4..03f3bec 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-15.0.source.tar.bz2 /xulrunner-15.0.1.source.tar.bz2 /xulrunner-16.0.source.tar.bz2 +/xulrunner-16.0.2.source.tar.bz2 diff --git a/sources b/sources index e2b1e9c..28f8d2b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -78e641c67dc4a40cb3f48fce3e782d41 xulrunner-16.0.1.source.tar.bz2 +1b360968ab05b2a59757d33514897915 xulrunner-16.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 580cb11..6957e32 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 16.0.1 -Release: 2%{?pre_tag}%{?dist} +Version: 16.0.2 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -504,6 +504,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Oct 26 2012 Jan Horak - 16.0.2-1 +- Update to 16.0.2 + * Tue Oct 16 2012 Jan Horak - 16.0.1-2 - Fixed required nss and nspr version From ef5d07b4dcb1b7f82ac970f330aae954cbb3b505 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 31 Oct 2012 12:47:10 +0100 Subject: [PATCH 306/486] * Wed Oct 31 2012 Martin Stransky - 16.0.2-1 - Updated mozilla-746112.patch for second arches - Removed unused one (rhbz#855919) --- mozilla-746112.patch | 115 +++++++++++++++++++++++++++++++------------ rhbz-855919.patch | 19 ------- xulrunner.spec | 12 ++--- 3 files changed, 89 insertions(+), 57 deletions(-) delete mode 100644 rhbz-855919.patch diff --git a/mozilla-746112.patch b/mozilla-746112.patch index 765f993..0370f3c 100644 --- a/mozilla-746112.patch +++ b/mozilla-746112.patch @@ -1,35 +1,86 @@ -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -@@ -167,7 +167,7 @@ struct ByteTerm { - inputPosition = inputPos; - } +diff -up mozilla-release/js/src/gc/Heap.h.746112 mozilla-release/js/src/gc/Heap.h +--- mozilla-release/js/src/gc/Heap.h.746112 2012-10-24 16:32:52.000000000 +0200 ++++ mozilla-release/js/src/gc/Heap.h 2012-10-31 12:44:02.400733198 +0100 +@@ -103,26 +103,31 @@ struct Cell + }; -- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(false) -@@ -188,7 +188,7 @@ struct ByteTerm { - atom.quantityCount = 1; - } + /* +- * Page size is 4096 by default, except for SPARC, where it is 8192. ++ * Page size must be static to support our arena pointer optimizations, so we ++ * are forced to support each platform with non-4096 pages as a special case. ++ * Note: The freelist supports a maximum arena shift of 15. + * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. + * Bug 692267: Move page size definition to gc/Memory.h and include it + * directly once jsgc.h is no longer an installed header. + */ + #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) + const size_t PageShift = 13; ++const size_t ArenaShift = PageShift; ++#elif defined(__powerpc__) ++const size_t PageShift = 16; ++const size_t ArenaShift = 12; + #else + const size_t PageShift = 12; ++const size_t ArenaShift = PageShift; + #endif + const size_t PageSize = size_t(1) << PageShift; ++const size_t ArenaSize = size_t(1) << ArenaShift; ++const size_t ArenaMask = ArenaSize - 1; -- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -@@ -171,7 +171,7 @@ struct PatternTerm { - quantityCount = 1; - } + const size_t ChunkShift = 20; + const size_t ChunkSize = size_t(1) << ChunkShift; + const size_t ChunkMask = ChunkSize - 1; -- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) -+ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) +-const size_t ArenaShift = PageShift; +-const size_t ArenaSize = PageSize; +-const size_t ArenaMask = ArenaSize - 1; +- + /* + * This is the maximum number of arenas we allow in the FreeCommitted state + * before we trigger a GC_SHRINK to release free arenas to the OS. +diff -up mozilla-release/js/src/jsgc.cpp.746112 mozilla-release/js/src/jsgc.cpp +--- mozilla-release/js/src/jsgc.cpp.746112 2012-10-24 16:32:54.000000000 +0200 ++++ mozilla-release/js/src/jsgc.cpp 2012-10-31 12:42:50.681735540 +0100 +@@ -194,6 +194,13 @@ const uint32_t Arena::FirstThingOffsets[ + + #undef OFFSET + ++/* Unused memory decommiting requires the arena size match the page size. */ ++static bool ++DecommitEnabled() ++{ ++ return PageSize == ArenaSize; ++} ++ + #ifdef DEBUG + void + ArenaHeader::checkSynchronizedWithFreeList() const +@@ -677,7 +684,8 @@ Chunk::fetchNextDecommittedArena() + decommittedArenas.unset(offset); + + Arena *arena = &arenas[offset]; +- MarkPagesInUse(arena, ArenaSize); ++ if (DecommitEnabled()) ++ MarkPagesInUse(arena, ArenaSize); + arena->aheader.setAsNotAllocated(); + + return &arena->aheader; +@@ -2634,7 +2642,7 @@ DecommitArenasFromAvailableList(JSRuntim + chunk->removeFromAvailableList(); + + size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); +- bool ok; ++ bool ok = true; + { + /* + * If the main thread waits for the decommit to finish, skip +@@ -2644,7 +2652,8 @@ DecommitArenasFromAvailableList(JSRuntim + Maybe maybeUnlock; + if (!rt->isHeapBusy()) + maybeUnlock.construct(rt); +- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); ++ if (DecommitEnabled()) ++ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); + } + + if (ok) { diff --git a/rhbz-855919.patch b/rhbz-855919.patch deleted file mode 100644 index 5315f57..0000000 --- a/rhbz-855919.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: mozilla-release/js/src/gc/Memory.cpp -=================================================================== ---- mozilla-release.orig/js/src/gc/Memory.cpp -+++ mozilla-release/js/src/gc/Memory.cpp -@@ -348,9 +348,14 @@ UnmapPages(void *p, size_t size) - bool - MarkPagesUnused(void *p, size_t size) - { -+// A workaround for Bug 746112 - endless loop on ppc64 -+#if !(defined(__powerpc__)) - JS_ASSERT(uintptr_t(p) % PageSize == 0); - int result = madvise(p, size, MADV_DONTNEED); - return result != -1; -+#else -+ return true; -+#endif - } - - bool diff --git a/xulrunner.spec b/xulrunner.spec index 6957e32..eb5d47d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 16.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,7 +99,6 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch49: mozilla-746112.patch Patch51: mozilla-709732-gfx-icc-profile-fix.patch -Patch52: rhbz-855919.patch # --------------------------------------------------- @@ -229,10 +228,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk -%ifarch ppc ppc64 -%patch49 -p2 -b .746112 -%patch52 -p1 -b .855919 -%endif +%patch49 -p1 -b .746112 %patch51 -p1 -b .709732 %{__rm} -f .mozconfig @@ -504,6 +500,10 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 31 2012 Martin Stransky - 16.0.2-1 +- Updated mozilla-746112.patch for second arches +- Removed unused one (rhbz#855919) + * Fri Oct 26 2012 Jan Horak - 16.0.2-1 - Update to 16.0.2 From b20671cea61761f9254ed68136dcc7e4ab7b129f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Nov 2012 15:29:25 +0100 Subject: [PATCH 307/486] Added fix for rhbz#872752 --- rhbz-872752.patch | 22 ++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 rhbz-872752.patch diff --git a/rhbz-872752.patch b/rhbz-872752.patch new file mode 100644 index 0000000..86bfdd7 --- /dev/null +++ b/rhbz-872752.patch @@ -0,0 +1,22 @@ +diff -up mozilla-beta/xulrunner/installer/libxul-embedding.pc.in.embedlink mozilla-beta/xulrunner/installer/libxul-embedding.pc.in +--- mozilla-beta/xulrunner/installer/libxul-embedding.pc.in.embedlink 2012-11-06 14:51:44.000000000 +0100 ++++ mozilla-beta/xulrunner/installer/libxul-embedding.pc.in 2012-11-06 14:58:04.560608699 +0100 +@@ -7,5 +7,5 @@ Name: libxul-embedding + Description: Static library for version-independent embedding of the Mozilla runtime + Version: %MOZILLA_VERSION% + Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Libs: -L${sdkdir}/lib -lxpcomglue -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +diff -up mozilla-beta/xulrunner/installer/Makefile.in.embedlink mozilla-beta/xulrunner/installer/Makefile.in +--- mozilla-beta/xulrunner/installer/Makefile.in.embedlink 2012-11-06 14:51:44.528600028 +0100 ++++ mozilla-beta/xulrunner/installer/Makefile.in 2012-11-06 14:51:44.535600028 +0100 +@@ -64,7 +64,7 @@ FULL_NSPR_LIBS=$(subst $(prefix),\$${sdk + NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version) + endif + +-MOZ_XUL_LINK = -lxpcomglue_s -lxul -lxpcom -lmozalloc ++MOZ_XUL_LINK = -lxpcomglue_s -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -lxul -lxpcom -lmozalloc + ifdef JS_SHARED_LIBRARY + MOZ_JS_LINK = -lmozjs + else diff --git a/xulrunner.spec b/xulrunner.spec index eb5d47d..eb15807 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 16.0.2 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -95,6 +95,7 @@ Patch18: xulrunner-16.0-jemalloc-ppc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch +Patch21: rhbz-872752.patch # Upstream patches Patch49: mozilla-746112.patch @@ -227,6 +228,7 @@ cd %{tarballdir} %patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk +%patch21 -p1 -b .872752 %patch49 -p1 -b .746112 %patch51 -p1 -b .709732 @@ -500,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 6 2012 Martin Stransky - 16.0.2-2 +- Added fix for rhbz#872752 + * Wed Oct 31 2012 Martin Stransky - 16.0.2-1 - Updated mozilla-746112.patch for second arches - Removed unused one (rhbz#855919) From 106e8d0a7e42834637e16fff40b1d4bd6fcf2162 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Nov 2012 11:55:24 +0100 Subject: [PATCH 308/486] Update to 17.0 Beta 5 --- .gitignore | 1 + mozilla-709732-gfx-icc-profile-fix.patch | 21 ----- mozilla-746112.patch | 115 +++++++---------------- mozilla-build.patch | 17 ++-- rhbz-872752.patch | 58 +++++++----- sources | 2 +- xulrunner.spec | 35 ++++--- 7 files changed, 101 insertions(+), 148 deletions(-) delete mode 100644 mozilla-709732-gfx-icc-profile-fix.patch diff --git a/.gitignore b/.gitignore index 03f3bec..0ae7936 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-15.0.1.source.tar.bz2 /xulrunner-16.0.source.tar.bz2 /xulrunner-16.0.2.source.tar.bz2 +/xulrunner-17.0b5.source.tar.bz2 diff --git a/mozilla-709732-gfx-icc-profile-fix.patch b/mozilla-709732-gfx-icc-profile-fix.patch deleted file mode 100644 index 7e268d0..0000000 --- a/mozilla-709732-gfx-icc-profile-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -r dd29535bac5f gfx/thebes/gfxPlatformGtk.cpp ---- a/gfx/thebes/gfxPlatformGtk.cpp Sat May 05 20:22:53 2012 -0700 -+++ b/gfx/thebes/gfxPlatformGtk.cpp Wed May 09 11:42:21 2012 +0200 -@@ -538,16 +538,10 @@ - if (iccAtom) { - // read once to get size, once for the data - if (Success == XGetWindowProperty(dpy, root, iccAtom, -- 0, 0 /* length */, -+ 0, INT_MAX /* length */, - False, AnyPropertyType, - &retAtom, &retFormat, &retLength, - &retAfter, &retProperty)) { -- XGetWindowProperty(dpy, root, iccAtom, -- 0, retLength, -- False, AnyPropertyType, -- &retAtom, &retFormat, &retLength, -- &retAfter, &retProperty); -- - qcms_profile* profile = NULL; - - if (retLength > 0) diff --git a/mozilla-746112.patch b/mozilla-746112.patch index 0370f3c..765f993 100644 --- a/mozilla-746112.patch +++ b/mozilla-746112.patch @@ -1,86 +1,35 @@ -diff -up mozilla-release/js/src/gc/Heap.h.746112 mozilla-release/js/src/gc/Heap.h ---- mozilla-release/js/src/gc/Heap.h.746112 2012-10-24 16:32:52.000000000 +0200 -+++ mozilla-release/js/src/gc/Heap.h 2012-10-31 12:44:02.400733198 +0100 -@@ -103,26 +103,31 @@ struct Cell - }; +Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h +=================================================================== +--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h ++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h +@@ -167,7 +167,7 @@ struct ByteTerm { + inputPosition = inputPos; + } - /* -- * Page size is 4096 by default, except for SPARC, where it is 8192. -+ * Page size must be static to support our arena pointer optimizations, so we -+ * are forced to support each platform with non-4096 pages as a special case. -+ * Note: The freelist supports a maximum arena shift of 15. - * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. - * Bug 692267: Move page size definition to gc/Memory.h and include it - * directly once jsgc.h is no longer an installed header. - */ - #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) - const size_t PageShift = 13; -+const size_t ArenaShift = PageShift; -+#elif defined(__powerpc__) -+const size_t PageShift = 16; -+const size_t ArenaShift = 12; - #else - const size_t PageShift = 12; -+const size_t ArenaShift = PageShift; - #endif - const size_t PageSize = size_t(1) << PageShift; -+const size_t ArenaSize = size_t(1) << ArenaShift; -+const size_t ArenaMask = ArenaSize - 1; +- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) ++ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(false) +@@ -188,7 +188,7 @@ struct ByteTerm { + atom.quantityCount = 1; + } - const size_t ChunkShift = 20; - const size_t ChunkSize = size_t(1) << ChunkShift; - const size_t ChunkMask = ChunkSize - 1; +- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) ++ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(invert) +Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h +=================================================================== +--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h ++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h +@@ -171,7 +171,7 @@ struct PatternTerm { + quantityCount = 1; + } --const size_t ArenaShift = PageShift; --const size_t ArenaSize = PageSize; --const size_t ArenaMask = ArenaSize - 1; -- - /* - * This is the maximum number of arenas we allow in the FreeCommitted state - * before we trigger a GC_SHRINK to release free arenas to the OS. -diff -up mozilla-release/js/src/jsgc.cpp.746112 mozilla-release/js/src/jsgc.cpp ---- mozilla-release/js/src/jsgc.cpp.746112 2012-10-24 16:32:54.000000000 +0200 -+++ mozilla-release/js/src/jsgc.cpp 2012-10-31 12:42:50.681735540 +0100 -@@ -194,6 +194,13 @@ const uint32_t Arena::FirstThingOffsets[ - - #undef OFFSET - -+/* Unused memory decommiting requires the arena size match the page size. */ -+static bool -+DecommitEnabled() -+{ -+ return PageSize == ArenaSize; -+} -+ - #ifdef DEBUG - void - ArenaHeader::checkSynchronizedWithFreeList() const -@@ -677,7 +684,8 @@ Chunk::fetchNextDecommittedArena() - decommittedArenas.unset(offset); - - Arena *arena = &arenas[offset]; -- MarkPagesInUse(arena, ArenaSize); -+ if (DecommitEnabled()) -+ MarkPagesInUse(arena, ArenaSize); - arena->aheader.setAsNotAllocated(); - - return &arena->aheader; -@@ -2634,7 +2642,7 @@ DecommitArenasFromAvailableList(JSRuntim - chunk->removeFromAvailableList(); - - size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); -- bool ok; -+ bool ok = true; - { - /* - * If the main thread waits for the decommit to finish, skip -@@ -2644,7 +2652,8 @@ DecommitArenasFromAvailableList(JSRuntim - Maybe maybeUnlock; - if (!rt->isHeapBusy()) - maybeUnlock.construct(rt); -- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); -+ if (DecommitEnabled()) -+ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); - } - - if (ok) { +- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) ++ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(invert) diff --git a/mozilla-build.patch b/mozilla-build.patch index be1ba4b..9468e02 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,7 +1,7 @@ -diff -up mozilla-beta/security/manager/Makefile.in.build mozilla-beta/security/manager/Makefile.in ---- mozilla-beta/security/manager/Makefile.in.build 2012-03-09 01:39:56.000000000 +0100 -+++ mozilla-beta/security/manager/Makefile.in 2012-03-09 13:56:28.612328083 +0100 -@@ -174,7 +174,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +diff -up mozilla-aurora-7676a9a06403/security/build/Makefile.in.build mozilla-aurora-7676a9a06403/security/build/Makefile.in +--- mozilla-aurora-7676a9a06403/security/build/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/security/build/Makefile.in 2012-09-18 10:58:45.560063613 +0200 +@@ -139,7 +139,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 @@ -9,10 +9,11 @@ diff -up mozilla-beta/security/manager/Makefile.in.build mozilla-beta/security/m DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" ifndef MOZ_NATIVE_SQLITE DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3 -diff -up mozilla-beta/security/manager/ssl/src/Makefile.in.build mozilla-beta/security/manager/ssl/src/Makefile.in ---- mozilla-beta/security/manager/ssl/src/Makefile.in.build 2012-03-09 01:39:56.000000000 +0100 -+++ mozilla-beta/security/manager/ssl/src/Makefile.in 2012-03-09 13:57:37.055657208 +0100 -@@ -116,7 +116,6 @@ CSRCS += md4.c +diff -up mozilla-aurora-7676a9a06403/security/manager/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/Makefile.in +diff -up mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in +--- mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in 2012-09-18 10:54:16.310505794 +0200 +@@ -84,7 +84,6 @@ CSRCS += md4.c EXTRA_DEPS = $(NSS_DEP_LIBS) DEFINES += \ diff --git a/rhbz-872752.patch b/rhbz-872752.patch index 86bfdd7..63404c7 100644 --- a/rhbz-872752.patch +++ b/rhbz-872752.patch @@ -1,22 +1,38 @@ -diff -up mozilla-beta/xulrunner/installer/libxul-embedding.pc.in.embedlink mozilla-beta/xulrunner/installer/libxul-embedding.pc.in ---- mozilla-beta/xulrunner/installer/libxul-embedding.pc.in.embedlink 2012-11-06 14:51:44.000000000 +0100 -+++ mozilla-beta/xulrunner/installer/libxul-embedding.pc.in 2012-11-06 14:58:04.560608699 +0100 -@@ -7,5 +7,5 @@ Name: libxul-embedding - Description: Static library for version-independent embedding of the Mozilla runtime - Version: %MOZILLA_VERSION% - Requires: %NSPR_NAME% >= %NSPR_VERSION% --Libs: -L${sdkdir}/lib -lxpcomglue -ldl -+Libs: -L${sdkdir}/lib -lxpcomglue -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl - Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% -diff -up mozilla-beta/xulrunner/installer/Makefile.in.embedlink mozilla-beta/xulrunner/installer/Makefile.in ---- mozilla-beta/xulrunner/installer/Makefile.in.embedlink 2012-11-06 14:51:44.528600028 +0100 -+++ mozilla-beta/xulrunner/installer/Makefile.in 2012-11-06 14:51:44.535600028 +0100 -@@ -64,7 +64,7 @@ FULL_NSPR_LIBS=$(subst $(prefix),\$${sdk - NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version) - endif +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in.orig 2012-11-05 11:17:57.000000000 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in 2012-11-05 11:56:22.513385775 +0100 +@@ -46,6 +46,7 @@ --MOZ_XUL_LINK = -lxpcomglue_s -lxul -lxpcom -lmozalloc -+MOZ_XUL_LINK = -lxpcomglue_s -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -lxul -lxpcom -lmozalloc - ifdef JS_SHARED_LIBRARY - MOZ_JS_LINK = -lmozjs - else + pkg_config_files = \ + libxul.pc \ ++ libxul-embedding-lib.pc \ + libxul-embedding.pc \ + mozilla-js.pc \ + mozilla-plugin.pc \ +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in.orig 2012-11-05 11:59:31.493626458 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in 2012-11-05 12:01:03.547230893 +0100 +@@ -0,0 +1,11 @@ ++prefix=%prefix% ++sdkdir=%sdkdir% ++includedir=%includedir% ++idldir=%idldir% ++ ++Name: libxul-embedding-lib ++Description: Static library for version-independent embedding of the Mozilla runtime for libraries ++Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% ++Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in.fixembed 2012-11-05 11:17:57.227491778 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in 2012-11-05 12:01:56.140574788 +0100 +@@ -4,8 +4,8 @@ + idldir=%idldir% + + Name: libxul-embedding +-Description: Static library for version-independent embedding of the Mozilla runtime ++Description: Static library for version-independent embedding of the Mozilla runtime for applications + Version: %MOZILLA_VERSION% +-Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Requires: %NSPR_NAME% >= %NSPR_VERSION% , libxul-embedding-lib = %MOZILLA_VERSION% ++Libs: -L${sdkdir}/lib -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl -rdynamic + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/sources b/sources index 28f8d2b..256857d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1b360968ab05b2a59757d33514897915 xulrunner-16.0.2.source.tar.bz2 +a8f85eeca782e1d0f8b784bd11638069 xulrunner-17.0b5.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index eb15807..053df17 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -39,7 +39,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver %{version} %global alpha_version 0 -%global beta_version 0 +%global beta_version 5 %global rc_version 0 %global mozappdir %{_libdir}/%{name} @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 16.0.2 -Release: 3%{?pre_tag}%{?dist} +Version: 17.0 +Release: 0.1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -86,8 +86,9 @@ Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in # build patches -Patch1: mozilla-build.patch -Patch2: xulrunner-install-dir.patch +Patch0: xulrunner-version.patch +Patch1: xulrunner-install-dir.patch +Patch2: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 @@ -95,11 +96,9 @@ Patch18: xulrunner-16.0-jemalloc-ppc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch21: rhbz-872752.patch # Upstream patches Patch49: mozilla-746112.patch -Patch51: mozilla-709732-gfx-icc-profile-fix.patch # --------------------------------------------------- @@ -221,17 +220,19 @@ debug %{name}, you want to install %{name}-debuginfo instead. %setup -q -c cd %{tarballdir} -%patch1 -p1 -b .build -%patch2 -p1 +sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ + > version.patch +%{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch + +%patch1 -p1 +%patch2 -p1 -b .build %patch14 -p1 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk -%patch21 -p1 -b .872752 -%patch49 -p1 -b .746112 -%patch51 -p1 -b .709732 +%patch49 -p2 -b .746112 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -321,12 +322,12 @@ cd %{tarballdir} # Disable C++ exceptions since Mozilla code is not exception-safe # MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ - %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') + %{__sed} -e 's/-Wall//') %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" @@ -489,6 +490,9 @@ fi %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif %endif +%exclude %{mozappdir}/components/.mkdir.done +%exclude %{mozappdir}/defaults/pref/.mkdir.done +%exclude %{mozappdir}/modules/.mkdir.done %files devel %defattr(-,root,root,-) @@ -502,6 +506,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 13 2012 Martin Stransky - 17.0-0.1b5 +- Update to 17.0 Beta 5 + * Tue Nov 6 2012 Martin Stransky - 16.0.2-2 - Added fix for rhbz#872752 From 918b77d5f94d9a3fe99d8a3608549960c701ef66 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Nov 2012 12:27:03 +0100 Subject: [PATCH 309/486] removed unused patch --- xulrunner.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 053df17..abcb3c6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -86,7 +86,6 @@ Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in # build patches -Patch0: xulrunner-version.patch Patch1: xulrunner-install-dir.patch Patch2: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch @@ -220,10 +219,6 @@ debug %{name}, you want to install %{name}-debuginfo instead. %setup -q -c cd %{tarballdir} -sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ - > version.patch -%{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch - %patch1 -p1 %patch2 -p1 -b .build %patch14 -p1 -b .chromium-types From 74228c06c1878b7a482d4c0b7c35f551391d468f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Nov 2012 16:40:47 +0100 Subject: [PATCH 310/486] Update to 17.0 Beta 6 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0ae7936..1ad82ea 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-16.0.source.tar.bz2 /xulrunner-16.0.2.source.tar.bz2 /xulrunner-17.0b5.source.tar.bz2 +/xulrunner-17.0b6.source.tar.bz2 diff --git a/sources b/sources index 256857d..d815308 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a8f85eeca782e1d0f8b784bd11638069 xulrunner-17.0b5.source.tar.bz2 +95ee4ffd2520e2419b5e093bd5b7f5a2 xulrunner-17.0b6.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index abcb3c6..fc35a31 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -39,7 +39,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver %{version} %global alpha_version 0 -%global beta_version 5 +%global beta_version 6 %global rc_version 0 %global mozappdir %{_libdir}/%{name} @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 0.1%{?pre_tag}%{?dist} +Release: 0.2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -501,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Nov 14 2012 Martin Stransky - 17.0-0.2b6 +- Update to 17.0 Beta 6 + * Tue Nov 13 2012 Martin Stransky - 17.0-0.1b5 - Update to 17.0 Beta 5 From 93dc9b1f493da421b54d5527b098f3390c5a2b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Sun, 18 Nov 2012 13:39:00 +0100 Subject: [PATCH 311/486] fix sed expression --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index fc35a31..e2b717f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -322,7 +322,7 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" From cba7748c842bb5432a927cf8391e5a4f50e665b3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 Nov 2012 10:14:38 +0100 Subject: [PATCH 312/486] Update to 17.0 --- .gitignore | 2 ++ sources | 2 +- xulrunner.spec | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 1ad82ea..516cd0e 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-16.0.2.source.tar.bz2 /xulrunner-17.0b5.source.tar.bz2 /xulrunner-17.0b6.source.tar.bz2 +/firefox-17.0.source.tar.bz2 +/xulrunner-17.0.source.tar.bz2 diff --git a/sources b/sources index d815308..ebbc136 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -95ee4ffd2520e2419b5e093bd5b7f5a2 xulrunner-17.0b6.source.tar.bz2 +f40d59db4101b1d0b780aecb89994da2 xulrunner-17.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index fc35a31..d985ddb 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -39,7 +39,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver %{version} %global alpha_version 0 -%global beta_version 6 +%global beta_version 0 %global rc_version 0 %global mozappdir %{_libdir}/%{name} @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 0.2%{?pre_tag}%{?dist} +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -322,7 +322,7 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" @@ -501,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 19 2012 Martin Stransky - 17.0-1 +- Update to 17.0 + * Wed Nov 14 2012 Martin Stransky - 17.0-0.2b6 - Update to 17.0 Beta 6 From 0a2c501637e9ccf75944b28250c91b4f6cff0448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 19 Nov 2012 14:28:32 +0100 Subject: [PATCH 313/486] webrtc is available only on selected arches --- xulrunner.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index d985ddb..6a0a3fb 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -293,6 +293,10 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif +%ifnarch %{ix86} x86_64 %{arm} +echo "ac_add_options --disable-webrtc" >> .mozconfig +%endif + #--------------------------------------------------------------------- %build @@ -501,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 19 2012 Dan Horák - 17.0-2 +- webrtc is available only on selected arches + * Mon Nov 19 2012 Martin Stransky - 17.0-1 - Update to 17.0 From 8fc9b34d912bd0b08a215876f8280ad453b1dcb8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 Nov 2012 15:57:33 +0100 Subject: [PATCH 314/486] updated second arch patches --- mozilla-746112.patch | 115 +++++++++++++++++++++-------- xulrunner-2.0-chromium-types.patch | 29 ++++---- xulrunner.spec | 5 +- 3 files changed, 102 insertions(+), 47 deletions(-) diff --git a/mozilla-746112.patch b/mozilla-746112.patch index 765f993..01f6e16 100644 --- a/mozilla-746112.patch +++ b/mozilla-746112.patch @@ -1,35 +1,86 @@ -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -@@ -167,7 +167,7 @@ struct ByteTerm { - inputPosition = inputPos; - } +diff -up xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h +--- xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 2012-10-17 16:32:43.000000000 +0200 ++++ xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h 2012-10-24 14:48:12.186640489 +0200 +@@ -103,26 +103,31 @@ struct Cell + }; -- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(false) -@@ -188,7 +188,7 @@ struct ByteTerm { - atom.quantityCount = 1; - } + /* +- * Page size is 4096 by default, except for SPARC, where it is 8192. ++ * Page size must be static to support our arena pointer optimizations, so we ++ * are forced to support each platform with non-4096 pages as a special case. ++ * Note: The freelist supports a maximum arena shift of 15. + * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. + * Bug 692267: Move page size definition to gc/Memory.h and include it + * directly once jsgc.h is no longer an installed header. + */ + #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) + const size_t PageShift = 13; ++const size_t ArenaShift = PageShift; ++#elif defined(__powerpc__) ++const size_t PageShift = 16; ++const size_t ArenaShift = 12; + #else + const size_t PageShift = 12; ++const size_t ArenaShift = PageShift; + #endif + const size_t PageSize = size_t(1) << PageShift; ++const size_t ArenaSize = size_t(1) << ArenaShift; ++const size_t ArenaMask = ArenaSize - 1; -- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -@@ -171,7 +171,7 @@ struct PatternTerm { - quantityCount = 1; - } + const size_t ChunkShift = 20; + const size_t ChunkSize = size_t(1) << ChunkShift; + const size_t ChunkMask = ChunkSize - 1; -- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) -+ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) +-const size_t ArenaShift = PageShift; +-const size_t ArenaSize = PageSize; +-const size_t ArenaMask = ArenaSize - 1; +- + /* + * This is the maximum number of arenas we allow in the FreeCommitted state + * before we trigger a GC_SHRINK to release free arenas to the OS. +diff -up xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp +--- xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 2012-10-17 16:32:44.000000000 +0200 ++++ xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp 2012-10-24 14:46:28.253638095 +0200 +@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[] + sizeof(BackgroundPhaseStrings) / sizeof(AllocKind) + }; + ++/* Unused memory decommiting requires the arena size match the page size. */ ++static bool ++DecommitEnabled() ++{ ++ return PageSize == ArenaSize; ++} ++ + #ifdef DEBUG + void + ArenaHeader::checkSynchronizedWithFreeList() const +@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena() + decommittedArenas.unset(offset); + + Arena *arena = &arenas[offset]; +- MarkPagesInUse(arena, ArenaSize); ++ if (DecommitEnabled()) ++ MarkPagesInUse(arena, ArenaSize); + arena->aheader.setAsNotAllocated(); + + return &arena->aheader; +@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntim + chunk->removeFromAvailableList(); + + size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); +- bool ok; ++ bool ok = true; + { + /* + * If the main thread waits for the decommit to finish, skip +@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntim + Maybe maybeUnlock; + if (!rt->isHeapBusy()) + maybeUnlock.construct(rt); +- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); ++ if (DecommitEnabled()) ++ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); + } + + if (ok) { diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch index dfc82cc..a350b41 100644 --- a/xulrunner-2.0-chromium-types.patch +++ b/xulrunner-2.0-chromium-types.patch @@ -1,33 +1,34 @@ -Bug 627669 - add support for s390(x) and ppc(64) - -diff -up mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types mozilla-release/gfx/ycbcr/chromium_types.h ---- mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2011-06-15 23:57:26.000000000 +0200 -+++ mozilla-release/gfx/ycbcr/chromium_types.h 2011-06-30 10:04:25.105032221 +0200 -@@ -61,7 +61,11 @@ typedef PRInt16 int16; +diff -up xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h +--- xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2011-06-15 23:57:26.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h 2011-06-29 08:23:46.807314175 +0200 +@@ -61,10 +61,14 @@ typedef PRInt16 int16; #define ARCH_CPU_ARM_FAMILY 1 #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 -#elif defined(__ppc__) || defined(__powerpc) || defined(__PPC__) -+#elif defined(__ppc64__) || defined(__powerpc64__) -+#define ARCH_CPU_PPC_FAMILY 1 -+#define ARCH_CPU_PPC 1 -+#define ARCH_CPU_64_BITS 1 +#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) #define ARCH_CPU_PPC_FAMILY 1 #define ARCH_CPU_PPC 1 #define ARCH_CPU_32_BITS 1 ++#elif defined(__powerpc64__) ++#define ARCH_CPU_PPC_FAMILY 1 ++#define ARCH_CPU_PPC 1 ++#define ARCH_CPU_64_BITS 1 + #elif defined(__sparc) + #define ARCH_CPU_SPARC_FAMILY 1 + #define ARCH_CPU_SPARC 1 @@ -73,6 +77,14 @@ typedef PRInt16 int16; #define ARCH_CPU_SPARC_FAMILY 1 #define ARCH_CPU_SPARC 1 #define ARCH_CPU_64_BITS 1 -+#elif defined(__s390x__) -+#define ARCH_CPU_S390_FAMILY 1 -+#define ARCH_CPU_S390 1 -+#define ARCH_CPU_64_BITS 1 +#elif defined(__s390__) +#define ARCH_CPU_S390_FAMILY 1 +#define ARCH_CPU_S390 1 +#define ARCH_CPU_32_BITS 1 ++#elif defined(__s390x__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_64_BITS 1 #else #warning Please add support for your architecture in chromium_types.h #endif diff --git a/xulrunner.spec b/xulrunner.spec index 6a0a3fb..4e4aedd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 19 2012 Martin Stransky - 17.0-3 +- Updated second arch patches + * Mon Nov 19 2012 Dan Horák - 17.0-2 - webrtc is available only on selected arches From 3196ef4d10276a464aef2876501df528717de329 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Nov 2012 09:26:27 +0100 Subject: [PATCH 315/486] chromium patch fix --- xulrunner-2.0-chromium-types.patch | 29 +++++++++++++---------------- xulrunner.spec | 2 +- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch index a350b41..2b3db8c 100644 --- a/xulrunner-2.0-chromium-types.patch +++ b/xulrunner-2.0-chromium-types.patch @@ -1,34 +1,31 @@ -diff -up xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h ---- xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2011-06-15 23:57:26.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h 2011-06-29 08:23:46.807314175 +0200 -@@ -61,10 +61,14 @@ typedef PRInt16 int16; +diff -up xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h +--- xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2012-11-16 20:56:29.000000000 +0100 ++++ xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h 2012-11-20 09:19:14.843448418 +0100 +@@ -30,7 +30,11 @@ typedef int16_t int16; #define ARCH_CPU_ARM_FAMILY 1 #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 -#elif defined(__ppc__) || defined(__powerpc) || defined(__PPC__) -+#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) - #define ARCH_CPU_PPC_FAMILY 1 - #define ARCH_CPU_PPC 1 - #define ARCH_CPU_32_BITS 1 +#elif defined(__powerpc64__) +#define ARCH_CPU_PPC_FAMILY 1 +#define ARCH_CPU_PPC 1 +#define ARCH_CPU_64_BITS 1 - #elif defined(__sparc) - #define ARCH_CPU_SPARC_FAMILY 1 - #define ARCH_CPU_SPARC 1 -@@ -73,6 +77,14 @@ typedef PRInt16 int16; ++#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) + #define ARCH_CPU_PPC_FAMILY 1 + #define ARCH_CPU_PPC 1 + #define ARCH_CPU_32_BITS 1 +@@ -42,6 +46,14 @@ typedef int16_t int16; #define ARCH_CPU_SPARC_FAMILY 1 #define ARCH_CPU_SPARC 1 #define ARCH_CPU_64_BITS 1 -+#elif defined(__s390__) -+#define ARCH_CPU_S390_FAMILY 1 -+#define ARCH_CPU_S390 1 -+#define ARCH_CPU_32_BITS 1 +#elif defined(__s390x__) +#define ARCH_CPU_S390_FAMILY 1 +#define ARCH_CPU_S390 1 +#define ARCH_CPU_64_BITS 1 ++#elif defined(__s390__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_32_BITS 1 #else #warning Please add support for your architecture in chromium_types.h #endif diff --git a/xulrunner.spec b/xulrunner.spec index 4e4aedd..62ce7d8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -221,7 +221,7 @@ cd %{tarballdir} %patch1 -p1 %patch2 -p1 -b .build -%patch14 -p1 -b .chromium-types +%patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc From 33cdb0601f5bdfe0542a31fdb4490ac16c562a2e Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 27 Nov 2012 12:21:48 +0100 Subject: [PATCH 316/486] Rebuild against older nss --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 62ce7d8..8d2406d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 27 2012 Jan Horak - 17.0-4 +- Rebuild agains older NSS + * Mon Nov 19 2012 Martin Stransky - 17.0-3 - Updated second arch patches From ae2817adefc6151866da32b4fb6c21dc214dd869 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 29 Nov 2012 15:16:03 +0100 Subject: [PATCH 317/486] Update to 17.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 516cd0e..9a7dda8 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-17.0b6.source.tar.bz2 /firefox-17.0.source.tar.bz2 /xulrunner-17.0.source.tar.bz2 +/xulrunner-17.0.1.source.tar.bz2 diff --git a/sources b/sources index ebbc136..0a8294c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f40d59db4101b1d0b780aecb89994da2 xulrunner-17.0.source.tar.bz2 +13d616028eb77de927c29b6655c832c9 xulrunner-17.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 8d2406d..ddfd043 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 17.0 -Release: 4%{?pre_tag}%{?dist} +Version: 17.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 29 2012 Jan Horak - 17.0.1-1 +- Update to 17.0.1 + * Tue Nov 27 2012 Jan Horak - 17.0-4 - Rebuild agains older NSS From 3406c21cdf96282eca300320a03bf9338c8a6536 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 7 Dec 2012 13:55:38 +0100 Subject: [PATCH 318/486] Fixed rhbz#879595 --- mozilla-813997.patch | 154 +++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 9 ++- 2 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 mozilla-813997.patch diff --git a/mozilla-813997.patch b/mozilla-813997.patch new file mode 100644 index 0000000..c720789 --- /dev/null +++ b/mozilla-813997.patch @@ -0,0 +1,154 @@ +# HG changeset patch +# Parent 9224062dd65a142d9c02bcbacb4bd576dfafcd29 +b=813997 keep window max size to 16 bits r?roc + +diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp +--- a/widget/gtk2/nsWindow.cpp ++++ b/widget/gtk2/nsWindow.cpp +@@ -359,16 +359,17 @@ nsWindow::nsWindow() + mWindowGroup = nullptr; + mHasMappedToplevel = false; + mIsFullyObscured = false; + mRetryPointerGrab = false; + mTransientParent = nullptr; + mWindowType = eWindowType_child; + mSizeState = nsSizeMode_Normal; + mLastSizeMode = nsSizeMode_Normal; ++ mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize); + + #ifdef MOZ_X11 + mOldFocusWindow = 0; + #endif /* MOZ_X11 */ + mPluginType = PluginType_NONE; + + if (!gGlobalsInitialized) { + gGlobalsInitialized = true; +@@ -933,29 +934,30 @@ nsWindow::ConstrainPosition(bool aAllowS + *aY = screenHeight - mBounds.height; + } + } + return NS_OK; + } + + void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints) + { +- if (mShell) { +- GdkGeometry geometry; +- geometry.min_width = aConstraints.mMinSize.width; +- geometry.min_height = aConstraints.mMinSize.height; +- geometry.max_width = aConstraints.mMaxSize.width; +- geometry.max_height = aConstraints.mMaxSize.height; +- +- uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; +- gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, +- &geometry, GdkWindowHints(hints)); +- } +- +- nsBaseWidget::SetSizeConstraints(aConstraints); ++ mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize); ++ mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize); ++ ++ if (mShell) { ++ GdkGeometry geometry; ++ geometry.min_width = mSizeConstraints.mMinSize.width; ++ geometry.min_height = mSizeConstraints.mMinSize.height; ++ geometry.max_width = mSizeConstraints.mMaxSize.width; ++ geometry.max_height = mSizeConstraints.mMaxSize.height; ++ ++ uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; ++ gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, ++ &geometry, GdkWindowHints(hints)); ++ } + } + + NS_IMETHODIMP + nsWindow::Show(bool aState) + { + if (aState == mIsShown) + return NS_OK; + +@@ -1012,17 +1014,17 @@ NS_IMETHODIMP + nsWindow::Resize(int32_t aWidth, int32_t aHeight, bool aRepaint) + { + ConstrainSize(&aWidth, &aHeight); + + // For top-level windows, aWidth and aHeight should possibly be + // interpreted as frame bounds, but NativeResize treats these as window + // bounds (Bug 581866). + +- mBounds.SizeTo(GetSafeWindowSize(nsIntSize(aWidth, aHeight))); ++ mBounds.SizeTo(aWidth, aHeight); + + if (!mCreated) + return NS_OK; + + // There are several cases here that we need to handle, based on a + // matrix of the visibility of the widget, the sanity of this resize + // and whether or not the widget was previously sane. + +@@ -1087,17 +1089,17 @@ nsWindow::Resize(int32_t aWidth, int32_t + NS_IMETHODIMP + nsWindow::Resize(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight, + bool aRepaint) + { + ConstrainSize(&aWidth, &aHeight); + + mBounds.x = aX; + mBounds.y = aY; +- mBounds.SizeTo(GetSafeWindowSize(nsIntSize(aWidth, aHeight))); ++ mBounds.SizeTo(aWidth, aHeight); + + mNeedsMove = true; + + if (!mCreated) + return NS_OK; + + // There are several cases here that we need to handle, based on a + // matrix of the visibility of the widget, the sanity of this resize +@@ -3365,16 +3367,17 @@ nsWindow::Create(nsIWidget *aPare + if (aNativeParent || (aInitData && aInitData->mListenForResizes)) + listenForResizes = true; + + // and do our common creation + CommonCreate(aParent, listenForResizes); + + // save our bounds + mBounds = aRect; ++ ConstrainSize(&mBounds.width, &mBounds.height); + + // figure out our parent window + GtkWidget *parentMozContainer = nullptr; + GtkContainer *parentGtkContainer = nullptr; + GdkWindow *parentGdkWindow = nullptr; + GtkWindow *topLevelParent = nullptr; + nsWindow *parentnsWindow = nullptr; + GtkWidget *eventWidget = nullptr; +@@ -3971,24 +3974,26 @@ nsWindow::SetHasMappedToplevel(bool aSta + child->SetHasMappedToplevel(aState); + } + } + } + + nsIntSize + nsWindow::GetSafeWindowSize(nsIntSize aSize) + { ++ // The X protocol uses CARD32 for window sizes, but the server (1.11.3) ++ // reads it as CARD16. Sizes of pixmaps, used for drawing, are (unsigned) ++ // CARD16 in the protocol, but the server's ProcCreatePixmap returns ++ // BadAlloc if dimensions cannot be represented by signed shorts. + nsIntSize result = aSize; + const int32_t kInt16Max = 32767; + if (result.width > kInt16Max) { +- NS_WARNING("Clamping huge window width"); + result.width = kInt16Max; + } + if (result.height > kInt16Max) { +- NS_WARNING("Clamping huge window height"); + result.height = kInt16Max; + } + return result; + } + + void + nsWindow::EnsureGrabs(void) + { diff --git a/xulrunner.spec b/xulrunner.spec index ddfd043..7390bf7 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -5,7 +5,7 @@ %if 0%{?fedora} <= 17 %define system_sqlite 0 %else -%define system_sqlite 1 +%define system_sqlite 0 %endif # Use system cairo? @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -98,6 +98,7 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch49: mozilla-746112.patch +Patch50: mozilla-813997.patch # --------------------------------------------------- @@ -228,6 +229,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %patch49 -p2 -b .746112 +%patch50 -p1 -b 813997 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -505,6 +507,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 7 2012 Jan Horak - 17.0.1-2 +- Fixed rhbz#879595 + * Thu Nov 29 2012 Jan Horak - 17.0.1-1 - Update to 17.0.1 From 7b291c742e272d2226e49f457253f38d53266135 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 7 Dec 2012 17:15:28 +0100 Subject: [PATCH 319/486] Fixed 813997 patch --- mozilla-813997.patch | 83 ++++++-------------------------------------- xulrunner.spec | 2 +- 2 files changed, 12 insertions(+), 73 deletions(-) diff --git a/mozilla-813997.patch b/mozilla-813997.patch index c720789..0f63a8d 100644 --- a/mozilla-813997.patch +++ b/mozilla-813997.patch @@ -2,15 +2,10 @@ # Parent 9224062dd65a142d9c02bcbacb4bd576dfafcd29 b=813997 keep window max size to 16 bits r?roc -diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp ---- a/widget/gtk2/nsWindow.cpp -+++ b/widget/gtk2/nsWindow.cpp -@@ -359,16 +359,17 @@ nsWindow::nsWindow() - mWindowGroup = nullptr; - mHasMappedToplevel = false; - mIsFullyObscured = false; - mRetryPointerGrab = false; - mTransientParent = nullptr; +diff -up mozilla-release/widget/gtk2/nsWindow.cpp.813997 mozilla-release/widget/gtk2/nsWindow.cpp +--- mozilla-release/widget/gtk2/nsWindow.cpp.813997 2012-11-29 05:44:34.000000000 +0100 ++++ mozilla-release/widget/gtk2/nsWindow.cpp 2012-12-07 15:41:02.166873611 +0100 +@@ -358,6 +358,7 @@ nsWindow::nsWindow() mWindowType = eWindowType_child; mSizeState = nsSizeMode_Normal; mLastSizeMode = nsSizeMode_Normal; @@ -18,17 +13,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp #ifdef MOZ_X11 mOldFocusWindow = 0; - #endif /* MOZ_X11 */ - mPluginType = PluginType_NONE; - - if (!gGlobalsInitialized) { - gGlobalsInitialized = true; -@@ -933,29 +934,30 @@ nsWindow::ConstrainPosition(bool aAllowS - *aY = screenHeight - mBounds.height; - } - } - return NS_OK; - } +@@ -925,19 +926,20 @@ nsWindow::ConstrainPosition(bool aAllowS void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints) { @@ -43,11 +28,10 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp - gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, - &geometry, GdkWindowHints(hints)); - } -- -- nsBaseWidget::SetSizeConstraints(aConstraints); + mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize); + mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize); -+ + +- nsBaseWidget::SetSizeConstraints(aConstraints); + if (mShell) { + GdkGeometry geometry; + geometry.min_width = mSizeConstraints.mMinSize.width; @@ -62,17 +46,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp } NS_IMETHODIMP - nsWindow::Show(bool aState) - { - if (aState == mIsShown) - return NS_OK; - -@@ -1012,17 +1014,17 @@ NS_IMETHODIMP - nsWindow::Resize(int32_t aWidth, int32_t aHeight, bool aRepaint) - { - ConstrainSize(&aWidth, &aHeight); - - // For top-level windows, aWidth and aHeight should possibly be +@@ -1004,7 +1006,7 @@ nsWindow::Resize(int32_t aWidth, int32_t // interpreted as frame bounds, but NativeResize treats these as window // bounds (Bug 581866). @@ -81,17 +55,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp if (!mCreated) return NS_OK; - - // There are several cases here that we need to handle, based on a - // matrix of the visibility of the widget, the sanity of this resize - // and whether or not the widget was previously sane. - -@@ -1087,17 +1089,17 @@ nsWindow::Resize(int32_t aWidth, int32_t - NS_IMETHODIMP - nsWindow::Resize(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight, - bool aRepaint) - { - ConstrainSize(&aWidth, &aHeight); +@@ -1080,7 +1082,7 @@ nsWindow::Resize(int32_t aX, int32_t aY, mBounds.x = aX; mBounds.y = aY; @@ -100,17 +64,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp mNeedsMove = true; - if (!mCreated) - return NS_OK; - - // There are several cases here that we need to handle, based on a - // matrix of the visibility of the widget, the sanity of this resize -@@ -3365,16 +3367,17 @@ nsWindow::Create(nsIWidget *aPare - if (aNativeParent || (aInitData && aInitData->mListenForResizes)) - listenForResizes = true; - - // and do our common creation - CommonCreate(aParent, listenForResizes); +@@ -3373,6 +3375,7 @@ nsWindow::Create(nsIWidget *aPare // save our bounds mBounds = aRect; @@ -118,17 +72,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp // figure out our parent window GtkWidget *parentMozContainer = nullptr; - GtkContainer *parentGtkContainer = nullptr; - GdkWindow *parentGdkWindow = nullptr; - GtkWindow *topLevelParent = nullptr; - nsWindow *parentnsWindow = nullptr; - GtkWidget *eventWidget = nullptr; -@@ -3971,24 +3974,26 @@ nsWindow::SetHasMappedToplevel(bool aSta - child->SetHasMappedToplevel(aState); - } - } - } - +@@ -3964,14 +3967,16 @@ nsWindow::SetHasMappedToplevel(bool aSta nsIntSize nsWindow::GetSafeWindowSize(nsIntSize aSize) { @@ -147,8 +91,3 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp result.height = kInt16Max; } return result; - } - - void - nsWindow::EnsureGrabs(void) - { diff --git a/xulrunner.spec b/xulrunner.spec index 7390bf7..040f2e2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -229,7 +229,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %patch49 -p2 -b .746112 -%patch50 -p1 -b 813997 +%patch50 -p1 -b .813997 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From fdefea87fa061b6ae03ee7fe9f4509c2aa5db6e6 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 7 Dec 2012 17:19:48 +0100 Subject: [PATCH 320/486] Enable system sqlite for F18+ --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 040f2e2..db1b39b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -5,7 +5,7 @@ %if 0%{?fedora} <= 17 %define system_sqlite 0 %else -%define system_sqlite 0 +%define system_sqlite 1 %endif # Use system cairo? From d571e82662777a223b6b2fe745087903db2e1f81 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 13 Dec 2012 17:31:55 +0000 Subject: [PATCH 321/486] Disable webrtc on ARM as it currently tries to build SSE on ARM (fix FTBFS), Enable methodjit/tracejit on ARMv7 for more speed :) Fixes RHBZ 870548 --- .gitignore | 44 ++------------------------------------------ xulrunner.spec | 10 +++++++--- 2 files changed, 9 insertions(+), 45 deletions(-) diff --git a/.gitignore b/.gitignore index 9a7dda8..0d88a9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,2 @@ -xulrunner-1.9.2.7.source.tar.bz2 -xulrunner-1.9.3.0b3.source.tar.bz2 -/xulrunner-1.9.3.0b4.source.tar.bz2 -/xulrunner-2.0b6.source.tar.bz2 -/xulrunner-4.0b7.source.tar.bz2 -/xulrunner-2.0b7.source.tar.bz2 -/xulrunner-2.0b8.source.tar.bz2 -/xulrunner-2.0b9.source.tar.bz2 -/xulrunner-2.0b10.source.tar.bz2 -/xulrunner-2.0b11.source.tar.bz2 -/xulrunner-2.0b12.source.tar.bz2 -/xulrunner-2.0rc1.source.tar.bz2 -/xulrunner-2.0rc2.source.tar.bz2 -/xulrunner-2.0.source.tar.bz2 -/xulrunner-2.0.1.source.tar.bz2 -/xulrunner-5.0.source.tar.bz2 -/xulrunner-6.0.source.tar.bz2 -/xulrunner-6.0.2.source.tar.bz2 -/xulrunner-7.0.source.tar.bz2 -/xulrunner-7.0.1.source.tar.bz2 -/xulrunner-8.0.source.tar.bz2 -/xulrunner-9.0.source.tar.bz2 -/xulrunner-9.0.1.source.tar.bz2 -/xulrunner-10.0b6.source.tar.bz2 -/xulrunner-10.0.source.tar.bz2 -/xulrunner-10.0.1.source.tar.bz2 -/xulrunner-11.0b7.source.tar.bz2 -/xulrunner-11.0.source.tar.bz2 -/xulrunner-12.0.source.tar.bz2 -/xulrunner-13.0.source.tar.bz2 -/xulrunner-13.0.1.source.tar.bz2 -/xulrunner-14.0.1.source.tar.bz2 -/xulrunner-15.0b6.source.tar.bz2 -/xulrunner-15.0.source.tar.bz2 -/xulrunner-15.0.1.source.tar.bz2 -/xulrunner-16.0.source.tar.bz2 -/xulrunner-16.0.2.source.tar.bz2 -/xulrunner-17.0b5.source.tar.bz2 -/xulrunner-17.0b6.source.tar.bz2 -/firefox-17.0.source.tar.bz2 -/xulrunner-17.0.source.tar.bz2 -/xulrunner-17.0.1.source.tar.bz2 +/firefox-*.source.tar.bz2 +/xulrunner-*.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index db1b39b..c86cb2d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -288,14 +288,14 @@ echo "ac_add_options --with-float-abi=soft" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 +%ifnarch %{ix86} x86_64 armv7hl armv7hnl echo "ac_add_options --disable-methodjit" >> .mozconfig echo "ac_add_options --disable-monoic" >> .mozconfig echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 %{arm} +%ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig %endif @@ -507,6 +507,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 13 2012 Peter Robinson 17.0.1-3 +- Disable webrtc on ARM as it currently tries to build SSE on ARM (fix FTBFS) +- Enable methodjit/tracejit on ARMv7 for more speed :) Fixes RHBZ 870548 + * Fri Dec 7 2012 Jan Horak - 17.0.1-2 - Fixed rhbz#879595 From 91316e0461a86428cba339d6170d47d195cf7e5c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 7 Jan 2013 15:20:09 +0100 Subject: [PATCH 322/486] Update to 18.0 --- mozilla-746112.patch | 86 ---------------------------------------- mozilla-813997.patch | 93 -------------------------------------------- sources | 3 +- xulrunner.spec | 12 +++--- 4 files changed, 7 insertions(+), 187 deletions(-) delete mode 100644 mozilla-746112.patch delete mode 100644 mozilla-813997.patch diff --git a/mozilla-746112.patch b/mozilla-746112.patch deleted file mode 100644 index 01f6e16..0000000 --- a/mozilla-746112.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -up xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h ---- xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 2012-10-17 16:32:43.000000000 +0200 -+++ xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h 2012-10-24 14:48:12.186640489 +0200 -@@ -103,26 +103,31 @@ struct Cell - }; - - /* -- * Page size is 4096 by default, except for SPARC, where it is 8192. -+ * Page size must be static to support our arena pointer optimizations, so we -+ * are forced to support each platform with non-4096 pages as a special case. -+ * Note: The freelist supports a maximum arena shift of 15. - * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. - * Bug 692267: Move page size definition to gc/Memory.h and include it - * directly once jsgc.h is no longer an installed header. - */ - #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) - const size_t PageShift = 13; -+const size_t ArenaShift = PageShift; -+#elif defined(__powerpc__) -+const size_t PageShift = 16; -+const size_t ArenaShift = 12; - #else - const size_t PageShift = 12; -+const size_t ArenaShift = PageShift; - #endif - const size_t PageSize = size_t(1) << PageShift; -+const size_t ArenaSize = size_t(1) << ArenaShift; -+const size_t ArenaMask = ArenaSize - 1; - - const size_t ChunkShift = 20; - const size_t ChunkSize = size_t(1) << ChunkShift; - const size_t ChunkMask = ChunkSize - 1; - --const size_t ArenaShift = PageShift; --const size_t ArenaSize = PageSize; --const size_t ArenaMask = ArenaSize - 1; -- - /* - * This is the maximum number of arenas we allow in the FreeCommitted state - * before we trigger a GC_SHRINK to release free arenas to the OS. -diff -up xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp ---- xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 2012-10-17 16:32:44.000000000 +0200 -+++ xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp 2012-10-24 14:46:28.253638095 +0200 -@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[] - sizeof(BackgroundPhaseStrings) / sizeof(AllocKind) - }; - -+/* Unused memory decommiting requires the arena size match the page size. */ -+static bool -+DecommitEnabled() -+{ -+ return PageSize == ArenaSize; -+} -+ - #ifdef DEBUG - void - ArenaHeader::checkSynchronizedWithFreeList() const -@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena() - decommittedArenas.unset(offset); - - Arena *arena = &arenas[offset]; -- MarkPagesInUse(arena, ArenaSize); -+ if (DecommitEnabled()) -+ MarkPagesInUse(arena, ArenaSize); - arena->aheader.setAsNotAllocated(); - - return &arena->aheader; -@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntim - chunk->removeFromAvailableList(); - - size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); -- bool ok; -+ bool ok = true; - { - /* - * If the main thread waits for the decommit to finish, skip -@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntim - Maybe maybeUnlock; - if (!rt->isHeapBusy()) - maybeUnlock.construct(rt); -- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); -+ if (DecommitEnabled()) -+ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); - } - - if (ok) { diff --git a/mozilla-813997.patch b/mozilla-813997.patch deleted file mode 100644 index 0f63a8d..0000000 --- a/mozilla-813997.patch +++ /dev/null @@ -1,93 +0,0 @@ -# HG changeset patch -# Parent 9224062dd65a142d9c02bcbacb4bd576dfafcd29 -b=813997 keep window max size to 16 bits r?roc - -diff -up mozilla-release/widget/gtk2/nsWindow.cpp.813997 mozilla-release/widget/gtk2/nsWindow.cpp ---- mozilla-release/widget/gtk2/nsWindow.cpp.813997 2012-11-29 05:44:34.000000000 +0100 -+++ mozilla-release/widget/gtk2/nsWindow.cpp 2012-12-07 15:41:02.166873611 +0100 -@@ -358,6 +358,7 @@ nsWindow::nsWindow() - mWindowType = eWindowType_child; - mSizeState = nsSizeMode_Normal; - mLastSizeMode = nsSizeMode_Normal; -+ mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize); - - #ifdef MOZ_X11 - mOldFocusWindow = 0; -@@ -925,19 +926,20 @@ nsWindow::ConstrainPosition(bool aAllowS - - void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints) - { -- if (mShell) { -- GdkGeometry geometry; -- geometry.min_width = aConstraints.mMinSize.width; -- geometry.min_height = aConstraints.mMinSize.height; -- geometry.max_width = aConstraints.mMaxSize.width; -- geometry.max_height = aConstraints.mMaxSize.height; -- -- uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; -- gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, -- &geometry, GdkWindowHints(hints)); -- } -+ mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize); -+ mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize); - -- nsBaseWidget::SetSizeConstraints(aConstraints); -+ if (mShell) { -+ GdkGeometry geometry; -+ geometry.min_width = mSizeConstraints.mMinSize.width; -+ geometry.min_height = mSizeConstraints.mMinSize.height; -+ geometry.max_width = mSizeConstraints.mMaxSize.width; -+ geometry.max_height = mSizeConstraints.mMaxSize.height; -+ -+ uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; -+ gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, -+ &geometry, GdkWindowHints(hints)); -+ } - } - - NS_IMETHODIMP -@@ -1004,7 +1006,7 @@ nsWindow::Resize(int32_t aWidth, int32_t - // interpreted as frame bounds, but NativeResize treats these as window - // bounds (Bug 581866). - -- mBounds.SizeTo(GetSafeWindowSize(nsIntSize(aWidth, aHeight))); -+ mBounds.SizeTo(aWidth, aHeight); - - if (!mCreated) - return NS_OK; -@@ -1080,7 +1082,7 @@ nsWindow::Resize(int32_t aX, int32_t aY, - - mBounds.x = aX; - mBounds.y = aY; -- mBounds.SizeTo(GetSafeWindowSize(nsIntSize(aWidth, aHeight))); -+ mBounds.SizeTo(aWidth, aHeight); - - mNeedsMove = true; - -@@ -3373,6 +3375,7 @@ nsWindow::Create(nsIWidget *aPare - - // save our bounds - mBounds = aRect; -+ ConstrainSize(&mBounds.width, &mBounds.height); - - // figure out our parent window - GtkWidget *parentMozContainer = nullptr; -@@ -3964,14 +3967,16 @@ nsWindow::SetHasMappedToplevel(bool aSta - nsIntSize - nsWindow::GetSafeWindowSize(nsIntSize aSize) - { -+ // The X protocol uses CARD32 for window sizes, but the server (1.11.3) -+ // reads it as CARD16. Sizes of pixmaps, used for drawing, are (unsigned) -+ // CARD16 in the protocol, but the server's ProcCreatePixmap returns -+ // BadAlloc if dimensions cannot be represented by signed shorts. - nsIntSize result = aSize; - const int32_t kInt16Max = 32767; - if (result.width > kInt16Max) { -- NS_WARNING("Clamping huge window width"); - result.width = kInt16Max; - } - if (result.height > kInt16Max) { -- NS_WARNING("Clamping huge window height"); - result.height = kInt16Max; - } - return result; diff --git a/sources b/sources index 0a8294c..4f2cd6e 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -13d616028eb77de927c29b6655c832c9 xulrunner-17.0.1.source.tar.bz2 +485d02563854c20a3788d89db07b0687 firefox-18.0.source.tar.bz2 +485d02563854c20a3788d89db07b0687 xulrunner-18.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index c86cb2d..4c7efbe 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 17.0.1 -Release: 3%{?pre_tag}%{?dist} +Version: 18.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,8 +97,6 @@ Patch18: xulrunner-16.0-jemalloc-ppc.patch Patch20: mozilla-193-pkgconfig.patch # Upstream patches -Patch49: mozilla-746112.patch -Patch50: mozilla-813997.patch # --------------------------------------------------- @@ -228,9 +226,6 @@ cd %{tarballdir} %patch20 -p2 -b .pk -%patch49 -p2 -b .746112 -%patch50 -p1 -b .813997 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig %if %{enable_mozilla_crashreporter} @@ -507,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jan 7 2013 Martin Stransky - 18.0-1 +- Update to 18.0 + * Thu Dec 13 2012 Peter Robinson 17.0.1-3 - Disable webrtc on ARM as it currently tries to build SSE on ARM (fix FTBFS) - Enable methodjit/tracejit on ARMv7 for more speed :) Fixes RHBZ 870548 From 8b21f12e615f54beac3d8b7c510a467f4df51ee8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 8 Jan 2013 12:30:24 +0100 Subject: [PATCH 323/486] Build fix --- xulrunner.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 4c7efbe..7cce99e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -317,8 +317,7 @@ cd %{tarballdir} # # Disable C++ exceptions since Mozilla code is not exception-safe # -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ - %{__sed} -e 's/-Wall//') +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-Wall//') %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif @@ -330,7 +329,7 @@ MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' From e14ae82aeba6d5605524780a9eb9083bd399a633 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 8 Jan 2013 23:29:31 +0100 Subject: [PATCH 324/486] Disabled debuginfo packages due to Bug #304121 --- xulrunner.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7cce99e..10fcae4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,3 +1,6 @@ +# Disabled debuginfo packages due to Bug #304121 +%global debug_package %{nil} + # Use system nspr/nss? %define system_nss 1 @@ -47,7 +50,8 @@ # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 -%global enable_mozilla_crashreporter 1 +# Disabled debuginfo packages due to Bug #304121 +%global enable_mozilla_crashreporter 0 %else %global enable_mozilla_crashreporter 0 %endif @@ -429,6 +433,9 @@ EOF %{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries +# Remove tmp files +find $RPM_BUILD_ROOT/%{mozappdir} -name '.mkdir.done' -exec rm -rf {} \; + # ghost files %{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components touch $RPM_BUILD_ROOT%{mozappdir}/components/compreg.dat @@ -485,9 +492,6 @@ fi %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif %endif -%exclude %{mozappdir}/components/.mkdir.done -%exclude %{mozappdir}/defaults/pref/.mkdir.done -%exclude %{mozappdir}/modules/.mkdir.done %files devel %defattr(-,root,root,-) From d667c3fbc8f3892fa004039323b1248b7f28f97e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 09:07:12 +0100 Subject: [PATCH 325/486] Disabled system sqlite on Fedora 18 --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 10fcae4..d7749e2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -5,7 +5,7 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} <= 17 +%if 0%{?fedora} <= 18 %define system_sqlite 0 %else %define system_sqlite 1 @@ -79,7 +79,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 9 2013 Martin Stransky - 18.0-2 +- Disabled system sqlite on Fedora 18 + * Mon Jan 7 2013 Martin Stransky - 18.0-1 - Update to 18.0 From 503a3b989608c1fcb02b5d9d4ba2e5d7f91ee135 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 11:06:56 +0100 Subject: [PATCH 326/486] Fixed source files --- sources | 1 - xulrunner.spec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 4f2cd6e..d2c035d 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -485d02563854c20a3788d89db07b0687 firefox-18.0.source.tar.bz2 485d02563854c20a3788d89db07b0687 xulrunner-18.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index d7749e2..d1eac55 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -79,7 +79,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 9 2013 Martin Stransky - 18.0-3 +- Fixed source files + * Wed Jan 9 2013 Martin Stransky - 18.0-2 - Disabled system sqlite on Fedora 18 From b260f32373eef70f72a169ba449372c055053155 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 12:21:15 +0100 Subject: [PATCH 327/486] Disabled WebRTC due to rhbz#304121, enabled debuginfo packages --- xulrunner.spec | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d1eac55..b34b305 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,6 +1,3 @@ -# Disabled debuginfo packages due to Bug #304121 -%global debug_package %{nil} - # Use system nspr/nss? %define system_nss 1 @@ -50,8 +47,7 @@ # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 -# Disabled debuginfo packages due to Bug #304121 -%global enable_mozilla_crashreporter 0 +%global enable_mozilla_crashreporter 1 %else %global enable_mozilla_crashreporter 0 %endif @@ -79,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -294,9 +290,10 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 +# Disable WebRTC because of Bug 304121 +#%ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig -%endif +#%endif #--------------------------------------------------------------------- @@ -505,8 +502,9 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Jan 9 2013 Martin Stransky - 18.0-3 +* Wed Jan 9 2013 Martin Stransky - 18.0-4 - Fixed source files +- Disabled WebRTC due to rhbz#304121 * Wed Jan 9 2013 Martin Stransky - 18.0-2 - Disabled system sqlite on Fedora 18 From 0f3792dfad499db6214c28c079907905c5d2baa3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 12:36:43 +0100 Subject: [PATCH 328/486] Updated NSS/NSPR versions --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index b34b305..500ddd7 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,9 +21,9 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9.2 +%global nspr_version 4.9.3 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.13.5 +%global nss_version 3.14.1 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif From 4228c3d2be418f9088a0f916c4b149111ae3964b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 12:54:46 +0100 Subject: [PATCH 329/486] Added fix for langpacks --- mozilla-677092-restartless-lang.patch | 698 ++++++++++++++++++++++++++ xulrunner.spec | 9 +- 2 files changed, 705 insertions(+), 2 deletions(-) create mode 100644 mozilla-677092-restartless-lang.patch diff --git a/mozilla-677092-restartless-lang.patch b/mozilla-677092-restartless-lang.patch new file mode 100644 index 0000000..a08de9b --- /dev/null +++ b/mozilla-677092-restartless-lang.patch @@ -0,0 +1,698 @@ +# HG changeset patch +# User Axel Hecht +# Date 1348128099 -7200 +# Node ID 38adce439c3c0b5fd7a035dc53ffd853e80f87ba +# Parent 08d435dedc7fc19bfad3d31c62daec9013525c6d +bug 677092, make language packs restartless, r=Unfocused +Make language packs just trigger the chrome registration hooks, and +disable picking up bootstrap.js, and declare them restartless. + +diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm +--- a/toolkit/mozapps/extensions/XPIProvider.jsm ++++ b/toolkit/mozapps/extensions/XPIProvider.jsm +@@ -740,8 +740,8 @@ + } + } + else { +- // spell check dictionaries never require a restart +- if (addon.type == "dictionary") ++ // spell check dictionaries and language packs never require a restart ++ if (addon.type == "dictionary" || addon.type == "locale") + addon.bootstrap = true; + + // Only extensions are allowed to provide an optionsURL, optionsType or aboutURL. For +@@ -3695,6 +3695,11 @@ + Components.manager.addBootstrappedManifestLocation(aFile); + + try { ++ // Don't call bootstrap.js methods for language packs, ++ // they only contain chrome. ++ if (aType == "locale") ++ return; ++ + // Load the scope if it hasn't already been loaded + if (!(aId in this.bootstrapScopes)) + this.loadBootstrapScope(aId, aFile, aVersion, aType); +diff --git a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest b/toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest +copy from toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest +copy to toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest +--- a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest ++++ b/toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest +@@ -1,6 +1,1 @@ +-content test-addon-1 chrome/content +-# comment! +- locale test-addon-1 en-US locale/en-US +- # commentaire! +- locale test-addon-1 fr-FR locale/fr-FR +-overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul ++locale test-langpack x-testing locale/x-testing +diff --git a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf +copy from toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf +copy to toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf +--- a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf ++++ b/toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf +@@ -4,12 +4,12 @@ + xmlns:em="http://www.mozilla.org/2004/em-rdf#"> + + +- addon1@tests.mozilla.org ++ langpack-x-testing@tests.mozilla.org ++ 8 + 1.0 + + +- Test 1 +- Test Description ++ Language Pack x-testing + + + +diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js b/toolkit/mozapps/extensions/test/xpcshell/test_langpack.js +copy from toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js +copy to toolkit/mozapps/extensions/test/xpcshell/test_langpack.js +--- a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js ++++ b/toolkit/mozapps/extensions/test/xpcshell/test_langpack.js +@@ -2,7 +2,7 @@ + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +-// This verifies that bootstrappable add-ons can be used without restarts. ++// This verifies that language packs can be used without restarts. + Components.utils.import("resource://gre/modules/Services.jsm"); + + // Enable loading extensions from the user scopes +@@ -18,91 +18,22 @@ + userExtDir.append(gAppInfo.ID); + registerDirectory("XREUSysExt", userExtDir.parent); + +-Components.utils.import("resource://testing-common/httpd.js"); +-var testserver; ++var chrome = Components.classes["@mozilla.org/chrome/chrome-registry;1"] ++ .getService(Components.interfaces.nsIXULChromeRegistry); + +-/** +- * This object is both a factory and an mozISpellCheckingEngine implementation (so, it +- * is de-facto a service). It's also an interface requestor that gives out +- * itself when asked for mozISpellCheckingEngine. +- */ +-var HunspellEngine = { +- dictionaryDirs: [], +- listener: null, +- +- QueryInterface: function hunspell_qi(iid) { +- if (iid.equals(Components.interfaces.nsISupports) || +- iid.equals(Components.interfaces.nsIFactory) || +- iid.equals(Components.interfaces.mozISpellCheckingEngine)) +- return this; +- throw Components.results.NS_ERROR_NO_INTERFACE; +- }, +- createInstance: function hunspell_ci(outer, iid) { +- if (outer) +- throw Components.results.NS_ERROR_NO_AGGREGATION; +- return this.QueryInterface(iid); +- }, +- lockFactory: function hunspell_lockf(lock) { +- throw Components.results.NS_ERROR_NOT_IMPLEMENTED; +- }, +- +- addDirectory: function hunspell_addDirectory(dir) { +- this.dictionaryDirs.push(dir); +- if (this.listener) +- this.listener("addDirectory"); +- }, +- +- removeDirectory: function hunspell_addDirectory(dir) { +- this.dictionaryDirs.splice(this.dictionaryDirs.indexOf(dir), 1); +- if (this.listener) +- this.listener("removeDirectory"); +- }, +- +- getInterface: function hunspell_gi(iid) { +- if (iid.equals(Components.interfaces.mozISpellCheckingEngine)) +- return this; +- throw Components.results.NS_ERROR_NO_INTERFACE; +- }, +- +- contractID: "@mozilla.org/spellchecker/engine;1", +- classID: Components.ID("{6f3c63bc-a4fd-449b-9a58-a2d9bd972cce}"), +- +- activate: function hunspell_activate() { +- this.origClassID = Components.manager.nsIComponentRegistrar +- .contractIDToCID(this.contractID); +- this.origFactory = Components.manager +- .getClassObject(Components.classes[this.contractID], +- Components.interfaces.nsIFactory); +- +- Components.manager.nsIComponentRegistrar +- .unregisterFactory(this.origClassID, this.origFactory); +- Components.manager.nsIComponentRegistrar.registerFactory(this.classID, +- "Test hunspell", this.contractID, this); +- }, +- +- deactivate: function hunspell_deactivate() { +- Components.manager.nsIComponentRegistrar.unregisterFactory(this.classID, this); +- Components.manager.nsIComponentRegistrar.registerFactory(this.origClassID, +- "Hunspell", this.contractID, this.origFactory); +- }, +- +- isDictionaryEnabled: function hunspell_isDictionaryEnabled(name) { +- return this.dictionaryDirs.some(function(dir) { +- var dic = dir.clone(); +- dic.append(name); +- return dic.exists(); +- }); ++function do_check_locale_not_registered(provider) { ++ let didThrow = false; ++ try { ++ chrome.getSelectedLocale(provider); ++ } catch (e) { ++ didThrow = true; + } +-}; ++ do_check_true(didThrow); ++} + + function run_test() { + do_test_pending(); + +- // Create and configure the HTTP server. +- testserver = new HttpServer(); +- testserver.registerDirectory("/addons/", do_get_file("addons")); +- testserver.start(4444); +- + startupManager(); + + run_test_1(); +@@ -114,25 +45,22 @@ + "onNewInstall" + ]); + +- HunspellEngine.activate(); +- +- AddonManager.getInstallForFile(do_get_addon("test_dictionary"), function(install) { ++ AddonManager.getInstallForFile(do_get_addon("test_langpack"), function(install) { + ensure_test_completed(); + + do_check_neq(install, null); +- do_check_eq(install.type, "dictionary"); ++ do_check_eq(install.type, "locale"); + do_check_eq(install.version, "1.0"); +- do_check_eq(install.name, "Test Dictionary"); ++ do_check_eq(install.name, "Language Pack x-testing"); + do_check_eq(install.state, AddonManager.STATE_DOWNLOADED); + do_check_true(install.addon.hasResource("install.rdf")); + do_check_false(install.addon.hasResource("bootstrap.js")); + do_check_eq(install.addon.operationsRequiringRestart & + AddonManager.OP_NEEDS_RESTART_INSTALL, 0); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); + + let addon = install.addon; + prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ ++ "langpack-x-testing@tests.mozilla.org": [ + ["onInstalling", false], + "onInstalled" + ] +@@ -141,11 +69,7 @@ + "onInstallEnded", + ], function() { + do_check_true(addon.hasResource("install.rdf")); +- HunspellEngine.listener = function(aEvent) { +- HunspellEngine.listener = null; +- do_check_eq(aEvent, "addDirectory"); +- check_test_1(); +- }; ++ check_test_1(); + }); + install.install(); + }); +@@ -157,18 +81,18 @@ + // doesn't require a restart. + do_check_eq(installs.length, 0); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + do_check_neq(b1, null); + do_check_eq(b1.version, "1.0"); + do_check_false(b1.appDisabled); + do_check_false(b1.userDisabled); + do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); ++ // check chrome reg that language pack is registered ++ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); + do_check_true(b1.hasResource("install.rdf")); + do_check_false(b1.hasResource("bootstrap.js")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); + +- let dir = do_get_addon_root_uri(profileDir, "ab-CD@dictionaries.addons.mozilla.org"); ++ let dir = do_get_addon_root_uri(profileDir, "langpack-x-testing@tests.mozilla.org"); + + AddonManager.getAddonsWithOperationsByTypes(null, function(list) { + do_check_eq(list.length, 0); +@@ -181,9 +105,9 @@ + + // Tests that disabling doesn't require a restart + function run_test_2() { +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ ++ "langpack-x-testing@tests.mozilla.org": [ + ["onDisabling", false], + "onDisabled" + ] +@@ -199,10 +123,10 @@ + do_check_false(b1.appDisabled); + do_check_true(b1.userDisabled); + do_check_false(b1.isActive); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is not registered ++ do_check_locale_not_registered("test-langpack"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { + do_check_neq(newb1, null); + do_check_eq(newb1.version, "1.0"); + do_check_false(newb1.appDisabled); +@@ -217,12 +141,11 @@ + // Test that restarting doesn't accidentally re-enable + function run_test_3() { + shutdownManager(); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); + startupManager(false); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is not registered ++ do_check_locale_not_registered("test-langpack"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + do_check_neq(b1, null); + do_check_eq(b1.version, "1.0"); + do_check_false(b1.appDisabled); +@@ -235,9 +158,9 @@ + + // Tests that enabling doesn't require a restart + function run_test_4() { +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ ++ "langpack-x-testing@tests.mozilla.org": [ + ["onEnabling", false], + "onEnabled" + ] +@@ -253,10 +176,10 @@ + do_check_false(b1.appDisabled); + do_check_false(b1.userDisabled); + do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is registered ++ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { + do_check_neq(newb1, null); + do_check_eq(newb1.version, "1.0"); + do_check_false(newb1.appDisabled); +@@ -271,13 +194,11 @@ + // Tests that a restart shuts down and restarts the add-on + function run_test_5() { + shutdownManager(); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); + startupManager(false); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is registered ++ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + do_check_neq(b1, null); + do_check_eq(b1.version, "1.0"); + do_check_false(b1.appDisabled); +@@ -291,9 +212,9 @@ + + // Tests that uninstalling doesn't require a restart + function run_test_7() { +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ ++ "langpack-x-testing@tests.mozilla.org": [ + ["onUninstalling", false], + "onUninstalled" + ] +@@ -309,333 +230,18 @@ + + function check_test_7() { + ensure_test_completed(); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is not registered ++ do_check_locale_not_registered("test-langpack"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + do_check_eq(b1, null); + + restartManager(); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { + do_check_eq(newb1, null); + +- run_test_8(); ++ do_test_finished(); + }); + }); + } +- +-// Test that a bootstrapped extension dropped into the profile loads properly +-// on startup and doesn't cause an EM restart +-function run_test_8() { +- shutdownManager(); +- +- let dir = profileDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. +- createInstance(AM_Ci.nsIZipReader); +- zip.open(do_get_addon("test_dictionary")); +- dir.append("install.rdf"); +- zip.extract("install.rdf", dir); +- dir = dir.parent; +- dir.append("dictionaries"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- dir.append("ab-CD.dic"); +- zip.extract("dictionaries/ab-CD.dic", dir); +- zip.close(); +- +- startupManager(false); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_false(b1.appDisabled); +- do_check_false(b1.userDisabled); +- do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- run_test_9(); +- }); +-} +- +-// Test that items detected as removed during startup get removed properly +-function run_test_9() { +- shutdownManager(); +- +- let dir = profileDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.remove(true); +- startupManager(false); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_eq(b1, null); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- run_test_12(); +- }); +-} +- +- +-// Tests that bootstrapped extensions are correctly loaded even if the app is +-// upgraded at the same time +-function run_test_12() { +- shutdownManager(); +- +- let dir = profileDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. +- createInstance(AM_Ci.nsIZipReader); +- zip.open(do_get_addon("test_dictionary")); +- dir.append("install.rdf"); +- zip.extract("install.rdf", dir); +- dir = dir.parent; +- dir.append("dictionaries"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- dir.append("ab-CD.dic"); +- zip.extract("dictionaries/ab-CD.dic", dir); +- zip.close(); +- +- startupManager(true); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_false(b1.appDisabled); +- do_check_false(b1.userDisabled); +- do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- b1.uninstall(); +- restartManager(); +- +- run_test_16(); +- }); +-} +- +- +-// Tests that bootstrapped extensions don't get loaded when in safe mode +-function run_test_16() { +- installAllFiles([do_get_addon("test_dictionary")], function() { +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- // Should have installed and started +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- shutdownManager(); +- +- // Should have stopped +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- gAppInfo.inSafeMode = true; +- startupManager(false); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- // Should still be stopped +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_false(b1.isActive); +- +- shutdownManager(); +- gAppInfo.inSafeMode = false; +- startupManager(false); +- +- // Should have started +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- b1.uninstall(); +- +- run_test_17(); +- }); +- }); +- }); +- }); +-} +- +-// Check that a bootstrapped extension in a non-profile location is loaded +-function run_test_17() { +- shutdownManager(); +- +- let dir = userExtDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. +- createInstance(AM_Ci.nsIZipReader); +- zip.open(do_get_addon("test_dictionary")); +- dir.append("install.rdf"); +- zip.extract("install.rdf", dir); +- dir = dir.parent; +- dir.append("dictionaries"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- dir.append("ab-CD.dic"); +- zip.extract("dictionaries/ab-CD.dic", dir); +- zip.close(); +- +- startupManager(); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- // Should have installed and started +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_true(b1.isActive); +- +- // From run_test_21 +- dir = userExtDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.remove(true); +- +- restartManager(); +- +- run_test_23(); +- }); +-} +- +-// Tests that installing from a URL doesn't require a restart +-function run_test_23() { +- prepare_test({ }, [ +- "onNewInstall" +- ]); +- +- let url = "http://localhost:4444/addons/test_dictionary.xpi"; +- AddonManager.getInstallForURL(url, function(install) { +- ensure_test_completed(); +- +- do_check_neq(install, null); +- +- prepare_test({ }, [ +- "onDownloadStarted", +- "onDownloadEnded" +- ], function() { +- do_check_eq(install.type, "dictionary"); +- do_check_eq(install.version, "1.0"); +- do_check_eq(install.name, "Test Dictionary"); +- do_check_eq(install.state, AddonManager.STATE_DOWNLOADED); +- do_check_true(install.addon.hasResource("install.rdf")); +- do_check_false(install.addon.hasResource("bootstrap.js")); +- do_check_eq(install.addon.operationsRequiringRestart & +- AddonManager.OP_NEEDS_RESTART_INSTALL, 0); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- let addon = install.addon; +- prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ +- ["onInstalling", false], +- "onInstalled" +- ] +- }, [ +- "onInstallStarted", +- "onInstallEnded", +- ], function() { +- do_check_true(addon.hasResource("install.rdf")); +- check_test_23(); +- }); +- }); +- install.install(); +- }, "application/x-xpinstall"); +-} +- +-function check_test_23() { +- AddonManager.getAllInstalls(function(installs) { +- // There should be no active installs now since the install completed and +- // doesn't require a restart. +- do_check_eq(installs.length, 0); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_false(b1.appDisabled); +- do_check_false(b1.userDisabled); +- do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_true(b1.hasResource("install.rdf")); +- do_check_false(b1.hasResource("bootstrap.js")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- let dir = do_get_addon_root_uri(profileDir, "ab-CD@dictionaries.addons.mozilla.org"); +- +- AddonManager.getAddonsWithOperationsByTypes(null, function(list) { +- do_check_eq(list.length, 0); +- +- restartManager(); +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- b1.uninstall(); +- restartManager(); +- +- testserver.stop(run_test_25); +- }); +- }); +- }); +- }); +-} +- +-// Tests that updating from a bootstrappable add-on to a normal add-on calls +-// the uninstall method +-function run_test_25() { +- installAllFiles([do_get_addon("test_dictionary")], function() { +- HunspellEngine.listener = function(aEvent) { +- HunspellEngine.listener = null; +- do_check_eq(aEvent, "addDirectory"); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- installAllFiles([do_get_addon("test_dictionary_2")], function() { +- // Needs a restart to complete this so the old version stays running +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_true(b1.isActive); +- do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE)); +- +- restartManager(); +- +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "2.0"); +- do_check_true(b1.isActive); +- do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE); +- +- run_test_26(); +- }); +- }); +- }); +- }; +- }); +-} +- +-// Tests that updating from a normal add-on to a bootstrappable add-on calls +-// the install method +-function run_test_26() { +- installAllFiles([do_get_addon("test_dictionary")], function() { +- // Needs a restart to complete this +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "2.0"); +- do_check_true(b1.isActive); +- do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE)); +- +- restartManager(); +- +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_true(b1.isActive); +- do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE); +- +- HunspellEngine.deactivate(); +- +- do_test_finished(); +- }); +- }); +- }); +-} +- +diff --git a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini +--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini ++++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini +@@ -139,6 +139,7 @@ + [test_corrupt_strictcompat.js] + [test_db_sanity.js] + [test_dictionary.js] ++[test_langpack.js] + [test_disable.js] + [test_distribution.js] + [test_dss.js] diff --git a/xulrunner.spec b/xulrunner.spec index 500ddd7..7549c6d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,6 +97,7 @@ Patch18: xulrunner-16.0-jemalloc-ppc.patch Patch20: mozilla-193-pkgconfig.patch # Upstream patches +Patch100: mozilla-677092-restartless-lang.patch # --------------------------------------------------- @@ -224,7 +225,8 @@ cd %{tarballdir} %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc -%patch20 -p2 -b .pk +%patch20 -p2 -b .pk +%patch100 -p1 -R -b .restartless-lang %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -502,6 +504,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 9 2013 Martin Stransky - 18.0-5 +- Added fix for langpacks + * Wed Jan 9 2013 Martin Stransky - 18.0-4 - Fixed source files - Disabled WebRTC due to rhbz#304121 From 7df449fd97b41209ecc0e6dbaa5d43615e58c624 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 15:10:47 +0100 Subject: [PATCH 330/486] Fixed missing libxpcom.so provides --- xulrunner.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7549c6d..9928674 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -425,6 +425,9 @@ EOF # Install xpcshell %{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} +# Fix libxpcom.so rights +chmod 755 $RPM_BUILD_ROOT/%{mozappdir}/libxpcom.so + # Install run-mozilla.sh %{__cp} objdir/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{mozappdir} @@ -504,6 +507,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 9 2013 Martin Stransky - 18.0-6 +- Fixed missing libxpcom.so provides + * Wed Jan 9 2013 Martin Stransky - 18.0-5 - Added fix for langpacks From b0f532378190f377576dbd3cefab2da8366df592 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 10 Jan 2013 14:59:37 +0100 Subject: [PATCH 331/486] Fixed Makefile generator (rhbz#304121) --- rhbz-304121.patch | 13 +++++++++++++ rhbz-872752.patch | 38 -------------------------------------- xulrunner.spec | 12 ++++++++---- 3 files changed, 21 insertions(+), 42 deletions(-) create mode 100644 rhbz-304121.patch delete mode 100644 rhbz-872752.patch diff --git a/rhbz-304121.patch b/rhbz-304121.patch new file mode 100644 index 0000000..941aca2 --- /dev/null +++ b/rhbz-304121.patch @@ -0,0 +1,13 @@ +diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile.old firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile +diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py +--- firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old 2013-01-05 00:44:41.000000000 +0100 ++++ firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-01-10 14:48:58.418321640 +0100 +@@ -376,7 +376,7 @@ class MakefileGenerator(object): + WriteMakefile(output_file, data, build_file, depth, top, + # we set srcdir up one directory, since the subdir + # doesn't actually exist in the source directory +- swapslashes(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0])), ++ swapslashes(os.path.normpath(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0]))), + self.relative_srcdir) + return True + diff --git a/rhbz-872752.patch b/rhbz-872752.patch deleted file mode 100644 index 63404c7..0000000 --- a/rhbz-872752.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in.orig 2012-11-05 11:17:57.000000000 +0100 -+++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in 2012-11-05 11:56:22.513385775 +0100 -@@ -46,6 +46,7 @@ - - pkg_config_files = \ - libxul.pc \ -+ libxul-embedding-lib.pc \ - libxul-embedding.pc \ - mozilla-js.pc \ - mozilla-plugin.pc \ ---- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in.orig 2012-11-05 11:59:31.493626458 +0100 -+++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in 2012-11-05 12:01:03.547230893 +0100 -@@ -0,0 +1,11 @@ -+prefix=%prefix% -+sdkdir=%sdkdir% -+includedir=%includedir% -+idldir=%idldir% -+ -+Name: libxul-embedding-lib -+Description: Static library for version-independent embedding of the Mozilla runtime for libraries -+Version: %MOZILLA_VERSION% -+Requires: %NSPR_NAME% >= %NSPR_VERSION% -+Libs: -L${sdkdir}/lib -lxpcomglue -ldl -+Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% ---- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in.fixembed 2012-11-05 11:17:57.227491778 +0100 -+++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in 2012-11-05 12:01:56.140574788 +0100 -@@ -4,8 +4,8 @@ - idldir=%idldir% - - Name: libxul-embedding --Description: Static library for version-independent embedding of the Mozilla runtime -+Description: Static library for version-independent embedding of the Mozilla runtime for applications - Version: %MOZILLA_VERSION% --Requires: %NSPR_NAME% >= %NSPR_VERSION% --Libs: -L${sdkdir}/lib -lxpcomglue -ldl -+Requires: %NSPR_NAME% >= %NSPR_VERSION% , libxul-embedding-lib = %MOZILLA_VERSION% -+Libs: -L${sdkdir}/lib -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl -rdynamic - Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/xulrunner.spec b/xulrunner.spec index 9928674..ecc5baf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -92,6 +92,7 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-16.0-jemalloc-ppc.patch +Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -224,6 +225,7 @@ cd %{tarballdir} %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc +%patch19 -p2 -b .rhbz-304121 %patch20 -p2 -b .pk %patch100 -p1 -R -b .restartless-lang @@ -292,10 +294,9 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif -# Disable WebRTC because of Bug 304121 -#%ifnarch %{ix86} x86_64 +%ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig -#%endif +%endif #--------------------------------------------------------------------- @@ -507,6 +508,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 10 2013 Martin Stransky - 18.0-7 +- Fixed Makefile generator (rhbz#304121) + * Wed Jan 9 2013 Martin Stransky - 18.0-6 - Fixed missing libxpcom.so provides From bcb4af0f84ab4be62ad349f180326b932c842cad Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 15 Jan 2013 12:23:03 +0100 Subject: [PATCH 332/486] Added fix for NM regression (mozbz#791626) --- xulrunner.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ecc5baf..ce21cf5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 7%{?pre_tag}%{?dist} +Release: 8%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,6 +99,7 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch100: mozilla-677092-restartless-lang.patch +Patch101: mozilla-791626.patch # --------------------------------------------------- @@ -229,6 +230,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %patch100 -p1 -R -b .restartless-lang +%patch101 -p1 -b .791626 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -508,6 +510,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 15 2013 Martin Stransky - 18.0-8 +- Added fix for NM regression (mozbz#791626) + * Thu Jan 10 2013 Martin Stransky - 18.0-7 - Fixed Makefile generator (rhbz#304121) From 3e7a82424be417514585e21dcc37e23b8d7cd4a7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 15 Jan 2013 12:28:48 +0100 Subject: [PATCH 333/486] Added patch --- mozilla-791626.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 mozilla-791626.patch diff --git a/mozilla-791626.patch b/mozilla-791626.patch new file mode 100644 index 0000000..c2e77ab --- /dev/null +++ b/mozilla-791626.patch @@ -0,0 +1,46 @@ +# HG changeset patch +# Parent 3523e7f7a89d7933c5f1dc8f5f22559b48ec44c4 +diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp +--- a/netwerk/base/src/nsIOService.cpp ++++ b/netwerk/base/src/nsIOService.cpp +@@ -818,17 +818,18 @@ nsIOService::PrefsChanged(nsIPrefBranch + if (NS_SUCCEEDED(rv)) { + if (mSocketTransportService) + mSocketTransportService->SetAutodialEnabled(enableAutodial); + } + } + + if (!pref || strcmp(pref, MANAGE_OFFLINE_STATUS_PREF) == 0) { + bool manage; +- if (NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, ++ if (mNetworkLinkServiceInitialized && ++ NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, + &manage))) + SetManageOfflineStatus(manage); + } + + if (!pref || strcmp(pref, NECKO_BUFFER_CACHE_COUNT_PREF) == 0) { + int32_t count; + if (NS_SUCCEEDED(prefs->GetIntPref(NECKO_BUFFER_CACHE_COUNT_PREF, + &count))) +@@ -928,16 +929,20 @@ nsIOService::Observe(nsISupports *subjec + } + else if (!strcmp(topic, kProfileDoChange)) { + if (data && NS_LITERAL_STRING("startup").Equals(data)) { + // Lazy initialization of network link service (see bug 620472) + InitializeNetworkLinkService(); + // Set up the initilization flag regardless the actuall result. + // If we fail here, we will fail always on. + mNetworkLinkServiceInitialized = true; ++ // And now reflect the preference setting ++ nsCOMPtr prefBranch; ++ GetPrefBranch(getter_AddRefs(prefBranch)); ++ PrefsChanged(prefBranch, MANAGE_OFFLINE_STATUS_PREF); + } + } + else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { + // Remember we passed XPCOM shutdown notification to prevent any + // changes of the offline status from now. We must not allow going + // online after this point. + mShutdown = true; + From 6762e5325f9e14e1685d8f4384215e94a462768a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 25 Jan 2013 15:11:06 +0100 Subject: [PATCH 334/486] Update to 18.0.1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index d2c035d..678e3d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -485d02563854c20a3788d89db07b0687 xulrunner-18.0.source.tar.bz2 +8b400555fc7063163e3b99472d0c92a1 xulrunner-18.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index ce21cf5..d6f54db 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 18.0 -Release: 8%{?pre_tag}%{?dist} +Version: 18.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -510,6 +510,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 25 2013 Jan Horak - 18.0.1-1 +- Update to 18.0.1 + * Tue Jan 15 2013 Martin Stransky - 18.0-8 - Added fix for NM regression (mozbz#791626) From 0e39a6c1e24d44959d78e98e2df7b490be4eb096 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 25 Jan 2013 15:37:28 +0100 Subject: [PATCH 335/486] Removed mozilla-677092-restartless-lang.patch --- mozilla-677092-restartless-lang.patch | 698 -------------------------- xulrunner.spec | 2 - 2 files changed, 700 deletions(-) delete mode 100644 mozilla-677092-restartless-lang.patch diff --git a/mozilla-677092-restartless-lang.patch b/mozilla-677092-restartless-lang.patch deleted file mode 100644 index a08de9b..0000000 --- a/mozilla-677092-restartless-lang.patch +++ /dev/null @@ -1,698 +0,0 @@ -# HG changeset patch -# User Axel Hecht -# Date 1348128099 -7200 -# Node ID 38adce439c3c0b5fd7a035dc53ffd853e80f87ba -# Parent 08d435dedc7fc19bfad3d31c62daec9013525c6d -bug 677092, make language packs restartless, r=Unfocused -Make language packs just trigger the chrome registration hooks, and -disable picking up bootstrap.js, and declare them restartless. - -diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm ---- a/toolkit/mozapps/extensions/XPIProvider.jsm -+++ b/toolkit/mozapps/extensions/XPIProvider.jsm -@@ -740,8 +740,8 @@ - } - } - else { -- // spell check dictionaries never require a restart -- if (addon.type == "dictionary") -+ // spell check dictionaries and language packs never require a restart -+ if (addon.type == "dictionary" || addon.type == "locale") - addon.bootstrap = true; - - // Only extensions are allowed to provide an optionsURL, optionsType or aboutURL. For -@@ -3695,6 +3695,11 @@ - Components.manager.addBootstrappedManifestLocation(aFile); - - try { -+ // Don't call bootstrap.js methods for language packs, -+ // they only contain chrome. -+ if (aType == "locale") -+ return; -+ - // Load the scope if it hasn't already been loaded - if (!(aId in this.bootstrapScopes)) - this.loadBootstrapScope(aId, aFile, aVersion, aType); -diff --git a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest b/toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest -copy from toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest -copy to toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest ---- a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest -+++ b/toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest -@@ -1,6 +1,1 @@ --content test-addon-1 chrome/content --# comment! -- locale test-addon-1 en-US locale/en-US -- # commentaire! -- locale test-addon-1 fr-FR locale/fr-FR --overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul -+locale test-langpack x-testing locale/x-testing -diff --git a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf -copy from toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf -copy to toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf ---- a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf -+++ b/toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf -@@ -4,12 +4,12 @@ - xmlns:em="http://www.mozilla.org/2004/em-rdf#"> - - -- addon1@tests.mozilla.org -+ langpack-x-testing@tests.mozilla.org -+ 8 - 1.0 - - -- Test 1 -- Test Description -+ Language Pack x-testing - - - -diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js b/toolkit/mozapps/extensions/test/xpcshell/test_langpack.js -copy from toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js -copy to toolkit/mozapps/extensions/test/xpcshell/test_langpack.js ---- a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js -+++ b/toolkit/mozapps/extensions/test/xpcshell/test_langpack.js -@@ -2,7 +2,7 @@ - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - --// This verifies that bootstrappable add-ons can be used without restarts. -+// This verifies that language packs can be used without restarts. - Components.utils.import("resource://gre/modules/Services.jsm"); - - // Enable loading extensions from the user scopes -@@ -18,91 +18,22 @@ - userExtDir.append(gAppInfo.ID); - registerDirectory("XREUSysExt", userExtDir.parent); - --Components.utils.import("resource://testing-common/httpd.js"); --var testserver; -+var chrome = Components.classes["@mozilla.org/chrome/chrome-registry;1"] -+ .getService(Components.interfaces.nsIXULChromeRegistry); - --/** -- * This object is both a factory and an mozISpellCheckingEngine implementation (so, it -- * is de-facto a service). It's also an interface requestor that gives out -- * itself when asked for mozISpellCheckingEngine. -- */ --var HunspellEngine = { -- dictionaryDirs: [], -- listener: null, -- -- QueryInterface: function hunspell_qi(iid) { -- if (iid.equals(Components.interfaces.nsISupports) || -- iid.equals(Components.interfaces.nsIFactory) || -- iid.equals(Components.interfaces.mozISpellCheckingEngine)) -- return this; -- throw Components.results.NS_ERROR_NO_INTERFACE; -- }, -- createInstance: function hunspell_ci(outer, iid) { -- if (outer) -- throw Components.results.NS_ERROR_NO_AGGREGATION; -- return this.QueryInterface(iid); -- }, -- lockFactory: function hunspell_lockf(lock) { -- throw Components.results.NS_ERROR_NOT_IMPLEMENTED; -- }, -- -- addDirectory: function hunspell_addDirectory(dir) { -- this.dictionaryDirs.push(dir); -- if (this.listener) -- this.listener("addDirectory"); -- }, -- -- removeDirectory: function hunspell_addDirectory(dir) { -- this.dictionaryDirs.splice(this.dictionaryDirs.indexOf(dir), 1); -- if (this.listener) -- this.listener("removeDirectory"); -- }, -- -- getInterface: function hunspell_gi(iid) { -- if (iid.equals(Components.interfaces.mozISpellCheckingEngine)) -- return this; -- throw Components.results.NS_ERROR_NO_INTERFACE; -- }, -- -- contractID: "@mozilla.org/spellchecker/engine;1", -- classID: Components.ID("{6f3c63bc-a4fd-449b-9a58-a2d9bd972cce}"), -- -- activate: function hunspell_activate() { -- this.origClassID = Components.manager.nsIComponentRegistrar -- .contractIDToCID(this.contractID); -- this.origFactory = Components.manager -- .getClassObject(Components.classes[this.contractID], -- Components.interfaces.nsIFactory); -- -- Components.manager.nsIComponentRegistrar -- .unregisterFactory(this.origClassID, this.origFactory); -- Components.manager.nsIComponentRegistrar.registerFactory(this.classID, -- "Test hunspell", this.contractID, this); -- }, -- -- deactivate: function hunspell_deactivate() { -- Components.manager.nsIComponentRegistrar.unregisterFactory(this.classID, this); -- Components.manager.nsIComponentRegistrar.registerFactory(this.origClassID, -- "Hunspell", this.contractID, this.origFactory); -- }, -- -- isDictionaryEnabled: function hunspell_isDictionaryEnabled(name) { -- return this.dictionaryDirs.some(function(dir) { -- var dic = dir.clone(); -- dic.append(name); -- return dic.exists(); -- }); -+function do_check_locale_not_registered(provider) { -+ let didThrow = false; -+ try { -+ chrome.getSelectedLocale(provider); -+ } catch (e) { -+ didThrow = true; - } --}; -+ do_check_true(didThrow); -+} - - function run_test() { - do_test_pending(); - -- // Create and configure the HTTP server. -- testserver = new HttpServer(); -- testserver.registerDirectory("/addons/", do_get_file("addons")); -- testserver.start(4444); -- - startupManager(); - - run_test_1(); -@@ -114,25 +45,22 @@ - "onNewInstall" - ]); - -- HunspellEngine.activate(); -- -- AddonManager.getInstallForFile(do_get_addon("test_dictionary"), function(install) { -+ AddonManager.getInstallForFile(do_get_addon("test_langpack"), function(install) { - ensure_test_completed(); - - do_check_neq(install, null); -- do_check_eq(install.type, "dictionary"); -+ do_check_eq(install.type, "locale"); - do_check_eq(install.version, "1.0"); -- do_check_eq(install.name, "Test Dictionary"); -+ do_check_eq(install.name, "Language Pack x-testing"); - do_check_eq(install.state, AddonManager.STATE_DOWNLOADED); - do_check_true(install.addon.hasResource("install.rdf")); - do_check_false(install.addon.hasResource("bootstrap.js")); - do_check_eq(install.addon.operationsRequiringRestart & - AddonManager.OP_NEEDS_RESTART_INSTALL, 0); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); - - let addon = install.addon; - prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -+ "langpack-x-testing@tests.mozilla.org": [ - ["onInstalling", false], - "onInstalled" - ] -@@ -141,11 +69,7 @@ - "onInstallEnded", - ], function() { - do_check_true(addon.hasResource("install.rdf")); -- HunspellEngine.listener = function(aEvent) { -- HunspellEngine.listener = null; -- do_check_eq(aEvent, "addDirectory"); -- check_test_1(); -- }; -+ check_test_1(); - }); - install.install(); - }); -@@ -157,18 +81,18 @@ - // doesn't require a restart. - do_check_eq(installs.length, 0); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - do_check_neq(b1, null); - do_check_eq(b1.version, "1.0"); - do_check_false(b1.appDisabled); - do_check_false(b1.userDisabled); - do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -+ // check chrome reg that language pack is registered -+ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); - do_check_true(b1.hasResource("install.rdf")); - do_check_false(b1.hasResource("bootstrap.js")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); - -- let dir = do_get_addon_root_uri(profileDir, "ab-CD@dictionaries.addons.mozilla.org"); -+ let dir = do_get_addon_root_uri(profileDir, "langpack-x-testing@tests.mozilla.org"); - - AddonManager.getAddonsWithOperationsByTypes(null, function(list) { - do_check_eq(list.length, 0); -@@ -181,9 +105,9 @@ - - // Tests that disabling doesn't require a restart - function run_test_2() { -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -+ "langpack-x-testing@tests.mozilla.org": [ - ["onDisabling", false], - "onDisabled" - ] -@@ -199,10 +123,10 @@ - do_check_false(b1.appDisabled); - do_check_true(b1.userDisabled); - do_check_false(b1.isActive); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is not registered -+ do_check_locale_not_registered("test-langpack"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { - do_check_neq(newb1, null); - do_check_eq(newb1.version, "1.0"); - do_check_false(newb1.appDisabled); -@@ -217,12 +141,11 @@ - // Test that restarting doesn't accidentally re-enable - function run_test_3() { - shutdownManager(); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); - startupManager(false); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is not registered -+ do_check_locale_not_registered("test-langpack"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - do_check_neq(b1, null); - do_check_eq(b1.version, "1.0"); - do_check_false(b1.appDisabled); -@@ -235,9 +158,9 @@ - - // Tests that enabling doesn't require a restart - function run_test_4() { -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -+ "langpack-x-testing@tests.mozilla.org": [ - ["onEnabling", false], - "onEnabled" - ] -@@ -253,10 +176,10 @@ - do_check_false(b1.appDisabled); - do_check_false(b1.userDisabled); - do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is registered -+ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { - do_check_neq(newb1, null); - do_check_eq(newb1.version, "1.0"); - do_check_false(newb1.appDisabled); -@@ -271,13 +194,11 @@ - // Tests that a restart shuts down and restarts the add-on - function run_test_5() { - shutdownManager(); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); - startupManager(false); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is registered -+ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - do_check_neq(b1, null); - do_check_eq(b1.version, "1.0"); - do_check_false(b1.appDisabled); -@@ -291,9 +212,9 @@ - - // Tests that uninstalling doesn't require a restart - function run_test_7() { -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -+ "langpack-x-testing@tests.mozilla.org": [ - ["onUninstalling", false], - "onUninstalled" - ] -@@ -309,333 +230,18 @@ - - function check_test_7() { - ensure_test_completed(); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is not registered -+ do_check_locale_not_registered("test-langpack"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - do_check_eq(b1, null); - - restartManager(); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { - do_check_eq(newb1, null); - -- run_test_8(); -+ do_test_finished(); - }); - }); - } -- --// Test that a bootstrapped extension dropped into the profile loads properly --// on startup and doesn't cause an EM restart --function run_test_8() { -- shutdownManager(); -- -- let dir = profileDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. -- createInstance(AM_Ci.nsIZipReader); -- zip.open(do_get_addon("test_dictionary")); -- dir.append("install.rdf"); -- zip.extract("install.rdf", dir); -- dir = dir.parent; -- dir.append("dictionaries"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- dir.append("ab-CD.dic"); -- zip.extract("dictionaries/ab-CD.dic", dir); -- zip.close(); -- -- startupManager(false); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_false(b1.appDisabled); -- do_check_false(b1.userDisabled); -- do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- run_test_9(); -- }); --} -- --// Test that items detected as removed during startup get removed properly --function run_test_9() { -- shutdownManager(); -- -- let dir = profileDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.remove(true); -- startupManager(false); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_eq(b1, null); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- run_test_12(); -- }); --} -- -- --// Tests that bootstrapped extensions are correctly loaded even if the app is --// upgraded at the same time --function run_test_12() { -- shutdownManager(); -- -- let dir = profileDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. -- createInstance(AM_Ci.nsIZipReader); -- zip.open(do_get_addon("test_dictionary")); -- dir.append("install.rdf"); -- zip.extract("install.rdf", dir); -- dir = dir.parent; -- dir.append("dictionaries"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- dir.append("ab-CD.dic"); -- zip.extract("dictionaries/ab-CD.dic", dir); -- zip.close(); -- -- startupManager(true); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_false(b1.appDisabled); -- do_check_false(b1.userDisabled); -- do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- b1.uninstall(); -- restartManager(); -- -- run_test_16(); -- }); --} -- -- --// Tests that bootstrapped extensions don't get loaded when in safe mode --function run_test_16() { -- installAllFiles([do_get_addon("test_dictionary")], function() { -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- // Should have installed and started -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- shutdownManager(); -- -- // Should have stopped -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- gAppInfo.inSafeMode = true; -- startupManager(false); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- // Should still be stopped -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_false(b1.isActive); -- -- shutdownManager(); -- gAppInfo.inSafeMode = false; -- startupManager(false); -- -- // Should have started -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- b1.uninstall(); -- -- run_test_17(); -- }); -- }); -- }); -- }); --} -- --// Check that a bootstrapped extension in a non-profile location is loaded --function run_test_17() { -- shutdownManager(); -- -- let dir = userExtDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. -- createInstance(AM_Ci.nsIZipReader); -- zip.open(do_get_addon("test_dictionary")); -- dir.append("install.rdf"); -- zip.extract("install.rdf", dir); -- dir = dir.parent; -- dir.append("dictionaries"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- dir.append("ab-CD.dic"); -- zip.extract("dictionaries/ab-CD.dic", dir); -- zip.close(); -- -- startupManager(); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- // Should have installed and started -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_true(b1.isActive); -- -- // From run_test_21 -- dir = userExtDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.remove(true); -- -- restartManager(); -- -- run_test_23(); -- }); --} -- --// Tests that installing from a URL doesn't require a restart --function run_test_23() { -- prepare_test({ }, [ -- "onNewInstall" -- ]); -- -- let url = "http://localhost:4444/addons/test_dictionary.xpi"; -- AddonManager.getInstallForURL(url, function(install) { -- ensure_test_completed(); -- -- do_check_neq(install, null); -- -- prepare_test({ }, [ -- "onDownloadStarted", -- "onDownloadEnded" -- ], function() { -- do_check_eq(install.type, "dictionary"); -- do_check_eq(install.version, "1.0"); -- do_check_eq(install.name, "Test Dictionary"); -- do_check_eq(install.state, AddonManager.STATE_DOWNLOADED); -- do_check_true(install.addon.hasResource("install.rdf")); -- do_check_false(install.addon.hasResource("bootstrap.js")); -- do_check_eq(install.addon.operationsRequiringRestart & -- AddonManager.OP_NEEDS_RESTART_INSTALL, 0); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- let addon = install.addon; -- prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -- ["onInstalling", false], -- "onInstalled" -- ] -- }, [ -- "onInstallStarted", -- "onInstallEnded", -- ], function() { -- do_check_true(addon.hasResource("install.rdf")); -- check_test_23(); -- }); -- }); -- install.install(); -- }, "application/x-xpinstall"); --} -- --function check_test_23() { -- AddonManager.getAllInstalls(function(installs) { -- // There should be no active installs now since the install completed and -- // doesn't require a restart. -- do_check_eq(installs.length, 0); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_false(b1.appDisabled); -- do_check_false(b1.userDisabled); -- do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_true(b1.hasResource("install.rdf")); -- do_check_false(b1.hasResource("bootstrap.js")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- let dir = do_get_addon_root_uri(profileDir, "ab-CD@dictionaries.addons.mozilla.org"); -- -- AddonManager.getAddonsWithOperationsByTypes(null, function(list) { -- do_check_eq(list.length, 0); -- -- restartManager(); -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- b1.uninstall(); -- restartManager(); -- -- testserver.stop(run_test_25); -- }); -- }); -- }); -- }); --} -- --// Tests that updating from a bootstrappable add-on to a normal add-on calls --// the uninstall method --function run_test_25() { -- installAllFiles([do_get_addon("test_dictionary")], function() { -- HunspellEngine.listener = function(aEvent) { -- HunspellEngine.listener = null; -- do_check_eq(aEvent, "addDirectory"); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- installAllFiles([do_get_addon("test_dictionary_2")], function() { -- // Needs a restart to complete this so the old version stays running -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_true(b1.isActive); -- do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE)); -- -- restartManager(); -- -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "2.0"); -- do_check_true(b1.isActive); -- do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE); -- -- run_test_26(); -- }); -- }); -- }); -- }; -- }); --} -- --// Tests that updating from a normal add-on to a bootstrappable add-on calls --// the install method --function run_test_26() { -- installAllFiles([do_get_addon("test_dictionary")], function() { -- // Needs a restart to complete this -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "2.0"); -- do_check_true(b1.isActive); -- do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE)); -- -- restartManager(); -- -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_true(b1.isActive); -- do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE); -- -- HunspellEngine.deactivate(); -- -- do_test_finished(); -- }); -- }); -- }); --} -- -diff --git a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini ---- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini -+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini -@@ -139,6 +139,7 @@ - [test_corrupt_strictcompat.js] - [test_db_sanity.js] - [test_dictionary.js] -+[test_langpack.js] - [test_disable.js] - [test_distribution.js] - [test_dss.js] diff --git a/xulrunner.spec b/xulrunner.spec index d6f54db..e498bc1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -98,7 +98,6 @@ Patch19: rhbz-304121.patch Patch20: mozilla-193-pkgconfig.patch # Upstream patches -Patch100: mozilla-677092-restartless-lang.patch Patch101: mozilla-791626.patch # --------------------------------------------------- @@ -229,7 +228,6 @@ cd %{tarballdir} %patch19 -p2 -b .rhbz-304121 %patch20 -p2 -b .pk -%patch100 -p1 -R -b .restartless-lang %patch101 -p1 -b .791626 %{__rm} -f .mozconfig From 8b5d782447b8d13609f76464a2b6d1233dad58b9 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 6 Feb 2013 10:05:46 +0100 Subject: [PATCH 336/486] Update to 18.0.2 --- sources | 2 +- xulrunner.spec | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 678e3d6..82ba768 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8b400555fc7063163e3b99472d0c92a1 xulrunner-18.0.1.source.tar.bz2 +a7a20f52a3ffdd8d2fafa8a1a1db49c7 xulrunner-18.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index e498bc1..9693110 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -2,10 +2,10 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} <= 18 -%define system_sqlite 0 -%else +%if 0%{?fedora} <= 19 %define system_sqlite 1 +%else +%define system_sqlite 0 %endif # Use system cairo? @@ -74,7 +74,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 18.0.1 +Version: 18.0.2 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -508,6 +508,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 6 2013 Jan Horak - 18.0.2-1 +- Update to 18.0.2 + * Fri Jan 25 2013 Jan Horak - 18.0.1-1 - Update to 18.0.1 From e5d27ba2df72d733543de8256e555dfbe4d25bef Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 6 Feb 2013 11:20:32 +0100 Subject: [PATCH 337/486] fixed system sqlite define --- xulrunner.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 9693110..0c4d9f2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -2,10 +2,10 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} <= 19 -%define system_sqlite 1 -%else +%if 0%{?fedora} < 19 %define system_sqlite 0 +%else +%define system_sqlite 1 %endif # Use system cairo? From c0a99a1b7111598765a691436d407e959d2b29dc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Feb 2013 13:24:36 +0100 Subject: [PATCH 338/486] Update to 19.0, added fix for mozbz#239254 --- sources | 2 +- xulrunner.spec | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 82ba768..d6896f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7a20f52a3ffdd8d2fafa8a1a1db49c7 xulrunner-18.0.2.source.tar.bz2 +3dc732b6ce177792b43324f4bc7164d8 firefox-19.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 0c4d9f2..c6fbf30 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -42,6 +42,7 @@ %global beta_version 0 %global rc_version 0 +%global tarballname firefox %global mozappdir %{_libdir}/%{name} %global tarballdir mozilla-release @@ -74,12 +75,12 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 18.0.2 +Version: 19.0 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -Source0: ftp://ftp.mozilla.org/pub/%{name}/releases/%{version}%{?pre_version}/source/%{name}-%{version}%{?pre_version}.source.tar.bz2 +Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.bz2 Source10: %{name}-mozconfig Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js @@ -99,6 +100,7 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch101: mozilla-791626.patch +Patch102: mozilla-239254.patch # --------------------------------------------------- @@ -229,6 +231,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %patch101 -p1 -b .791626 +%patch102 -p1 -b .239254 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -508,6 +511,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 18 2013 Martin Stransky - 19.0-1 +- Update to 19.0 +- Added fix for mozbz#239254 + * Wed Feb 6 2013 Jan Horak - 18.0.2-1 - Update to 18.0.2 From 161f3f6fddd556eb071cb84c56fa1db5399e90a1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Feb 2013 16:23:39 +0100 Subject: [PATCH 339/486] added missing patch --- mozilla-239254.patch | 483 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 483 insertions(+) create mode 100644 mozilla-239254.patch diff --git a/mozilla-239254.patch b/mozilla-239254.patch new file mode 100644 index 0000000..9ce3838 --- /dev/null +++ b/mozilla-239254.patch @@ -0,0 +1,483 @@ +# HG changeset patch +# Parent cb34bd8957ec517c72d506f7c439e3af1950e38d +# User Martin Stransky +Bug 239254 - [Linux] Support disk cache on a local path, r=michal.novotny + +diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp +--- a/netwerk/cache/nsCacheService.cpp ++++ b/netwerk/cache/nsCacheService.cpp +@@ -712,27 +712,18 @@ nsCacheProfilePrefObserver::ReadPrefs(ns + nsCOMPtr profDir; + NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, + getter_AddRefs(profDir)); + NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR, + getter_AddRefs(directory)); + if (!directory) + directory = profDir; + else if (profDir) { +- bool same; +- if (NS_SUCCEEDED(profDir->Equals(directory, &same)) && !same) { +- // We no longer store the cache directory in the main +- // profile directory, so we should cleanup the old one. +- rv = profDir->AppendNative(NS_LITERAL_CSTRING("Cache")); +- if (NS_SUCCEEDED(rv)) { +- bool exists; +- if (NS_SUCCEEDED(profDir->Exists(&exists)) && exists) +- nsDeleteDir::DeleteDir(profDir, false); +- } +- } ++ nsCacheService::MoveOrRemoveDiskCache(profDir, directory, ++ "Cache"); + } + } + // use file cache in build tree only if asked, to avoid cache dir litter + if (!directory && PR_GetEnv("NECKO_DEV_ENABLE_DISK_CACHE")) { + rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, + getter_AddRefs(directory)); + } + if (directory) +@@ -788,16 +779,20 @@ nsCacheProfilePrefObserver::ReadPrefs(ns + // try to get the profile directory (there may not be a profile yet) + nsCOMPtr profDir; + NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, + getter_AddRefs(profDir)); + NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR, + getter_AddRefs(directory)); + if (!directory) + directory = profDir; ++ else if (profDir) { ++ nsCacheService::MoveOrRemoveDiskCache(profDir, directory, ++ "OfflineCache"); ++ } + } + #if DEBUG + if (!directory) { + // use current process directory during development + rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, + getter_AddRefs(directory)); + } + #endif +@@ -3012,16 +3007,67 @@ nsCacheService::SetDiskSmartSize_Locked( + DispatchToCacheIOThread(event); + } else { + return NS_ERROR_FAILURE; + } + + return NS_OK; + } + ++void ++nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, ++ nsIFile *aNewCacheDir, ++ const char *aCacheSubdir) ++{ ++ bool same; ++ if (NS_FAILED(aOldCacheDir->Equals(aNewCacheDir, &same)) || same) ++ return; ++ ++ nsCOMPtr aOldCacheSubdir; ++ aOldCacheDir->Clone(getter_AddRefs(aOldCacheSubdir)); ++ ++ nsresult rv = aOldCacheSubdir->AppendNative( ++ nsDependentCString(aCacheSubdir)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ bool exists; ++ if (NS_FAILED(aOldCacheSubdir->Exists(&exists)) || !exists) ++ return; ++ ++ nsCOMPtr aNewCacheSubdir; ++ aNewCacheDir->Clone(getter_AddRefs(aNewCacheSubdir)); ++ ++ rv = aNewCacheSubdir->AppendNative(nsDependentCString(aCacheSubdir)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ nsAutoCString newPath; ++ rv = aNewCacheSubdir->GetNativePath(newPath); ++ if (NS_FAILED(rv)) ++ return; ++ ++ if (NS_SUCCEEDED(aNewCacheSubdir->Exists(&exists)) && !exists) { ++ // New cache directory does not exist, try to move the old one here ++ // rename needs an empty target directory ++ rv = aNewCacheSubdir->Create(nsIFile::DIRECTORY_TYPE, 0777); ++ if (NS_SUCCEEDED(rv)) { ++ nsAutoCString oldPath; ++ rv = aOldCacheSubdir->GetNativePath(oldPath); ++ if (NS_FAILED(rv)) ++ return; ++ if(rename(oldPath.get(), newPath.get()) == 0) ++ return; ++ } ++ } ++ ++ // Delay delete by 1 minute to avoid IO thrash on startup. ++ nsDeleteDir::DeleteDir(aOldCacheSubdir, false, 60000); ++} ++ + static bool + IsEntryPrivate(nsCacheEntry* entry) + { + return entry->IsPrivate(); + } + + void + nsCacheService::LeavePrivateBrowsing() +diff --git a/netwerk/cache/nsCacheService.h b/netwerk/cache/nsCacheService.h +--- a/netwerk/cache/nsCacheService.h ++++ b/netwerk/cache/nsCacheService.h +@@ -194,16 +194,20 @@ public: + + static void SetMemoryCache(); + + static void SetCacheCompressionLevel(int32_t level); + + // Starts smart cache size computation if disk device is available + static nsresult SetDiskSmartSize(); + ++ static void MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, ++ nsIFile *aNewCacheDir, ++ const char *aCacheSubdir); ++ + nsresult Init(); + void Shutdown(); + + static bool IsInitialized() + { + if (!gService) { + return false; + } +diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp +--- a/startupcache/StartupCache.cpp ++++ b/startupcache/StartupCache.cpp +@@ -168,16 +168,30 @@ StartupCache::Init() + nsCOMPtr file; + rv = NS_GetSpecialDirectory("ProfLDS", + getter_AddRefs(file)); + if (NS_FAILED(rv)) { + // return silently, this will fail in mochitests's xpcshell process. + return rv; + } + ++ nsCOMPtr profDir; ++ NS_GetSpecialDirectory("ProfDS", getter_AddRefs(profDir)); ++ if (profDir) { ++ bool same; ++ if (NS_SUCCEEDED(profDir->Equals(file, &same)) && !same) { ++ // We no longer store the startup cache in the main profile ++ // directory, so we should cleanup the old one. ++ if (NS_SUCCEEDED( ++ profDir->AppendNative(NS_LITERAL_CSTRING("startupCache")))) { ++ profDir->Remove(true); ++ } ++ } ++ } ++ + rv = file->AppendNative(NS_LITERAL_CSTRING("startupCache")); + NS_ENSURE_SUCCESS(rv, rv); + + // Try to create the directory if it's not there yet + rv = file->Create(nsIFile::DIRECTORY_TYPE, 0777); + if (NS_FAILED(rv) && rv != NS_ERROR_FILE_ALREADY_EXISTS) + return rv; + +diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp +--- a/toolkit/xre/nsXREDirProvider.cpp ++++ b/toolkit/xre/nsXREDirProvider.cpp +@@ -1170,18 +1170,32 @@ nsXREDirProvider::GetUserDataDirectoryHo + #elif defined(MOZ_WIDGET_GONK) + rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true, + getter_AddRefs(localDir)); + #elif defined(XP_UNIX) + const char* homeDir = getenv("HOME"); + if (!homeDir || !*homeDir) + return NS_ERROR_FAILURE; + +- rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, +- getter_AddRefs(localDir)); ++ if (aLocal) { ++ // If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache. ++ const char* cacheHome = getenv("XDG_CACHE_HOME"); ++ if (cacheHome && *cacheHome) { ++ rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true, ++ getter_AddRefs(localDir)); ++ } else { ++ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, ++ getter_AddRefs(localDir)); ++ if (NS_SUCCEEDED(rv)) ++ rv = localDir->AppendNative(NS_LITERAL_CSTRING(".cache")); ++ } ++ } else { ++ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, ++ getter_AddRefs(localDir)); ++ } + #else + #error "Don't know how to get product dir on your platform" + #endif + + NS_IF_ADDREF(*aFile = localDir); + return rv; + } + +@@ -1256,17 +1270,17 @@ nsXREDirProvider::GetUserDataDirectory(n + const nsACString* aProfileName, + const nsACString* aAppName, + const nsACString* aVendorName) + { + nsCOMPtr localDir; + nsresult rv = GetUserDataDirectoryHome(getter_AddRefs(localDir), aLocal); + NS_ENSURE_SUCCESS(rv, rv); + +- rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName); ++ rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName, aLocal); + NS_ENSURE_SUCCESS(rv, rv); + + #ifdef DEBUG_jungshik + nsAutoCString cwd; + localDir->GetNativePath(cwd); + printf("nsXREDirProvider::GetUserDataDirectory: %s\n", cwd.get()); + #endif + rv = EnsureDirectoryExists(localDir); +@@ -1377,17 +1391,18 @@ nsXREDirProvider::AppendSysUserExtension + return NS_OK; + } + + + nsresult + nsXREDirProvider::AppendProfilePath(nsIFile* aFile, + const nsACString* aProfileName, + const nsACString* aAppName, +- const nsACString* aVendorName) ++ const nsACString* aVendorName, ++ bool aLocal) + { + NS_ASSERTION(aFile, "Null pointer!"); + + if (!gAppData) { + return NS_ERROR_FAILURE; + } + + nsAutoCString profile; +@@ -1439,28 +1454,31 @@ nsXREDirProvider::AppendProfilePath(nsIF + // The parent of this directory is set in GetUserDataDirectoryHome + // XXX: handle gAppData->profile properly + // XXXsmaug ...and the rest of the profile creation! + MOZ_ASSERT(!aAppName, + "Profile creation for external applications is not implemented!"); + rv = aFile->AppendNative(nsDependentCString("mozilla")); + NS_ENSURE_SUCCESS(rv, rv); + #elif defined(XP_UNIX) +- // Make it hidden (i.e. using the ".") +- nsAutoCString folder("."); ++ nsAutoCString folder; ++ // Make it hidden (by starting with "."), except when local (the ++ // profile is already under ~/.cache or XDG_CACHE_HOME). ++ if (!aLocal) ++ folder.Assign('.'); + + if (!profile.IsEmpty()) { + // Skip any leading path characters + const char* profileStart = profile.get(); + while (*profileStart == '/' || *profileStart == '\\') + profileStart++; + + // On the off chance that someone wanted their folder to be hidden don't + // let it become ".." +- if (*profileStart == '.') ++ if (*profileStart == '.' && !aLocal) + profileStart++; + + folder.Append(profileStart); + ToLowerCase(folder); + + rv = AppendProfileString(aFile, folder.BeginReading()); + } + else { +diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h +--- a/toolkit/xre/nsXREDirProvider.h ++++ b/toolkit/xre/nsXREDirProvider.h +@@ -109,17 +109,18 @@ protected: + static nsresult EnsureDirectoryExists(nsIFile* aDirectory); + void EnsureProfileFileExists(nsIFile* aFile); + + // Determine the profile path within the UAppData directory. This is different + // on every major platform. + static nsresult AppendProfilePath(nsIFile* aFile, + const nsACString* aProfileName, + const nsACString* aAppName, +- const nsACString* aVendorName); ++ const nsACString* aVendorName, ++ bool aLocal); + + static nsresult AppendSysUserExtensionPath(nsIFile* aFile); + + // Internal helper that splits a path into components using the '/' and '\\' + // delimiters. + static inline nsresult AppendProfileString(nsIFile* aFile, const char* aPath); + + // Calculate and register extension and theme bundle directories. +# HG changeset patch +# User Tim Taubert +# Date 1360362227 -3600 +# Node ID 873170d2679ac23114f22543cee3214a940abef3 +Bug 239254 - [Linux] Migrate existing thumbnails to their new local path + +diff --git a/browser/components/thumbnails/PageThumbs.jsm b/browser/components/thumbnails/PageThumbs.jsm +--- a/browser/components/thumbnails/PageThumbs.jsm ++++ b/browser/components/thumbnails/PageThumbs.jsm +@@ -7,17 +7,17 @@ + this.EXPORTED_SYMBOLS = ["PageThumbs", "PageThumbsStorage"]; + + const Cu = Components.utils; + const Cc = Components.classes; + const Ci = Components.interfaces; + + const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; + const PREF_STORAGE_VERSION = "browser.pagethumbnails.storage_version"; +-const LATEST_STORAGE_VERSION = 2; ++const LATEST_STORAGE_VERSION = 3; + + const EXPIRATION_MIN_CHUNK_SIZE = 50; + const EXPIRATION_INTERVAL_SECS = 3600; + + /** + * Name of the directory in the profile that contains the thumbnails. + */ + const THUMBNAIL_DIRECTORY = "thumbnails"; +@@ -359,47 +359,51 @@ let PageThumbsStorageMigrator = { + + set currentVersion(aVersion) { + Services.prefs.setIntPref(PREF_STORAGE_VERSION, aVersion); + }, + + migrate: function Migrator_migrate() { + let version = this.currentVersion; + +- if (version < 1) { +- this.removeThumbnailsFromRoamingProfile(); +- } +- if (version < 2) { +- this.renameThumbnailsFolder(); ++ // Storage version 1 never made it to beta. ++ // At the time of writing only Windows had (ProfD != ProfLD) and we ++ // needed to move thumbnails from the roaming profile to the locale ++ // one so that they're not needlessly included in backups and/or ++ // written via SMB. ++ ++ // Storage version 2 also never made it to beta. ++ // The thumbnail folder structure has been changed and old thumbnails ++ // were not migrated. Instead, we just renamed the current folder to ++ // "-old" and will remove it later. ++ ++ if (version < 3) { ++ this.migrateToVersion3(); + } + + this.currentVersion = LATEST_STORAGE_VERSION; + }, + +- removeThumbnailsFromRoamingProfile: +- function Migrator_removeThumbnailsFromRoamingProfile() { +- let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]); ++ /** ++ * Bug 239254 added support for having the disk cache and thumbnail ++ * directories on a local path (i.e. ~/.cache/) under Linux. We'll first ++ * try to move the old thumbnails to their new location. If that's not ++ * possible (because ProfD might be on a different file system than ++ * ProfLD) we'll just discard them. ++ */ ++ migrateToVersion3: function Migrator_migrateToVersion3() { ++ let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY], true); + let roaming = FileUtils.getDir("ProfD", [THUMBNAIL_DIRECTORY]); + +- if (!roaming.equals(local) && roaming.exists()) { +- roaming.followLinks = false; +- try { +- roaming.remove(true); +- } catch (e) { +- // The directory might not exist or we're not permitted to remove it. +- } +- } +- }, +- +- renameThumbnailsFolder: function Migrator_renameThumbnailsFolder() { +- let dir = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]); +- try { +- dir.moveTo(null, dir.leafName + "-old"); +- } catch (e) { +- // The directory might not exist or we're not permitted to rename it. ++ if (!roaming.equals(local)) { ++ PageThumbsWorker.postMessage({ ++ type: "moveOrDeleteAllThumbnails", ++ from: roaming.path, ++ to: local.path ++ }); + } + } + }; + + let PageThumbsExpiration = { + _filters: [], + + init: function Expiration_init() { +diff --git a/browser/components/thumbnails/PageThumbsWorker.js b/browser/components/thumbnails/PageThumbsWorker.js +--- a/browser/components/thumbnails/PageThumbsWorker.js ++++ b/browser/components/thumbnails/PageThumbsWorker.js +@@ -20,16 +20,19 @@ let PageThumbsWorker = { + + switch (msg.type) { + case "removeFile": + data.result = this.removeFile(msg); + break; + case "expireFilesInDirectory": + data.result = this.expireFilesInDirectory(msg); + break; ++ case "moveOrDeleteAllThumbnails": ++ data.result = this.moveOrDeleteAllThumbnails(msg); ++ break; + default: + data.result = false; + data.detail = "message not understood"; + break; + } + + self.postMessage(data); + }, +@@ -62,12 +65,35 @@ let PageThumbsWorker = { + getFileEntriesInDirectory: + function Worker_getFileEntriesInDirectory(aPath, aSkipFiles) { + let skip = new Set(aSkipFiles); + let iter = new OS.File.DirectoryIterator(aPath); + + return [entry + for (entry in iter) + if (!entry.isDir && !entry.isSymLink && !skip.has(entry.name))]; ++ }, ++ ++ moveOrDeleteAllThumbnails: ++ function Worker_moveOrDeleteAllThumbnails(msg) { ++ if (!OS.File.exists(msg.from)) ++ return true; ++ ++ let iter = new OS.File.DirectoryIterator(msg.from); ++ for (let entry in iter) { ++ if (!entry.isDir && !entry.isSymLink) { ++ let from = OS.Path.join(msg.from, entry.name); ++ let to = OS.Path.join(msg.to, entry.name); ++ ++ try { ++ OS.File.move(from, to, {noOverwrite: true, noCopy: true}); ++ } catch (e) { ++ OS.File.remove(from); ++ } ++ } ++ } ++ ++ OS.File.removeEmptyDir(msg.from); ++ return true; + } + }; + + self.onmessage = PageThumbsWorker.handleMessage.bind(PageThumbsWorker); From 11886b8d73c39da65cbf5ddc2bd03c94522c8396 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 20 Feb 2013 16:22:37 +0100 Subject: [PATCH 340/486] Added fix for rhbz#911314 (ppc only) --- rhbz-911314.patch | 547 ++++++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 12 +- 2 files changed, 558 insertions(+), 1 deletion(-) create mode 100644 rhbz-911314.patch diff --git a/rhbz-911314.patch b/rhbz-911314.patch new file mode 100644 index 0000000..4f1cfa0 --- /dev/null +++ b/rhbz-911314.patch @@ -0,0 +1,547 @@ +Use the runtime page size to control arena decommit (RHBZ#911314) +Return success when decommit is disabled + +Author: Gustavo Luiz Duarte +Based on Terrence Cole's patch v0 on MOZ#840242 + +Index: mozilla-release/js/src/gc/Heap.h +=================================================================== +--- mozilla-release.orig/js/src/gc/Heap.h ++++ mozilla-release/js/src/gc/Heap.h +@@ -800,7 +800,7 @@ struct Chunk + + /* Search for a decommitted arena to allocate. */ + unsigned findDecommittedArenaOffset(); +- ArenaHeader* fetchNextDecommittedArena(); ++ ArenaHeader* fetchNextDecommittedArena(JSRuntime *rt); + + public: + /* Unlink and return the freeArenasHead. */ +Index: mozilla-release/js/src/gc/Memory.cpp +=================================================================== +--- mozilla-release.orig/js/src/gc/Memory.cpp ++++ mozilla-release/js/src/gc/Memory.cpp +@@ -8,6 +8,7 @@ + #include "mozilla/Assertions.h" + + #include "jstypes.h" ++#include "jscntxt.h" + + #include "js/Utility.h" + #include "gc/Memory.h" +@@ -19,39 +20,34 @@ namespace gc { + extern const size_t PageSize; + extern const size_t ArenaSize; + static bool +-DecommitEnabled() ++DecommitEnabled(JSRuntime *rt) + { +- return PageSize == ArenaSize; ++ return rt->gcSystemPageSize == ArenaSize; + } + + #if defined(XP_WIN) + #include "jswin.h" + #include + +-static size_t AllocationGranularity = 0; +- + void +-InitMemorySubsystem() ++InitMemorySubsystem(JSRuntime *rt) + { + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); +- if (sysinfo.dwPageSize != PageSize) { +- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); +- MOZ_CRASH(); +- } +- AllocationGranularity = sysinfo.dwAllocationGranularity; ++ rt->gcSystemPageSize = sysinfo.dwPageSize; ++ rt->gcSystemAllocGranularity = sysinfo.dwAllocationGranularity; + } + + void * +-MapAlignedPages(size_t size, size_t alignment) ++MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) + { + JS_ASSERT(size >= alignment); + JS_ASSERT(size % alignment == 0); +- JS_ASSERT(size % PageSize == 0); +- JS_ASSERT(alignment % AllocationGranularity == 0); ++ JS_ASSERT(size % rt->gcSystemPageSize == 0); ++ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); + + /* Special case: If we want allocation alignment, no further work is needed. */ +- if (alignment == AllocationGranularity) { ++ if (alignment == rt->gcSystemAllocGranularity) { + return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + } + +@@ -75,7 +71,7 @@ MapAlignedPages(size_t size, size_t alig + if (!p) + return NULL; + void *chunkStart = (void *)(uintptr_t(p) + (alignment - (uintptr_t(p) % alignment))); +- UnmapPages(p, size * 2); ++ UnmapPages(rt, p, size * 2); + p = VirtualAlloc(chunkStart, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + + /* Failure here indicates a race with another thread, so try again. */ +@@ -86,26 +82,26 @@ MapAlignedPages(size_t size, size_t alig + } + + void +-UnmapPages(void *p, size_t size) ++UnmapPages(JSRuntime *rt, void *p, size_t size) + { + JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE)); + } + + bool +-MarkPagesUnused(void *p, size_t size) ++MarkPagesUnused(JSRuntime *rt, void *p, size_t size) + { +- if (!DecommitEnabled()) +- return false; ++ if (!DecommitEnabled(rt)) ++ return true; + +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + LPVOID p2 = VirtualAlloc(p, size, MEM_RESET, PAGE_READWRITE); + return p2 == p; + } + + bool +-MarkPagesInUse(void *p, size_t size) ++MarkPagesInUse(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + +@@ -127,12 +123,13 @@ GetPageFaultCount() + #define OS2_MAX_RECURSIONS 16 + + void +-InitMemorySubsystem() ++InitMemorySubsystem(JSRuntime *rt) + { ++ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = ArenaSize; + } + + void +-UnmapPages(void *addr, size_t size) ++UnmapPages(JSRuntime *rt, void *addr, size_t size) + { + if (!DosFreeMem(addr)) + return; +@@ -153,7 +150,7 @@ UnmapPages(void *addr, size_t size) + } + + static void * +-MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) ++MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) + { + if (++recursions >= OS2_MAX_RECURSIONS) + return NULL; +@@ -179,7 +176,7 @@ MapAlignedPagesRecursively(size_t size, + unsigned long rc = DosQueryMem(&(static_cast(tmp))[size], + &cb, &flags); + if (!rc && (flags & PAG_FREE) && cb >= filler) { +- UnmapPages(tmp, 0); ++ UnmapPages(rt, tmp, 0); + if (DosAllocMem(&tmp, filler, + OBJ_ANY | PAG_COMMIT | PAG_READ | PAG_WRITE)) { + JS_ALWAYS_TRUE(DosAllocMem(&tmp, filler, +@@ -187,19 +184,19 @@ MapAlignedPagesRecursively(size_t size, + } + } + +- void *p = MapAlignedPagesRecursively(size, alignment, recursions); +- UnmapPages(tmp, 0); ++ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); ++ UnmapPages(rt, tmp, 0); + + return p; + } + + void * +-MapAlignedPages(size_t size, size_t alignment) ++MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) + { + JS_ASSERT(size >= alignment); + JS_ASSERT(size % alignment == 0); +- JS_ASSERT(size % PageSize == 0); +- JS_ASSERT(alignment % PageSize == 0); ++ JS_ASSERT(size % rt->gcSystemPageSize == 0); ++ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); + + int recursions = -1; + +@@ -208,7 +205,7 @@ MapAlignedPages(size_t size, size_t alig + * of the right size by recursively allocating blocks of unaligned + * free memory until only an aligned allocation is possible. + */ +- void *p = MapAlignedPagesRecursively(size, alignment, recursions); ++ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); + if (p) + return p; + +@@ -230,16 +227,15 @@ MapAlignedPages(size_t size, size_t alig + } + + bool +-MarkPagesUnused(void *p, size_t size) +-{ +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + + bool +-MarkPagesInUse(void *p, size_t size) ++MarkPagesInUse(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + +@@ -259,17 +255,18 @@ GetPageFaultCount() + #endif + + void +-InitMemorySubsystem() ++InitMemorySubsystem(JSRuntime *rt) + { ++ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); + } + + void * +-MapAlignedPages(size_t size, size_t alignment) ++MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) + { + JS_ASSERT(size >= alignment); + JS_ASSERT(size % alignment == 0); +- JS_ASSERT(size % PageSize == 0); +- JS_ASSERT(alignment % PageSize == 0); ++ JS_ASSERT(size % rt->gcSystemPageSize == 0); ++ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); + + int prot = PROT_READ | PROT_WRITE; + int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC; +@@ -281,22 +278,22 @@ MapAlignedPages(size_t size, size_t alig + } + + void +-UnmapPages(void *p, size_t size) ++UnmapPages(JSRuntime *rt, void *p, size_t size) + { + JS_ALWAYS_TRUE(0 == munmap((caddr_t)p, size)); + } + + bool +-MarkPagesUnused(void *p, size_t size) ++MarkPagesUnused(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + + bool +-MarkPagesInUse(void *p, size_t size) ++MarkPagesInUse(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + +@@ -314,27 +311,24 @@ GetPageFaultCount() + #include + + void +-InitMemorySubsystem() ++InitMemorySubsystem(JSRuntime *rt) + { +- if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) { +- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); +- MOZ_CRASH(); +- } ++ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); + } + + void * +-MapAlignedPages(size_t size, size_t alignment) ++MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) + { + JS_ASSERT(size >= alignment); + JS_ASSERT(size % alignment == 0); +- JS_ASSERT(size % PageSize == 0); +- JS_ASSERT(alignment % PageSize == 0); ++ JS_ASSERT(size % rt->gcSystemPageSize == 0); ++ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); + + int prot = PROT_READ | PROT_WRITE; + int flags = MAP_PRIVATE | MAP_ANON; + + /* Special case: If we want page alignment, no further work is needed. */ +- if (alignment == PageSize) { ++ if (alignment == rt->gcSystemAllocGranularity) { + return mmap(NULL, size, prot, flags, -1, 0); + } + +@@ -360,26 +354,26 @@ MapAlignedPages(size_t size, size_t alig + } + + void +-UnmapPages(void *p, size_t size) ++UnmapPages(JSRuntime *rt, void *p, size_t size) + { + JS_ALWAYS_TRUE(0 == munmap(p, size)); + } + + bool +-MarkPagesUnused(void *p, size_t size) ++MarkPagesUnused(JSRuntime *rt, void *p, size_t size) + { +- if (!DecommitEnabled()) +- return false; ++ if (!DecommitEnabled(rt)) ++ return true; + +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + int result = madvise(p, size, MADV_DONTNEED); + return result != -1; + } + + bool +-MarkPagesInUse(void *p, size_t size) ++MarkPagesInUse(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + +Index: mozilla-release/js/src/gc/Memory.h +=================================================================== +--- mozilla-release.orig/js/src/gc/Memory.h ++++ mozilla-release/js/src/gc/Memory.h +@@ -16,20 +16,20 @@ namespace gc { + + // Sanity check that our compiled configuration matches the currently running + // instance and initialize any runtime data needed for allocation. +-void InitMemorySubsystem(); ++void InitMemorySubsystem(JSRuntime *rt); + + // Allocate or deallocate pages from the system with the given alignment. +-void *MapAlignedPages(size_t size, size_t alignment); +-void UnmapPages(void *p, size_t size); ++void *MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment); ++void UnmapPages(JSRuntime *rt, void *p, size_t size); + + // Tell the OS that the given pages are not in use, so they should not + // be written to a paging file. This may be a no-op on some platforms. +-bool MarkPagesUnused(void *p, size_t size); ++bool MarkPagesUnused(JSRuntime *rt, void *p, size_t size); + + // Undo |MarkPagesUnused|: tell the OS that the given pages are of interest + // and should be paged in and out normally. This may be a no-op on some + // platforms. +-bool MarkPagesInUse(void *p, size_t size); ++bool MarkPagesInUse(JSRuntime *rt, void *p, size_t size); + + // Returns #(hard faults) + #(soft faults) + size_t GetPageFaultCount(); +Index: mozilla-release/js/src/jsapi.cpp +=================================================================== +--- mozilla-release.orig/js/src/jsapi.cpp ++++ mozilla-release/js/src/jsapi.cpp +@@ -1105,8 +1105,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe + #undef MSG_DEF + #endif /* DEBUG */ + +- InitMemorySubsystem(); +- + if (!js::TlsPerThreadData.init()) + return NULL; + +Index: mozilla-release/js/src/jscntxt.h +=================================================================== +--- mozilla-release.orig/js/src/jscntxt.h ++++ mozilla-release/js/src/jscntxt.h +@@ -847,6 +847,15 @@ struct JSRuntime : js::RuntimeFriendFiel + /* Stack of thread-stack-allocated GC roots. */ + js::AutoGCRooter *autoGCRooters; + ++ /* ++ * The GC can only safely decommit memory when the page size of the ++ * running process matches the compiled arena size. ++ */ ++ size_t gcSystemPageSize; ++ ++ /* The OS allocation granularity may not match the page size. */ ++ size_t gcSystemAllocGranularity; ++ + /* Strong references on scripts held for PCCount profiling API. */ + js::ScriptAndCountsVector *scriptAndCountsVector; + +Index: mozilla-release/js/src/jsgc.cpp +=================================================================== +--- mozilla-release.orig/js/src/jsgc.cpp ++++ mozilla-release/js/src/jsgc.cpp +@@ -486,13 +486,13 @@ FinalizeArenas(FreeOp *fop, + } + + static inline Chunk * +-AllocChunk() { +- return static_cast(MapAlignedPages(ChunkSize, ChunkSize)); ++AllocChunk(JSRuntime *rt) { ++ return static_cast(MapAlignedPages(rt, ChunkSize, ChunkSize)); + } + + static inline void +-FreeChunk(Chunk *p) { +- UnmapPages(static_cast(p), ChunkSize); ++FreeChunk(JSRuntime *rt, Chunk *p) { ++ UnmapPages(rt, static_cast(p), ChunkSize); + } + + inline bool +@@ -582,25 +582,25 @@ ChunkPool::expire(JSRuntime *rt, bool re + } + + static void +-FreeChunkList(Chunk *chunkListHead) ++FreeChunkList(JSRuntime *rt, Chunk *chunkListHead) + { + while (Chunk *chunk = chunkListHead) { + JS_ASSERT(!chunk->info.numArenasFreeCommitted); + chunkListHead = chunk->info.next; +- FreeChunk(chunk); ++ FreeChunk(rt, chunk); + } + } + + void + ChunkPool::expireAndFree(JSRuntime *rt, bool releaseAll) + { +- FreeChunkList(expire(rt, releaseAll)); ++ FreeChunkList(rt, expire(rt, releaseAll)); + } + + /* static */ Chunk * + Chunk::allocate(JSRuntime *rt) + { +- Chunk *chunk = static_cast(AllocChunk()); ++ Chunk *chunk = static_cast(AllocChunk(rt)); + + #ifdef JSGC_ROOT_ANALYSIS + // Our poison pointers are not guaranteed to be invalid on 64-bit +@@ -613,7 +613,7 @@ Chunk::allocate(JSRuntime *rt) + // were marked as uncommitted, but it's a little complicated to avoid + // clobbering pre-existing unrelated mappings. + while (IsPoisonedPtr(chunk)) +- chunk = static_cast(AllocChunk()); ++ chunk = static_cast(AllocChunk(rt)); + #endif + + if (!chunk) +@@ -629,7 +629,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu + { + JS_ASSERT(chunk); + chunk->prepareToBeFreed(rt); +- FreeChunk(chunk); ++ FreeChunk(rt, chunk); + } + + inline void +@@ -745,7 +745,7 @@ Chunk::findDecommittedArenaOffset() + } + + ArenaHeader * +-Chunk::fetchNextDecommittedArena() ++Chunk::fetchNextDecommittedArena(JSRuntime *rt) + { + JS_ASSERT(info.numArenasFreeCommitted == 0); + JS_ASSERT(info.numArenasFree > 0); +@@ -756,7 +756,7 @@ Chunk::fetchNextDecommittedArena() + decommittedArenas.unset(offset); + + Arena *arena = &arenas[offset]; +- MarkPagesInUse(arena, ArenaSize); ++ MarkPagesInUse(rt, arena, ArenaSize); + arena->aheader.setAsNotAllocated(); + + return &arena->aheader; +@@ -790,7 +790,7 @@ Chunk::allocateArena(JSCompartment *comp + + ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0) + ? fetchNextFreeArena(rt) +- : fetchNextDecommittedArena(); ++ : fetchNextDecommittedArena(rt); + aheader->init(comp, thingKind); + if (JS_UNLIKELY(!hasAvailableArenas())) + removeFromAvailableList(); +@@ -893,6 +893,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ + JSBool + js_InitGC(JSRuntime *rt, uint32_t maxbytes) + { ++ InitMemorySubsystem(rt); ++ + if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) + return false; + +@@ -2745,7 +2747,7 @@ DecommitArenasFromAvailableList(JSRuntim + Maybe maybeUnlock; + if (!rt->isHeapBusy()) + maybeUnlock.construct(rt); +- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); ++ ok = MarkPagesUnused(rt, aheader->getArena(), ArenaSize); + } + + if (ok) { +@@ -2813,7 +2815,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo + { + if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { + AutoUnlockGC unlock(rt); +- FreeChunkList(toFree); ++ FreeChunkList(rt, toFree); + } + + if (shouldShrink) +Index: mozilla-release/js/public/HeapAPI.h +=================================================================== +--- mozilla-release.orig/js/public/HeapAPI.h ++++ mozilla-release/js/public/HeapAPI.h +@@ -11,24 +11,7 @@ + namespace js { + namespace gc { + +-/* +- * Page size must be static to support our arena pointer optimizations, so we +- * are forced to support each platform with non-4096 pages as a special case. +- * Note: The freelist supports a maximum arena shift of 15. +- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. +- */ +-#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ +- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) +-const size_t PageShift = 13; +-const size_t ArenaShift = PageShift; +-#elif defined(__powerpc64__) +-const size_t PageShift = 16; + const size_t ArenaShift = 12; +-#else +-const size_t PageShift = 12; +-const size_t ArenaShift = PageShift; +-#endif +-const size_t PageSize = size_t(1) << PageShift; + const size_t ArenaSize = size_t(1) << ArenaShift; + const size_t ArenaMask = ArenaSize - 1; + diff --git a/xulrunner.spec b/xulrunner.spec index c6fbf30..ffa4087 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,6 +97,9 @@ Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch +%ifarch ppc ppc64 +Patch21: rhbz-911314.patch +%endif # Upstream patches Patch101: mozilla-791626.patch @@ -230,6 +233,10 @@ cd %{tarballdir} %patch19 -p2 -b .rhbz-304121 %patch20 -p2 -b .pk +%ifarch ppc ppc64 +%patch21 -p1 -b .ppc +%endif + %patch101 -p1 -b .791626 %patch102 -p1 -b .239254 @@ -511,6 +518,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 20 2013 Martin Stransky - 19.0-2 +- Added fix for rhbz#911314 (ppc only) + * Mon Feb 18 2013 Martin Stransky - 19.0-1 - Update to 19.0 - Added fix for mozbz#239254 From 4a06d2827ae2752600e46e40d8fe18b74e477bf6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 11 Mar 2013 17:00:29 +0100 Subject: [PATCH 341/486] Update to 19.0.2 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index d6896f8..a9d71e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3dc732b6ce177792b43324f4bc7164d8 firefox-19.0.source.tar.bz2 +de09d603c3b768a1698d90141f3b2644 firefox-19.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index ffa4087..1055d4a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,8 +75,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 19.0 -Release: 2%{?pre_tag}%{?dist} +Version: 19.0.2 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -518,6 +518,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Mar 11 2013 Martin Stransky - 19.0.2-1 +- Update to 19.0.2 + * Wed Feb 20 2013 Martin Stransky - 19.0-2 - Added fix for rhbz#911314 (ppc only) From 73a15815d23ea3a291a411aee76cd492f67334dc Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 14 Mar 2013 11:37:17 +0100 Subject: [PATCH 342/486] Include patch rhbz-911314.patch to all arches --- xulrunner.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 1055d4a..f565b8f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,9 +97,7 @@ Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -%ifarch ppc ppc64 Patch21: rhbz-911314.patch -%endif # Upstream patches Patch101: mozilla-791626.patch @@ -518,7 +516,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Mar 11 2013 Martin Stransky - 19.0.2-1 +* Mon Mar 11 2013 Martin Stransky - 19.0.2-2 - Update to 19.0.2 * Wed Feb 20 2013 Martin Stransky - 19.0-2 From d35150669e571de42d4fcc991df4c54b47517626 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 14 Mar 2013 14:01:07 +0100 Subject: [PATCH 343/486] package ppc patch in srpm even if srpm is built on other archs, otherwise koji will complain with 'file not found' --- xulrunner.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 1055d4a..6c5c75c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,9 +97,7 @@ Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -%ifarch ppc ppc64 Patch21: rhbz-911314.patch -%endif # Upstream patches Patch101: mozilla-791626.patch @@ -518,6 +516,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 13 2013 Karsten Hopp 19.0.2-2 +- package ppc specific patch file in srpm + * Mon Mar 11 2013 Martin Stransky - 19.0.2-1 - Update to 19.0.2 From c81a4e05464b12aa666774d7739637fdc0b2e09e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 19 Mar 2013 08:27:18 +0100 Subject: [PATCH 344/486] * Tue Mar 19 2013 Martin Stransky - 19.0.2-3 - Added fix for mozbz#826171/rhbz#922904 - strndup implementation in memory/build/mozmemory_wrap.c is broken --- mozilla-826171.patch | 33 +++++++++++++++++++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 mozilla-826171.patch diff --git a/mozilla-826171.patch b/mozilla-826171.patch new file mode 100644 index 0000000..e323573 --- /dev/null +++ b/mozilla-826171.patch @@ -0,0 +1,33 @@ +# HG changeset patch +# User Mike Hommey +# Date 1357203308 -3600 +# Node ID a7cd7d7d3fa7f2e9dbf2f603826731b81ad4c0a9 +# Parent 2158dce6ec174ce3723fba875c9531680c4ac1ed +Bug 826171 - Fix strndup in memory/build/mozmemory_wrap.c + +diff --git a/memory/build/mozmemory_wrap.c b/memory/build/mozmemory_wrap.c +--- a/memory/build/mozmemory_wrap.c ++++ b/memory/build/mozmemory_wrap.c +@@ -68,18 +68,20 @@ mozmem_malloc_impl(_ZdaPvRKSt9nothrow_t) + #undef strndup + #undef strdup + + #ifndef XP_DARWIN + MOZ_MEMORY_API char * + strndup_impl(const char *src, size_t len) + { + char* dst = (char*) malloc_impl(len + 1); +- if (dst) +- strncpy(dst, src, len + 1); ++ if (dst) { ++ strncpy(dst, src, len); ++ dst[len] = '\0'; ++ } + return dst; + } + + MOZ_MEMORY_API char * + strdup_impl(const char *src) + { + size_t len = strlen(src); + return strndup_impl(src, len); diff --git a/xulrunner.spec b/xulrunner.spec index f565b8f..ef39295 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0.2 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,6 +102,7 @@ Patch21: rhbz-911314.patch # Upstream patches Patch101: mozilla-791626.patch Patch102: mozilla-239254.patch +Patch103: mozilla-826171.patch # --------------------------------------------------- @@ -237,6 +238,7 @@ cd %{tarballdir} %patch101 -p1 -b .791626 %patch102 -p1 -b .239254 +%patch103 -p1 -b .826171 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -516,6 +518,10 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 19 2013 Martin Stransky - 19.0.2-3 +- Added fix for mozbz#826171/rhbz#922904 - strndup implementation + in memory/build/mozmemory_wrap.c is broken + * Mon Mar 11 2013 Martin Stransky - 19.0.2-2 - Update to 19.0.2 From 55bbfab739ac7b3c211ed1d88e89a00b3341ca18 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 19 Mar 2013 14:57:37 +0100 Subject: [PATCH 345/486] * Tue Mar 19 2013 Martin Stransky - 19.0.2-4 - Added fix for rhbz#913284 - Firefox segfaults in mozilla::gfx::AlphaBoxBlur::BoxBlur_C() on PPC64 --- mozilla-844883.patch | 17 +++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 mozilla-844883.patch diff --git a/mozilla-844883.patch b/mozilla-844883.patch new file mode 100644 index 0000000..9298d7d --- /dev/null +++ b/mozilla-844883.patch @@ -0,0 +1,17 @@ +# HG changeset patch +# Parent f8a3e008d03b538873a8d4f16fb97829f171517b +# User Steve Singer +bug 844883 use a signed value for the stride + +diff -r f8a3e008d03b -r a298fedfda70 gfx/2d/Blur.cpp +--- a/gfx/2d/Blur.cpp Sun Mar 17 00:55:23 2013 -0400 ++++ b/gfx/2d/Blur.cpp Sun Mar 17 01:28:39 2013 -0400 +@@ -650,7 +650,7 @@ + return; + } + +- uint32_t stride32bit = aIntegralImageStride / 4; ++ int32_t stride32bit = aIntegralImageStride / 4; + + int32_t leftInflation = RoundUpToMultipleOf4(aLeftLobe).value(); + diff --git a/xulrunner.spec b/xulrunner.spec index ef39295..cadd5e1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0.2 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -103,6 +103,7 @@ Patch21: rhbz-911314.patch Patch101: mozilla-791626.patch Patch102: mozilla-239254.patch Patch103: mozilla-826171.patch +Patch104: mozilla-844883.patch # --------------------------------------------------- @@ -234,6 +235,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %ifarch ppc ppc64 %patch21 -p1 -b .ppc +%patch104 -p1 -b .844883 %endif %patch101 -p1 -b .791626 @@ -518,6 +520,10 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 19 2013 Martin Stransky - 19.0.2-4 +- Added fix for rhbz#913284 - Firefox segfaults + in mozilla::gfx::AlphaBoxBlur::BoxBlur_C() on PPC64 + * Tue Mar 19 2013 Martin Stransky - 19.0.2-3 - Added fix for mozbz#826171/rhbz#922904 - strndup implementation in memory/build/mozmemory_wrap.c is broken From 38dfdbf9ef24aa76f5f0170a2347c8a1b66be9a1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 1 Apr 2013 11:30:09 +0200 Subject: [PATCH 346/486] Update to 20.0 --- mozilla-826171.patch | 33 --------------------------------- rhbz-304121.patch | 13 ++++++------- sources | 2 +- xulrunner.spec | 9 +++++---- 4 files changed, 12 insertions(+), 45 deletions(-) delete mode 100644 mozilla-826171.patch diff --git a/mozilla-826171.patch b/mozilla-826171.patch deleted file mode 100644 index e323573..0000000 --- a/mozilla-826171.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset patch -# User Mike Hommey -# Date 1357203308 -3600 -# Node ID a7cd7d7d3fa7f2e9dbf2f603826731b81ad4c0a9 -# Parent 2158dce6ec174ce3723fba875c9531680c4ac1ed -Bug 826171 - Fix strndup in memory/build/mozmemory_wrap.c - -diff --git a/memory/build/mozmemory_wrap.c b/memory/build/mozmemory_wrap.c ---- a/memory/build/mozmemory_wrap.c -+++ b/memory/build/mozmemory_wrap.c -@@ -68,18 +68,20 @@ mozmem_malloc_impl(_ZdaPvRKSt9nothrow_t) - #undef strndup - #undef strdup - - #ifndef XP_DARWIN - MOZ_MEMORY_API char * - strndup_impl(const char *src, size_t len) - { - char* dst = (char*) malloc_impl(len + 1); -- if (dst) -- strncpy(dst, src, len + 1); -+ if (dst) { -+ strncpy(dst, src, len); -+ dst[len] = '\0'; -+ } - return dst; - } - - MOZ_MEMORY_API char * - strdup_impl(const char *src) - { - size_t len = strlen(src); - return strndup_impl(src, len); diff --git a/rhbz-304121.patch b/rhbz-304121.patch index 941aca2..d8d8ac3 100644 --- a/rhbz-304121.patch +++ b/rhbz-304121.patch @@ -1,13 +1,12 @@ -diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile.old firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile -diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py ---- firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old 2013-01-05 00:44:41.000000000 +0100 -+++ firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-01-10 14:48:58.418321640 +0100 -@@ -376,7 +376,7 @@ class MakefileGenerator(object): +diff -up xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.rhbz-304121 xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py +--- xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.rhbz-304121 2013-03-26 23:17:58.000000000 +0100 ++++ xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-04-01 11:11:56.938411785 +0200 +@@ -377,7 +377,7 @@ class MakefileGenerator(object): WriteMakefile(output_file, data, build_file, depth, top, # we set srcdir up one directory, since the subdir # doesn't actually exist in the source directory - swapslashes(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0])), + swapslashes(os.path.normpath(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0]))), - self.relative_srcdir) + self.relative_srcdir, + self.common_mk_path) return True - diff --git a/sources b/sources index a9d71e1..1dbc77f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -de09d603c3b768a1698d90141f3b2644 firefox-19.0.2.source.tar.bz2 +e664416da2075f13089fe3e883cadb73 firefox-20.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index cadd5e1..2a1a056 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,8 +75,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 19.0.2 -Release: 4%{?pre_tag}%{?dist} +Version: 20.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,7 +102,6 @@ Patch21: rhbz-911314.patch # Upstream patches Patch101: mozilla-791626.patch Patch102: mozilla-239254.patch -Patch103: mozilla-826171.patch Patch104: mozilla-844883.patch # --------------------------------------------------- @@ -240,7 +239,6 @@ cd %{tarballdir} %patch101 -p1 -b .791626 %patch102 -p1 -b .239254 -%patch103 -p1 -b .826171 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -520,6 +518,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 19 2013 Martin Stransky - 20.0-1 +- Update to latest upstream (20.0) + * Tue Mar 19 2013 Martin Stransky - 19.0.2-4 - Added fix for rhbz#913284 - Firefox segfaults in mozilla::gfx::AlphaBoxBlur::BoxBlur_C() on PPC64 From faf2784516331313ac23e68becdfdf73f706678a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 1 Apr 2013 12:32:36 +0200 Subject: [PATCH 347/486] build fix --- xulrunner.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2a1a056..90b20cf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -487,7 +487,6 @@ fi %{mozappdir}/components/*.so %{mozappdir}/components/*.manifest %{mozappdir}/omni.ja -%{mozappdir}/plugins %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh @@ -514,6 +513,9 @@ fi %{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell +%{mozappdir}/js-gdb.py +%ghost %{mozappdir}/js-gdb.pyc +%ghost %{mozappdir}/js-gdb.pyo #--------------------------------------------------------------------- From 3b6649ae7efd1ffd2bd0acd5c960584eef1445c1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Apr 2013 09:56:22 +0200 Subject: [PATCH 348/486] A workaround for Bug 928353 - firefox i686 crashes for a number of web pages --- xulrunner.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 90b20cf..c681684 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -98,6 +98,7 @@ Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch +Patch22: rhbz-928353.patch # Upstream patches Patch101: mozilla-791626.patch @@ -237,6 +238,12 @@ cd %{tarballdir} %patch104 -p1 -b .844883 %endif +%if 0%{?fedora} >= 19 +%ifarch %{ix86} +%patch22 -p2 +%endif +%endif + %patch101 -p1 -b .791626 %patch102 -p1 -b .239254 From 163c167d1d169f7ac45dc6e08c038c6bfcd1c20f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Apr 2013 10:10:06 +0200 Subject: [PATCH 349/486] release up --- xulrunner.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index c681684..db0ada6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 20.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -527,6 +527,10 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 3 2013 Martin Stransky - 20.0-2 +- A workaround for Bug 928353 - firefox i686 crashes + for a number of web pages + * Tue Mar 19 2013 Martin Stransky - 20.0-1 - Update to latest upstream (20.0) From 76cde3aca777d99857bf2973734e70b55654d4c1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Apr 2013 10:58:24 +0200 Subject: [PATCH 350/486] Added missing patch --- rhbz-928353.patch | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 rhbz-928353.patch diff --git a/rhbz-928353.patch b/rhbz-928353.patch new file mode 100644 index 0000000..14a5ba1 --- /dev/null +++ b/rhbz-928353.patch @@ -0,0 +1,114 @@ +diff -r -U2 xulrunner-20.0/mozilla-release/config/Makefile.in xulrunner-20.0.new/mozilla-release/config/Makefile.in +--- xulrunner-20.0/mozilla-release/config/Makefile.in 2013-03-26 18:17:37.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/config/Makefile.in 2013-03-30 01:50:11.109526990 -0400 +@@ -38,5 +38,5 @@ + + ifdef GNU_CC +-MODULE_OPTIMIZE_FLAGS = -O3 ++MODULE_OPTIMIZE_FLAGS = -Os + endif + +diff -r -U2 xulrunner-20.0/mozilla-release/configure.in xulrunner-20.0.new/mozilla-release/configure.in +--- xulrunner-20.0/mozilla-release/configure.in 2013-03-26 18:17:37.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/configure.in 2013-03-30 01:50:03.474547207 -0400 +@@ -1848,5 +1848,5 @@ + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" + HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" + ;; + +@@ -1854,5 +1854,5 @@ + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" + HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" + ;; + +@@ -1961,5 +1961,5 @@ + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' +- MOZ_OPTIMIZE_FLAGS="-O3" ++ MOZ_OPTIMIZE_FLAGS="-Os" + _PEDANTIC= + # Statically disable jemalloc on 10.5 and 32-bit 10.6. See bug 702250. +@@ -2106,5 +2106,5 @@ + MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" + esac +- MOZ_PGO_OPTIMIZE_FLAGS="-O3" ++ MOZ_PGO_OPTIMIZE_FLAGS="-Os" + MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" + MOZ_DEBUG_FLAGS="-g" +diff -r -U2 xulrunner-20.0/mozilla-release/js/src/config/Makefile.in xulrunner-20.0.new/mozilla-release/js/src/config/Makefile.in +--- xulrunner-20.0/mozilla-release/js/src/config/Makefile.in 2013-03-26 18:17:46.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/js/src/config/Makefile.in 2013-03-30 01:51:03.443862662 -0400 +@@ -27,5 +27,5 @@ + + ifdef GNU_CC +-MODULE_OPTIMIZE_FLAGS = -O3 ++MODULE_OPTIMIZE_FLAGS = -Os + endif + +diff -r -U2 xulrunner-20.0/mozilla-release/js/src/configure.in xulrunner-20.0.new/mozilla-release/js/src/configure.in +--- xulrunner-20.0/mozilla-release/js/src/configure.in 2013-03-26 18:17:46.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/js/src/configure.in 2013-03-30 01:50:46.254052920 -0400 +@@ -1443,5 +1443,5 @@ + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" + HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" + ;; + +@@ -1449,5 +1449,5 @@ + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" + HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" + ;; + +@@ -1554,5 +1554,5 @@ + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' +- MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector" ++ MOZ_OPTIMIZE_FLAGS="-Os -fno-stack-protector" + _PEDANTIC= + CFLAGS="$CFLAGS -fno-common" +@@ -1648,5 +1648,5 @@ + + MOZ_GFX_OPTIMIZE_MOBILE=1 +- MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks -fno-reorder-functions" ++ MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions" + # The Maemo builders don't know about this flag + MOZ_ARM_VFP_FLAGS="-mfpu=vfp" +@@ -1668,6 +1668,6 @@ + MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" + esac +- MOZ_PGO_OPTIMIZE_FLAGS="-O3" +- MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" ++ MOZ_PGO_OPTIMIZE_FLAGS="-Os" ++ MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" + MOZ_DEBUG_FLAGS="-g" + fi +diff -r -U2 xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure +--- xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure 2013-03-26 18:17:58.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure 2013-03-30 01:51:38.533133311 -0400 +@@ -5279,7 +5279,7 @@ + TCFLAGS="${CFLAGS}" + if test "x${CFLAGS}" = "x" ; then +- CFLAGS="-O3" ++ CFLAGS="-Os" + else +- CFLAGS="${CFLAGS} -O3" ++ CFLAGS="${CFLAGS} -Os" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +diff -r -U2 xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure.ac xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure.ac +--- xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure.ac 2013-03-26 18:17:58.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure.ac 2013-03-30 01:51:15.753872639 -0400 +@@ -574,5 +574,5 @@ + if test "x${optimize}" = "xyes" ; then + if test "x$GCC" = "xyes" ; then +- JE_CFLAGS_APPEND([-O3]) ++ JE_CFLAGS_APPEND([-Os]) + JE_CFLAGS_APPEND([-funroll-loops]) + elif test "x$je_cv_msvc" = "xyes" ; then From d3cfadc7fab6764be9a12b3152f3c35f5184748b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Apr 2013 12:20:24 +0200 Subject: [PATCH 351/486] build fix --- xulrunner.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index db0ada6..24831d1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 20.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -134,6 +134,7 @@ BuildRequires: libnotify-devel >= %{libnotify_version} BuildRequires: mesa-libGL-devel BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} +BuildRequires: autoconf213 Requires: mozilla-filesystem %if %{?system_nss} @@ -527,7 +528,7 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Apr 3 2013 Martin Stransky - 20.0-2 +* Wed Apr 3 2013 Martin Stransky - 20.0-3 - A workaround for Bug 928353 - firefox i686 crashes for a number of web pages From 689d99011f7cf31063e8d2fdb9c427d735750dbe Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 5 Apr 2013 08:56:24 +0200 Subject: [PATCH 352/486] Updated rhbz-911314.patch for xulrunner 20 --- rhbz-911314.patch | 142 +++++++++++++++++++++++----------------------- xulrunner.spec | 5 +- 2 files changed, 75 insertions(+), 72 deletions(-) diff --git a/rhbz-911314.patch b/rhbz-911314.patch index 4f1cfa0..82f245a 100644 --- a/rhbz-911314.patch +++ b/rhbz-911314.patch @@ -24,14 +24,14 @@ Index: mozilla-release/js/src/gc/Memory.cpp @@ -8,6 +8,7 @@ #include "mozilla/Assertions.h" - #include "jstypes.h" + #include "jsapi.h" +#include "jscntxt.h" + #include "js/HeapAPI.h" #include "js/Utility.h" - #include "gc/Memory.h" -@@ -19,39 +20,34 @@ namespace gc { - extern const size_t PageSize; - extern const size_t ArenaSize; +@@ -18,39 +19,34 @@ using namespace js::gc; + + /* Unused memory decommiting requires the arena size match the page size. */ static bool -DecommitEnabled() +DecommitEnabled(JSRuntime *rt) @@ -47,8 +47,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp -static size_t AllocationGranularity = 0; - void --InitMemorySubsystem() -+InitMemorySubsystem(JSRuntime *rt) +-gc::InitMemorySubsystem() ++gc::InitMemorySubsystem(JSRuntime *rt) { SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); @@ -62,8 +62,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp } void * --MapAlignedPages(size_t size, size_t alignment) -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) +-gc::MapAlignedPages(size_t size, size_t alignment) ++gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) { JS_ASSERT(size >= alignment); JS_ASSERT(size % alignment == 0); @@ -78,7 +78,7 @@ Index: mozilla-release/js/src/gc/Memory.cpp return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); } -@@ -75,7 +71,7 @@ MapAlignedPages(size_t size, size_t alig +@@ -74,7 +70,7 @@ gc::MapAlignedPages(size_t size, size_t if (!p) return NULL; void *chunkStart = (void *)(uintptr_t(p) + (alignment - (uintptr_t(p) % alignment))); @@ -87,19 +87,19 @@ Index: mozilla-release/js/src/gc/Memory.cpp p = VirtualAlloc(chunkStart, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); /* Failure here indicates a race with another thread, so try again. */ -@@ -86,26 +82,26 @@ MapAlignedPages(size_t size, size_t alig +@@ -85,26 +81,26 @@ gc::MapAlignedPages(size_t size, size_t } void --UnmapPages(void *p, size_t size) -+UnmapPages(JSRuntime *rt, void *p, size_t size) +-gc::UnmapPages(void *p, size_t size) ++gc::UnmapPages(JSRuntime *rt, void *p, size_t size) { JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE)); } bool --MarkPagesUnused(void *p, size_t size) -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesUnused(void *p, size_t size) ++gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { - if (!DecommitEnabled()) - return false; @@ -113,40 +113,40 @@ Index: mozilla-release/js/src/gc/Memory.cpp } bool --MarkPagesInUse(void *p, size_t size) -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesInUse(void *p, size_t size) ++gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); return true; } -@@ -127,12 +123,13 @@ GetPageFaultCount() +@@ -126,12 +122,13 @@ gc::GetPageFaultCount() #define OS2_MAX_RECURSIONS 16 void --InitMemorySubsystem() -+InitMemorySubsystem(JSRuntime *rt) +-gc::InitMemorySubsystem() ++gc::InitMemorySubsystem(JSRuntime *rt) { + rt->gcSystemPageSize = rt->gcSystemAllocGranularity = ArenaSize; } void --UnmapPages(void *addr, size_t size) -+UnmapPages(JSRuntime *rt, void *addr, size_t size) +-gc::UnmapPages(void *addr, size_t size) ++gc::UnmapPages(JSRuntime *rt, void *addr, size_t size) { if (!DosFreeMem(addr)) return; -@@ -153,7 +150,7 @@ UnmapPages(void *addr, size_t size) +@@ -152,7 +149,7 @@ gc::UnmapPages(void *addr, size_t size) } static void * --MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) -+MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) +-gc::MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) ++gc::MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) { if (++recursions >= OS2_MAX_RECURSIONS) return NULL; -@@ -179,7 +176,7 @@ MapAlignedPagesRecursively(size_t size, +@@ -178,7 +175,7 @@ gc::MapAlignedPagesRecursively(size_t si unsigned long rc = DosQueryMem(&(static_cast(tmp))[size], &cb, &flags); if (!rc && (flags & PAG_FREE) && cb >= filler) { @@ -155,7 +155,7 @@ Index: mozilla-release/js/src/gc/Memory.cpp if (DosAllocMem(&tmp, filler, OBJ_ANY | PAG_COMMIT | PAG_READ | PAG_WRITE)) { JS_ALWAYS_TRUE(DosAllocMem(&tmp, filler, -@@ -187,19 +184,19 @@ MapAlignedPagesRecursively(size_t size, +@@ -186,19 +183,19 @@ gc::MapAlignedPagesRecursively(size_t si } } @@ -168,8 +168,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp } void * --MapAlignedPages(size_t size, size_t alignment) -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) +-gc::MapAlignedPages(size_t size, size_t alignment) ++gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) { JS_ASSERT(size >= alignment); JS_ASSERT(size % alignment == 0); @@ -180,7 +180,7 @@ Index: mozilla-release/js/src/gc/Memory.cpp int recursions = -1; -@@ -208,7 +205,7 @@ MapAlignedPages(size_t size, size_t alig +@@ -207,7 +204,7 @@ gc::MapAlignedPages(size_t size, size_t * of the right size by recursively allocating blocks of unaligned * free memory until only an aligned allocation is possible. */ @@ -189,11 +189,11 @@ Index: mozilla-release/js/src/gc/Memory.cpp if (p) return p; -@@ -230,16 +227,15 @@ MapAlignedPages(size_t size, size_t alig +@@ -229,16 +226,15 @@ gc::MapAlignedPages(size_t size, size_t } bool --MarkPagesUnused(void *p, size_t size) +-gc::MarkPagesUnused(void *p, size_t size) -{ - JS_ASSERT(uintptr_t(p) % PageSize == 0); +MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { @@ -202,27 +202,27 @@ Index: mozilla-release/js/src/gc/Memory.cpp } bool --MarkPagesInUse(void *p, size_t size) -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesInUse(void *p, size_t size) ++gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); return true; } -@@ -259,17 +255,18 @@ GetPageFaultCount() +@@ -258,17 +254,18 @@ gc::GetPageFaultCount() #endif void --InitMemorySubsystem() -+InitMemorySubsystem(JSRuntime *rt) +-gc::InitMemorySubsystem() ++gc::InitMemorySubsystem(JSRuntime *rt) { + rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); } void * --MapAlignedPages(size_t size, size_t alignment) -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) +-gc::MapAlignedPages(size_t size, size_t alignment) ++gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) { JS_ASSERT(size >= alignment); JS_ASSERT(size % alignment == 0); @@ -233,19 +233,19 @@ Index: mozilla-release/js/src/gc/Memory.cpp int prot = PROT_READ | PROT_WRITE; int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC; -@@ -281,22 +278,22 @@ MapAlignedPages(size_t size, size_t alig +@@ -280,22 +277,22 @@ gc::MapAlignedPages(size_t size, size_t } void --UnmapPages(void *p, size_t size) -+UnmapPages(JSRuntime *rt, void *p, size_t size) +-gc::UnmapPages(void *p, size_t size) ++gc::UnmapPages(JSRuntime *rt, void *p, size_t size) { JS_ALWAYS_TRUE(0 == munmap((caddr_t)p, size)); } bool --MarkPagesUnused(void *p, size_t size) -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesUnused(void *p, size_t size) ++gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); @@ -253,20 +253,20 @@ Index: mozilla-release/js/src/gc/Memory.cpp } bool --MarkPagesInUse(void *p, size_t size) -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesInUse(void *p, size_t size) ++gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); return true; } -@@ -314,27 +311,24 @@ GetPageFaultCount() +@@ -313,27 +310,24 @@ gc::GetPageFaultCount() #include void --InitMemorySubsystem() -+InitMemorySubsystem(JSRuntime *rt) +-gc::InitMemorySubsystem() ++gc::InitMemorySubsystem(JSRuntime *rt) { - if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) { - fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); @@ -276,8 +276,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp } void * --MapAlignedPages(size_t size, size_t alignment) -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) +-gc::MapAlignedPages(size_t size, size_t alignment) ++gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) { JS_ASSERT(size >= alignment); JS_ASSERT(size % alignment == 0); @@ -295,19 +295,19 @@ Index: mozilla-release/js/src/gc/Memory.cpp return mmap(NULL, size, prot, flags, -1, 0); } -@@ -360,26 +354,26 @@ MapAlignedPages(size_t size, size_t alig +@@ -359,26 +353,26 @@ gc::MapAlignedPages(size_t size, size_t } void --UnmapPages(void *p, size_t size) -+UnmapPages(JSRuntime *rt, void *p, size_t size) +-gc::UnmapPages(void *p, size_t size) ++gc::UnmapPages(JSRuntime *rt, void *p, size_t size) { JS_ALWAYS_TRUE(0 == munmap(p, size)); } bool --MarkPagesUnused(void *p, size_t size) -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesUnused(void *p, size_t size) ++gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { - if (!DecommitEnabled()) - return false; @@ -321,8 +321,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp } bool --MarkPagesInUse(void *p, size_t size) -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesInUse(void *p, size_t size) ++gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); @@ -363,7 +363,7 @@ Index: mozilla-release/js/src/jsapi.cpp =================================================================== --- mozilla-release.orig/js/src/jsapi.cpp +++ mozilla-release/js/src/jsapi.cpp -@@ -1105,8 +1105,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe +@@ -1113,8 +1113,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe #undef MSG_DEF #endif /* DEBUG */ @@ -376,7 +376,7 @@ Index: mozilla-release/js/src/jscntxt.h =================================================================== --- mozilla-release.orig/js/src/jscntxt.h +++ mozilla-release/js/src/jscntxt.h -@@ -847,6 +847,15 @@ struct JSRuntime : js::RuntimeFriendFiel +@@ -873,6 +873,15 @@ struct JSRuntime : js::RuntimeFriendFiel /* Stack of thread-stack-allocated GC roots. */ js::AutoGCRooter *autoGCRooters; @@ -396,7 +396,7 @@ Index: mozilla-release/js/src/jsgc.cpp =================================================================== --- mozilla-release.orig/js/src/jsgc.cpp +++ mozilla-release/js/src/jsgc.cpp -@@ -486,13 +486,13 @@ FinalizeArenas(FreeOp *fop, +@@ -477,13 +477,13 @@ FinalizeArenas(FreeOp *fop, } static inline Chunk * @@ -414,7 +414,7 @@ Index: mozilla-release/js/src/jsgc.cpp } inline bool -@@ -582,25 +582,25 @@ ChunkPool::expire(JSRuntime *rt, bool re +@@ -573,25 +573,25 @@ ChunkPool::expire(JSRuntime *rt, bool re } static void @@ -444,7 +444,7 @@ Index: mozilla-release/js/src/jsgc.cpp #ifdef JSGC_ROOT_ANALYSIS // Our poison pointers are not guaranteed to be invalid on 64-bit -@@ -613,7 +613,7 @@ Chunk::allocate(JSRuntime *rt) +@@ -604,7 +604,7 @@ Chunk::allocate(JSRuntime *rt) // were marked as uncommitted, but it's a little complicated to avoid // clobbering pre-existing unrelated mappings. while (IsPoisonedPtr(chunk)) @@ -453,7 +453,7 @@ Index: mozilla-release/js/src/jsgc.cpp #endif if (!chunk) -@@ -629,7 +629,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu +@@ -620,7 +620,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu { JS_ASSERT(chunk); chunk->prepareToBeFreed(rt); @@ -462,7 +462,7 @@ Index: mozilla-release/js/src/jsgc.cpp } inline void -@@ -745,7 +745,7 @@ Chunk::findDecommittedArenaOffset() +@@ -736,7 +736,7 @@ Chunk::findDecommittedArenaOffset() } ArenaHeader * @@ -471,7 +471,7 @@ Index: mozilla-release/js/src/jsgc.cpp { JS_ASSERT(info.numArenasFreeCommitted == 0); JS_ASSERT(info.numArenasFree > 0); -@@ -756,7 +756,7 @@ Chunk::fetchNextDecommittedArena() +@@ -747,7 +747,7 @@ Chunk::fetchNextDecommittedArena() decommittedArenas.unset(offset); Arena *arena = &arenas[offset]; @@ -480,7 +480,7 @@ Index: mozilla-release/js/src/jsgc.cpp arena->aheader.setAsNotAllocated(); return &arena->aheader; -@@ -790,7 +790,7 @@ Chunk::allocateArena(JSCompartment *comp +@@ -781,7 +781,7 @@ Chunk::allocateArena(JSCompartment *comp ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0) ? fetchNextFreeArena(rt) @@ -489,7 +489,7 @@ Index: mozilla-release/js/src/jsgc.cpp aheader->init(comp, thingKind); if (JS_UNLIKELY(!hasAvailableArenas())) removeFromAvailableList(); -@@ -893,6 +893,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ +@@ -881,6 +881,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ JSBool js_InitGC(JSRuntime *rt, uint32_t maxbytes) { @@ -498,7 +498,7 @@ Index: mozilla-release/js/src/jsgc.cpp if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) return false; -@@ -2745,7 +2747,7 @@ DecommitArenasFromAvailableList(JSRuntim +@@ -1969,7 +1971,7 @@ DecommitArenasFromAvailableList(JSRuntim Maybe maybeUnlock; if (!rt->isHeapBusy()) maybeUnlock.construct(rt); @@ -507,7 +507,7 @@ Index: mozilla-release/js/src/jsgc.cpp } if (ok) { -@@ -2813,7 +2815,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo +@@ -2037,7 +2039,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo { if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { AutoUnlockGC unlock(rt); @@ -520,7 +520,7 @@ Index: mozilla-release/js/public/HeapAPI.h =================================================================== --- mozilla-release.orig/js/public/HeapAPI.h +++ mozilla-release/js/public/HeapAPI.h -@@ -11,24 +11,7 @@ +@@ -13,24 +13,7 @@ namespace js { namespace gc { diff --git a/xulrunner.spec b/xulrunner.spec index 24831d1..91c5e9d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 20.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -528,6 +528,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Apr 5 2013 Martin Stransky - 20.0-4 +- Updated rhbz-911314.patch for xulrunner 20 + * Wed Apr 3 2013 Martin Stransky - 20.0-3 - A workaround for Bug 928353 - firefox i686 crashes for a number of web pages From 0d5f644e5e9996a9fc5e1e90cfb7fcccfca8cef1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Sun, 12 May 2013 23:02:03 +0200 Subject: [PATCH 353/486] Update to latest upstream (21.0) --- mozilla-239254.patch | 483 ------------------------------------------- mozilla-791626.patch | 46 ----- rhbz-304121.patch | 12 -- sources | 2 +- xulrunner.spec | 14 +- 5 files changed, 6 insertions(+), 551 deletions(-) delete mode 100644 mozilla-239254.patch delete mode 100644 mozilla-791626.patch delete mode 100644 rhbz-304121.patch diff --git a/mozilla-239254.patch b/mozilla-239254.patch deleted file mode 100644 index 9ce3838..0000000 --- a/mozilla-239254.patch +++ /dev/null @@ -1,483 +0,0 @@ -# HG changeset patch -# Parent cb34bd8957ec517c72d506f7c439e3af1950e38d -# User Martin Stransky -Bug 239254 - [Linux] Support disk cache on a local path, r=michal.novotny - -diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp ---- a/netwerk/cache/nsCacheService.cpp -+++ b/netwerk/cache/nsCacheService.cpp -@@ -712,27 +712,18 @@ nsCacheProfilePrefObserver::ReadPrefs(ns - nsCOMPtr profDir; - NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, - getter_AddRefs(profDir)); - NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR, - getter_AddRefs(directory)); - if (!directory) - directory = profDir; - else if (profDir) { -- bool same; -- if (NS_SUCCEEDED(profDir->Equals(directory, &same)) && !same) { -- // We no longer store the cache directory in the main -- // profile directory, so we should cleanup the old one. -- rv = profDir->AppendNative(NS_LITERAL_CSTRING("Cache")); -- if (NS_SUCCEEDED(rv)) { -- bool exists; -- if (NS_SUCCEEDED(profDir->Exists(&exists)) && exists) -- nsDeleteDir::DeleteDir(profDir, false); -- } -- } -+ nsCacheService::MoveOrRemoveDiskCache(profDir, directory, -+ "Cache"); - } - } - // use file cache in build tree only if asked, to avoid cache dir litter - if (!directory && PR_GetEnv("NECKO_DEV_ENABLE_DISK_CACHE")) { - rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, - getter_AddRefs(directory)); - } - if (directory) -@@ -788,16 +779,20 @@ nsCacheProfilePrefObserver::ReadPrefs(ns - // try to get the profile directory (there may not be a profile yet) - nsCOMPtr profDir; - NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, - getter_AddRefs(profDir)); - NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR, - getter_AddRefs(directory)); - if (!directory) - directory = profDir; -+ else if (profDir) { -+ nsCacheService::MoveOrRemoveDiskCache(profDir, directory, -+ "OfflineCache"); -+ } - } - #if DEBUG - if (!directory) { - // use current process directory during development - rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, - getter_AddRefs(directory)); - } - #endif -@@ -3012,16 +3007,67 @@ nsCacheService::SetDiskSmartSize_Locked( - DispatchToCacheIOThread(event); - } else { - return NS_ERROR_FAILURE; - } - - return NS_OK; - } - -+void -+nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, -+ nsIFile *aNewCacheDir, -+ const char *aCacheSubdir) -+{ -+ bool same; -+ if (NS_FAILED(aOldCacheDir->Equals(aNewCacheDir, &same)) || same) -+ return; -+ -+ nsCOMPtr aOldCacheSubdir; -+ aOldCacheDir->Clone(getter_AddRefs(aOldCacheSubdir)); -+ -+ nsresult rv = aOldCacheSubdir->AppendNative( -+ nsDependentCString(aCacheSubdir)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ bool exists; -+ if (NS_FAILED(aOldCacheSubdir->Exists(&exists)) || !exists) -+ return; -+ -+ nsCOMPtr aNewCacheSubdir; -+ aNewCacheDir->Clone(getter_AddRefs(aNewCacheSubdir)); -+ -+ rv = aNewCacheSubdir->AppendNative(nsDependentCString(aCacheSubdir)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ nsAutoCString newPath; -+ rv = aNewCacheSubdir->GetNativePath(newPath); -+ if (NS_FAILED(rv)) -+ return; -+ -+ if (NS_SUCCEEDED(aNewCacheSubdir->Exists(&exists)) && !exists) { -+ // New cache directory does not exist, try to move the old one here -+ // rename needs an empty target directory -+ rv = aNewCacheSubdir->Create(nsIFile::DIRECTORY_TYPE, 0777); -+ if (NS_SUCCEEDED(rv)) { -+ nsAutoCString oldPath; -+ rv = aOldCacheSubdir->GetNativePath(oldPath); -+ if (NS_FAILED(rv)) -+ return; -+ if(rename(oldPath.get(), newPath.get()) == 0) -+ return; -+ } -+ } -+ -+ // Delay delete by 1 minute to avoid IO thrash on startup. -+ nsDeleteDir::DeleteDir(aOldCacheSubdir, false, 60000); -+} -+ - static bool - IsEntryPrivate(nsCacheEntry* entry) - { - return entry->IsPrivate(); - } - - void - nsCacheService::LeavePrivateBrowsing() -diff --git a/netwerk/cache/nsCacheService.h b/netwerk/cache/nsCacheService.h ---- a/netwerk/cache/nsCacheService.h -+++ b/netwerk/cache/nsCacheService.h -@@ -194,16 +194,20 @@ public: - - static void SetMemoryCache(); - - static void SetCacheCompressionLevel(int32_t level); - - // Starts smart cache size computation if disk device is available - static nsresult SetDiskSmartSize(); - -+ static void MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, -+ nsIFile *aNewCacheDir, -+ const char *aCacheSubdir); -+ - nsresult Init(); - void Shutdown(); - - static bool IsInitialized() - { - if (!gService) { - return false; - } -diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp ---- a/startupcache/StartupCache.cpp -+++ b/startupcache/StartupCache.cpp -@@ -168,16 +168,30 @@ StartupCache::Init() - nsCOMPtr file; - rv = NS_GetSpecialDirectory("ProfLDS", - getter_AddRefs(file)); - if (NS_FAILED(rv)) { - // return silently, this will fail in mochitests's xpcshell process. - return rv; - } - -+ nsCOMPtr profDir; -+ NS_GetSpecialDirectory("ProfDS", getter_AddRefs(profDir)); -+ if (profDir) { -+ bool same; -+ if (NS_SUCCEEDED(profDir->Equals(file, &same)) && !same) { -+ // We no longer store the startup cache in the main profile -+ // directory, so we should cleanup the old one. -+ if (NS_SUCCEEDED( -+ profDir->AppendNative(NS_LITERAL_CSTRING("startupCache")))) { -+ profDir->Remove(true); -+ } -+ } -+ } -+ - rv = file->AppendNative(NS_LITERAL_CSTRING("startupCache")); - NS_ENSURE_SUCCESS(rv, rv); - - // Try to create the directory if it's not there yet - rv = file->Create(nsIFile::DIRECTORY_TYPE, 0777); - if (NS_FAILED(rv) && rv != NS_ERROR_FILE_ALREADY_EXISTS) - return rv; - -diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp ---- a/toolkit/xre/nsXREDirProvider.cpp -+++ b/toolkit/xre/nsXREDirProvider.cpp -@@ -1170,18 +1170,32 @@ nsXREDirProvider::GetUserDataDirectoryHo - #elif defined(MOZ_WIDGET_GONK) - rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true, - getter_AddRefs(localDir)); - #elif defined(XP_UNIX) - const char* homeDir = getenv("HOME"); - if (!homeDir || !*homeDir) - return NS_ERROR_FAILURE; - -- rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, -- getter_AddRefs(localDir)); -+ if (aLocal) { -+ // If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache. -+ const char* cacheHome = getenv("XDG_CACHE_HOME"); -+ if (cacheHome && *cacheHome) { -+ rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true, -+ getter_AddRefs(localDir)); -+ } else { -+ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, -+ getter_AddRefs(localDir)); -+ if (NS_SUCCEEDED(rv)) -+ rv = localDir->AppendNative(NS_LITERAL_CSTRING(".cache")); -+ } -+ } else { -+ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, -+ getter_AddRefs(localDir)); -+ } - #else - #error "Don't know how to get product dir on your platform" - #endif - - NS_IF_ADDREF(*aFile = localDir); - return rv; - } - -@@ -1256,17 +1270,17 @@ nsXREDirProvider::GetUserDataDirectory(n - const nsACString* aProfileName, - const nsACString* aAppName, - const nsACString* aVendorName) - { - nsCOMPtr localDir; - nsresult rv = GetUserDataDirectoryHome(getter_AddRefs(localDir), aLocal); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName); -+ rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName, aLocal); - NS_ENSURE_SUCCESS(rv, rv); - - #ifdef DEBUG_jungshik - nsAutoCString cwd; - localDir->GetNativePath(cwd); - printf("nsXREDirProvider::GetUserDataDirectory: %s\n", cwd.get()); - #endif - rv = EnsureDirectoryExists(localDir); -@@ -1377,17 +1391,18 @@ nsXREDirProvider::AppendSysUserExtension - return NS_OK; - } - - - nsresult - nsXREDirProvider::AppendProfilePath(nsIFile* aFile, - const nsACString* aProfileName, - const nsACString* aAppName, -- const nsACString* aVendorName) -+ const nsACString* aVendorName, -+ bool aLocal) - { - NS_ASSERTION(aFile, "Null pointer!"); - - if (!gAppData) { - return NS_ERROR_FAILURE; - } - - nsAutoCString profile; -@@ -1439,28 +1454,31 @@ nsXREDirProvider::AppendProfilePath(nsIF - // The parent of this directory is set in GetUserDataDirectoryHome - // XXX: handle gAppData->profile properly - // XXXsmaug ...and the rest of the profile creation! - MOZ_ASSERT(!aAppName, - "Profile creation for external applications is not implemented!"); - rv = aFile->AppendNative(nsDependentCString("mozilla")); - NS_ENSURE_SUCCESS(rv, rv); - #elif defined(XP_UNIX) -- // Make it hidden (i.e. using the ".") -- nsAutoCString folder("."); -+ nsAutoCString folder; -+ // Make it hidden (by starting with "."), except when local (the -+ // profile is already under ~/.cache or XDG_CACHE_HOME). -+ if (!aLocal) -+ folder.Assign('.'); - - if (!profile.IsEmpty()) { - // Skip any leading path characters - const char* profileStart = profile.get(); - while (*profileStart == '/' || *profileStart == '\\') - profileStart++; - - // On the off chance that someone wanted their folder to be hidden don't - // let it become ".." -- if (*profileStart == '.') -+ if (*profileStart == '.' && !aLocal) - profileStart++; - - folder.Append(profileStart); - ToLowerCase(folder); - - rv = AppendProfileString(aFile, folder.BeginReading()); - } - else { -diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h ---- a/toolkit/xre/nsXREDirProvider.h -+++ b/toolkit/xre/nsXREDirProvider.h -@@ -109,17 +109,18 @@ protected: - static nsresult EnsureDirectoryExists(nsIFile* aDirectory); - void EnsureProfileFileExists(nsIFile* aFile); - - // Determine the profile path within the UAppData directory. This is different - // on every major platform. - static nsresult AppendProfilePath(nsIFile* aFile, - const nsACString* aProfileName, - const nsACString* aAppName, -- const nsACString* aVendorName); -+ const nsACString* aVendorName, -+ bool aLocal); - - static nsresult AppendSysUserExtensionPath(nsIFile* aFile); - - // Internal helper that splits a path into components using the '/' and '\\' - // delimiters. - static inline nsresult AppendProfileString(nsIFile* aFile, const char* aPath); - - // Calculate and register extension and theme bundle directories. -# HG changeset patch -# User Tim Taubert -# Date 1360362227 -3600 -# Node ID 873170d2679ac23114f22543cee3214a940abef3 -Bug 239254 - [Linux] Migrate existing thumbnails to their new local path - -diff --git a/browser/components/thumbnails/PageThumbs.jsm b/browser/components/thumbnails/PageThumbs.jsm ---- a/browser/components/thumbnails/PageThumbs.jsm -+++ b/browser/components/thumbnails/PageThumbs.jsm -@@ -7,17 +7,17 @@ - this.EXPORTED_SYMBOLS = ["PageThumbs", "PageThumbsStorage"]; - - const Cu = Components.utils; - const Cc = Components.classes; - const Ci = Components.interfaces; - - const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; - const PREF_STORAGE_VERSION = "browser.pagethumbnails.storage_version"; --const LATEST_STORAGE_VERSION = 2; -+const LATEST_STORAGE_VERSION = 3; - - const EXPIRATION_MIN_CHUNK_SIZE = 50; - const EXPIRATION_INTERVAL_SECS = 3600; - - /** - * Name of the directory in the profile that contains the thumbnails. - */ - const THUMBNAIL_DIRECTORY = "thumbnails"; -@@ -359,47 +359,51 @@ let PageThumbsStorageMigrator = { - - set currentVersion(aVersion) { - Services.prefs.setIntPref(PREF_STORAGE_VERSION, aVersion); - }, - - migrate: function Migrator_migrate() { - let version = this.currentVersion; - -- if (version < 1) { -- this.removeThumbnailsFromRoamingProfile(); -- } -- if (version < 2) { -- this.renameThumbnailsFolder(); -+ // Storage version 1 never made it to beta. -+ // At the time of writing only Windows had (ProfD != ProfLD) and we -+ // needed to move thumbnails from the roaming profile to the locale -+ // one so that they're not needlessly included in backups and/or -+ // written via SMB. -+ -+ // Storage version 2 also never made it to beta. -+ // The thumbnail folder structure has been changed and old thumbnails -+ // were not migrated. Instead, we just renamed the current folder to -+ // "-old" and will remove it later. -+ -+ if (version < 3) { -+ this.migrateToVersion3(); - } - - this.currentVersion = LATEST_STORAGE_VERSION; - }, - -- removeThumbnailsFromRoamingProfile: -- function Migrator_removeThumbnailsFromRoamingProfile() { -- let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]); -+ /** -+ * Bug 239254 added support for having the disk cache and thumbnail -+ * directories on a local path (i.e. ~/.cache/) under Linux. We'll first -+ * try to move the old thumbnails to their new location. If that's not -+ * possible (because ProfD might be on a different file system than -+ * ProfLD) we'll just discard them. -+ */ -+ migrateToVersion3: function Migrator_migrateToVersion3() { -+ let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY], true); - let roaming = FileUtils.getDir("ProfD", [THUMBNAIL_DIRECTORY]); - -- if (!roaming.equals(local) && roaming.exists()) { -- roaming.followLinks = false; -- try { -- roaming.remove(true); -- } catch (e) { -- // The directory might not exist or we're not permitted to remove it. -- } -- } -- }, -- -- renameThumbnailsFolder: function Migrator_renameThumbnailsFolder() { -- let dir = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]); -- try { -- dir.moveTo(null, dir.leafName + "-old"); -- } catch (e) { -- // The directory might not exist or we're not permitted to rename it. -+ if (!roaming.equals(local)) { -+ PageThumbsWorker.postMessage({ -+ type: "moveOrDeleteAllThumbnails", -+ from: roaming.path, -+ to: local.path -+ }); - } - } - }; - - let PageThumbsExpiration = { - _filters: [], - - init: function Expiration_init() { -diff --git a/browser/components/thumbnails/PageThumbsWorker.js b/browser/components/thumbnails/PageThumbsWorker.js ---- a/browser/components/thumbnails/PageThumbsWorker.js -+++ b/browser/components/thumbnails/PageThumbsWorker.js -@@ -20,16 +20,19 @@ let PageThumbsWorker = { - - switch (msg.type) { - case "removeFile": - data.result = this.removeFile(msg); - break; - case "expireFilesInDirectory": - data.result = this.expireFilesInDirectory(msg); - break; -+ case "moveOrDeleteAllThumbnails": -+ data.result = this.moveOrDeleteAllThumbnails(msg); -+ break; - default: - data.result = false; - data.detail = "message not understood"; - break; - } - - self.postMessage(data); - }, -@@ -62,12 +65,35 @@ let PageThumbsWorker = { - getFileEntriesInDirectory: - function Worker_getFileEntriesInDirectory(aPath, aSkipFiles) { - let skip = new Set(aSkipFiles); - let iter = new OS.File.DirectoryIterator(aPath); - - return [entry - for (entry in iter) - if (!entry.isDir && !entry.isSymLink && !skip.has(entry.name))]; -+ }, -+ -+ moveOrDeleteAllThumbnails: -+ function Worker_moveOrDeleteAllThumbnails(msg) { -+ if (!OS.File.exists(msg.from)) -+ return true; -+ -+ let iter = new OS.File.DirectoryIterator(msg.from); -+ for (let entry in iter) { -+ if (!entry.isDir && !entry.isSymLink) { -+ let from = OS.Path.join(msg.from, entry.name); -+ let to = OS.Path.join(msg.to, entry.name); -+ -+ try { -+ OS.File.move(from, to, {noOverwrite: true, noCopy: true}); -+ } catch (e) { -+ OS.File.remove(from); -+ } -+ } -+ } -+ -+ OS.File.removeEmptyDir(msg.from); -+ return true; - } - }; - - self.onmessage = PageThumbsWorker.handleMessage.bind(PageThumbsWorker); diff --git a/mozilla-791626.patch b/mozilla-791626.patch deleted file mode 100644 index c2e77ab..0000000 --- a/mozilla-791626.patch +++ /dev/null @@ -1,46 +0,0 @@ -# HG changeset patch -# Parent 3523e7f7a89d7933c5f1dc8f5f22559b48ec44c4 -diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp ---- a/netwerk/base/src/nsIOService.cpp -+++ b/netwerk/base/src/nsIOService.cpp -@@ -818,17 +818,18 @@ nsIOService::PrefsChanged(nsIPrefBranch - if (NS_SUCCEEDED(rv)) { - if (mSocketTransportService) - mSocketTransportService->SetAutodialEnabled(enableAutodial); - } - } - - if (!pref || strcmp(pref, MANAGE_OFFLINE_STATUS_PREF) == 0) { - bool manage; -- if (NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, -+ if (mNetworkLinkServiceInitialized && -+ NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, - &manage))) - SetManageOfflineStatus(manage); - } - - if (!pref || strcmp(pref, NECKO_BUFFER_CACHE_COUNT_PREF) == 0) { - int32_t count; - if (NS_SUCCEEDED(prefs->GetIntPref(NECKO_BUFFER_CACHE_COUNT_PREF, - &count))) -@@ -928,16 +929,20 @@ nsIOService::Observe(nsISupports *subjec - } - else if (!strcmp(topic, kProfileDoChange)) { - if (data && NS_LITERAL_STRING("startup").Equals(data)) { - // Lazy initialization of network link service (see bug 620472) - InitializeNetworkLinkService(); - // Set up the initilization flag regardless the actuall result. - // If we fail here, we will fail always on. - mNetworkLinkServiceInitialized = true; -+ // And now reflect the preference setting -+ nsCOMPtr prefBranch; -+ GetPrefBranch(getter_AddRefs(prefBranch)); -+ PrefsChanged(prefBranch, MANAGE_OFFLINE_STATUS_PREF); - } - } - else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { - // Remember we passed XPCOM shutdown notification to prevent any - // changes of the offline status from now. We must not allow going - // online after this point. - mShutdown = true; - diff --git a/rhbz-304121.patch b/rhbz-304121.patch deleted file mode 100644 index d8d8ac3..0000000 --- a/rhbz-304121.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.rhbz-304121 xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py ---- xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.rhbz-304121 2013-03-26 23:17:58.000000000 +0100 -+++ xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-04-01 11:11:56.938411785 +0200 -@@ -377,7 +377,7 @@ class MakefileGenerator(object): - WriteMakefile(output_file, data, build_file, depth, top, - # we set srcdir up one directory, since the subdir - # doesn't actually exist in the source directory -- swapslashes(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0])), -+ swapslashes(os.path.normpath(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0]))), - self.relative_srcdir, - self.common_mk_path) - return True diff --git a/sources b/sources index 1dbc77f..4ae848e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e664416da2075f13089fe3e883cadb73 firefox-20.0.source.tar.bz2 +6e2510e9466b280c367de0e4c05a8840 firefox-21.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 91c5e9d..5a456e8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,8 +75,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 20.0 -Release: 4%{?pre_tag}%{?dist} +Version: 21.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -93,7 +93,6 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-16.0-jemalloc-ppc.patch -Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -101,8 +100,6 @@ Patch21: rhbz-911314.patch Patch22: rhbz-928353.patch # Upstream patches -Patch101: mozilla-791626.patch -Patch102: mozilla-239254.patch Patch104: mozilla-844883.patch # --------------------------------------------------- @@ -231,7 +228,6 @@ cd %{tarballdir} %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc -%patch19 -p2 -b .rhbz-304121 %patch20 -p2 -b .pk %ifarch ppc ppc64 @@ -245,9 +241,6 @@ cd %{tarballdir} %endif %endif -%patch101 -p1 -b .791626 -%patch102 -p1 -b .239254 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig %if %{enable_mozilla_crashreporter} @@ -528,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun May 12 2013 Martin Stransky - 21.0-1 +- Update to latest upstream (21.0) + * Fri Apr 5 2013 Martin Stransky - 20.0-4 - Updated rhbz-911314.patch for xulrunner 20 From 1a886127f7f6c4e10cdda5b1e10e5f0d8be84441 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2013 08:24:17 +0200 Subject: [PATCH 354/486] Updated requested NSS/NSPR versions --- xulrunner.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 5a456e8..933822c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,9 +21,9 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9.3 +%global nspr_version 4.9.6 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.14.1 +%global nss_version 3.14.3 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 13 2013 Martin Stransky - 21.0-2 +- Updated requested NSS/NSPR versions + * Sun May 12 2013 Martin Stransky - 21.0-1 - Update to latest upstream (21.0) From b2577c78d8cbdd7a6977975600b0a2ae5c87c0cd Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2013 09:04:05 +0200 Subject: [PATCH 355/486] Updated gcc workaround patch --- rhbz-928353.patch | 108 ++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 70 deletions(-) diff --git a/rhbz-928353.patch b/rhbz-928353.patch index 14a5ba1..00d8e67 100644 --- a/rhbz-928353.patch +++ b/rhbz-928353.patch @@ -1,86 +1,62 @@ -diff -r -U2 xulrunner-20.0/mozilla-release/config/Makefile.in xulrunner-20.0.new/mozilla-release/config/Makefile.in ---- xulrunner-20.0/mozilla-release/config/Makefile.in 2013-03-26 18:17:37.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/config/Makefile.in 2013-03-30 01:50:11.109526990 -0400 -@@ -38,5 +38,5 @@ +diff -up xulrunner-21.0/mozilla-release/config/Makefile.in.old xulrunner-21.0/mozilla-release/config/Makefile.in +--- xulrunner-21.0/mozilla-release/config/Makefile.in.old 2013-05-11 21:19:23.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/config/Makefile.in 2013-05-13 08:53:03.351969145 +0200 +@@ -37,7 +37,7 @@ override NSBUILDROOT := + endif ifdef GNU_CC -MODULE_OPTIMIZE_FLAGS = -O3 +MODULE_OPTIMIZE_FLAGS = -Os endif -diff -r -U2 xulrunner-20.0/mozilla-release/configure.in xulrunner-20.0.new/mozilla-release/configure.in ---- xulrunner-20.0/mozilla-release/configure.in 2013-03-26 18:17:37.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/configure.in 2013-03-30 01:50:03.474547207 -0400 -@@ -1848,5 +1848,5 @@ - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" - HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" - ;; - -@@ -1854,5 +1854,5 @@ + include $(topsrcdir)/config/config.mk +diff -up xulrunner-21.0/mozilla-release/configure.in.old xulrunner-21.0/mozilla-release/configure.in +--- xulrunner-21.0/mozilla-release/configure.in.old 2013-05-11 21:19:23.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/configure.in 2013-05-13 09:02:12.931823544 +0200 +@@ -1791,7 +1791,7 @@ case "$host" in + *-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' - HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" ;; -@@ -1961,5 +1961,5 @@ - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' -- MOZ_OPTIMIZE_FLAGS="-O3" -+ MOZ_OPTIMIZE_FLAGS="-Os" - _PEDANTIC= - # Statically disable jemalloc on 10.5 and 32-bit 10.6. See bug 702250. -@@ -2106,5 +2106,5 @@ + *os2*) +@@ -2041,7 +2041,7 @@ ia64*-hpux*) + # -Os is broken on gcc 4.5.x we need to tweak it to get good results. MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" esac - MOZ_PGO_OPTIMIZE_FLAGS="-O3" + MOZ_PGO_OPTIMIZE_FLAGS="-Os" MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" MOZ_DEBUG_FLAGS="-g" -diff -r -U2 xulrunner-20.0/mozilla-release/js/src/config/Makefile.in xulrunner-20.0.new/mozilla-release/js/src/config/Makefile.in ---- xulrunner-20.0/mozilla-release/js/src/config/Makefile.in 2013-03-26 18:17:46.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/js/src/config/Makefile.in 2013-03-30 01:51:03.443862662 -0400 -@@ -27,5 +27,5 @@ + fi +diff -up xulrunner-21.0/mozilla-release/js/src/config/Makefile.in.old xulrunner-21.0/mozilla-release/js/src/config/Makefile.in +--- xulrunner-21.0/mozilla-release/js/src/config/Makefile.in.old 2013-05-11 21:19:32.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/config/Makefile.in 2013-05-13 08:53:03.353969129 +0200 +@@ -26,7 +26,7 @@ override NSBUILDROOT := + endif ifdef GNU_CC -MODULE_OPTIMIZE_FLAGS = -O3 +MODULE_OPTIMIZE_FLAGS = -Os endif -diff -r -U2 xulrunner-20.0/mozilla-release/js/src/configure.in xulrunner-20.0.new/mozilla-release/js/src/configure.in ---- xulrunner-20.0/mozilla-release/js/src/configure.in 2013-03-26 18:17:46.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/js/src/configure.in 2013-03-30 01:50:46.254052920 -0400 -@@ -1443,5 +1443,5 @@ - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" - HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" - ;; - -@@ -1449,5 +1449,5 @@ + include $(topsrcdir)/config/config.mk +diff -up xulrunner-21.0/mozilla-release/js/src/configure.in.old xulrunner-21.0/mozilla-release/js/src/configure.in +--- xulrunner-21.0/mozilla-release/js/src/configure.in.old 2013-05-11 21:19:32.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/configure.in 2013-05-13 09:00:24.431225716 +0200 +@@ -1391,7 +1391,7 @@ case "$host" in + *-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' - HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" ;; -@@ -1554,5 +1554,5 @@ - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' -- MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector" -+ MOZ_OPTIMIZE_FLAGS="-Os -fno-stack-protector" - _PEDANTIC= - CFLAGS="$CFLAGS -fno-common" -@@ -1648,5 +1648,5 @@ - - MOZ_GFX_OPTIMIZE_MOBILE=1 -- MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks -fno-reorder-functions" -+ MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions" - # The Maemo builders don't know about this flag - MOZ_ARM_VFP_FLAGS="-mfpu=vfp" -@@ -1668,6 +1668,6 @@ + *os2*) +@@ -1596,8 +1596,8 @@ ia64*-hpux*) + # -Os is broken on gcc 4.5.x we need to tweak it to get good results. MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" esac - MOZ_PGO_OPTIMIZE_FLAGS="-O3" @@ -89,26 +65,18 @@ diff -r -U2 xulrunner-20.0/mozilla-release/js/src/configure.in xulrunner-20.0.ne + MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" MOZ_DEBUG_FLAGS="-g" fi -diff -r -U2 xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure ---- xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure 2013-03-26 18:17:58.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure 2013-03-30 01:51:38.533133311 -0400 -@@ -5279,7 +5279,7 @@ - TCFLAGS="${CFLAGS}" - if test "x${CFLAGS}" = "x" ; then -- CFLAGS="-O3" -+ CFLAGS="-Os" - else -- CFLAGS="${CFLAGS} -O3" -+ CFLAGS="${CFLAGS} -Os" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -diff -r -U2 xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure.ac xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure.ac ---- xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure.ac 2013-03-26 18:17:58.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure.ac 2013-03-30 01:51:15.753872639 -0400 -@@ -574,5 +574,5 @@ + +diff -up xulrunner-21.0/mozilla-release/media/webrtc/trunk/Makefile.old xulrunner-21.0/mozilla-release/media/webrtc/trunk/Makefile +diff -up xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac.old xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac +--- xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac.old 2013-05-11 21:19:46.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac 2013-05-13 08:53:03.355969113 +0200 +@@ -573,7 +573,7 @@ if test "x$enable_debug" = "x0" -a "x$no + echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes" if test "x${optimize}" = "xyes" ; then if test "x$GCC" = "xyes" ; then - JE_CFLAGS_APPEND([-O3]) + JE_CFLAGS_APPEND([-Os]) JE_CFLAGS_APPEND([-funroll-loops]) elif test "x$je_cv_msvc" = "xyes" ; then + JE_CFLAGS_APPEND([-O2]) +diff -up xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.old xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure From e404a52b7e7a3cb8a4ddeb02ec61766dd32fc54c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2013 12:20:57 +0200 Subject: [PATCH 356/486] New upstream tarball (build 4) --- sources | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 4ae848e..ef565ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e2510e9466b280c367de0e4c05a8840 firefox-21.0.source.tar.bz2 +d3906a3033b4084cade8cb81fa984eb4 firefox-21.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 933822c..dcb2b8a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 13 2013 Martin Stransky - 21.0-3 +- New upstream tarball (build 4) + * Mon May 13 2013 Martin Stransky - 21.0-2 - Updated requested NSS/NSPR versions From 50bcf53640ce5d123973bead893bc0591177a30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 20 May 2013 21:47:28 +0200 Subject: [PATCH 357/486] fix inlining issue on s390 (32-bit) --- xulrunner-21.0-s390-inlines.patch | 12 ++++++++++++ xulrunner.spec | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 xulrunner-21.0-s390-inlines.patch diff --git a/xulrunner-21.0-s390-inlines.patch b/xulrunner-21.0-s390-inlines.patch new file mode 100644 index 0000000..cf2b0ca --- /dev/null +++ b/xulrunner-21.0-s390-inlines.patch @@ -0,0 +1,12 @@ +diff -up mozilla-release/js/src/vm/SPSProfiler.cpp.jscntxt mozilla-release/js/src/vm/SPSProfiler.cpp +--- mozilla-release/js/src/vm/SPSProfiler.cpp.jscntxt 2013-05-20 11:46:14.736790245 -0400 ++++ mozilla-release/js/src/vm/SPSProfiler.cpp 2013-05-20 11:38:20.696788904 -0400 +@@ -10,6 +10,8 @@ + #include "jsnum.h" + #include "jsscript.h" + ++#include "jscntxtinlines.h" ++ + #include "methodjit/MethodJIT.h" + #include "methodjit/Compiler.h" + diff --git a/xulrunner.spec b/xulrunner.spec index dcb2b8a..bde8301 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -93,6 +93,8 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-16.0-jemalloc-ppc.patch +# workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) +Patch19: xulrunner-21.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -228,6 +230,7 @@ cd %{tarballdir} %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc +%patch19 -p1 -b .s390-inlines %patch20 -p2 -b .pk %ifarch ppc ppc64 From e958266d9286302dac1c48ae004e7b4ba640fe33 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 May 2013 14:13:30 +0200 Subject: [PATCH 358/486] Added s390(x) patch --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index bde8301..03707d9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -524,6 +524,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 21 2013 Martin Stransky - 21.0-4 +- Added s390(x) patch + * Mon May 13 2013 Martin Stransky - 21.0-3 - New upstream tarball (build 4) From bd2669f723c47d6232e27a588a5b29fa68a7000b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 May 2013 23:26:47 +0200 Subject: [PATCH 359/486] Added ppc(64) patches (rhbz#963907) --- rhbz-911314.patch | 133 +++++++++++++++++++++------------------------- xulrunner.spec | 11 +++- 2 files changed, 69 insertions(+), 75 deletions(-) diff --git a/rhbz-911314.patch b/rhbz-911314.patch index 82f245a..9a28aaa 100644 --- a/rhbz-911314.patch +++ b/rhbz-911314.patch @@ -1,14 +1,35 @@ -Use the runtime page size to control arena decommit (RHBZ#911314) -Return success when decommit is disabled - -Author: Gustavo Luiz Duarte -Based on Terrence Cole's patch v0 on MOZ#840242 - -Index: mozilla-release/js/src/gc/Heap.h -=================================================================== ---- mozilla-release.orig/js/src/gc/Heap.h -+++ mozilla-release/js/src/gc/Heap.h -@@ -800,7 +800,7 @@ struct Chunk +diff -up xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc xulrunner-21.0/mozilla-release/js/public/HeapAPI.h +--- xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc 2013-05-12 23:56:19.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/public/HeapAPI.h 2013-05-21 23:14:04.698238150 +0200 +@@ -11,24 +11,7 @@ + namespace js { + namespace gc { + +-/* +- * Page size must be static to support our arena pointer optimizations, so we +- * are forced to support each platform with non-4096 pages as a special case. +- * Note: The freelist supports a maximum arena shift of 15. +- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. +- */ +-#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ +- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) +-const size_t PageShift = 13; +-const size_t ArenaShift = PageShift; +-#elif defined(__powerpc64__) +-const size_t PageShift = 16; + const size_t ArenaShift = 12; +-#else +-const size_t PageShift = 12; +-const size_t ArenaShift = PageShift; +-#endif +-const size_t PageSize = size_t(1) << PageShift; + const size_t ArenaSize = size_t(1) << ArenaShift; + const size_t ArenaMask = ArenaSize - 1; + +diff -up xulrunner-21.0/mozilla-release/js/src/gc/Heap.h.ppc xulrunner-21.0/mozilla-release/js/src/gc/Heap.h +--- xulrunner-21.0/mozilla-release/js/src/gc/Heap.h.ppc 2013-05-12 23:56:19.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/gc/Heap.h 2013-05-21 23:14:04.693238124 +0200 +@@ -812,7 +812,7 @@ struct Chunk /* Search for a decommitted arena to allocate. */ unsigned findDecommittedArenaOffset(); @@ -17,10 +38,9 @@ Index: mozilla-release/js/src/gc/Heap.h public: /* Unlink and return the freeArenasHead. */ -Index: mozilla-release/js/src/gc/Memory.cpp -=================================================================== ---- mozilla-release.orig/js/src/gc/Memory.cpp -+++ mozilla-release/js/src/gc/Memory.cpp +diff -up xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp.ppc xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp +--- xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp.ppc 2013-05-12 23:56:19.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp 2013-05-21 23:14:04.693238124 +0200 @@ -8,6 +8,7 @@ #include "mozilla/Assertions.h" @@ -329,10 +349,9 @@ Index: mozilla-release/js/src/gc/Memory.cpp return true; } -Index: mozilla-release/js/src/gc/Memory.h -=================================================================== ---- mozilla-release.orig/js/src/gc/Memory.h -+++ mozilla-release/js/src/gc/Memory.h +diff -up xulrunner-21.0/mozilla-release/js/src/gc/Memory.h.ppc xulrunner-21.0/mozilla-release/js/src/gc/Memory.h +--- xulrunner-21.0/mozilla-release/js/src/gc/Memory.h.ppc 2013-05-12 23:56:19.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/gc/Memory.h 2013-05-21 23:14:04.693238124 +0200 @@ -16,20 +16,20 @@ namespace gc { // Sanity check that our compiled configuration matches the currently running @@ -359,11 +378,10 @@ Index: mozilla-release/js/src/gc/Memory.h // Returns #(hard faults) + #(soft faults) size_t GetPageFaultCount(); -Index: mozilla-release/js/src/jsapi.cpp -=================================================================== ---- mozilla-release.orig/js/src/jsapi.cpp -+++ mozilla-release/js/src/jsapi.cpp -@@ -1113,8 +1113,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe +diff -up xulrunner-21.0/mozilla-release/js/src/jsapi.cpp.ppc xulrunner-21.0/mozilla-release/js/src/jsapi.cpp +--- xulrunner-21.0/mozilla-release/js/src/jsapi.cpp.ppc 2013-05-12 23:56:21.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/jsapi.cpp 2013-05-21 23:14:04.695238134 +0200 +@@ -1110,8 +1110,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe #undef MSG_DEF #endif /* DEBUG */ @@ -372,11 +390,10 @@ Index: mozilla-release/js/src/jsapi.cpp if (!js::TlsPerThreadData.init()) return NULL; -Index: mozilla-release/js/src/jscntxt.h -=================================================================== ---- mozilla-release.orig/js/src/jscntxt.h -+++ mozilla-release/js/src/jscntxt.h -@@ -873,6 +873,15 @@ struct JSRuntime : js::RuntimeFriendFiel +diff -up xulrunner-21.0/mozilla-release/js/src/jscntxt.h.ppc xulrunner-21.0/mozilla-release/js/src/jscntxt.h +--- xulrunner-21.0/mozilla-release/js/src/jscntxt.h.ppc 2013-05-12 23:56:21.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/jscntxt.h 2013-05-21 23:14:04.696238140 +0200 +@@ -1026,6 +1026,15 @@ struct JSRuntime : js::RuntimeFriendFiel /* Stack of thread-stack-allocated GC roots. */ js::AutoGCRooter *autoGCRooters; @@ -392,11 +409,10 @@ Index: mozilla-release/js/src/jscntxt.h /* Strong references on scripts held for PCCount profiling API. */ js::ScriptAndCountsVector *scriptAndCountsVector; -Index: mozilla-release/js/src/jsgc.cpp -=================================================================== ---- mozilla-release.orig/js/src/jsgc.cpp -+++ mozilla-release/js/src/jsgc.cpp -@@ -477,13 +477,13 @@ FinalizeArenas(FreeOp *fop, +diff -up xulrunner-21.0/mozilla-release/js/src/jsgc.cpp.ppc xulrunner-21.0/mozilla-release/js/src/jsgc.cpp +--- xulrunner-21.0/mozilla-release/js/src/jsgc.cpp.ppc 2013-05-12 23:56:21.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/jsgc.cpp 2013-05-21 23:15:40.198740765 +0200 +@@ -465,13 +465,13 @@ FinalizeArenas(FreeOp *fop, } static inline Chunk * @@ -414,7 +430,7 @@ Index: mozilla-release/js/src/jsgc.cpp } inline bool -@@ -573,25 +573,25 @@ ChunkPool::expire(JSRuntime *rt, bool re +@@ -561,25 +561,25 @@ ChunkPool::expire(JSRuntime *rt, bool re } static void @@ -444,7 +460,7 @@ Index: mozilla-release/js/src/jsgc.cpp #ifdef JSGC_ROOT_ANALYSIS // Our poison pointers are not guaranteed to be invalid on 64-bit -@@ -604,7 +604,7 @@ Chunk::allocate(JSRuntime *rt) +@@ -592,7 +592,7 @@ Chunk::allocate(JSRuntime *rt) // were marked as uncommitted, but it's a little complicated to avoid // clobbering pre-existing unrelated mappings. while (IsPoisonedPtr(chunk)) @@ -453,7 +469,7 @@ Index: mozilla-release/js/src/jsgc.cpp #endif if (!chunk) -@@ -620,7 +620,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu +@@ -608,7 +608,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu { JS_ASSERT(chunk); chunk->prepareToBeFreed(rt); @@ -462,7 +478,7 @@ Index: mozilla-release/js/src/jsgc.cpp } inline void -@@ -736,7 +736,7 @@ Chunk::findDecommittedArenaOffset() +@@ -725,7 +725,7 @@ Chunk::findDecommittedArenaOffset() } ArenaHeader * @@ -471,7 +487,7 @@ Index: mozilla-release/js/src/jsgc.cpp { JS_ASSERT(info.numArenasFreeCommitted == 0); JS_ASSERT(info.numArenasFree > 0); -@@ -747,7 +747,7 @@ Chunk::fetchNextDecommittedArena() +@@ -736,7 +736,7 @@ Chunk::fetchNextDecommittedArena() decommittedArenas.unset(offset); Arena *arena = &arenas[offset]; @@ -480,16 +496,16 @@ Index: mozilla-release/js/src/jsgc.cpp arena->aheader.setAsNotAllocated(); return &arena->aheader; -@@ -781,7 +781,7 @@ Chunk::allocateArena(JSCompartment *comp +@@ -770,7 +770,7 @@ Chunk::allocateArena(Zone *zone, AllocKi ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0) ? fetchNextFreeArena(rt) - : fetchNextDecommittedArena(); + : fetchNextDecommittedArena(rt); - aheader->init(comp, thingKind); + aheader->init(zone, thingKind); if (JS_UNLIKELY(!hasAvailableArenas())) removeFromAvailableList(); -@@ -881,6 +881,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ +@@ -937,6 +937,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ JSBool js_InitGC(JSRuntime *rt, uint32_t maxbytes) { @@ -498,7 +514,7 @@ Index: mozilla-release/js/src/jsgc.cpp if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) return false; -@@ -1969,7 +1971,7 @@ DecommitArenasFromAvailableList(JSRuntim +@@ -2102,7 +2104,7 @@ DecommitArenasFromAvailableList(JSRuntim Maybe maybeUnlock; if (!rt->isHeapBusy()) maybeUnlock.construct(rt); @@ -507,7 +523,7 @@ Index: mozilla-release/js/src/jsgc.cpp } if (ok) { -@@ -2037,7 +2039,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo +@@ -2170,7 +2172,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo { if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { AutoUnlockGC unlock(rt); @@ -516,32 +532,3 @@ Index: mozilla-release/js/src/jsgc.cpp } if (shouldShrink) -Index: mozilla-release/js/public/HeapAPI.h -=================================================================== ---- mozilla-release.orig/js/public/HeapAPI.h -+++ mozilla-release/js/public/HeapAPI.h -@@ -13,24 +13,7 @@ - namespace js { - namespace gc { - --/* -- * Page size must be static to support our arena pointer optimizations, so we -- * are forced to support each platform with non-4096 pages as a special case. -- * Note: The freelist supports a maximum arena shift of 15. -- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. -- */ --#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ -- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) --const size_t PageShift = 13; --const size_t ArenaShift = PageShift; --#elif defined(__powerpc64__) --const size_t PageShift = 16; - const size_t ArenaShift = 12; --#else --const size_t PageShift = 12; --const size_t ArenaShift = PageShift; --#endif --const size_t PageSize = size_t(1) << PageShift; - const size_t ArenaSize = size_t(1) << ArenaShift; - const size_t ArenaMask = ArenaSize - 1; - diff --git a/xulrunner.spec b/xulrunner.spec index 03707d9..231246b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -100,6 +100,7 @@ Patch19: xulrunner-21.0-s390-inlines.patch Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch Patch22: rhbz-928353.patch +Patch23: mozilla-851850.patch # Upstream patches Patch104: mozilla-844883.patch @@ -233,11 +234,14 @@ cd %{tarballdir} %patch19 -p1 -b .s390-inlines %patch20 -p2 -b .pk + %ifarch ppc ppc64 -%patch21 -p1 -b .ppc +%patch21 -p2 -b .ppc +%patch23 -p1 -b .851850 %patch104 -p1 -b .844883 %endif + %if 0%{?fedora} >= 19 %ifarch %{ix86} %patch22 -p2 @@ -524,6 +528,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 21 2013 Martin Stransky - 21.0-5 +- Added ppc(64) patches (rhbz#963907) + * Tue May 21 2013 Martin Stransky - 21.0-4 - Added s390(x) patch From 052f8ddfeddec514b2a257618493cd70fabf9ff7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 May 2013 23:27:33 +0200 Subject: [PATCH 360/486] new line removal --- xulrunner.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 231246b..6edbc86 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -241,7 +241,6 @@ cd %{tarballdir} %patch104 -p1 -b .844883 %endif - %if 0%{?fedora} >= 19 %ifarch %{ix86} %patch22 -p2 From 2657453d6bfa6b5defc0ec5dad4dd11a8948bf4b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 May 2013 20:03:19 +0200 Subject: [PATCH 361/486] Added missing patch --- mozilla-851850.patch | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 mozilla-851850.patch diff --git a/mozilla-851850.patch b/mozilla-851850.patch new file mode 100644 index 0000000..04260b9 --- /dev/null +++ b/mozilla-851850.patch @@ -0,0 +1,31 @@ + +# HG changeset patch +# User Steve Singer +# Date 1363699875 14400 +# Node ID fe010206e5add13f4202113dcd74f54acb1e5b37 +# Parent 90c5dd3a2d1533ce2646a53c6ec84773e6f42d43 +Bug 851850 - Link in altivec on ppc64. r=jmuizelaar + +diff --git a/gfx/qcms/Makefile.in b/gfx/qcms/Makefile.in +--- a/gfx/qcms/Makefile.in ++++ b/gfx/qcms/Makefile.in +@@ -48,17 +48,17 @@ else + endif + else + SSE1_FLAGS= + SSE2_FLAGS= + endif + endif + endif + else +-ifeq (ppc,$(CPU_ARCH)) ++ifeq (ppc,$(findstring ppc,$(CPU_ARCH))) + ifdef GNU_CC + CSRCS += transform-altivec.c + ALTIVEC_FLAGS=-maltivec + endif + endif + endif + + FORCE_STATIC_LIB = 1 + From c8ab32f987e68e1f2697e5bbc6998e063321e12c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 29 May 2013 09:39:38 +0200 Subject: [PATCH 362/486] Removed the i686/f19 gcc hack (rhbz#928353) --- rhbz-928353.patch | 82 ----------------------------------------------- xulrunner.spec | 12 +++---- 2 files changed, 4 insertions(+), 90 deletions(-) delete mode 100644 rhbz-928353.patch diff --git a/rhbz-928353.patch b/rhbz-928353.patch deleted file mode 100644 index 00d8e67..0000000 --- a/rhbz-928353.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -up xulrunner-21.0/mozilla-release/config/Makefile.in.old xulrunner-21.0/mozilla-release/config/Makefile.in ---- xulrunner-21.0/mozilla-release/config/Makefile.in.old 2013-05-11 21:19:23.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/config/Makefile.in 2013-05-13 08:53:03.351969145 +0200 -@@ -37,7 +37,7 @@ override NSBUILDROOT := - endif - - ifdef GNU_CC --MODULE_OPTIMIZE_FLAGS = -O3 -+MODULE_OPTIMIZE_FLAGS = -Os - endif - - include $(topsrcdir)/config/config.mk -diff -up xulrunner-21.0/mozilla-release/configure.in.old xulrunner-21.0/mozilla-release/configure.in ---- xulrunner-21.0/mozilla-release/configure.in.old 2013-05-11 21:19:23.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/configure.in 2013-05-13 09:02:12.931823544 +0200 -@@ -1791,7 +1791,7 @@ case "$host" in - *-linux*|*-kfreebsd*-gnu|*-gnu*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" - ;; - - *os2*) -@@ -2041,7 +2041,7 @@ ia64*-hpux*) - # -Os is broken on gcc 4.5.x we need to tweak it to get good results. - MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" - esac -- MOZ_PGO_OPTIMIZE_FLAGS="-O3" -+ MOZ_PGO_OPTIMIZE_FLAGS="-Os" - MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" - MOZ_DEBUG_FLAGS="-g" - fi -diff -up xulrunner-21.0/mozilla-release/js/src/config/Makefile.in.old xulrunner-21.0/mozilla-release/js/src/config/Makefile.in ---- xulrunner-21.0/mozilla-release/js/src/config/Makefile.in.old 2013-05-11 21:19:32.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/config/Makefile.in 2013-05-13 08:53:03.353969129 +0200 -@@ -26,7 +26,7 @@ override NSBUILDROOT := - endif - - ifdef GNU_CC --MODULE_OPTIMIZE_FLAGS = -O3 -+MODULE_OPTIMIZE_FLAGS = -Os - endif - - include $(topsrcdir)/config/config.mk -diff -up xulrunner-21.0/mozilla-release/js/src/configure.in.old xulrunner-21.0/mozilla-release/js/src/configure.in ---- xulrunner-21.0/mozilla-release/js/src/configure.in.old 2013-05-11 21:19:32.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/configure.in 2013-05-13 09:00:24.431225716 +0200 -@@ -1391,7 +1391,7 @@ case "$host" in - *-linux*|*-kfreebsd*-gnu|*-gnu*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" - ;; - - *os2*) -@@ -1596,8 +1596,8 @@ ia64*-hpux*) - # -Os is broken on gcc 4.5.x we need to tweak it to get good results. - MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" - esac -- MOZ_PGO_OPTIMIZE_FLAGS="-O3" -- MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" -+ MOZ_PGO_OPTIMIZE_FLAGS="-Os" -+ MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" - MOZ_DEBUG_FLAGS="-g" - fi - -diff -up xulrunner-21.0/mozilla-release/media/webrtc/trunk/Makefile.old xulrunner-21.0/mozilla-release/media/webrtc/trunk/Makefile -diff -up xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac.old xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac ---- xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac.old 2013-05-11 21:19:46.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac 2013-05-13 08:53:03.355969113 +0200 -@@ -573,7 +573,7 @@ if test "x$enable_debug" = "x0" -a "x$no - echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes" - if test "x${optimize}" = "xyes" ; then - if test "x$GCC" = "xyes" ; then -- JE_CFLAGS_APPEND([-O3]) -+ JE_CFLAGS_APPEND([-Os]) - JE_CFLAGS_APPEND([-funroll-loops]) - elif test "x$je_cv_msvc" = "xyes" ; then - JE_CFLAGS_APPEND([-O2]) -diff -up xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.old xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure diff --git a/xulrunner.spec b/xulrunner.spec index 6edbc86..5017579 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,7 +99,6 @@ Patch19: xulrunner-21.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch -Patch22: rhbz-928353.patch Patch23: mozilla-851850.patch # Upstream patches @@ -241,12 +240,6 @@ cd %{tarballdir} %patch104 -p1 -b .844883 %endif -%if 0%{?fedora} >= 19 -%ifarch %{ix86} -%patch22 -p2 -%endif -%endif - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig %if %{enable_mozilla_crashreporter} @@ -527,6 +520,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed May 29 2013 Martin Stransky - 21.0-6 +- Removed the i686/f19 gcc hack (rhbz#928353) + * Tue May 21 2013 Martin Stransky - 21.0-5 - Added ppc(64) patches (rhbz#963907) From cf4d956b905e0c190ab373fb5c605486a9cfb967 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 3 Jun 2013 13:10:02 +0200 Subject: [PATCH 363/486] Crashreporter build flags changed --- xulrunner-mozconfig | 1 - xulrunner-mozconfig-debuginfo | 5 ----- xulrunner.spec | 9 ++++----- 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 xulrunner-mozconfig-debuginfo diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 7852dd4..9482fc9 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -20,7 +20,6 @@ ac_add_options --enable-pango ac_add_options --enable-svg ac_add_options --enable-canvas ac_add_options --disable-javaxpcom -ac_add_options --disable-crashreporter ac_add_options --enable-safe-browsing ac_add_options --enable-extensions=default ac_add_options --enable-libnotify diff --git a/xulrunner-mozconfig-debuginfo b/xulrunner-mozconfig-debuginfo deleted file mode 100644 index 4dd2427..0000000 --- a/xulrunner-mozconfig-debuginfo +++ /dev/null @@ -1,5 +0,0 @@ -# For mozilla's debuginfo: -export CFLAGS="$CFLAGS -gdwarf-2" -export CXXFLAGS="$CXXFLAGS -gdwarf-2" -export MOZ_DEBUG_SYMBOLS=1 -ac_add_options --enable-crashreporter diff --git a/xulrunner.spec b/xulrunner.spec index 5017579..7b5de8a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,13 +76,12 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.bz2 Source10: %{name}-mozconfig -Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in @@ -242,9 +241,6 @@ cd %{tarballdir} %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig -%if %{enable_mozilla_crashreporter} -%{__cat} %{SOURCE11} >> .mozconfig -%endif %if %{?system_nss} echo "ac_add_options --with-system-nspr" >> .mozconfig @@ -520,6 +516,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jun 3 2013 Jan Horak - 21.0-7 +- Using upstream build flags for crashreporter + * Wed May 29 2013 Martin Stransky - 21.0-6 - Removed the i686/f19 gcc hack (rhbz#928353) From 06dfb191830baefb784531bdf3449a1c932e4059 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 12 Jun 2013 17:35:59 +0200 Subject: [PATCH 364/486] Fixed rhbz#966424 - unable to install addons --- rhbz-966424.patch | 24 ++++++++++++++++++++++++ xulrunner.spec | 9 ++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 rhbz-966424.patch diff --git a/rhbz-966424.patch b/rhbz-966424.patch new file mode 100644 index 0000000..37ddc6e --- /dev/null +++ b/rhbz-966424.patch @@ -0,0 +1,24 @@ +diff --git a/toolkit/mozapps/shared/CertUtils.jsm b/toolkit/toolkit/mozapps/shared/CertUtils.jsm +--- a/toolkit/mozapps/shared/CertUtils.jsm ++++ b/toolkit/mozapps/shared/CertUtils.jsm +@@ -170,17 +170,19 @@ this.checkCert = + issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3); + var tokenNames = issuerCert.getAllTokenNames({}); + + if (!tokenNames || !tokenNames.some(isBuiltinToken)) + throw new Ce(certNotBuiltInErr, Cr.NS_ERROR_ABORT); + } + + function isBuiltinToken(tokenName) { +- return tokenName == "Builtin Object Token"; ++ return tokenName == "Builtin Object Token" || ++ tokenName == "Default Trust" || ++ tokenName == "System Trust"; + } + + /** + * This class implements nsIBadCertListener. Its job is to prevent "bad cert" + * security dialogs from being shown to the user. It is better to simply fail + * if the certificate is bad. See bug 304286. + * + * @param aAllowNonBuiltInCerts (optional) diff --git a/xulrunner.spec b/xulrunner.spec index 7b5de8a..249c9d1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 7%{?pre_tag}%{?dist} +Release: 8%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,6 +99,8 @@ Patch19: xulrunner-21.0-s390-inlines.patch Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch Patch23: mozilla-851850.patch +# Unable to install addons from https pages +Patch24: rhbz-966424.patch # Upstream patches Patch104: mozilla-844883.patch @@ -239,6 +241,8 @@ cd %{tarballdir} %patch104 -p1 -b .844883 %endif +%patch24 -p1 -b .966424 + %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -516,6 +520,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 12 2013 Jan Horak - 21.0-8 +- Fixed rhbz#966424 - unable to install addons + * Mon Jun 3 2013 Jan Horak - 21.0-7 - Using upstream build flags for crashreporter From 0a3e2842771f20f0be239048bb2b88221ed1589f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 21 Jun 2013 13:03:16 +0200 Subject: [PATCH 365/486] Update to latest upstream (22.0) --- mozilla-build.patch | 21 +++++++++------------ sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/mozilla-build.patch b/mozilla-build.patch index 9468e02..1dd29d0 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,20 +1,17 @@ -diff -up mozilla-aurora-7676a9a06403/security/build/Makefile.in.build mozilla-aurora-7676a9a06403/security/build/Makefile.in ---- mozilla-aurora-7676a9a06403/security/build/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200 -+++ mozilla-aurora-7676a9a06403/security/build/Makefile.in 2012-09-18 10:58:45.560063613 +0200 -@@ -139,7 +139,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +--- mozilla-release/security/build/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 ++++ mozilla-release/security/build/Makefile.in 2013-06-18 14:01:41.940378194 +0200 +@@ -133,7 +133,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 -DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1 DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" - ifndef MOZ_NATIVE_SQLITE - DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3 -diff -up mozilla-aurora-7676a9a06403/security/manager/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/Makefile.in -diff -up mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in ---- mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200 -+++ mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in 2012-09-18 10:54:16.310505794 +0200 -@@ -84,7 +84,6 @@ CSRCS += md4.c - EXTRA_DEPS = $(NSS_DEP_LIBS) + ifeq ($(OS_ARCH),WINNT) + DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t" +--- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 ++++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-06-18 14:01:18.659377663 +0200 +@@ -86,7 +86,6 @@ endif + CSRCS += md4.c DEFINES += \ - -DNSS_ENABLE_ECC \ diff --git a/sources b/sources index ef565ad..e8c6ff5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d3906a3033b4084cade8cb81fa984eb4 firefox-21.0.source.tar.bz2 +f5e67dc477e0d2f7b7d23b105047d37b firefox-22.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 249c9d1..c0fd93a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,8 +75,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 21.0 -Release: 8%{?pre_tag}%{?dist} +Version: 22.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -520,6 +520,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jun 21 2013 Martin Stransky - 22.0-1 +- Update to latest upstream (22.0) + * Wed Jun 12 2013 Jan Horak - 21.0-8 - Fixed rhbz#966424 - unable to install addons From c46ce8e0ff33e5f5f2233c7261604389b217e44c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 21 Jun 2013 14:24:16 +0200 Subject: [PATCH 366/486] removed libxpcom.so file --- xulrunner.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index c0fd93a..cfe6efd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -436,9 +436,6 @@ EOF # Install xpcshell %{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} -# Fix libxpcom.so rights -chmod 755 $RPM_BUILD_ROOT/%{mozappdir}/libxpcom.so - # Install run-mozilla.sh %{__cp} objdir/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{mozappdir} From 72979481631212d8c47565ee265da9389f8c84d4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 24 Jun 2013 13:26:24 +0200 Subject: [PATCH 367/486] Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index cfe6efd..727a526 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -517,6 +517,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jun 24 2013 Martin Stransky - 22.0-2 +- Rebuild + * Fri Jun 21 2013 Martin Stransky - 22.0-1 - Update to latest upstream (22.0) From 8f6b7dddbe790cff48cdc5d0a21dbf158ed2e641 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 1 Jul 2013 15:04:39 +0200 Subject: [PATCH 368/486] Added patch for proxy issues --- mozilla-817533.patch | 32 ++++++++++++++++++++++++++++++++ xulrunner.spec | 5 +++++ 2 files changed, 37 insertions(+) create mode 100644 mozilla-817533.patch diff --git a/mozilla-817533.patch b/mozilla-817533.patch new file mode 100644 index 0000000..11d1bb7 --- /dev/null +++ b/mozilla-817533.patch @@ -0,0 +1,32 @@ +# HG changeset patch +# Parent d09a5a5666baa44c817a4e1e463ef62eae0a1105 +# User Patrick McManus +bug 817533 - failed system proxy lookups should not fallback to manual configs r?jduell + +diff --git a/netwerk/base/src/nsProtocolProxyService.cpp b/netwerk/base/src/nsProtocolProxyService.cpp +--- a/netwerk/base/src/nsProtocolProxyService.cpp ++++ b/netwerk/base/src/nsProtocolProxyService.cpp +@@ -1553,17 +1553,22 @@ nsProtocolProxyService::Resolve_Internal + + // Proxy auto config magic... + if (mProxyConfig == PROXYCONFIG_PAC || mProxyConfig == PROXYCONFIG_WPAD) { + // Do not query PAC now. + *usePACThread = true; + return NS_OK; + } + +- // proxy info values ++ // If we aren't in manual proxy configuration mode then we don't ++ // want to honor any manual specific prefs that might be still set ++ if (mProxyConfig != PROXYCONFIG_MANUAL) ++ return NS_OK; ++ ++ // proxy info values for manual configuration mode + const char *type = nullptr; + const nsACString *host = nullptr; + int32_t port = -1; + + uint32_t proxyFlags = 0; + + if ((flags & RESOLVE_PREFER_SOCKS_PROXY) && + !mSOCKSProxyHost.IsEmpty() && mSOCKSProxyPort > 0) { diff --git a/xulrunner.spec b/xulrunner.spec index 727a526..7d3e21e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -104,6 +104,7 @@ Patch24: rhbz-966424.patch # Upstream patches Patch104: mozilla-844883.patch +Patch105: mozilla-817533.patch # --------------------------------------------------- @@ -242,6 +243,7 @@ cd %{tarballdir} %endif %patch24 -p1 -b .966424 +%patch105 -p1 -b .817533 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -517,6 +519,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 1 2013 Jan Horak - 22.0-3 +- Added fix from mozbz#817533 - fix issues with proxy settings + * Mon Jun 24 2013 Martin Stransky - 22.0-2 - Rebuild From 4d209f0963d4ab472b13eb4fe25d1246d157d1d8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 1 Jul 2013 15:08:15 +0200 Subject: [PATCH 369/486] Bump release --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7d3e21e..ebd3382 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet From 0ab4ac95f0bb0b43ce4752f31f7d1979437387ae Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 1 Jul 2013 17:25:21 +0200 Subject: [PATCH 370/486] Fixed healthreporter --- mozilla-831688.patch | 16 ++++++++++++++++ xulrunner.spec | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 mozilla-831688.patch diff --git a/mozilla-831688.patch b/mozilla-831688.patch new file mode 100644 index 0000000..4548be3 --- /dev/null +++ b/mozilla-831688.patch @@ -0,0 +1,16 @@ +# HG changeset patch +# Parent ae460fbc4d0e1768578b80b71bf2df8003c908ce +# User Jan Horak +diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh +--- a/xulrunner/confvars.sh ++++ b/xulrunner/confvars.sh +@@ -15,8 +15,9 @@ MOZ_URL_CLASSIFIER=1 + MOZ_SERVICES_COMMON=1 + MOZ_SERVICES_CRYPTO=1 + MOZ_SERVICES_METRICS=1 + MOZ_SERVICES_SYNC=1 + MOZ_MEDIA_NAVIGATOR=1 + if test "$OS_TARGET" = "WINNT" -o "$OS_TARGET" = "Darwin"; then + MOZ_FOLD_LIBS=1 + fi ++MOZ_SERVICES_HEALTHREPORT=1 diff --git a/xulrunner.spec b/xulrunner.spec index ebd3382..b81ec3c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -105,6 +105,7 @@ Patch24: rhbz-966424.patch # Upstream patches Patch104: mozilla-844883.patch Patch105: mozilla-817533.patch +Patch106: mozilla-831688.patch # --------------------------------------------------- @@ -244,6 +245,7 @@ cd %{tarballdir} %patch24 -p1 -b .966424 %patch105 -p1 -b .817533 +%patch106 -p1 -b .831688 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -519,8 +521,9 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Jul 1 2013 Jan Horak - 22.0-3 +* Mon Jul 1 2013 Jan Horak - 22.0-4 - Added fix from mozbz#817533 - fix issues with proxy settings +- Fixed missing about:healthreport * Mon Jun 24 2013 Martin Stransky - 22.0-2 - Rebuild From 5758cbe039a99b8c6ac3961366f270ef16de59fb Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 24 Jul 2013 09:55:00 +0100 Subject: [PATCH 371/486] Enable web-rtc on ARM now it's fixed upstream (RHBZ 886976) --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index b81ec3c..a994201 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -308,7 +308,7 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 +%ifnarch %{ix86} x86_64 armv7hl armv7hnl echo "ac_add_options --disable-webrtc" >> .mozconfig %endif @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 24 2013 Peter Robinson 22.0-5 +- Enable web-rtc on ARM now it's fixed upstream (RHBZ 886976) + * Mon Jul 1 2013 Jan Horak - 22.0-4 - Added fix from mozbz#817533 - fix issues with proxy settings - Fixed missing about:healthreport From 883ddfc115a075a962d368435ecb254d302a75bb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 25 Jul 2013 13:35:53 +0200 Subject: [PATCH 372/486] Removed already applied patches (rhbz#978123) --- mozilla-844883.patch | 17 ----------------- mozilla-851850.patch | 31 ------------------------------- xulrunner.spec | 9 ++++----- 3 files changed, 4 insertions(+), 53 deletions(-) delete mode 100644 mozilla-844883.patch delete mode 100644 mozilla-851850.patch diff --git a/mozilla-844883.patch b/mozilla-844883.patch deleted file mode 100644 index 9298d7d..0000000 --- a/mozilla-844883.patch +++ /dev/null @@ -1,17 +0,0 @@ -# HG changeset patch -# Parent f8a3e008d03b538873a8d4f16fb97829f171517b -# User Steve Singer -bug 844883 use a signed value for the stride - -diff -r f8a3e008d03b -r a298fedfda70 gfx/2d/Blur.cpp ---- a/gfx/2d/Blur.cpp Sun Mar 17 00:55:23 2013 -0400 -+++ b/gfx/2d/Blur.cpp Sun Mar 17 01:28:39 2013 -0400 -@@ -650,7 +650,7 @@ - return; - } - -- uint32_t stride32bit = aIntegralImageStride / 4; -+ int32_t stride32bit = aIntegralImageStride / 4; - - int32_t leftInflation = RoundUpToMultipleOf4(aLeftLobe).value(); - diff --git a/mozilla-851850.patch b/mozilla-851850.patch deleted file mode 100644 index 04260b9..0000000 --- a/mozilla-851850.patch +++ /dev/null @@ -1,31 +0,0 @@ - -# HG changeset patch -# User Steve Singer -# Date 1363699875 14400 -# Node ID fe010206e5add13f4202113dcd74f54acb1e5b37 -# Parent 90c5dd3a2d1533ce2646a53c6ec84773e6f42d43 -Bug 851850 - Link in altivec on ppc64. r=jmuizelaar - -diff --git a/gfx/qcms/Makefile.in b/gfx/qcms/Makefile.in ---- a/gfx/qcms/Makefile.in -+++ b/gfx/qcms/Makefile.in -@@ -48,17 +48,17 @@ else - endif - else - SSE1_FLAGS= - SSE2_FLAGS= - endif - endif - endif - else --ifeq (ppc,$(CPU_ARCH)) -+ifeq (ppc,$(findstring ppc,$(CPU_ARCH))) - ifdef GNU_CC - CSRCS += transform-altivec.c - ALTIVEC_FLAGS=-maltivec - endif - endif - endif - - FORCE_STATIC_LIB = 1 - diff --git a/xulrunner.spec b/xulrunner.spec index a994201..e1fd6a2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -98,12 +98,10 @@ Patch19: xulrunner-21.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch -Patch23: mozilla-851850.patch # Unable to install addons from https pages Patch24: rhbz-966424.patch # Upstream patches -Patch104: mozilla-844883.patch Patch105: mozilla-817533.patch Patch106: mozilla-831688.patch @@ -239,8 +237,6 @@ cd %{tarballdir} %ifarch ppc ppc64 %patch21 -p2 -b .ppc -%patch23 -p1 -b .851850 -%patch104 -p1 -b .844883 %endif %patch24 -p1 -b .966424 @@ -521,6 +517,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jul 25 2013 Martin Stransky - 22.0-6 +- Removed already applied patches (rhbz#978123) + * Wed Jul 24 2013 Peter Robinson 22.0-5 - Enable web-rtc on ARM now it's fixed upstream (RHBZ 886976) From 5e7e915b14ee2a25baf6d664cb9bf82928dbe066 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 29 Jul 2013 12:13:57 +0200 Subject: [PATCH 373/486] Fixed mozbz#860213 --- xulrunner.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index e1fd6a2..9bd5e4d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -104,6 +104,7 @@ Patch24: rhbz-966424.patch # Upstream patches Patch105: mozilla-817533.patch Patch106: mozilla-831688.patch +Patch107: mozilla-860213.patch # --------------------------------------------------- @@ -242,6 +243,7 @@ cd %{tarballdir} %patch24 -p1 -b .966424 %patch105 -p1 -b .817533 %patch106 -p1 -b .831688 +%patch107 -p1 -b .860213 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -517,6 +519,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 29 2013 Jan Horak - 22.0-7 +- Added fix for mozbz#860213 + * Thu Jul 25 2013 Martin Stransky - 22.0-6 - Removed already applied patches (rhbz#978123) From e32431451116585c5bbdce81d4ad4c83576e2f88 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 29 Jul 2013 16:29:20 +0200 Subject: [PATCH 374/486] Enable system libefi --- mozilla-860213.patch | 69 ++++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 12 ++++++++ 2 files changed, 81 insertions(+) create mode 100644 mozilla-860213.patch diff --git a/mozilla-860213.patch b/mozilla-860213.patch new file mode 100644 index 0000000..5c25541 --- /dev/null +++ b/mozilla-860213.patch @@ -0,0 +1,69 @@ +# HG changeset patch +# Parent 9cf679827fae794995f0d35030ad3fb4c7a6e6a8 +# User Jan Horak +# Bug 860213 - Use async version of g_file_set_attribute to set file metadata, removes UI block when dbus timeout. + +diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp +--- a/toolkit/components/downloads/nsDownloadManager.cpp ++++ b/toolkit/components/downloads/nsDownloadManager.cpp +@@ -2520,16 +2520,30 @@ nsDownload::nsDownload() : mDownloadStat + mAutoResume(DONT_RESUME) + { + } + + nsDownload::~nsDownload() + { + } + ++#ifdef MOZ_ENABLE_GIO ++static void gio_set_metadata_done(GObject *source_obj, GAsyncResult *res, gpointer user_data) ++{ ++ GError *err = NULL; ++ g_file_set_attributes_finish(G_FILE(source_obj), res, NULL, &err); ++ if (err) { ++#ifdef DEBUG ++ NS_DebugBreak(NS_DEBUG_WARNING, "Set file metadata failed: ", err->message, __FILE__, __LINE__); ++#endif ++ g_error_free(err); ++ } ++} ++#endif ++ + nsresult + nsDownload::SetState(DownloadState aState) + { + NS_ASSERTION(mDownloadState != aState, + "Trying to set the download state to what it already is set to!"); + + int16_t oldState = mDownloadState; + mDownloadState = aState; +@@ -2665,21 +2679,24 @@ nsDownload::SetState(DownloadState aStat + } + #endif + } + #ifdef MOZ_ENABLE_GIO + // Use GIO to store the source URI for later display in the file manager. + GFile* gio_file = g_file_new_for_path(NS_ConvertUTF16toUTF8(path).get()); + nsCString source_uri; + mSource->GetSpec(source_uri); +- +- g_file_set_attribute(gio_file, "metadata::download-uri", +- G_FILE_ATTRIBUTE_TYPE_STRING, +- (gpointer)source_uri.get(), +- G_FILE_QUERY_INFO_NONE, NULL, NULL); ++ GFileInfo *file_info = g_file_info_new(); ++ g_file_info_set_attribute_string(file_info, "metadata::download-uri", source_uri.get()); ++ g_file_set_attributes_async(gio_file, ++ file_info, ++ G_FILE_QUERY_INFO_NONE, ++ G_PRIORITY_DEFAULT, ++ NULL, gio_set_metadata_done, NULL); ++ g_object_unref(file_info); + g_object_unref(gio_file); + #endif + } + #endif + #ifdef XP_MACOSX + // On OS X, make the downloads stack bounce. + CFStringRef observedObject = ::CFStringCreateWithCString(kCFAllocatorDefault, + NS_ConvertUTF16toUTF8(path).get(), diff --git a/xulrunner.spec b/xulrunner.spec index 9bd5e4d..31cf086 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -4,8 +4,10 @@ # Use system sqlite? %if 0%{?fedora} < 19 %define system_sqlite 0 +%define system_ffi 0 %else %define system_sqlite 1 +%define system_ffi 1 %endif # Use system cairo? @@ -151,6 +153,10 @@ BuildRequires: sqlite-devel >= %{sqlite_version} Requires: sqlite >= %{sqlite_build_version} %endif +%if %{?system_ffi} +BuildRequires: libffi-devel +%endif + %description XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications that are as rich as Firefox and Thunderbird. It provides mechanisms @@ -268,6 +274,11 @@ echo "ac_add_options --enable-system-cairo" >> .mozconfig echo "ac_add_options --disable-system-cairo" >> .mozconfig %endif +%if %{?system_ffi} +echo "ac_add_options --enable-system-ffi" >> .mozconfig +%endif + + %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig @@ -520,6 +531,7 @@ fi %changelog * Mon Jul 29 2013 Jan Horak - 22.0-7 +- Use system libffi for Fedora 19+ - Added fix for mozbz#860213 * Thu Jul 25 2013 Martin Stransky - 22.0-6 From d4a72524efdfcee0ecbc7c998fff103d39ccd559 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 5 Aug 2013 14:31:15 +0200 Subject: [PATCH 375/486] Update to latest upstream (23.0) --- mozilla-817533.patch | 32 -------------------- mozilla-860213.patch | 69 -------------------------------------------- xulrunner.spec | 11 ++++--- 3 files changed, 5 insertions(+), 107 deletions(-) delete mode 100644 mozilla-817533.patch delete mode 100644 mozilla-860213.patch diff --git a/mozilla-817533.patch b/mozilla-817533.patch deleted file mode 100644 index 11d1bb7..0000000 --- a/mozilla-817533.patch +++ /dev/null @@ -1,32 +0,0 @@ -# HG changeset patch -# Parent d09a5a5666baa44c817a4e1e463ef62eae0a1105 -# User Patrick McManus -bug 817533 - failed system proxy lookups should not fallback to manual configs r?jduell - -diff --git a/netwerk/base/src/nsProtocolProxyService.cpp b/netwerk/base/src/nsProtocolProxyService.cpp ---- a/netwerk/base/src/nsProtocolProxyService.cpp -+++ b/netwerk/base/src/nsProtocolProxyService.cpp -@@ -1553,17 +1553,22 @@ nsProtocolProxyService::Resolve_Internal - - // Proxy auto config magic... - if (mProxyConfig == PROXYCONFIG_PAC || mProxyConfig == PROXYCONFIG_WPAD) { - // Do not query PAC now. - *usePACThread = true; - return NS_OK; - } - -- // proxy info values -+ // If we aren't in manual proxy configuration mode then we don't -+ // want to honor any manual specific prefs that might be still set -+ if (mProxyConfig != PROXYCONFIG_MANUAL) -+ return NS_OK; -+ -+ // proxy info values for manual configuration mode - const char *type = nullptr; - const nsACString *host = nullptr; - int32_t port = -1; - - uint32_t proxyFlags = 0; - - if ((flags & RESOLVE_PREFER_SOCKS_PROXY) && - !mSOCKSProxyHost.IsEmpty() && mSOCKSProxyPort > 0) { diff --git a/mozilla-860213.patch b/mozilla-860213.patch deleted file mode 100644 index 5c25541..0000000 --- a/mozilla-860213.patch +++ /dev/null @@ -1,69 +0,0 @@ -# HG changeset patch -# Parent 9cf679827fae794995f0d35030ad3fb4c7a6e6a8 -# User Jan Horak -# Bug 860213 - Use async version of g_file_set_attribute to set file metadata, removes UI block when dbus timeout. - -diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp ---- a/toolkit/components/downloads/nsDownloadManager.cpp -+++ b/toolkit/components/downloads/nsDownloadManager.cpp -@@ -2520,16 +2520,30 @@ nsDownload::nsDownload() : mDownloadStat - mAutoResume(DONT_RESUME) - { - } - - nsDownload::~nsDownload() - { - } - -+#ifdef MOZ_ENABLE_GIO -+static void gio_set_metadata_done(GObject *source_obj, GAsyncResult *res, gpointer user_data) -+{ -+ GError *err = NULL; -+ g_file_set_attributes_finish(G_FILE(source_obj), res, NULL, &err); -+ if (err) { -+#ifdef DEBUG -+ NS_DebugBreak(NS_DEBUG_WARNING, "Set file metadata failed: ", err->message, __FILE__, __LINE__); -+#endif -+ g_error_free(err); -+ } -+} -+#endif -+ - nsresult - nsDownload::SetState(DownloadState aState) - { - NS_ASSERTION(mDownloadState != aState, - "Trying to set the download state to what it already is set to!"); - - int16_t oldState = mDownloadState; - mDownloadState = aState; -@@ -2665,21 +2679,24 @@ nsDownload::SetState(DownloadState aStat - } - #endif - } - #ifdef MOZ_ENABLE_GIO - // Use GIO to store the source URI for later display in the file manager. - GFile* gio_file = g_file_new_for_path(NS_ConvertUTF16toUTF8(path).get()); - nsCString source_uri; - mSource->GetSpec(source_uri); -- -- g_file_set_attribute(gio_file, "metadata::download-uri", -- G_FILE_ATTRIBUTE_TYPE_STRING, -- (gpointer)source_uri.get(), -- G_FILE_QUERY_INFO_NONE, NULL, NULL); -+ GFileInfo *file_info = g_file_info_new(); -+ g_file_info_set_attribute_string(file_info, "metadata::download-uri", source_uri.get()); -+ g_file_set_attributes_async(gio_file, -+ file_info, -+ G_FILE_QUERY_INFO_NONE, -+ G_PRIORITY_DEFAULT, -+ NULL, gio_set_metadata_done, NULL); -+ g_object_unref(file_info); - g_object_unref(gio_file); - #endif - } - #endif - #ifdef XP_MACOSX - // On OS X, make the downloads stack bounce. - CFStringRef observedObject = ::CFStringCreateWithCString(kCFAllocatorDefault, - NS_ConvertUTF16toUTF8(path).get(), diff --git a/xulrunner.spec b/xulrunner.spec index 31cf086..5ce6b2f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 22.0 -Release: 7%{?pre_tag}%{?dist} +Version: 23.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -104,9 +104,7 @@ Patch21: rhbz-911314.patch Patch24: rhbz-966424.patch # Upstream patches -Patch105: mozilla-817533.patch Patch106: mozilla-831688.patch -Patch107: mozilla-860213.patch # --------------------------------------------------- @@ -247,9 +245,7 @@ cd %{tarballdir} %endif %patch24 -p1 -b .966424 -%patch105 -p1 -b .817533 %patch106 -p1 -b .831688 -%patch107 -p1 -b .860213 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -530,6 +526,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jul 25 2013 Martin Stransky - 23.0-1 +- Update to latest upstream (23.0) + * Mon Jul 29 2013 Jan Horak - 22.0-7 - Use system libffi for Fedora 19+ - Added fix for mozbz#860213 From 29350dbceb2d1cf853118c79f88d8d9a94be8143 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 5 Aug 2013 14:35:20 +0200 Subject: [PATCH 376/486] Update to latest upstream (23.0) - source upload --- sources | 2 +- xulrunner.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index e8c6ff5..50f1404 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f5e67dc477e0d2f7b7d23b105047d37b firefox-22.0.source.tar.bz2 +794e0139c4df0392146353c655d94bb9 firefox-23.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 5ce6b2f..5ca140d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -526,7 +526,7 @@ fi #--------------------------------------------------------------------- %changelog -* Thu Jul 25 2013 Martin Stransky - 23.0-1 +* Mon Aug 5 2013 Martin Stransky - 23.0-1 - Update to latest upstream (23.0) * Mon Jul 29 2013 Jan Horak - 22.0-7 From 480cf5fab940b0480d9b4cd1900c876a6269ef51 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 5 Aug 2013 15:02:14 +0200 Subject: [PATCH 377/486] Update to latest upstream (23.0 Build 2) --- sources | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 50f1404..f6a9fd4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -794e0139c4df0392146353c655d94bb9 firefox-23.0.source.tar.bz2 +059e2e0fdd0ebd98d62994762b25dfae firefox-23.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 5ca140d..af0f529 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 23.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -526,6 +526,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 5 2013 Martin Stransky - 23.0-2 +- Update to latest upstream (23.0 Build 2) + * Mon Aug 5 2013 Martin Stransky - 23.0-1 - Update to latest upstream (23.0) From c8142c6a9409550e36a39cefb548a17c6e0223ad Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 19 Aug 2013 13:53:18 +0200 Subject: [PATCH 378/486] Update to 23.0.1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index f6a9fd4..4362a68 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -059e2e0fdd0ebd98d62994762b25dfae firefox-23.0.source.tar.bz2 +f854095987b2a66e25c9bfd808e5eaeb firefox-23.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index af0f529..a997906 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 23.0 -Release: 2%{?pre_tag}%{?dist} +Version: 23.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -526,6 +526,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 19 2013 Jan Horak - 23.0.1-1 +- Update to 23.0.1 + * Mon Aug 5 2013 Martin Stransky - 23.0-2 - Update to latest upstream (23.0 Build 2) From b434782fd67014c52648f4aac4e3f3b194bdbab1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 29 Aug 2013 16:04:07 +0200 Subject: [PATCH 379/486] Enabled dtrace for debug builds --- xulrunner.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index a997906..80baffd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 23.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -278,6 +278,7 @@ echo "ac_add_options --enable-system-ffi" >> .mozconfig %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig +echo "ac_add_options --enable-dtrace" >> .mozconfig %else echo "ac_add_options --disable-debug" >> .mozconfig echo "ac_add_options --enable-optimize" >> .mozconfig @@ -526,6 +527,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Aug 29 2013 Martin Stransky - 23.0.1-2 +- Enabled dtrace for debug builds + * Mon Aug 19 2013 Jan Horak - 23.0.1-1 - Update to 23.0.1 From f2b9d9294e297ad6d980bcb30fcf27c147d6feb6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Sat, 31 Aug 2013 20:57:19 +0200 Subject: [PATCH 380/486] update rhbz-911314.patch (PPC* only) --- rhbz-911314.patch | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rhbz-911314.patch b/rhbz-911314.patch index 9a28aaa..3a62c8d 100644 --- a/rhbz-911314.patch +++ b/rhbz-911314.patch @@ -11,7 +11,7 @@ diff -up xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc xulrunner-21.0/m - * Note: The freelist supports a maximum arena shift of 15. - * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. - */ --#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ +-#if (defined(SOLARIS) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ - (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) -const size_t PageShift = 13; -const size_t ArenaShift = PageShift; diff --git a/xulrunner.spec b/xulrunner.spec index 80baffd..95503a0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 23.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -527,6 +527,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Aug 31 2013 Karsten Hopp 23.0.1-3 +- update rhbz-911314.patch (PPC* only) + * Thu Aug 29 2013 Martin Stransky - 23.0.1-2 - Enabled dtrace for debug builds From bcd0b40902c0b482c693e1b492a6491ba662c419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 2 Sep 2013 11:32:05 +0200 Subject: [PATCH 381/486] Fix build on 64-bit big endian platforms (mozbz#618485) --- mozilla-618485.patch | 30 ++++++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 mozilla-618485.patch diff --git a/mozilla-618485.patch b/mozilla-618485.patch new file mode 100644 index 0000000..df08387 --- /dev/null +++ b/mozilla-618485.patch @@ -0,0 +1,30 @@ + +# HG changeset patch +# User Landry Breuil +# Date 1370688550 -7200 +# Node ID 82fab5c8a6d5a94c6a0f32a942976595b6e722a2 +# Parent 308462ba17bae57b9571fe397e0480b1c3217d01 +Bug 618485: Finally remove uintptr_t word payload union member on 64BE, it grows jsval_layout size and is unused. r=luke + +diff --git a/js/public/Value.h b/js/public/Value.h +--- a/js/public/Value.h ++++ b/js/public/Value.h +@@ -316,17 +316,16 @@ typedef union jsval_layout + uint64_t payload47 : 47; + } debugView; + struct { + uint32_t padding; + union { + int32_t i32; + uint32_t u32; + JSWhyMagic why; +- uintptr_t word; + } payload; + } s; + double asDouble; + void *asPtr; + size_t asWord; + uintptr_t asUIntPtr; + } JSVAL_ALIGNMENT jsval_layout; + # endif /* JS_BITS_PER_WORD */ + diff --git a/xulrunner.spec b/xulrunner.spec index 95503a0..1ea990c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 23.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -105,6 +105,7 @@ Patch24: rhbz-966424.patch # Upstream patches Patch106: mozilla-831688.patch +Patch107: mozilla-618485.patch # --------------------------------------------------- @@ -246,6 +247,7 @@ cd %{tarballdir} %patch24 -p1 -b .966424 %patch106 -p1 -b .831688 +%patch107 -p1 -b .618485 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -527,6 +529,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 2 2013 Dan Horák - 23.0.1-4 +- Fix build on 64-bit big endian platforms (mozbz#618485) + * Sat Aug 31 2013 Karsten Hopp 23.0.1-3 - update rhbz-911314.patch (PPC* only) From e1c89329dcf159a857511098a31032b0ff86a635 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Sep 2013 13:53:39 +0200 Subject: [PATCH 382/486] Update to 24.0 --- mozilla-618485.patch | 30 ------------------------------ mozilla-831688.patch | 16 ---------------- rhbz-966424.patch | 5 ++--- sources | 2 +- xulrunner-15.0-gcc47.patch | 13 ------------- xulrunner-16.0-jemalloc-ppc.patch | 14 -------------- xulrunner-21.0-s390-inlines.patch | 12 ------------ xulrunner-24.0-gcc47.patch | 13 +++++++++++++ xulrunner-24.0-jemalloc-ppc.patch | 12 ++++++++++++ xulrunner-24.0-s390-inlines.patch | 12 ++++++++++++ xulrunner.spec | 21 ++++++++++----------- 11 files changed, 50 insertions(+), 100 deletions(-) delete mode 100644 mozilla-618485.patch delete mode 100644 mozilla-831688.patch delete mode 100644 xulrunner-15.0-gcc47.patch delete mode 100644 xulrunner-16.0-jemalloc-ppc.patch delete mode 100644 xulrunner-21.0-s390-inlines.patch create mode 100644 xulrunner-24.0-gcc47.patch create mode 100644 xulrunner-24.0-jemalloc-ppc.patch create mode 100644 xulrunner-24.0-s390-inlines.patch diff --git a/mozilla-618485.patch b/mozilla-618485.patch deleted file mode 100644 index df08387..0000000 --- a/mozilla-618485.patch +++ /dev/null @@ -1,30 +0,0 @@ - -# HG changeset patch -# User Landry Breuil -# Date 1370688550 -7200 -# Node ID 82fab5c8a6d5a94c6a0f32a942976595b6e722a2 -# Parent 308462ba17bae57b9571fe397e0480b1c3217d01 -Bug 618485: Finally remove uintptr_t word payload union member on 64BE, it grows jsval_layout size and is unused. r=luke - -diff --git a/js/public/Value.h b/js/public/Value.h ---- a/js/public/Value.h -+++ b/js/public/Value.h -@@ -316,17 +316,16 @@ typedef union jsval_layout - uint64_t payload47 : 47; - } debugView; - struct { - uint32_t padding; - union { - int32_t i32; - uint32_t u32; - JSWhyMagic why; -- uintptr_t word; - } payload; - } s; - double asDouble; - void *asPtr; - size_t asWord; - uintptr_t asUIntPtr; - } JSVAL_ALIGNMENT jsval_layout; - # endif /* JS_BITS_PER_WORD */ - diff --git a/mozilla-831688.patch b/mozilla-831688.patch deleted file mode 100644 index 4548be3..0000000 --- a/mozilla-831688.patch +++ /dev/null @@ -1,16 +0,0 @@ -# HG changeset patch -# Parent ae460fbc4d0e1768578b80b71bf2df8003c908ce -# User Jan Horak -diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh ---- a/xulrunner/confvars.sh -+++ b/xulrunner/confvars.sh -@@ -15,8 +15,9 @@ MOZ_URL_CLASSIFIER=1 - MOZ_SERVICES_COMMON=1 - MOZ_SERVICES_CRYPTO=1 - MOZ_SERVICES_METRICS=1 - MOZ_SERVICES_SYNC=1 - MOZ_MEDIA_NAVIGATOR=1 - if test "$OS_TARGET" = "WINNT" -o "$OS_TARGET" = "Darwin"; then - MOZ_FOLD_LIBS=1 - fi -+MOZ_SERVICES_HEALTHREPORT=1 diff --git a/rhbz-966424.patch b/rhbz-966424.patch index 37ddc6e..c4c332e 100644 --- a/rhbz-966424.patch +++ b/rhbz-966424.patch @@ -1,6 +1,5 @@ -diff --git a/toolkit/mozapps/shared/CertUtils.jsm b/toolkit/toolkit/mozapps/shared/CertUtils.jsm ---- a/toolkit/mozapps/shared/CertUtils.jsm -+++ b/toolkit/mozapps/shared/CertUtils.jsm +--- a/toolkit/modules/CertUtils.jsm ++++ b/toolkit/modules/CertUtils.jsm @@ -170,17 +170,19 @@ this.checkCert = issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3); var tokenNames = issuerCert.getAllTokenNames({}); diff --git a/sources b/sources index 4362a68..7b21845 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f854095987b2a66e25c9bfd808e5eaeb firefox-23.0.1.source.tar.bz2 +06a4c0fe8d3a979aea2fce8d0fdbf328 firefox-24.0.source.tar.bz2 diff --git a/xulrunner-15.0-gcc47.patch b/xulrunner-15.0-gcc47.patch deleted file mode 100644 index 0d44796..0000000 --- a/xulrunner-15.0-gcc47.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in ---- xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-08-15 07:48:31.000000000 +0200 -+++ xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-08-20 15:05:41.782947739 +0200 -@@ -34,6 +34,9 @@ CPPSRCS = \ - crashreporter.cpp \ - $(NULL) - -+# Needed for moz_free -+LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc -+ - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += crashreporter_win.cpp - LIBS += \ diff --git a/xulrunner-16.0-jemalloc-ppc.patch b/xulrunner-16.0-jemalloc-ppc.patch deleted file mode 100644 index 896a2c0..0000000 --- a/xulrunner-16.0-jemalloc-ppc.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c -=================================================================== ---- xulrunner-11.0.orig/mozilla-release/memory/mozjemalloc/jemalloc.c -+++ xulrunner-11.0/mozilla-release/memory/mozjemalloc/jemalloc.c -@@ -1089,7 +1089,9 @@ static unsigned ncpus; - * controlling the malloc behavior are defined as compile-time constants - * for best performance and cannot be altered at runtime. - */ -+#if !(defined(__powerpc__)) - #define MALLOC_STATIC_SIZES 1 -+#endif - - #ifdef MALLOC_STATIC_SIZES - diff --git a/xulrunner-21.0-s390-inlines.patch b/xulrunner-21.0-s390-inlines.patch deleted file mode 100644 index cf2b0ca..0000000 --- a/xulrunner-21.0-s390-inlines.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-release/js/src/vm/SPSProfiler.cpp.jscntxt mozilla-release/js/src/vm/SPSProfiler.cpp ---- mozilla-release/js/src/vm/SPSProfiler.cpp.jscntxt 2013-05-20 11:46:14.736790245 -0400 -+++ mozilla-release/js/src/vm/SPSProfiler.cpp 2013-05-20 11:38:20.696788904 -0400 -@@ -10,6 +10,8 @@ - #include "jsnum.h" - #include "jsscript.h" - -+#include "jscntxtinlines.h" -+ - #include "methodjit/MethodJIT.h" - #include "methodjit/Compiler.h" - diff --git a/xulrunner-24.0-gcc47.patch b/xulrunner-24.0-gcc47.patch new file mode 100644 index 0000000..a6bff8e --- /dev/null +++ b/xulrunner-24.0-gcc47.patch @@ -0,0 +1,13 @@ +diff -up xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in +--- xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-09-11 01:15:24.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-09-13 13:33:49.866875578 +0200 +@@ -60,6 +60,9 @@ $(DIST)/bin/crashreporter.crt: $(topsrcd + $(PYTHON) $(srcdir)/certdata2pem.py < $< > $@ + endif + ++# Needed for moz_free ++LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc ++ + LIBS += \ + $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \ + $(NULL) diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch new file mode 100644 index 0000000..fe404ca --- /dev/null +++ b/xulrunner-24.0-jemalloc-ppc.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c +--- xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2013-09-11 01:15:18.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c 2013-09-13 13:36:34.171680919 +0200 +@@ -1104,7 +1104,7 @@ static unsigned ncpus; + * controlling the malloc behavior are defined as compile-time constants + * for best performance and cannot be altered at runtime. + */ +-#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) ++#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !(defined(__powerpc__)) + #define MALLOC_STATIC_SIZES 1 + #endif + diff --git a/xulrunner-24.0-s390-inlines.patch b/xulrunner-24.0-s390-inlines.patch new file mode 100644 index 0000000..92175a3 --- /dev/null +++ b/xulrunner-24.0-s390-inlines.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp +--- xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-09-11 01:15:09.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-09-13 13:39:16.908478613 +0200 +@@ -9,6 +9,8 @@ + #include "jsnum.h" + #include "jsscript.h" + ++#include "jscntxtinlines.h" ++ + #include "vm/SPSProfiler.h" + #include "vm/StringBuffer.h" + diff --git a/xulrunner.spec b/xulrunner.spec index 1ea990c..f3831d1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 23.0.1 -Release: 4%{?pre_tag}%{?dist} +Version: 24.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -91,11 +91,11 @@ Source21: %{name}.sh.in Patch1: xulrunner-install-dir.patch Patch2: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch -Patch17: xulrunner-15.0-gcc47.patch +Patch17: xulrunner-24.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 -Patch18: xulrunner-16.0-jemalloc-ppc.patch +Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) -Patch19: xulrunner-21.0-s390-inlines.patch +Patch19: xulrunner-24.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -104,8 +104,6 @@ Patch21: rhbz-911314.patch Patch24: rhbz-966424.patch # Upstream patches -Patch106: mozilla-831688.patch -Patch107: mozilla-618485.patch # --------------------------------------------------- @@ -237,17 +235,15 @@ cd %{tarballdir} %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc -%patch19 -p1 -b .s390-inlines +%patch19 -p2 -b .s390-inlines -%patch20 -p2 -b .pk +%patch20 -p2 -b .pk %ifarch ppc ppc64 %patch21 -p2 -b .ppc %endif %patch24 -p1 -b .966424 -%patch106 -p1 -b .831688 -%patch107 -p1 -b .618485 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -529,6 +525,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 13 2013 Martin Stransky - 24.0.1-1 +- Update to 24.0 + * Mon Sep 2 2013 Dan Horák - 23.0.1-4 - Fix build on 64-bit big endian platforms (mozbz#618485) From f14bf576412ca140ecb6e1543963c81bc82240aa Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Sep 2013 14:05:42 +0200 Subject: [PATCH 383/486] Disabled gstreamer support --- xulrunner-mozconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 9482fc9..7fed6ad 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -32,6 +32,7 @@ ac_add_options --enable-gio ac_add_options --disable-gnomevfs ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni +ac_add_options --disable-gstreamer export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 From 8d501e5c5ef503123eae825331a06762e0daf9bf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Sep 2013 11:30:44 +0200 Subject: [PATCH 384/486] Arm build fix --- mozilla-build-arm.patch | 12 ++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 mozilla-build-arm.patch diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch new file mode 100644 index 0000000..6e27f78 --- /dev/null +++ b/mozilla-build-arm.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build.neon xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build +--- xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build.neon 2013-09-11 01:15:02.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build 2013-09-16 11:23:40.487028288 +0200 +@@ -61,7 +61,7 @@ else: + 'yuv_row_other.cpp', + ] + +-if CONFIG['OS_TEST'] == 'arm' and CONFIG['HAVE_ARM_NEON']: ++if CONFIG['HAVE_ARM_NEON']: + CPP_SOURCES += [ + 'yuv_convert_arm.cpp', + ] diff --git a/xulrunner.spec b/xulrunner.spec index f3831d1..5d66b79 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 24.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -90,6 +90,7 @@ Source21: %{name}.sh.in # build patches Patch1: xulrunner-install-dir.patch Patch2: mozilla-build.patch +Patch3: mozilla-build-arm.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-24.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 @@ -232,6 +233,7 @@ cd %{tarballdir} %patch1 -p1 %patch2 -p1 -b .build +%patch3 -p2 -b .arm %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc @@ -525,6 +527,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 16 2013 Martin Stransky - 24.0.1-2 +- Arm build fix + * Fri Sep 13 2013 Martin Stransky - 24.0.1-1 - Update to 24.0 From 7f16336b7fd7bb785522da4a538b06f48c4071e9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 15 Oct 2013 13:59:19 +0200 Subject: [PATCH 385/486] drop PPC-only rhbz-911314.patch, fixed upstream --- rhbz-911314.patch | 534 ---------------------------------------------- xulrunner.spec | 10 +- 2 files changed, 4 insertions(+), 540 deletions(-) delete mode 100644 rhbz-911314.patch diff --git a/rhbz-911314.patch b/rhbz-911314.patch deleted file mode 100644 index 3a62c8d..0000000 --- a/rhbz-911314.patch +++ /dev/null @@ -1,534 +0,0 @@ -diff -up xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc xulrunner-21.0/mozilla-release/js/public/HeapAPI.h ---- xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc 2013-05-12 23:56:19.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/public/HeapAPI.h 2013-05-21 23:14:04.698238150 +0200 -@@ -11,24 +11,7 @@ - namespace js { - namespace gc { - --/* -- * Page size must be static to support our arena pointer optimizations, so we -- * are forced to support each platform with non-4096 pages as a special case. -- * Note: The freelist supports a maximum arena shift of 15. -- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. -- */ --#if (defined(SOLARIS) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ -- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) --const size_t PageShift = 13; --const size_t ArenaShift = PageShift; --#elif defined(__powerpc64__) --const size_t PageShift = 16; - const size_t ArenaShift = 12; --#else --const size_t PageShift = 12; --const size_t ArenaShift = PageShift; --#endif --const size_t PageSize = size_t(1) << PageShift; - const size_t ArenaSize = size_t(1) << ArenaShift; - const size_t ArenaMask = ArenaSize - 1; - -diff -up xulrunner-21.0/mozilla-release/js/src/gc/Heap.h.ppc xulrunner-21.0/mozilla-release/js/src/gc/Heap.h ---- xulrunner-21.0/mozilla-release/js/src/gc/Heap.h.ppc 2013-05-12 23:56:19.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/gc/Heap.h 2013-05-21 23:14:04.693238124 +0200 -@@ -812,7 +812,7 @@ struct Chunk - - /* Search for a decommitted arena to allocate. */ - unsigned findDecommittedArenaOffset(); -- ArenaHeader* fetchNextDecommittedArena(); -+ ArenaHeader* fetchNextDecommittedArena(JSRuntime *rt); - - public: - /* Unlink and return the freeArenasHead. */ -diff -up xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp.ppc xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp ---- xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp.ppc 2013-05-12 23:56:19.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp 2013-05-21 23:14:04.693238124 +0200 -@@ -8,6 +8,7 @@ - #include "mozilla/Assertions.h" - - #include "jsapi.h" -+#include "jscntxt.h" - - #include "js/HeapAPI.h" - #include "js/Utility.h" -@@ -18,39 +19,34 @@ using namespace js::gc; - - /* Unused memory decommiting requires the arena size match the page size. */ - static bool --DecommitEnabled() -+DecommitEnabled(JSRuntime *rt) - { -- return PageSize == ArenaSize; -+ return rt->gcSystemPageSize == ArenaSize; - } - - #if defined(XP_WIN) - #include "jswin.h" - #include - --static size_t AllocationGranularity = 0; -- - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { - SYSTEM_INFO sysinfo; - GetSystemInfo(&sysinfo); -- if (sysinfo.dwPageSize != PageSize) { -- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); -- MOZ_CRASH(); -- } -- AllocationGranularity = sysinfo.dwAllocationGranularity; -+ rt->gcSystemPageSize = sysinfo.dwPageSize; -+ rt->gcSystemAllocGranularity = sysinfo.dwAllocationGranularity; - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % AllocationGranularity == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - /* Special case: If we want allocation alignment, no further work is needed. */ -- if (alignment == AllocationGranularity) { -+ if (alignment == rt->gcSystemAllocGranularity) { - return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - } - -@@ -74,7 +70,7 @@ gc::MapAlignedPages(size_t size, size_t - if (!p) - return NULL; - void *chunkStart = (void *)(uintptr_t(p) + (alignment - (uintptr_t(p) % alignment))); -- UnmapPages(p, size * 2); -+ UnmapPages(rt, p, size * 2); - p = VirtualAlloc(chunkStart, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - - /* Failure here indicates a race with another thread, so try again. */ -@@ -85,26 +81,26 @@ gc::MapAlignedPages(size_t size, size_t - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- if (!DecommitEnabled()) -- return false; -+ if (!DecommitEnabled(rt)) -+ return true; - -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - LPVOID p2 = VirtualAlloc(p, size, MEM_RESET, PAGE_READWRITE); - return p2 == p; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -126,12 +122,13 @@ gc::GetPageFaultCount() - #define OS2_MAX_RECURSIONS 16 - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = ArenaSize; - } - - void --gc::UnmapPages(void *addr, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *addr, size_t size) - { - if (!DosFreeMem(addr)) - return; -@@ -152,7 +149,7 @@ gc::UnmapPages(void *addr, size_t size) - } - - static void * --gc::MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) -+gc::MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) - { - if (++recursions >= OS2_MAX_RECURSIONS) - return NULL; -@@ -178,7 +175,7 @@ gc::MapAlignedPagesRecursively(size_t si - unsigned long rc = DosQueryMem(&(static_cast(tmp))[size], - &cb, &flags); - if (!rc && (flags & PAG_FREE) && cb >= filler) { -- UnmapPages(tmp, 0); -+ UnmapPages(rt, tmp, 0); - if (DosAllocMem(&tmp, filler, - OBJ_ANY | PAG_COMMIT | PAG_READ | PAG_WRITE)) { - JS_ALWAYS_TRUE(DosAllocMem(&tmp, filler, -@@ -186,19 +183,19 @@ gc::MapAlignedPagesRecursively(size_t si - } - } - -- void *p = MapAlignedPagesRecursively(size, alignment, recursions); -- UnmapPages(tmp, 0); -+ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); -+ UnmapPages(rt, tmp, 0); - - return p; - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int recursions = -1; - -@@ -207,7 +204,7 @@ gc::MapAlignedPages(size_t size, size_t - * of the right size by recursively allocating blocks of unaligned - * free memory until only an aligned allocation is possible. - */ -- void *p = MapAlignedPagesRecursively(size, alignment, recursions); -+ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); - if (p) - return p; - -@@ -229,16 +226,15 @@ gc::MapAlignedPages(size_t size, size_t - } - - bool --gc::MarkPagesUnused(void *p, size_t size) --{ -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -258,17 +254,18 @@ gc::GetPageFaultCount() - #endif - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int prot = PROT_READ | PROT_WRITE; - int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC; -@@ -280,22 +277,22 @@ gc::MapAlignedPages(size_t size, size_t - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(0 == munmap((caddr_t)p, size)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -313,27 +310,24 @@ gc::GetPageFaultCount() - #include - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -- if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) { -- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); -- MOZ_CRASH(); -- } -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int prot = PROT_READ | PROT_WRITE; - int flags = MAP_PRIVATE | MAP_ANON; - - /* Special case: If we want page alignment, no further work is needed. */ -- if (alignment == PageSize) { -+ if (alignment == rt->gcSystemAllocGranularity) { - return mmap(NULL, size, prot, flags, -1, 0); - } - -@@ -359,26 +353,26 @@ gc::MapAlignedPages(size_t size, size_t - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(0 == munmap(p, size)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- if (!DecommitEnabled()) -- return false; -+ if (!DecommitEnabled(rt)) -+ return true; - -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - int result = madvise(p, size, MADV_DONTNEED); - return result != -1; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -diff -up xulrunner-21.0/mozilla-release/js/src/gc/Memory.h.ppc xulrunner-21.0/mozilla-release/js/src/gc/Memory.h ---- xulrunner-21.0/mozilla-release/js/src/gc/Memory.h.ppc 2013-05-12 23:56:19.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/gc/Memory.h 2013-05-21 23:14:04.693238124 +0200 -@@ -16,20 +16,20 @@ namespace gc { - - // Sanity check that our compiled configuration matches the currently running - // instance and initialize any runtime data needed for allocation. --void InitMemorySubsystem(); -+void InitMemorySubsystem(JSRuntime *rt); - - // Allocate or deallocate pages from the system with the given alignment. --void *MapAlignedPages(size_t size, size_t alignment); --void UnmapPages(void *p, size_t size); -+void *MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment); -+void UnmapPages(JSRuntime *rt, void *p, size_t size); - - // Tell the OS that the given pages are not in use, so they should not - // be written to a paging file. This may be a no-op on some platforms. --bool MarkPagesUnused(void *p, size_t size); -+bool MarkPagesUnused(JSRuntime *rt, void *p, size_t size); - - // Undo |MarkPagesUnused|: tell the OS that the given pages are of interest - // and should be paged in and out normally. This may be a no-op on some - // platforms. --bool MarkPagesInUse(void *p, size_t size); -+bool MarkPagesInUse(JSRuntime *rt, void *p, size_t size); - - // Returns #(hard faults) + #(soft faults) - size_t GetPageFaultCount(); -diff -up xulrunner-21.0/mozilla-release/js/src/jsapi.cpp.ppc xulrunner-21.0/mozilla-release/js/src/jsapi.cpp ---- xulrunner-21.0/mozilla-release/js/src/jsapi.cpp.ppc 2013-05-12 23:56:21.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/jsapi.cpp 2013-05-21 23:14:04.695238134 +0200 -@@ -1110,8 +1110,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe - #undef MSG_DEF - #endif /* DEBUG */ - -- InitMemorySubsystem(); -- - if (!js::TlsPerThreadData.init()) - return NULL; - -diff -up xulrunner-21.0/mozilla-release/js/src/jscntxt.h.ppc xulrunner-21.0/mozilla-release/js/src/jscntxt.h ---- xulrunner-21.0/mozilla-release/js/src/jscntxt.h.ppc 2013-05-12 23:56:21.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/jscntxt.h 2013-05-21 23:14:04.696238140 +0200 -@@ -1026,6 +1026,15 @@ struct JSRuntime : js::RuntimeFriendFiel - /* Stack of thread-stack-allocated GC roots. */ - js::AutoGCRooter *autoGCRooters; - -+ /* -+ * The GC can only safely decommit memory when the page size of the -+ * running process matches the compiled arena size. -+ */ -+ size_t gcSystemPageSize; -+ -+ /* The OS allocation granularity may not match the page size. */ -+ size_t gcSystemAllocGranularity; -+ - /* Strong references on scripts held for PCCount profiling API. */ - js::ScriptAndCountsVector *scriptAndCountsVector; - -diff -up xulrunner-21.0/mozilla-release/js/src/jsgc.cpp.ppc xulrunner-21.0/mozilla-release/js/src/jsgc.cpp ---- xulrunner-21.0/mozilla-release/js/src/jsgc.cpp.ppc 2013-05-12 23:56:21.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/jsgc.cpp 2013-05-21 23:15:40.198740765 +0200 -@@ -465,13 +465,13 @@ FinalizeArenas(FreeOp *fop, - } - - static inline Chunk * --AllocChunk() { -- return static_cast(MapAlignedPages(ChunkSize, ChunkSize)); -+AllocChunk(JSRuntime *rt) { -+ return static_cast(MapAlignedPages(rt, ChunkSize, ChunkSize)); - } - - static inline void --FreeChunk(Chunk *p) { -- UnmapPages(static_cast(p), ChunkSize); -+FreeChunk(JSRuntime *rt, Chunk *p) { -+ UnmapPages(rt, static_cast(p), ChunkSize); - } - - inline bool -@@ -561,25 +561,25 @@ ChunkPool::expire(JSRuntime *rt, bool re - } - - static void --FreeChunkList(Chunk *chunkListHead) -+FreeChunkList(JSRuntime *rt, Chunk *chunkListHead) - { - while (Chunk *chunk = chunkListHead) { - JS_ASSERT(!chunk->info.numArenasFreeCommitted); - chunkListHead = chunk->info.next; -- FreeChunk(chunk); -+ FreeChunk(rt, chunk); - } - } - - void - ChunkPool::expireAndFree(JSRuntime *rt, bool releaseAll) - { -- FreeChunkList(expire(rt, releaseAll)); -+ FreeChunkList(rt, expire(rt, releaseAll)); - } - - /* static */ Chunk * - Chunk::allocate(JSRuntime *rt) - { -- Chunk *chunk = static_cast(AllocChunk()); -+ Chunk *chunk = static_cast(AllocChunk(rt)); - - #ifdef JSGC_ROOT_ANALYSIS - // Our poison pointers are not guaranteed to be invalid on 64-bit -@@ -592,7 +592,7 @@ Chunk::allocate(JSRuntime *rt) - // were marked as uncommitted, but it's a little complicated to avoid - // clobbering pre-existing unrelated mappings. - while (IsPoisonedPtr(chunk)) -- chunk = static_cast(AllocChunk()); -+ chunk = static_cast(AllocChunk(rt)); - #endif - - if (!chunk) -@@ -608,7 +608,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu - { - JS_ASSERT(chunk); - chunk->prepareToBeFreed(rt); -- FreeChunk(chunk); -+ FreeChunk(rt, chunk); - } - - inline void -@@ -725,7 +725,7 @@ Chunk::findDecommittedArenaOffset() - } - - ArenaHeader * --Chunk::fetchNextDecommittedArena() -+Chunk::fetchNextDecommittedArena(JSRuntime *rt) - { - JS_ASSERT(info.numArenasFreeCommitted == 0); - JS_ASSERT(info.numArenasFree > 0); -@@ -736,7 +736,7 @@ Chunk::fetchNextDecommittedArena() - decommittedArenas.unset(offset); - - Arena *arena = &arenas[offset]; -- MarkPagesInUse(arena, ArenaSize); -+ MarkPagesInUse(rt, arena, ArenaSize); - arena->aheader.setAsNotAllocated(); - - return &arena->aheader; -@@ -770,7 +770,7 @@ Chunk::allocateArena(Zone *zone, AllocKi - - ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0) - ? fetchNextFreeArena(rt) -- : fetchNextDecommittedArena(); -+ : fetchNextDecommittedArena(rt); - aheader->init(zone, thingKind); - if (JS_UNLIKELY(!hasAvailableArenas())) - removeFromAvailableList(); -@@ -937,6 +937,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ - JSBool - js_InitGC(JSRuntime *rt, uint32_t maxbytes) - { -+ InitMemorySubsystem(rt); -+ - if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) - return false; - -@@ -2102,7 +2104,7 @@ DecommitArenasFromAvailableList(JSRuntim - Maybe maybeUnlock; - if (!rt->isHeapBusy()) - maybeUnlock.construct(rt); -- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); -+ ok = MarkPagesUnused(rt, aheader->getArena(), ArenaSize); - } - - if (ok) { -@@ -2170,7 +2172,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo - { - if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { - AutoUnlockGC unlock(rt); -- FreeChunkList(toFree); -+ FreeChunkList(rt, toFree); - } - - if (shouldShrink) diff --git a/xulrunner.spec b/xulrunner.spec index 5d66b79..7619a83 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 24.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -100,7 +100,6 @@ Patch19: xulrunner-24.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch21: rhbz-911314.patch # Unable to install addons from https pages Patch24: rhbz-966424.patch @@ -241,10 +240,6 @@ cd %{tarballdir} %patch20 -p2 -b .pk -%ifarch ppc ppc64 -%patch21 -p2 -b .ppc -%endif - %patch24 -p1 -b .966424 %{__rm} -f .mozconfig @@ -527,6 +522,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 15 2013 Karsten Hopp 24.0-3 +- drop PPC-only rhbz-911314.patch, fixed upstream + * Mon Sep 16 2013 Martin Stransky - 24.0.1-2 - Arm build fix From 435df8caa012051e4051ef6eab276aea3175ba53 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 23 Oct 2013 16:06:42 +0200 Subject: [PATCH 386/486] Update to Firefox 25 Build 2 --- mozilla-build-arm.patch | 12 +- sources | 2 +- xulrunner-24.0-s390-inlines.patch | 14 +- xulrunner.spec | 738 +----------------------------- 4 files changed, 19 insertions(+), 747 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 6e27f78..0fed214 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,12 +1,12 @@ -diff -up xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build.neon xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build ---- xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build.neon 2013-09-11 01:15:02.000000000 +0200 -+++ xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build 2013-09-16 11:23:40.487028288 +0200 +diff -up xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build.arm xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build +--- xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build.arm 2013-10-23 15:52:17.056493264 +0200 ++++ xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build 2013-10-23 16:03:04.496045050 +0200 @@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] --if CONFIG['OS_TEST'] == 'arm' and CONFIG['HAVE_ARM_NEON']: +-if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: +if CONFIG['HAVE_ARM_NEON']: - CPP_SOURCES += [ - 'yuv_convert_arm.cpp', + ASFILES += [ + 'yuv_row_arm.s', ] diff --git a/sources b/sources index 7b21845..568e0de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -06a4c0fe8d3a979aea2fce8d0fdbf328 firefox-24.0.source.tar.bz2 +355e61a3356ca3408a8eaee7d2ada132 firefox-25.0.source.tar.bz2 diff --git a/xulrunner-24.0-s390-inlines.patch b/xulrunner-24.0-s390-inlines.patch index 92175a3..074f8d9 100644 --- a/xulrunner-24.0-s390-inlines.patch +++ b/xulrunner-24.0-s390-inlines.patch @@ -1,12 +1,12 @@ -diff -up xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp ---- xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-09-11 01:15:09.000000000 +0200 -+++ xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-09-13 13:39:16.908478613 +0200 -@@ -9,6 +9,8 @@ - #include "jsnum.h" - #include "jsscript.h" +diff -up xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp +--- xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-10-23 16:04:01.773093979 +0200 ++++ xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-10-23 16:04:44.551134551 +0200 +@@ -4,6 +4,8 @@ + * 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 "jscntxtinlines.h" + #include "vm/SPSProfiler.h" - #include "vm/StringBuffer.h" + #include "mozilla/DebugOnly.h" diff --git a/xulrunner.spec b/xulrunner.spec index 7619a83..9f5894e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 24.0 -Release: 3%{?pre_tag}%{?dist} +Version: 25.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -522,6 +522,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 23 2013 Martin Stransky - 25.0-1 +- Update to 25.0 Build 2 + * Tue Oct 15 2013 Karsten Hopp 24.0-3 - drop PPC-only rhbz-911314.patch, fixed upstream @@ -693,734 +696,3 @@ fi * Thu Oct 11 2012 Martin Stransky - 16.0.1-1 - Update to 16.0.1 -* Mon Oct 10 2012 Martin Stransky - 16.0-2 -- Fixed xulrunner launch script - -* Mon Oct 8 2012 Martin Stransky - 16.0-1 -- Update to 16.0 - -* Mon Sep 17 2012 Martin Stransky - 15.0.1-3 -- Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 - -* Fri Sep 14 2012 Martin Stransky - 15.0.1-2 -- Added build flags for second arches - -* Tue Sep 11 2012 Jan Horak - 15.0.1-1 -- Update to 15.0.1 - -* Wed Aug 22 2012 Martin Stransky - 15.0-2 -- Update to 15.0 - -* Thu Aug 9 2012 Jan Horak - 14.0.1-6 -- Added fix for mozbz#709732 - -* Wed Jul 25 2012 Dan Horák - 14.0.1-5 -- Added fix for secondary arches - mozbz#750620 - -* Sun Jul 22 2012 Fedora Release Engineering - 14.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jul 16 2012 Martin Stransky - 14.0.1-3 -- Update to 14.0.1 - -* Sat Jun 16 2012 Jan Horak - 13.0.1-1 -- Update to 13.0.1 - -* Wed Jun 5 2012 Martin Stransky - 13.0-2 -- src.rpm should include all patches - -* Mon Jun 4 2012 Martin Stransky - 13.0-1 -- Update to 13.0 - -* Mon May 28 2012 Martin Stransky - 12.0-7 -- More ppc(64) fixes - mozbz#746112 - -* Mon May 28 2012 Martin Stransky - 12.0-6 -- Added workaround for ppc(64) - mozbz#746112 - -* Mon May 7 2012 Dan Horák - 12.0-5 -- Used backported upstream patch from mozb#734335 for fixing the sps profiler build -- Fixed build of jemalloc on ppc (patch by Gustavo Luiz Duarte/IBM) - -* Fri May 4 2012 Dan Horák - 12.0-4 -- Added new patch for 691898 - backport from trunk -- Added build fix for secondary arches - -* Fri May 4 2012 Martin Stransky - 12.0-3 -- Added requires for nss-static (rhbz#717247) - -* Mon Apr 30 2012 Martin Stransky - 12.0-2 -- Enable ppc(64) paralell builds (rhbz#816612) - -* Tue Apr 24 2012 Martin Stransky - 12.0-1 -- Update to 12.0 - -* Tue Mar 13 2012 Martin Stransky - 11.0-3 -- Update to 11.0 -- Fixed libvpx-devel dependency - -* Fri Mar 9 2012 Martin Stransky - 11.0-1 -- Update to 11.0 Beta 7 - -* Fri Mar 09 2012 Dan Horák - 10.0.1-5 -- Add fix for secondary arches from mozb#691898 - -* Mon Feb 27 2012 Martin Stransky - 10.0.1-4 -- Added fix from rhbz#796929 - xulrunner doesn't compile on ARM - -* Tue Feb 16 2012 Martin Stransky - 10.0.1-3 -- Added fix for mozbz#727401 - -* Tue Feb 14 2012 Martin Stransky - 10.0.1-2 -- Allow network manager to handle the offline status - -* Thu Feb 9 2012 Jan Horak - 10.0.1-1 -- Update to 10.0.1 - -* Tue Jan 31 2012 Jan Horak - 10.0-1 -- Update to 10.0 - -* Mon Jan 30 2012 Tom Callaway 10.0-3 -- fix issues causing ftbfs in rawhide - -* Mon Jan 30 2012 Tom Callaway 10.0-2 -- rebuild against libvpx 1.0.0 (and BR 1.0.0 or greater) - -* Mon Jan 23 2012 Martin Stransky 10.0-1 -- Update to 10.0 Beta 6 - -* Thu Jan 19 2012 Dennis Gilmore - 9.0.1-4 -- add missing v from armv7hl and armv7hnl config options - -* Wed Jan 04 2012 Dan Horák - 9.0.1-3 -- fix build on secondary arches (cherry-picked from 13afcd4c097c) - -* Fri Dec 23 2011 Peter Robinson - 9.0.1-2 -- Add compile options for ARM hfp/sfp - RHBZ #738509 - -* Fri Dec 23 2011 Jan Horak - 9.0.1-1 -- Update to 9.0.1 - -* Tue Dec 20 2011 Jan Horak - 9.0-2 -- Update to 9.0 - -* Fri Dec 9 2011 Martin Stransky 9.0-1.beta5 -- Updated to 9.0 Beta 5 - -* Wed Dec 7 2011 Jan Horak - 8.0-5 -- Gnome 3 proxy settings are now honoured (mozbz#682832) - -* Tue Dec 6 2011 Tom Callaway 8.0-4 -- fix bug in npapi.h causing compile failures - -* Fri Nov 25 2011 Martin Stransky 8.0-3 -- s390 build fixes - -* Mon Nov 7 2011 Martin Stransky 8.0-1 -- Updated to 8.0 - -* Tue Oct 18 2011 Ville Skyttä - 7.0.1-5 -- Avoid %%post/un shell invocations - and dependencies (rhbz#736830). - -* Tue Oct 18 2011 Martin Stransky 7.0.1-4 -- Updated cairo dependency (rhbz#742853) - -* Tue Oct 11 2011 Dan Horák 7.0.1-3 -- fix build on secondary arches - -* Mon Oct 10 2011 Martin Stransky 7.0.1-2 -- Removed GRE stuff -- Removed xulrunner rpath (mozbz#686434) - -* Fri Sep 30 2011 Jan Horak - 7.0.1-1 -- Update to 7.0.1 - -* Tue Sep 27 2011 Jan Horak - 7.0-1 -- Update to 7.0 - -* Tue Sep 6 2011 Jan Horak - 6.0.2-1 -- Update to 6.0.2 - -* Wed Aug 31 2011 Jan Horak - 6.0-3 -- Distrust a specific Certificate Authority - -* Tue Aug 16 2011 Martin Stransky 6.0-2 -- Updated gtkmozembed patch - -* Tue Aug 16 2011 Martin Stransky 6.0-1 -- 6.0 - -* Thu Jun 30 2011 Martin Stransky 5.0-5 -- Fixed build on powerpc(64) - -* Tue Jun 28 2011 Dan Horák - 5.0-4 -- fix build on secondary arches with IPC enabled - -* Tue Jun 24 2011 Martin Stransky 5.0-3 -- libCurl build fix - -* Wed Jun 22 2011 Martin Stransky 5.0-2 -- Reverted mozbz#648156 - Remove gtkmozembed - -* Tue Jun 21 2011 Martin Stransky 5.0-1 -- 5.0 - -* Thu May 26 2011 Martin Stransky 2.0.1-2 -- Rebuild for new hunspell (rhbz#707760) - -* Thu Apr 28 2011 Christopher Aillon - 2.0.1-1 -- 2.0.1 - -* Thu Apr 21 2011 Christopher Aillon - 2.0-4 -- Split out mozilla crashreporter symbols to its own debuginfo package - -* Sun Apr 10 2011 Christopher Aillon - 2.0-3 -- Fix offline status issue on version upgrades -- Fix a hang with 20+ extensions - -* Mon Apr 4 2011 Christopher Aillon - 2.0-2 -- Fix SIGABRT in X_CloseDevice: XI_BadDevice -- Updates for NetworkManager 0.9 -- Updates for GNOME 3 - -* Tue Mar 22 2011 Christopher Aillon - 2.0-1 -- 2.0 - -* Fri Mar 18 2011 Christopher Aillon - 2.0-0.28 -- Update to 2.0 RC2 - -* Thu Mar 17 2011 Jan Horak - 2.0-0.27 -- Disabled gnomevfs -- Enabled gio -- Build with system libvpx - -* Wed Mar 9 2011 Christopher Aillon - 2.0-0.26 -- Update to 2.0 RC 1 - -* Sun Feb 27 2011 Christopher Aillon - 2.0-0.25 -- Make Firefox's User-Agent string match upstream's - -* Sat Feb 26 2011 Christopher Aillon - 2.0-0.24 -- Switch to using the omni chrome file format - -* Fri Feb 25 2011 Christopher Aillon - 2.0-0.23 -- Update to 2.0 Beta 12 - -* Sun Feb 13 2011 Dennis Gilmore 2.0-0.22 -- disable nanojit on sparc64 its not supported and doesnt get automatically switched off - -* Thu Feb 10 2011 Christopher Aillon - 2.0-0.21 -- Also provide arch-agnostic versions of gecko virtual provides - -* Thu Feb 10 2011 Christopher Aillon - 2.0-0.20 -- Introduce better versioning for our gecko virtual provides -- Now, the gecko-libs and gecko-devel virtual provides will be pinned - to an individual Gecko release, so packages can do things like - Requires: gecko-libs = 2.0-beta11 - BuildRequires: gecko-libs = 2.0-beta11 -- Final releases will be pinned to e.g. 2.0-1 regardless of %%{release} -- Also, make sure those virtual provides are arch-specific - -* Tue Feb 8 2011 Christopher Aillon - 2.0-0.19 -- Update to 2.0 Beta 11 - -* Wed Jan 26 2011 Christopher Aillon - 2.0-0.18 -- Fix issue with popup windows showing in the wrong place - -* Tue Jan 25 2011 Christopher Aillon - 2.0-0.17 -- Update to 2.0 Beta 10 - -* Fri Jan 21 2011 Dan Horák - 2.0-0.16.b9 -- updated the 64bit-big-endian patch (bmo#627664) -- added fix for build with --disable-methodjit (bmo#623277) - -* Fri Jan 14 2011 Christopher Aillon 2.0-0.15.b9 -- Update to 2.0 Beta 9 - -* Thu Jan 11 2011 Tom Callaway 2.0-0.14.b8 -- enable system sqlite (see https://fedorahosted.org/fpc/ticket/34) - -* Thu Dec 23 2010 Martin Stransky 2.0-0.13.b8 -- reverted fix for rhbz#658471 - -* Wed Dec 22 2010 Dan Horák - 2.0-0.11.b8 -- updated the 64bit-big-endian patch - -* Tue Dec 21 2010 Martin Stransky 2.0-0.11.b8 -- enable url-classifier and jar format for chrome files - -* Tue Dec 21 2010 Martin Stransky 2.0-0.10.b8 -- Update to 2.0b8 - -* Mon Dec 20 2010 Martin Stransky 2.0-0.9.b8 -- removed unused library path (rhbz#658471) - -* Fri Dec 17 2010 Dan Horák - 2.0-0.8.b7 -- disable the crash reporter on non-x86 arches -- add sparc64 as 64-bit arch - -* Tue Dec 14 2010 Jan Horak - 2.0-0.7.b7 -- Enable mozilla crash reporter - -* Thu Nov 11 2010 Dan Horák - 2.0-0.6.b7 -- The s390 patch is not needed anymore - -* Thu Nov 11 2010 Jan Horak - 2.0-0.5.b7 -- Update to 2.0b7 - -* Thu Nov 4 2010 Christopher Aillon 2.0-0.4.b6 -- Ensure that WM_CLASS matches the desktop file - -* Wed Nov 3 2010 Martin Stransky 2.0-0.3.b6 -- Libnotify rebuild (rhbz#649071) - -* Wed Sep 29 2010 jkeating - 2.0-0.2b6 -- Rebuilt for gcc bug 634757 - -* Tue Sep 21 2010 Martin Stransky 2.0-0.1.b6 -- Update to 2.0b6 - -* Tue Sep 7 2010 Tom "spot" Callaway 1.9.3.0-0.2.b4 -- spec file cleanup - -* Fri Aug 27 2010 Martin Stransky 1.9.3.0-0.1.b4 -- Update to 1.9.3.1 beta 4 - -* Mon Aug 16 2010 Martin Stransky 1.9.3.0-0.b3 -- Update to 1.9.3.1 beta 3 - -* Tue Jul 20 2010 Jan Horak - 1.9.2.7-1 -- Update to 1.9.2.7 - -* Wed Jul 1 2010 Martin Stransky 1.9.2.6-2 -- Disabled oopp on unsupported arches (rhbz#614363) - -* Wed Jun 30 2010 Jan Horak - 1.9.2.6-1 -- Update to 1.9.2.6 - -* Tue Jun 22 2010 Jan Horak - 1.9.2.4-1 -- Update to 1.9.2.4 - -* Tue Jun 15 2010 Dan Horák 1.9.2.3-2 -- Fixed build on s390 - -* Fri Apr 2 2010 Martin Stransky 1.9.2.3-1 -- Update to 1.9.2.3 - -* Tue Mar 23 2010 Jan Horak - 1.9.2.2-1 -- Update to 1.9.2.2 - -* Mon Mar 15 2010 Colin Walters - 1.9.2.1-4 -- Enable startup notification, closes #445543 - -* Thu Feb 18 2010 Jan Horak - 1.9.2.1-3 -- Added fix for mozbz#462919 - Override NSS database path - for xulrunner application - -* Wed Feb 17 2010 Martin Stransky 1.9.2.1-2 -- Added fix for #564184 - xulrunner-devel multilib conflict - -* Fri Jan 22 2010 Martin Stransky 1.9.2.1-1 -- Update to 1.9.2.1 - -* Wed Jan 18 2010 Martin Stransky 1.9.2.1-0.10.rc1 -- Update to 1.9.2.1 RC2 - -* Wed Jan 13 2010 Martin Stransky 1.9.2.1-0.9.rc1 -- Update to 1.9.2.1 RC1 - -* Mon Dec 21 2009 Martin Stransky 1.9.2.1-0.8.b5 -- Update to 1.9.2.1 Beta 5 - -* Thu Dec 17 2009 Martin Stransky 1.9.2.1-0.7.b4 -- Added fix for mozbz#543585 - jemalloc alignment assertion - and abort on Linux - -* Thu Dec 3 2009 Martin Stransky 1.9.2.1-0.6.b4 -- Added fix for #543585 - mozilla-plugin.pc contains incorrect CFLAGS - -* Fri Nov 27 2009 Martin Stransky 1.9.2.1-0.5.b4 -- Update to 1.9.2.1 Beta 4 - -* Mon Nov 23 2009 Martin Stransky 1.9.2.1-0.4.b3 -- added -unstable.pc files for compatibility with 1.9.1 - -* Fri Nov 20 2009 Martin Stransky 1.9.2.1-0.3.b3 -- Necko wifi monitor disabled -- fixed a dependency (#539261) -- added source URL (#521704) - -* Wed Nov 18 2009 Martin Stransky 1.9.2.1-0.2.b3 -- Rebase to 1.9.2.1 Beta 3 - -* Fri Nov 13 2009 Martin Stransky 1.9.2.1-0.1.beta2 -- Rebase to 1.9.2.1 Beta 2 -- fix the sqlite runtime requires again (#480989), add a check - that the sqlite requires is sane (by Stepan Kasal) - -* Thu Nov 5 2009 Jan Horak - 1.9.1.5-1 -- Update to 1.9.1.5 - -* Mon Oct 26 2009 Jan Horak - 1.9.1.4-1 -- Update to 1.9.1.4 - -* Mon Sep 7 2009 Jan Horak - 1.9.1.3-1 -- Update to 1.9.1.3 - -* Fri Aug 21 2009 Jan Horak - 1.9.1.2-4 -- Added libnotify support - -* Wed Aug 12 2009 Martin Stransky 1.9.1.2-3 -- Added fix from #516118 - Headers not C89 - -* Mon Aug 6 2009 Martin Stransky 1.9.1.2-2 -- Rebuilt - -* Mon Aug 3 2009 Martin Stransky 1.9.1.2-1 -- Update to 1.9.1.2 - -* Mon Jul 27 2009 Fedora Release Engineering - 1.9.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Fri Jul 17 2009 Christopher Aillon - 1.9.1.1-1 -- Update to 1.9.1.1 - -* Mon Jul 13 2009 Jan Horak - 1.9.1-3 -- Fixed wrong version of Firefox when loading 'about:' as location -- Added patch to compile against latest GTK - -* Tue Jun 30 2009 Yanko Kaneti - 1.9.1-2 -- Build using system hunspell - -* Tue Jun 30 2009 Christopher Aillon 1.9.1-1 -- Update to 1.9.1 final release - -* Wed Jun 24 2009 Martin Stransky 1.9.1-0.23 -- Rebuilt because of gcc update (#506952) - -* Thu Jun 18 2009 Martin Stransky 1.9.1-0.22 -- Backed out last change, it does not work inside mock (koji) - -* Tue Jun 16 2009 Stepan Kasal 1.9.1-0.21 -- require sqlite of version >= what was used at buildtime (#480989) -- in devel subpackage, drop version from sqlite-devel require; that's - handled indirectly through the versioned require in main package - -* Mon Apr 27 2009 Christopher Aillon 1.9.1-0.20 -- 1.9.1 beta 4 - -* Fri Mar 27 2009 Christopher Aillon 1.9.1-0.11 -- Add patches for MFSA-2009-12, MFSA-2009-13 - -* Fri Mar 13 2009 Christopher Aillon 1.9.1-0.10 -- 1.9.1 beta 3 - -* Fri Feb 27 2009 Martin Stransky 1.9.1-0.9 -- Build fix for pango 1.23 -- Misc. build fixes - -* Thu Feb 26 2009 Fedora Release Engineering - 1.9.1-0.8.beta2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Jan 28 2009 Christopher Aillon 1.9.1-0.7 -- Re-enable NM by default - -* Wed Jan 7 2009 Martin Stransky 1.9.1-0.6 -- Copied mozilla-config.h to stable include dir (#478445) - -* Mon Dec 22 2008 Christopher Aillon 1.9.1-0.5 -- Typo fix - -* Sat Dec 20 2008 Christopher Aillon 1.9.1-0.4 -- 1.9.1 beta 2 - -* Tue Dec 9 2008 Christopher Aillon 1.9.1-0.3 -- Mark this as a pre-release - -* Tue Dec 9 2008 Christopher Aillon 1.9.1-0.2 -- Add needed -devel requires to the -devel package - -* Thu Dec 4 2008 Christopher Aillon 1.9.1-0.1 -- 1.9.1 beta 1 - -* Wed Nov 12 2008 Christopher Aillon 1.9.0.4-1 -- Update to 1.9.0.4 - -* Mon Oct 27 2008 Christopher Aillon 1.9.0.2-5 -- Password manager fixes from upstream - -* Tue Oct 7 2008 Marco Pesenti Gritti 1.9.0.2-4 -- Add missing dependency on python-devel - -* Sun Oct 5 2008 Christopher Aillon 1.9.0.2-3 -- Enable PyXPCOM - -* Thu Sep 25 2008 Martin Stransky 1.9.0.2-2 -- Build with system cairo (#463341) - -* Tue Sep 23 2008 Christopher Aillon 1.9.0.2-1 -- Update to 1.9.0.2 - -* Wed Jul 23 2008 Christopher Aillon 1.9.0.1-2 -- Disable system hunspell for now as it's causing some crashes (447444) - -* Wed Jul 16 2008 Christopher Aillon 1.9.0.1-1 -- Update to 1.9.0.1 - -* Tue Jun 17 2008 Christopher Aillon 1.9-1 -- Update to 1.9 final - -* Thu May 29 2008 Christopher Aillon 1.9-0.63 -- Simplify PS/PDF operators - -* Thu May 22 2008 Christopher Aillon 1.9-0.62 -- Upstream patch to fsync() less - -* Thu May 08 2008 Colin Walters 1.9-0.61 -- Ensure we enable startup notification; add BR and modify config - (bug #445543) - -* Wed Apr 30 2008 Christopher Aillon 1.9-0.60 -- Some files moved to mozilla-filesystem; kill them and add the Req - -* Mon Apr 28 2008 Christopher Aillon 1.9-0.59 -- Clean up the %%files list and get rid of the executable bit on some files - -* Sat Apr 26 2008 Christopher Aillon 1.9-0.58 -- Fix font scaling - -* Fri Apr 25 2008 Martin Stransky 1.9-0.57 -- Enabled phishing protection (#443403) - -* Wed Apr 23 2008 Martin Stransky 1.9-0.56 -- Changed "__ppc64__" to "__powerpc64__", - "__ppc64__" doesn't work anymore -- Added fix for #443725 - Critical hanging bug with fix - available upstream (mozbz#429903) - -* Fri Apr 18 2008 Martin Stransky 1.9-0.55 -- Fixed multilib issues, added starting script instead of a symlink - to binary (#436393) - -* Sat Apr 12 2008 Christopher Aillon 1.9-0.54 -- Add upstream patches for dpi, toolbar buttons, and invalid keys -- Re-enable system cairo - -* Mon Apr 7 2008 Christopher Aillon 1.9-0.53 -- Spec cleanups - -* Wed Apr 2 2008 Christopher Aillon 1.9-0.52 -- Beta 5 - -* Mon Mar 31 2008 Christopher Aillon 1.9-0.51 -- Beta 5 RC2 - -* Thu Mar 27 2008 Christopher Aillon 1.9-0.50 -- Update to latest trunk (2008-03-27) - -* Wed Mar 26 2008 Christopher Aillon 1.9-0.49 -- Update to latest trunk (2008-03-26) - -* Tue Mar 25 2008 Christopher Aillon 1.9-0.48 -- Update to latest trunk (2008-03-25) - -* Mon Mar 24 2008 Christopher Aillon 1.9-0.47 -- Update to latest trunk (2008-03-24) - -* Thu Mar 20 2008 Christopher Aillon 1.9-0.46 -- Update to latest trunk (2008-03-20) - -* Mon Mar 17 2008 Christopher Aillon 1.9-0.45 -- Update to latest trunk (2008-03-17) - -* Mon Mar 17 2008 Christopher Aillon 1.9-0.44 -- Revert to trunk from the 15th to fix crashes on HTTPS sites - -* Sun Mar 16 2008 Christopher Aillon 1.9-0.43 -- Update to latest trunk (2008-03-16) -- Add patch to negate a11y slowdown on some pages (#431162) - -* Sat Mar 15 2008 Christopher Aillon 1.9-0.42 -- Update to latest trunk (2008-03-15) - -* Sat Mar 15 2008 Christopher Aillon 1.9-0.41 -- Avoid conflicts between gecko debuginfo packages - -* Wed Mar 12 2008 Christopher Aillon 1.9-0.40 -- Update to latest trunk (2008-03-12) - -* Tue Mar 11 2008 Christopher Aillon 1.9-0.39 -- Update to latest trunk (2008-03-11) - -* Mon Mar 10 2008 Christopher Aillon 1.9-0.38 -- Update to latest trunk (2008-03-10) - -* Sun Mar 9 2008 Christopher Aillon 1.9-0.37 -- Update to latest trunk (2008-03-09) - -* Fri Mar 7 2008 Christopher Aillon 1.9-0.beta4.36 -- Update to latest trunk (2008-03-07) - -* Thu Mar 6 2008 Christopher Aillon 1.9-0.beta4.35 -- Update to latest trunk (2008-03-06) - -* Tue Mar 4 2008 Christopher Aillon 1.9-0.beta4.34 -- Update to latest trunk (2008-03-04) - -* Sun Mar 2 2008 Christopher Aillon 1.9-0.beta3.33 -- Update to latest trunk (2008-03-02) - -* Sat Mar 1 2008 Christopher Aillon 1.9-0.beta3.32 -- Update to latest trunk (2008-03-01) - -* Fri Feb 29 2008 Christopher Aillon 1.9-0.beta3.31 -- Update to latest trunk (2008-02-29) - -* Thu Feb 28 2008 Christopher Aillon 1.9-0.beta3.30 -- Update to latest trunk (2008-02-28) - -* Wed Feb 27 2008 Christopher Aillon 1.9-0.beta3.29 -- Update to latest trunk (2008-02-27) - -* Tue Feb 26 2008 Christopher Aillon 1.9-0.beta3.28 -- Update to latest trunk (2008-02-26) - -* Sat Feb 23 2008 Christopher Aillon 1.9-0.beta3.27 -- Update to latest trunk (2008-02-23) - -* Fri Feb 22 2008 Christopher Aillon 1.9-0.beta3.26 -- Update to latest trunk (2008-02-22) - -* Thu Feb 21 2008 Christopher Aillon 1.9-0.beta3.25 -- Update to latest trunk (2008-02-21) - -* Wed Feb 20 2008 Christopher Aillon 1.9-0.beta3.24 -- Update to latest trunk (2008-02-20) - -* Sun Feb 17 2008 Christopher Aillon 1.9-0.beta3.23 -- Update to latest trunk (2008-02-17) - -* Fri Feb 15 2008 Christopher Aillon 1.9-0.beta3.22 -- Update to latest trunk (2008-02-15) - -* Thu Feb 14 2008 Christopher Aillon 1.9-0.beta3.21 -- Update to latest trunk (2008-02-14) -- Use system hunspell - -* Mon Feb 11 2008 Christopher Aillon 1.9-0.beta2.19 -- Update to latest trunk (2008-02-11) - -* Mon Feb 11 2008 Adam Jackson 1.9-0.beta2.19 -- STRIP="/bin/true" on the %%make line so xulrunner-debuginfo contains, - you know, debuginfo. - -* Sun Feb 10 2008 Christopher Aillon 1.9-0.beta2.18 -- Update to latest trunk (2008-02-10) - -* Sat Feb 9 2008 Christopher Aillon 1.9-0.beta2.17 -- Update to latest trunk (2008-02-09) - -* Wed Feb 6 2008 Christopher Aillon 1.9-0.beta2.16 -- Update to latest trunk (2008-02-06) - -* Tue Jan 29 2008 Christopher Aillon 1.9-0.beta2.15 -- Update to latest trunk (2008-01-30) - -* Wed Jan 25 2008 Martin Stransky 1.9-0.beta2.14 -- rebuild agains new nss -- enabled gnome vfs - -* Wed Jan 23 2008 Martin Stransky 1.9-0.beta2.13 -- fixed stable pkg-config files (#429654) -- removed sqlite patch - -* Mon Jan 21 2008 Christopher Aillon 1.9-0.beta2.12 -- Update to latest trunk (2008-01-21) - -* Tue Jan 15 2008 Christopher Aillon 1.9-0.beta2.11 -- Update to latest trunk (2008-01-15) -- Now with system extensions directory support - -* Sat Jan 13 2008 Christopher Aillon 1.9-0.beta2.10 -- Update to latest trunk (2008-01-13) -- Use CFLAGS instead of configure arguments -- Random cleanups: BuildRequires, scriptlets, prefs, etc. - -* Sat Jan 12 2008 Christopher Aillon 1.9-0.beta2.9 -- Provide gecko-devel-unstable as well - -* Wed Jan 9 2008 Martin Stransky 1.9-0.beta2.8 -- divided devel package to devel and devel-unstable - -* Mon Jan 7 2008 Martin Stransky 1.9-0.beta2.7 -- removed fedora specific pkg-config files -- updated to the latest trunk (2008-01-07) -- removed unnecessary patches -- fixed idl dir (#427965) - -* Thu Jan 3 2008 Christopher Aillon 1.9-0.beta2.6 -- Re-enable camellia256 support now that NSS supports it - -* Thu Jan 3 2008 Martin Stransky 1.9-0.beta2.5 -- updated to the latest trunk (2008-01-03) - -* Mon Dec 24 2007 Christopher Aillon 1.9-0.beta2.4 -- Don't Provide webclient (xulrunner is not itself a webclient) -- Don't Obsolete old firefox, only firefox-devel -- Kill legacy obsoletes (phoenix, etc) that were never in rawhide - -* Thu Dec 21 2007 Martin Stransky 1.9-0.beta2.3 -- added java and plugin subdirs to plugin includes - -* Thu Dec 20 2007 Martin Stransky 1.9-0.beta2.2 -- dependency fixes, obsoletes firefox < 3 and firefox-devel now - -* Wed Dec 12 2007 Martin Stransky 1.9-0.beta2.1 -- updated to Beta 2. -- moved SDK to xulrunner-sdk - -* Thu Dec 06 2007 Martin Stransky 1.9-0.beta1.4 -- fixed mozilla-plugin.pc (#412971) - -* Tue Nov 27 2007 Martin Stransky 1.9-0.beta1.3 -- export /etc/gre.d/gre.conf (it's used by python gecko applications) - -* Mon Nov 26 2007 Martin Stransky 1.9-0.beta1.2 -- added xulrunner/js include dir to xulrunner-js - -* Tue Nov 20 2007 Martin Stransky 1.9-0.beta1.1 -- update to beta 1 - -* Mon Nov 19 2007 Martin Stransky 1.9-0.alpha9.6 -- packed all gecko libraries (#389391) - -* Thu Nov 15 2007 Martin Stransky 1.9-0.alpha9.5 -- registered xulrunner libs system-wide -- added xulrunner-gtkmozembed.pc - -* Wed Nov 14 2007 Martin Stransky 1.9-0.alpha9.4 -- added proper nss/nspr dependencies - -* Wed Nov 14 2007 Martin Stransky 1.9-0.alpha9.3 -- more build fixes, use system nss libraries - -* Tue Nov 6 2007 Martin Stransky 1.9-0.alpha9.2 -- build fixes - -* Tue Oct 30 2007 Martin Stransky 1.9-0.alpha9.1 -- updated to the latest trunk - -* Thu Sep 20 2007 David Woodhouse 1.9-0.alpha7.4 -- build fixes for ppc/ppc64 - -* Tue Sep 20 2007 Martin Stransky 1.9-0.alpha7.3 -- removed conflicts with the current gecko-based apps -- added updated ppc64 patch - -* Tue Sep 18 2007 Martin Stransky 1.9-0.alpha7.2 -- build fixes - -* Wed Sep 5 2007 Christopher Aillon 1.9-0.alpha7.1 -- Initial cut at XULRunner 1.9 Alpha 7 -- Temporarily revert camellia 256 support since our nss doesn't support it yet From 843eff4452d9f9eae0975cb9f7b36120f1d02d2d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 30 Oct 2013 09:05:02 +0100 Subject: [PATCH 387/486] Update to Firefox 25 Build 3 --- sources | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 568e0de..abe35c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -355e61a3356ca3408a8eaee7d2ada132 firefox-25.0.source.tar.bz2 +90ac047e83079a9046192c732e195329 firefox-25.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 9f5894e..e0fdea3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 25.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -522,6 +522,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 30 2013 Martin Stransky - 25.0-2 +- Update to 25.0 Build 3 + * Wed Oct 23 2013 Martin Stransky - 25.0-1 - Update to 25.0 Build 2 From 9b39528c235888dfc1959e787c909a96aab4c083 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 8 Nov 2013 17:05:02 +0100 Subject: [PATCH 388/486] Fixed rhbz#974718 - Segfault in FileBlockCache::Run when playing a movie on ppc --- mozilla-885002.patch | 30 ++++++++++++++++++++++++++++++ xulrunner.spec | 17 +++++++++++------ 2 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 mozilla-885002.patch diff --git a/mozilla-885002.patch b/mozilla-885002.patch new file mode 100644 index 0000000..e48c89a --- /dev/null +++ b/mozilla-885002.patch @@ -0,0 +1,30 @@ +# HG changeset patch +# Parent d8fd5706493e19bcb85443316a4c180849f5d247 +# User Steve Singer +Bug 885002 - Fix casting on 64 bit Big Endian platforms. + + +diff --git a/content/media/FileBlockCache.h b/content/media/FileBlockCache.h +--- a/content/media/FileBlockCache.h ++++ b/content/media/FileBlockCache.h +@@ -138,19 +138,17 @@ public: + + bool IsEmpty() { + return nsDeque::GetSize() == 0; + } + + private: + int32_t ObjectAt(int32_t aIndex) { + void* v = nsDeque::ObjectAt(aIndex); +- // Ugly hack to work around "casting 64bit void* to 32bit int loses precision" +- // error on 64bit Linux. +- return *(reinterpret_cast(&v)); ++ return reinterpret_cast(v); + } + }; + + private: + int64_t BlockIndexToOffset(int32_t aBlockIndex) { + return static_cast(aBlockIndex) * BLOCK_SIZE; + } + diff --git a/xulrunner.spec b/xulrunner.spec index e0fdea3..b034763 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 25.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,11 +97,12 @@ Patch17: xulrunner-24.0-gcc47.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch +Patch20: mozilla-885002.patch # Fedora specific patches -Patch20: mozilla-193-pkgconfig.patch +Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages -Patch24: rhbz-966424.patch +Patch204: rhbz-966424.patch # Upstream patches @@ -237,10 +238,10 @@ cd %{tarballdir} %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines +%patch20 -p1 -b .885002 -%patch20 -p2 -b .pk - -%patch24 -p1 -b .966424 +%patch200 -p2 -b .pk +%patch204 -p1 -b .966424 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -522,6 +523,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Nov 8 2013 Martin Stransky - 25.0-3 +- Fixed rhbz#974718 - Segfault in FileBlockCache::Run + when playing a movie on ppc + * Wed Oct 30 2013 Martin Stransky - 25.0-2 - Update to 25.0 Build 3 From 3bf05d82030559830c17379a602bab5a179078f9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 12 Nov 2013 11:45:43 +0100 Subject: [PATCH 389/486] rhbz#1010916 - enabled pluseaudio backend --- mozilla-837563.patch | 144 +++++++++++++++++++++++++++++++++++++++++++ xulrunner-mozconfig | 1 + xulrunner.spec | 8 ++- 3 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 mozilla-837563.patch diff --git a/mozilla-837563.patch b/mozilla-837563.patch new file mode 100644 index 0000000..40121a2 --- /dev/null +++ b/mozilla-837563.patch @@ -0,0 +1,144 @@ +# HG changeset patch +# User Matthew Gregan +# Date 1383172648 -46800 +# Thu Oct 31 11:37:28 2013 +1300 +# Node ID 2f6bd7da0756edaad53b601b18cf0c0e27f5f676 +# Parent 0f6219c6fb61f3f5e6775d269a6cf52305021024 +Bug 837563 - Enable libcubeb's PulseAudio backend. r=glandium + +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -5522,65 +5522,68 @@ fi + if test -n "$MOZ_TREMOR"; then + AC_DEFINE(MOZ_TREMOR) + fi + + if test -n "$MOZ_OPUS"; then + AC_DEFINE(MOZ_OPUS) + fi + +-dnl ======================================================== +-dnl = Check alsa availability on Linux if using sydneyaudio +-dnl ======================================================== +- +-dnl If using sydneyaudio with Linux, ensure that the alsa library is available ++dnl ==================================================== ++dnl = Check alsa availability on Linux if using libcubeb ++dnl ==================================================== ++ ++dnl If using libcubeb with Linux, ensure that the alsa library is available + if test -n "$MOZ_CUBEB" -a "$OS_TARGET" = "Linux"; then + MOZ_ALSA=1 + fi + + MOZ_ARG_ENABLE_BOOL(alsa, + [ --enable-alsa Enable Alsa support (default on Linux)], +-MOZ_ALSA=1, +-MOZ_ALSA=) ++ MOZ_ALSA=1, ++ MOZ_ALSA=) + + if test -n "$MOZ_ALSA"; then + AC_DEFINE(MOZ_CUBEB) + PKG_CHECK_MODULES(MOZ_ALSA, alsa, , + [echo "$MOZ_ALSA_PKG_ERRORS" + AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) + fi + + AC_SUBST(MOZ_ALSA) + AC_SUBST(MOZ_ALSA_CFLAGS) + AC_SUBST(MOZ_ALSA_LIBS) + + dnl ======================================================== +-dnl = Enable PulseAudio +-dnl ======================================================== +- +-MOZ_ARG_ENABLE_BOOL(pulseaudio, +-[ --enable-pulseaudio Enable PulseAudio support (experimental)], +-MOZ_PULSEAUDIO=1, +-MOZ_PULSEAUDIO=) ++dnl = Disable PulseAudio ++dnl ======================================================== ++ ++dnl If using libcubeb with Linux, ensure that the PA library is available ++if test -n "$MOZ_CUBEB" -a "$OS_TARGET" = "Linux" -a -z "$MOZ_B2G"; then ++ MOZ_PULSEAUDIO=1 ++fi ++ ++MOZ_ARG_DISABLE_BOOL(pulseaudio, ++[ --disable-pulseaudio Disable PulseAudio support], ++ MOZ_PULSEAUDIO=, ++ MOZ_PULSEAUDIO=1) + + if test -n "$MOZ_PULSEAUDIO"; then + AC_DEFINE(MOZ_CUBEB) + if test -z "$gonkdir"; then + PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , + [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" + AC_MSG_ERROR([pulseaudio audio backend requires libpulse development package])]) + else + MOZ_PULSEAUDIO_CFLAGS="-I$gonkdir/external/pulseaudio/pulseaudio/src" +- MOZ_PULSEAUDIO_LIBS="-lpulse" + fi + fi + + AC_SUBST(MOZ_PULSEAUDIO) + AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) +-AC_SUBST(MOZ_PULSEAUDIO_LIBS) + + dnl ======================================================== + dnl = Enable GStreamer + dnl ======================================================== + if test "$OS_TARGET" = "Linux"; then + MOZ_GSTREAMER=1 + fi + +diff --git a/media/webrtc/signaling/test/Makefile.in b/media/webrtc/signaling/test/Makefile.in +--- a/media/webrtc/signaling/test/Makefile.in ++++ b/media/webrtc/signaling/test/Makefile.in +@@ -18,21 +18,16 @@ LIBS = \ + $(NULL) + + ifdef MOZ_CUBEB + ifdef MOZ_ALSA + LIBS += \ + $(MOZ_ALSA_LIBS) \ + $(NULL) + endif +-ifdef MOZ_PULSEAUDIO +-LIBS += \ +- $(MOZ_PULSEAUDIO_LIBS) \ +- $(NULL) +-endif + endif + + ifeq ($(OS_TARGET),Android) + LIBS += \ + $(STLPORT_LDFLAGS) \ + $(STLPORT_LIBS) \ + $(NULL) + CPPFLAGS += \ +diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in +--- a/toolkit/library/Makefile.in ++++ b/toolkit/library/Makefile.in +@@ -428,19 +428,16 @@ OS_LIBS += $(call EXPAND_LIBNAME,secur32 + endif + endif + + + ifdef MOZ_CUBEB + ifdef MOZ_ALSA + EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) + endif +-ifdef MOZ_PULSEAUDIO +-EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) +-endif + endif + + ifdef HAVE_CLOCK_MONOTONIC + EXTRA_DSO_LDOPTS += $(REALTIME_LIBS) + endif + + ifeq (android,$(MOZ_WIDGET_TOOLKIT)) + OS_LIBS += -lGLESv2 diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 7fed6ad..1ceaaf2 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -33,6 +33,7 @@ ac_add_options --disable-gnomevfs ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer +ac_add_options --enable-pulseaudio export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index b034763..89af4c9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 25.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -105,6 +105,7 @@ Patch200: mozilla-193-pkgconfig.patch Patch204: rhbz-966424.patch # Upstream patches +Patch300: mozilla-837563.patch # --------------------------------------------------- @@ -243,6 +244,8 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 +%patch300 -p1 -b .837563 + %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -523,6 +526,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 12 2013 Martin Stransky - 25.0-4 +- rhbz#1010916 - enabled pluseaudio backend + * Fri Nov 8 2013 Martin Stransky - 25.0-3 - Fixed rhbz#974718 - Segfault in FileBlockCache::Run when playing a movie on ppc From b70d8a4e5598acd04dba950b306131177314f34d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 12 Nov 2013 12:37:32 +0100 Subject: [PATCH 390/486] Added pulseaudio-libs-devel build dependency --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 89af4c9..6bf4306 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -137,6 +137,7 @@ BuildRequires: mesa-libGL-devel BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} BuildRequires: autoconf213 +BuildRequires: pulseaudio-libs-devel Requires: mozilla-filesystem %if %{?system_nss} From c37ce403ffa1561f6fb92d700940e9fc1049b41c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 21 Nov 2013 12:28:05 +0100 Subject: [PATCH 391/486] rhbz#1007603 - NSS and cert9 (sql): firefox crash on exit with https-everywhere installed --- mozilla-938730.patch | 36 ++++++++++++++++++++++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 mozilla-938730.patch diff --git a/mozilla-938730.patch b/mozilla-938730.patch new file mode 100644 index 0000000..53ff440 --- /dev/null +++ b/mozilla-938730.patch @@ -0,0 +1,36 @@ +diff --git a/storage/src/Makefile.in b/storage/src/Makefile.in +--- a/storage/src/Makefile.in ++++ b/storage/src/Makefile.in +@@ -11,24 +11,32 @@ VPATH = @srcdir@ + include $(DEPTH)/config/autoconf.mk + + MODULE_NAME = mozStorageModule + LIBXUL_LIBRARY = 1 + + # Don't use the jemalloc allocator on Android, because we can't guarantee + # that Gecko will configure sqlite before it is first used (bug 730495). + # ++# Don't use the jemalloc allocator when using system NSS. Linked in libraries ++# (such as NSS) might trigger an initialization of sqlite and allocation ++# of memory using the default allocator, prior to the storage service ++# registering its allocator, causing memory management failures (bug 938730). ++# + # Note: On Windows our sqlite build assumes we use jemalloc. If you disable + # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef + # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in. ++ ++ifndef _USE_SYSTEM_NSS + ifdef MOZ_MEMORY + ifneq ($(OS_TARGET), Android) + DEFINES += -DMOZ_STORAGE_MEMORY + endif + endif ++endif + + # For nsDependentJSString + LOCAL_INCLUDES = \ + $(SQLITE_CFLAGS) \ + -I$(topsrcdir)/db/sqlite3/src \ + -I$(topsrcdir)/dom/base \ + $(NULL) + diff --git a/xulrunner.spec b/xulrunner.spec index 6bf4306..c665024 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 25.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -106,6 +106,7 @@ Patch204: rhbz-966424.patch # Upstream patches Patch300: mozilla-837563.patch +Patch301: mozilla-938730.patch # --------------------------------------------------- @@ -246,6 +247,7 @@ cd %{tarballdir} %patch204 -p1 -b .966424 %patch300 -p1 -b .837563 +%patch301 -p1 -b .938730 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -527,6 +529,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 21 2013 Martin Stransky - 25.0-5 +- Fixed rhbz#1007603 - NSS and cert9 (sql): firefox crash on exit + with https-everywhere installed + * Tue Nov 12 2013 Martin Stransky - 25.0-4 - rhbz#1010916 - enabled pluseaudio backend From 3883b0733b3347d3a7b85a66d9268aa364c8fb94 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 9 Dec 2013 14:50:04 +0100 Subject: [PATCH 392/486] Update to 26.0 Build 2 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index abe35c9..dde4bb6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -90ac047e83079a9046192c732e195329 firefox-25.0.source.tar.bz2 +91ce51cc6474f1269484e5327643a59c firefox-26.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index c665024..e2de779 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 25.0 -Release: 5%{?pre_tag}%{?dist} +Version: 26.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -529,6 +529,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Dec 9 2013 Martin Stransky - 26.0-1 +- Update to 26.0 Build 2 + * Thu Nov 21 2013 Martin Stransky - 25.0-5 - Fixed rhbz#1007603 - NSS and cert9 (sql): firefox crash on exit with https-everywhere installed From 4de5e6b42ed9b7824635020d69193b7c707a512e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 9 Dec 2013 15:21:46 +0100 Subject: [PATCH 393/486] Update patches to FF26 --- mozilla-938730.patch | 19 +++++-------------- mozilla-build.patch | 16 +++++++++------- xulrunner-24.0-gcc47.patch | 12 ++++++------ xulrunner-install-dir.patch | 19 ++++++++----------- xulrunner.spec | 4 ++-- 5 files changed, 30 insertions(+), 40 deletions(-) diff --git a/mozilla-938730.patch b/mozilla-938730.patch index 53ff440..3b84553 100644 --- a/mozilla-938730.patch +++ b/mozilla-938730.patch @@ -1,12 +1,7 @@ -diff --git a/storage/src/Makefile.in b/storage/src/Makefile.in ---- a/storage/src/Makefile.in -+++ b/storage/src/Makefile.in -@@ -11,24 +11,32 @@ VPATH = @srcdir@ - include $(DEPTH)/config/autoconf.mk - - MODULE_NAME = mozStorageModule - LIBXUL_LIBRARY = 1 - +diff -up mozilla-release/storage/src/Makefile.in.938730 mozilla-release/storage/src/Makefile.in +--- mozilla-release/storage/src/Makefile.in.938730 2013-12-09 15:15:44.708527295 +0100 ++++ mozilla-release/storage/src/Makefile.in 2013-12-09 15:17:16.119682503 +0100 +@@ -6,14 +6,23 @@ # Don't use the jemalloc allocator on Android, because we can't guarantee # that Gecko will configure sqlite before it is first used (bug 730495). # @@ -26,11 +21,7 @@ diff --git a/storage/src/Makefile.in b/storage/src/Makefile.in endif endif +endif ++ # For nsDependentJSString LOCAL_INCLUDES = \ - $(SQLITE_CFLAGS) \ - -I$(topsrcdir)/db/sqlite3/src \ - -I$(topsrcdir)/dom/base \ - $(NULL) - diff --git a/mozilla-build.patch b/mozilla-build.patch index 1dd29d0..be73cdf 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,6 +1,7 @@ ---- mozilla-release/security/build/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 -+++ mozilla-release/security/build/Makefile.in 2013-06-18 14:01:41.940378194 +0200 -@@ -133,7 +133,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +diff -up mozilla-release/security/build/Makefile.in.build mozilla-release/security/build/Makefile.in +--- mozilla-release/security/build/Makefile.in.build 2013-12-05 17:07:53.000000000 +0100 ++++ mozilla-release/security/build/Makefile.in 2013-12-09 15:10:17.177970414 +0100 +@@ -128,7 +128,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 @@ -8,11 +9,12 @@ DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" ifeq ($(OS_ARCH),WINNT) DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t" ---- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 -+++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-06-18 14:01:18.659377663 +0200 -@@ -86,7 +86,6 @@ endif - CSRCS += md4.c +diff -up mozilla-release/security/manager/ssl/src/Makefile.in.build mozilla-release/security/manager/ssl/src/Makefile.in +--- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-12-09 15:10:17.177970414 +0100 ++++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-12-09 15:11:02.282047401 +0100 +@@ -6,7 +6,6 @@ + EXPORT_LIBRARY = 1 DEFINES += \ - -DNSS_ENABLE_ECC \ -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ diff --git a/xulrunner-24.0-gcc47.patch b/xulrunner-24.0-gcc47.patch index a6bff8e..28de75f 100644 --- a/xulrunner-24.0-gcc47.patch +++ b/xulrunner-24.0-gcc47.patch @@ -1,9 +1,9 @@ -diff -up xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in ---- xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-09-11 01:15:24.000000000 +0200 -+++ xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-09-13 13:33:49.866875578 +0200 -@@ -60,6 +60,9 @@ $(DIST)/bin/crashreporter.crt: $(topsrcd - $(PYTHON) $(srcdir)/certdata2pem.py < $< > $@ - endif +diff -up mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-release/toolkit/crashreporter/client/Makefile.in +--- mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-12-09 15:12:50.659231760 +0100 ++++ mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-12-09 15:13:45.448324783 +0100 +@@ -42,6 +42,9 @@ endif + + ifdef MOZ_WIDGET_GTK +# Needed for moz_free +LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch index e788fa0..9527700 100644 --- a/xulrunner-install-dir.patch +++ b/xulrunner-install-dir.patch @@ -1,8 +1,7 @@ -diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/config/baseconfig.mk ---- mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 -+++ mozilla-aurora-7676a9a06403/config/baseconfig.mk 2012-09-26 10:13:45.258240426 +0200 -@@ -2,7 +2,7 @@ INCLUDED_AUTOCONF_MK = 1 - +diff -up mozilla-release/config/baseconfig.mk.orig mozilla-release/config/baseconfig.mk +--- mozilla-release/config/baseconfig.mk.orig 2013-12-09 15:07:53.357724904 +0100 ++++ mozilla-release/config/baseconfig.mk 2013-12-09 15:08:35.819797392 +0100 +@@ -1,6 +1,6 @@ includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) @@ -10,12 +9,10 @@ diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-767 sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) DIST = $(DEPTH)/dist -diff -up mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk ---- mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 -+++ mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk 2012-09-26 10:14:07.353351833 +0200 -@@ -1,6 +1,6 @@ - INCLUDED_AUTOCONF_MK = 1 - +diff -up mozilla-release/js/src/config/baseconfig.mk.orig mozilla-release/js/src/config/baseconfig.mk +--- mozilla-release/js/src/config/baseconfig.mk.orig 2013-12-09 15:07:53.357724904 +0100 ++++ mozilla-release/js/src/config/baseconfig.mk 2013-12-09 15:09:06.906850462 +0100 +@@ -1,4 +1,4 @@ -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +installdir = $(libdir)/$(MOZ_APP_NAME) sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) diff --git a/xulrunner.spec b/xulrunner.spec index e2de779..1e7983b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -235,10 +235,10 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p1 -b .build +%patch2 -p1 -b .bld %patch3 -p2 -b .arm %patch14 -p2 -b .chromium-types -%patch17 -p2 -b .gcc47 +%patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .885002 From 8b10ed3072926f67c75cdc33cc924524f92cff4a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 10 Dec 2013 14:48:53 +0100 Subject: [PATCH 394/486] Arm build fix --- mozilla-build-arm.patch | 15 ++++++++++++--- xulrunner.spec | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 0fed214..f2885f8 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,6 +1,15 @@ -diff -up xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build.arm xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build ---- xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build.arm 2013-10-23 15:52:17.056493264 +0200 -+++ xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build 2013-10-23 16:03:04.496045050 +0200 +--- mozilla-release/gfx/layers/BufferUnrotate.cpp.old 2013-12-05 17:07:31.000000000 +0100 ++++ mozilla-release/gfx/layers/BufferUnrotate.cpp 2013-12-10 14:43:25.948164298 +0100 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + void BufferUnrotate(uint8_t* aBuffer, int aByteWidth, int aHeight, + int aByteStride, int aXBoundary, int aYBoundary) +--- mozilla-release/gfx/ycbcr/moz.build.arm 2013-10-23 15:52:17.056493264 +0200 ++++ mozilla-release/gfx/ycbcr/moz.build 2013-10-23 16:03:04.496045050 +0200 @@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] diff --git a/xulrunner.spec b/xulrunner.spec index 1e7983b..ea7bf08 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -236,7 +236,7 @@ cd %{tarballdir} %patch1 -p1 %patch2 -p1 -b .bld -%patch3 -p2 -b .arm +%patch3 -p1 -b .arm %patch14 -p2 -b .chromium-types %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc From 7f1f78be59ffdfeb893eba03c9e9902c99536802 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 11 Dec 2013 18:14:17 +0100 Subject: [PATCH 395/486] Updated nspr/nss version --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index ea7bf08..d5d74f8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -23,9 +23,9 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9.6 +%global nspr_version 4.10.2 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.14.3 +%global nss_version 3.15.2 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif From dbeface255d2bb18312bdcb1de1069674561bdc8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 12 Dec 2013 11:47:29 +0100 Subject: [PATCH 396/486] Arm build fix --- mozilla-build-arm.patch | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index f2885f8..4f25113 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,5 +1,6 @@ ---- mozilla-release/gfx/layers/BufferUnrotate.cpp.old 2013-12-05 17:07:31.000000000 +0100 -+++ mozilla-release/gfx/layers/BufferUnrotate.cpp 2013-12-10 14:43:25.948164298 +0100 +diff -up mozilla-release/gfx/layers/BufferUnrotate.cpp.arm mozilla-release/gfx/layers/BufferUnrotate.cpp +--- mozilla-release/gfx/layers/BufferUnrotate.cpp.arm 2013-12-05 17:07:31.000000000 +0100 ++++ mozilla-release/gfx/layers/BufferUnrotate.cpp 2013-12-10 14:47:43.234182482 +0100 @@ -8,6 +8,7 @@ #include #include @@ -8,8 +9,9 @@ void BufferUnrotate(uint8_t* aBuffer, int aByteWidth, int aHeight, int aByteStride, int aXBoundary, int aYBoundary) ---- mozilla-release/gfx/ycbcr/moz.build.arm 2013-10-23 15:52:17.056493264 +0200 -+++ mozilla-release/gfx/ycbcr/moz.build 2013-10-23 16:03:04.496045050 +0200 +diff -up mozilla-release/gfx/ycbcr/moz.build.arm mozilla-release/gfx/ycbcr/moz.build +--- mozilla-release/gfx/ycbcr/moz.build.arm 2013-12-05 17:07:32.000000000 +0100 ++++ mozilla-release/gfx/ycbcr/moz.build 2013-12-10 14:47:43.235182479 +0100 @@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] @@ -19,3 +21,15 @@ ASFILES += [ 'yuv_row_arm.s', ] +diff -up mozilla-release/media/libtheora/lib/moz.build.arm mozilla-release/media/libtheora/lib/moz.build +--- mozilla-release/media/libtheora/lib/moz.build.arm 2013-12-05 17:07:48.000000000 +0100 ++++ mozilla-release/media/libtheora/lib/moz.build 2013-12-12 11:45:41.882119059 +0100 +@@ -8,7 +8,7 @@ MODULE = 'theora' + + LIBRARY_NAME = 'theora' + +-if CONFIG['OS_TEST'] == 'arm' and CONFIG['GNU_AS']: ++if CONFIG['HAVE_ARM_NEON'] and CONFIG['GNU_AS']: + asm_suffix = CONFIG['ASM_SUFFIX'] + ASFILES += [ + 'armbits-gnu.%s' % asm_suffix, From 3a484e7fcd48b204b14b76cb3852eba08c3c4022 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Dec 2013 13:50:02 +0100 Subject: [PATCH 397/486] rhbz#1037406 - xulrunner FTBFS if '-Werror=format-security' --- xulrunner.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d5d74f8..25fc83b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 26.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -354,8 +354,8 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" +export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat -Werror=format-security" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' @@ -529,6 +529,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 13 2013 Martin Stransky - 26.0-2 +- rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" + flag is used + * Mon Dec 9 2013 Martin Stransky - 26.0-1 - Update to 26.0 Build 2 From 017429f731c5e1dfae90da59437291592d2baefb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Dec 2013 13:52:10 +0100 Subject: [PATCH 398/486] rhbz#1037406 - xulrunner FTBFS if -Werror=format-security flag is used --- xulrunner.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d5d74f8..25fc83b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 26.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -354,8 +354,8 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" +export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat -Werror=format-security" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' @@ -529,6 +529,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 13 2013 Martin Stransky - 26.0-2 +- rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" + flag is used + * Mon Dec 9 2013 Martin Stransky - 26.0-1 - Update to 26.0 Build 2 From 8ede93a5a45d6f69237f6b1b792e3adac9bb01cf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Dec 2013 13:53:33 +0100 Subject: [PATCH 399/486] rhbz#1037406 - xulrunner FTBFS if -Werror=format-security flag is used --- xulrunner.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d5d74f8..25fc83b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 26.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -354,8 +354,8 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" +export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat -Werror=format-security" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' @@ -529,6 +529,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 13 2013 Martin Stransky - 26.0-2 +- rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" + flag is used + * Mon Dec 9 2013 Martin Stransky - 26.0-1 - Update to 26.0 Build 2 From 22b2e65bcf81e2d96021fdad571a83a9c77e1b93 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 3 Feb 2014 11:53:06 +0100 Subject: [PATCH 400/486] Update to 27.0 --- mozilla-build-arm.patch | 31 ++++--------------------------- mozilla-build.patch | 23 ++++++++++++----------- sources | 2 +- xulrunner.spec | 9 ++++++--- 4 files changed, 23 insertions(+), 42 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 4f25113..d61884e 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,35 +1,12 @@ -diff -up mozilla-release/gfx/layers/BufferUnrotate.cpp.arm mozilla-release/gfx/layers/BufferUnrotate.cpp ---- mozilla-release/gfx/layers/BufferUnrotate.cpp.arm 2013-12-05 17:07:31.000000000 +0100 -+++ mozilla-release/gfx/layers/BufferUnrotate.cpp 2013-12-10 14:47:43.234182482 +0100 -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - - void BufferUnrotate(uint8_t* aBuffer, int aByteWidth, int aHeight, - int aByteStride, int aXBoundary, int aYBoundary) -diff -up mozilla-release/gfx/ycbcr/moz.build.arm mozilla-release/gfx/ycbcr/moz.build ---- mozilla-release/gfx/ycbcr/moz.build.arm 2013-12-05 17:07:32.000000000 +0100 -+++ mozilla-release/gfx/ycbcr/moz.build 2013-12-10 14:47:43.235182479 +0100 +diff -up firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-27.0/mozilla-release/gfx/ycbcr/moz.build +--- firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-01-28 05:03:42.000000000 +0100 ++++ firefox-27.0/mozilla-release/gfx/ycbcr/moz.build 2014-02-03 11:14:34.062219509 +0100 @@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] -if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: +if CONFIG['HAVE_ARM_NEON']: - ASFILES += [ + SOURCES += [ 'yuv_row_arm.s', ] -diff -up mozilla-release/media/libtheora/lib/moz.build.arm mozilla-release/media/libtheora/lib/moz.build ---- mozilla-release/media/libtheora/lib/moz.build.arm 2013-12-05 17:07:48.000000000 +0100 -+++ mozilla-release/media/libtheora/lib/moz.build 2013-12-12 11:45:41.882119059 +0100 -@@ -8,7 +8,7 @@ MODULE = 'theora' - - LIBRARY_NAME = 'theora' - --if CONFIG['OS_TEST'] == 'arm' and CONFIG['GNU_AS']: -+if CONFIG['HAVE_ARM_NEON'] and CONFIG['GNU_AS']: - asm_suffix = CONFIG['ASM_SUFFIX'] - ASFILES += [ - 'armbits-gnu.%s' % asm_suffix, diff --git a/mozilla-build.patch b/mozilla-build.patch index be73cdf..5136563 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,22 +1,23 @@ -diff -up mozilla-release/security/build/Makefile.in.build mozilla-release/security/build/Makefile.in ---- mozilla-release/security/build/Makefile.in.build 2013-12-05 17:07:53.000000000 +0100 -+++ mozilla-release/security/build/Makefile.in 2013-12-09 15:10:17.177970414 +0100 +diff -up firefox-27.0/mozilla-release/security/build/Makefile.in.bld firefox-27.0/mozilla-release/security/build/Makefile.in +--- firefox-27.0/mozilla-release/security/build/Makefile.in.bld 2014-01-28 05:04:01.000000000 +0100 ++++ firefox-27.0/mozilla-release/security/build/Makefile.in 2014-02-03 10:56:16.010749049 +0100 @@ -128,7 +128,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 -DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1 - DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" - ifeq ($(OS_ARCH),WINNT) - DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t" -diff -up mozilla-release/security/manager/ssl/src/Makefile.in.build mozilla-release/security/manager/ssl/src/Makefile.in ---- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-12-09 15:10:17.177970414 +0100 -+++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-12-09 15:11:02.282047401 +0100 -@@ -6,7 +6,6 @@ + ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1) + DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS="-static-libgcc" + endif +diff -up firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in.bld firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in +--- firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in.bld 2014-02-03 11:01:58.000000000 +0100 ++++ firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in 2014-02-03 11:02:05.941855059 +0100 +@@ -5,7 +5,6 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. - EXPORT_LIBRARY = 1 DEFINES += \ - -DNSS_ENABLE_ECC \ -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \ $(NULL) +diff -up firefox-27.0/mozilla-release/security/manager/ssl/src/moz.build.bld firefox-27.0/mozilla-release/security/manager/ssl/src/moz.build diff --git a/sources b/sources index dde4bb6..07453c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -91ce51cc6474f1269484e5327643a59c firefox-26.0.source.tar.bz2 +212827908144b43e7c80ed9d56a08ca9 firefox-27.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 25fc83b..e5c4414 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ %if %{?system_nss} %global nspr_version 4.10.2 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.15.2 +%global nss_version 3.15.4 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 26.0 -Release: 2%{?pre_tag}%{?dist} +Version: 27.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -529,6 +529,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 3 2014 Martin Stransky - 27.0-1 +- Update to 27.0 + * Fri Dec 13 2013 Martin Stransky - 26.0-2 - rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" flag is used From cb8a01c56488d76f02e07910d3590854dd84b197 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 3 Feb 2014 12:35:56 +0100 Subject: [PATCH 401/486] Build fix - patches --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index e5c4414..f734c3c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -235,8 +235,8 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p1 -b .bld -%patch3 -p1 -b .arm +%patch2 -p2 -b .bld +%patch3 -p2 -b .arm %patch14 -p2 -b .chromium-types %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc From 03c0aed20de5217f460cb6b42ef00bc749ffb116 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 18 Mar 2014 13:58:56 +0100 Subject: [PATCH 402/486] Update to 28.0 --- sources | 1 + xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sources b/sources index 07453c3..ad70675 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 212827908144b43e7c80ed9d56a08ca9 firefox-27.0.source.tar.bz2 +db06b6da6b826cfc6a49c15bca115a6b firefox-28.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index f734c3c..531e8ad 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,7 +77,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 27.0 +Version: 28.0 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -529,6 +529,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 18 2014 Martin Stransky - 28.0-1 +- Update to 28.0 + * Mon Feb 3 2014 Martin Stransky - 27.0-1 - Update to 27.0 From 814f8924c4a44b26a968a7150ed3f07ffc857a4b Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 14 Apr 2014 13:31:00 +0200 Subject: [PATCH 403/486] Fix build problems --- mozilla-837563.patch | 144 ------------------------------------------- mozilla-885002.patch | 30 --------- mozilla-938730.patch | 27 -------- mozilla-build.patch | 30 +++++---- xulrunner.spec | 8 +-- 5 files changed, 15 insertions(+), 224 deletions(-) delete mode 100644 mozilla-837563.patch delete mode 100644 mozilla-885002.patch delete mode 100644 mozilla-938730.patch diff --git a/mozilla-837563.patch b/mozilla-837563.patch deleted file mode 100644 index 40121a2..0000000 --- a/mozilla-837563.patch +++ /dev/null @@ -1,144 +0,0 @@ -# HG changeset patch -# User Matthew Gregan -# Date 1383172648 -46800 -# Thu Oct 31 11:37:28 2013 +1300 -# Node ID 2f6bd7da0756edaad53b601b18cf0c0e27f5f676 -# Parent 0f6219c6fb61f3f5e6775d269a6cf52305021024 -Bug 837563 - Enable libcubeb's PulseAudio backend. r=glandium - -diff --git a/configure.in b/configure.in ---- a/configure.in -+++ b/configure.in -@@ -5522,65 +5522,68 @@ fi - if test -n "$MOZ_TREMOR"; then - AC_DEFINE(MOZ_TREMOR) - fi - - if test -n "$MOZ_OPUS"; then - AC_DEFINE(MOZ_OPUS) - fi - --dnl ======================================================== --dnl = Check alsa availability on Linux if using sydneyaudio --dnl ======================================================== -- --dnl If using sydneyaudio with Linux, ensure that the alsa library is available -+dnl ==================================================== -+dnl = Check alsa availability on Linux if using libcubeb -+dnl ==================================================== -+ -+dnl If using libcubeb with Linux, ensure that the alsa library is available - if test -n "$MOZ_CUBEB" -a "$OS_TARGET" = "Linux"; then - MOZ_ALSA=1 - fi - - MOZ_ARG_ENABLE_BOOL(alsa, - [ --enable-alsa Enable Alsa support (default on Linux)], --MOZ_ALSA=1, --MOZ_ALSA=) -+ MOZ_ALSA=1, -+ MOZ_ALSA=) - - if test -n "$MOZ_ALSA"; then - AC_DEFINE(MOZ_CUBEB) - PKG_CHECK_MODULES(MOZ_ALSA, alsa, , - [echo "$MOZ_ALSA_PKG_ERRORS" - AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) - fi - - AC_SUBST(MOZ_ALSA) - AC_SUBST(MOZ_ALSA_CFLAGS) - AC_SUBST(MOZ_ALSA_LIBS) - - dnl ======================================================== --dnl = Enable PulseAudio --dnl ======================================================== -- --MOZ_ARG_ENABLE_BOOL(pulseaudio, --[ --enable-pulseaudio Enable PulseAudio support (experimental)], --MOZ_PULSEAUDIO=1, --MOZ_PULSEAUDIO=) -+dnl = Disable PulseAudio -+dnl ======================================================== -+ -+dnl If using libcubeb with Linux, ensure that the PA library is available -+if test -n "$MOZ_CUBEB" -a "$OS_TARGET" = "Linux" -a -z "$MOZ_B2G"; then -+ MOZ_PULSEAUDIO=1 -+fi -+ -+MOZ_ARG_DISABLE_BOOL(pulseaudio, -+[ --disable-pulseaudio Disable PulseAudio support], -+ MOZ_PULSEAUDIO=, -+ MOZ_PULSEAUDIO=1) - - if test -n "$MOZ_PULSEAUDIO"; then - AC_DEFINE(MOZ_CUBEB) - if test -z "$gonkdir"; then - PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , - [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" - AC_MSG_ERROR([pulseaudio audio backend requires libpulse development package])]) - else - MOZ_PULSEAUDIO_CFLAGS="-I$gonkdir/external/pulseaudio/pulseaudio/src" -- MOZ_PULSEAUDIO_LIBS="-lpulse" - fi - fi - - AC_SUBST(MOZ_PULSEAUDIO) - AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) --AC_SUBST(MOZ_PULSEAUDIO_LIBS) - - dnl ======================================================== - dnl = Enable GStreamer - dnl ======================================================== - if test "$OS_TARGET" = "Linux"; then - MOZ_GSTREAMER=1 - fi - -diff --git a/media/webrtc/signaling/test/Makefile.in b/media/webrtc/signaling/test/Makefile.in ---- a/media/webrtc/signaling/test/Makefile.in -+++ b/media/webrtc/signaling/test/Makefile.in -@@ -18,21 +18,16 @@ LIBS = \ - $(NULL) - - ifdef MOZ_CUBEB - ifdef MOZ_ALSA - LIBS += \ - $(MOZ_ALSA_LIBS) \ - $(NULL) - endif --ifdef MOZ_PULSEAUDIO --LIBS += \ -- $(MOZ_PULSEAUDIO_LIBS) \ -- $(NULL) --endif - endif - - ifeq ($(OS_TARGET),Android) - LIBS += \ - $(STLPORT_LDFLAGS) \ - $(STLPORT_LIBS) \ - $(NULL) - CPPFLAGS += \ -diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in ---- a/toolkit/library/Makefile.in -+++ b/toolkit/library/Makefile.in -@@ -428,19 +428,16 @@ OS_LIBS += $(call EXPAND_LIBNAME,secur32 - endif - endif - - - ifdef MOZ_CUBEB - ifdef MOZ_ALSA - EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) - endif --ifdef MOZ_PULSEAUDIO --EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) --endif - endif - - ifdef HAVE_CLOCK_MONOTONIC - EXTRA_DSO_LDOPTS += $(REALTIME_LIBS) - endif - - ifeq (android,$(MOZ_WIDGET_TOOLKIT)) - OS_LIBS += -lGLESv2 diff --git a/mozilla-885002.patch b/mozilla-885002.patch deleted file mode 100644 index e48c89a..0000000 --- a/mozilla-885002.patch +++ /dev/null @@ -1,30 +0,0 @@ -# HG changeset patch -# Parent d8fd5706493e19bcb85443316a4c180849f5d247 -# User Steve Singer -Bug 885002 - Fix casting on 64 bit Big Endian platforms. - - -diff --git a/content/media/FileBlockCache.h b/content/media/FileBlockCache.h ---- a/content/media/FileBlockCache.h -+++ b/content/media/FileBlockCache.h -@@ -138,19 +138,17 @@ public: - - bool IsEmpty() { - return nsDeque::GetSize() == 0; - } - - private: - int32_t ObjectAt(int32_t aIndex) { - void* v = nsDeque::ObjectAt(aIndex); -- // Ugly hack to work around "casting 64bit void* to 32bit int loses precision" -- // error on 64bit Linux. -- return *(reinterpret_cast(&v)); -+ return reinterpret_cast(v); - } - }; - - private: - int64_t BlockIndexToOffset(int32_t aBlockIndex) { - return static_cast(aBlockIndex) * BLOCK_SIZE; - } - diff --git a/mozilla-938730.patch b/mozilla-938730.patch deleted file mode 100644 index 3b84553..0000000 --- a/mozilla-938730.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up mozilla-release/storage/src/Makefile.in.938730 mozilla-release/storage/src/Makefile.in ---- mozilla-release/storage/src/Makefile.in.938730 2013-12-09 15:15:44.708527295 +0100 -+++ mozilla-release/storage/src/Makefile.in 2013-12-09 15:17:16.119682503 +0100 -@@ -6,14 +6,23 @@ - # Don't use the jemalloc allocator on Android, because we can't guarantee - # that Gecko will configure sqlite before it is first used (bug 730495). - # -+# Don't use the jemalloc allocator when using system NSS. Linked in libraries -+# (such as NSS) might trigger an initialization of sqlite and allocation -+# of memory using the default allocator, prior to the storage service -+# registering its allocator, causing memory management failures (bug 938730). -+# - # Note: On Windows our sqlite build assumes we use jemalloc. If you disable - # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef - # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in. -+ -+ifndef _USE_SYSTEM_NSS - ifdef MOZ_MEMORY - ifneq ($(OS_TARGET), Android) - DEFINES += -DMOZ_STORAGE_MEMORY - endif - endif -+endif -+ - - # For nsDependentJSString - LOCAL_INCLUDES = \ diff --git a/mozilla-build.patch b/mozilla-build.patch index 5136563..f04adf7 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,23 +1,21 @@ -diff -up firefox-27.0/mozilla-release/security/build/Makefile.in.bld firefox-27.0/mozilla-release/security/build/Makefile.in ---- firefox-27.0/mozilla-release/security/build/Makefile.in.bld 2014-01-28 05:04:01.000000000 +0100 -+++ firefox-27.0/mozilla-release/security/build/Makefile.in 2014-02-03 10:56:16.010749049 +0100 -@@ -128,7 +128,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +diff -up mozilla-release/security/build/Makefile.in.bld mozilla-release/security/build/Makefile.in +--- mozilla-release/security/build/Makefile.in.bld 2014-03-15 06:19:34.000000000 +0100 ++++ mozilla-release/security/build/Makefile.in 2014-04-14 11:22:17.678746446 +0200 +@@ -124,7 +124,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 -DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1) - DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS="-static-libgcc" + DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' endif -diff -up firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in.bld firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in ---- firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in.bld 2014-02-03 11:01:58.000000000 +0100 -+++ firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in 2014-02-03 11:02:05.941855059 +0100 -@@ -5,7 +5,6 @@ - # file, You can obtain one at http://mozilla.org/MPL/2.0/. +diff -up mozilla-release/security/manager/ssl/src/moz.build.bld mozilla-release/security/manager/ssl/src/moz.build +--- mozilla-release/security/manager/ssl/src/moz.build.bld 2014-04-14 11:41:36.701779133 +0200 ++++ mozilla-release/security/manager/ssl/src/moz.build 2014-04-14 11:41:49.316833110 +0200 +@@ -93,6 +93,5 @@ UNIFIED_SOURCES += [ - DEFINES += \ -- -DNSS_ENABLE_ECC \ - -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ - -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \ - $(NULL) -diff -up firefox-27.0/mozilla-release/security/manager/ssl/src/moz.build.bld firefox-27.0/mozilla-release/security/manager/ssl/src/moz.build + FINAL_LIBRARY = 'xul' + +-DEFINES['NSS_ENABLE_ECC'] = 'True' + for var in ('DLL_PREFIX', 'DLL_SUFFIX'): + DEFINES[var] = '"%s"' % CONFIG[var] diff --git a/xulrunner.spec b/xulrunner.spec index 531e8ad..204a87d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -97,7 +97,6 @@ Patch17: xulrunner-24.0-gcc47.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch -Patch20: mozilla-885002.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -105,8 +104,6 @@ Patch200: mozilla-193-pkgconfig.patch Patch204: rhbz-966424.patch # Upstream patches -Patch300: mozilla-837563.patch -Patch301: mozilla-938730.patch # --------------------------------------------------- @@ -235,19 +232,16 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p2 -b .bld +%patch2 -p1 -b .bld %patch3 -p2 -b .arm %patch14 -p2 -b .chromium-types %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines -%patch20 -p1 -b .885002 %patch200 -p2 -b .pk %patch204 -p1 -b .966424 -%patch300 -p1 -b .837563 -%patch301 -p1 -b .938730 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 3662bd7cb21c41d4839c10a6e0f788e045f0a47c Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 15 Apr 2014 16:39:04 +0200 Subject: [PATCH 404/486] fixed arm patch --- mozilla-build-arm.patch | 20 ++++++++++++++++---- xulrunner.spec | 3 ++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index d61884e..1628018 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,7 +1,7 @@ -diff -up firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-27.0/mozilla-release/gfx/ycbcr/moz.build ---- firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-01-28 05:03:42.000000000 +0100 -+++ firefox-27.0/mozilla-release/gfx/ycbcr/moz.build 2014-02-03 11:14:34.062219509 +0100 -@@ -61,7 +61,7 @@ else: +diff -up firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-28.0/mozilla-release/gfx/ycbcr/moz.build +--- firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-03-11 01:54:04.000000000 +0100 ++++ firefox-28.0/mozilla-release/gfx/ycbcr/moz.build 2014-03-11 10:12:19.586220802 +0100 +@@ -59,7 +59,7 @@ else: 'yuv_row_other.cpp', ] @@ -10,3 +10,15 @@ diff -up firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-27.0/mozil SOURCES += [ 'yuv_row_arm.s', ] +diff -up firefox-28.0/mozilla-release/media/libtheora/lib/moz.build.arm firefox-28.0/mozilla-release/media/libtheora/lib/moz.build +--- firefox-28.0/mozilla-release/media/libtheora/lib/moz.build.arm 2014-03-11 01:54:13.000000000 +0100 ++++ firefox-28.0/mozilla-release/media/libtheora/lib/moz.build 2014-03-19 12:00:57.491064764 +0100 +@@ -20,7 +20,7 @@ UNIFIED_SOURCES += [ + 'state.c', + ] + +-if CONFIG['OS_TEST'] == 'arm' and CONFIG['GNU_AS']: ++if CONFIG['GNU_AS']: + GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [ + 'armbits-gnu', + 'armfrag-gnu', diff --git a/xulrunner.spec b/xulrunner.spec index 204a87d..74edacd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 28.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -525,6 +525,7 @@ fi %changelog * Tue Mar 18 2014 Martin Stransky - 28.0-1 - Update to 28.0 +- Fixed arm patch * Mon Feb 3 2014 Martin Stransky - 27.0-1 - Update to 27.0 From 7b0dff95318cb00314c955f56d54409a0f5b4d52 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 Apr 2014 11:42:18 +0200 Subject: [PATCH 405/486] Update to 29.0 --- mozilla-build-arm.patch | 20 ++++--------------- mozilla-build.patch | 21 -------------------- sources | 3 +-- xulrunner-2.0-chromium-types.patch | 31 ------------------------------ xulrunner-24.0-gcc47.patch | 13 ------------- xulrunner-install-dir.patch | 22 +++++++-------------- xulrunner.spec | 13 +++++-------- 7 files changed, 17 insertions(+), 106 deletions(-) delete mode 100644 mozilla-build.patch delete mode 100644 xulrunner-2.0-chromium-types.patch delete mode 100644 xulrunner-24.0-gcc47.patch diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 1628018..f98cbe3 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,7 +1,7 @@ -diff -up firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-28.0/mozilla-release/gfx/ycbcr/moz.build ---- firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-03-11 01:54:04.000000000 +0100 -+++ firefox-28.0/mozilla-release/gfx/ycbcr/moz.build 2014-03-11 10:12:19.586220802 +0100 -@@ -59,7 +59,7 @@ else: +diff -up firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-29.0/mozilla-release/gfx/ycbcr/moz.build +--- firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-04-22 07:27:47.000000000 +0200 ++++ firefox-29.0/mozilla-release/gfx/ycbcr/moz.build 2014-04-22 16:40:34.862849368 +0200 +@@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] @@ -10,15 +10,3 @@ diff -up firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-28.0/mozil SOURCES += [ 'yuv_row_arm.s', ] -diff -up firefox-28.0/mozilla-release/media/libtheora/lib/moz.build.arm firefox-28.0/mozilla-release/media/libtheora/lib/moz.build ---- firefox-28.0/mozilla-release/media/libtheora/lib/moz.build.arm 2014-03-11 01:54:13.000000000 +0100 -+++ firefox-28.0/mozilla-release/media/libtheora/lib/moz.build 2014-03-19 12:00:57.491064764 +0100 -@@ -20,7 +20,7 @@ UNIFIED_SOURCES += [ - 'state.c', - ] - --if CONFIG['OS_TEST'] == 'arm' and CONFIG['GNU_AS']: -+if CONFIG['GNU_AS']: - GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [ - 'armbits-gnu', - 'armfrag-gnu', diff --git a/mozilla-build.patch b/mozilla-build.patch deleted file mode 100644 index f04adf7..0000000 --- a/mozilla-build.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up mozilla-release/security/build/Makefile.in.bld mozilla-release/security/build/Makefile.in ---- mozilla-release/security/build/Makefile.in.bld 2014-03-15 06:19:34.000000000 +0100 -+++ mozilla-release/security/build/Makefile.in 2014-04-14 11:22:17.678746446 +0200 -@@ -124,7 +124,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= - DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) - DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 - DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 --DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1 - ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1) - DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' - endif -diff -up mozilla-release/security/manager/ssl/src/moz.build.bld mozilla-release/security/manager/ssl/src/moz.build ---- mozilla-release/security/manager/ssl/src/moz.build.bld 2014-04-14 11:41:36.701779133 +0200 -+++ mozilla-release/security/manager/ssl/src/moz.build 2014-04-14 11:41:49.316833110 +0200 -@@ -93,6 +93,5 @@ UNIFIED_SOURCES += [ - - FINAL_LIBRARY = 'xul' - --DEFINES['NSS_ENABLE_ECC'] = 'True' - for var in ('DLL_PREFIX', 'DLL_SUFFIX'): - DEFINES[var] = '"%s"' % CONFIG[var] diff --git a/sources b/sources index ad70675..891ef83 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -212827908144b43e7c80ed9d56a08ca9 firefox-27.0.source.tar.bz2 -db06b6da6b826cfc6a49c15bca115a6b firefox-28.0.source.tar.bz2 +07c515fc487824f107a947d23f420e9d firefox-29.0.source.tar.bz2 diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch deleted file mode 100644 index 2b3db8c..0000000 --- a/xulrunner-2.0-chromium-types.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h ---- xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2012-11-16 20:56:29.000000000 +0100 -+++ xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h 2012-11-20 09:19:14.843448418 +0100 -@@ -30,7 +30,11 @@ typedef int16_t int16; - #define ARCH_CPU_ARM_FAMILY 1 - #define ARCH_CPU_ARMEL 1 - #define ARCH_CPU_32_BITS 1 --#elif defined(__ppc__) || defined(__powerpc) || defined(__PPC__) -+#elif defined(__powerpc64__) -+#define ARCH_CPU_PPC_FAMILY 1 -+#define ARCH_CPU_PPC 1 -+#define ARCH_CPU_64_BITS 1 -+#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) - #define ARCH_CPU_PPC_FAMILY 1 - #define ARCH_CPU_PPC 1 - #define ARCH_CPU_32_BITS 1 -@@ -42,6 +46,14 @@ typedef int16_t int16; - #define ARCH_CPU_SPARC_FAMILY 1 - #define ARCH_CPU_SPARC 1 - #define ARCH_CPU_64_BITS 1 -+#elif defined(__s390x__) -+#define ARCH_CPU_S390_FAMILY 1 -+#define ARCH_CPU_S390 1 -+#define ARCH_CPU_64_BITS 1 -+#elif defined(__s390__) -+#define ARCH_CPU_S390_FAMILY 1 -+#define ARCH_CPU_S390 1 -+#define ARCH_CPU_32_BITS 1 - #else - #warning Please add support for your architecture in chromium_types.h - #endif diff --git a/xulrunner-24.0-gcc47.patch b/xulrunner-24.0-gcc47.patch deleted file mode 100644 index 28de75f..0000000 --- a/xulrunner-24.0-gcc47.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-release/toolkit/crashreporter/client/Makefile.in ---- mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-12-09 15:12:50.659231760 +0100 -+++ mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-12-09 15:13:45.448324783 +0100 -@@ -42,6 +42,9 @@ endif - - ifdef MOZ_WIDGET_GTK - -+# Needed for moz_free -+LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc -+ - LIBS += \ - $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \ - $(NULL) diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch index 9527700..51fe4ba 100644 --- a/xulrunner-install-dir.patch +++ b/xulrunner-install-dir.patch @@ -1,20 +1,12 @@ -diff -up mozilla-release/config/baseconfig.mk.orig mozilla-release/config/baseconfig.mk ---- mozilla-release/config/baseconfig.mk.orig 2013-12-09 15:07:53.357724904 +0100 -+++ mozilla-release/config/baseconfig.mk 2013-12-09 15:08:35.819797392 +0100 -@@ -1,6 +1,6 @@ +diff -up firefox-29.0/mozilla-release/config/baseconfig.mk.orig firefox-29.0/mozilla-release/config/baseconfig.mk +--- mozilla-release/config/baseconfig.mk.orig 2014-04-22 15:38:52.948165295 +0200 ++++ mozilla-release/config/baseconfig.mk 2014-04-22 15:42:20.387481673 +0200 +@@ -4,7 +4,7 @@ + # whether a normal build is happening or whether the check is running. includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +installdir = $(libdir)/$(MOZ_APP_NAME) sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - DIST = $(DEPTH)/dist - -diff -up mozilla-release/js/src/config/baseconfig.mk.orig mozilla-release/js/src/config/baseconfig.mk ---- mozilla-release/js/src/config/baseconfig.mk.orig 2013-12-09 15:07:53.357724904 +0100 -+++ mozilla-release/js/src/config/baseconfig.mk 2013-12-09 15:09:06.906850462 +0100 -@@ -1,4 +1,4 @@ --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) - sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - - ifneq (,$(filter /%,$(TOP_DIST))) + ifndef TOP_DIST + TOP_DIST = dist diff --git a/xulrunner.spec b/xulrunner.spec index 74edacd..4541e6a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 28.0 -Release: 2%{?pre_tag}%{?dist} +Version: 29.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -89,10 +89,7 @@ Source21: %{name}.sh.in # build patches Patch1: xulrunner-install-dir.patch -Patch2: mozilla-build.patch Patch3: mozilla-build-arm.patch -Patch14: xulrunner-2.0-chromium-types.patch -Patch17: xulrunner-24.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) @@ -232,10 +229,7 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p1 -b .bld %patch3 -p2 -b .arm -%patch14 -p2 -b .chromium-types -%patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines @@ -523,6 +517,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 28 2014 Martin Stransky - 29.0-1 +- Update to 29.0 + * Tue Mar 18 2014 Martin Stransky - 28.0-1 - Update to 28.0 - Fixed arm patch From d0375898df38b64b3dcc77c6267fa3e2cb97a3cd Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 Apr 2014 12:42:42 +0200 Subject: [PATCH 406/486] ARM build fixes --- xulrunner.spec | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 4541e6a..ef730b5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -284,24 +284,23 @@ echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig +echo "ac_add_options --disable-ion" >> .mozconfig +echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv7hnl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=neon" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig +echo "ac_add_options --disable-ion" >> .mozconfig +echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv5tel echo "ac_add_options --with-arch=armv5te" >> .mozconfig echo "ac_add_options --with-float-abi=soft" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig -%endif - -%ifnarch %{ix86} x86_64 armv7hl armv7hnl -echo "ac_add_options --disable-methodjit" >> .mozconfig -echo "ac_add_options --disable-monoic" >> .mozconfig -echo "ac_add_options --disable-polyic" >> .mozconfig -echo "ac_add_options --disable-tracejit" >> .mozconfig +echo "ac_add_options --disable-ion" >> .mozconfig +echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifnarch %{ix86} x86_64 armv7hl armv7hnl From b29fbba698c1d977ea4ee84bbbbb02262de36078 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 May 2014 17:49:48 +0200 Subject: [PATCH 407/486] An updated ppc64le patch (rhbz#1094378) --- mozilla-ppc64le.patch | 5061 +++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 14 +- 2 files changed, 5073 insertions(+), 2 deletions(-) create mode 100644 mozilla-ppc64le.patch diff --git a/mozilla-ppc64le.patch b/mozilla-ppc64le.patch new file mode 100644 index 0000000..bb340cb --- /dev/null +++ b/mozilla-ppc64le.patch @@ -0,0 +1,5061 @@ +# HG changeset patch +# Parent 007cf000fdf7c5048939a87f63165a67fd9db5f6 +# User Ulrich Weigand +Bug 976648 - powerpc64le-linux support - toplevel build/config + +Index: mozilla-release/build/autoconf/config.guess +=================================================================== +--- mozilla-release.orig/build/autoconf/config.guess ++++ mozilla-release/build/autoconf/config.guess +@@ -1,14 +1,12 @@ + #! /bin/sh + # Attempt to guess a canonical system name. +-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +-# Free Software Foundation, Inc. ++# Copyright 1992-2014 Free Software Foundation, Inc. + +-timestamp='2009-08-19' ++timestamp='2014-02-12' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or ++# the Free Software Foundation; either version 3 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but +@@ -17,26 +15,22 @@ timestamp='2009-08-19' + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +-# 02110-1301, USA. ++# along with this program; if not, see . + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under +-# the same distribution terms that you use for the rest of that program. +- +- +-# Originally written by Per Bothner. Please send patches (context +-# diff format) to and include a ChangeLog +-# entry. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). + # +-# This script attempts to guess a canonical system name similar to +-# config.sub. If it succeeds, it prints the system name on stdout, and +-# exits with 0. Otherwise, it exits with 1. ++# Originally written by Per Bothner. + # + # You can get the latest version of this script from: + # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++# ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. ++ + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -56,8 +50,7 @@ version="\ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++Copyright 1992-2014 Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + ++case "${UNAME_SYSTEM}" in ++Linux|GNU|GNU/*) ++ # If the system lacks a compiler, then just pick glibc. ++ # We could probably try harder. ++ LIBC=gnu ++ ++ eval $set_cc_for_build ++ cat <<-EOF > $dummy.c ++ #include ++ #if defined(__UCLIBC__) ++ LIBC=uclibc ++ #elif defined(__dietlibc__) ++ LIBC=dietlibc ++ #else ++ LIBC=gnu ++ #endif ++ EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ++ ;; ++esac ++ + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or +- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward +@@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + fi + ;; + *) +- os=netbsd ++ os=netbsd + ;; + esac + # The OS release +@@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; ++ *:Bitrig:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} ++ exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} +@@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) +- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on +@@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit ;; ++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ++ exitcode=$? ++ trap '' 0 ++ exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead +@@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) +- echo powerpc-ibm-os400 ++ echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; +- arm:riscos:*:*|arm:RISCOS:*:*) ++ arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) +@@ -333,6 +354,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" +@@ -391,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} ++ echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} ++ echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) +- echo m68k-milan-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) +- echo m68k-hades-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) +- echo m68k-unknown-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; +@@ -477,8 +501,8 @@ EOF + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) +- # DG/UX returns AViiON for all architectures +- UNAME_PROCESSOR=`/usr/bin/uname -p` ++ # DG/UX returns AViiON for all architectures ++ UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ +@@ -491,7 +515,7 @@ EOF + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; +@@ -548,7 +572,7 @@ EOF + echo rs6000-ibm-aix3.2 + fi + exit ;; +- *:AIX:*:[456]) ++ *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -591,52 +615,52 @@ EOF + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` +- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` +- case "${sc_cpu_version}" in +- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 +- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 +- 532) # CPU_PA_RISC2_0 +- case "${sc_kernel_bits}" in +- 32) HP_ARCH="hppa2.0n" ;; +- 64) HP_ARCH="hppa2.0w" ;; ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 +- esac ;; +- esac ++ esac ;; ++ esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c ++ sed 's/^ //' << EOF >$dummy.c ++ ++ #define _HPUX_SOURCE ++ #include ++ #include ++ ++ int main () ++ { ++ #if defined(_SC_KERNEL_BITS) ++ long bits = sysconf(_SC_KERNEL_BITS); ++ #endif ++ long cpu = sysconf (_SC_CPU_VERSION); + +- #define _HPUX_SOURCE +- #include +- #include +- +- int main () +- { +- #if defined(_SC_KERNEL_BITS) +- long bits = sysconf(_SC_KERNEL_BITS); +- #endif +- long cpu = sysconf (_SC_CPU_VERSION); +- +- switch (cpu) +- { +- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; +- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; +- case CPU_PA_RISC2_0: +- #if defined(_SC_KERNEL_BITS) +- switch (bits) +- { +- case 64: puts ("hppa2.0w"); break; +- case 32: puts ("hppa2.0n"); break; +- default: puts ("hppa2.0"); break; +- } break; +- #else /* !defined(_SC_KERNEL_BITS) */ +- puts ("hppa2.0"); break; +- #endif +- default: puts ("hppa1.0"); break; +- } +- exit (0); +- } ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ++ case CPU_PA_RISC2_0: ++ #if defined(_SC_KERNEL_BITS) ++ switch (bits) ++ { ++ case 64: puts ("hppa2.0w"); break; ++ case 32: puts ("hppa2.0n"); break; ++ default: puts ("hppa2.0"); break; ++ } break; ++ #else /* !defined(_SC_KERNEL_BITS) */ ++ puts ("hppa2.0"); break; ++ #endif ++ default: puts ("hppa1.0"); break; ++ } ++ exit (0); ++ } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa +@@ -727,22 +751,22 @@ EOF + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; +@@ -766,14 +790,14 @@ EOF + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` +- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit ;; ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + 5000:UNIX_System_V:4.*:*) +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` +- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +@@ -785,34 +809,39 @@ EOF + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) +- case ${UNAME_MACHINE} in +- pc98) +- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ UNAME_PROCESSOR=`/usr/bin/uname -p` ++ case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; ++ *:MINGW64*:*) ++ echo ${UNAME_MACHINE}-pc-mingw64 ++ exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; ++ i*:MSYS*:*) ++ echo ${UNAME_MACHINE}-pc-msys ++ exit ;; + i*:windows32*:*) +- # uname -m includes "-pc" on this system. +- echo ${UNAME_MACHINE}-mingw32 ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; +- *:Interix*:[3456]*) +- case ${UNAME_MACHINE} in ++ *:Interix*:*) ++ case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; +- EM64T | authenticamd | genuineintel) ++ authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) +@@ -845,45 +874,81 @@ EOF + exit ;; + *:GNU:*:*) + # the GNU system +- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` ++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland +- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ aarch64_be:Linux:*:*) ++ UNAME_MACHINE=aarch64_be ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ arc:Linux:*:* | arceb:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else +- echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_PCS_VFP ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf ++ fi + fi + exit ;; + avr32*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) +- echo cris-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) +- echo crisv32-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) +- echo frv-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ hexagon:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ i*86:Linux:*:*) ++ echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build +@@ -901,123 +966,65 @@ EOF + #endif + #endif + EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^CPU/{ +- s: ::g +- p +- }'`" +- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; +- or32:Linux:*:*) +- echo or32-unknown-linux-gnu +- exit ;; +- ppc:Linux:*:*) +- echo powerpc-unknown-linux-gnu +- exit ;; +- ppc64:Linux:*:*) +- echo powerpc64-unknown-linux-gnu ++ or1k:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep -q ld.so.1 +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ or32:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) +- echo sparc-unknown-linux-gnu ++ echo sparc-unknown-linux-${LIBC} ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +- PA7*) echo hppa1.1-unknown-linux-gnu ;; +- PA8*) echo hppa2.0-unknown-linux-gnu ;; +- *) echo hppa-unknown-linux-gnu ;; ++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; ++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; ++ *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-${LIBC} ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-${LIBC} ++ exit ;; ++ ppc64le:Linux:*:*) ++ echo powerpc64le-unknown-linux-${LIBC} ++ exit ;; ++ ppcle:Linux:*:*) ++ echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) +- echo ${UNAME_MACHINE}-ibm-linux ++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ tile*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) +- echo ${UNAME_MACHINE}-dec-linux-gnu ++ echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) +- echo x86_64-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +- #ifdef __dietlibc__ +- LIBC=dietlibc +- #endif +-EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^LIBC/{ +- s: ::g +- p +- }'`" +- test x"${LIBC}" != x && { +- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" +- exit +- } +- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } +- ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both +@@ -1025,11 +1032,11 @@ EOF + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) +- # Unixware is an offshoot of SVR4, but it has its own version +- # number series starting with 2... +- # I am not positive that other SVR4 systems won't match this, ++ # Unixware is an offshoot of SVR4, but it has its own version ++ # number series starting with 2... ++ # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. +- # Use sysv4.2uw... so that sysv4* matches it. ++ # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) +@@ -1061,7 +1068,7 @@ EOF + fi + exit ;; + i*86:*:5:[678]*) +- # UnixWare 7.x, OpenUNIX and OpenServer 6. ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; +@@ -1089,13 +1096,13 @@ EOF + exit ;; + pc:*:*:*) + # Left here for compatibility: +- # uname -m prints for DJGPP always 'pc', but it prints nothing about +- # the processor, so we play safe by assuming i586. ++ # uname -m prints for DJGPP always 'pc', but it prints nothing about ++ # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp +- exit ;; ++ exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; +@@ -1130,8 +1137,8 @@ EOF + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) +- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && { echo i486-ncr-sysv4; exit; } ;; ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ +@@ -1174,10 +1181,10 @@ EOF + echo ns32k-sni-sysv + fi + exit ;; +- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort +- # says +- echo i586-unisys-sysv4 +- exit ;; ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says ++ echo i586-unisys-sysv4 ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm +@@ -1203,11 +1210,11 @@ EOF + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then +- echo mips-nec-sysv${UNAME_RELEASE} ++ echo mips-nec-sysv${UNAME_RELEASE} + else +- echo mips-unknown-sysv${UNAME_RELEASE} ++ echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; +@@ -1220,6 +1227,9 @@ EOF + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; ++ x86_64:Haiku:*:*) ++ echo x86_64-unknown-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; +@@ -1246,13 +1256,31 @@ EOF + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown +- case $UNAME_PROCESSOR in +- i386) eval $set_cc_for_build +- if $CC_FOR_BUILD -E -dM -x c /dev/null | grep __LP64__>/dev/null 2>&1 ; then +- UNAME_PROCESSOR=x86_64 +- fi ;; +- unknown) UNAME_PROCESSOR=powerpc ;; +- esac ++ eval $set_cc_for_build ++ if test "$UNAME_PROCESSOR" = unknown ; then ++ UNAME_PROCESSOR=powerpc ++ fi ++ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ case $UNAME_PROCESSOR in ++ i386) UNAME_PROCESSOR=x86_64 ;; ++ powerpc) UNAME_PROCESSOR=powerpc64 ;; ++ esac ++ fi ++ fi ++ elif test "$UNAME_PROCESSOR" = i386 ; then ++ # Avoid executing cc on OS X 10.9, as it ships with a stub ++ # that puts up a graphical alert prompting to install ++ # developer tools. Any system running Mac OS X 10.7 or ++ # later (Darwin 11 and later) is required to have a 64-bit ++ # processor. This is not true of the ARM version of Darwin ++ # that Apple uses in portable devices. ++ UNAME_PROCESSOR=x86_64 ++ fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) +@@ -1266,7 +1294,10 @@ EOF + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; +- NSE-?:NONSTOP_KERNEL:*:*) ++ NEO-?:NONSTOP_KERNEL:*:*) ++ echo neo-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) +@@ -1311,13 +1342,13 @@ EOF + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) +- echo mips-sei-seiux${UNAME_RELEASE} ++ echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) +- UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; +@@ -1335,158 +1366,10 @@ EOF + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +-esac +- +-#echo '(No uname command or uname output not recognized.)' 1>&2 +-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +- +-eval $set_cc_for_build +-cat >$dummy.c < +-# include +-#endif +-main () +-{ +-#if defined (sony) +-#if defined (MIPSEB) +- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, +- I don't know.... */ +- printf ("mips-sony-bsd\n"); exit (0); +-#else +-#include +- printf ("m68k-sony-newsos%s\n", +-#ifdef NEWSOS4 +- "4" +-#else +- "" +-#endif +- ); exit (0); +-#endif +-#endif +- +-#if defined (__arm) && defined (__acorn) && defined (__unix) +- printf ("arm-acorn-riscix\n"); exit (0); +-#endif +- +-#if defined (hp300) && !defined (hpux) +- printf ("m68k-hp-bsd\n"); exit (0); +-#endif +- +-#if defined (NeXT) +-#if !defined (__ARCHITECTURE__) +-#define __ARCHITECTURE__ "m68k" +-#endif +- int version; +- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; +- if (version < 4) +- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); +- else +- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); +- exit (0); +-#endif +- +-#if defined (MULTIMAX) || defined (n16) +-#if defined (UMAXV) +- printf ("ns32k-encore-sysv\n"); exit (0); +-#else +-#if defined (CMU) +- printf ("ns32k-encore-mach\n"); exit (0); +-#else +- printf ("ns32k-encore-bsd\n"); exit (0); +-#endif +-#endif +-#endif +- +-#if defined (__386BSD__) +- printf ("i386-pc-bsd\n"); exit (0); +-#endif +- +-#if defined (sequent) +-#if defined (i386) +- printf ("i386-sequent-dynix\n"); exit (0); +-#endif +-#if defined (ns32000) +- printf ("ns32k-sequent-dynix\n"); exit (0); +-#endif +-#endif +- +-#if defined (_SEQUENT_) +- struct utsname un; +- +- uname(&un); +- +- if (strncmp(un.version, "V2", 2) == 0) { +- printf ("i386-sequent-ptx2\n"); exit (0); +- } +- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ +- printf ("i386-sequent-ptx1\n"); exit (0); +- } +- printf ("i386-sequent-ptx\n"); exit (0); +- +-#endif +- +-#if defined (vax) +-# if !defined (ultrix) +-# include +-# if defined (BSD) +-# if BSD == 43 +- printf ("vax-dec-bsd4.3\n"); exit (0); +-# else +-# if BSD == 199006 +- printf ("vax-dec-bsd4.3reno\n"); exit (0); +-# else +- printf ("vax-dec-bsd\n"); exit (0); +-# endif +-# endif +-# else +- printf ("vax-dec-bsd\n"); exit (0); +-# endif +-# else +- printf ("vax-dec-ultrix\n"); exit (0); +-# endif +-#endif +- +-#if defined (alliant) && defined (i860) +- printf ("i860-alliant-bsd\n"); exit (0); +-#endif +- +- exit (1); +-} +-EOF +- +-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && +- { echo "$SYSTEM_NAME"; exit; } +- +-# Apollos put the system type in the environment. +- +-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } +- +-# Convex versions that predate uname can use getsysinfo(1) +- +-if [ -x /usr/convex/getsysinfo ] +-then +- case `getsysinfo -f cpu_type` in +- c1*) +- echo c1-convex-bsd ++ x86_64:VMkernel:*:*) ++ echo ${UNAME_MACHINE}-unknown-esx + exit ;; +- c2*) +- if getsysinfo -f scalar_acc +- then echo c32-convex-bsd +- else echo c2-convex-bsd +- fi +- exit ;; +- c34*) +- echo c34-convex-bsd +- exit ;; +- c38*) +- echo c38-convex-bsd +- exit ;; +- c4*) +- echo c4-convex-bsd +- exit ;; +- esac +-fi ++esac + + cat >&2 <. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under +-# the same distribution terms that you use for the rest of that program. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). + + +-# Please send patches to . Submit a context +-# diff and a properly formatted GNU ChangeLog entry. ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. +@@ -75,8 +68,7 @@ Report bugs and patches to conftest.$ac_ext +@@ -1296,7 +1296,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; +- ppc64-*linux*|powerpc64-*linux*) ++ powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; ++ powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) +@@ -1315,7 +1318,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) +Index: mozilla-release/js/src/ctypes/libffi/configure +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/configure ++++ mozilla-release/js/src/ctypes/libffi/configure +@@ -6298,7 +6298,7 @@ ia64-*-hpux*) + rm -rf conftest* + ;; + +-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ ++x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ + s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +@@ -6316,7 +6316,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; +- ppc64-*linux*|powerpc64-*linux*) ++ powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; ++ powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) +@@ -6335,7 +6338,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) +Index: mozilla-release/js/src/ctypes/libffi/m4/libtool.m4 +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/m4/libtool.m4 ++++ mozilla-release/js/src/ctypes/libffi/m4/libtool.m4 +@@ -1267,7 +1267,7 @@ ia64-*-hpux*) + rm -rf conftest* + ;; + +-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ ++x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ + s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +@@ -1281,7 +1281,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; +- ppc64-*linux*|powerpc64-*linux*) ++ powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; ++ powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) +@@ -1300,7 +1303,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ffi.c +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ffi.c ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ffi.c +@@ -1,7 +1,9 @@ + /* ----------------------------------------------------------------------- +- ffi.c - Copyright (c) 1998 Geoffrey Keating +- Copyright (C) 2007, 2008 Free Software Foundation, Inc +- Copyright (C) 2008 Red Hat, Inc ++ ffi.c - Copyright (C) 2011 Anthony Green ++ Copyright (C) 2011 Kyle Moffett ++ Copyright (C) 2008 Red Hat, Inc ++ Copyright (C) 2007, 2008 Free Software Foundation, Inc ++ Copyright (c) 1998 Geoffrey Keating + + PowerPC Foreign Function Interface + +@@ -39,32 +41,29 @@ enum { + /* The assembly depends on these exact flags. */ + FLAG_RETURNS_SMST = 1 << (31-31), /* Used for FFI_SYSV small structs. */ + FLAG_RETURNS_NOTHING = 1 << (31-30), /* These go in cr7 */ ++#ifndef __NO_FPRS__ + FLAG_RETURNS_FP = 1 << (31-29), ++#endif + FLAG_RETURNS_64BITS = 1 << (31-28), + + FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */ +- FLAG_SYSV_SMST_R4 = 1 << (31-26), /* use r4 for FFI_SYSV 8 byte +- structs. */ +- FLAG_SYSV_SMST_R3 = 1 << (31-25), /* use r3 for FFI_SYSV 4 byte +- structs. */ +- /* Bits (31-24) through (31-19) store shift value for SMST */ + + FLAG_ARG_NEEDS_COPY = 1 << (31- 7), ++ FLAG_ARG_NEEDS_PSAVE = FLAG_ARG_NEEDS_COPY, /* Used by ELFv2 */ ++#ifndef __NO_FPRS__ + FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */ ++#endif + FLAG_4_GPR_ARGUMENTS = 1 << (31- 5), + FLAG_RETVAL_REFERENCE = 1 << (31- 4) + }; + + /* About the SYSV ABI. */ +-unsigned int NUM_GPR_ARG_REGISTERS = 8; ++#define ASM_NEEDS_REGISTERS 4 ++#define NUM_GPR_ARG_REGISTERS 8 + #ifndef __NO_FPRS__ +-unsigned int NUM_FPR_ARG_REGISTERS = 8; +-#else +-unsigned int NUM_FPR_ARG_REGISTERS = 0; ++# define NUM_FPR_ARG_REGISTERS 8 + #endif + +-enum { ASM_NEEDS_REGISTERS = 4 }; +- + /* ffi_prep_args_SYSV is called by the assembly routine once stack space + has been allocated for the function's arguments. + +@@ -113,10 +112,12 @@ ffi_prep_args_SYSV (extended_cif *ecif, + valp gpr_base; + int intarg_count; + ++#ifndef __NO_FPRS__ + /* 'fpr_base' points at the space for fpr1, and grows upwards as + we use FPR registers. */ + valp fpr_base; + int fparg_count; ++#endif + + /* 'copy_space' grows down as we put structures in it. It should + stay 16-byte aligned. */ +@@ -125,9 +126,11 @@ ffi_prep_args_SYSV (extended_cif *ecif, + /* 'next_arg' grows up as we put parameters in it. */ + valp next_arg; + +- int i, ii MAYBE_UNUSED; ++ int i; + ffi_type **ptr; ++#ifndef __NO_FPRS__ + double double_tmp; ++#endif + union { + void **v; + char **c; +@@ -143,21 +146,22 @@ ffi_prep_args_SYSV (extended_cif *ecif, + size_t struct_copy_size; + unsigned gprvalue; + +- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) +- NUM_FPR_ARG_REGISTERS = 0; +- + stacktop.c = (char *) stack + bytes; + gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS; + intarg_count = 0; ++#ifndef __NO_FPRS__ + fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS; + fparg_count = 0; + copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c); ++#else ++ copy_space.c = gpr_base.c; ++#endif + next_arg.u = stack + 2; + + /* Check that everything starts aligned properly. */ +- FFI_ASSERT (((unsigned) (char *) stack & 0xF) == 0); +- FFI_ASSERT (((unsigned) copy_space.c & 0xF) == 0); +- FFI_ASSERT (((unsigned) stacktop.c & 0xF) == 0); ++ FFI_ASSERT (((unsigned long) (char *) stack & 0xF) == 0); ++ FFI_ASSERT (((unsigned long) copy_space.c & 0xF) == 0); ++ FFI_ASSERT (((unsigned long) stacktop.c & 0xF) == 0); + FFI_ASSERT ((bytes & 0xF) == 0); + FFI_ASSERT (copy_space.c >= next_arg.c); + +@@ -174,12 +178,28 @@ ffi_prep_args_SYSV (extended_cif *ecif, + i > 0; + i--, ptr++, p_argv.v++) + { +- switch ((*ptr)->type) +- { ++ unsigned short typenum = (*ptr)->type; ++ ++ /* We may need to handle some values depending on ABI */ ++ if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) { ++ if (typenum == FFI_TYPE_FLOAT) ++ typenum = FFI_TYPE_UINT32; ++ if (typenum == FFI_TYPE_DOUBLE) ++ typenum = FFI_TYPE_UINT64; ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_UINT128; ++ } else if (ecif->cif->abi != FFI_LINUX) { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_STRUCT; ++#endif ++ } ++ ++ /* Now test the translated value */ ++ switch (typenum) { ++#ifndef __NO_FPRS__ + case FFI_TYPE_FLOAT: + /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ +- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_float_prep; + double_tmp = **p_argv.f; + if (fparg_count >= NUM_FPR_ARG_REGISTERS) + { +@@ -195,8 +215,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, + + case FFI_TYPE_DOUBLE: + /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ +- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_double_prep; + double_tmp = **p_argv.d; + + if (fparg_count >= NUM_FPR_ARG_REGISTERS) +@@ -218,43 +236,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, + + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if ((ecif->cif->abi != FFI_LINUX) +- && (ecif->cif->abi != FFI_LINUX_SOFT_FLOAT)) +- goto do_struct; +- /* The soft float ABI for long doubles works like this, +- a long double is passed in four consecutive gprs if available. +- A maximum of 2 long doubles can be passed in gprs. +- If we do not have 4 gprs left, the long double is passed on the +- stack, 4-byte aligned. */ +- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) +- { +- unsigned int int_tmp = (*p_argv.ui)[0]; +- if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) +- { +- if (intarg_count < NUM_GPR_ARG_REGISTERS) +- intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; +- *next_arg.u = int_tmp; +- next_arg.u++; +- for (ii = 1; ii < 4; ii++) +- { +- int_tmp = (*p_argv.ui)[ii]; +- *next_arg.u = int_tmp; +- next_arg.u++; +- } +- } +- else +- { +- *gpr_base.u++ = int_tmp; +- for (ii = 1; ii < 4; ii++) +- { +- int_tmp = (*p_argv.ui)[ii]; +- *gpr_base.u++ = int_tmp; +- } +- } +- intarg_count +=4; +- } +- else +- { + double_tmp = (*p_argv.d)[0]; + + if (fparg_count >= NUM_FPR_ARG_REGISTERS - 1) +@@ -280,13 +261,40 @@ ffi_prep_args_SYSV (extended_cif *ecif, + + fparg_count += 2; + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); +- } + break; + #endif ++#endif /* have FPRs */ ++ ++ /* ++ * The soft float ABI for long doubles works like this, a long double ++ * is passed in four consecutive GPRs if available. A maximum of 2 ++ * long doubles can be passed in gprs. If we do not have 4 GPRs ++ * left, the long double is passed on the stack, 4-byte aligned. ++ */ ++ case FFI_TYPE_UINT128: { ++ unsigned int int_tmp = (*p_argv.ui)[0]; ++ unsigned int ii; ++ if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) { ++ if (intarg_count < NUM_GPR_ARG_REGISTERS) ++ intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; ++ *(next_arg.u++) = int_tmp; ++ for (ii = 1; ii < 4; ii++) { ++ int_tmp = (*p_argv.ui)[ii]; ++ *(next_arg.u++) = int_tmp; ++ } ++ } else { ++ *(gpr_base.u++) = int_tmp; ++ for (ii = 1; ii < 4; ii++) { ++ int_tmp = (*p_argv.ui)[ii]; ++ *(gpr_base.u++) = int_tmp; ++ } ++ } ++ intarg_count += 4; ++ break; ++ } + + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: +- soft_double_prep: + if (intarg_count == NUM_GPR_ARG_REGISTERS-1) + intarg_count++; + if (intarg_count >= NUM_GPR_ARG_REGISTERS) +@@ -319,9 +327,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, + break; + + case FFI_TYPE_STRUCT: +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- do_struct: +-#endif + struct_copy_size = ((*ptr)->size + 15) & ~0xF; + copy_space.c -= struct_copy_size; + memcpy (copy_space.c, *p_argv.c, (*ptr)->size); +@@ -349,7 +354,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, + case FFI_TYPE_UINT32: + case FFI_TYPE_SINT32: + case FFI_TYPE_POINTER: +- soft_float_prep: + + gprvalue = **p_argv.ui; + +@@ -366,8 +370,16 @@ ffi_prep_args_SYSV (extended_cif *ecif, + /* Check that we didn't overrun the stack... */ + FFI_ASSERT (copy_space.c >= next_arg.c); + FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS); ++ /* The assert below is testing that the number of integer arguments agrees ++ with the number found in ffi_prep_cif_machdep(). However, intarg_count ++ is incremented whenever we place an FP arg on the stack, so account for ++ that before our assert test. */ ++#ifndef __NO_FPRS__ ++ if (fparg_count > NUM_FPR_ARG_REGISTERS) ++ intarg_count -= fparg_count - NUM_FPR_ARG_REGISTERS; + FFI_ASSERT (fpr_base.u + <= stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); ++#endif + FFI_ASSERT (flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); + } + +@@ -378,6 +390,45 @@ enum { + }; + enum { ASM_NEEDS_REGISTERS64 = 4 }; + ++#if _CALL_ELF == 2 ++static unsigned int ++discover_homogeneous_aggregate (const ffi_type *t, unsigned int *elnum) ++{ ++ switch (t->type) ++ { ++ case FFI_TYPE_FLOAT: ++ case FFI_TYPE_DOUBLE: ++ *elnum = 1; ++ return (int) t->type; ++ ++ case FFI_TYPE_STRUCT:; ++ { ++ unsigned int base_elt = 0, total_elnum = 0; ++ ffi_type **el = t->elements; ++ while (*el) ++ { ++ unsigned int el_elt, el_elnum = 0; ++ el_elt = discover_homogeneous_aggregate (*el, &el_elnum); ++ if (el_elt == 0 ++ || (base_elt && base_elt != el_elt)) ++ return 0; ++ base_elt = el_elt; ++ total_elnum += el_elnum; ++ if (total_elnum > 8) ++ return 0; ++ el++; ++ } ++ *elnum = total_elnum; ++ return base_elt; ++ } ++ ++ default: ++ return 0; ++ } ++} ++#endif ++ ++ + /* ffi_prep_args64 is called by the assembly routine once stack space + has been allocated for the function's arguments. + +@@ -423,6 +474,7 @@ ffi_prep_args64 (extended_cif *ecif, uns + unsigned long *ul; + float *f; + double *d; ++ size_t p; + } valp; + + /* 'stacktop' points at the previous backchain pointer. */ +@@ -438,9 +490,9 @@ ffi_prep_args64 (extended_cif *ecif, uns + /* 'fpr_base' points at the space for fpr3, and grows upwards as + we use FPR registers. */ + valp fpr_base; +- int fparg_count; ++ unsigned int fparg_count; + +- int i, words; ++ unsigned int i, words, nargs, nfixedargs; + ffi_type **ptr; + double double_tmp; + union { +@@ -457,11 +509,18 @@ ffi_prep_args64 (extended_cif *ecif, uns + double **d; + } p_argv; + unsigned long gprvalue; ++#ifdef __STRUCT_PARM_ALIGN__ ++ unsigned long align; ++#endif + + stacktop.c = (char *) stack + bytes; + gpr_base.ul = stacktop.ul - ASM_NEEDS_REGISTERS64 - NUM_GPR_ARG_REGISTERS64; + gpr_end.ul = gpr_base.ul + NUM_GPR_ARG_REGISTERS64; ++#if _CALL_ELF == 2 ++ rest.ul = stack + 4 + NUM_GPR_ARG_REGISTERS64; ++#else + rest.ul = stack + 6 + NUM_GPR_ARG_REGISTERS64; ++#endif + fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS64; + fparg_count = 0; + next_arg.ul = gpr_base.ul; +@@ -477,30 +536,36 @@ ffi_prep_args64 (extended_cif *ecif, uns + + /* Now for the arguments. */ + p_argv.v = ecif->avalue; +- for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs; +- i > 0; +- i--, ptr++, p_argv.v++) ++ nargs = ecif->cif->nargs; ++ nfixedargs = ecif->cif->nfixedargs; ++ for (ptr = ecif->cif->arg_types, i = 0; ++ i < nargs; ++ i++, ptr++, p_argv.v++) + { ++ unsigned int elt, elnum; ++ + switch ((*ptr)->type) + { + case FFI_TYPE_FLOAT: + double_tmp = **p_argv.f; +- *next_arg.f = (float) double_tmp; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.f = (float) double_tmp; + if (++next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; +- if (fparg_count < NUM_FPR_ARG_REGISTERS64) +- *fpr_base.d++ = double_tmp; + fparg_count++; + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); + break; + + case FFI_TYPE_DOUBLE: + double_tmp = **p_argv.d; +- *next_arg.d = double_tmp; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.d = double_tmp; + if (++next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; +- if (fparg_count < NUM_FPR_ARG_REGISTERS64) +- *fpr_base.d++ = double_tmp; + fparg_count++; + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); + break; +@@ -508,18 +573,20 @@ ffi_prep_args64 (extended_cif *ecif, uns + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: + double_tmp = (*p_argv.d)[0]; +- *next_arg.d = double_tmp; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.d = double_tmp; + if (++next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; +- if (fparg_count < NUM_FPR_ARG_REGISTERS64) +- *fpr_base.d++ = double_tmp; + fparg_count++; + double_tmp = (*p_argv.d)[1]; +- *next_arg.d = double_tmp; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.d = double_tmp; + if (++next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; +- if (fparg_count < NUM_FPR_ARG_REGISTERS64) +- *fpr_base.d++ = double_tmp; + fparg_count++; + FFI_ASSERT (__LDBL_MANT_DIG__ == 106); + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); +@@ -527,27 +594,86 @@ ffi_prep_args64 (extended_cif *ecif, uns + #endif + + case FFI_TYPE_STRUCT: +- words = ((*ptr)->size + 7) / 8; +- if (next_arg.ul >= gpr_base.ul && next_arg.ul + words > gpr_end.ul) ++#ifdef __STRUCT_PARM_ALIGN__ ++ align = (*ptr)->alignment; ++ if (align > __STRUCT_PARM_ALIGN__) ++ align = __STRUCT_PARM_ALIGN__; ++ if (align > 1) ++ next_arg.p = ALIGN (next_arg.p, align); ++#endif ++ elt = 0; ++#if _CALL_ELF == 2 ++ elt = discover_homogeneous_aggregate (*ptr, &elnum); ++#endif ++ if (elt) + { +- size_t first = gpr_end.c - next_arg.c; +- memcpy (next_arg.c, *p_argv.c, first); +- memcpy (rest.c, *p_argv.c + first, (*ptr)->size - first); +- next_arg.c = rest.c + words * 8 - first; ++ union { ++ void *v; ++ float *f; ++ double *d; ++ } arg; ++ ++ arg.v = *p_argv.v; ++ if (elt == FFI_TYPE_FLOAT) ++ { ++ do ++ { ++ double_tmp = *arg.f++; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 ++ && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.f = (float) double_tmp; ++ if (++next_arg.f == gpr_end.f) ++ next_arg.f = rest.f; ++ fparg_count++; ++ } ++ while (--elnum != 0); ++ if ((next_arg.p & 3) != 0) ++ { ++ if (++next_arg.f == gpr_end.f) ++ next_arg.f = rest.f; ++ } ++ } ++ else ++ do ++ { ++ double_tmp = *arg.d++; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.d = double_tmp; ++ if (++next_arg.d == gpr_end.d) ++ next_arg.d = rest.d; ++ fparg_count++; ++ } ++ while (--elnum != 0); + } + else + { +- char *where = next_arg.c; +- +- /* Structures with size less than eight bytes are passed +- left-padded. */ +- if ((*ptr)->size < 8) +- where += 8 - (*ptr)->size; ++ words = ((*ptr)->size + 7) / 8; ++ if (next_arg.ul >= gpr_base.ul && next_arg.ul + words > gpr_end.ul) ++ { ++ size_t first = gpr_end.c - next_arg.c; ++ memcpy (next_arg.c, *p_argv.c, first); ++ memcpy (rest.c, *p_argv.c + first, (*ptr)->size - first); ++ next_arg.c = rest.c + words * 8 - first; ++ } ++ else ++ { ++ char *where = next_arg.c; + +- memcpy (where, *p_argv.c, (*ptr)->size); +- next_arg.ul += words; +- if (next_arg.ul == gpr_end.ul) +- next_arg.ul = rest.ul; ++#ifndef __LITTLE_ENDIAN__ ++ /* Structures with size less than eight bytes are passed ++ left-padded. */ ++ if ((*ptr)->size < 8) ++ where += 8 - (*ptr)->size; ++#endif ++ memcpy (where, *p_argv.c, (*ptr)->size); ++ next_arg.ul += words; ++ if (next_arg.ul == gpr_end.ul) ++ next_arg.ul = rest.ul; ++ } + } + break; + +@@ -591,27 +717,22 @@ ffi_prep_args64 (extended_cif *ecif, uns + + + /* Perform machine dependent cif processing */ +-ffi_status +-ffi_prep_cif_machdep (ffi_cif *cif) ++static ffi_status ++ffi_prep_cif_machdep_core (ffi_cif *cif) + { + /* All this is for the SYSV and LINUX64 ABI. */ +- int i; + ffi_type **ptr; + unsigned bytes; +- int fparg_count = 0, intarg_count = 0; +- unsigned flags = 0; ++ unsigned i, fparg_count = 0, intarg_count = 0; ++ unsigned flags = cif->flags; + unsigned struct_copy_size = 0; + unsigned type = cif->rtype->type; + unsigned size = cif->rtype->size; + +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- NUM_FPR_ARG_REGISTERS = 0; +- ++ /* The machine-independent calculation of cif->bytes doesn't work ++ for us. Redo the calculation. */ + if (cif->abi != FFI_LINUX64) + { +- /* All the machine-independent calculation of cif->bytes will be wrong. +- Redo the calculation for SYSV. */ +- + /* Space for the frame pointer, callee's LR, and the asm's temp regs. */ + bytes = (2 + ASM_NEEDS_REGISTERS) * sizeof (int); + +@@ -621,13 +742,20 @@ ffi_prep_cif_machdep (ffi_cif *cif) + else + { + /* 64-bit ABI. */ ++#if _CALL_ELF == 2 ++ /* Space for backchain, CR, LR, TOC and the asm's temp regs. */ ++ bytes = (4 + ASM_NEEDS_REGISTERS64) * sizeof (long); + ++ /* Space for the general registers. */ ++ bytes += NUM_GPR_ARG_REGISTERS64 * sizeof (long); ++#else + /* Space for backchain, CR, LR, cc/ld doubleword, TOC and the asm's temp + regs. */ + bytes = (6 + ASM_NEEDS_REGISTERS64) * sizeof (long); + + /* Space for the mandatory parm save area and general registers. */ + bytes += 2 * NUM_GPR_ARG_REGISTERS64 * sizeof (long); ++#endif + } + + /* Return value handling. The rules for SYSV are as follows: +@@ -646,13 +774,30 @@ ffi_prep_cif_machdep (ffi_cif *cif) + - Single/double FP values in fpr1, long double in fpr1,fpr2. + - soft-float float/doubles are treated as UINT32/UINT64 respectivley. + - soft-float long doubles are returned in gpr3-gpr6. */ ++ /* First translate for softfloat/nonlinux */ ++ if (cif->abi == FFI_LINUX_SOFT_FLOAT) ++ { ++ if (type == FFI_TYPE_FLOAT) ++ type = FFI_TYPE_UINT32; ++ if (type == FFI_TYPE_DOUBLE) ++ type = FFI_TYPE_UINT64; ++ if (type == FFI_TYPE_LONGDOUBLE) ++ type = FFI_TYPE_UINT128; ++ } ++ else if (cif->abi != FFI_LINUX ++ && cif->abi != FFI_LINUX64) ++ { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (type == FFI_TYPE_LONGDOUBLE) ++ type = FFI_TYPE_STRUCT; ++#endif ++ } ++ + switch (type) + { ++#ifndef __NO_FPRS__ + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64 +- && cif->abi != FFI_LINUX_SOFT_FLOAT) +- goto byref; + flags |= FLAG_RETURNS_128BITS; + /* Fall through. */ + #endif +@@ -660,47 +805,52 @@ ffi_prep_cif_machdep (ffi_cif *cif) + flags |= FLAG_RETURNS_64BITS; + /* Fall through. */ + case FFI_TYPE_FLOAT: +- /* With FFI_LINUX_SOFT_FLOAT no fp registers are used. */ +- if (cif->abi != FFI_LINUX_SOFT_FLOAT) +- flags |= FLAG_RETURNS_FP; ++ flags |= FLAG_RETURNS_FP; + break; ++#endif + ++ case FFI_TYPE_UINT128: ++ flags |= FLAG_RETURNS_128BITS; ++ /* Fall through. */ + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + flags |= FLAG_RETURNS_64BITS; + break; + + case FFI_TYPE_STRUCT: +- if (cif->abi == FFI_SYSV) ++ /* ++ * The final SYSV ABI says that structures smaller or equal 8 bytes ++ * are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them ++ * in memory. ++ * ++ * NOTE: The assembly code can safely assume that it just needs to ++ * store both r3 and r4 into a 8-byte word-aligned buffer, as ++ * we allocate a temporary buffer in ffi_call() if this flag is ++ * set. ++ */ ++ if (cif->abi == FFI_SYSV && size <= 8) + { +- /* The final SYSV ABI says that structures smaller or equal 8 bytes +- are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them +- in memory. */ +- +- /* Treat structs with size <= 8 bytes. */ +- if (size <= 8) ++ flags |= FLAG_RETURNS_SMST; ++ break; ++ } ++#if _CALL_ELF == 2 ++ if (cif->abi == FFI_LINUX64) ++ { ++ unsigned int elt, elnum; ++ elt = discover_homogeneous_aggregate (cif->rtype, &elnum); ++ if (elt) ++ { ++ if (elt == FFI_TYPE_DOUBLE) ++ flags |= FLAG_RETURNS_64BITS; ++ flags |= FLAG_RETURNS_FP | FLAG_RETURNS_SMST; ++ break; ++ } ++ if (size <= 16) + { + flags |= FLAG_RETURNS_SMST; +- /* These structs are returned in r3. We pack the type and the +- precalculated shift value (needed in the sysv.S) into flags. +- The same applies for the structs returned in r3/r4. */ +- if (size <= 4) +- { +- flags |= FLAG_SYSV_SMST_R3; +- flags |= 8 * (4 - size) << 8; +- break; +- } +- /* These structs are returned in r3 and r4. See above. */ +- if (size <= 8) +- { +- flags |= FLAG_SYSV_SMST_R3 | FLAG_SYSV_SMST_R4; +- flags |= 8 * (8 - size) << 8; +- break; +- } ++ break; + } + } +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- byref: + #endif + intarg_count++; + flags |= FLAG_RETVAL_REFERENCE; +@@ -722,39 +872,36 @@ ffi_prep_cif_machdep (ffi_cif *cif) + Stuff on the stack needs to keep proper alignment. */ + for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) + { +- switch ((*ptr)->type) +- { ++ unsigned short typenum = (*ptr)->type; ++ ++ /* We may need to handle some values depending on ABI */ ++ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { ++ if (typenum == FFI_TYPE_FLOAT) ++ typenum = FFI_TYPE_UINT32; ++ if (typenum == FFI_TYPE_DOUBLE) ++ typenum = FFI_TYPE_UINT64; ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_UINT128; ++ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_STRUCT; ++#endif ++ } ++ ++ switch (typenum) { ++#ifndef __NO_FPRS__ + case FFI_TYPE_FLOAT: +- /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_float_cif; + fparg_count++; + /* floating singles are not 8-aligned on stack */ + break; + + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) +- goto do_struct; +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- { +- if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 +- || intarg_count < NUM_GPR_ARG_REGISTERS) +- /* A long double in FFI_LINUX_SOFT_FLOAT can use only +- a set of four consecutive gprs. If we have not enough, +- we have to adjust the intarg_count value. */ +- intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; +- intarg_count += 4; +- break; +- } +- else +- fparg_count++; ++ fparg_count++; + /* Fall thru */ + #endif + case FFI_TYPE_DOUBLE: +- /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_double_cif; + fparg_count++; + /* If this FP arg is going on the stack, it must be + 8-byte-aligned. */ +@@ -763,10 +910,21 @@ ffi_prep_cif_machdep (ffi_cif *cif) + && intarg_count % 2 != 0) + intarg_count++; + break; ++#endif ++ case FFI_TYPE_UINT128: ++ /* ++ * A long double in FFI_LINUX_SOFT_FLOAT can use only a set ++ * of four consecutive gprs. If we do not have enough, we ++ * have to adjust the intarg_count value. ++ */ ++ if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 ++ && intarg_count < NUM_GPR_ARG_REGISTERS) ++ intarg_count = NUM_GPR_ARG_REGISTERS; ++ intarg_count += 4; ++ break; + + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: +- soft_double_cif: + /* 'long long' arguments are passed as two words, but + either both words must fit in registers or both go + on the stack. If they go on the stack, they must +@@ -783,9 +941,6 @@ ffi_prep_cif_machdep (ffi_cif *cif) + break; + + case FFI_TYPE_STRUCT: +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- do_struct: +-#endif + /* We must allocate space for a copy of these to enforce + pass-by-value. Pad the space up to a multiple of 16 + bytes (the maximum alignment required for anything under +@@ -793,50 +948,100 @@ ffi_prep_cif_machdep (ffi_cif *cif) + struct_copy_size += ((*ptr)->size + 15) & ~0xF; + /* Fall through (allocate space for the pointer). */ + +- default: +- soft_float_cif: ++ case FFI_TYPE_POINTER: ++ case FFI_TYPE_INT: ++ case FFI_TYPE_UINT32: ++ case FFI_TYPE_SINT32: ++ case FFI_TYPE_UINT16: ++ case FFI_TYPE_SINT16: ++ case FFI_TYPE_UINT8: ++ case FFI_TYPE_SINT8: + /* Everything else is passed as a 4-byte word in a GPR, either + the object itself or a pointer to it. */ + intarg_count++; + break; ++ default: ++ FFI_ASSERT (0); + } + } + else + for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) + { ++ unsigned int elt, elnum; ++#ifdef __STRUCT_PARM_ALIGN__ ++ unsigned int align; ++#endif ++ + switch ((*ptr)->type) + { + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- intarg_count += 4; +- else +- { +- fparg_count += 2; +- intarg_count += 2; +- } ++ fparg_count += 2; ++ intarg_count += 2; ++ if (fparg_count > NUM_FPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; + break; + #endif + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + fparg_count++; + intarg_count++; ++ if (fparg_count > NUM_FPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; + break; + + case FFI_TYPE_STRUCT: ++#ifdef __STRUCT_PARM_ALIGN__ ++ align = (*ptr)->alignment; ++ if (align > __STRUCT_PARM_ALIGN__) ++ align = __STRUCT_PARM_ALIGN__; ++ align = align / 8; ++ if (align > 1) ++ intarg_count = ALIGN (intarg_count, align); ++#endif + intarg_count += ((*ptr)->size + 7) / 8; ++ elt = 0; ++#if _CALL_ELF == 2 ++ elt = discover_homogeneous_aggregate (*ptr, &elnum); ++#endif ++ if (elt) ++ { ++ fparg_count += elnum; ++ if (fparg_count > NUM_FPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; ++ } ++ else ++ { ++ if (intarg_count > NUM_GPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; ++ } + break; + +- default: ++ case FFI_TYPE_POINTER: ++ case FFI_TYPE_UINT64: ++ case FFI_TYPE_SINT64: ++ case FFI_TYPE_INT: ++ case FFI_TYPE_UINT32: ++ case FFI_TYPE_SINT32: ++ case FFI_TYPE_UINT16: ++ case FFI_TYPE_SINT16: ++ case FFI_TYPE_UINT8: ++ case FFI_TYPE_SINT8: + /* Everything else is passed as a 8-byte word in a GPR, either + the object itself or a pointer to it. */ + intarg_count++; ++ if (intarg_count > NUM_GPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; + break; ++ default: ++ FFI_ASSERT (0); + } + } + ++#ifndef __NO_FPRS__ + if (fparg_count != 0) + flags |= FLAG_FP_ARGUMENTS; ++#endif + if (intarg_count > 4) + flags |= FLAG_4_GPR_ARGUMENTS; + if (struct_copy_size != 0) +@@ -844,25 +1049,36 @@ ffi_prep_cif_machdep (ffi_cif *cif) + + if (cif->abi != FFI_LINUX64) + { ++#ifndef __NO_FPRS__ + /* Space for the FPR registers, if needed. */ + if (fparg_count != 0) + bytes += NUM_FPR_ARG_REGISTERS * sizeof (double); ++#endif + + /* Stack space. */ + if (intarg_count > NUM_GPR_ARG_REGISTERS) + bytes += (intarg_count - NUM_GPR_ARG_REGISTERS) * sizeof (int); ++#ifndef __NO_FPRS__ + if (fparg_count > NUM_FPR_ARG_REGISTERS) + bytes += (fparg_count - NUM_FPR_ARG_REGISTERS) * sizeof (double); ++#endif + } + else + { ++#ifndef __NO_FPRS__ + /* Space for the FPR registers, if needed. */ + if (fparg_count != 0) + bytes += NUM_FPR_ARG_REGISTERS64 * sizeof (double); ++#endif + + /* Stack space. */ ++#if _CALL_ELF == 2 ++ if ((flags & FLAG_ARG_NEEDS_PSAVE) != 0) ++ bytes += intarg_count * sizeof (long); ++#else + if (intarg_count > NUM_GPR_ARG_REGISTERS64) + bytes += (intarg_count - NUM_GPR_ARG_REGISTERS64) * sizeof (long); ++#endif + } + + /* The stack space allocated needs to be a multiple of 16 bytes. */ +@@ -877,6 +1093,26 @@ ffi_prep_cif_machdep (ffi_cif *cif) + return FFI_OK; + } + ++ffi_status ++ffi_prep_cif_machdep (ffi_cif *cif) ++{ ++ cif->nfixedargs = cif->nargs; ++ return ffi_prep_cif_machdep_core (cif); ++} ++ ++ffi_status ++ffi_prep_cif_machdep_var (ffi_cif *cif, ++ unsigned int nfixedargs, ++ unsigned int ntotalargs MAYBE_UNUSED) ++{ ++ cif->nfixedargs = nfixedargs; ++#if _CALL_ELF == 2 ++ if (cif->abi == FFI_LINUX64) ++ cif->flags |= FLAG_ARG_NEEDS_PSAVE; ++#endif ++ return ffi_prep_cif_machdep_core (cif); ++} ++ + extern void ffi_call_SYSV(extended_cif *, unsigned, unsigned, unsigned *, + void (*fn)(void)); + extern void FFI_HIDDEN ffi_call_LINUX64(extended_cif *, unsigned long, +@@ -886,28 +1122,39 @@ extern void FFI_HIDDEN ffi_call_LINUX64( + void + ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) + { ++ /* ++ * The final SYSV ABI says that structures smaller or equal 8 bytes ++ * are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them ++ * in memory. ++ * ++ * We bounce-buffer SYSV small struct return values so that sysv.S ++ * can write r3 and r4 to memory without worrying about struct size. ++ * ++ * For ELFv2 ABI, use a bounce buffer for homogeneous structs too, ++ * for similar reasons. ++ */ ++ unsigned long smst_buffer[8]; + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + +- /* If the return value is a struct and we don't have a return */ +- /* value address then we need to make one */ +- +- if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) +- { +- ecif.rvalue = alloca(cif->rtype->size); +- } +- else +- ecif.rvalue = rvalue; +- ++ ecif.rvalue = rvalue; ++ if ((cif->flags & FLAG_RETURNS_SMST) != 0) ++ ecif.rvalue = smst_buffer; ++ /* Ensure that we have a valid struct return value. ++ FIXME: Isn't this just papering over a user problem? */ ++ else if (!rvalue && cif->rtype->type == FFI_TYPE_STRUCT) ++ ecif.rvalue = alloca (cif->rtype->size); + + switch (cif->abi) + { + #ifndef POWERPC64 ++# ifndef __NO_FPRS__ + case FFI_SYSV: + case FFI_GCC_SYSV: + case FFI_LINUX: ++# endif + case FFI_LINUX_SOFT_FLOAT: + ffi_call_SYSV (&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn); + break; +@@ -920,10 +1167,29 @@ ffi_call(ffi_cif *cif, void (*fn)(void), + FFI_ASSERT (0); + break; + } ++ ++ /* Check for a bounce-buffered return value */ ++ if (rvalue && ecif.rvalue == smst_buffer) ++ { ++ unsigned int rsize = cif->rtype->size; ++#ifndef __LITTLE_ENDIAN__ ++ /* The SYSV ABI returns a structure of up to 4 bytes in size ++ left-padded in r3. */ ++ if (cif->abi == FFI_SYSV && rsize <= 4) ++ memcpy (rvalue, (char *) smst_buffer + 4 - rsize, rsize); ++ /* The SYSV ABI returns a structure of up to 8 bytes in size ++ left-padded in r3/r4, and the ELFv2 ABI similarly returns a ++ structure of up to 8 bytes in size left-padded in r3. */ ++ else if (rsize <= 8) ++ memcpy (rvalue, (char *) smst_buffer + 8 - rsize, rsize); ++ else ++#endif ++ memcpy (rvalue, smst_buffer, rsize); ++ } + } + + +-#ifndef POWERPC64 ++#if !defined POWERPC64 || _CALL_ELF == 2 + #define MIN_CACHE_LINE_SIZE 8 + + static void +@@ -947,16 +1213,38 @@ ffi_prep_closure_loc (ffi_closure *closu + void *codeloc) + { + #ifdef POWERPC64 ++# if _CALL_ELF == 2 ++ unsigned int *tramp = (unsigned int *) &closure->tramp[0]; ++ ++ if (cif->abi != FFI_LINUX64) ++ return FFI_BAD_ABI; ++ ++ tramp[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */ ++ tramp[1] = 0xe98c0010; /* ld 12,1f-0b(12) */ ++ tramp[2] = 0x7d8903a6; /* mtctr 12 */ ++ tramp[3] = 0x4e800420; /* bctr */ ++ /* 1: .quad function_addr */ ++ /* 2: .quad context */ ++ *(void **) &tramp[4] = (void *) ffi_closure_LINUX64; ++ *(void **) &tramp[6] = codeloc; ++ flush_icache ((char *)tramp, (char *)codeloc, FFI_TRAMPOLINE_SIZE); ++# else + void **tramp = (void **) &closure->tramp[0]; + +- FFI_ASSERT (cif->abi == FFI_LINUX64); ++ if (cif->abi != FFI_LINUX64) ++ return FFI_BAD_ABI; + /* Copy function address and TOC from ffi_closure_LINUX64. */ + memcpy (tramp, (char *) ffi_closure_LINUX64, 16); + tramp[2] = codeloc; ++# endif + #else + unsigned int *tramp; + +- FFI_ASSERT (cif->abi == FFI_GCC_SYSV || cif->abi == FFI_SYSV); ++ if (! (cif->abi == FFI_GCC_SYSV ++ || cif->abi == FFI_SYSV ++ || cif->abi == FFI_LINUX ++ || cif->abi == FFI_LINUX_SOFT_FLOAT)) ++ return FFI_BAD_ABI; + + tramp = (unsigned int *) &closure->tramp[0]; + tramp[0] = 0x7c0802a6; /* mflr r0 */ +@@ -1011,32 +1299,38 @@ ffi_closure_helper_SYSV (ffi_closure *cl + void ** avalue; + ffi_type ** arg_types; + long i, avn; +- long nf; /* number of floating registers already used */ +- long ng; /* number of general registers already used */ +- ffi_cif * cif; +- double temp; +- unsigned size; ++#ifndef __NO_FPRS__ ++ long nf = 0; /* number of floating registers already used */ ++#endif ++ long ng = 0; /* number of general registers already used */ ++ ++ ffi_cif *cif = closure->cif; ++ unsigned size = cif->rtype->size; ++ unsigned short rtypenum = cif->rtype->type; + +- cif = closure->cif; + avalue = alloca (cif->nargs * sizeof (void *)); +- size = cif->rtype->size; + +- nf = 0; +- ng = 0; ++ /* First translate for softfloat/nonlinux */ ++ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { ++ if (rtypenum == FFI_TYPE_FLOAT) ++ rtypenum = FFI_TYPE_UINT32; ++ if (rtypenum == FFI_TYPE_DOUBLE) ++ rtypenum = FFI_TYPE_UINT64; ++ if (rtypenum == FFI_TYPE_LONGDOUBLE) ++ rtypenum = FFI_TYPE_UINT128; ++ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (rtypenum == FFI_TYPE_LONGDOUBLE) ++ rtypenum = FFI_TYPE_STRUCT; ++#endif ++ } ++ + + /* Copy the caller's structure return value address so that the closure + returns the data directly to the caller. + For FFI_SYSV the result is passed in r3/r4 if the struct size is less + or equal 8 bytes. */ +- +- if ((cif->rtype->type == FFI_TYPE_STRUCT +- && !((cif->abi == FFI_SYSV) && (size <= 8))) +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- || (cif->rtype->type == FFI_TYPE_LONGDOUBLE +- && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) +-#endif +- ) +- { ++ if (rtypenum == FFI_TYPE_STRUCT && ((cif->abi != FFI_SYSV) || (size > 8))) { + rvalue = (void *) *pgr; + ng++; + pgr++; +@@ -1047,12 +1341,112 @@ ffi_closure_helper_SYSV (ffi_closure *cl + arg_types = cif->arg_types; + + /* Grab the addresses of the arguments from the stack frame. */ +- while (i < avn) +- { +- switch (arg_types[i]->type) +- { ++ while (i < avn) { ++ unsigned short typenum = arg_types[i]->type; ++ ++ /* We may need to handle some values depending on ABI */ ++ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { ++ if (typenum == FFI_TYPE_FLOAT) ++ typenum = FFI_TYPE_UINT32; ++ if (typenum == FFI_TYPE_DOUBLE) ++ typenum = FFI_TYPE_UINT64; ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_UINT128; ++ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_STRUCT; ++#endif ++ } ++ ++ switch (typenum) { ++#ifndef __NO_FPRS__ ++ case FFI_TYPE_FLOAT: ++ /* unfortunately float values are stored as doubles ++ * in the ffi_closure_SYSV code (since we don't check ++ * the type in that routine). ++ */ ++ ++ /* there are 8 64bit floating point registers */ ++ ++ if (nf < 8) ++ { ++ double temp = pfr->d; ++ pfr->f = (float) temp; ++ avalue[i] = pfr; ++ nf++; ++ pfr++; ++ } ++ else ++ { ++ /* FIXME? here we are really changing the values ++ * stored in the original calling routines outgoing ++ * parameter stack. This is probably a really ++ * naughty thing to do but... ++ */ ++ avalue[i] = pst; ++ pst += 1; ++ } ++ break; ++ ++ case FFI_TYPE_DOUBLE: ++ /* On the outgoing stack all values are aligned to 8 */ ++ /* there are 8 64bit floating point registers */ ++ ++ if (nf < 8) ++ { ++ avalue[i] = pfr; ++ nf++; ++ pfr++; ++ } ++ else ++ { ++ if (((long) pst) & 4) ++ pst++; ++ avalue[i] = pst; ++ pst += 2; ++ } ++ break; ++ ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ case FFI_TYPE_LONGDOUBLE: ++ if (nf < 7) ++ { ++ avalue[i] = pfr; ++ pfr += 2; ++ nf += 2; ++ } ++ else ++ { ++ if (((long) pst) & 4) ++ pst++; ++ avalue[i] = pst; ++ pst += 4; ++ nf = 8; ++ } ++ break; ++#endif ++#endif /* have FPRS */ ++ ++ case FFI_TYPE_UINT128: ++ /* ++ * Test if for the whole long double, 4 gprs are available. ++ * otherwise the stuff ends up on the stack. ++ */ ++ if (ng < 5) { ++ avalue[i] = pgr; ++ pgr += 4; ++ ng += 4; ++ } else { ++ avalue[i] = pst; ++ pst += 4; ++ ng = 8+4; ++ } ++ break; ++ + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: ++#ifndef __LITTLE_ENDIAN__ + /* there are 8 gpr registers used to pass values */ + if (ng < 8) + { +@@ -1066,9 +1460,11 @@ ffi_closure_helper_SYSV (ffi_closure *cl + pst++; + } + break; ++#endif + + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: ++#ifndef __LITTLE_ENDIAN__ + /* there are 8 gpr registers used to pass values */ + if (ng < 8) + { +@@ -1082,11 +1478,11 @@ ffi_closure_helper_SYSV (ffi_closure *cl + pst++; + } + break; ++#endif + + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: + case FFI_TYPE_POINTER: +- soft_float_closure: + /* there are 8 gpr registers used to pass values */ + if (ng < 8) + { +@@ -1102,9 +1498,6 @@ ffi_closure_helper_SYSV (ffi_closure *cl + break; + + case FFI_TYPE_STRUCT: +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- do_struct: +-#endif + /* Structs are passed by reference. The address will appear in a + gpr if it is one of the first 8 arguments. */ + if (ng < 8) +@@ -1122,7 +1515,6 @@ ffi_closure_helper_SYSV (ffi_closure *cl + + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: +- soft_double_closure: + /* passing long long ints are complex, they must + * be passed in suitable register pairs such as + * (r3,r4) or (r5,r6) or (r6,r7), or (r7,r8) or (r9,r10) +@@ -1154,99 +1546,8 @@ ffi_closure_helper_SYSV (ffi_closure *cl + } + break; + +- case FFI_TYPE_FLOAT: +- /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_float_closure; +- /* unfortunately float values are stored as doubles +- * in the ffi_closure_SYSV code (since we don't check +- * the type in that routine). +- */ +- +- /* there are 8 64bit floating point registers */ +- +- if (nf < 8) +- { +- temp = pfr->d; +- pfr->f = (float) temp; +- avalue[i] = pfr; +- nf++; +- pfr++; +- } +- else +- { +- /* FIXME? here we are really changing the values +- * stored in the original calling routines outgoing +- * parameter stack. This is probably a really +- * naughty thing to do but... +- */ +- avalue[i] = pst; +- pst += 1; +- } +- break; +- +- case FFI_TYPE_DOUBLE: +- /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_double_closure; +- /* On the outgoing stack all values are aligned to 8 */ +- /* there are 8 64bit floating point registers */ +- +- if (nf < 8) +- { +- avalue[i] = pfr; +- nf++; +- pfr++; +- } +- else +- { +- if (((long) pst) & 4) +- pst++; +- avalue[i] = pst; +- pst += 2; +- } +- break; +- +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- case FFI_TYPE_LONGDOUBLE: +- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) +- goto do_struct; +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- { /* Test if for the whole long double, 4 gprs are available. +- otherwise the stuff ends up on the stack. */ +- if (ng < 5) +- { +- avalue[i] = pgr; +- pgr += 4; +- ng += 4; +- } +- else +- { +- avalue[i] = pst; +- pst += 4; +- ng = 8; +- } +- break; +- } +- if (nf < 7) +- { +- avalue[i] = pfr; +- pfr += 2; +- nf += 2; +- } +- else +- { +- if (((long) pst) & 4) +- pst++; +- avalue[i] = pst; +- pst += 4; +- nf = 8; +- } +- break; +-#endif +- + default: +- FFI_ASSERT (0); ++ FFI_ASSERT (0); + } + + i++; +@@ -1263,39 +1564,9 @@ ffi_closure_helper_SYSV (ffi_closure *cl + already used and we never have a struct with size zero. That is the reason + for the subtraction of 1. See the comment in ffitarget.h about ordering. + */ +- if (cif->abi == FFI_SYSV && cif->rtype->type == FFI_TYPE_STRUCT +- && size <= 8) ++ if (cif->abi == FFI_SYSV && rtypenum == FFI_TYPE_STRUCT && size <= 8) + return (FFI_SYSV_TYPE_SMALL_STRUCT - 1) + size; +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- else if (cif->rtype->type == FFI_TYPE_LONGDOUBLE +- && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) +- return FFI_TYPE_STRUCT; +-#endif +- /* With FFI_LINUX_SOFT_FLOAT floats and doubles are handled like UINT32 +- respectivley UINT64. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- { +- switch (cif->rtype->type) +- { +- case FFI_TYPE_FLOAT: +- return FFI_TYPE_UINT32; +- break; +- case FFI_TYPE_DOUBLE: +- return FFI_TYPE_UINT64; +- break; +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- case FFI_TYPE_LONGDOUBLE: +- return FFI_TYPE_UINT128; +- break; +-#endif +- default: +- return cif->rtype->type; +- } +- } +- else +- { +- return cif->rtype->type; +- } ++ return rtypenum; + } + + int FFI_HIDDEN ffi_closure_helper_LINUX64 (ffi_closure *, void *, +@@ -1312,16 +1583,20 @@ ffi_closure_helper_LINUX64 (ffi_closure + + void **avalue; + ffi_type **arg_types; +- long i, avn; ++ unsigned long i, avn, nfixedargs; + ffi_cif *cif; + ffi_dblfl *end_pfr = pfr + NUM_FPR_ARG_REGISTERS64; ++#ifdef __STRUCT_PARM_ALIGN__ ++ unsigned long align; ++#endif + + cif = closure->cif; + avalue = alloca (cif->nargs * sizeof (void *)); + +- /* Copy the caller's structure return value address so that the closure +- returns the data directly to the caller. */ +- if (cif->rtype->type == FFI_TYPE_STRUCT) ++ /* Copy the caller's structure return value address so that the ++ closure returns the data directly to the caller. */ ++ if (cif->rtype->type == FFI_TYPE_STRUCT ++ && (cif->flags & FLAG_RETURNS_SMST) == 0) + { + rvalue = (void *) *pst; + pst++; +@@ -1329,30 +1604,39 @@ ffi_closure_helper_LINUX64 (ffi_closure + + i = 0; + avn = cif->nargs; ++ nfixedargs = cif->nfixedargs; + arg_types = cif->arg_types; + + /* Grab the addresses of the arguments from the stack frame. */ + while (i < avn) + { ++ unsigned int elt, elnum; ++ + switch (arg_types[i]->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: ++#ifndef __LITTLE_ENDIAN__ + avalue[i] = (char *) pst + 7; + pst++; + break; ++#endif + + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: ++#ifndef __LITTLE_ENDIAN__ + avalue[i] = (char *) pst + 6; + pst++; + break; ++#endif + + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: ++#ifndef __LITTLE_ENDIAN__ + avalue[i] = (char *) pst + 4; + pst++; + break; ++#endif + + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: +@@ -1362,12 +1646,82 @@ ffi_closure_helper_LINUX64 (ffi_closure + break; + + case FFI_TYPE_STRUCT: +- /* Structures with size less than eight bytes are passed +- left-padded. */ +- if (arg_types[i]->size < 8) +- avalue[i] = (char *) pst + 8 - arg_types[i]->size; ++#ifdef __STRUCT_PARM_ALIGN__ ++ align = arg_types[i]->alignment; ++ if (align > __STRUCT_PARM_ALIGN__) ++ align = __STRUCT_PARM_ALIGN__; ++ if (align > 1) ++ pst = (unsigned long *) ALIGN ((size_t) pst, align); ++#endif ++ elt = 0; ++#if _CALL_ELF == 2 ++ elt = discover_homogeneous_aggregate (arg_types[i], &elnum); ++#endif ++ if (elt) ++ { ++ union { ++ void *v; ++ unsigned long *ul; ++ float *f; ++ double *d; ++ size_t p; ++ } to, from; ++ ++ /* Repackage the aggregate from its parts. The ++ aggregate size is not greater than the space taken by ++ the registers so store back to the register/parameter ++ save arrays. */ ++ if (pfr + elnum <= end_pfr) ++ to.v = pfr; ++ else ++ to.v = pst; ++ ++ avalue[i] = to.v; ++ from.ul = pst; ++ if (elt == FFI_TYPE_FLOAT) ++ { ++ do ++ { ++ if (pfr < end_pfr && i < nfixedargs) ++ { ++ *to.f = (float) pfr->d; ++ pfr++; ++ } ++ else ++ *to.f = *from.f; ++ to.f++; ++ from.f++; ++ } ++ while (--elnum != 0); ++ } ++ else ++ { ++ do ++ { ++ if (pfr < end_pfr && i < nfixedargs) ++ { ++ *to.d = pfr->d; ++ pfr++; ++ } ++ else ++ *to.d = *from.d; ++ to.d++; ++ from.d++; ++ } ++ while (--elnum != 0); ++ } ++ } + else +- avalue[i] = pst; ++ { ++#ifndef __LITTLE_ENDIAN__ ++ /* Structures with size less than eight bytes are passed ++ left-padded. */ ++ if (arg_types[i]->size < 8) ++ avalue[i] = (char *) pst + 8 - arg_types[i]->size; ++ else ++#endif ++ avalue[i] = pst; ++ } + pst += (arg_types[i]->size + 7) / 8; + break; + +@@ -1379,7 +1733,7 @@ ffi_closure_helper_LINUX64 (ffi_closure + + /* there are 13 64bit floating point registers */ + +- if (pfr < end_pfr) ++ if (pfr < end_pfr && i < nfixedargs) + { + double temp = pfr->d; + pfr->f = (float) temp; +@@ -1395,7 +1749,7 @@ ffi_closure_helper_LINUX64 (ffi_closure + /* On the outgoing stack all values are aligned to 8 */ + /* there are 13 64bit floating point registers */ + +- if (pfr < end_pfr) ++ if (pfr < end_pfr && i < nfixedargs) + { + avalue[i] = pfr; + pfr++; +@@ -1407,14 +1761,14 @@ ffi_closure_helper_LINUX64 (ffi_closure + + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if (pfr + 1 < end_pfr) ++ if (pfr + 1 < end_pfr && i + 1 < nfixedargs) + { + avalue[i] = pfr; + pfr += 2; + } + else + { +- if (pfr < end_pfr) ++ if (pfr < end_pfr && i < nfixedargs) + { + /* Passed partly in f13 and partly on the stack. + Move it all to the stack. */ +@@ -1438,5 +1792,14 @@ ffi_closure_helper_LINUX64 (ffi_closure + (closure->fun) (cif, rvalue, avalue, closure->user_data); + + /* Tell ffi_closure_LINUX64 how to perform return type promotions. */ ++ if ((cif->flags & FLAG_RETURNS_SMST) != 0) ++ { ++ if ((cif->flags & FLAG_RETURNS_FP) == 0) ++ return FFI_V2_TYPE_SMALL_STRUCT + cif->rtype->size - 1; ++ else if ((cif->flags & FLAG_RETURNS_64BITS) != 0) ++ return FFI_V2_TYPE_DOUBLE_HOMOG; ++ else ++ return FFI_V2_TYPE_FLOAT_HOMOG; ++ } + return cif->rtype->type; + } +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ffitarget.h +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ffitarget.h ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ffitarget.h +@@ -1,6 +1,8 @@ + /* -----------------------------------------------------------------*-C-*- +- ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. +- Copyright (C) 2007, 2008 Free Software Foundation, Inc ++ ffitarget.h - Copyright (c) 2012 Anthony Green ++ Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc ++ Copyright (c) 1996-2003 Red Hat, Inc. ++ + Target configuration macros for PowerPC. + + Permission is hereby granted, free of charge, to any person obtaining +@@ -28,6 +30,10 @@ + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + ++#ifndef LIBFFI_H ++#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." ++#endif ++ + /* ---- System specific configurations ----------------------------------- */ + + #if defined (POWERPC) && defined (__powerpc64__) /* linux64 */ +@@ -57,18 +63,14 @@ typedef enum ffi_abi { + FFI_LINUX64, + FFI_LINUX, + FFI_LINUX_SOFT_FLOAT, +-# ifdef POWERPC64 ++# if defined(POWERPC64) + FFI_DEFAULT_ABI = FFI_LINUX64, +-# else +-# if (!defined(__NO_FPRS__) && (__LDBL_MANT_DIG__ == 106)) +- FFI_DEFAULT_ABI = FFI_LINUX, +-# else +-# ifdef __NO_FPRS__ ++# elif defined(__NO_FPRS__) + FFI_DEFAULT_ABI = FFI_LINUX_SOFT_FLOAT, +-# else ++# elif (__LDBL_MANT_DIG__ == 106) ++ FFI_DEFAULT_ABI = FFI_LINUX, ++# else + FFI_DEFAULT_ABI = FFI_GCC_SYSV, +-# endif +-# endif + # endif + #endif + +@@ -101,6 +103,10 @@ typedef enum ffi_abi { + + #define FFI_CLOSURES 1 + #define FFI_NATIVE_RAW_API 0 ++#if defined (POWERPC) || defined (POWERPC_FREEBSD) ++# define FFI_TARGET_SPECIFIC_VARIADIC 1 ++# define FFI_EXTRA_CIF_FIELDS unsigned nfixedargs ++#endif + + /* For additional types like the below, take care about the order in + ppc_closures.S. They must follow after the FFI_TYPE_LAST. */ +@@ -113,10 +119,19 @@ typedef enum ffi_abi { + defined in ffi.c, to determine the exact return type and its size. */ + #define FFI_SYSV_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 2) + +-#if defined(POWERPC64) || defined(POWERPC_AIX) +-#define FFI_TRAMPOLINE_SIZE 24 +-#else /* POWERPC || POWERPC_AIX */ +-#define FFI_TRAMPOLINE_SIZE 40 ++/* Used by ELFv2 for homogenous structure returns. */ ++#define FFI_V2_TYPE_FLOAT_HOMOG (FFI_TYPE_LAST + 1) ++#define FFI_V2_TYPE_DOUBLE_HOMOG (FFI_TYPE_LAST + 2) ++#define FFI_V2_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 3) ++ ++#if _CALL_ELF == 2 ++# define FFI_TRAMPOLINE_SIZE 32 ++#else ++# if defined(POWERPC64) || defined(POWERPC_AIX) ++# define FFI_TRAMPOLINE_SIZE 24 ++# else /* POWERPC || POWERPC_AIX */ ++# define FFI_TRAMPOLINE_SIZE 40 ++# endif + #endif + + #ifndef LIBFFI_ASM +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64.S +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/linux64.S ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64.S +@@ -30,16 +30,33 @@ + #include + + #ifdef __powerpc64__ +- .hidden ffi_call_LINUX64, .ffi_call_LINUX64 +- .globl ffi_call_LINUX64, .ffi_call_LINUX64 ++ .hidden ffi_call_LINUX64 ++ .globl ffi_call_LINUX64 ++# if _CALL_ELF == 2 ++ .text ++ffi_call_LINUX64: ++ addis %r2, %r12, .TOC.-ffi_call_LINUX64@ha ++ addi %r2, %r2, .TOC.-ffi_call_LINUX64@l ++ .localentry ffi_call_LINUX64, . - ffi_call_LINUX64 ++# else + .section ".opd","aw" + .align 3 + ffi_call_LINUX64: ++# ifdef _CALL_LINUX ++ .quad .L.ffi_call_LINUX64,.TOC.@tocbase,0 ++ .type ffi_call_LINUX64,@function ++ .text ++.L.ffi_call_LINUX64: ++# else ++ .hidden .ffi_call_LINUX64 ++ .globl .ffi_call_LINUX64 + .quad .ffi_call_LINUX64,.TOC.@tocbase,0 + .size ffi_call_LINUX64,24 + .type .ffi_call_LINUX64,@function + .text + .ffi_call_LINUX64: ++# endif ++# endif + .LFB1: + mflr %r0 + std %r28, -32(%r1) +@@ -54,22 +71,35 @@ ffi_call_LINUX64: + mr %r31, %r5 /* flags, */ + mr %r30, %r6 /* rvalue, */ + mr %r29, %r7 /* function address. */ ++/* Save toc pointer, not for the ffi_prep_args64 call, but for the later ++ bctrl function call. */ ++# if _CALL_ELF == 2 ++ std %r2, 24(%r1) ++# else + std %r2, 40(%r1) ++# endif + + /* Call ffi_prep_args64. */ + mr %r4, %r1 ++# if defined _CALL_LINUX || _CALL_ELF == 2 ++ bl ffi_prep_args64 ++# else + bl .ffi_prep_args64 ++# endif + +- ld %r0, 0(%r29) ++# if _CALL_ELF == 2 ++ mr %r12, %r29 ++# else ++ ld %r12, 0(%r29) + ld %r2, 8(%r29) + ld %r11, 16(%r29) +- ++# endif + /* Now do the call. */ + /* Set up cr1 with bits 4-7 of the flags. */ + mtcrf 0x40, %r31 + + /* Get the address to call into CTR. */ +- mtctr %r0 ++ mtctr %r12 + /* Load all those argument registers. */ + ld %r3, -32-(8*8)(%r28) + ld %r4, -32-(7*8)(%r28) +@@ -104,12 +134,17 @@ ffi_call_LINUX64: + + /* This must follow the call immediately, the unwinder + uses this to find out if r2 has been saved or not. */ ++# if _CALL_ELF == 2 ++ ld %r2, 24(%r1) ++# else + ld %r2, 40(%r1) ++# endif + + /* Now, deal with the return value. */ + mtcrf 0x01, %r31 +- bt- 30, .Ldone_return_value +- bt- 29, .Lfp_return_value ++ bt 31, .Lstruct_return_value ++ bt 30, .Ldone_return_value ++ bt 29, .Lfp_return_value + std %r3, 0(%r30) + /* Fall through... */ + +@@ -117,7 +152,7 @@ ffi_call_LINUX64: + /* Restore the registers we used and return. */ + mr %r1, %r28 + ld %r0, 16(%r28) +- ld %r28, -32(%r1) ++ ld %r28, -32(%r28) + mtlr %r0 + ld %r29, -24(%r1) + ld %r30, -16(%r1) +@@ -134,10 +169,48 @@ ffi_call_LINUX64: + .Lfloat_return_value: + stfs %f1, 0(%r30) + b .Ldone_return_value ++ ++.Lstruct_return_value: ++ bf 29, .Lsmall_struct ++ bf 28, .Lfloat_homog_return_value ++ stfd %f1, 0(%r30) ++ stfd %f2, 8(%r30) ++ stfd %f3, 16(%r30) ++ stfd %f4, 24(%r30) ++ stfd %f5, 32(%r30) ++ stfd %f6, 40(%r30) ++ stfd %f7, 48(%r30) ++ stfd %f8, 56(%r30) ++ b .Ldone_return_value ++ ++.Lfloat_homog_return_value: ++ stfs %f1, 0(%r30) ++ stfs %f2, 4(%r30) ++ stfs %f3, 8(%r30) ++ stfs %f4, 12(%r30) ++ stfs %f5, 16(%r30) ++ stfs %f6, 20(%r30) ++ stfs %f7, 24(%r30) ++ stfs %f8, 28(%r30) ++ b .Ldone_return_value ++ ++.Lsmall_struct: ++ std %r3, 0(%r30) ++ std %r4, 8(%r30) ++ b .Ldone_return_value ++ + .LFE1: + .long 0 + .byte 0,12,0,1,128,4,0,0 ++# if _CALL_ELF == 2 ++ .size ffi_call_LINUX64,.-ffi_call_LINUX64 ++# else ++# ifdef _CALL_LINUX ++ .size ffi_call_LINUX64,.-.L.ffi_call_LINUX64 ++# else + .size .ffi_call_LINUX64,.-.ffi_call_LINUX64 ++# endif ++# endif + + .section .eh_frame,EH_FRAME_FLAGS,@progbits + .Lframe1: +@@ -180,8 +253,8 @@ ffi_call_LINUX64: + .uleb128 0x4 + .align 3 + .LEFDE1: +-#endif + +-#if defined __ELF__ && defined __linux__ ++# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2 + .section .note.GNU-stack,"",@progbits ++# endif + #endif +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64_closure.S +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/linux64_closure.S ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64_closure.S +@@ -32,66 +32,125 @@ + + #ifdef __powerpc64__ + FFI_HIDDEN (ffi_closure_LINUX64) +- FFI_HIDDEN (.ffi_closure_LINUX64) +- .globl ffi_closure_LINUX64, .ffi_closure_LINUX64 ++ .globl ffi_closure_LINUX64 ++# if _CALL_ELF == 2 ++ .text ++ffi_closure_LINUX64: ++ addis %r2, %r12, .TOC.-ffi_closure_LINUX64@ha ++ addi %r2, %r2, .TOC.-ffi_closure_LINUX64@l ++ .localentry ffi_closure_LINUX64, . - ffi_closure_LINUX64 ++# else + .section ".opd","aw" + .align 3 + ffi_closure_LINUX64: ++# ifdef _CALL_LINUX ++ .quad .L.ffi_closure_LINUX64,.TOC.@tocbase,0 ++ .type ffi_closure_LINUX64,@function ++ .text ++.L.ffi_closure_LINUX64: ++# else ++ FFI_HIDDEN (.ffi_closure_LINUX64) ++ .globl .ffi_closure_LINUX64 + .quad .ffi_closure_LINUX64,.TOC.@tocbase,0 + .size ffi_closure_LINUX64,24 + .type .ffi_closure_LINUX64,@function + .text + .ffi_closure_LINUX64: ++# endif ++# endif ++ ++# if _CALL_ELF == 2 ++# 32 byte special reg save area + 64 byte parm save area ++# + 64 byte retval area + 13*8 fpr save area + round to 16 ++# define STACKFRAME 272 ++# define PARMSAVE 32 ++# define RETVAL PARMSAVE+64 ++# else ++# 48 bytes special reg save area + 64 bytes parm save area ++# + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 ++# define STACKFRAME 240 ++# define PARMSAVE 48 ++# define RETVAL PARMSAVE+64 ++# endif ++ + .LFB1: +- # save general regs into parm save area +- std %r3, 48(%r1) +- std %r4, 56(%r1) +- std %r5, 64(%r1) +- std %r6, 72(%r1) ++# if _CALL_ELF == 2 ++ ld %r12, FFI_TRAMPOLINE_SIZE(%r11) # closure->cif ++ mflr %r0 ++ lwz %r12, 28(%r12) # cif->flags ++ mtcrf 0x40, %r12 ++ addi %r12, %r1, PARMSAVE ++ bt 7, .Lparmsave ++ # Our caller has not allocated a parameter save area. ++ # We need to allocate one here and use it to pass gprs to ++ # ffi_closure_helper_LINUX64. ++ addi %r12, %r1, -STACKFRAME+PARMSAVE ++.Lparmsave: ++ std %r0, 16(%r1) ++ # Save general regs into parm save area ++ std %r3, 0(%r12) ++ std %r4, 8(%r12) ++ std %r5, 16(%r12) ++ std %r6, 24(%r12) ++ std %r7, 32(%r12) ++ std %r8, 40(%r12) ++ std %r9, 48(%r12) ++ std %r10, 56(%r12) ++ ++ # load up the pointer to the parm save area ++ mr %r5, %r12 ++# else + mflr %r0 ++ # Save general regs into parm save area ++ # This is the parameter save area set up by our caller. ++ std %r3, PARMSAVE+0(%r1) ++ std %r4, PARMSAVE+8(%r1) ++ std %r5, PARMSAVE+16(%r1) ++ std %r6, PARMSAVE+24(%r1) ++ std %r7, PARMSAVE+32(%r1) ++ std %r8, PARMSAVE+40(%r1) ++ std %r9, PARMSAVE+48(%r1) ++ std %r10, PARMSAVE+56(%r1) + +- std %r7, 80(%r1) +- std %r8, 88(%r1) +- std %r9, 96(%r1) +- std %r10, 104(%r1) + std %r0, 16(%r1) + +- # mandatory 48 bytes special reg save area + 64 bytes parm save area +- # + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 +- stdu %r1, -240(%r1) +-.LCFI0: ++ # load up the pointer to the parm save area ++ addi %r5, %r1, PARMSAVE ++# endif + + # next save fpr 1 to fpr 13 +- stfd %f1, 128+(0*8)(%r1) +- stfd %f2, 128+(1*8)(%r1) +- stfd %f3, 128+(2*8)(%r1) +- stfd %f4, 128+(3*8)(%r1) +- stfd %f5, 128+(4*8)(%r1) +- stfd %f6, 128+(5*8)(%r1) +- stfd %f7, 128+(6*8)(%r1) +- stfd %f8, 128+(7*8)(%r1) +- stfd %f9, 128+(8*8)(%r1) +- stfd %f10, 128+(9*8)(%r1) +- stfd %f11, 128+(10*8)(%r1) +- stfd %f12, 128+(11*8)(%r1) +- stfd %f13, 128+(12*8)(%r1) ++ stfd %f1, -104+(0*8)(%r1) ++ stfd %f2, -104+(1*8)(%r1) ++ stfd %f3, -104+(2*8)(%r1) ++ stfd %f4, -104+(3*8)(%r1) ++ stfd %f5, -104+(4*8)(%r1) ++ stfd %f6, -104+(5*8)(%r1) ++ stfd %f7, -104+(6*8)(%r1) ++ stfd %f8, -104+(7*8)(%r1) ++ stfd %f9, -104+(8*8)(%r1) ++ stfd %f10, -104+(9*8)(%r1) ++ stfd %f11, -104+(10*8)(%r1) ++ stfd %f12, -104+(11*8)(%r1) ++ stfd %f13, -104+(12*8)(%r1) + +- # set up registers for the routine that actually does the work +- # get the context pointer from the trampoline +- mr %r3, %r11 ++ # load up the pointer to the saved fpr registers */ ++ addi %r6, %r1, -104 + +- # now load up the pointer to the result storage +- addi %r4, %r1, 112 ++ # load up the pointer to the result storage ++ addi %r4, %r1, -STACKFRAME+RETVAL + +- # now load up the pointer to the parameter save area +- # in the previous frame +- addi %r5, %r1, 240 + 48 ++ stdu %r1, -STACKFRAME(%r1) ++.LCFI0: + +- # now load up the pointer to the saved fpr registers */ +- addi %r6, %r1, 128 ++ # get the context pointer from the trampoline ++ mr %r3, %r11 + + # make the call ++# if defined _CALL_LINUX || _CALL_ELF == 2 ++ bl ffi_closure_helper_LINUX64 ++# else + bl .ffi_closure_helper_LINUX64 ++# endif + .Lret: + + # now r3 contains the return type +@@ -100,10 +159,12 @@ ffi_closure_LINUX64: + + # look up the proper starting point in table + # by using return type as offset ++ ld %r0, STACKFRAME+16(%r1) ++ cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT ++ bge .Lsmall + mflr %r4 # move address of .Lret to r4 + sldi %r3, %r3, 4 # now multiply return type by 16 + addi %r4, %r4, .Lret_type0 - .Lret +- ld %r0, 240+16(%r1) + add %r3, %r3, %r4 # add contents of table to table address + mtctr %r3 + bctr # jump to it +@@ -116,85 +177,175 @@ ffi_closure_LINUX64: + .Lret_type0: + # case FFI_TYPE_VOID + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + nop + # case FFI_TYPE_INT +- lwa %r3, 112+4(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lwa %r3, RETVAL+0(%r1) ++# else ++ lwa %r3, RETVAL+4(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_FLOAT +- lfs %f1, 112+0(%r1) ++ lfs %f1, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_DOUBLE +- lfd %f1, 112+0(%r1) ++ lfd %f1, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_LONGDOUBLE +- lfd %f1, 112+0(%r1) ++ lfd %f1, RETVAL+0(%r1) + mtlr %r0 +- lfd %f2, 112+8(%r1) ++ lfd %f2, RETVAL+8(%r1) + b .Lfinish + # case FFI_TYPE_UINT8 +- lbz %r3, 112+7(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lbz %r3, RETVAL+0(%r1) ++# else ++ lbz %r3, RETVAL+7(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_SINT8 +- lbz %r3, 112+7(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lbz %r3, RETVAL+0(%r1) ++# else ++ lbz %r3, RETVAL+7(%r1) ++# endif + extsb %r3,%r3 + mtlr %r0 + b .Lfinish + # case FFI_TYPE_UINT16 +- lhz %r3, 112+6(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lhz %r3, RETVAL+0(%r1) ++# else ++ lhz %r3, RETVAL+6(%r1) ++# endif + mtlr %r0 + .Lfinish: +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_SINT16 +- lha %r3, 112+6(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lha %r3, RETVAL+0(%r1) ++# else ++ lha %r3, RETVAL+6(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_UINT32 +- lwz %r3, 112+4(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lwz %r3, RETVAL+0(%r1) ++# else ++ lwz %r3, RETVAL+4(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_SINT32 +- lwa %r3, 112+4(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lwa %r3, RETVAL+0(%r1) ++# else ++ lwa %r3, RETVAL+4(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_UINT64 +- ld %r3, 112+0(%r1) ++ ld %r3, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_SINT64 +- ld %r3, 112+0(%r1) ++ ld %r3, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_STRUCT + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + nop + # case FFI_TYPE_POINTER +- ld %r3, 112+0(%r1) ++ ld %r3, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME ++ blr ++# case FFI_V2_TYPE_FLOAT_HOMOG ++ lfs %f1, RETVAL+0(%r1) ++ lfs %f2, RETVAL+4(%r1) ++ lfs %f3, RETVAL+8(%r1) ++ b .Lmorefloat ++# case FFI_V2_TYPE_DOUBLE_HOMOG ++ lfd %f1, RETVAL+0(%r1) ++ lfd %f2, RETVAL+8(%r1) ++ lfd %f3, RETVAL+16(%r1) ++ lfd %f4, RETVAL+24(%r1) ++ mtlr %r0 ++ lfd %f5, RETVAL+32(%r1) ++ lfd %f6, RETVAL+40(%r1) ++ lfd %f7, RETVAL+48(%r1) ++ lfd %f8, RETVAL+56(%r1) ++ addi %r1, %r1, STACKFRAME ++ blr ++.Lmorefloat: ++ lfs %f4, RETVAL+12(%r1) ++ mtlr %r0 ++ lfs %f5, RETVAL+16(%r1) ++ lfs %f6, RETVAL+20(%r1) ++ lfs %f7, RETVAL+24(%r1) ++ lfs %f8, RETVAL+28(%r1) ++ addi %r1, %r1, STACKFRAME ++ blr ++.Lsmall: ++# ifdef __LITTLE_ENDIAN__ ++ ld %r3,RETVAL+0(%r1) ++ mtlr %r0 ++ ld %r4,RETVAL+8(%r1) ++ addi %r1, %r1, STACKFRAME ++ blr ++# else ++ # A struct smaller than a dword is returned in the low bits of r3 ++ # ie. right justified. Larger structs are passed left justified ++ # in r3 and r4. The return value area on the stack will have ++ # the structs as they are usually stored in memory. ++ cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT + 7 # size 8 bytes? ++ neg %r5, %r3 ++ ld %r3,RETVAL+0(%r1) ++ blt .Lsmalldown ++ mtlr %r0 ++ ld %r4,RETVAL+8(%r1) ++ addi %r1, %r1, STACKFRAME ++ blr ++.Lsmalldown: ++ addi %r5, %r5, FFI_V2_TYPE_SMALL_STRUCT + 7 ++ mtlr %r0 ++ sldi %r5, %r5, 3 ++ addi %r1, %r1, STACKFRAME ++ srd %r3, %r3, %r5 + blr +-# esac ++# endif ++ + .LFE1: + .long 0 + .byte 0,12,0,1,128,0,0,0 ++# if _CALL_ELF == 2 ++ .size ffi_closure_LINUX64,.-ffi_closure_LINUX64 ++# else ++# ifdef _CALL_LINUX ++ .size ffi_closure_LINUX64,.-.L.ffi_closure_LINUX64 ++# else + .size .ffi_closure_LINUX64,.-.ffi_closure_LINUX64 ++# endif ++# endif + + .section .eh_frame,EH_FRAME_FLAGS,@progbits + .Lframe1: +@@ -223,14 +374,14 @@ ffi_closure_LINUX64: + .byte 0x2 # DW_CFA_advance_loc1 + .byte .LCFI0-.LFB1 + .byte 0xe # DW_CFA_def_cfa_offset +- .uleb128 240 ++ .uleb128 STACKFRAME + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x41 + .sleb128 -2 + .align 3 + .LEFDE1: +-#endif + +-#if defined __ELF__ && defined __linux__ ++# if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits ++# endif + #endif +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ppc_closure.S +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ppc_closure.S ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ppc_closure.S +@@ -122,43 +122,78 @@ ENTRY(ffi_closure_SYSV) + blr + + # case FFI_TYPE_FLOAT ++#ifndef __NO_FPRS__ + lfs %f1,112+0(%r1) + mtlr %r0 + addi %r1,%r1,144 ++#else ++ nop ++ nop ++ nop ++#endif + blr + + # case FFI_TYPE_DOUBLE ++#ifndef __NO_FPRS__ + lfd %f1,112+0(%r1) + mtlr %r0 + addi %r1,%r1,144 ++#else ++ nop ++ nop ++ nop ++#endif + blr + + # case FFI_TYPE_LONGDOUBLE ++#ifndef __NO_FPRS__ + lfd %f1,112+0(%r1) + lfd %f2,112+8(%r1) + mtlr %r0 + b .Lfinish ++#else ++ nop ++ nop ++ nop ++ blr ++#endif + + # case FFI_TYPE_UINT8 ++#ifdef __LITTLE_ENDIAN__ ++ lbz %r3,112+0(%r1) ++#else + lbz %r3,112+3(%r1) ++#endif + mtlr %r0 + addi %r1,%r1,144 + blr + + # case FFI_TYPE_SINT8 ++#ifdef __LITTLE_ENDIAN__ ++ lbz %r3,112+0(%r1) ++#else + lbz %r3,112+3(%r1) ++#endif + extsb %r3,%r3 + mtlr %r0 + b .Lfinish + + # case FFI_TYPE_UINT16 ++#ifdef __LITTLE_ENDIAN__ ++ lhz %r3,112+0(%r1) ++#else + lhz %r3,112+2(%r1) ++#endif + mtlr %r0 + addi %r1,%r1,144 + blr + + # case FFI_TYPE_SINT16 ++#ifdef __LITTLE_ENDIAN__ ++ lha %r3,112+0(%r1) ++#else + lha %r3,112+2(%r1) ++#endif + mtlr %r0 + addi %r1,%r1,144 + blr +@@ -203,7 +238,7 @@ ENTRY(ffi_closure_SYSV) + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) + lwz %r5,112+8(%r1) +- bl .Luint128 ++ b .Luint128 + + # The return types below are only used when the ABI type is FFI_SYSV. + # case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct. +@@ -220,9 +255,15 @@ ENTRY(ffi_closure_SYSV) + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct. + lwz %r3,112+0(%r1) ++#ifdef __LITTLE_ENDIAN__ ++ mtlr %r0 ++ addi %r1,%r1,144 ++ blr ++#else + srwi %r3,%r3,8 + mtlr %r0 + b .Lfinish ++#endif + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct. + lwz %r3,112+0(%r1) +@@ -233,20 +274,35 @@ ENTRY(ffi_closure_SYSV) + # case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct. + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) ++#ifdef __LITTLE_ENDIAN__ ++ mtlr %r0 ++ b .Lfinish ++#else + li %r5,24 + b .Lstruct567 ++#endif + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct. + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) ++#ifdef __LITTLE_ENDIAN__ ++ mtlr %r0 ++ b .Lfinish ++#else + li %r5,16 + b .Lstruct567 ++#endif + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct. + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) ++#ifdef __LITTLE_ENDIAN__ ++ mtlr %r0 ++ b .Lfinish ++#else + li %r5,8 + b .Lstruct567 ++#endif + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct. + lwz %r3,112+0(%r1) +@@ -254,6 +310,7 @@ ENTRY(ffi_closure_SYSV) + mtlr %r0 + b .Lfinish + ++#ifndef __LITTLE_ENDIAN__ + .Lstruct567: + subfic %r6,%r5,32 + srw %r4,%r4,%r5 +@@ -263,6 +320,7 @@ ENTRY(ffi_closure_SYSV) + mtlr %r0 + addi %r1,%r1,144 + blr ++#endif + + .Luint128: + lwz %r6,112+12(%r1) +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/sysv.S +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/sysv.S ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/sysv.S +@@ -83,6 +83,7 @@ ENTRY(ffi_call_SYSV) + nop + 1: + ++#ifndef __NO_FPRS__ + /* Load all the FP registers. */ + bf- 6,2f + lfd %f1,-16-(8*4)-(8*8)(%r28) +@@ -94,6 +95,7 @@ ENTRY(ffi_call_SYSV) + lfd %f6,-16-(8*4)-(3*8)(%r28) + lfd %f7,-16-(8*4)-(2*8)(%r28) + lfd %f8,-16-(8*4)-(1*8)(%r28) ++#endif + 2: + + /* Make the call. */ +@@ -103,7 +105,9 @@ ENTRY(ffi_call_SYSV) + mtcrf 0x01,%r31 /* cr7 */ + bt- 31,L(small_struct_return_value) + bt- 30,L(done_return_value) ++#ifndef __NO_FPRS__ + bt- 29,L(fp_return_value) ++#endif + stw %r3,0(%r30) + bf+ 28,L(done_return_value) + stw %r4,4(%r30) +@@ -124,6 +128,7 @@ L(done_return_value): + lwz %r1,0(%r1) + blr + ++#ifndef __NO_FPRS__ + L(fp_return_value): + bf 28,L(float_return_value) + stfd %f1,0(%r30) +@@ -134,21 +139,17 @@ L(fp_return_value): + L(float_return_value): + stfs %f1,0(%r30) + b L(done_return_value) ++#endif + + L(small_struct_return_value): +- extrwi %r6,%r31,2,19 /* number of bytes padding = shift/8 */ +- mtcrf 0x02,%r31 /* copy flags to cr[24:27] (cr6) */ +- extrwi %r5,%r31,5,19 /* r5 <- number of bits of padding */ +- subfic %r6,%r6,4 /* r6 <- number of useful bytes in r3 */ +- bf- 25,L(done_return_value) /* struct in r3 ? if not, done. */ +-/* smst_one_register: */ +- slw %r3,%r3,%r5 /* Left-justify value in r3 */ +- mtxer %r6 /* move byte count to XER ... */ +- stswx %r3,0,%r30 /* ... and store that many bytes */ +- bf+ 26,L(done_return_value) /* struct in r3:r4 ? */ +- add %r6,%r6,%r30 /* adjust pointer */ +- stswi %r4,%r6,4 /* store last four bytes */ +- b L(done_return_value) ++ /* ++ * The C code always allocates a properly-aligned 8-byte bounce ++ * buffer to make this assembly code very simple. Just write out ++ * r3 and r4 to the buffer to allow the C code to handle the rest. ++ */ ++ stw %r3, 0(%r30) ++ stw %r4, 4(%r30) ++ b L(done_return_value) + + .LFE1: + END(ffi_call_SYSV) +Index: mozilla-release/mfbt/Endian.h +=================================================================== +--- mozilla-release.orig/mfbt/Endian.h ++++ mozilla-release/mfbt/Endian.h +@@ -91,7 +91,7 @@ + # else + # error "CPU type is unknown" + # endif +-#elif defined(__APPLE__) ++#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__) + # if __LITTLE_ENDIAN__ + # define MOZ_LITTLE_ENDIAN 1 + # elif __BIG_ENDIAN__ +@@ -119,8 +119,7 @@ + * cases. + */ + #elif defined(__sparc) || defined(__sparc__) || \ +- defined(_POWER) || defined(__powerpc__) || \ +- defined(__ppc__) || defined(__hppa) || \ ++ defined(_POWER) || defined(__hppa) || \ + defined(_MIPSEB) || defined(__ARMEB__) || \ + defined(__s390__) || defined(__AARCH64EB__) || \ + (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \ +Index: mozilla-release/media/webrtc/trunk/webrtc/typedefs.h +=================================================================== +--- mozilla-release.orig/media/webrtc/trunk/webrtc/typedefs.h ++++ mozilla-release/media/webrtc/trunk/webrtc/typedefs.h +@@ -52,13 +52,23 @@ + #elif defined(__powerpc64__) + #define WEBRTC_ARCH_PPC64 1 + #define WEBRTC_ARCH_64_BITS 1 ++#ifdef __LITTLE_ENDIAN__ ++#define WEBRTC_ARCH_LITTLE_ENDIAN ++#define WEBRTC_LITTLE_ENDIAN ++#else + #define WEBRTC_ARCH_BIG_ENDIAN + #define WEBRTC_BIG_ENDIAN ++#endif + #elif defined(__ppc__) || defined(__powerpc__) + #define WEBRTC_ARCH_PPC 1 + #define WEBRTC_ARCH_32_BITS 1 ++#ifdef __LITTLE_ENDIAN__ ++#define WEBRTC_ARCH_LITTLE_ENDIAN ++#define WEBRTC_LITTLE_ENDIAN ++#else + #define WEBRTC_ARCH_BIG_ENDIAN + #define WEBRTC_BIG_ENDIAN ++#endif + #elif defined(__sparc64__) + #define WEBRTC_ARCH_SPARC 1 + #define WEBRTC_ARCH_64_BITS 1 +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/moz.build +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/moz.build ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/moz.build +@@ -206,12 +206,12 @@ if CONFIG['OS_TEST'] == 'powerpc': + 'xptcstubs_ppc_linux.cpp', + ] + +-if CONFIG['OS_TEST'] == 'powerpc64': ++if CONFIG['OS_TEST'] in ('powerpc64', 'powerpc64le'): + if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'): + SOURCES += [ +- 'xptcinvoke_asm_ppc64_linux.s', ++ 'xptcinvoke_asm_ppc64_linux.S', + 'xptcinvoke_ppc64_linux.cpp', +- 'xptcstubs_asm_ppc64_linux.s', ++ 'xptcstubs_asm_ppc64_linux.S', + 'xptcstubs_ppc64_linux.cpp', + ] + +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s ++++ /dev/null +@@ -1,132 +0,0 @@ +-# 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/. +- +-.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4 +-.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 +-.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 +-.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 +-.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 +-.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 +-.set r30,30; .set r31,31 +-.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 +-.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 +-.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 +-.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 +-.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 +-.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 +-.set f30,30; .set f31,31 +- +- +-# +-# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, +-# uint32_t paramCount, nsXPTCVariant* params) +-# +- +- .section ".toc","aw" +- .section ".text" +- .align 2 +- .globl NS_InvokeByIndex +- .section ".opd","aw" +- .align 3 +-NS_InvokeByIndex: +- .quad .NS_InvokeByIndex,.TOC.@tocbase +- .previous +- .type NS_InvokeByIndex,@function +-.NS_InvokeByIndex: +- mflr 0 +- std 0,16(r1) +- +- std r29,-24(r1) +- std r30,-16(r1) +- std r31,-8(r1) +- +- mr r29,r3 # Save 'that' in r29 +- mr r30,r4 # Save 'methodIndex' in r30 +- mr r31,r1 # Save old frame +- +- # Allocate stack frame with space for params. Since at least the +- # first 7 parameters (not including 'that') will be in registers, +- # we don't actually need stack space for those. We must ensure +- # that the stack remains 16-byte aligned. +- # +- # | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV | +- # | |(params)........| regs | regs | regs | +- # (r1)...........(+112)....(+128) +- # (-23*8).(-16*8).(-3*8)..(r31) +- +- # +stack frame, -unused stack params, +regs storage, +1 for alignment +- addi r7,r5,((112/8)-7+7+13+3+1) +- rldicr r7,r7,3,59 # multiply by 8 and mask with ~15 +- neg r7,r7 +- stdux r1,r1,r7 +- +- +- # Call invoke_copy_to_stack(uint64_t* gpregs, double* fpregs, +- # uint32_t paramCount, nsXPTCVariant* s, +- # uint64_t* d)) +- +- # r5, r6 are passed through intact (paramCount, params) +- # r7 (d) has to be r1+112 -- where parameters are passed on the stack. +- # r3, r4 are above that, easier to address from r31 than from r1 +- +- subi r3,r31,(23*8) # r3 --> GPRS +- subi r4,r31,(16*8) # r4 --> FPRS +- addi r7,r1,112 # r7 --> params +- bl invoke_copy_to_stack +- nop +- +- # Set up to invoke function +- +- ld r9,0(r29) # vtable (r29 is 'that') +- mr r3,r29 # self is first arg, obviously +- +- sldi r30,r30,3 # Find function descriptor +- add r9,r9,r30 +- ld r9,0(r9) +- +- ld r0,0(r9) # Actual address from fd. +- std r2,40(r1) # Save r2 (TOC pointer) +- +- mtctr 0 +- ld r11,16(r9) # Environment pointer from fd. +- ld r2,8(r9) # TOC pointer from fd. +- +- # Load FP and GP registers as required +- ld r4, -(23*8)(r31) +- ld r5, -(22*8)(r31) +- ld r6, -(21*8)(r31) +- ld r7, -(20*8)(r31) +- ld r8, -(19*8)(r31) +- ld r9, -(18*8)(r31) +- ld r10, -(17*8)(r31) +- +- lfd f1, -(16*8)(r31) +- lfd f2, -(15*8)(r31) +- lfd f3, -(14*8)(r31) +- lfd f4, -(13*8)(r31) +- lfd f5, -(12*8)(r31) +- lfd f6, -(11*8)(r31) +- lfd f7, -(10*8)(r31) +- lfd f8, -(9*8)(r31) +- lfd f9, -(8*8)(r31) +- lfd f10, -(7*8)(r31) +- lfd f11, -(6*8)(r31) +- lfd f12, -(5*8)(r31) +- lfd f13, -(4*8)(r31) +- +- bctrl # Do it +- +- ld r2,40(r1) # Load our own TOC pointer +- ld r1,0(r1) # Revert stack frame +- ld 0,16(r1) # Reload lr +- ld 29,-24(r1) # Restore NVGPRS +- ld 30,-16(r1) +- ld 31,-8(r1) +- mtlr 0 +- blr +- +- .size NS_InvokeByIndex,.-.NS_InvokeByIndex +- +- # Magic indicating no need for an executable stack +- .section .note.GNU-stack, "", @progbits ; .previous +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.S +=================================================================== +--- /dev/null ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.S +@@ -0,0 +1,167 @@ ++# 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/. ++ ++.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4 ++.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 ++.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 ++.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 ++.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 ++.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 ++.set r30,30; .set r31,31 ++.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 ++.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 ++.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 ++.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 ++.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 ++.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 ++.set f30,30; .set f31,31 ++ ++# The ABI defines a fixed stack frame area of 4 doublewords (ELFv2) ++# or 6 doublewords (ELFv1); the last of these doublewords is used ++# as TOC pointer save area. The fixed area is followed by a parameter ++# save area of 8 doublewords (used for vararg routines), followed ++# by space for parameters passed on the stack. ++# ++# We set STACK_TOC to the offset of the TOC pointer save area, and ++# STACK_PARAMS to the offset of the first on-stack parameter. ++ ++#if _CALL_ELF == 2 ++#define STACK_TOC 24 ++#define STACK_PARAMS 96 ++#else ++#define STACK_TOC 40 ++#define STACK_PARAMS 112 ++#endif ++ ++# ++# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, ++# uint32_t paramCount, nsXPTCVariant* params) ++# ++ ++#if _CALL_ELF == 2 ++ .section ".text" ++ .type NS_InvokeByIndex,@function ++ .globl NS_InvokeByIndex ++ .align 2 ++NS_InvokeByIndex: ++0: addis 2,12,(.TOC.-0b)@ha ++ addi 2,2,(.TOC.-0b)@l ++ .localentry NS_InvokeByIndex,.-NS_InvokeByIndex ++#else ++ .section ".toc","aw" ++ .section ".text" ++ .align 2 ++ .globl NS_InvokeByIndex ++ .section ".opd","aw" ++ .align 3 ++NS_InvokeByIndex: ++ .quad .NS_InvokeByIndex,.TOC.@tocbase ++ .previous ++ .type NS_InvokeByIndex,@function ++.NS_InvokeByIndex: ++#endif ++ mflr 0 ++ std 0,16(r1) ++ ++ std r29,-24(r1) ++ std r30,-16(r1) ++ std r31,-8(r1) ++ ++ mr r29,r3 # Save 'that' in r29 ++ mr r30,r4 # Save 'methodIndex' in r30 ++ mr r31,r1 # Save old frame ++ ++ # Allocate stack frame with space for params. Since at least the ++ # first 7 parameters (not including 'that') will be in registers, ++ # we don't actually need stack space for those. We must ensure ++ # that the stack remains 16-byte aligned. ++ # ++ # | (fixed area + | | 7 GP | 13 FP | 3 NV | ++ # | param. save) |(params)........| regs | regs | regs | ++ # (r1)......(+STACK_PARAMS)... (-23*8).(-16*8).(-3*8)..(r31) ++ ++ # +stack frame, -unused stack params, +regs storage, +1 for alignment ++ addi r7,r5,((STACK_PARAMS/8)-7+7+13+3+1) ++ rldicr r7,r7,3,59 # multiply by 8 and mask with ~15 ++ neg r7,r7 ++ stdux r1,r1,r7 ++ ++ ++ # Call invoke_copy_to_stack(uint64_t* gpregs, double* fpregs, ++ # uint32_t paramCount, nsXPTCVariant* s, ++ # uint64_t* d)) ++ ++ # r5, r6 are passed through intact (paramCount, params) ++ # r7 (d) has to be r1+STACK_PARAMS ++ # -- where parameters are passed on the stack. ++ # r3, r4 are above that, easier to address from r31 than from r1 ++ ++ subi r3,r31,(23*8) # r3 --> GPRS ++ subi r4,r31,(16*8) # r4 --> FPRS ++ addi r7,r1,STACK_PARAMS # r7 --> params ++ bl invoke_copy_to_stack ++ nop ++ ++ # Set up to invoke function ++ ++ ld r9,0(r29) # vtable (r29 is 'that') ++ mr r3,r29 # self is first arg, obviously ++ ++ sldi r30,r30,3 # Find function descriptor ++ add r9,r9,r30 ++ ld r12,0(r9) ++ ++ std r2,STACK_TOC(r1) # Save r2 (TOC pointer) ++ ++#if _CALL_ELF == 2 ++ mtctr r12 ++#else ++ ld r0,0(r12) # Actual address from fd. ++ mtctr 0 ++ ld r11,16(r12) # Environment pointer from fd. ++ ld r2,8(r12) # TOC pointer from fd. ++#endif ++ ++ # Load FP and GP registers as required ++ ld r4, -(23*8)(r31) ++ ld r5, -(22*8)(r31) ++ ld r6, -(21*8)(r31) ++ ld r7, -(20*8)(r31) ++ ld r8, -(19*8)(r31) ++ ld r9, -(18*8)(r31) ++ ld r10, -(17*8)(r31) ++ ++ lfd f1, -(16*8)(r31) ++ lfd f2, -(15*8)(r31) ++ lfd f3, -(14*8)(r31) ++ lfd f4, -(13*8)(r31) ++ lfd f5, -(12*8)(r31) ++ lfd f6, -(11*8)(r31) ++ lfd f7, -(10*8)(r31) ++ lfd f8, -(9*8)(r31) ++ lfd f9, -(8*8)(r31) ++ lfd f10, -(7*8)(r31) ++ lfd f11, -(6*8)(r31) ++ lfd f12, -(5*8)(r31) ++ lfd f13, -(4*8)(r31) ++ ++ bctrl # Do it ++ ++ ld r2,STACK_TOC(r1) # Load our own TOC pointer ++ ld r1,0(r1) # Revert stack frame ++ ld 0,16(r1) # Reload lr ++ ld 29,-24(r1) # Restore NVGPRS ++ ld 30,-16(r1) ++ ld 31,-8(r1) ++ mtlr 0 ++ blr ++ ++#if _CALL_ELF == 2 ++ .size NS_InvokeByIndex,.-NS_InvokeByIndex ++#else ++ .size NS_InvokeByIndex,.-.NS_InvokeByIndex ++#endif ++ ++ # Magic indicating no need for an executable stack ++ .section .note.GNU-stack, "", @progbits ; .previous +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp +@@ -74,7 +74,9 @@ invoke_copy_to_stack(uint64_t* gpregs, + fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles + } else { + float *p = (float *)d; ++#ifndef __LITTLE_ENDIAN__ + p++; ++#endif + *p = s->val.f; + } + } +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s ++++ /dev/null +@@ -1,81 +0,0 @@ +-# 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/. +- +-.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4 +-.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 +-.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 +-.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 +-.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 +-.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 +-.set r30,30; .set r31,31 +-.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 +-.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 +-.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 +-.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 +-.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 +-.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 +-.set f30,30; .set f31,31 +- +- .section ".text" +- .align 2 +- .globl SharedStub +- .section ".opd","aw" +- .align 3 +- +-SharedStub: +- .quad .SharedStub,.TOC.@tocbase +- .previous +- .type SharedStub,@function +- +-.SharedStub: +- mflr r0 +- +- std r4, -56(r1) # Save all GPRS +- std r5, -48(r1) +- std r6, -40(r1) +- std r7, -32(r1) +- std r8, -24(r1) +- std r9, -16(r1) +- std r10, -8(r1) +- +- stfd f13, -64(r1) # ... and FPRS +- stfd f12, -72(r1) +- stfd f11, -80(r1) +- stfd f10, -88(r1) +- stfd f9, -96(r1) +- stfd f8, -104(r1) +- stfd f7, -112(r1) +- stfd f6, -120(r1) +- stfd f5, -128(r1) +- stfd f4, -136(r1) +- stfd f3, -144(r1) +- stfd f2, -152(r1) +- stfd f1, -160(r1) +- +- subi r6,r1,56 # r6 --> gprData +- subi r7,r1,160 # r7 --> fprData +- addi r5,r1,112 # r5 --> extra stack args +- +- std r0, 16(r1) +- +- stdu r1,-288(r1) +- # r3 has the 'self' pointer +- # already +- +- mr r4,r11 # r4 is methodIndex selector, +- # passed via r11 in the +- # nsNSStubBase::StubXX() call +- +- bl PrepareAndDispatch +- nop +- +- ld 1,0(r1) # restore stack +- ld r0,16(r1) # restore LR +- mtlr r0 +- blr +- +- .size SharedStub,.-.SharedStub +- +- # Magic indicating no need for an executable stack +- .section .note.GNU-stack, "", @progbits ; .previous +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.S +=================================================================== +--- /dev/null ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.S +@@ -0,0 +1,107 @@ ++# 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/. ++ ++.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4 ++.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 ++.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 ++.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 ++.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 ++.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 ++.set r30,30; .set r31,31 ++.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 ++.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 ++.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 ++.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 ++.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 ++.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 ++.set f30,30; .set f31,31 ++ ++#if _CALL_ELF == 2 ++#define STACK_PARAMS 96 ++#else ++#define STACK_PARAMS 112 ++#endif ++ ++#if _CALL_ELF == 2 ++ .section ".text" ++ .type SharedStub,@function ++ .globl SharedStub ++ # Make the symbol hidden so that the branch from the stub does ++ # not go via a PLT. This is not only better for performance, ++ # but may be necessary to avoid linker errors since there is ++ # no place to restore the TOC register in a sibling call. ++ .hidden SharedStub ++ .align 2 ++SharedStub: ++0: addis 2,12,(.TOC.-0b)@ha ++ addi 2,2,(.TOC.-0b)@l ++ .localentry SharedStub,.-SharedStub ++#else ++ .section ".text" ++ .align 2 ++ .globl SharedStub ++ .section ".opd","aw" ++ .align 3 ++ ++SharedStub: ++ .quad .SharedStub,.TOC.@tocbase ++ .previous ++ .type SharedStub,@function ++ ++.SharedStub: ++#endif ++ mflr r0 ++ ++ std r4, -56(r1) # Save all GPRS ++ std r5, -48(r1) ++ std r6, -40(r1) ++ std r7, -32(r1) ++ std r8, -24(r1) ++ std r9, -16(r1) ++ std r10, -8(r1) ++ ++ stfd f13, -64(r1) # ... and FPRS ++ stfd f12, -72(r1) ++ stfd f11, -80(r1) ++ stfd f10, -88(r1) ++ stfd f9, -96(r1) ++ stfd f8, -104(r1) ++ stfd f7, -112(r1) ++ stfd f6, -120(r1) ++ stfd f5, -128(r1) ++ stfd f4, -136(r1) ++ stfd f3, -144(r1) ++ stfd f2, -152(r1) ++ stfd f1, -160(r1) ++ ++ subi r6,r1,56 # r6 --> gprData ++ subi r7,r1,160 # r7 --> fprData ++ addi r5,r1,STACK_PARAMS # r5 --> extra stack args ++ ++ std r0, 16(r1) ++ ++ stdu r1,-288(r1) ++ # r3 has the 'self' pointer ++ # already ++ ++ mr r4,r11 # r4 is methodIndex selector, ++ # passed via r11 in the ++ # nsNSStubBase::StubXX() call ++ ++ bl PrepareAndDispatch ++ nop ++ ++ ld 1,0(r1) # restore stack ++ ld r0,16(r1) # restore LR ++ mtlr r0 ++ blr ++ ++#if _CALL_ELF == 2 ++ .size SharedStub,.-SharedStub ++#else ++ .size SharedStub,.-.SharedStub ++#endif ++ ++ # Magic indicating no need for an executable stack ++ .section .note.GNU-stack, "", @progbits ; .previous +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp +@@ -83,7 +83,9 @@ PrepareAndDispatch(nsXPTCStubBase* self, + dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles + else { + float *p = (float *)ap; ++#ifndef __LITTLE_ENDIAN__ + p++; ++#endif + dp->val.f = *p; + } + } else { /* integer type or pointer */ +@@ -153,6 +155,43 @@ PrepareAndDispatch(nsXPTCStubBase* self, + // etc. + // Use assembler directives to get the names right... + ++#if _CALL_ELF == 2 ++# define STUB_ENTRY(n) \ ++__asm__ ( \ ++ ".section \".text\" \n\t" \ ++ ".align 2 \n\t" \ ++ ".if "#n" < 10 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ ++ "0: addis 2,12,.TOC.-0b@ha \n\t" \ ++ "addi 2,2,.TOC.-0b@l \n\t" \ ++ ".localentry _ZN14nsXPTCStubBase5Stub"#n"Ev,.-_ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ \ ++ ".elseif "#n" < 100 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ ++ "0: addis 2,12,.TOC.-0b@ha \n\t" \ ++ "addi 2,2,.TOC.-0b@l \n\t" \ ++ ".localentry _ZN14nsXPTCStubBase6Stub"#n"Ev,.-_ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ \ ++ ".elseif "#n" < 1000 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ ++ "0: addis 2,12,.TOC.-0b@ha \n\t" \ ++ "addi 2,2,.TOC.-0b@l \n\t" \ ++ ".localentry _ZN14nsXPTCStubBase7Stub"#n"Ev,.-_ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ \ ++ ".else \n\t" \ ++ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ ++ ".endif \n\t" \ ++ \ ++ "li 11,"#n" \n\t" \ ++ "b SharedStub \n" \ ++); ++#else + # define STUB_ENTRY(n) \ + __asm__ ( \ + ".section \".toc\",\"aw\" \n\t" \ +@@ -195,6 +234,7 @@ __asm__ ( + "li 11,"#n" \n\t" \ + "b SharedStub \n" \ + ); ++#endif + + #define SENTINEL_ENTRY(n) \ + nsresult nsXPTCStubBase::Sentinel##n() \ diff --git a/xulrunner.spec b/xulrunner.spec index ef730b5..9721234 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 29.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -101,6 +101,7 @@ Patch200: mozilla-193-pkgconfig.patch Patch204: rhbz-966424.patch # Upstream patches +Patch300: mozilla-ppc64le.patch # --------------------------------------------------- @@ -236,6 +237,12 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 +# Upstream patches +%ifarch ppc64le +%if 0%{?fedora} > 20 +%patch300 -p1 -b .ppc64le +%endif +%endif %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -351,7 +358,7 @@ export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -516,6 +523,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 28 2014 Martin Stransky - 29.0-2 +- An updated ppc64le patch (rhbz#1091054) + * Mon Apr 28 2014 Martin Stransky - 29.0-1 - Update to 29.0 From be48b2ad622479ef421230eddd9c3abff0131ff9 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 15 May 2014 13:31:06 +0100 Subject: [PATCH 408/486] Add upstream patches for aarch64 support --- firefox-aarch64-double-convertsion.patch | 80 ++++ firefox-aarch64-libevent.patch | 115 +++++ firefox-aarch64-xpcom.patch | 517 +++++++++++++++++++++++ xulrunner.spec | 18 +- 4 files changed, 727 insertions(+), 3 deletions(-) create mode 100644 firefox-aarch64-double-convertsion.patch create mode 100644 firefox-aarch64-libevent.patch create mode 100644 firefox-aarch64-xpcom.patch diff --git a/firefox-aarch64-double-convertsion.patch b/firefox-aarch64-double-convertsion.patch new file mode 100644 index 0000000..06320be --- /dev/null +++ b/firefox-aarch64-double-convertsion.patch @@ -0,0 +1,80 @@ + +# HG changeset patch +# User Marcin Juszkiewicz +# Date 1393440196 18000 +# Node ID 6a46f53ad944b44385398822d7bcf7621a785d91 +# Parent 0aa56e2a5f816a30da48701f73d03060ee9692b2 +Bug 962488 - Update double-conversion for proper AArch64 support. r=froydnj + +Fix imported from upstream repository: +https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561 + +diff --git a/mfbt/double-conversion/fix-aarch64-macro.patch b/mfbt/double-conversion/fix-aarch64-macro.patch +new file mode 100644 +--- /dev/null ++++ b/mfbt/double-conversion/fix-aarch64-macro.patch +@@ -0,0 +1,23 @@ ++Backport from upstream. ++ ++https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561 ++ ++--- ++ mfbt/double-conversion/utils.h | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++--- a/mfbt/double-conversion/utils.h +++++ b/mfbt/double-conversion/utils.h ++@@ -58,11 +58,11 @@ ++ defined(__mips__) || \ ++ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ ++ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ ++ defined(__SH4__) || defined(__alpha__) || \ ++ defined(_MIPS_ARCH_MIPS32R2) || \ ++- defined(_AARCH64EL_) +++ defined(__AARCH64EL__) ++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 ++ #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) ++ #if defined(_WIN32) ++ // Windows uses a 64bit wide floating point stack. ++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 +diff --git a/mfbt/double-conversion/update.sh b/mfbt/double-conversion/update.sh +--- a/mfbt/double-conversion/update.sh ++++ b/mfbt/double-conversion/update.sh +@@ -15,9 +15,12 @@ cp $1/src/*.h ./ + + # Source + cp $1/src/*.cc ./ + + patch -p3 < add-mfbt-api-markers.patch + patch -p3 < use-StandardInteger.patch + patch -p3 < use-mozilla-assertions.patch + patch -p3 < use-static_assert.patch +-patch -p3 < ToPrecision-exponential.patch +\ No newline at end of file ++patch -p3 < ToPrecision-exponential.patch ++ ++# Merged upstream, part of 2.0.1 version ++patch -p3 < fix-aarch64-macro.patch +diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h +--- a/mfbt/double-conversion/utils.h ++++ b/mfbt/double-conversion/utils.h +@@ -55,17 +55,17 @@ + #if defined(_M_X64) || defined(__x86_64__) || \ + defined(__ARMEL__) || defined(__avr32__) || \ + defined(__hppa__) || defined(__ia64__) || \ + defined(__mips__) || \ + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ + defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ + defined(__SH4__) || defined(__alpha__) || \ + defined(_MIPS_ARCH_MIPS32R2) || \ +- defined(_AARCH64EL_) ++ defined(__AARCH64EL__) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) + #if defined(_WIN32) + // Windows uses a 64bit wide floating point stack. + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #else + #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS + #endif // _WIN32 + diff --git a/firefox-aarch64-libevent.patch b/firefox-aarch64-libevent.patch new file mode 100644 index 0000000..6f9d02a --- /dev/null +++ b/firefox-aarch64-libevent.patch @@ -0,0 +1,115 @@ + +# HG changeset patch +# User Marcin Juszkiewicz +# Date 1392217668 18000 +# Node ID 4e9b713f435ade266a68a8d7ba08aad65c3fa6c5 +# Parent 282b6e88f9d4c2367a72836f6f9efeab2aadaa58 +Bug 963023 - AArch64 support for libevent. r=froydnj + +diff --git a/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch +new file mode 100644 +--- /dev/null ++++ b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch +@@ -0,0 +1,43 @@ ++--- ++ ipc/chromium/src/third_party/libevent/epoll_sub.c | 13 +++++++++++++ ++ 1 file changed, 13 insertions(+) ++ ++--- mozilla-central.orig/ipc/chromium/src/third_party/libevent/epoll_sub.c +++++ mozilla-central/ipc/chromium/src/third_party/libevent/epoll_sub.c ++@@ -29,15 +29,24 @@ ++ #include ++ #include ++ #include ++ #include ++ #include +++#include ++ ++ int ++ epoll_create(int size) ++ { +++#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) +++ if (size <= 0) { +++ errno = EINVAL; +++ return -1; +++ } +++ return (syscall(__NR_epoll_create1, 0)); +++#else ++ return (syscall(__NR_epoll_create, size)); +++#endif ++ } ++ ++ int ++ epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) ++ { ++@@ -46,7 +55,11 @@ epoll_ctl(int epfd, int op, int fd, stru ++ } ++ ++ int ++ epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) ++ { +++#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) +++ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); +++#else ++ return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); +++#endif ++ } +diff --git a/ipc/chromium/src/third_party/libevent/README.mozilla b/ipc/chromium/src/third_party/libevent/README.mozilla +--- a/ipc/chromium/src/third_party/libevent/README.mozilla ++++ b/ipc/chromium/src/third_party/libevent/README.mozilla +@@ -8,8 +8,10 @@ android/event2/event-config.h + + These files are taken from libevent-2.0.21-stable built on the development environment indicated by the first path component. You have to run "./configure" and "make" to get all of the pre-processing done. The file can then be found in "include/event2/". + + 2. This is ugly, prepare yourself. OS X has a weird problem with how the "TAILQ_END(head)" is used, causing a linking error. Just replace all use of the "TAILQ_END(head)" macro with "NULL". + + 3. Apply "add mac-arc4random-buf.patch", which removes some bad OS X compatibility code. This will allow libevent to compile on all supported versions of OS X. + + 4. Apply "openbsd-no-arc4random_addrandom.patch", which fixes the build on OpenBSD (which doesnt provide arc4random_addrandom anymore, see #931354) ++ ++5. Apply "libevent-use-non-deprecated-syscalls.patch", which fixes the build on AArch64 architecture (which does not provide deprecated syscalls) +diff --git a/ipc/chromium/src/third_party/libevent/epoll_sub.c b/ipc/chromium/src/third_party/libevent/epoll_sub.c +--- a/ipc/chromium/src/third_party/libevent/epoll_sub.c ++++ b/ipc/chromium/src/third_party/libevent/epoll_sub.c +@@ -26,27 +26,40 @@ + */ + #include + + #include + #include + #include + #include + #include ++#include + + int + epoll_create(int size) + { ++#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) ++ if (size <= 0) { ++ errno = EINVAL; ++ return -1; ++ } ++ return (syscall(__NR_epoll_create1, 0)); ++#else + return (syscall(__NR_epoll_create, size)); ++#endif + } + + int + epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) + { + + return (syscall(__NR_epoll_ctl, epfd, op, fd, event)); + } + + int + epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) + { ++#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) ++ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); ++#else + return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); ++#endif + } + diff --git a/firefox-aarch64-xpcom.patch b/firefox-aarch64-xpcom.patch new file mode 100644 index 0000000..5f70003 --- /dev/null +++ b/firefox-aarch64-xpcom.patch @@ -0,0 +1,517 @@ + +# HG changeset patch +# User Marcin Juszkiewicz +# Date 1393440196 18000 +# Node ID d56b5c1a557348d4ac14a4d1ea7a5b5d240e3647 +# Parent 6a46f53ad944b44385398822d7bcf7621a785d91 +Bug 963024 - AArch64 support for XPCOM. r=froydnj + +diff --git a/xpcom/reflect/xptcall/src/md/unix/moz.build b/xpcom/reflect/xptcall/src/md/unix/moz.build +--- a/xpcom/reflect/xptcall/src/md/unix/moz.build ++++ b/xpcom/reflect/xptcall/src/md/unix/moz.build +@@ -144,16 +144,23 @@ if CONFIG['OS_ARCH'] == 'NetBSD': + if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k', + 'next68k', 'sun3', 'sun3x', 'x68k'): + SOURCES += [ + 'xptcinvoke_netbsd_m68k.cpp', + 'xptcstubs_netbsd_m68k.cpp' + ] + + if CONFIG['OS_ARCH'] == 'Linux': ++ if CONFIG['OS_TEST'] == 'aarch64': ++ SOURCES += [ ++ 'xptcinvoke_aarch64.cpp', ++ 'xptcinvoke_asm_aarch64.s', ++ 'xptcstubs_aarch64.cpp', ++ 'xptcstubs_asm_aarch64.s', ++ ] + if CONFIG['OS_TEST'] == 'm68k': + SOURCES += [ + 'xptcinvoke_linux_m68k.cpp', + 'xptcstubs_linux_m68k.cpp', + ] + if CONFIG['OS_TEST'].find('mips') != -1: + if CONFIG['OS_TEST'].find('mips64') != -1: + SOURCES += [ +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp +new file mode 100644 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp +@@ -0,0 +1,136 @@ ++/* -*- Mode: C; tab-width: 8; 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/. */ ++ ++/* Platform specific code to invoke XPCOM methods on native objects */ ++ ++#include "xptcprivate.h" ++ ++#if !defined(__aarch64__) ++#error "This code is for Linux AArch64 only." ++#endif ++ ++ ++/* "Procedure Call Standard for the ARM 64-bit Architecture" document, sections ++ * "5.4 Parameter Passing" and "6.1.2 Procedure Calling" contain all the ++ * needed information. ++ * ++ * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf ++ */ ++ ++#ifndef __AARCH64EL__ ++#error "Only little endian compatibility was tested" ++#endif ++ ++/* ++ * Allocation of integer function arguments initially to registers r1-r7 ++ * and then to stack. Handling of 'that' argument which goes to register r0 ++ * is handled separately and does not belong here. ++ * ++ * 'ireg_args' - pointer to the current position in the buffer, ++ * corresponding to the register arguments ++ * 'stack_args' - pointer to the current position in the buffer, ++ * corresponding to the arguments on stack ++ * 'end' - pointer to the end of the registers argument ++ * buffer. ++ */ ++static inline void alloc_word(uint64_t* &ireg_args, ++ uint64_t* &stack_args, ++ uint64_t* end, ++ uint64_t data) ++{ ++ if (ireg_args < end) { ++ *ireg_args = data; ++ ireg_args++; ++ } else { ++ *stack_args = data; ++ stack_args++; ++ } ++} ++ ++static inline void alloc_double(double* &freg_args, ++ uint64_t* &stack_args, ++ double* end, ++ double data) ++{ ++ if (freg_args < end) { ++ *freg_args = data; ++ freg_args++; ++ } else { ++ memcpy(stack_args, &data, sizeof(data)); ++ stack_args++; ++ } ++} ++ ++static inline void alloc_float(double* &freg_args, ++ uint64_t* &stack_args, ++ double* end, ++ float data) ++{ ++ if (freg_args < end) { ++ memcpy(freg_args, &data, sizeof(data)); ++ freg_args++; ++ } else { ++ memcpy(stack_args, &data, sizeof(data)); ++ stack_args++; ++ } ++} ++ ++ ++extern "C" void ++invoke_copy_to_stack(uint64_t* stk, uint64_t *end, ++ uint32_t paramCount, nsXPTCVariant* s) ++{ ++ uint64_t *ireg_args = stk; ++ uint64_t *ireg_end = ireg_args + 8; ++ double *freg_args = (double *)ireg_end; ++ double *freg_end = freg_args + 8; ++ uint64_t *stack_args = (uint64_t *)freg_end; ++ ++ // leave room for 'that' argument in x0 ++ ++ireg_args; ++ ++ for (uint32_t i = 0; i < paramCount; i++, s++) { ++ if (s->IsPtrData()) { ++ alloc_word(ireg_args, stack_args, ireg_end, (uint64_t)s->ptr); ++ continue; ++ } ++ // According to the ABI, integral types that are smaller than 8 bytes ++ // are to be passed in 8-byte registers or 8-byte stack slots. ++ switch (s->type) { ++ case nsXPTType::T_FLOAT: ++ alloc_float(freg_args, stack_args, freg_end, s->val.f); ++ break; ++ case nsXPTType::T_DOUBLE: ++ alloc_double(freg_args, stack_args, freg_end, s->val.d); ++ break; ++ case nsXPTType::T_I8: alloc_word(ireg_args, stk, end, s->val.i8); break; ++ case nsXPTType::T_I16: alloc_word(ireg_args, stk, end, s->val.i16); break; ++ case nsXPTType::T_I32: alloc_word(ireg_args, stk, end, s->val.i32); break; ++ case nsXPTType::T_I64: alloc_word(ireg_args, stk, end, s->val.i64); break; ++ case nsXPTType::T_U8: alloc_word(ireg_args, stk, end, s->val.u8); break; ++ case nsXPTType::T_U16: alloc_word(ireg_args, stk, end, s->val.u16); break; ++ case nsXPTType::T_U32: alloc_word(ireg_args, stk, end, s->val.u32); break; ++ case nsXPTType::T_U64: alloc_word(ireg_args, stk, end, s->val.u64); break; ++ case nsXPTType::T_BOOL: alloc_word(ireg_args, stk, end, s->val.b); break; ++ case nsXPTType::T_CHAR: alloc_word(ireg_args, stk, end, s->val.c); break; ++ case nsXPTType::T_WCHAR: alloc_word(ireg_args, stk, end, s->val.wc); break; ++ default: ++ // all the others are plain pointer types ++ alloc_word(ireg_args, stack_args, ireg_end, ++ reinterpret_cast(s->val.p)); ++ break; ++ } ++ } ++} ++ ++extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, ++ uint32_t paramCount, nsXPTCVariant* params); ++ ++EXPORT_XPCOM_API(nsresult) ++NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, ++ uint32_t paramCount, nsXPTCVariant* params) ++{ ++ return _NS_InvokeByIndex(that, methodIndex, paramCount, params); ++} +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s +new file mode 100644 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s +@@ -0,0 +1,67 @@ ++/* -*- Mode: C; tab-width: 8; 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/. */ ++ ++ .section ".text" ++ .globl _NS_InvokeByIndex ++ .type _NS_InvokeByIndex,@function ++ ++/* ++ * _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, ++ * uint32_t paramCount, nsXPTCVariant* params) ++ */ ++ ++_NS_InvokeByIndex: ++ # set up frame ++ stp x29, x30, [sp,#-32]! ++ mov x29, sp ++ stp x19, x20, [sp,#16] ++ ++ # save methodIndex across function calls ++ mov w20, w1 ++ ++ # end of stack area passed to invoke_copy_to_stack ++ mov x1, sp ++ ++ # assume 8 bytes of stack for each argument with 16-byte alignment ++ add w19, w2, #1 ++ and w19, w19, #0xfffffffe ++ sub sp, sp, w19, uxth #3 ++ ++ # temporary place to store args passed in r0-r7,v0-v7 ++ sub sp, sp, #128 ++ ++ # save 'that' on stack ++ str x0, [sp] ++ ++ # start of stack area passed to invoke_copy_to_stack ++ mov x0, sp ++ bl invoke_copy_to_stack ++ ++ # load arguments passed in r0-r7 ++ ldp x6, x7, [sp, #48] ++ ldp x4, x5, [sp, #32] ++ ldp x2, x3, [sp, #16] ++ ldp x0, x1, [sp],#64 ++ ++ # load arguments passed in v0-v7 ++ ldp d6, d7, [sp, #48] ++ ldp d4, d5, [sp, #32] ++ ldp d2, d3, [sp, #16] ++ ldp d0, d1, [sp],#64 ++ ++ # call the method ++ ldr x16, [x0] ++ add x16, x16, w20, uxth #3 ++ ldr x16, [x16] ++ blr x16 ++ ++ add sp, sp, w19, uxth #3 ++ ldp x19, x20, [sp,#16] ++ ldp x29, x30, [sp],#32 ++ ret ++ ++ .size _NS_InvokeByIndex, . - _NS_InvokeByIndex ++ ++ +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp +new file mode 100644 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp +@@ -0,0 +1,219 @@ ++/* -*- Mode: C; tab-width: 8; 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 "xptcprivate.h" ++#include "xptiprivate.h" ++ ++#ifndef __AARCH64EL__ ++#error "Only little endian compatibility was tested" ++#endif ++ ++/* ++ * This is for AArch64 ABI ++ * ++ * When we're called, the "gp" registers are stored in gprData and ++ * the "fp" registers are stored in fprData. Each array has 8 regs ++ * but first reg in gprData is a placeholder for 'self'. ++ */ ++extern "C" nsresult ++PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args, ++ uint64_t *gprData, double *fprData) ++{ ++#define PARAM_BUFFER_COUNT 16 ++#define PARAM_GPR_COUNT 8 ++#define PARAM_FPR_COUNT 8 ++ ++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; ++ nsXPTCMiniVariant* dispatchParams = NULL; ++ const nsXPTMethodInfo* info; ++ nsresult result = NS_ERROR_FAILURE; ++ ++ NS_ASSERTION(self,"no self"); ++ ++ self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info); ++ NS_ASSERTION(info,"no method info"); ++ ++ uint32_t paramCount = info->GetParamCount(); ++ ++ // setup variant array pointer ++ if (paramCount > PARAM_BUFFER_COUNT) { ++ dispatchParams = new nsXPTCMiniVariant[paramCount]; ++ } else { ++ dispatchParams = paramBuffer; ++ } ++ NS_ASSERTION(dispatchParams,"no place for params"); ++ ++ uint64_t* ap = args; ++ uint32_t next_gpr = 1; // skip first arg which is 'self' ++ uint32_t next_fpr = 0; ++ for (uint32_t i = 0; i < paramCount; i++) { ++ const nsXPTParamInfo& param = info->GetParam(i); ++ const nsXPTType& type = param.GetType(); ++ nsXPTCMiniVariant* dp = &dispatchParams[i]; ++ ++ if (param.IsOut() || !type.IsArithmetic()) { ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.p = (void*)gprData[next_gpr++]; ++ } else { ++ dp->val.p = (void*)*ap++; ++ } ++ continue; ++ } ++ ++ switch (type) { ++ case nsXPTType::T_I8: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.i8 = (int8_t)gprData[next_gpr++]; ++ } else { ++ dp->val.i8 = (int8_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_I16: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.i16 = (int16_t)gprData[next_gpr++]; ++ } else { ++ dp->val.i16 = (int16_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_I32: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.i32 = (int32_t)gprData[next_gpr++]; ++ } else { ++ dp->val.i32 = (int32_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_I64: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.i64 = (int64_t)gprData[next_gpr++]; ++ } else { ++ dp->val.i64 = (int64_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_U8: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.u8 = (uint8_t)gprData[next_gpr++]; ++ } else { ++ dp->val.u8 = (uint8_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_U16: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.u16 = (uint16_t)gprData[next_gpr++]; ++ } else { ++ dp->val.u16 = (uint16_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_U32: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.u32 = (uint32_t)gprData[next_gpr++]; ++ } else { ++ dp->val.u32 = (uint32_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_U64: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.u64 = (uint64_t)gprData[next_gpr++]; ++ } else { ++ dp->val.u64 = (uint64_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_FLOAT: ++ if (next_fpr < PARAM_FPR_COUNT) { ++ memcpy(&dp->val.f, &fprData[next_fpr++], sizeof(dp->val.f)); ++ } else { ++ memcpy(&dp->val.f, ap++, sizeof(dp->val.f)); ++ } ++ break; ++ ++ case nsXPTType::T_DOUBLE: ++ if (next_fpr < PARAM_FPR_COUNT) { ++ memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d)); ++ } else { ++ memcpy(&dp->val.d, ap++, sizeof(dp->val.d)); ++ } ++ break; ++ ++ case nsXPTType::T_BOOL: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.b = (bool)gprData[next_gpr++]; ++ } else { ++ dp->val.b = (bool)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_CHAR: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.c = (char)gprData[next_gpr++]; ++ } else { ++ dp->val.c = (char)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_WCHAR: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.wc = (wchar_t)gprData[next_gpr++]; ++ } else { ++ dp->val.wc = (wchar_t)*ap++; ++ } ++ break; ++ ++ default: ++ NS_ASSERTION(0, "bad type"); ++ break; ++ } ++ } ++ ++ result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams); ++ ++ if (dispatchParams != paramBuffer) { ++ delete [] dispatchParams; ++ } ++ ++ return result; ++} ++ ++// Load w17 with the constant 'n' and branch to SharedStub(). ++# define STUB_ENTRY(n) \ ++ __asm__ ( \ ++ ".section \".text\" \n\t" \ ++ ".align 2\n\t" \ ++ ".if "#n" < 10 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ ".hidden _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ ++ "_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ ++ ".elseif "#n" < 100 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ ".hidden _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ ++ "_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ ++ ".elseif "#n" < 1000 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ ".hidden _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ ++ "_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ ++ ".else \n\t" \ ++ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ ++ ".endif \n\t" \ ++ "mov w17,#"#n" \n\t" \ ++ "b SharedStub \n" \ ++); ++ ++#define SENTINEL_ENTRY(n) \ ++ nsresult nsXPTCStubBase::Sentinel##n() \ ++{ \ ++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ ++ return NS_ERROR_NOT_IMPLEMENTED; \ ++} ++ ++#include "xptcstubsdef.inc" +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s +new file mode 100644 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s +@@ -0,0 +1,39 @@ ++# 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/. ++ ++ .set NGPREGS,8 ++ .set NFPREGS,8 ++ ++ .section ".text" ++ .globl SharedStub ++ .hidden SharedStub ++ .type SharedStub,@function ++SharedStub: ++ stp x29, x30, [sp,#-16]! ++ mov x29, sp ++ ++ sub sp, sp, #8*(NGPREGS+NFPREGS) ++ stp x0, x1, [sp, #64+(0*8)] ++ stp x2, x3, [sp, #64+(2*8)] ++ stp x4, x5, [sp, #64+(4*8)] ++ stp x6, x7, [sp, #64+(6*8)] ++ stp d0, d1, [sp, #(0*8)] ++ stp d2, d3, [sp, #(2*8)] ++ stp d4, d5, [sp, #(4*8)] ++ stp d6, d7, [sp, #(6*8)] ++ ++ # methodIndex passed from stub ++ mov w1, w17 ++ ++ add x2, sp, #16+(8*(NGPREGS+NFPREGS)) ++ add x3, sp, #8*NFPREGS ++ add x4, sp, #0 ++ ++ bl PrepareAndDispatch ++ ++ add sp, sp, #8*(NGPREGS+NFPREGS) ++ ldp x29, x30, [sp],#16 ++ ret ++ ++ .size SharedStub, . - SharedStub + diff --git a/xulrunner.spec b/xulrunner.spec index 9721234..b828e5f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 29.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,6 +102,12 @@ Patch204: rhbz-966424.patch # Upstream patches Patch300: mozilla-ppc64le.patch +# mbo 962488 +Patch301: firefox-aarch64-double-convertsion.patch +# mbo 963023 +Patch302: firefox-aarch64-libevent.patch +# mbo 963024 +Patch303: firefox-aarch64-xpcom.patch # --------------------------------------------------- @@ -243,6 +249,9 @@ cd %{tarballdir} %patch300 -p1 -b .ppc64le %endif %endif +%patch301 -p1 -b .aarch64-dbl +%patch302 -p1 -b .aarch64-libevent +%patch303 -p1 -b .aarch64-xpcom %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -344,7 +353,7 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %ifarch s390 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif -%ifarch s390 %{arm} ppc +%ifarch s390 %{arm} ppc aarch64 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif @@ -358,7 +367,7 @@ export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -523,6 +532,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 15 2014 Peter Robinson 29.0-3 +- Add upstream patches for aarch64 support + * Mon Apr 28 2014 Martin Stransky - 29.0-2 - An updated ppc64le patch (rhbz#1091054) From 82c583ffad111011fb95c25e23d6dcc879429713 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 15 May 2014 23:21:10 +0100 Subject: [PATCH 409/486] Update aarch64 bits --- xulrunner.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index b828e5f..58c5855 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 29.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -339,6 +339,9 @@ esac cd %{tarballdir} +# Update the various config.guess to upstream release for aarch64 support +find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' + # -fpermissive is needed to build with gcc 4.6+ which has become stricter # # Mozilla builds with -Wall with exception of a few warnings which show up @@ -367,7 +370,7 @@ export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 %{arm} [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -532,6 +535,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 15 2014 Peter Robinson 29.0-4 +- Update aarch64 bits + * Thu May 15 2014 Peter Robinson 29.0-3 - Add upstream patches for aarch64 support From 9fb1131d7509123b0fe333f154bab7439bbab2b3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 23 May 2014 17:47:08 +0200 Subject: [PATCH 410/486] Added a build fix for ppc64 - rhbz#1100495 --- mozilla-973977.patch | 31 +++++++++++++++++++++++++++++++ xulrunner.spec | 9 ++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 mozilla-973977.patch diff --git a/mozilla-973977.patch b/mozilla-973977.patch new file mode 100644 index 0000000..d8ec932 --- /dev/null +++ b/mozilla-973977.patch @@ -0,0 +1,31 @@ +# HG changeset patch +# Parent c2172c2aaa693e00c989f76c83b83a2be97afaab +# User Ulrich Weigand +Bug 973977 - Mark SharedStub hidden to fix ppc64 build failure + + +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s +--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s +@@ -15,16 +15,21 @@ + .set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 + .set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 + .set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 + .set f30,30; .set f31,31 + + .section ".text" + .align 2 + .globl SharedStub ++ # Make the symbol hidden so that the branch from the stub does ++ # not go via a PLT. This is not only better for performance, ++ # but may be necessary to avoid linker errors since there is ++ # no place to restore the TOC register in a sibling call. ++ .hidden SharedStub + .section ".opd","aw" + .align 3 + + SharedStub: + .quad .SharedStub,.TOC.@tocbase + .previous + .type SharedStub,@function + diff --git a/xulrunner.spec b/xulrunner.spec index 58c5855..da3fb6d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 29.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -108,6 +108,7 @@ Patch301: firefox-aarch64-double-convertsion.patch Patch302: firefox-aarch64-libevent.patch # mbo 963024 Patch303: firefox-aarch64-xpcom.patch +Patch304: mozilla-973977.patch # --------------------------------------------------- @@ -252,6 +253,9 @@ cd %{tarballdir} %patch301 -p1 -b .aarch64-dbl %patch302 -p1 -b .aarch64-libevent %patch303 -p1 -b .aarch64-xpcom +%ifarch ppc64 +%patch304 -p1 -b .973977 +%endif %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -535,6 +539,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri May 23 2014 Martin Stransky - 29.0-5 +- Added a build fix for ppc64 - rhbz#1100495 + * Thu May 15 2014 Peter Robinson 29.0-4 - Update aarch64 bits From 4efab6c15bfc99ce8c5cf917831f46c597cdd3cc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Jun 2014 09:37:31 +0200 Subject: [PATCH 411/486] Update to 30.0 build 1, disabled shared js --- firefox-aarch64-double-convertsion.patch | 80 - firefox-aarch64-libevent.patch | 115 - firefox-aarch64-xpcom.patch | 517 --- mozilla-973977.patch | 31 - mozilla-ppc64le.patch | 5061 ---------------------- xulrunner-mozconfig | 1 - xulrunner.spec | 28 +- 7 files changed, 7 insertions(+), 5826 deletions(-) delete mode 100644 firefox-aarch64-double-convertsion.patch delete mode 100644 firefox-aarch64-libevent.patch delete mode 100644 firefox-aarch64-xpcom.patch delete mode 100644 mozilla-973977.patch delete mode 100644 mozilla-ppc64le.patch diff --git a/firefox-aarch64-double-convertsion.patch b/firefox-aarch64-double-convertsion.patch deleted file mode 100644 index 06320be..0000000 --- a/firefox-aarch64-double-convertsion.patch +++ /dev/null @@ -1,80 +0,0 @@ - -# HG changeset patch -# User Marcin Juszkiewicz -# Date 1393440196 18000 -# Node ID 6a46f53ad944b44385398822d7bcf7621a785d91 -# Parent 0aa56e2a5f816a30da48701f73d03060ee9692b2 -Bug 962488 - Update double-conversion for proper AArch64 support. r=froydnj - -Fix imported from upstream repository: -https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561 - -diff --git a/mfbt/double-conversion/fix-aarch64-macro.patch b/mfbt/double-conversion/fix-aarch64-macro.patch -new file mode 100644 ---- /dev/null -+++ b/mfbt/double-conversion/fix-aarch64-macro.patch -@@ -0,0 +1,23 @@ -+Backport from upstream. -+ -+https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561 -+ -+--- -+ mfbt/double-conversion/utils.h | 2 +- -+ 1 file changed, 1 insertion(+), 1 deletion(-) -+ -+--- a/mfbt/double-conversion/utils.h -++++ b/mfbt/double-conversion/utils.h -+@@ -58,11 +58,11 @@ -+ defined(__mips__) || \ -+ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ -+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ -+ defined(__SH4__) || defined(__alpha__) || \ -+ defined(_MIPS_ARCH_MIPS32R2) || \ -+- defined(_AARCH64EL_) -++ defined(__AARCH64EL__) -+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 -+ #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) -+ #if defined(_WIN32) -+ // Windows uses a 64bit wide floating point stack. -+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 -diff --git a/mfbt/double-conversion/update.sh b/mfbt/double-conversion/update.sh ---- a/mfbt/double-conversion/update.sh -+++ b/mfbt/double-conversion/update.sh -@@ -15,9 +15,12 @@ cp $1/src/*.h ./ - - # Source - cp $1/src/*.cc ./ - - patch -p3 < add-mfbt-api-markers.patch - patch -p3 < use-StandardInteger.patch - patch -p3 < use-mozilla-assertions.patch - patch -p3 < use-static_assert.patch --patch -p3 < ToPrecision-exponential.patch -\ No newline at end of file -+patch -p3 < ToPrecision-exponential.patch -+ -+# Merged upstream, part of 2.0.1 version -+patch -p3 < fix-aarch64-macro.patch -diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -55,17 +55,17 @@ - #if defined(_M_X64) || defined(__x86_64__) || \ - defined(__ARMEL__) || defined(__avr32__) || \ - defined(__hppa__) || defined(__ia64__) || \ - defined(__mips__) || \ - defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ - defined(__SH4__) || defined(__alpha__) || \ - defined(_MIPS_ARCH_MIPS32R2) || \ -- defined(_AARCH64EL_) -+ defined(__AARCH64EL__) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) - #if defined(_WIN32) - // Windows uses a 64bit wide floating point stack. - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #else - #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS - #endif // _WIN32 - diff --git a/firefox-aarch64-libevent.patch b/firefox-aarch64-libevent.patch deleted file mode 100644 index 6f9d02a..0000000 --- a/firefox-aarch64-libevent.patch +++ /dev/null @@ -1,115 +0,0 @@ - -# HG changeset patch -# User Marcin Juszkiewicz -# Date 1392217668 18000 -# Node ID 4e9b713f435ade266a68a8d7ba08aad65c3fa6c5 -# Parent 282b6e88f9d4c2367a72836f6f9efeab2aadaa58 -Bug 963023 - AArch64 support for libevent. r=froydnj - -diff --git a/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch -new file mode 100644 ---- /dev/null -+++ b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch -@@ -0,0 +1,43 @@ -+--- -+ ipc/chromium/src/third_party/libevent/epoll_sub.c | 13 +++++++++++++ -+ 1 file changed, 13 insertions(+) -+ -+--- mozilla-central.orig/ipc/chromium/src/third_party/libevent/epoll_sub.c -++++ mozilla-central/ipc/chromium/src/third_party/libevent/epoll_sub.c -+@@ -29,15 +29,24 @@ -+ #include -+ #include -+ #include -+ #include -+ #include -++#include -+ -+ int -+ epoll_create(int size) -+ { -++#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) -++ if (size <= 0) { -++ errno = EINVAL; -++ return -1; -++ } -++ return (syscall(__NR_epoll_create1, 0)); -++#else -+ return (syscall(__NR_epoll_create, size)); -++#endif -+ } -+ -+ int -+ epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) -+ { -+@@ -46,7 +55,11 @@ epoll_ctl(int epfd, int op, int fd, stru -+ } -+ -+ int -+ epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) -+ { -++#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) -++ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); -++#else -+ return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); -++#endif -+ } -diff --git a/ipc/chromium/src/third_party/libevent/README.mozilla b/ipc/chromium/src/third_party/libevent/README.mozilla ---- a/ipc/chromium/src/third_party/libevent/README.mozilla -+++ b/ipc/chromium/src/third_party/libevent/README.mozilla -@@ -8,8 +8,10 @@ android/event2/event-config.h - - These files are taken from libevent-2.0.21-stable built on the development environment indicated by the first path component. You have to run "./configure" and "make" to get all of the pre-processing done. The file can then be found in "include/event2/". - - 2. This is ugly, prepare yourself. OS X has a weird problem with how the "TAILQ_END(head)" is used, causing a linking error. Just replace all use of the "TAILQ_END(head)" macro with "NULL". - - 3. Apply "add mac-arc4random-buf.patch", which removes some bad OS X compatibility code. This will allow libevent to compile on all supported versions of OS X. - - 4. Apply "openbsd-no-arc4random_addrandom.patch", which fixes the build on OpenBSD (which doesnt provide arc4random_addrandom anymore, see #931354) -+ -+5. Apply "libevent-use-non-deprecated-syscalls.patch", which fixes the build on AArch64 architecture (which does not provide deprecated syscalls) -diff --git a/ipc/chromium/src/third_party/libevent/epoll_sub.c b/ipc/chromium/src/third_party/libevent/epoll_sub.c ---- a/ipc/chromium/src/third_party/libevent/epoll_sub.c -+++ b/ipc/chromium/src/third_party/libevent/epoll_sub.c -@@ -26,27 +26,40 @@ - */ - #include - - #include - #include - #include - #include - #include -+#include - - int - epoll_create(int size) - { -+#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) -+ if (size <= 0) { -+ errno = EINVAL; -+ return -1; -+ } -+ return (syscall(__NR_epoll_create1, 0)); -+#else - return (syscall(__NR_epoll_create, size)); -+#endif - } - - int - epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) - { - - return (syscall(__NR_epoll_ctl, epfd, op, fd, event)); - } - - int - epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) - { -+#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) -+ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); -+#else - return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); -+#endif - } - diff --git a/firefox-aarch64-xpcom.patch b/firefox-aarch64-xpcom.patch deleted file mode 100644 index 5f70003..0000000 --- a/firefox-aarch64-xpcom.patch +++ /dev/null @@ -1,517 +0,0 @@ - -# HG changeset patch -# User Marcin Juszkiewicz -# Date 1393440196 18000 -# Node ID d56b5c1a557348d4ac14a4d1ea7a5b5d240e3647 -# Parent 6a46f53ad944b44385398822d7bcf7621a785d91 -Bug 963024 - AArch64 support for XPCOM. r=froydnj - -diff --git a/xpcom/reflect/xptcall/src/md/unix/moz.build b/xpcom/reflect/xptcall/src/md/unix/moz.build ---- a/xpcom/reflect/xptcall/src/md/unix/moz.build -+++ b/xpcom/reflect/xptcall/src/md/unix/moz.build -@@ -144,16 +144,23 @@ if CONFIG['OS_ARCH'] == 'NetBSD': - if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k', - 'next68k', 'sun3', 'sun3x', 'x68k'): - SOURCES += [ - 'xptcinvoke_netbsd_m68k.cpp', - 'xptcstubs_netbsd_m68k.cpp' - ] - - if CONFIG['OS_ARCH'] == 'Linux': -+ if CONFIG['OS_TEST'] == 'aarch64': -+ SOURCES += [ -+ 'xptcinvoke_aarch64.cpp', -+ 'xptcinvoke_asm_aarch64.s', -+ 'xptcstubs_aarch64.cpp', -+ 'xptcstubs_asm_aarch64.s', -+ ] - if CONFIG['OS_TEST'] == 'm68k': - SOURCES += [ - 'xptcinvoke_linux_m68k.cpp', - 'xptcstubs_linux_m68k.cpp', - ] - if CONFIG['OS_TEST'].find('mips') != -1: - if CONFIG['OS_TEST'].find('mips64') != -1: - SOURCES += [ -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp -new file mode 100644 ---- /dev/null -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp -@@ -0,0 +1,136 @@ -+/* -*- Mode: C; tab-width: 8; 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/. */ -+ -+/* Platform specific code to invoke XPCOM methods on native objects */ -+ -+#include "xptcprivate.h" -+ -+#if !defined(__aarch64__) -+#error "This code is for Linux AArch64 only." -+#endif -+ -+ -+/* "Procedure Call Standard for the ARM 64-bit Architecture" document, sections -+ * "5.4 Parameter Passing" and "6.1.2 Procedure Calling" contain all the -+ * needed information. -+ * -+ * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf -+ */ -+ -+#ifndef __AARCH64EL__ -+#error "Only little endian compatibility was tested" -+#endif -+ -+/* -+ * Allocation of integer function arguments initially to registers r1-r7 -+ * and then to stack. Handling of 'that' argument which goes to register r0 -+ * is handled separately and does not belong here. -+ * -+ * 'ireg_args' - pointer to the current position in the buffer, -+ * corresponding to the register arguments -+ * 'stack_args' - pointer to the current position in the buffer, -+ * corresponding to the arguments on stack -+ * 'end' - pointer to the end of the registers argument -+ * buffer. -+ */ -+static inline void alloc_word(uint64_t* &ireg_args, -+ uint64_t* &stack_args, -+ uint64_t* end, -+ uint64_t data) -+{ -+ if (ireg_args < end) { -+ *ireg_args = data; -+ ireg_args++; -+ } else { -+ *stack_args = data; -+ stack_args++; -+ } -+} -+ -+static inline void alloc_double(double* &freg_args, -+ uint64_t* &stack_args, -+ double* end, -+ double data) -+{ -+ if (freg_args < end) { -+ *freg_args = data; -+ freg_args++; -+ } else { -+ memcpy(stack_args, &data, sizeof(data)); -+ stack_args++; -+ } -+} -+ -+static inline void alloc_float(double* &freg_args, -+ uint64_t* &stack_args, -+ double* end, -+ float data) -+{ -+ if (freg_args < end) { -+ memcpy(freg_args, &data, sizeof(data)); -+ freg_args++; -+ } else { -+ memcpy(stack_args, &data, sizeof(data)); -+ stack_args++; -+ } -+} -+ -+ -+extern "C" void -+invoke_copy_to_stack(uint64_t* stk, uint64_t *end, -+ uint32_t paramCount, nsXPTCVariant* s) -+{ -+ uint64_t *ireg_args = stk; -+ uint64_t *ireg_end = ireg_args + 8; -+ double *freg_args = (double *)ireg_end; -+ double *freg_end = freg_args + 8; -+ uint64_t *stack_args = (uint64_t *)freg_end; -+ -+ // leave room for 'that' argument in x0 -+ ++ireg_args; -+ -+ for (uint32_t i = 0; i < paramCount; i++, s++) { -+ if (s->IsPtrData()) { -+ alloc_word(ireg_args, stack_args, ireg_end, (uint64_t)s->ptr); -+ continue; -+ } -+ // According to the ABI, integral types that are smaller than 8 bytes -+ // are to be passed in 8-byte registers or 8-byte stack slots. -+ switch (s->type) { -+ case nsXPTType::T_FLOAT: -+ alloc_float(freg_args, stack_args, freg_end, s->val.f); -+ break; -+ case nsXPTType::T_DOUBLE: -+ alloc_double(freg_args, stack_args, freg_end, s->val.d); -+ break; -+ case nsXPTType::T_I8: alloc_word(ireg_args, stk, end, s->val.i8); break; -+ case nsXPTType::T_I16: alloc_word(ireg_args, stk, end, s->val.i16); break; -+ case nsXPTType::T_I32: alloc_word(ireg_args, stk, end, s->val.i32); break; -+ case nsXPTType::T_I64: alloc_word(ireg_args, stk, end, s->val.i64); break; -+ case nsXPTType::T_U8: alloc_word(ireg_args, stk, end, s->val.u8); break; -+ case nsXPTType::T_U16: alloc_word(ireg_args, stk, end, s->val.u16); break; -+ case nsXPTType::T_U32: alloc_word(ireg_args, stk, end, s->val.u32); break; -+ case nsXPTType::T_U64: alloc_word(ireg_args, stk, end, s->val.u64); break; -+ case nsXPTType::T_BOOL: alloc_word(ireg_args, stk, end, s->val.b); break; -+ case nsXPTType::T_CHAR: alloc_word(ireg_args, stk, end, s->val.c); break; -+ case nsXPTType::T_WCHAR: alloc_word(ireg_args, stk, end, s->val.wc); break; -+ default: -+ // all the others are plain pointer types -+ alloc_word(ireg_args, stack_args, ireg_end, -+ reinterpret_cast(s->val.p)); -+ break; -+ } -+ } -+} -+ -+extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+ uint32_t paramCount, nsXPTCVariant* params); -+ -+EXPORT_XPCOM_API(nsresult) -+NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+ uint32_t paramCount, nsXPTCVariant* params) -+{ -+ return _NS_InvokeByIndex(that, methodIndex, paramCount, params); -+} -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s -new file mode 100644 ---- /dev/null -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s -@@ -0,0 +1,67 @@ -+/* -*- Mode: C; tab-width: 8; 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/. */ -+ -+ .section ".text" -+ .globl _NS_InvokeByIndex -+ .type _NS_InvokeByIndex,@function -+ -+/* -+ * _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+ * uint32_t paramCount, nsXPTCVariant* params) -+ */ -+ -+_NS_InvokeByIndex: -+ # set up frame -+ stp x29, x30, [sp,#-32]! -+ mov x29, sp -+ stp x19, x20, [sp,#16] -+ -+ # save methodIndex across function calls -+ mov w20, w1 -+ -+ # end of stack area passed to invoke_copy_to_stack -+ mov x1, sp -+ -+ # assume 8 bytes of stack for each argument with 16-byte alignment -+ add w19, w2, #1 -+ and w19, w19, #0xfffffffe -+ sub sp, sp, w19, uxth #3 -+ -+ # temporary place to store args passed in r0-r7,v0-v7 -+ sub sp, sp, #128 -+ -+ # save 'that' on stack -+ str x0, [sp] -+ -+ # start of stack area passed to invoke_copy_to_stack -+ mov x0, sp -+ bl invoke_copy_to_stack -+ -+ # load arguments passed in r0-r7 -+ ldp x6, x7, [sp, #48] -+ ldp x4, x5, [sp, #32] -+ ldp x2, x3, [sp, #16] -+ ldp x0, x1, [sp],#64 -+ -+ # load arguments passed in v0-v7 -+ ldp d6, d7, [sp, #48] -+ ldp d4, d5, [sp, #32] -+ ldp d2, d3, [sp, #16] -+ ldp d0, d1, [sp],#64 -+ -+ # call the method -+ ldr x16, [x0] -+ add x16, x16, w20, uxth #3 -+ ldr x16, [x16] -+ blr x16 -+ -+ add sp, sp, w19, uxth #3 -+ ldp x19, x20, [sp,#16] -+ ldp x29, x30, [sp],#32 -+ ret -+ -+ .size _NS_InvokeByIndex, . - _NS_InvokeByIndex -+ -+ -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp -new file mode 100644 ---- /dev/null -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp -@@ -0,0 +1,219 @@ -+/* -*- Mode: C; tab-width: 8; 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 "xptcprivate.h" -+#include "xptiprivate.h" -+ -+#ifndef __AARCH64EL__ -+#error "Only little endian compatibility was tested" -+#endif -+ -+/* -+ * This is for AArch64 ABI -+ * -+ * When we're called, the "gp" registers are stored in gprData and -+ * the "fp" registers are stored in fprData. Each array has 8 regs -+ * but first reg in gprData is a placeholder for 'self'. -+ */ -+extern "C" nsresult -+PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args, -+ uint64_t *gprData, double *fprData) -+{ -+#define PARAM_BUFFER_COUNT 16 -+#define PARAM_GPR_COUNT 8 -+#define PARAM_FPR_COUNT 8 -+ -+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; -+ nsXPTCMiniVariant* dispatchParams = NULL; -+ const nsXPTMethodInfo* info; -+ nsresult result = NS_ERROR_FAILURE; -+ -+ NS_ASSERTION(self,"no self"); -+ -+ self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info); -+ NS_ASSERTION(info,"no method info"); -+ -+ uint32_t paramCount = info->GetParamCount(); -+ -+ // setup variant array pointer -+ if (paramCount > PARAM_BUFFER_COUNT) { -+ dispatchParams = new nsXPTCMiniVariant[paramCount]; -+ } else { -+ dispatchParams = paramBuffer; -+ } -+ NS_ASSERTION(dispatchParams,"no place for params"); -+ -+ uint64_t* ap = args; -+ uint32_t next_gpr = 1; // skip first arg which is 'self' -+ uint32_t next_fpr = 0; -+ for (uint32_t i = 0; i < paramCount; i++) { -+ const nsXPTParamInfo& param = info->GetParam(i); -+ const nsXPTType& type = param.GetType(); -+ nsXPTCMiniVariant* dp = &dispatchParams[i]; -+ -+ if (param.IsOut() || !type.IsArithmetic()) { -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.p = (void*)gprData[next_gpr++]; -+ } else { -+ dp->val.p = (void*)*ap++; -+ } -+ continue; -+ } -+ -+ switch (type) { -+ case nsXPTType::T_I8: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.i8 = (int8_t)gprData[next_gpr++]; -+ } else { -+ dp->val.i8 = (int8_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_I16: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.i16 = (int16_t)gprData[next_gpr++]; -+ } else { -+ dp->val.i16 = (int16_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_I32: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.i32 = (int32_t)gprData[next_gpr++]; -+ } else { -+ dp->val.i32 = (int32_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_I64: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.i64 = (int64_t)gprData[next_gpr++]; -+ } else { -+ dp->val.i64 = (int64_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_U8: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.u8 = (uint8_t)gprData[next_gpr++]; -+ } else { -+ dp->val.u8 = (uint8_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_U16: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.u16 = (uint16_t)gprData[next_gpr++]; -+ } else { -+ dp->val.u16 = (uint16_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_U32: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.u32 = (uint32_t)gprData[next_gpr++]; -+ } else { -+ dp->val.u32 = (uint32_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_U64: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.u64 = (uint64_t)gprData[next_gpr++]; -+ } else { -+ dp->val.u64 = (uint64_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_FLOAT: -+ if (next_fpr < PARAM_FPR_COUNT) { -+ memcpy(&dp->val.f, &fprData[next_fpr++], sizeof(dp->val.f)); -+ } else { -+ memcpy(&dp->val.f, ap++, sizeof(dp->val.f)); -+ } -+ break; -+ -+ case nsXPTType::T_DOUBLE: -+ if (next_fpr < PARAM_FPR_COUNT) { -+ memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d)); -+ } else { -+ memcpy(&dp->val.d, ap++, sizeof(dp->val.d)); -+ } -+ break; -+ -+ case nsXPTType::T_BOOL: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.b = (bool)gprData[next_gpr++]; -+ } else { -+ dp->val.b = (bool)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_CHAR: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.c = (char)gprData[next_gpr++]; -+ } else { -+ dp->val.c = (char)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_WCHAR: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.wc = (wchar_t)gprData[next_gpr++]; -+ } else { -+ dp->val.wc = (wchar_t)*ap++; -+ } -+ break; -+ -+ default: -+ NS_ASSERTION(0, "bad type"); -+ break; -+ } -+ } -+ -+ result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams); -+ -+ if (dispatchParams != paramBuffer) { -+ delete [] dispatchParams; -+ } -+ -+ return result; -+} -+ -+// Load w17 with the constant 'n' and branch to SharedStub(). -+# define STUB_ENTRY(n) \ -+ __asm__ ( \ -+ ".section \".text\" \n\t" \ -+ ".align 2\n\t" \ -+ ".if "#n" < 10 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ -+ ".hidden _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ -+ "_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ -+ ".elseif "#n" < 100 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ -+ ".hidden _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ -+ "_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ -+ ".elseif "#n" < 1000 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ -+ ".hidden _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ -+ "_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ -+ ".else \n\t" \ -+ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ -+ ".endif \n\t" \ -+ "mov w17,#"#n" \n\t" \ -+ "b SharedStub \n" \ -+); -+ -+#define SENTINEL_ENTRY(n) \ -+ nsresult nsXPTCStubBase::Sentinel##n() \ -+{ \ -+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ -+ return NS_ERROR_NOT_IMPLEMENTED; \ -+} -+ -+#include "xptcstubsdef.inc" -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s -new file mode 100644 ---- /dev/null -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s -@@ -0,0 +1,39 @@ -+# 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/. -+ -+ .set NGPREGS,8 -+ .set NFPREGS,8 -+ -+ .section ".text" -+ .globl SharedStub -+ .hidden SharedStub -+ .type SharedStub,@function -+SharedStub: -+ stp x29, x30, [sp,#-16]! -+ mov x29, sp -+ -+ sub sp, sp, #8*(NGPREGS+NFPREGS) -+ stp x0, x1, [sp, #64+(0*8)] -+ stp x2, x3, [sp, #64+(2*8)] -+ stp x4, x5, [sp, #64+(4*8)] -+ stp x6, x7, [sp, #64+(6*8)] -+ stp d0, d1, [sp, #(0*8)] -+ stp d2, d3, [sp, #(2*8)] -+ stp d4, d5, [sp, #(4*8)] -+ stp d6, d7, [sp, #(6*8)] -+ -+ # methodIndex passed from stub -+ mov w1, w17 -+ -+ add x2, sp, #16+(8*(NGPREGS+NFPREGS)) -+ add x3, sp, #8*NFPREGS -+ add x4, sp, #0 -+ -+ bl PrepareAndDispatch -+ -+ add sp, sp, #8*(NGPREGS+NFPREGS) -+ ldp x29, x30, [sp],#16 -+ ret -+ -+ .size SharedStub, . - SharedStub - diff --git a/mozilla-973977.patch b/mozilla-973977.patch deleted file mode 100644 index d8ec932..0000000 --- a/mozilla-973977.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# Parent c2172c2aaa693e00c989f76c83b83a2be97afaab -# User Ulrich Weigand -Bug 973977 - Mark SharedStub hidden to fix ppc64 build failure - - -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s ---- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s -@@ -15,16 +15,21 @@ - .set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 - .set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 - .set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 - .set f30,30; .set f31,31 - - .section ".text" - .align 2 - .globl SharedStub -+ # Make the symbol hidden so that the branch from the stub does -+ # not go via a PLT. This is not only better for performance, -+ # but may be necessary to avoid linker errors since there is -+ # no place to restore the TOC register in a sibling call. -+ .hidden SharedStub - .section ".opd","aw" - .align 3 - - SharedStub: - .quad .SharedStub,.TOC.@tocbase - .previous - .type SharedStub,@function - diff --git a/mozilla-ppc64le.patch b/mozilla-ppc64le.patch deleted file mode 100644 index bb340cb..0000000 --- a/mozilla-ppc64le.patch +++ /dev/null @@ -1,5061 +0,0 @@ -# HG changeset patch -# Parent 007cf000fdf7c5048939a87f63165a67fd9db5f6 -# User Ulrich Weigand -Bug 976648 - powerpc64le-linux support - toplevel build/config - -Index: mozilla-release/build/autoconf/config.guess -=================================================================== ---- mozilla-release.orig/build/autoconf/config.guess -+++ mozilla-release/build/autoconf/config.guess -@@ -1,14 +1,12 @@ - #! /bin/sh - # Attempt to guess a canonical system name. --# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 --# Free Software Foundation, Inc. -+# Copyright 1992-2014 Free Software Foundation, Inc. - --timestamp='2009-08-19' -+timestamp='2014-02-12' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or -+# the Free Software Foundation; either version 3 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but -@@ -17,26 +15,22 @@ timestamp='2009-08-19' - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA --# 02110-1301, USA. -+# along with this program; if not, see . - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -- -- --# Originally written by Per Bothner. Please send patches (context --# diff format) to and include a ChangeLog --# entry. -+# the same distribution terms that you use for the rest of that -+# program. This Exception is an additional permission under section 7 -+# of the GNU General Public License, version 3 ("GPLv3"). - # --# This script attempts to guess a canonical system name similar to --# config.sub. If it succeeds, it prints the system name on stdout, and --# exits with 0. Otherwise, it exits with 1. -+# Originally written by Per Bothner. - # - # You can get the latest version of this script from: - # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+# -+# Please send patches with a ChangeLog entry to config-patches@gnu.org. -+ - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -56,8 +50,7 @@ version="\ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, --2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+Copyright 1992-2014 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -+case "${UNAME_SYSTEM}" in -+Linux|GNU|GNU/*) -+ # If the system lacks a compiler, then just pick glibc. -+ # We could probably try harder. -+ LIBC=gnu -+ -+ eval $set_cc_for_build -+ cat <<-EOF > $dummy.c -+ #include -+ #if defined(__UCLIBC__) -+ LIBC=uclibc -+ #elif defined(__dietlibc__) -+ LIBC=dietlibc -+ #else -+ LIBC=gnu -+ #endif -+ EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` -+ ;; -+esac -+ - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or -- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, -+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward -@@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - fi - ;; - *) -- os=netbsd -+ os=netbsd - ;; - esac - # The OS release -@@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; -+ *:Bitrig:*:*) -+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} -+ exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -@@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) -- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on -@@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit ;; -+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. -+ exitcode=$? -+ trap '' 0 -+ exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead -@@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) -- echo powerpc-ibm-os400 -+ echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; -- arm:riscos:*:*|arm:RISCOS:*:*) -+ arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) -@@ -333,6 +354,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" -@@ -391,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) -- echo m68k-atari-mint${UNAME_RELEASE} -+ echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) -- echo m68k-atari-mint${UNAME_RELEASE} -+ echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) -- echo m68k-milan-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-milan-mint${UNAME_RELEASE} -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) -- echo m68k-hades-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-hades-mint${UNAME_RELEASE} -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) -- echo m68k-unknown-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-unknown-mint${UNAME_RELEASE} -+ exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; -@@ -477,8 +501,8 @@ EOF - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) -- # DG/UX returns AViiON for all architectures -- UNAME_PROCESSOR=`/usr/bin/uname -p` -+ # DG/UX returns AViiON for all architectures -+ UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ -@@ -491,7 +515,7 @@ EOF - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; -@@ -548,7 +572,7 @@ EOF - echo rs6000-ibm-aix3.2 - fi - exit ;; -- *:AIX:*:[456]) -+ *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -591,52 +615,52 @@ EOF - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -- case "${sc_cpu_version}" in -- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -- 532) # CPU_PA_RISC2_0 -- case "${sc_kernel_bits}" in -- 32) HP_ARCH="hppa2.0n" ;; -- 64) HP_ARCH="hppa2.0w" ;; -+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -+ case "${sc_cpu_version}" in -+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -+ 532) # CPU_PA_RISC2_0 -+ case "${sc_kernel_bits}" in -+ 32) HP_ARCH="hppa2.0n" ;; -+ 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 -- esac ;; -- esac -+ esac ;; -+ esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -+ sed 's/^ //' << EOF >$dummy.c -+ -+ #define _HPUX_SOURCE -+ #include -+ #include -+ -+ int main () -+ { -+ #if defined(_SC_KERNEL_BITS) -+ long bits = sysconf(_SC_KERNEL_BITS); -+ #endif -+ long cpu = sysconf (_SC_CPU_VERSION); - -- #define _HPUX_SOURCE -- #include -- #include -- -- int main () -- { -- #if defined(_SC_KERNEL_BITS) -- long bits = sysconf(_SC_KERNEL_BITS); -- #endif -- long cpu = sysconf (_SC_CPU_VERSION); -- -- switch (cpu) -- { -- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -- case CPU_PA_RISC2_0: -- #if defined(_SC_KERNEL_BITS) -- switch (bits) -- { -- case 64: puts ("hppa2.0w"); break; -- case 32: puts ("hppa2.0n"); break; -- default: puts ("hppa2.0"); break; -- } break; -- #else /* !defined(_SC_KERNEL_BITS) */ -- puts ("hppa2.0"); break; -- #endif -- default: puts ("hppa1.0"); break; -- } -- exit (0); -- } -+ switch (cpu) -+ { -+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -+ case CPU_PA_RISC2_0: -+ #if defined(_SC_KERNEL_BITS) -+ switch (bits) -+ { -+ case 64: puts ("hppa2.0w"); break; -+ case 32: puts ("hppa2.0n"); break; -+ default: puts ("hppa2.0"); break; -+ } break; -+ #else /* !defined(_SC_KERNEL_BITS) */ -+ puts ("hppa2.0"); break; -+ #endif -+ default: puts ("hppa1.0"); break; -+ } -+ exit (0); -+ } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa -@@ -727,22 +751,22 @@ EOF - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; -@@ -766,14 +790,14 @@ EOF - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit ;; -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - 5000:UNIX_System_V:4.*:*) -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -@@ -785,34 +809,39 @@ EOF - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) -- case ${UNAME_MACHINE} in -- pc98) -- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ UNAME_PROCESSOR=`/usr/bin/uname -p` -+ case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -+ *:MINGW64*:*) -+ echo ${UNAME_MACHINE}-pc-mingw64 -+ exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; -+ i*:MSYS*:*) -+ echo ${UNAME_MACHINE}-pc-msys -+ exit ;; - i*:windows32*:*) -- # uname -m includes "-pc" on this system. -- echo ${UNAME_MACHINE}-mingw32 -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; -- *:Interix*:[3456]*) -- case ${UNAME_MACHINE} in -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; -- EM64T | authenticamd | genuineintel) -+ authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) -@@ -845,45 +874,81 @@ EOF - exit ;; - *:GNU:*:*) - # the GNU system -- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland -- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; -+ aarch64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ aarch64_be:Linux:*:*) -+ UNAME_MACHINE=aarch64_be -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ arc:Linux:*:* | arceb:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else -- echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_PCS_VFP -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf -+ fi - fi - exit ;; - avr32*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) -- echo cris-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) -- echo crisv32-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) -- echo frv-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ hexagon:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ i*86:Linux:*:*) -+ echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - ia64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build -@@ -901,123 +966,65 @@ EOF - #endif - #endif - EOF -- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -- /^CPU/{ -- s: ::g -- p -- }'`" -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; -- or32:Linux:*:*) -- echo or32-unknown-linux-gnu -- exit ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -- exit ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ or1k:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep -q ld.so.1 -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ or32:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) -- echo sparc-unknown-linux-gnu -+ echo sparc-unknown-linux-${LIBC} -+ exit ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -- PA7*) echo hppa1.1-unknown-linux-gnu ;; -- PA8*) echo hppa2.0-unknown-linux-gnu ;; -- *) echo hppa-unknown-linux-gnu ;; -+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; -+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; -+ *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-${LIBC} -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-${LIBC} -+ exit ;; -+ ppc64le:Linux:*:*) -+ echo powerpc64le-unknown-linux-${LIBC} -+ exit ;; -+ ppcle:Linux:*:*) -+ echo powerpcle-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) -- echo ${UNAME_MACHINE}-ibm-linux -+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; - sh64*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ tile*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) -- echo ${UNAME_MACHINE}-dec-linux-gnu -+ echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -- /^LIBC/{ -- s: ::g -- p -- }'`" -- test x"${LIBC}" != x && { -- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -- exit -- } -- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } -- ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both -@@ -1025,11 +1032,11 @@ EOF - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) -- # Unixware is an offshoot of SVR4, but it has its own version -- # number series starting with 2... -- # I am not positive that other SVR4 systems won't match this, -+ # Unixware is an offshoot of SVR4, but it has its own version -+ # number series starting with 2... -+ # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. -- # Use sysv4.2uw... so that sysv4* matches it. -+ # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) -@@ -1061,7 +1068,7 @@ EOF - fi - exit ;; - i*86:*:5:[678]*) -- # UnixWare 7.x, OpenUNIX and OpenServer 6. -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; -@@ -1089,13 +1096,13 @@ EOF - exit ;; - pc:*:*:*) - # Left here for compatibility: -- # uname -m prints for DJGPP always 'pc', but it prints nothing about -- # the processor, so we play safe by assuming i586. -+ # uname -m prints for DJGPP always 'pc', but it prints nothing about -+ # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp -- exit ;; -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; -@@ -1130,8 +1137,8 @@ EOF - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) -- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && { echo i486-ncr-sysv4; exit; } ;; -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ -@@ -1174,10 +1181,10 @@ EOF - echo ns32k-sni-sysv - fi - exit ;; -- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -- # says -- echo i586-unisys-sysv4 -- exit ;; -+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -+ # says -+ echo i586-unisys-sysv4 -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm -@@ -1203,11 +1210,11 @@ EOF - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then -- echo mips-nec-sysv${UNAME_RELEASE} -+ echo mips-nec-sysv${UNAME_RELEASE} - else -- echo mips-unknown-sysv${UNAME_RELEASE} -+ echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; -@@ -1220,6 +1227,9 @@ EOF - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; -+ x86_64:Haiku:*:*) -+ echo x86_64-unknown-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; -@@ -1246,13 +1256,31 @@ EOF - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -- case $UNAME_PROCESSOR in -- i386) eval $set_cc_for_build -- if $CC_FOR_BUILD -E -dM -x c /dev/null | grep __LP64__>/dev/null 2>&1 ; then -- UNAME_PROCESSOR=x86_64 -- fi ;; -- unknown) UNAME_PROCESSOR=powerpc ;; -- esac -+ eval $set_cc_for_build -+ if test "$UNAME_PROCESSOR" = unknown ; then -+ UNAME_PROCESSOR=powerpc -+ fi -+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ case $UNAME_PROCESSOR in -+ i386) UNAME_PROCESSOR=x86_64 ;; -+ powerpc) UNAME_PROCESSOR=powerpc64 ;; -+ esac -+ fi -+ fi -+ elif test "$UNAME_PROCESSOR" = i386 ; then -+ # Avoid executing cc on OS X 10.9, as it ships with a stub -+ # that puts up a graphical alert prompting to install -+ # developer tools. Any system running Mac OS X 10.7 or -+ # later (Darwin 11 and later) is required to have a 64-bit -+ # processor. This is not true of the ARM version of Darwin -+ # that Apple uses in portable devices. -+ UNAME_PROCESSOR=x86_64 -+ fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) -@@ -1266,7 +1294,10 @@ EOF - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; -- NSE-?:NONSTOP_KERNEL:*:*) -+ NEO-?:NONSTOP_KERNEL:*:*) -+ echo neo-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) -@@ -1311,13 +1342,13 @@ EOF - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) -- echo mips-sei-seiux${UNAME_RELEASE} -+ echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) -- UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; -@@ -1335,158 +1366,10 @@ EOF - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; --esac -- --#echo '(No uname command or uname output not recognized.)' 1>&2 --#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -- --eval $set_cc_for_build --cat >$dummy.c < --# include --#endif --main () --{ --#if defined (sony) --#if defined (MIPSEB) -- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, -- I don't know.... */ -- printf ("mips-sony-bsd\n"); exit (0); --#else --#include -- printf ("m68k-sony-newsos%s\n", --#ifdef NEWSOS4 -- "4" --#else -- "" --#endif -- ); exit (0); --#endif --#endif -- --#if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix\n"); exit (0); --#endif -- --#if defined (hp300) && !defined (hpux) -- printf ("m68k-hp-bsd\n"); exit (0); --#endif -- --#if defined (NeXT) --#if !defined (__ARCHITECTURE__) --#define __ARCHITECTURE__ "m68k" --#endif -- int version; -- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; -- if (version < 4) -- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); -- else -- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); -- exit (0); --#endif -- --#if defined (MULTIMAX) || defined (n16) --#if defined (UMAXV) -- printf ("ns32k-encore-sysv\n"); exit (0); --#else --#if defined (CMU) -- printf ("ns32k-encore-mach\n"); exit (0); --#else -- printf ("ns32k-encore-bsd\n"); exit (0); --#endif --#endif --#endif -- --#if defined (__386BSD__) -- printf ("i386-pc-bsd\n"); exit (0); --#endif -- --#if defined (sequent) --#if defined (i386) -- printf ("i386-sequent-dynix\n"); exit (0); --#endif --#if defined (ns32000) -- printf ("ns32k-sequent-dynix\n"); exit (0); --#endif --#endif -- --#if defined (_SEQUENT_) -- struct utsname un; -- -- uname(&un); -- -- if (strncmp(un.version, "V2", 2) == 0) { -- printf ("i386-sequent-ptx2\n"); exit (0); -- } -- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ -- printf ("i386-sequent-ptx1\n"); exit (0); -- } -- printf ("i386-sequent-ptx\n"); exit (0); -- --#endif -- --#if defined (vax) --# if !defined (ultrix) --# include --# if defined (BSD) --# if BSD == 43 -- printf ("vax-dec-bsd4.3\n"); exit (0); --# else --# if BSD == 199006 -- printf ("vax-dec-bsd4.3reno\n"); exit (0); --# else -- printf ("vax-dec-bsd\n"); exit (0); --# endif --# endif --# else -- printf ("vax-dec-bsd\n"); exit (0); --# endif --# else -- printf ("vax-dec-ultrix\n"); exit (0); --# endif --#endif -- --#if defined (alliant) && defined (i860) -- printf ("i860-alliant-bsd\n"); exit (0); --#endif -- -- exit (1); --} --EOF -- --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -- { echo "$SYSTEM_NAME"; exit; } -- --# Apollos put the system type in the environment. -- --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } -- --# Convex versions that predate uname can use getsysinfo(1) -- --if [ -x /usr/convex/getsysinfo ] --then -- case `getsysinfo -f cpu_type` in -- c1*) -- echo c1-convex-bsd -+ x86_64:VMkernel:*:*) -+ echo ${UNAME_MACHINE}-unknown-esx - exit ;; -- c2*) -- if getsysinfo -f scalar_acc -- then echo c32-convex-bsd -- else echo c2-convex-bsd -- fi -- exit ;; -- c34*) -- echo c34-convex-bsd -- exit ;; -- c38*) -- echo c38-convex-bsd -- exit ;; -- c4*) -- echo c4-convex-bsd -- exit ;; -- esac --fi -+esac - - cat >&2 <. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -+# the same distribution terms that you use for the rest of that -+# program. This Exception is an additional permission under section 7 -+# of the GNU General Public License, version 3 ("GPLv3"). - - --# Please send patches to . Submit a context --# diff and a properly formatted GNU ChangeLog entry. -+# Please send patches with a ChangeLog entry to config-patches@gnu.org. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. -@@ -75,8 +68,7 @@ Report bugs and patches to conftest.$ac_ext -@@ -1296,7 +1296,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; -- ppc64-*linux*|powerpc64-*linux*) -+ powerpc64le-*linux*) -+ LD="${LD-ld} -m elf32lppclinux" -+ ;; -+ powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) -@@ -1315,7 +1318,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- ppc*-*linux*|powerpc*-*linux*) -+ powerpcle-*linux*) -+ LD="${LD-ld} -m elf64lppc" -+ ;; -+ powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) -Index: mozilla-release/js/src/ctypes/libffi/configure -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/configure -+++ mozilla-release/js/src/ctypes/libffi/configure -@@ -6298,7 +6298,7 @@ ia64-*-hpux*) - rm -rf conftest* - ;; - --x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ - s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext -@@ -6316,7 +6316,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; -- ppc64-*linux*|powerpc64-*linux*) -+ powerpc64le-*linux*) -+ LD="${LD-ld} -m elf32lppclinux" -+ ;; -+ powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) -@@ -6335,7 +6338,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- ppc*-*linux*|powerpc*-*linux*) -+ powerpcle-*linux*) -+ LD="${LD-ld} -m elf64lppc" -+ ;; -+ powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) -Index: mozilla-release/js/src/ctypes/libffi/m4/libtool.m4 -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/m4/libtool.m4 -+++ mozilla-release/js/src/ctypes/libffi/m4/libtool.m4 -@@ -1267,7 +1267,7 @@ ia64-*-hpux*) - rm -rf conftest* - ;; - --x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ - s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext -@@ -1281,7 +1281,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; -- ppc64-*linux*|powerpc64-*linux*) -+ powerpc64le-*linux*) -+ LD="${LD-ld} -m elf32lppclinux" -+ ;; -+ powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) -@@ -1300,7 +1303,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- ppc*-*linux*|powerpc*-*linux*) -+ powerpcle-*linux*) -+ LD="${LD-ld} -m elf64lppc" -+ ;; -+ powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ffi.c -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ffi.c -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ffi.c -@@ -1,7 +1,9 @@ - /* ----------------------------------------------------------------------- -- ffi.c - Copyright (c) 1998 Geoffrey Keating -- Copyright (C) 2007, 2008 Free Software Foundation, Inc -- Copyright (C) 2008 Red Hat, Inc -+ ffi.c - Copyright (C) 2011 Anthony Green -+ Copyright (C) 2011 Kyle Moffett -+ Copyright (C) 2008 Red Hat, Inc -+ Copyright (C) 2007, 2008 Free Software Foundation, Inc -+ Copyright (c) 1998 Geoffrey Keating - - PowerPC Foreign Function Interface - -@@ -39,32 +41,29 @@ enum { - /* The assembly depends on these exact flags. */ - FLAG_RETURNS_SMST = 1 << (31-31), /* Used for FFI_SYSV small structs. */ - FLAG_RETURNS_NOTHING = 1 << (31-30), /* These go in cr7 */ -+#ifndef __NO_FPRS__ - FLAG_RETURNS_FP = 1 << (31-29), -+#endif - FLAG_RETURNS_64BITS = 1 << (31-28), - - FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */ -- FLAG_SYSV_SMST_R4 = 1 << (31-26), /* use r4 for FFI_SYSV 8 byte -- structs. */ -- FLAG_SYSV_SMST_R3 = 1 << (31-25), /* use r3 for FFI_SYSV 4 byte -- structs. */ -- /* Bits (31-24) through (31-19) store shift value for SMST */ - - FLAG_ARG_NEEDS_COPY = 1 << (31- 7), -+ FLAG_ARG_NEEDS_PSAVE = FLAG_ARG_NEEDS_COPY, /* Used by ELFv2 */ -+#ifndef __NO_FPRS__ - FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */ -+#endif - FLAG_4_GPR_ARGUMENTS = 1 << (31- 5), - FLAG_RETVAL_REFERENCE = 1 << (31- 4) - }; - - /* About the SYSV ABI. */ --unsigned int NUM_GPR_ARG_REGISTERS = 8; -+#define ASM_NEEDS_REGISTERS 4 -+#define NUM_GPR_ARG_REGISTERS 8 - #ifndef __NO_FPRS__ --unsigned int NUM_FPR_ARG_REGISTERS = 8; --#else --unsigned int NUM_FPR_ARG_REGISTERS = 0; -+# define NUM_FPR_ARG_REGISTERS 8 - #endif - --enum { ASM_NEEDS_REGISTERS = 4 }; -- - /* ffi_prep_args_SYSV is called by the assembly routine once stack space - has been allocated for the function's arguments. - -@@ -113,10 +112,12 @@ ffi_prep_args_SYSV (extended_cif *ecif, - valp gpr_base; - int intarg_count; - -+#ifndef __NO_FPRS__ - /* 'fpr_base' points at the space for fpr1, and grows upwards as - we use FPR registers. */ - valp fpr_base; - int fparg_count; -+#endif - - /* 'copy_space' grows down as we put structures in it. It should - stay 16-byte aligned. */ -@@ -125,9 +126,11 @@ ffi_prep_args_SYSV (extended_cif *ecif, - /* 'next_arg' grows up as we put parameters in it. */ - valp next_arg; - -- int i, ii MAYBE_UNUSED; -+ int i; - ffi_type **ptr; -+#ifndef __NO_FPRS__ - double double_tmp; -+#endif - union { - void **v; - char **c; -@@ -143,21 +146,22 @@ ffi_prep_args_SYSV (extended_cif *ecif, - size_t struct_copy_size; - unsigned gprvalue; - -- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) -- NUM_FPR_ARG_REGISTERS = 0; -- - stacktop.c = (char *) stack + bytes; - gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS; - intarg_count = 0; -+#ifndef __NO_FPRS__ - fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS; - fparg_count = 0; - copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c); -+#else -+ copy_space.c = gpr_base.c; -+#endif - next_arg.u = stack + 2; - - /* Check that everything starts aligned properly. */ -- FFI_ASSERT (((unsigned) (char *) stack & 0xF) == 0); -- FFI_ASSERT (((unsigned) copy_space.c & 0xF) == 0); -- FFI_ASSERT (((unsigned) stacktop.c & 0xF) == 0); -+ FFI_ASSERT (((unsigned long) (char *) stack & 0xF) == 0); -+ FFI_ASSERT (((unsigned long) copy_space.c & 0xF) == 0); -+ FFI_ASSERT (((unsigned long) stacktop.c & 0xF) == 0); - FFI_ASSERT ((bytes & 0xF) == 0); - FFI_ASSERT (copy_space.c >= next_arg.c); - -@@ -174,12 +178,28 @@ ffi_prep_args_SYSV (extended_cif *ecif, - i > 0; - i--, ptr++, p_argv.v++) - { -- switch ((*ptr)->type) -- { -+ unsigned short typenum = (*ptr)->type; -+ -+ /* We may need to handle some values depending on ABI */ -+ if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) { -+ if (typenum == FFI_TYPE_FLOAT) -+ typenum = FFI_TYPE_UINT32; -+ if (typenum == FFI_TYPE_DOUBLE) -+ typenum = FFI_TYPE_UINT64; -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_UINT128; -+ } else if (ecif->cif->abi != FFI_LINUX) { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_STRUCT; -+#endif -+ } -+ -+ /* Now test the translated value */ -+ switch (typenum) { -+#ifndef __NO_FPRS__ - case FFI_TYPE_FLOAT: - /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ -- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_float_prep; - double_tmp = **p_argv.f; - if (fparg_count >= NUM_FPR_ARG_REGISTERS) - { -@@ -195,8 +215,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, - - case FFI_TYPE_DOUBLE: - /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ -- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_double_prep; - double_tmp = **p_argv.d; - - if (fparg_count >= NUM_FPR_ARG_REGISTERS) -@@ -218,43 +236,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, - - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if ((ecif->cif->abi != FFI_LINUX) -- && (ecif->cif->abi != FFI_LINUX_SOFT_FLOAT)) -- goto do_struct; -- /* The soft float ABI for long doubles works like this, -- a long double is passed in four consecutive gprs if available. -- A maximum of 2 long doubles can be passed in gprs. -- If we do not have 4 gprs left, the long double is passed on the -- stack, 4-byte aligned. */ -- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) -- { -- unsigned int int_tmp = (*p_argv.ui)[0]; -- if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) -- { -- if (intarg_count < NUM_GPR_ARG_REGISTERS) -- intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; -- *next_arg.u = int_tmp; -- next_arg.u++; -- for (ii = 1; ii < 4; ii++) -- { -- int_tmp = (*p_argv.ui)[ii]; -- *next_arg.u = int_tmp; -- next_arg.u++; -- } -- } -- else -- { -- *gpr_base.u++ = int_tmp; -- for (ii = 1; ii < 4; ii++) -- { -- int_tmp = (*p_argv.ui)[ii]; -- *gpr_base.u++ = int_tmp; -- } -- } -- intarg_count +=4; -- } -- else -- { - double_tmp = (*p_argv.d)[0]; - - if (fparg_count >= NUM_FPR_ARG_REGISTERS - 1) -@@ -280,13 +261,40 @@ ffi_prep_args_SYSV (extended_cif *ecif, - - fparg_count += 2; - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); -- } - break; - #endif -+#endif /* have FPRs */ -+ -+ /* -+ * The soft float ABI for long doubles works like this, a long double -+ * is passed in four consecutive GPRs if available. A maximum of 2 -+ * long doubles can be passed in gprs. If we do not have 4 GPRs -+ * left, the long double is passed on the stack, 4-byte aligned. -+ */ -+ case FFI_TYPE_UINT128: { -+ unsigned int int_tmp = (*p_argv.ui)[0]; -+ unsigned int ii; -+ if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) { -+ if (intarg_count < NUM_GPR_ARG_REGISTERS) -+ intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; -+ *(next_arg.u++) = int_tmp; -+ for (ii = 1; ii < 4; ii++) { -+ int_tmp = (*p_argv.ui)[ii]; -+ *(next_arg.u++) = int_tmp; -+ } -+ } else { -+ *(gpr_base.u++) = int_tmp; -+ for (ii = 1; ii < 4; ii++) { -+ int_tmp = (*p_argv.ui)[ii]; -+ *(gpr_base.u++) = int_tmp; -+ } -+ } -+ intarg_count += 4; -+ break; -+ } - - case FFI_TYPE_UINT64: - case FFI_TYPE_SINT64: -- soft_double_prep: - if (intarg_count == NUM_GPR_ARG_REGISTERS-1) - intarg_count++; - if (intarg_count >= NUM_GPR_ARG_REGISTERS) -@@ -319,9 +327,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, - break; - - case FFI_TYPE_STRUCT: --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- do_struct: --#endif - struct_copy_size = ((*ptr)->size + 15) & ~0xF; - copy_space.c -= struct_copy_size; - memcpy (copy_space.c, *p_argv.c, (*ptr)->size); -@@ -349,7 +354,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, - case FFI_TYPE_UINT32: - case FFI_TYPE_SINT32: - case FFI_TYPE_POINTER: -- soft_float_prep: - - gprvalue = **p_argv.ui; - -@@ -366,8 +370,16 @@ ffi_prep_args_SYSV (extended_cif *ecif, - /* Check that we didn't overrun the stack... */ - FFI_ASSERT (copy_space.c >= next_arg.c); - FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS); -+ /* The assert below is testing that the number of integer arguments agrees -+ with the number found in ffi_prep_cif_machdep(). However, intarg_count -+ is incremented whenever we place an FP arg on the stack, so account for -+ that before our assert test. */ -+#ifndef __NO_FPRS__ -+ if (fparg_count > NUM_FPR_ARG_REGISTERS) -+ intarg_count -= fparg_count - NUM_FPR_ARG_REGISTERS; - FFI_ASSERT (fpr_base.u - <= stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); -+#endif - FFI_ASSERT (flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); - } - -@@ -378,6 +390,45 @@ enum { - }; - enum { ASM_NEEDS_REGISTERS64 = 4 }; - -+#if _CALL_ELF == 2 -+static unsigned int -+discover_homogeneous_aggregate (const ffi_type *t, unsigned int *elnum) -+{ -+ switch (t->type) -+ { -+ case FFI_TYPE_FLOAT: -+ case FFI_TYPE_DOUBLE: -+ *elnum = 1; -+ return (int) t->type; -+ -+ case FFI_TYPE_STRUCT:; -+ { -+ unsigned int base_elt = 0, total_elnum = 0; -+ ffi_type **el = t->elements; -+ while (*el) -+ { -+ unsigned int el_elt, el_elnum = 0; -+ el_elt = discover_homogeneous_aggregate (*el, &el_elnum); -+ if (el_elt == 0 -+ || (base_elt && base_elt != el_elt)) -+ return 0; -+ base_elt = el_elt; -+ total_elnum += el_elnum; -+ if (total_elnum > 8) -+ return 0; -+ el++; -+ } -+ *elnum = total_elnum; -+ return base_elt; -+ } -+ -+ default: -+ return 0; -+ } -+} -+#endif -+ -+ - /* ffi_prep_args64 is called by the assembly routine once stack space - has been allocated for the function's arguments. - -@@ -423,6 +474,7 @@ ffi_prep_args64 (extended_cif *ecif, uns - unsigned long *ul; - float *f; - double *d; -+ size_t p; - } valp; - - /* 'stacktop' points at the previous backchain pointer. */ -@@ -438,9 +490,9 @@ ffi_prep_args64 (extended_cif *ecif, uns - /* 'fpr_base' points at the space for fpr3, and grows upwards as - we use FPR registers. */ - valp fpr_base; -- int fparg_count; -+ unsigned int fparg_count; - -- int i, words; -+ unsigned int i, words, nargs, nfixedargs; - ffi_type **ptr; - double double_tmp; - union { -@@ -457,11 +509,18 @@ ffi_prep_args64 (extended_cif *ecif, uns - double **d; - } p_argv; - unsigned long gprvalue; -+#ifdef __STRUCT_PARM_ALIGN__ -+ unsigned long align; -+#endif - - stacktop.c = (char *) stack + bytes; - gpr_base.ul = stacktop.ul - ASM_NEEDS_REGISTERS64 - NUM_GPR_ARG_REGISTERS64; - gpr_end.ul = gpr_base.ul + NUM_GPR_ARG_REGISTERS64; -+#if _CALL_ELF == 2 -+ rest.ul = stack + 4 + NUM_GPR_ARG_REGISTERS64; -+#else - rest.ul = stack + 6 + NUM_GPR_ARG_REGISTERS64; -+#endif - fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS64; - fparg_count = 0; - next_arg.ul = gpr_base.ul; -@@ -477,30 +536,36 @@ ffi_prep_args64 (extended_cif *ecif, uns - - /* Now for the arguments. */ - p_argv.v = ecif->avalue; -- for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs; -- i > 0; -- i--, ptr++, p_argv.v++) -+ nargs = ecif->cif->nargs; -+ nfixedargs = ecif->cif->nfixedargs; -+ for (ptr = ecif->cif->arg_types, i = 0; -+ i < nargs; -+ i++, ptr++, p_argv.v++) - { -+ unsigned int elt, elnum; -+ - switch ((*ptr)->type) - { - case FFI_TYPE_FLOAT: - double_tmp = **p_argv.f; -- *next_arg.f = (float) double_tmp; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.f = (float) double_tmp; - if (++next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; -- if (fparg_count < NUM_FPR_ARG_REGISTERS64) -- *fpr_base.d++ = double_tmp; - fparg_count++; - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); - break; - - case FFI_TYPE_DOUBLE: - double_tmp = **p_argv.d; -- *next_arg.d = double_tmp; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.d = double_tmp; - if (++next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; -- if (fparg_count < NUM_FPR_ARG_REGISTERS64) -- *fpr_base.d++ = double_tmp; - fparg_count++; - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); - break; -@@ -508,18 +573,20 @@ ffi_prep_args64 (extended_cif *ecif, uns - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: - double_tmp = (*p_argv.d)[0]; -- *next_arg.d = double_tmp; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.d = double_tmp; - if (++next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; -- if (fparg_count < NUM_FPR_ARG_REGISTERS64) -- *fpr_base.d++ = double_tmp; - fparg_count++; - double_tmp = (*p_argv.d)[1]; -- *next_arg.d = double_tmp; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.d = double_tmp; - if (++next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; -- if (fparg_count < NUM_FPR_ARG_REGISTERS64) -- *fpr_base.d++ = double_tmp; - fparg_count++; - FFI_ASSERT (__LDBL_MANT_DIG__ == 106); - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); -@@ -527,27 +594,86 @@ ffi_prep_args64 (extended_cif *ecif, uns - #endif - - case FFI_TYPE_STRUCT: -- words = ((*ptr)->size + 7) / 8; -- if (next_arg.ul >= gpr_base.ul && next_arg.ul + words > gpr_end.ul) -+#ifdef __STRUCT_PARM_ALIGN__ -+ align = (*ptr)->alignment; -+ if (align > __STRUCT_PARM_ALIGN__) -+ align = __STRUCT_PARM_ALIGN__; -+ if (align > 1) -+ next_arg.p = ALIGN (next_arg.p, align); -+#endif -+ elt = 0; -+#if _CALL_ELF == 2 -+ elt = discover_homogeneous_aggregate (*ptr, &elnum); -+#endif -+ if (elt) - { -- size_t first = gpr_end.c - next_arg.c; -- memcpy (next_arg.c, *p_argv.c, first); -- memcpy (rest.c, *p_argv.c + first, (*ptr)->size - first); -- next_arg.c = rest.c + words * 8 - first; -+ union { -+ void *v; -+ float *f; -+ double *d; -+ } arg; -+ -+ arg.v = *p_argv.v; -+ if (elt == FFI_TYPE_FLOAT) -+ { -+ do -+ { -+ double_tmp = *arg.f++; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 -+ && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.f = (float) double_tmp; -+ if (++next_arg.f == gpr_end.f) -+ next_arg.f = rest.f; -+ fparg_count++; -+ } -+ while (--elnum != 0); -+ if ((next_arg.p & 3) != 0) -+ { -+ if (++next_arg.f == gpr_end.f) -+ next_arg.f = rest.f; -+ } -+ } -+ else -+ do -+ { -+ double_tmp = *arg.d++; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.d = double_tmp; -+ if (++next_arg.d == gpr_end.d) -+ next_arg.d = rest.d; -+ fparg_count++; -+ } -+ while (--elnum != 0); - } - else - { -- char *where = next_arg.c; -- -- /* Structures with size less than eight bytes are passed -- left-padded. */ -- if ((*ptr)->size < 8) -- where += 8 - (*ptr)->size; -+ words = ((*ptr)->size + 7) / 8; -+ if (next_arg.ul >= gpr_base.ul && next_arg.ul + words > gpr_end.ul) -+ { -+ size_t first = gpr_end.c - next_arg.c; -+ memcpy (next_arg.c, *p_argv.c, first); -+ memcpy (rest.c, *p_argv.c + first, (*ptr)->size - first); -+ next_arg.c = rest.c + words * 8 - first; -+ } -+ else -+ { -+ char *where = next_arg.c; - -- memcpy (where, *p_argv.c, (*ptr)->size); -- next_arg.ul += words; -- if (next_arg.ul == gpr_end.ul) -- next_arg.ul = rest.ul; -+#ifndef __LITTLE_ENDIAN__ -+ /* Structures with size less than eight bytes are passed -+ left-padded. */ -+ if ((*ptr)->size < 8) -+ where += 8 - (*ptr)->size; -+#endif -+ memcpy (where, *p_argv.c, (*ptr)->size); -+ next_arg.ul += words; -+ if (next_arg.ul == gpr_end.ul) -+ next_arg.ul = rest.ul; -+ } - } - break; - -@@ -591,27 +717,22 @@ ffi_prep_args64 (extended_cif *ecif, uns - - - /* Perform machine dependent cif processing */ --ffi_status --ffi_prep_cif_machdep (ffi_cif *cif) -+static ffi_status -+ffi_prep_cif_machdep_core (ffi_cif *cif) - { - /* All this is for the SYSV and LINUX64 ABI. */ -- int i; - ffi_type **ptr; - unsigned bytes; -- int fparg_count = 0, intarg_count = 0; -- unsigned flags = 0; -+ unsigned i, fparg_count = 0, intarg_count = 0; -+ unsigned flags = cif->flags; - unsigned struct_copy_size = 0; - unsigned type = cif->rtype->type; - unsigned size = cif->rtype->size; - -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- NUM_FPR_ARG_REGISTERS = 0; -- -+ /* The machine-independent calculation of cif->bytes doesn't work -+ for us. Redo the calculation. */ - if (cif->abi != FFI_LINUX64) - { -- /* All the machine-independent calculation of cif->bytes will be wrong. -- Redo the calculation for SYSV. */ -- - /* Space for the frame pointer, callee's LR, and the asm's temp regs. */ - bytes = (2 + ASM_NEEDS_REGISTERS) * sizeof (int); - -@@ -621,13 +742,20 @@ ffi_prep_cif_machdep (ffi_cif *cif) - else - { - /* 64-bit ABI. */ -+#if _CALL_ELF == 2 -+ /* Space for backchain, CR, LR, TOC and the asm's temp regs. */ -+ bytes = (4 + ASM_NEEDS_REGISTERS64) * sizeof (long); - -+ /* Space for the general registers. */ -+ bytes += NUM_GPR_ARG_REGISTERS64 * sizeof (long); -+#else - /* Space for backchain, CR, LR, cc/ld doubleword, TOC and the asm's temp - regs. */ - bytes = (6 + ASM_NEEDS_REGISTERS64) * sizeof (long); - - /* Space for the mandatory parm save area and general registers. */ - bytes += 2 * NUM_GPR_ARG_REGISTERS64 * sizeof (long); -+#endif - } - - /* Return value handling. The rules for SYSV are as follows: -@@ -646,13 +774,30 @@ ffi_prep_cif_machdep (ffi_cif *cif) - - Single/double FP values in fpr1, long double in fpr1,fpr2. - - soft-float float/doubles are treated as UINT32/UINT64 respectivley. - - soft-float long doubles are returned in gpr3-gpr6. */ -+ /* First translate for softfloat/nonlinux */ -+ if (cif->abi == FFI_LINUX_SOFT_FLOAT) -+ { -+ if (type == FFI_TYPE_FLOAT) -+ type = FFI_TYPE_UINT32; -+ if (type == FFI_TYPE_DOUBLE) -+ type = FFI_TYPE_UINT64; -+ if (type == FFI_TYPE_LONGDOUBLE) -+ type = FFI_TYPE_UINT128; -+ } -+ else if (cif->abi != FFI_LINUX -+ && cif->abi != FFI_LINUX64) -+ { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (type == FFI_TYPE_LONGDOUBLE) -+ type = FFI_TYPE_STRUCT; -+#endif -+ } -+ - switch (type) - { -+#ifndef __NO_FPRS__ - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64 -- && cif->abi != FFI_LINUX_SOFT_FLOAT) -- goto byref; - flags |= FLAG_RETURNS_128BITS; - /* Fall through. */ - #endif -@@ -660,47 +805,52 @@ ffi_prep_cif_machdep (ffi_cif *cif) - flags |= FLAG_RETURNS_64BITS; - /* Fall through. */ - case FFI_TYPE_FLOAT: -- /* With FFI_LINUX_SOFT_FLOAT no fp registers are used. */ -- if (cif->abi != FFI_LINUX_SOFT_FLOAT) -- flags |= FLAG_RETURNS_FP; -+ flags |= FLAG_RETURNS_FP; - break; -+#endif - -+ case FFI_TYPE_UINT128: -+ flags |= FLAG_RETURNS_128BITS; -+ /* Fall through. */ - case FFI_TYPE_UINT64: - case FFI_TYPE_SINT64: - flags |= FLAG_RETURNS_64BITS; - break; - - case FFI_TYPE_STRUCT: -- if (cif->abi == FFI_SYSV) -+ /* -+ * The final SYSV ABI says that structures smaller or equal 8 bytes -+ * are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them -+ * in memory. -+ * -+ * NOTE: The assembly code can safely assume that it just needs to -+ * store both r3 and r4 into a 8-byte word-aligned buffer, as -+ * we allocate a temporary buffer in ffi_call() if this flag is -+ * set. -+ */ -+ if (cif->abi == FFI_SYSV && size <= 8) - { -- /* The final SYSV ABI says that structures smaller or equal 8 bytes -- are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them -- in memory. */ -- -- /* Treat structs with size <= 8 bytes. */ -- if (size <= 8) -+ flags |= FLAG_RETURNS_SMST; -+ break; -+ } -+#if _CALL_ELF == 2 -+ if (cif->abi == FFI_LINUX64) -+ { -+ unsigned int elt, elnum; -+ elt = discover_homogeneous_aggregate (cif->rtype, &elnum); -+ if (elt) -+ { -+ if (elt == FFI_TYPE_DOUBLE) -+ flags |= FLAG_RETURNS_64BITS; -+ flags |= FLAG_RETURNS_FP | FLAG_RETURNS_SMST; -+ break; -+ } -+ if (size <= 16) - { - flags |= FLAG_RETURNS_SMST; -- /* These structs are returned in r3. We pack the type and the -- precalculated shift value (needed in the sysv.S) into flags. -- The same applies for the structs returned in r3/r4. */ -- if (size <= 4) -- { -- flags |= FLAG_SYSV_SMST_R3; -- flags |= 8 * (4 - size) << 8; -- break; -- } -- /* These structs are returned in r3 and r4. See above. */ -- if (size <= 8) -- { -- flags |= FLAG_SYSV_SMST_R3 | FLAG_SYSV_SMST_R4; -- flags |= 8 * (8 - size) << 8; -- break; -- } -+ break; - } - } --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- byref: - #endif - intarg_count++; - flags |= FLAG_RETVAL_REFERENCE; -@@ -722,39 +872,36 @@ ffi_prep_cif_machdep (ffi_cif *cif) - Stuff on the stack needs to keep proper alignment. */ - for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) - { -- switch ((*ptr)->type) -- { -+ unsigned short typenum = (*ptr)->type; -+ -+ /* We may need to handle some values depending on ABI */ -+ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { -+ if (typenum == FFI_TYPE_FLOAT) -+ typenum = FFI_TYPE_UINT32; -+ if (typenum == FFI_TYPE_DOUBLE) -+ typenum = FFI_TYPE_UINT64; -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_UINT128; -+ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_STRUCT; -+#endif -+ } -+ -+ switch (typenum) { -+#ifndef __NO_FPRS__ - case FFI_TYPE_FLOAT: -- /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_float_cif; - fparg_count++; - /* floating singles are not 8-aligned on stack */ - break; - - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) -- goto do_struct; -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- { -- if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 -- || intarg_count < NUM_GPR_ARG_REGISTERS) -- /* A long double in FFI_LINUX_SOFT_FLOAT can use only -- a set of four consecutive gprs. If we have not enough, -- we have to adjust the intarg_count value. */ -- intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; -- intarg_count += 4; -- break; -- } -- else -- fparg_count++; -+ fparg_count++; - /* Fall thru */ - #endif - case FFI_TYPE_DOUBLE: -- /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_double_cif; - fparg_count++; - /* If this FP arg is going on the stack, it must be - 8-byte-aligned. */ -@@ -763,10 +910,21 @@ ffi_prep_cif_machdep (ffi_cif *cif) - && intarg_count % 2 != 0) - intarg_count++; - break; -+#endif -+ case FFI_TYPE_UINT128: -+ /* -+ * A long double in FFI_LINUX_SOFT_FLOAT can use only a set -+ * of four consecutive gprs. If we do not have enough, we -+ * have to adjust the intarg_count value. -+ */ -+ if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 -+ && intarg_count < NUM_GPR_ARG_REGISTERS) -+ intarg_count = NUM_GPR_ARG_REGISTERS; -+ intarg_count += 4; -+ break; - - case FFI_TYPE_UINT64: - case FFI_TYPE_SINT64: -- soft_double_cif: - /* 'long long' arguments are passed as two words, but - either both words must fit in registers or both go - on the stack. If they go on the stack, they must -@@ -783,9 +941,6 @@ ffi_prep_cif_machdep (ffi_cif *cif) - break; - - case FFI_TYPE_STRUCT: --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- do_struct: --#endif - /* We must allocate space for a copy of these to enforce - pass-by-value. Pad the space up to a multiple of 16 - bytes (the maximum alignment required for anything under -@@ -793,50 +948,100 @@ ffi_prep_cif_machdep (ffi_cif *cif) - struct_copy_size += ((*ptr)->size + 15) & ~0xF; - /* Fall through (allocate space for the pointer). */ - -- default: -- soft_float_cif: -+ case FFI_TYPE_POINTER: -+ case FFI_TYPE_INT: -+ case FFI_TYPE_UINT32: -+ case FFI_TYPE_SINT32: -+ case FFI_TYPE_UINT16: -+ case FFI_TYPE_SINT16: -+ case FFI_TYPE_UINT8: -+ case FFI_TYPE_SINT8: - /* Everything else is passed as a 4-byte word in a GPR, either - the object itself or a pointer to it. */ - intarg_count++; - break; -+ default: -+ FFI_ASSERT (0); - } - } - else - for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) - { -+ unsigned int elt, elnum; -+#ifdef __STRUCT_PARM_ALIGN__ -+ unsigned int align; -+#endif -+ - switch ((*ptr)->type) - { - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- intarg_count += 4; -- else -- { -- fparg_count += 2; -- intarg_count += 2; -- } -+ fparg_count += 2; -+ intarg_count += 2; -+ if (fparg_count > NUM_FPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; - break; - #endif - case FFI_TYPE_FLOAT: - case FFI_TYPE_DOUBLE: - fparg_count++; - intarg_count++; -+ if (fparg_count > NUM_FPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; - break; - - case FFI_TYPE_STRUCT: -+#ifdef __STRUCT_PARM_ALIGN__ -+ align = (*ptr)->alignment; -+ if (align > __STRUCT_PARM_ALIGN__) -+ align = __STRUCT_PARM_ALIGN__; -+ align = align / 8; -+ if (align > 1) -+ intarg_count = ALIGN (intarg_count, align); -+#endif - intarg_count += ((*ptr)->size + 7) / 8; -+ elt = 0; -+#if _CALL_ELF == 2 -+ elt = discover_homogeneous_aggregate (*ptr, &elnum); -+#endif -+ if (elt) -+ { -+ fparg_count += elnum; -+ if (fparg_count > NUM_FPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; -+ } -+ else -+ { -+ if (intarg_count > NUM_GPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; -+ } - break; - -- default: -+ case FFI_TYPE_POINTER: -+ case FFI_TYPE_UINT64: -+ case FFI_TYPE_SINT64: -+ case FFI_TYPE_INT: -+ case FFI_TYPE_UINT32: -+ case FFI_TYPE_SINT32: -+ case FFI_TYPE_UINT16: -+ case FFI_TYPE_SINT16: -+ case FFI_TYPE_UINT8: -+ case FFI_TYPE_SINT8: - /* Everything else is passed as a 8-byte word in a GPR, either - the object itself or a pointer to it. */ - intarg_count++; -+ if (intarg_count > NUM_GPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; - break; -+ default: -+ FFI_ASSERT (0); - } - } - -+#ifndef __NO_FPRS__ - if (fparg_count != 0) - flags |= FLAG_FP_ARGUMENTS; -+#endif - if (intarg_count > 4) - flags |= FLAG_4_GPR_ARGUMENTS; - if (struct_copy_size != 0) -@@ -844,25 +1049,36 @@ ffi_prep_cif_machdep (ffi_cif *cif) - - if (cif->abi != FFI_LINUX64) - { -+#ifndef __NO_FPRS__ - /* Space for the FPR registers, if needed. */ - if (fparg_count != 0) - bytes += NUM_FPR_ARG_REGISTERS * sizeof (double); -+#endif - - /* Stack space. */ - if (intarg_count > NUM_GPR_ARG_REGISTERS) - bytes += (intarg_count - NUM_GPR_ARG_REGISTERS) * sizeof (int); -+#ifndef __NO_FPRS__ - if (fparg_count > NUM_FPR_ARG_REGISTERS) - bytes += (fparg_count - NUM_FPR_ARG_REGISTERS) * sizeof (double); -+#endif - } - else - { -+#ifndef __NO_FPRS__ - /* Space for the FPR registers, if needed. */ - if (fparg_count != 0) - bytes += NUM_FPR_ARG_REGISTERS64 * sizeof (double); -+#endif - - /* Stack space. */ -+#if _CALL_ELF == 2 -+ if ((flags & FLAG_ARG_NEEDS_PSAVE) != 0) -+ bytes += intarg_count * sizeof (long); -+#else - if (intarg_count > NUM_GPR_ARG_REGISTERS64) - bytes += (intarg_count - NUM_GPR_ARG_REGISTERS64) * sizeof (long); -+#endif - } - - /* The stack space allocated needs to be a multiple of 16 bytes. */ -@@ -877,6 +1093,26 @@ ffi_prep_cif_machdep (ffi_cif *cif) - return FFI_OK; - } - -+ffi_status -+ffi_prep_cif_machdep (ffi_cif *cif) -+{ -+ cif->nfixedargs = cif->nargs; -+ return ffi_prep_cif_machdep_core (cif); -+} -+ -+ffi_status -+ffi_prep_cif_machdep_var (ffi_cif *cif, -+ unsigned int nfixedargs, -+ unsigned int ntotalargs MAYBE_UNUSED) -+{ -+ cif->nfixedargs = nfixedargs; -+#if _CALL_ELF == 2 -+ if (cif->abi == FFI_LINUX64) -+ cif->flags |= FLAG_ARG_NEEDS_PSAVE; -+#endif -+ return ffi_prep_cif_machdep_core (cif); -+} -+ - extern void ffi_call_SYSV(extended_cif *, unsigned, unsigned, unsigned *, - void (*fn)(void)); - extern void FFI_HIDDEN ffi_call_LINUX64(extended_cif *, unsigned long, -@@ -886,28 +1122,39 @@ extern void FFI_HIDDEN ffi_call_LINUX64( - void - ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) - { -+ /* -+ * The final SYSV ABI says that structures smaller or equal 8 bytes -+ * are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them -+ * in memory. -+ * -+ * We bounce-buffer SYSV small struct return values so that sysv.S -+ * can write r3 and r4 to memory without worrying about struct size. -+ * -+ * For ELFv2 ABI, use a bounce buffer for homogeneous structs too, -+ * for similar reasons. -+ */ -+ unsigned long smst_buffer[8]; - extended_cif ecif; - - ecif.cif = cif; - ecif.avalue = avalue; - -- /* If the return value is a struct and we don't have a return */ -- /* value address then we need to make one */ -- -- if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) -- { -- ecif.rvalue = alloca(cif->rtype->size); -- } -- else -- ecif.rvalue = rvalue; -- -+ ecif.rvalue = rvalue; -+ if ((cif->flags & FLAG_RETURNS_SMST) != 0) -+ ecif.rvalue = smst_buffer; -+ /* Ensure that we have a valid struct return value. -+ FIXME: Isn't this just papering over a user problem? */ -+ else if (!rvalue && cif->rtype->type == FFI_TYPE_STRUCT) -+ ecif.rvalue = alloca (cif->rtype->size); - - switch (cif->abi) - { - #ifndef POWERPC64 -+# ifndef __NO_FPRS__ - case FFI_SYSV: - case FFI_GCC_SYSV: - case FFI_LINUX: -+# endif - case FFI_LINUX_SOFT_FLOAT: - ffi_call_SYSV (&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn); - break; -@@ -920,10 +1167,29 @@ ffi_call(ffi_cif *cif, void (*fn)(void), - FFI_ASSERT (0); - break; - } -+ -+ /* Check for a bounce-buffered return value */ -+ if (rvalue && ecif.rvalue == smst_buffer) -+ { -+ unsigned int rsize = cif->rtype->size; -+#ifndef __LITTLE_ENDIAN__ -+ /* The SYSV ABI returns a structure of up to 4 bytes in size -+ left-padded in r3. */ -+ if (cif->abi == FFI_SYSV && rsize <= 4) -+ memcpy (rvalue, (char *) smst_buffer + 4 - rsize, rsize); -+ /* The SYSV ABI returns a structure of up to 8 bytes in size -+ left-padded in r3/r4, and the ELFv2 ABI similarly returns a -+ structure of up to 8 bytes in size left-padded in r3. */ -+ else if (rsize <= 8) -+ memcpy (rvalue, (char *) smst_buffer + 8 - rsize, rsize); -+ else -+#endif -+ memcpy (rvalue, smst_buffer, rsize); -+ } - } - - --#ifndef POWERPC64 -+#if !defined POWERPC64 || _CALL_ELF == 2 - #define MIN_CACHE_LINE_SIZE 8 - - static void -@@ -947,16 +1213,38 @@ ffi_prep_closure_loc (ffi_closure *closu - void *codeloc) - { - #ifdef POWERPC64 -+# if _CALL_ELF == 2 -+ unsigned int *tramp = (unsigned int *) &closure->tramp[0]; -+ -+ if (cif->abi != FFI_LINUX64) -+ return FFI_BAD_ABI; -+ -+ tramp[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */ -+ tramp[1] = 0xe98c0010; /* ld 12,1f-0b(12) */ -+ tramp[2] = 0x7d8903a6; /* mtctr 12 */ -+ tramp[3] = 0x4e800420; /* bctr */ -+ /* 1: .quad function_addr */ -+ /* 2: .quad context */ -+ *(void **) &tramp[4] = (void *) ffi_closure_LINUX64; -+ *(void **) &tramp[6] = codeloc; -+ flush_icache ((char *)tramp, (char *)codeloc, FFI_TRAMPOLINE_SIZE); -+# else - void **tramp = (void **) &closure->tramp[0]; - -- FFI_ASSERT (cif->abi == FFI_LINUX64); -+ if (cif->abi != FFI_LINUX64) -+ return FFI_BAD_ABI; - /* Copy function address and TOC from ffi_closure_LINUX64. */ - memcpy (tramp, (char *) ffi_closure_LINUX64, 16); - tramp[2] = codeloc; -+# endif - #else - unsigned int *tramp; - -- FFI_ASSERT (cif->abi == FFI_GCC_SYSV || cif->abi == FFI_SYSV); -+ if (! (cif->abi == FFI_GCC_SYSV -+ || cif->abi == FFI_SYSV -+ || cif->abi == FFI_LINUX -+ || cif->abi == FFI_LINUX_SOFT_FLOAT)) -+ return FFI_BAD_ABI; - - tramp = (unsigned int *) &closure->tramp[0]; - tramp[0] = 0x7c0802a6; /* mflr r0 */ -@@ -1011,32 +1299,38 @@ ffi_closure_helper_SYSV (ffi_closure *cl - void ** avalue; - ffi_type ** arg_types; - long i, avn; -- long nf; /* number of floating registers already used */ -- long ng; /* number of general registers already used */ -- ffi_cif * cif; -- double temp; -- unsigned size; -+#ifndef __NO_FPRS__ -+ long nf = 0; /* number of floating registers already used */ -+#endif -+ long ng = 0; /* number of general registers already used */ -+ -+ ffi_cif *cif = closure->cif; -+ unsigned size = cif->rtype->size; -+ unsigned short rtypenum = cif->rtype->type; - -- cif = closure->cif; - avalue = alloca (cif->nargs * sizeof (void *)); -- size = cif->rtype->size; - -- nf = 0; -- ng = 0; -+ /* First translate for softfloat/nonlinux */ -+ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { -+ if (rtypenum == FFI_TYPE_FLOAT) -+ rtypenum = FFI_TYPE_UINT32; -+ if (rtypenum == FFI_TYPE_DOUBLE) -+ rtypenum = FFI_TYPE_UINT64; -+ if (rtypenum == FFI_TYPE_LONGDOUBLE) -+ rtypenum = FFI_TYPE_UINT128; -+ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (rtypenum == FFI_TYPE_LONGDOUBLE) -+ rtypenum = FFI_TYPE_STRUCT; -+#endif -+ } -+ - - /* Copy the caller's structure return value address so that the closure - returns the data directly to the caller. - For FFI_SYSV the result is passed in r3/r4 if the struct size is less - or equal 8 bytes. */ -- -- if ((cif->rtype->type == FFI_TYPE_STRUCT -- && !((cif->abi == FFI_SYSV) && (size <= 8))) --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- || (cif->rtype->type == FFI_TYPE_LONGDOUBLE -- && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) --#endif -- ) -- { -+ if (rtypenum == FFI_TYPE_STRUCT && ((cif->abi != FFI_SYSV) || (size > 8))) { - rvalue = (void *) *pgr; - ng++; - pgr++; -@@ -1047,12 +1341,112 @@ ffi_closure_helper_SYSV (ffi_closure *cl - arg_types = cif->arg_types; - - /* Grab the addresses of the arguments from the stack frame. */ -- while (i < avn) -- { -- switch (arg_types[i]->type) -- { -+ while (i < avn) { -+ unsigned short typenum = arg_types[i]->type; -+ -+ /* We may need to handle some values depending on ABI */ -+ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { -+ if (typenum == FFI_TYPE_FLOAT) -+ typenum = FFI_TYPE_UINT32; -+ if (typenum == FFI_TYPE_DOUBLE) -+ typenum = FFI_TYPE_UINT64; -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_UINT128; -+ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_STRUCT; -+#endif -+ } -+ -+ switch (typenum) { -+#ifndef __NO_FPRS__ -+ case FFI_TYPE_FLOAT: -+ /* unfortunately float values are stored as doubles -+ * in the ffi_closure_SYSV code (since we don't check -+ * the type in that routine). -+ */ -+ -+ /* there are 8 64bit floating point registers */ -+ -+ if (nf < 8) -+ { -+ double temp = pfr->d; -+ pfr->f = (float) temp; -+ avalue[i] = pfr; -+ nf++; -+ pfr++; -+ } -+ else -+ { -+ /* FIXME? here we are really changing the values -+ * stored in the original calling routines outgoing -+ * parameter stack. This is probably a really -+ * naughty thing to do but... -+ */ -+ avalue[i] = pst; -+ pst += 1; -+ } -+ break; -+ -+ case FFI_TYPE_DOUBLE: -+ /* On the outgoing stack all values are aligned to 8 */ -+ /* there are 8 64bit floating point registers */ -+ -+ if (nf < 8) -+ { -+ avalue[i] = pfr; -+ nf++; -+ pfr++; -+ } -+ else -+ { -+ if (((long) pst) & 4) -+ pst++; -+ avalue[i] = pst; -+ pst += 2; -+ } -+ break; -+ -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ case FFI_TYPE_LONGDOUBLE: -+ if (nf < 7) -+ { -+ avalue[i] = pfr; -+ pfr += 2; -+ nf += 2; -+ } -+ else -+ { -+ if (((long) pst) & 4) -+ pst++; -+ avalue[i] = pst; -+ pst += 4; -+ nf = 8; -+ } -+ break; -+#endif -+#endif /* have FPRS */ -+ -+ case FFI_TYPE_UINT128: -+ /* -+ * Test if for the whole long double, 4 gprs are available. -+ * otherwise the stuff ends up on the stack. -+ */ -+ if (ng < 5) { -+ avalue[i] = pgr; -+ pgr += 4; -+ ng += 4; -+ } else { -+ avalue[i] = pst; -+ pst += 4; -+ ng = 8+4; -+ } -+ break; -+ - case FFI_TYPE_SINT8: - case FFI_TYPE_UINT8: -+#ifndef __LITTLE_ENDIAN__ - /* there are 8 gpr registers used to pass values */ - if (ng < 8) - { -@@ -1066,9 +1460,11 @@ ffi_closure_helper_SYSV (ffi_closure *cl - pst++; - } - break; -+#endif - - case FFI_TYPE_SINT16: - case FFI_TYPE_UINT16: -+#ifndef __LITTLE_ENDIAN__ - /* there are 8 gpr registers used to pass values */ - if (ng < 8) - { -@@ -1082,11 +1478,11 @@ ffi_closure_helper_SYSV (ffi_closure *cl - pst++; - } - break; -+#endif - - case FFI_TYPE_SINT32: - case FFI_TYPE_UINT32: - case FFI_TYPE_POINTER: -- soft_float_closure: - /* there are 8 gpr registers used to pass values */ - if (ng < 8) - { -@@ -1102,9 +1498,6 @@ ffi_closure_helper_SYSV (ffi_closure *cl - break; - - case FFI_TYPE_STRUCT: --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- do_struct: --#endif - /* Structs are passed by reference. The address will appear in a - gpr if it is one of the first 8 arguments. */ - if (ng < 8) -@@ -1122,7 +1515,6 @@ ffi_closure_helper_SYSV (ffi_closure *cl - - case FFI_TYPE_SINT64: - case FFI_TYPE_UINT64: -- soft_double_closure: - /* passing long long ints are complex, they must - * be passed in suitable register pairs such as - * (r3,r4) or (r5,r6) or (r6,r7), or (r7,r8) or (r9,r10) -@@ -1154,99 +1546,8 @@ ffi_closure_helper_SYSV (ffi_closure *cl - } - break; - -- case FFI_TYPE_FLOAT: -- /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_float_closure; -- /* unfortunately float values are stored as doubles -- * in the ffi_closure_SYSV code (since we don't check -- * the type in that routine). -- */ -- -- /* there are 8 64bit floating point registers */ -- -- if (nf < 8) -- { -- temp = pfr->d; -- pfr->f = (float) temp; -- avalue[i] = pfr; -- nf++; -- pfr++; -- } -- else -- { -- /* FIXME? here we are really changing the values -- * stored in the original calling routines outgoing -- * parameter stack. This is probably a really -- * naughty thing to do but... -- */ -- avalue[i] = pst; -- pst += 1; -- } -- break; -- -- case FFI_TYPE_DOUBLE: -- /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_double_closure; -- /* On the outgoing stack all values are aligned to 8 */ -- /* there are 8 64bit floating point registers */ -- -- if (nf < 8) -- { -- avalue[i] = pfr; -- nf++; -- pfr++; -- } -- else -- { -- if (((long) pst) & 4) -- pst++; -- avalue[i] = pst; -- pst += 2; -- } -- break; -- --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- case FFI_TYPE_LONGDOUBLE: -- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) -- goto do_struct; -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- { /* Test if for the whole long double, 4 gprs are available. -- otherwise the stuff ends up on the stack. */ -- if (ng < 5) -- { -- avalue[i] = pgr; -- pgr += 4; -- ng += 4; -- } -- else -- { -- avalue[i] = pst; -- pst += 4; -- ng = 8; -- } -- break; -- } -- if (nf < 7) -- { -- avalue[i] = pfr; -- pfr += 2; -- nf += 2; -- } -- else -- { -- if (((long) pst) & 4) -- pst++; -- avalue[i] = pst; -- pst += 4; -- nf = 8; -- } -- break; --#endif -- - default: -- FFI_ASSERT (0); -+ FFI_ASSERT (0); - } - - i++; -@@ -1263,39 +1564,9 @@ ffi_closure_helper_SYSV (ffi_closure *cl - already used and we never have a struct with size zero. That is the reason - for the subtraction of 1. See the comment in ffitarget.h about ordering. - */ -- if (cif->abi == FFI_SYSV && cif->rtype->type == FFI_TYPE_STRUCT -- && size <= 8) -+ if (cif->abi == FFI_SYSV && rtypenum == FFI_TYPE_STRUCT && size <= 8) - return (FFI_SYSV_TYPE_SMALL_STRUCT - 1) + size; --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- else if (cif->rtype->type == FFI_TYPE_LONGDOUBLE -- && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) -- return FFI_TYPE_STRUCT; --#endif -- /* With FFI_LINUX_SOFT_FLOAT floats and doubles are handled like UINT32 -- respectivley UINT64. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- { -- switch (cif->rtype->type) -- { -- case FFI_TYPE_FLOAT: -- return FFI_TYPE_UINT32; -- break; -- case FFI_TYPE_DOUBLE: -- return FFI_TYPE_UINT64; -- break; --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- case FFI_TYPE_LONGDOUBLE: -- return FFI_TYPE_UINT128; -- break; --#endif -- default: -- return cif->rtype->type; -- } -- } -- else -- { -- return cif->rtype->type; -- } -+ return rtypenum; - } - - int FFI_HIDDEN ffi_closure_helper_LINUX64 (ffi_closure *, void *, -@@ -1312,16 +1583,20 @@ ffi_closure_helper_LINUX64 (ffi_closure - - void **avalue; - ffi_type **arg_types; -- long i, avn; -+ unsigned long i, avn, nfixedargs; - ffi_cif *cif; - ffi_dblfl *end_pfr = pfr + NUM_FPR_ARG_REGISTERS64; -+#ifdef __STRUCT_PARM_ALIGN__ -+ unsigned long align; -+#endif - - cif = closure->cif; - avalue = alloca (cif->nargs * sizeof (void *)); - -- /* Copy the caller's structure return value address so that the closure -- returns the data directly to the caller. */ -- if (cif->rtype->type == FFI_TYPE_STRUCT) -+ /* Copy the caller's structure return value address so that the -+ closure returns the data directly to the caller. */ -+ if (cif->rtype->type == FFI_TYPE_STRUCT -+ && (cif->flags & FLAG_RETURNS_SMST) == 0) - { - rvalue = (void *) *pst; - pst++; -@@ -1329,30 +1604,39 @@ ffi_closure_helper_LINUX64 (ffi_closure - - i = 0; - avn = cif->nargs; -+ nfixedargs = cif->nfixedargs; - arg_types = cif->arg_types; - - /* Grab the addresses of the arguments from the stack frame. */ - while (i < avn) - { -+ unsigned int elt, elnum; -+ - switch (arg_types[i]->type) - { - case FFI_TYPE_SINT8: - case FFI_TYPE_UINT8: -+#ifndef __LITTLE_ENDIAN__ - avalue[i] = (char *) pst + 7; - pst++; - break; -+#endif - - case FFI_TYPE_SINT16: - case FFI_TYPE_UINT16: -+#ifndef __LITTLE_ENDIAN__ - avalue[i] = (char *) pst + 6; - pst++; - break; -+#endif - - case FFI_TYPE_SINT32: - case FFI_TYPE_UINT32: -+#ifndef __LITTLE_ENDIAN__ - avalue[i] = (char *) pst + 4; - pst++; - break; -+#endif - - case FFI_TYPE_SINT64: - case FFI_TYPE_UINT64: -@@ -1362,12 +1646,82 @@ ffi_closure_helper_LINUX64 (ffi_closure - break; - - case FFI_TYPE_STRUCT: -- /* Structures with size less than eight bytes are passed -- left-padded. */ -- if (arg_types[i]->size < 8) -- avalue[i] = (char *) pst + 8 - arg_types[i]->size; -+#ifdef __STRUCT_PARM_ALIGN__ -+ align = arg_types[i]->alignment; -+ if (align > __STRUCT_PARM_ALIGN__) -+ align = __STRUCT_PARM_ALIGN__; -+ if (align > 1) -+ pst = (unsigned long *) ALIGN ((size_t) pst, align); -+#endif -+ elt = 0; -+#if _CALL_ELF == 2 -+ elt = discover_homogeneous_aggregate (arg_types[i], &elnum); -+#endif -+ if (elt) -+ { -+ union { -+ void *v; -+ unsigned long *ul; -+ float *f; -+ double *d; -+ size_t p; -+ } to, from; -+ -+ /* Repackage the aggregate from its parts. The -+ aggregate size is not greater than the space taken by -+ the registers so store back to the register/parameter -+ save arrays. */ -+ if (pfr + elnum <= end_pfr) -+ to.v = pfr; -+ else -+ to.v = pst; -+ -+ avalue[i] = to.v; -+ from.ul = pst; -+ if (elt == FFI_TYPE_FLOAT) -+ { -+ do -+ { -+ if (pfr < end_pfr && i < nfixedargs) -+ { -+ *to.f = (float) pfr->d; -+ pfr++; -+ } -+ else -+ *to.f = *from.f; -+ to.f++; -+ from.f++; -+ } -+ while (--elnum != 0); -+ } -+ else -+ { -+ do -+ { -+ if (pfr < end_pfr && i < nfixedargs) -+ { -+ *to.d = pfr->d; -+ pfr++; -+ } -+ else -+ *to.d = *from.d; -+ to.d++; -+ from.d++; -+ } -+ while (--elnum != 0); -+ } -+ } - else -- avalue[i] = pst; -+ { -+#ifndef __LITTLE_ENDIAN__ -+ /* Structures with size less than eight bytes are passed -+ left-padded. */ -+ if (arg_types[i]->size < 8) -+ avalue[i] = (char *) pst + 8 - arg_types[i]->size; -+ else -+#endif -+ avalue[i] = pst; -+ } - pst += (arg_types[i]->size + 7) / 8; - break; - -@@ -1379,7 +1733,7 @@ ffi_closure_helper_LINUX64 (ffi_closure - - /* there are 13 64bit floating point registers */ - -- if (pfr < end_pfr) -+ if (pfr < end_pfr && i < nfixedargs) - { - double temp = pfr->d; - pfr->f = (float) temp; -@@ -1395,7 +1749,7 @@ ffi_closure_helper_LINUX64 (ffi_closure - /* On the outgoing stack all values are aligned to 8 */ - /* there are 13 64bit floating point registers */ - -- if (pfr < end_pfr) -+ if (pfr < end_pfr && i < nfixedargs) - { - avalue[i] = pfr; - pfr++; -@@ -1407,14 +1761,14 @@ ffi_closure_helper_LINUX64 (ffi_closure - - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if (pfr + 1 < end_pfr) -+ if (pfr + 1 < end_pfr && i + 1 < nfixedargs) - { - avalue[i] = pfr; - pfr += 2; - } - else - { -- if (pfr < end_pfr) -+ if (pfr < end_pfr && i < nfixedargs) - { - /* Passed partly in f13 and partly on the stack. - Move it all to the stack. */ -@@ -1438,5 +1792,14 @@ ffi_closure_helper_LINUX64 (ffi_closure - (closure->fun) (cif, rvalue, avalue, closure->user_data); - - /* Tell ffi_closure_LINUX64 how to perform return type promotions. */ -+ if ((cif->flags & FLAG_RETURNS_SMST) != 0) -+ { -+ if ((cif->flags & FLAG_RETURNS_FP) == 0) -+ return FFI_V2_TYPE_SMALL_STRUCT + cif->rtype->size - 1; -+ else if ((cif->flags & FLAG_RETURNS_64BITS) != 0) -+ return FFI_V2_TYPE_DOUBLE_HOMOG; -+ else -+ return FFI_V2_TYPE_FLOAT_HOMOG; -+ } - return cif->rtype->type; - } -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ffitarget.h -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ffitarget.h -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ffitarget.h -@@ -1,6 +1,8 @@ - /* -----------------------------------------------------------------*-C-*- -- ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. -- Copyright (C) 2007, 2008 Free Software Foundation, Inc -+ ffitarget.h - Copyright (c) 2012 Anthony Green -+ Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc -+ Copyright (c) 1996-2003 Red Hat, Inc. -+ - Target configuration macros for PowerPC. - - Permission is hereby granted, free of charge, to any person obtaining -@@ -28,6 +30,10 @@ - #ifndef LIBFFI_TARGET_H - #define LIBFFI_TARGET_H - -+#ifndef LIBFFI_H -+#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." -+#endif -+ - /* ---- System specific configurations ----------------------------------- */ - - #if defined (POWERPC) && defined (__powerpc64__) /* linux64 */ -@@ -57,18 +63,14 @@ typedef enum ffi_abi { - FFI_LINUX64, - FFI_LINUX, - FFI_LINUX_SOFT_FLOAT, --# ifdef POWERPC64 -+# if defined(POWERPC64) - FFI_DEFAULT_ABI = FFI_LINUX64, --# else --# if (!defined(__NO_FPRS__) && (__LDBL_MANT_DIG__ == 106)) -- FFI_DEFAULT_ABI = FFI_LINUX, --# else --# ifdef __NO_FPRS__ -+# elif defined(__NO_FPRS__) - FFI_DEFAULT_ABI = FFI_LINUX_SOFT_FLOAT, --# else -+# elif (__LDBL_MANT_DIG__ == 106) -+ FFI_DEFAULT_ABI = FFI_LINUX, -+# else - FFI_DEFAULT_ABI = FFI_GCC_SYSV, --# endif --# endif - # endif - #endif - -@@ -101,6 +103,10 @@ typedef enum ffi_abi { - - #define FFI_CLOSURES 1 - #define FFI_NATIVE_RAW_API 0 -+#if defined (POWERPC) || defined (POWERPC_FREEBSD) -+# define FFI_TARGET_SPECIFIC_VARIADIC 1 -+# define FFI_EXTRA_CIF_FIELDS unsigned nfixedargs -+#endif - - /* For additional types like the below, take care about the order in - ppc_closures.S. They must follow after the FFI_TYPE_LAST. */ -@@ -113,10 +119,19 @@ typedef enum ffi_abi { - defined in ffi.c, to determine the exact return type and its size. */ - #define FFI_SYSV_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 2) - --#if defined(POWERPC64) || defined(POWERPC_AIX) --#define FFI_TRAMPOLINE_SIZE 24 --#else /* POWERPC || POWERPC_AIX */ --#define FFI_TRAMPOLINE_SIZE 40 -+/* Used by ELFv2 for homogenous structure returns. */ -+#define FFI_V2_TYPE_FLOAT_HOMOG (FFI_TYPE_LAST + 1) -+#define FFI_V2_TYPE_DOUBLE_HOMOG (FFI_TYPE_LAST + 2) -+#define FFI_V2_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 3) -+ -+#if _CALL_ELF == 2 -+# define FFI_TRAMPOLINE_SIZE 32 -+#else -+# if defined(POWERPC64) || defined(POWERPC_AIX) -+# define FFI_TRAMPOLINE_SIZE 24 -+# else /* POWERPC || POWERPC_AIX */ -+# define FFI_TRAMPOLINE_SIZE 40 -+# endif - #endif - - #ifndef LIBFFI_ASM -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64.S -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/linux64.S -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64.S -@@ -30,16 +30,33 @@ - #include - - #ifdef __powerpc64__ -- .hidden ffi_call_LINUX64, .ffi_call_LINUX64 -- .globl ffi_call_LINUX64, .ffi_call_LINUX64 -+ .hidden ffi_call_LINUX64 -+ .globl ffi_call_LINUX64 -+# if _CALL_ELF == 2 -+ .text -+ffi_call_LINUX64: -+ addis %r2, %r12, .TOC.-ffi_call_LINUX64@ha -+ addi %r2, %r2, .TOC.-ffi_call_LINUX64@l -+ .localentry ffi_call_LINUX64, . - ffi_call_LINUX64 -+# else - .section ".opd","aw" - .align 3 - ffi_call_LINUX64: -+# ifdef _CALL_LINUX -+ .quad .L.ffi_call_LINUX64,.TOC.@tocbase,0 -+ .type ffi_call_LINUX64,@function -+ .text -+.L.ffi_call_LINUX64: -+# else -+ .hidden .ffi_call_LINUX64 -+ .globl .ffi_call_LINUX64 - .quad .ffi_call_LINUX64,.TOC.@tocbase,0 - .size ffi_call_LINUX64,24 - .type .ffi_call_LINUX64,@function - .text - .ffi_call_LINUX64: -+# endif -+# endif - .LFB1: - mflr %r0 - std %r28, -32(%r1) -@@ -54,22 +71,35 @@ ffi_call_LINUX64: - mr %r31, %r5 /* flags, */ - mr %r30, %r6 /* rvalue, */ - mr %r29, %r7 /* function address. */ -+/* Save toc pointer, not for the ffi_prep_args64 call, but for the later -+ bctrl function call. */ -+# if _CALL_ELF == 2 -+ std %r2, 24(%r1) -+# else - std %r2, 40(%r1) -+# endif - - /* Call ffi_prep_args64. */ - mr %r4, %r1 -+# if defined _CALL_LINUX || _CALL_ELF == 2 -+ bl ffi_prep_args64 -+# else - bl .ffi_prep_args64 -+# endif - -- ld %r0, 0(%r29) -+# if _CALL_ELF == 2 -+ mr %r12, %r29 -+# else -+ ld %r12, 0(%r29) - ld %r2, 8(%r29) - ld %r11, 16(%r29) -- -+# endif - /* Now do the call. */ - /* Set up cr1 with bits 4-7 of the flags. */ - mtcrf 0x40, %r31 - - /* Get the address to call into CTR. */ -- mtctr %r0 -+ mtctr %r12 - /* Load all those argument registers. */ - ld %r3, -32-(8*8)(%r28) - ld %r4, -32-(7*8)(%r28) -@@ -104,12 +134,17 @@ ffi_call_LINUX64: - - /* This must follow the call immediately, the unwinder - uses this to find out if r2 has been saved or not. */ -+# if _CALL_ELF == 2 -+ ld %r2, 24(%r1) -+# else - ld %r2, 40(%r1) -+# endif - - /* Now, deal with the return value. */ - mtcrf 0x01, %r31 -- bt- 30, .Ldone_return_value -- bt- 29, .Lfp_return_value -+ bt 31, .Lstruct_return_value -+ bt 30, .Ldone_return_value -+ bt 29, .Lfp_return_value - std %r3, 0(%r30) - /* Fall through... */ - -@@ -117,7 +152,7 @@ ffi_call_LINUX64: - /* Restore the registers we used and return. */ - mr %r1, %r28 - ld %r0, 16(%r28) -- ld %r28, -32(%r1) -+ ld %r28, -32(%r28) - mtlr %r0 - ld %r29, -24(%r1) - ld %r30, -16(%r1) -@@ -134,10 +169,48 @@ ffi_call_LINUX64: - .Lfloat_return_value: - stfs %f1, 0(%r30) - b .Ldone_return_value -+ -+.Lstruct_return_value: -+ bf 29, .Lsmall_struct -+ bf 28, .Lfloat_homog_return_value -+ stfd %f1, 0(%r30) -+ stfd %f2, 8(%r30) -+ stfd %f3, 16(%r30) -+ stfd %f4, 24(%r30) -+ stfd %f5, 32(%r30) -+ stfd %f6, 40(%r30) -+ stfd %f7, 48(%r30) -+ stfd %f8, 56(%r30) -+ b .Ldone_return_value -+ -+.Lfloat_homog_return_value: -+ stfs %f1, 0(%r30) -+ stfs %f2, 4(%r30) -+ stfs %f3, 8(%r30) -+ stfs %f4, 12(%r30) -+ stfs %f5, 16(%r30) -+ stfs %f6, 20(%r30) -+ stfs %f7, 24(%r30) -+ stfs %f8, 28(%r30) -+ b .Ldone_return_value -+ -+.Lsmall_struct: -+ std %r3, 0(%r30) -+ std %r4, 8(%r30) -+ b .Ldone_return_value -+ - .LFE1: - .long 0 - .byte 0,12,0,1,128,4,0,0 -+# if _CALL_ELF == 2 -+ .size ffi_call_LINUX64,.-ffi_call_LINUX64 -+# else -+# ifdef _CALL_LINUX -+ .size ffi_call_LINUX64,.-.L.ffi_call_LINUX64 -+# else - .size .ffi_call_LINUX64,.-.ffi_call_LINUX64 -+# endif -+# endif - - .section .eh_frame,EH_FRAME_FLAGS,@progbits - .Lframe1: -@@ -180,8 +253,8 @@ ffi_call_LINUX64: - .uleb128 0x4 - .align 3 - .LEFDE1: --#endif - --#if defined __ELF__ && defined __linux__ -+# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2 - .section .note.GNU-stack,"",@progbits -+# endif - #endif -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64_closure.S -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/linux64_closure.S -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64_closure.S -@@ -32,66 +32,125 @@ - - #ifdef __powerpc64__ - FFI_HIDDEN (ffi_closure_LINUX64) -- FFI_HIDDEN (.ffi_closure_LINUX64) -- .globl ffi_closure_LINUX64, .ffi_closure_LINUX64 -+ .globl ffi_closure_LINUX64 -+# if _CALL_ELF == 2 -+ .text -+ffi_closure_LINUX64: -+ addis %r2, %r12, .TOC.-ffi_closure_LINUX64@ha -+ addi %r2, %r2, .TOC.-ffi_closure_LINUX64@l -+ .localentry ffi_closure_LINUX64, . - ffi_closure_LINUX64 -+# else - .section ".opd","aw" - .align 3 - ffi_closure_LINUX64: -+# ifdef _CALL_LINUX -+ .quad .L.ffi_closure_LINUX64,.TOC.@tocbase,0 -+ .type ffi_closure_LINUX64,@function -+ .text -+.L.ffi_closure_LINUX64: -+# else -+ FFI_HIDDEN (.ffi_closure_LINUX64) -+ .globl .ffi_closure_LINUX64 - .quad .ffi_closure_LINUX64,.TOC.@tocbase,0 - .size ffi_closure_LINUX64,24 - .type .ffi_closure_LINUX64,@function - .text - .ffi_closure_LINUX64: -+# endif -+# endif -+ -+# if _CALL_ELF == 2 -+# 32 byte special reg save area + 64 byte parm save area -+# + 64 byte retval area + 13*8 fpr save area + round to 16 -+# define STACKFRAME 272 -+# define PARMSAVE 32 -+# define RETVAL PARMSAVE+64 -+# else -+# 48 bytes special reg save area + 64 bytes parm save area -+# + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 -+# define STACKFRAME 240 -+# define PARMSAVE 48 -+# define RETVAL PARMSAVE+64 -+# endif -+ - .LFB1: -- # save general regs into parm save area -- std %r3, 48(%r1) -- std %r4, 56(%r1) -- std %r5, 64(%r1) -- std %r6, 72(%r1) -+# if _CALL_ELF == 2 -+ ld %r12, FFI_TRAMPOLINE_SIZE(%r11) # closure->cif -+ mflr %r0 -+ lwz %r12, 28(%r12) # cif->flags -+ mtcrf 0x40, %r12 -+ addi %r12, %r1, PARMSAVE -+ bt 7, .Lparmsave -+ # Our caller has not allocated a parameter save area. -+ # We need to allocate one here and use it to pass gprs to -+ # ffi_closure_helper_LINUX64. -+ addi %r12, %r1, -STACKFRAME+PARMSAVE -+.Lparmsave: -+ std %r0, 16(%r1) -+ # Save general regs into parm save area -+ std %r3, 0(%r12) -+ std %r4, 8(%r12) -+ std %r5, 16(%r12) -+ std %r6, 24(%r12) -+ std %r7, 32(%r12) -+ std %r8, 40(%r12) -+ std %r9, 48(%r12) -+ std %r10, 56(%r12) -+ -+ # load up the pointer to the parm save area -+ mr %r5, %r12 -+# else - mflr %r0 -+ # Save general regs into parm save area -+ # This is the parameter save area set up by our caller. -+ std %r3, PARMSAVE+0(%r1) -+ std %r4, PARMSAVE+8(%r1) -+ std %r5, PARMSAVE+16(%r1) -+ std %r6, PARMSAVE+24(%r1) -+ std %r7, PARMSAVE+32(%r1) -+ std %r8, PARMSAVE+40(%r1) -+ std %r9, PARMSAVE+48(%r1) -+ std %r10, PARMSAVE+56(%r1) - -- std %r7, 80(%r1) -- std %r8, 88(%r1) -- std %r9, 96(%r1) -- std %r10, 104(%r1) - std %r0, 16(%r1) - -- # mandatory 48 bytes special reg save area + 64 bytes parm save area -- # + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 -- stdu %r1, -240(%r1) --.LCFI0: -+ # load up the pointer to the parm save area -+ addi %r5, %r1, PARMSAVE -+# endif - - # next save fpr 1 to fpr 13 -- stfd %f1, 128+(0*8)(%r1) -- stfd %f2, 128+(1*8)(%r1) -- stfd %f3, 128+(2*8)(%r1) -- stfd %f4, 128+(3*8)(%r1) -- stfd %f5, 128+(4*8)(%r1) -- stfd %f6, 128+(5*8)(%r1) -- stfd %f7, 128+(6*8)(%r1) -- stfd %f8, 128+(7*8)(%r1) -- stfd %f9, 128+(8*8)(%r1) -- stfd %f10, 128+(9*8)(%r1) -- stfd %f11, 128+(10*8)(%r1) -- stfd %f12, 128+(11*8)(%r1) -- stfd %f13, 128+(12*8)(%r1) -+ stfd %f1, -104+(0*8)(%r1) -+ stfd %f2, -104+(1*8)(%r1) -+ stfd %f3, -104+(2*8)(%r1) -+ stfd %f4, -104+(3*8)(%r1) -+ stfd %f5, -104+(4*8)(%r1) -+ stfd %f6, -104+(5*8)(%r1) -+ stfd %f7, -104+(6*8)(%r1) -+ stfd %f8, -104+(7*8)(%r1) -+ stfd %f9, -104+(8*8)(%r1) -+ stfd %f10, -104+(9*8)(%r1) -+ stfd %f11, -104+(10*8)(%r1) -+ stfd %f12, -104+(11*8)(%r1) -+ stfd %f13, -104+(12*8)(%r1) - -- # set up registers for the routine that actually does the work -- # get the context pointer from the trampoline -- mr %r3, %r11 -+ # load up the pointer to the saved fpr registers */ -+ addi %r6, %r1, -104 - -- # now load up the pointer to the result storage -- addi %r4, %r1, 112 -+ # load up the pointer to the result storage -+ addi %r4, %r1, -STACKFRAME+RETVAL - -- # now load up the pointer to the parameter save area -- # in the previous frame -- addi %r5, %r1, 240 + 48 -+ stdu %r1, -STACKFRAME(%r1) -+.LCFI0: - -- # now load up the pointer to the saved fpr registers */ -- addi %r6, %r1, 128 -+ # get the context pointer from the trampoline -+ mr %r3, %r11 - - # make the call -+# if defined _CALL_LINUX || _CALL_ELF == 2 -+ bl ffi_closure_helper_LINUX64 -+# else - bl .ffi_closure_helper_LINUX64 -+# endif - .Lret: - - # now r3 contains the return type -@@ -100,10 +159,12 @@ ffi_closure_LINUX64: - - # look up the proper starting point in table - # by using return type as offset -+ ld %r0, STACKFRAME+16(%r1) -+ cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT -+ bge .Lsmall - mflr %r4 # move address of .Lret to r4 - sldi %r3, %r3, 4 # now multiply return type by 16 - addi %r4, %r4, .Lret_type0 - .Lret -- ld %r0, 240+16(%r1) - add %r3, %r3, %r4 # add contents of table to table address - mtctr %r3 - bctr # jump to it -@@ -116,85 +177,175 @@ ffi_closure_LINUX64: - .Lret_type0: - # case FFI_TYPE_VOID - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - nop - # case FFI_TYPE_INT -- lwa %r3, 112+4(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lwa %r3, RETVAL+0(%r1) -+# else -+ lwa %r3, RETVAL+4(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_FLOAT -- lfs %f1, 112+0(%r1) -+ lfs %f1, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_DOUBLE -- lfd %f1, 112+0(%r1) -+ lfd %f1, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_LONGDOUBLE -- lfd %f1, 112+0(%r1) -+ lfd %f1, RETVAL+0(%r1) - mtlr %r0 -- lfd %f2, 112+8(%r1) -+ lfd %f2, RETVAL+8(%r1) - b .Lfinish - # case FFI_TYPE_UINT8 -- lbz %r3, 112+7(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lbz %r3, RETVAL+0(%r1) -+# else -+ lbz %r3, RETVAL+7(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_SINT8 -- lbz %r3, 112+7(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lbz %r3, RETVAL+0(%r1) -+# else -+ lbz %r3, RETVAL+7(%r1) -+# endif - extsb %r3,%r3 - mtlr %r0 - b .Lfinish - # case FFI_TYPE_UINT16 -- lhz %r3, 112+6(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lhz %r3, RETVAL+0(%r1) -+# else -+ lhz %r3, RETVAL+6(%r1) -+# endif - mtlr %r0 - .Lfinish: -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_SINT16 -- lha %r3, 112+6(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lha %r3, RETVAL+0(%r1) -+# else -+ lha %r3, RETVAL+6(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_UINT32 -- lwz %r3, 112+4(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lwz %r3, RETVAL+0(%r1) -+# else -+ lwz %r3, RETVAL+4(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_SINT32 -- lwa %r3, 112+4(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lwa %r3, RETVAL+0(%r1) -+# else -+ lwa %r3, RETVAL+4(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_UINT64 -- ld %r3, 112+0(%r1) -+ ld %r3, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_SINT64 -- ld %r3, 112+0(%r1) -+ ld %r3, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_STRUCT - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - nop - # case FFI_TYPE_POINTER -- ld %r3, 112+0(%r1) -+ ld %r3, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME -+ blr -+# case FFI_V2_TYPE_FLOAT_HOMOG -+ lfs %f1, RETVAL+0(%r1) -+ lfs %f2, RETVAL+4(%r1) -+ lfs %f3, RETVAL+8(%r1) -+ b .Lmorefloat -+# case FFI_V2_TYPE_DOUBLE_HOMOG -+ lfd %f1, RETVAL+0(%r1) -+ lfd %f2, RETVAL+8(%r1) -+ lfd %f3, RETVAL+16(%r1) -+ lfd %f4, RETVAL+24(%r1) -+ mtlr %r0 -+ lfd %f5, RETVAL+32(%r1) -+ lfd %f6, RETVAL+40(%r1) -+ lfd %f7, RETVAL+48(%r1) -+ lfd %f8, RETVAL+56(%r1) -+ addi %r1, %r1, STACKFRAME -+ blr -+.Lmorefloat: -+ lfs %f4, RETVAL+12(%r1) -+ mtlr %r0 -+ lfs %f5, RETVAL+16(%r1) -+ lfs %f6, RETVAL+20(%r1) -+ lfs %f7, RETVAL+24(%r1) -+ lfs %f8, RETVAL+28(%r1) -+ addi %r1, %r1, STACKFRAME -+ blr -+.Lsmall: -+# ifdef __LITTLE_ENDIAN__ -+ ld %r3,RETVAL+0(%r1) -+ mtlr %r0 -+ ld %r4,RETVAL+8(%r1) -+ addi %r1, %r1, STACKFRAME -+ blr -+# else -+ # A struct smaller than a dword is returned in the low bits of r3 -+ # ie. right justified. Larger structs are passed left justified -+ # in r3 and r4. The return value area on the stack will have -+ # the structs as they are usually stored in memory. -+ cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT + 7 # size 8 bytes? -+ neg %r5, %r3 -+ ld %r3,RETVAL+0(%r1) -+ blt .Lsmalldown -+ mtlr %r0 -+ ld %r4,RETVAL+8(%r1) -+ addi %r1, %r1, STACKFRAME -+ blr -+.Lsmalldown: -+ addi %r5, %r5, FFI_V2_TYPE_SMALL_STRUCT + 7 -+ mtlr %r0 -+ sldi %r5, %r5, 3 -+ addi %r1, %r1, STACKFRAME -+ srd %r3, %r3, %r5 - blr --# esac -+# endif -+ - .LFE1: - .long 0 - .byte 0,12,0,1,128,0,0,0 -+# if _CALL_ELF == 2 -+ .size ffi_closure_LINUX64,.-ffi_closure_LINUX64 -+# else -+# ifdef _CALL_LINUX -+ .size ffi_closure_LINUX64,.-.L.ffi_closure_LINUX64 -+# else - .size .ffi_closure_LINUX64,.-.ffi_closure_LINUX64 -+# endif -+# endif - - .section .eh_frame,EH_FRAME_FLAGS,@progbits - .Lframe1: -@@ -223,14 +374,14 @@ ffi_closure_LINUX64: - .byte 0x2 # DW_CFA_advance_loc1 - .byte .LCFI0-.LFB1 - .byte 0xe # DW_CFA_def_cfa_offset -- .uleb128 240 -+ .uleb128 STACKFRAME - .byte 0x11 # DW_CFA_offset_extended_sf - .uleb128 0x41 - .sleb128 -2 - .align 3 - .LEFDE1: --#endif - --#if defined __ELF__ && defined __linux__ -+# if defined __ELF__ && defined __linux__ - .section .note.GNU-stack,"",@progbits -+# endif - #endif -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ppc_closure.S -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ppc_closure.S -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ppc_closure.S -@@ -122,43 +122,78 @@ ENTRY(ffi_closure_SYSV) - blr - - # case FFI_TYPE_FLOAT -+#ifndef __NO_FPRS__ - lfs %f1,112+0(%r1) - mtlr %r0 - addi %r1,%r1,144 -+#else -+ nop -+ nop -+ nop -+#endif - blr - - # case FFI_TYPE_DOUBLE -+#ifndef __NO_FPRS__ - lfd %f1,112+0(%r1) - mtlr %r0 - addi %r1,%r1,144 -+#else -+ nop -+ nop -+ nop -+#endif - blr - - # case FFI_TYPE_LONGDOUBLE -+#ifndef __NO_FPRS__ - lfd %f1,112+0(%r1) - lfd %f2,112+8(%r1) - mtlr %r0 - b .Lfinish -+#else -+ nop -+ nop -+ nop -+ blr -+#endif - - # case FFI_TYPE_UINT8 -+#ifdef __LITTLE_ENDIAN__ -+ lbz %r3,112+0(%r1) -+#else - lbz %r3,112+3(%r1) -+#endif - mtlr %r0 - addi %r1,%r1,144 - blr - - # case FFI_TYPE_SINT8 -+#ifdef __LITTLE_ENDIAN__ -+ lbz %r3,112+0(%r1) -+#else - lbz %r3,112+3(%r1) -+#endif - extsb %r3,%r3 - mtlr %r0 - b .Lfinish - - # case FFI_TYPE_UINT16 -+#ifdef __LITTLE_ENDIAN__ -+ lhz %r3,112+0(%r1) -+#else - lhz %r3,112+2(%r1) -+#endif - mtlr %r0 - addi %r1,%r1,144 - blr - - # case FFI_TYPE_SINT16 -+#ifdef __LITTLE_ENDIAN__ -+ lha %r3,112+0(%r1) -+#else - lha %r3,112+2(%r1) -+#endif - mtlr %r0 - addi %r1,%r1,144 - blr -@@ -203,7 +238,7 @@ ENTRY(ffi_closure_SYSV) - lwz %r3,112+0(%r1) - lwz %r4,112+4(%r1) - lwz %r5,112+8(%r1) -- bl .Luint128 -+ b .Luint128 - - # The return types below are only used when the ABI type is FFI_SYSV. - # case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct. -@@ -220,9 +255,15 @@ ENTRY(ffi_closure_SYSV) - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct. - lwz %r3,112+0(%r1) -+#ifdef __LITTLE_ENDIAN__ -+ mtlr %r0 -+ addi %r1,%r1,144 -+ blr -+#else - srwi %r3,%r3,8 - mtlr %r0 - b .Lfinish -+#endif - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct. - lwz %r3,112+0(%r1) -@@ -233,20 +274,35 @@ ENTRY(ffi_closure_SYSV) - # case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct. - lwz %r3,112+0(%r1) - lwz %r4,112+4(%r1) -+#ifdef __LITTLE_ENDIAN__ -+ mtlr %r0 -+ b .Lfinish -+#else - li %r5,24 - b .Lstruct567 -+#endif - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct. - lwz %r3,112+0(%r1) - lwz %r4,112+4(%r1) -+#ifdef __LITTLE_ENDIAN__ -+ mtlr %r0 -+ b .Lfinish -+#else - li %r5,16 - b .Lstruct567 -+#endif - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct. - lwz %r3,112+0(%r1) - lwz %r4,112+4(%r1) -+#ifdef __LITTLE_ENDIAN__ -+ mtlr %r0 -+ b .Lfinish -+#else - li %r5,8 - b .Lstruct567 -+#endif - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct. - lwz %r3,112+0(%r1) -@@ -254,6 +310,7 @@ ENTRY(ffi_closure_SYSV) - mtlr %r0 - b .Lfinish - -+#ifndef __LITTLE_ENDIAN__ - .Lstruct567: - subfic %r6,%r5,32 - srw %r4,%r4,%r5 -@@ -263,6 +320,7 @@ ENTRY(ffi_closure_SYSV) - mtlr %r0 - addi %r1,%r1,144 - blr -+#endif - - .Luint128: - lwz %r6,112+12(%r1) -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/sysv.S -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/sysv.S -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/sysv.S -@@ -83,6 +83,7 @@ ENTRY(ffi_call_SYSV) - nop - 1: - -+#ifndef __NO_FPRS__ - /* Load all the FP registers. */ - bf- 6,2f - lfd %f1,-16-(8*4)-(8*8)(%r28) -@@ -94,6 +95,7 @@ ENTRY(ffi_call_SYSV) - lfd %f6,-16-(8*4)-(3*8)(%r28) - lfd %f7,-16-(8*4)-(2*8)(%r28) - lfd %f8,-16-(8*4)-(1*8)(%r28) -+#endif - 2: - - /* Make the call. */ -@@ -103,7 +105,9 @@ ENTRY(ffi_call_SYSV) - mtcrf 0x01,%r31 /* cr7 */ - bt- 31,L(small_struct_return_value) - bt- 30,L(done_return_value) -+#ifndef __NO_FPRS__ - bt- 29,L(fp_return_value) -+#endif - stw %r3,0(%r30) - bf+ 28,L(done_return_value) - stw %r4,4(%r30) -@@ -124,6 +128,7 @@ L(done_return_value): - lwz %r1,0(%r1) - blr - -+#ifndef __NO_FPRS__ - L(fp_return_value): - bf 28,L(float_return_value) - stfd %f1,0(%r30) -@@ -134,21 +139,17 @@ L(fp_return_value): - L(float_return_value): - stfs %f1,0(%r30) - b L(done_return_value) -+#endif - - L(small_struct_return_value): -- extrwi %r6,%r31,2,19 /* number of bytes padding = shift/8 */ -- mtcrf 0x02,%r31 /* copy flags to cr[24:27] (cr6) */ -- extrwi %r5,%r31,5,19 /* r5 <- number of bits of padding */ -- subfic %r6,%r6,4 /* r6 <- number of useful bytes in r3 */ -- bf- 25,L(done_return_value) /* struct in r3 ? if not, done. */ --/* smst_one_register: */ -- slw %r3,%r3,%r5 /* Left-justify value in r3 */ -- mtxer %r6 /* move byte count to XER ... */ -- stswx %r3,0,%r30 /* ... and store that many bytes */ -- bf+ 26,L(done_return_value) /* struct in r3:r4 ? */ -- add %r6,%r6,%r30 /* adjust pointer */ -- stswi %r4,%r6,4 /* store last four bytes */ -- b L(done_return_value) -+ /* -+ * The C code always allocates a properly-aligned 8-byte bounce -+ * buffer to make this assembly code very simple. Just write out -+ * r3 and r4 to the buffer to allow the C code to handle the rest. -+ */ -+ stw %r3, 0(%r30) -+ stw %r4, 4(%r30) -+ b L(done_return_value) - - .LFE1: - END(ffi_call_SYSV) -Index: mozilla-release/mfbt/Endian.h -=================================================================== ---- mozilla-release.orig/mfbt/Endian.h -+++ mozilla-release/mfbt/Endian.h -@@ -91,7 +91,7 @@ - # else - # error "CPU type is unknown" - # endif --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__) - # if __LITTLE_ENDIAN__ - # define MOZ_LITTLE_ENDIAN 1 - # elif __BIG_ENDIAN__ -@@ -119,8 +119,7 @@ - * cases. - */ - #elif defined(__sparc) || defined(__sparc__) || \ -- defined(_POWER) || defined(__powerpc__) || \ -- defined(__ppc__) || defined(__hppa) || \ -+ defined(_POWER) || defined(__hppa) || \ - defined(_MIPSEB) || defined(__ARMEB__) || \ - defined(__s390__) || defined(__AARCH64EB__) || \ - (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \ -Index: mozilla-release/media/webrtc/trunk/webrtc/typedefs.h -=================================================================== ---- mozilla-release.orig/media/webrtc/trunk/webrtc/typedefs.h -+++ mozilla-release/media/webrtc/trunk/webrtc/typedefs.h -@@ -52,13 +52,23 @@ - #elif defined(__powerpc64__) - #define WEBRTC_ARCH_PPC64 1 - #define WEBRTC_ARCH_64_BITS 1 -+#ifdef __LITTLE_ENDIAN__ -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#define WEBRTC_LITTLE_ENDIAN -+#else - #define WEBRTC_ARCH_BIG_ENDIAN - #define WEBRTC_BIG_ENDIAN -+#endif - #elif defined(__ppc__) || defined(__powerpc__) - #define WEBRTC_ARCH_PPC 1 - #define WEBRTC_ARCH_32_BITS 1 -+#ifdef __LITTLE_ENDIAN__ -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#define WEBRTC_LITTLE_ENDIAN -+#else - #define WEBRTC_ARCH_BIG_ENDIAN - #define WEBRTC_BIG_ENDIAN -+#endif - #elif defined(__sparc64__) - #define WEBRTC_ARCH_SPARC 1 - #define WEBRTC_ARCH_64_BITS 1 -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/moz.build -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/moz.build -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/moz.build -@@ -206,12 +206,12 @@ if CONFIG['OS_TEST'] == 'powerpc': - 'xptcstubs_ppc_linux.cpp', - ] - --if CONFIG['OS_TEST'] == 'powerpc64': -+if CONFIG['OS_TEST'] in ('powerpc64', 'powerpc64le'): - if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'): - SOURCES += [ -- 'xptcinvoke_asm_ppc64_linux.s', -+ 'xptcinvoke_asm_ppc64_linux.S', - 'xptcinvoke_ppc64_linux.cpp', -- 'xptcstubs_asm_ppc64_linux.s', -+ 'xptcstubs_asm_ppc64_linux.S', - 'xptcstubs_ppc64_linux.cpp', - ] - -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s -+++ /dev/null -@@ -1,132 +0,0 @@ --# 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/. -- --.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4 --.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 --.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 --.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 --.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 --.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 --.set r30,30; .set r31,31 --.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 --.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 --.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 --.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 --.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 --.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 --.set f30,30; .set f31,31 -- -- --# --# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, --# uint32_t paramCount, nsXPTCVariant* params) --# -- -- .section ".toc","aw" -- .section ".text" -- .align 2 -- .globl NS_InvokeByIndex -- .section ".opd","aw" -- .align 3 --NS_InvokeByIndex: -- .quad .NS_InvokeByIndex,.TOC.@tocbase -- .previous -- .type NS_InvokeByIndex,@function --.NS_InvokeByIndex: -- mflr 0 -- std 0,16(r1) -- -- std r29,-24(r1) -- std r30,-16(r1) -- std r31,-8(r1) -- -- mr r29,r3 # Save 'that' in r29 -- mr r30,r4 # Save 'methodIndex' in r30 -- mr r31,r1 # Save old frame -- -- # Allocate stack frame with space for params. Since at least the -- # first 7 parameters (not including 'that') will be in registers, -- # we don't actually need stack space for those. We must ensure -- # that the stack remains 16-byte aligned. -- # -- # | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV | -- # | |(params)........| regs | regs | regs | -- # (r1)...........(+112)....(+128) -- # (-23*8).(-16*8).(-3*8)..(r31) -- -- # +stack frame, -unused stack params, +regs storage, +1 for alignment -- addi r7,r5,((112/8)-7+7+13+3+1) -- rldicr r7,r7,3,59 # multiply by 8 and mask with ~15 -- neg r7,r7 -- stdux r1,r1,r7 -- -- -- # Call invoke_copy_to_stack(uint64_t* gpregs, double* fpregs, -- # uint32_t paramCount, nsXPTCVariant* s, -- # uint64_t* d)) -- -- # r5, r6 are passed through intact (paramCount, params) -- # r7 (d) has to be r1+112 -- where parameters are passed on the stack. -- # r3, r4 are above that, easier to address from r31 than from r1 -- -- subi r3,r31,(23*8) # r3 --> GPRS -- subi r4,r31,(16*8) # r4 --> FPRS -- addi r7,r1,112 # r7 --> params -- bl invoke_copy_to_stack -- nop -- -- # Set up to invoke function -- -- ld r9,0(r29) # vtable (r29 is 'that') -- mr r3,r29 # self is first arg, obviously -- -- sldi r30,r30,3 # Find function descriptor -- add r9,r9,r30 -- ld r9,0(r9) -- -- ld r0,0(r9) # Actual address from fd. -- std r2,40(r1) # Save r2 (TOC pointer) -- -- mtctr 0 -- ld r11,16(r9) # Environment pointer from fd. -- ld r2,8(r9) # TOC pointer from fd. -- -- # Load FP and GP registers as required -- ld r4, -(23*8)(r31) -- ld r5, -(22*8)(r31) -- ld r6, -(21*8)(r31) -- ld r7, -(20*8)(r31) -- ld r8, -(19*8)(r31) -- ld r9, -(18*8)(r31) -- ld r10, -(17*8)(r31) -- -- lfd f1, -(16*8)(r31) -- lfd f2, -(15*8)(r31) -- lfd f3, -(14*8)(r31) -- lfd f4, -(13*8)(r31) -- lfd f5, -(12*8)(r31) -- lfd f6, -(11*8)(r31) -- lfd f7, -(10*8)(r31) -- lfd f8, -(9*8)(r31) -- lfd f9, -(8*8)(r31) -- lfd f10, -(7*8)(r31) -- lfd f11, -(6*8)(r31) -- lfd f12, -(5*8)(r31) -- lfd f13, -(4*8)(r31) -- -- bctrl # Do it -- -- ld r2,40(r1) # Load our own TOC pointer -- ld r1,0(r1) # Revert stack frame -- ld 0,16(r1) # Reload lr -- ld 29,-24(r1) # Restore NVGPRS -- ld 30,-16(r1) -- ld 31,-8(r1) -- mtlr 0 -- blr -- -- .size NS_InvokeByIndex,.-.NS_InvokeByIndex -- -- # Magic indicating no need for an executable stack -- .section .note.GNU-stack, "", @progbits ; .previous -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.S -=================================================================== ---- /dev/null -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.S -@@ -0,0 +1,167 @@ -+# 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/. -+ -+.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4 -+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 -+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 -+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 -+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 -+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 -+.set r30,30; .set r31,31 -+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 -+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 -+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 -+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 -+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 -+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 -+.set f30,30; .set f31,31 -+ -+# The ABI defines a fixed stack frame area of 4 doublewords (ELFv2) -+# or 6 doublewords (ELFv1); the last of these doublewords is used -+# as TOC pointer save area. The fixed area is followed by a parameter -+# save area of 8 doublewords (used for vararg routines), followed -+# by space for parameters passed on the stack. -+# -+# We set STACK_TOC to the offset of the TOC pointer save area, and -+# STACK_PARAMS to the offset of the first on-stack parameter. -+ -+#if _CALL_ELF == 2 -+#define STACK_TOC 24 -+#define STACK_PARAMS 96 -+#else -+#define STACK_TOC 40 -+#define STACK_PARAMS 112 -+#endif -+ -+# -+# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+# uint32_t paramCount, nsXPTCVariant* params) -+# -+ -+#if _CALL_ELF == 2 -+ .section ".text" -+ .type NS_InvokeByIndex,@function -+ .globl NS_InvokeByIndex -+ .align 2 -+NS_InvokeByIndex: -+0: addis 2,12,(.TOC.-0b)@ha -+ addi 2,2,(.TOC.-0b)@l -+ .localentry NS_InvokeByIndex,.-NS_InvokeByIndex -+#else -+ .section ".toc","aw" -+ .section ".text" -+ .align 2 -+ .globl NS_InvokeByIndex -+ .section ".opd","aw" -+ .align 3 -+NS_InvokeByIndex: -+ .quad .NS_InvokeByIndex,.TOC.@tocbase -+ .previous -+ .type NS_InvokeByIndex,@function -+.NS_InvokeByIndex: -+#endif -+ mflr 0 -+ std 0,16(r1) -+ -+ std r29,-24(r1) -+ std r30,-16(r1) -+ std r31,-8(r1) -+ -+ mr r29,r3 # Save 'that' in r29 -+ mr r30,r4 # Save 'methodIndex' in r30 -+ mr r31,r1 # Save old frame -+ -+ # Allocate stack frame with space for params. Since at least the -+ # first 7 parameters (not including 'that') will be in registers, -+ # we don't actually need stack space for those. We must ensure -+ # that the stack remains 16-byte aligned. -+ # -+ # | (fixed area + | | 7 GP | 13 FP | 3 NV | -+ # | param. save) |(params)........| regs | regs | regs | -+ # (r1)......(+STACK_PARAMS)... (-23*8).(-16*8).(-3*8)..(r31) -+ -+ # +stack frame, -unused stack params, +regs storage, +1 for alignment -+ addi r7,r5,((STACK_PARAMS/8)-7+7+13+3+1) -+ rldicr r7,r7,3,59 # multiply by 8 and mask with ~15 -+ neg r7,r7 -+ stdux r1,r1,r7 -+ -+ -+ # Call invoke_copy_to_stack(uint64_t* gpregs, double* fpregs, -+ # uint32_t paramCount, nsXPTCVariant* s, -+ # uint64_t* d)) -+ -+ # r5, r6 are passed through intact (paramCount, params) -+ # r7 (d) has to be r1+STACK_PARAMS -+ # -- where parameters are passed on the stack. -+ # r3, r4 are above that, easier to address from r31 than from r1 -+ -+ subi r3,r31,(23*8) # r3 --> GPRS -+ subi r4,r31,(16*8) # r4 --> FPRS -+ addi r7,r1,STACK_PARAMS # r7 --> params -+ bl invoke_copy_to_stack -+ nop -+ -+ # Set up to invoke function -+ -+ ld r9,0(r29) # vtable (r29 is 'that') -+ mr r3,r29 # self is first arg, obviously -+ -+ sldi r30,r30,3 # Find function descriptor -+ add r9,r9,r30 -+ ld r12,0(r9) -+ -+ std r2,STACK_TOC(r1) # Save r2 (TOC pointer) -+ -+#if _CALL_ELF == 2 -+ mtctr r12 -+#else -+ ld r0,0(r12) # Actual address from fd. -+ mtctr 0 -+ ld r11,16(r12) # Environment pointer from fd. -+ ld r2,8(r12) # TOC pointer from fd. -+#endif -+ -+ # Load FP and GP registers as required -+ ld r4, -(23*8)(r31) -+ ld r5, -(22*8)(r31) -+ ld r6, -(21*8)(r31) -+ ld r7, -(20*8)(r31) -+ ld r8, -(19*8)(r31) -+ ld r9, -(18*8)(r31) -+ ld r10, -(17*8)(r31) -+ -+ lfd f1, -(16*8)(r31) -+ lfd f2, -(15*8)(r31) -+ lfd f3, -(14*8)(r31) -+ lfd f4, -(13*8)(r31) -+ lfd f5, -(12*8)(r31) -+ lfd f6, -(11*8)(r31) -+ lfd f7, -(10*8)(r31) -+ lfd f8, -(9*8)(r31) -+ lfd f9, -(8*8)(r31) -+ lfd f10, -(7*8)(r31) -+ lfd f11, -(6*8)(r31) -+ lfd f12, -(5*8)(r31) -+ lfd f13, -(4*8)(r31) -+ -+ bctrl # Do it -+ -+ ld r2,STACK_TOC(r1) # Load our own TOC pointer -+ ld r1,0(r1) # Revert stack frame -+ ld 0,16(r1) # Reload lr -+ ld 29,-24(r1) # Restore NVGPRS -+ ld 30,-16(r1) -+ ld 31,-8(r1) -+ mtlr 0 -+ blr -+ -+#if _CALL_ELF == 2 -+ .size NS_InvokeByIndex,.-NS_InvokeByIndex -+#else -+ .size NS_InvokeByIndex,.-.NS_InvokeByIndex -+#endif -+ -+ # Magic indicating no need for an executable stack -+ .section .note.GNU-stack, "", @progbits ; .previous -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp -@@ -74,7 +74,9 @@ invoke_copy_to_stack(uint64_t* gpregs, - fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles - } else { - float *p = (float *)d; -+#ifndef __LITTLE_ENDIAN__ - p++; -+#endif - *p = s->val.f; - } - } -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s -+++ /dev/null -@@ -1,81 +0,0 @@ --# 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/. -- --.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4 --.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 --.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 --.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 --.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 --.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 --.set r30,30; .set r31,31 --.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 --.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 --.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 --.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 --.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 --.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 --.set f30,30; .set f31,31 -- -- .section ".text" -- .align 2 -- .globl SharedStub -- .section ".opd","aw" -- .align 3 -- --SharedStub: -- .quad .SharedStub,.TOC.@tocbase -- .previous -- .type SharedStub,@function -- --.SharedStub: -- mflr r0 -- -- std r4, -56(r1) # Save all GPRS -- std r5, -48(r1) -- std r6, -40(r1) -- std r7, -32(r1) -- std r8, -24(r1) -- std r9, -16(r1) -- std r10, -8(r1) -- -- stfd f13, -64(r1) # ... and FPRS -- stfd f12, -72(r1) -- stfd f11, -80(r1) -- stfd f10, -88(r1) -- stfd f9, -96(r1) -- stfd f8, -104(r1) -- stfd f7, -112(r1) -- stfd f6, -120(r1) -- stfd f5, -128(r1) -- stfd f4, -136(r1) -- stfd f3, -144(r1) -- stfd f2, -152(r1) -- stfd f1, -160(r1) -- -- subi r6,r1,56 # r6 --> gprData -- subi r7,r1,160 # r7 --> fprData -- addi r5,r1,112 # r5 --> extra stack args -- -- std r0, 16(r1) -- -- stdu r1,-288(r1) -- # r3 has the 'self' pointer -- # already -- -- mr r4,r11 # r4 is methodIndex selector, -- # passed via r11 in the -- # nsNSStubBase::StubXX() call -- -- bl PrepareAndDispatch -- nop -- -- ld 1,0(r1) # restore stack -- ld r0,16(r1) # restore LR -- mtlr r0 -- blr -- -- .size SharedStub,.-.SharedStub -- -- # Magic indicating no need for an executable stack -- .section .note.GNU-stack, "", @progbits ; .previous -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.S -=================================================================== ---- /dev/null -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.S -@@ -0,0 +1,107 @@ -+# 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/. -+ -+.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4 -+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 -+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 -+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 -+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 -+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 -+.set r30,30; .set r31,31 -+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 -+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 -+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 -+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 -+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 -+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 -+.set f30,30; .set f31,31 -+ -+#if _CALL_ELF == 2 -+#define STACK_PARAMS 96 -+#else -+#define STACK_PARAMS 112 -+#endif -+ -+#if _CALL_ELF == 2 -+ .section ".text" -+ .type SharedStub,@function -+ .globl SharedStub -+ # Make the symbol hidden so that the branch from the stub does -+ # not go via a PLT. This is not only better for performance, -+ # but may be necessary to avoid linker errors since there is -+ # no place to restore the TOC register in a sibling call. -+ .hidden SharedStub -+ .align 2 -+SharedStub: -+0: addis 2,12,(.TOC.-0b)@ha -+ addi 2,2,(.TOC.-0b)@l -+ .localentry SharedStub,.-SharedStub -+#else -+ .section ".text" -+ .align 2 -+ .globl SharedStub -+ .section ".opd","aw" -+ .align 3 -+ -+SharedStub: -+ .quad .SharedStub,.TOC.@tocbase -+ .previous -+ .type SharedStub,@function -+ -+.SharedStub: -+#endif -+ mflr r0 -+ -+ std r4, -56(r1) # Save all GPRS -+ std r5, -48(r1) -+ std r6, -40(r1) -+ std r7, -32(r1) -+ std r8, -24(r1) -+ std r9, -16(r1) -+ std r10, -8(r1) -+ -+ stfd f13, -64(r1) # ... and FPRS -+ stfd f12, -72(r1) -+ stfd f11, -80(r1) -+ stfd f10, -88(r1) -+ stfd f9, -96(r1) -+ stfd f8, -104(r1) -+ stfd f7, -112(r1) -+ stfd f6, -120(r1) -+ stfd f5, -128(r1) -+ stfd f4, -136(r1) -+ stfd f3, -144(r1) -+ stfd f2, -152(r1) -+ stfd f1, -160(r1) -+ -+ subi r6,r1,56 # r6 --> gprData -+ subi r7,r1,160 # r7 --> fprData -+ addi r5,r1,STACK_PARAMS # r5 --> extra stack args -+ -+ std r0, 16(r1) -+ -+ stdu r1,-288(r1) -+ # r3 has the 'self' pointer -+ # already -+ -+ mr r4,r11 # r4 is methodIndex selector, -+ # passed via r11 in the -+ # nsNSStubBase::StubXX() call -+ -+ bl PrepareAndDispatch -+ nop -+ -+ ld 1,0(r1) # restore stack -+ ld r0,16(r1) # restore LR -+ mtlr r0 -+ blr -+ -+#if _CALL_ELF == 2 -+ .size SharedStub,.-SharedStub -+#else -+ .size SharedStub,.-.SharedStub -+#endif -+ -+ # Magic indicating no need for an executable stack -+ .section .note.GNU-stack, "", @progbits ; .previous -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp -@@ -83,7 +83,9 @@ PrepareAndDispatch(nsXPTCStubBase* self, - dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles - else { - float *p = (float *)ap; -+#ifndef __LITTLE_ENDIAN__ - p++; -+#endif - dp->val.f = *p; - } - } else { /* integer type or pointer */ -@@ -153,6 +155,43 @@ PrepareAndDispatch(nsXPTCStubBase* self, - // etc. - // Use assembler directives to get the names right... - -+#if _CALL_ELF == 2 -+# define STUB_ENTRY(n) \ -+__asm__ ( \ -+ ".section \".text\" \n\t" \ -+ ".align 2 \n\t" \ -+ ".if "#n" < 10 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ -+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ -+ "0: addis 2,12,.TOC.-0b@ha \n\t" \ -+ "addi 2,2,.TOC.-0b@l \n\t" \ -+ ".localentry _ZN14nsXPTCStubBase5Stub"#n"Ev,.-_ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ -+ \ -+ ".elseif "#n" < 100 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ -+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ -+ "0: addis 2,12,.TOC.-0b@ha \n\t" \ -+ "addi 2,2,.TOC.-0b@l \n\t" \ -+ ".localentry _ZN14nsXPTCStubBase6Stub"#n"Ev,.-_ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ -+ \ -+ ".elseif "#n" < 1000 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ -+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ -+ "0: addis 2,12,.TOC.-0b@ha \n\t" \ -+ "addi 2,2,.TOC.-0b@l \n\t" \ -+ ".localentry _ZN14nsXPTCStubBase7Stub"#n"Ev,.-_ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ -+ \ -+ ".else \n\t" \ -+ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ -+ ".endif \n\t" \ -+ \ -+ "li 11,"#n" \n\t" \ -+ "b SharedStub \n" \ -+); -+#else - # define STUB_ENTRY(n) \ - __asm__ ( \ - ".section \".toc\",\"aw\" \n\t" \ -@@ -195,6 +234,7 @@ __asm__ ( - "li 11,"#n" \n\t" \ - "b SharedStub \n" \ - ); -+#endif - - #define SENTINEL_ENTRY(n) \ - nsresult nsXPTCStubBase::Sentinel##n() \ diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 1ceaaf2..6d680ff 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -26,7 +26,6 @@ ac_add_options --enable-libnotify ac_add_options --disable-necko-wifi ac_add_options --enable-startup-notification ac_add_options --disable-cpp-exceptions -ac_add_options --enable-shared-js ac_add_options --enable-url-classifier ac_add_options --enable-gio ac_add_options --disable-gnomevfs diff --git a/xulrunner.spec b/xulrunner.spec index da3fb6d..06161cf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 29.0 -Release: 5%{?pre_tag}%{?dist} +Version: 30.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -101,14 +101,6 @@ Patch200: mozilla-193-pkgconfig.patch Patch204: rhbz-966424.patch # Upstream patches -Patch300: mozilla-ppc64le.patch -# mbo 962488 -Patch301: firefox-aarch64-double-convertsion.patch -# mbo 963023 -Patch302: firefox-aarch64-libevent.patch -# mbo 963024 -Patch303: firefox-aarch64-xpcom.patch -Patch304: mozilla-973977.patch # --------------------------------------------------- @@ -245,17 +237,7 @@ cd %{tarballdir} %patch204 -p1 -b .966424 # Upstream patches -%ifarch ppc64le -%if 0%{?fedora} > 20 -%patch300 -p1 -b .ppc64le -%endif -%endif -%patch301 -p1 -b .aarch64-dbl -%patch302 -p1 -b .aarch64-libevent -%patch303 -p1 -b .aarch64-xpcom -%ifarch ppc64 -%patch304 -p1 -b .973977 -%endif + %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -539,6 +521,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jun 5 2014 Martin Stransky - 30.0-1 +- Update to 30.0 build 1 +- Disabled shared js + * Fri May 23 2014 Martin Stransky - 29.0-5 - Added a build fix for ppc64 - rhbz#1100495 From 8a38004b2b0d15e484a399032c73c0d27e0c87aa Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Jun 2014 12:09:22 +0200 Subject: [PATCH 412/486] Upload sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 891ef83..a387546 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -07c515fc487824f107a947d23f420e9d firefox-29.0.source.tar.bz2 +7c5433b1b58a56ce0f8d451e7217f282 firefox-30.0.source.tar.bz2 From 532901fae2c15cafc2d7e008055cdc0aa4d5936a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Jun 2014 12:25:21 +0200 Subject: [PATCH 413/486] build req --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 06161cf..51632f7 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -2,7 +2,7 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} < 19 +%if 0%{?fedora} < 20 %define system_sqlite 0 %define system_ffi 0 %else From d8024036fc6bcb29e17d1e50c8280157f2ed0a8b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 8 Jun 2014 01:58:07 -0500 Subject: [PATCH 414/486] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 51632f7..28fe40d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 30.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 30.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Thu Jun 5 2014 Martin Stransky - 30.0-1 - Update to 30.0 build 1 - Disabled shared js From 53dce40c725020682de26415e64b7f07f6b58f82 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 24 Jul 2014 22:27:53 -0500 Subject: [PATCH 415/486] Fix mozilla-config.h wrapper on aarch64 --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 28fe40d..e6e0c1c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 30.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -402,7 +402,7 @@ genheader=$* mv ${genheader}.h ${genheader}%{__isa_bits}.h cat > ${genheader}.h << EOF /* This file exists to fix multilib conflicts */ -#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) +#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__aarch64__) #include "${genheader}64.h" #else #include "${genheader}32.h" @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 25 2014 Yaakov Selkowitz - 30.0-3 +- Fix mozilla-config.h wrapper on aarch64 + * Sun Jun 08 2014 Fedora Release Engineering - 30.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 96a4e596aa2cf4b46826ca3d1e6d37b05c9dc351 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 25 Jul 2014 12:51:49 +0200 Subject: [PATCH 416/486] Update to 31.0 build 2 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index a387546..8de38a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7c5433b1b58a56ce0f8d451e7217f282 firefox-30.0.source.tar.bz2 +499b70a9f08a2291d528e87eaf8804a3 firefox-31.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index e6e0c1c..7dbcc76 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 30.0 -Release: 3%{?pre_tag}%{?dist} +Version: 31.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 25 2014 Martin Stransky - 31.0-1 +- Update to 31.0 build 2 + * Fri Jul 25 2014 Yaakov Selkowitz - 30.0-3 - Fix mozilla-config.h wrapper on aarch64 From 8d523159889b91d6c5bd635617f65b74b2fc4c04 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 11:08:00 +0000 Subject: [PATCH 417/486] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7dbcc76..09f6692 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 31.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 31.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Jul 25 2014 Martin Stransky - 31.0-1 - Update to 31.0 build 2 From 695b530a4cdf01df27d98d89ad8422882653e950 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Aug 2014 15:55:18 +0200 Subject: [PATCH 418/486] Update to 32.0 build 1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 8de38a6..4659689 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -499b70a9f08a2291d528e87eaf8804a3 firefox-31.0.source.tar.bz2 +859d0b6fe2d36b6959cf08cee4c783cc firefox-32.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 09f6692..214c724 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 31.0 -Release: 2%{?pre_tag}%{?dist} +Version: 32.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu aug 26 2014 Martin Stransky - 32.0-1 +- Update to 32.0 build 1 + * Mon Aug 18 2014 Fedora Release Engineering - 31.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From ea2e3fdf40453c1c38aa21a593e96a855895168b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Aug 2014 15:57:53 +0200 Subject: [PATCH 419/486] Update to 32.0 build 1 - changelog fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 214c724..95804dd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -521,7 +521,7 @@ fi #--------------------------------------------------------------------- %changelog -* Thu aug 26 2014 Martin Stransky - 32.0-1 +* Tue Aug 26 2014 Martin Stransky - 32.0-1 - Update to 32.0 build 1 * Mon Aug 18 2014 Fedora Release Engineering - 31.0-2 From 0526f46e39ecd70d58a74eab2217e2cd42cb6109 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 27 Aug 2014 13:50:15 +0200 Subject: [PATCH 420/486] Make -Wformat-security non-fatal --- xulrunner.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 95804dd..614025f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -346,8 +346,10 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat -Werror=format-security" +# -Werror=format-security causes build failures when -Wno-format is explicitly given +# for some sources +export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' From 6f337301cfe7a997104a8159cfa4ba9ae059ddd3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 2 Sep 2014 15:02:47 +0200 Subject: [PATCH 421/486] Build fixes - disable ion on i686 and enable on arm --- xulrunner.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 614025f..9f20cd1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -286,8 +286,8 @@ echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig -echo "ac_add_options --disable-ion" >> .mozconfig -echo "ac_add_options --disable-yarr-jit" >> .mozconfig +#echo "ac_add_options --disable-ion" >> .mozconfig +#echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv7hnl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig @@ -309,6 +309,11 @@ echo "ac_add_options --disable-yarr-jit" >> .mozconfig echo "ac_add_options --disable-webrtc" >> .mozconfig %endif +# Workaround - installation crash +%ifarch %{ix86} +echo "ac_add_options --disable-ion" >> .mozconfig +%endif + #--------------------------------------------------------------------- %build From 684b0b294b944fb0bbab96095e1607445cdb5e4b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 2 Sep 2014 15:51:14 +0200 Subject: [PATCH 422/486] build fixes --- firefox-build.patch | 11 +++++++++++ xulrunner.spec | 11 +++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 firefox-build.patch diff --git a/firefox-build.patch b/firefox-build.patch new file mode 100644 index 0000000..262337c --- /dev/null +++ b/firefox-build.patch @@ -0,0 +1,11 @@ +diff -up firefox-32.0/mozilla-release/media/libstagefright/moz.build.old firefox-32.0/mozilla-release/media/libstagefright/moz.build +--- firefox-32.0/mozilla-release/media/libstagefright/moz.build.old 2014-08-26 05:38:08.000000000 +0200 ++++ firefox-32.0/mozilla-release/media/libstagefright/moz.build 2014-08-27 15:40:12.030299348 +0200 +@@ -120,7 +120,6 @@ elif CONFIG['GNU_CXX']: + '-Wno-sign-compare' + ] + CXXFLAGS += [ +- '-Wno-format', + '-Wno-multichar', + '-Wno-sign-compare', + '-Wno-unused', diff --git a/xulrunner.spec b/xulrunner.spec index 9f20cd1..572071d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -89,6 +89,7 @@ Source21: %{name}.sh.in # build patches Patch1: xulrunner-install-dir.patch +Patch2: firefox-build.patch Patch3: mozilla-build-arm.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-24.0-jemalloc-ppc.patch @@ -229,6 +230,7 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 +%patch2 -p2 -b .build %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines @@ -351,10 +353,11 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -# -Werror=format-security causes build failures when -Wno-format is explicitly given -# for some sources -export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat" -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat" +#rhbz#1037063 +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" + +export CFLAGS="$MOZ_OPT_FLAGS" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' From 7cbd0f1cf0a13891c2eb06812782fbe0f532c40c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 Sep 2014 18:03:49 +0200 Subject: [PATCH 423/486] move /sdk/bin to xulrunner libdir --- xulrunner.spec | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 572071d..fcee488 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 32.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -272,7 +272,6 @@ echo "ac_add_options --enable-system-ffi" >> .mozconfig %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig -echo "ac_add_options --enable-dtrace" >> .mozconfig %else echo "ac_add_options --disable-debug" >> .mozconfig echo "ac_add_options --enable-optimize" >> .mozconfig @@ -288,8 +287,6 @@ echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig -#echo "ac_add_options --disable-ion" >> .mozconfig -#echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv7hnl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig @@ -435,6 +432,12 @@ for i in *.so; do done popd +# Move sdk/bin to xulrunner libdir +pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin +mv ply *.py %{mozappdir} +popd +rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin + # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d LD_CONF_FILE=xulrunner-%{__isa_bits}.conf @@ -524,13 +527,18 @@ fi %{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell -%{mozappdir}/js-gdb.py +%{mozappdir}/*.py +%dir %{mozappdir}/ply +%{mozappdir}/ply/*.py %ghost %{mozappdir}/js-gdb.pyc %ghost %{mozappdir}/js-gdb.pyo #--------------------------------------------------------------------- %changelog +* Tue Sep 9 2014 Martin Stransky - 32.0-2 +- move /sdk/bin to xulrunner libdir + * Tue Aug 26 2014 Martin Stransky - 32.0-1 - Update to 32.0 build 1 From e114c4ce35a344dd58905e61491462c9f03fea85 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 10 Sep 2014 09:45:24 +0200 Subject: [PATCH 424/486] xulrunner-devel - buid fix --- xulrunner.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index fcee488..4e7234a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -434,7 +434,7 @@ popd # Move sdk/bin to xulrunner libdir pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin -mv ply *.py %{mozappdir} +mv ply *.py $RPM_BUILD_ROOT%{mozappdir} popd rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin @@ -528,10 +528,12 @@ fi %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell %{mozappdir}/*.py +%ghost %{mozappdir}/*.pyc +%ghost %{mozappdir}/*.pyo %dir %{mozappdir}/ply %{mozappdir}/ply/*.py -%ghost %{mozappdir}/js-gdb.pyc -%ghost %{mozappdir}/js-gdb.pyo +%ghost %{mozappdir}/ply/*.pyc +%ghost %{mozappdir}/ply/*.pyo #--------------------------------------------------------------------- From 9cf1033e4f647a64d910ab1c05f7bd1483ff8904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 15 Sep 2014 11:15:37 +0200 Subject: [PATCH 425/486] backport js/src/configure.in changes for secondary arches fixes build on s390(x) and ppc64le (rhbz#1140157 and rhbz#1140159) --- ...er-32.0-backport-js-src-configure-in.patch | 92 +++++++++++++++++++ xulrunner.spec | 3 + 2 files changed, 95 insertions(+) create mode 100644 xulrunner-32.0-backport-js-src-configure-in.patch diff --git a/xulrunner-32.0-backport-js-src-configure-in.patch b/xulrunner-32.0-backport-js-src-configure-in.patch new file mode 100644 index 0000000..1172c7f --- /dev/null +++ b/xulrunner-32.0-backport-js-src-configure-in.patch @@ -0,0 +1,92 @@ +#Based on: +#https://hg.mozilla.org/mozilla-central/rev/57852745f33b +#https://hg.mozilla.org/mozilla-central/rev/926f47807112 +#https://hg.mozilla.org/mozilla-central/rev/a7b832e15a34 +--- firefox-32.0/mozilla-release/js/src/configure.in 2014-08-26 05:37:57.000000000 +0200 ++++ configure.in 2014-09-12 09:30:32.252623444 +0200 +@@ -1313,10 +1316,10 @@ + result="yes", result="no") + AC_MSG_RESULT("$result") + if test "$result" = "yes"; then +- AC_DEFINE(HAVE_64BIT_OS) +- HAVE_64BIT_OS=1 ++ AC_DEFINE(HAVE_64BIT_BUILD) ++ HAVE_64BIT_BUILD=1 + fi +-AC_SUBST(HAVE_64BIT_OS) ++AC_SUBST(HAVE_64BIT_BUILD) + AC_LANG_RESTORE + fi # COMPILE_ENVIRONMENT + +@@ -1404,7 +1407,7 @@ + *-aix*) + AC_DEFINE(AIX) + if test ! "$GNU_CC"; then +- if test ! "$HAVE_64BIT_OS"; then ++ if test ! "$HAVE_64BIT_BUILD"; then + # Compiling with Visual Age C++ object model compat is the + # default. To compile with object model ibm, add + # AIX_OBJMODEL=ibm to .mozconfig. +@@ -1748,7 +1763,7 @@ + + case "$target" in + i*86-*) +- if test "$HAVE_64BIT_OS"; then ++ if test "$HAVE_64BIT_BUILD"; then + AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.]) + fi + +@@ -1983,39 +1998,34 @@ + i?86-*) + ENABLE_ION=1 + AC_DEFINE(JS_CPU_X86) +- AC_DEFINE(JS_NUNBOX32) + ;; + x86_64*-*) + ENABLE_ION=1 + AC_DEFINE(JS_CPU_X64) +- AC_DEFINE(JS_PUNBOX64) + ;; + arm*-*) + ENABLE_ION=1 + AC_DEFINE(JS_CPU_ARM) +- AC_DEFINE(JS_NUNBOX32) + ;; +-sparc*-*) +- if test ! "$HAVE_64BIT_OS" ; then ++sparc-*) + dnl ENABLE_ION=0 + AC_DEFINE(JS_CPU_SPARC) +- AC_DEFINE(JS_NUNBOX32) +- else +- AC_DEFINE(JS_CPU_SPARC64) +- AC_DEFINE(JS_PUNBOX64) +- fi +- ;; +-powerpc64-*) +- AC_DEFINE(JS_CPU_PPC64) +- AC_DEFINE(JS_PUNBOX64) +- ;; +-powerpc-*) +- AC_DEFINE(JS_CPU_PPC) +- AC_DEFINE(JS_NUNBOX32) + ;; + mips*-*) + AC_DEFINE(JS_CPU_MIPS) +- AC_DEFINE(JS_NUNBOX32) ++ ;; ++esac ++ ++case "$target" in ++mips*-*) ++ AC_DEFINE(JS_NUNBOX32) ++ ;; ++*) ++ if test "$HAVE_64BIT_BUILD" ; then ++ AC_DEFINE(JS_PUNBOX64) ++ else ++ AC_DEFINE(JS_NUNBOX32) ++ fi + ;; + esac + diff --git a/xulrunner.spec b/xulrunner.spec index 4e7234a..d8ace62 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -95,6 +95,8 @@ Patch3: mozilla-build-arm.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch +# backport js/src/configure.in changes for secondary arches +Patch20: xulrunner-32.0-backport-js-src-configure-in.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -234,6 +236,7 @@ cd %{tarballdir} %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines +%patch20 -p2 -b .js-configure %patch200 -p2 -b .pk %patch204 -p1 -b .966424 From 7f9652e14cbf01a301ac6af8f3269a0d2f84b80f Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Mon, 8 Sep 2014 15:44:54 +0200 Subject: [PATCH 426/486] fix build on AArch64 Signed-off-by: Marcin Juszkiewicz --- xulrunner-fix-aarch64.patch | 22 ++++++++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 xulrunner-fix-aarch64.patch diff --git a/xulrunner-fix-aarch64.patch b/xulrunner-fix-aarch64.patch new file mode 100644 index 0000000..e153160 --- /dev/null +++ b/xulrunner-fix-aarch64.patch @@ -0,0 +1,22 @@ +Author: Marcin Juszkiewicz + +JS_PUNBOX64 needs to be defined for 64-bit targets. + +Upstream HEAD defines it for all 64-bit machines so no forward porting +should be needed. + +Index: mozilla-release/js/src/configure.in +=================================================================== +--- mozilla-release.orig/js/src/configure.in ++++ mozilla-release/js/src/configure.in +@@ -2017,6 +2017,10 @@ mips*-*) + AC_DEFINE(JS_CPU_MIPS) + AC_DEFINE(JS_NUNBOX32) + ;; ++aarch64*) ++ AC_DEFINE(JS_CPU_AARCH64) ++ AC_DEFINE(JS_PUNBOX64) ++ ;; + esac + + MOZ_ARG_DISABLE_BOOL(ion, diff --git a/xulrunner.spec b/xulrunner.spec index d8ace62..954cf76 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 32.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -103,6 +103,8 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch +# Let it build on AArch64 with simple backport like patch +Patch210: xulrunner-fix-aarch64.patch # Upstream patches # --------------------------------------------------- @@ -240,6 +242,7 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 +%patch210 -p1 # Upstream patches @@ -541,6 +544,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 08 2014 Marcin Juszkiewicz - 32.0-3 +- Fix build on AArch64 + * Tue Sep 9 2014 Martin Stransky - 32.0-2 - move /sdk/bin to xulrunner libdir From 3d2636a82128ca6070965ec0be4d6edbdff31fdb Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 18 Sep 2014 12:03:16 +0200 Subject: [PATCH 427/486] Fix changelog date --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 954cf76..7f02914 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -544,7 +544,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Sep 08 2014 Marcin Juszkiewicz - 32.0-3 +* Mon Sep 18 2014 Marcin Juszkiewicz - 32.0-3 - Fix build on AArch64 * Tue Sep 9 2014 Martin Stransky - 32.0-2 From 2b71a87972c6708f69e809b81188470e530ffab4 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 18 Sep 2014 15:52:29 +0200 Subject: [PATCH 428/486] Revert "Fix changelog date" This reverts commit 3d2636a82128ca6070965ec0be4d6edbdff31fdb. The patch did not apply and was not needed tue to rework in this version. Backing out. Sorry for the noise. --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7f02914..954cf76 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -544,7 +544,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Sep 18 2014 Marcin Juszkiewicz - 32.0-3 +* Mon Sep 08 2014 Marcin Juszkiewicz - 32.0-3 - Fix build on AArch64 * Tue Sep 9 2014 Martin Stransky - 32.0-2 From 6d218d94f1d45e744092494c45188e44bdc01f4e Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 18 Sep 2014 15:53:21 +0200 Subject: [PATCH 429/486] Revert "fix build on AArch64" This reverts commit 7f9652e14cbf01a301ac6af8f3269a0d2f84b80f. The patch did not apply and was not needed tue to rework in this version. Backing out. Sorry for the noise. --- xulrunner-fix-aarch64.patch | 22 ---------------------- xulrunner.spec | 8 +------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 xulrunner-fix-aarch64.patch diff --git a/xulrunner-fix-aarch64.patch b/xulrunner-fix-aarch64.patch deleted file mode 100644 index e153160..0000000 --- a/xulrunner-fix-aarch64.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Marcin Juszkiewicz - -JS_PUNBOX64 needs to be defined for 64-bit targets. - -Upstream HEAD defines it for all 64-bit machines so no forward porting -should be needed. - -Index: mozilla-release/js/src/configure.in -=================================================================== ---- mozilla-release.orig/js/src/configure.in -+++ mozilla-release/js/src/configure.in -@@ -2017,6 +2017,10 @@ mips*-*) - AC_DEFINE(JS_CPU_MIPS) - AC_DEFINE(JS_NUNBOX32) - ;; -+aarch64*) -+ AC_DEFINE(JS_CPU_AARCH64) -+ AC_DEFINE(JS_PUNBOX64) -+ ;; - esac - - MOZ_ARG_DISABLE_BOOL(ion, diff --git a/xulrunner.spec b/xulrunner.spec index 954cf76..d8ace62 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 32.0 -Release: 3%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -103,8 +103,6 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch -# Let it build on AArch64 with simple backport like patch -Patch210: xulrunner-fix-aarch64.patch # Upstream patches # --------------------------------------------------- @@ -242,7 +240,6 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 -%patch210 -p1 # Upstream patches @@ -544,9 +541,6 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Sep 08 2014 Marcin Juszkiewicz - 32.0-3 -- Fix build on AArch64 - * Tue Sep 9 2014 Martin Stransky - 32.0-2 - move /sdk/bin to xulrunner libdir From 0f5045a2d06f32905a57555ac8af5695b490d5e8 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 21 Sep 2014 07:07:33 +0100 Subject: [PATCH 430/486] Update to 32.0.2, sync fixes to the same as firefox --- firefox-baseline-disable.patch | 13 +++++++++++++ sources | 2 +- xulrunner.spec | 20 +++++++++++--------- 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 firefox-baseline-disable.patch diff --git a/firefox-baseline-disable.patch b/firefox-baseline-disable.patch new file mode 100644 index 0000000..806d378 --- /dev/null +++ b/firefox-baseline-disable.patch @@ -0,0 +1,13 @@ +diff -up firefox-32.0.1/mozilla-release/media/webrtc/trunk/Makefile.old firefox-32.0.1/mozilla-release/media/webrtc/trunk/Makefile +diff -up firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js.old firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js +--- firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js.old 2014-09-12 00:25:45.000000000 +0200 ++++ firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js 2014-09-16 14:27:52.447743192 +0200 +@@ -844,7 +844,7 @@ pref("javascript.options.strict", + #ifdef DEBUG + pref("javascript.options.strict.debug", true); + #endif +-pref("javascript.options.baselinejit", true); ++pref("javascript.options.baselinejit", false); + pref("javascript.options.ion", true); + pref("javascript.options.asmjs", true); + pref("javascript.options.native_regexp", true); diff --git a/sources b/sources index 4659689..342a402 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -859d0b6fe2d36b6959cf08cee4c783cc firefox-32.0.source.tar.bz2 +4e2d215627cbeba9d526de872dd7b3ee firefox-32.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index d8ace62..fe371a8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 32.0 -Release: 2%{?pre_tag}%{?dist} +Version: 32.0.2 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,6 +102,7 @@ Patch20: xulrunner-32.0-backport-js-src-configure-in.patch Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch +Patch207: firefox-baseline-disable.patch # Upstream patches @@ -240,6 +241,10 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 +# disable baseline JIT on i686 (rhbz#1047079) +%ifarch %{ix86} +%patch207 -p2 -b .baseline +%endif # Upstream patches @@ -296,8 +301,6 @@ echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=neon" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig -echo "ac_add_options --disable-ion" >> .mozconfig -echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv5tel echo "ac_add_options --with-arch=armv5te" >> .mozconfig @@ -311,11 +314,6 @@ echo "ac_add_options --disable-yarr-jit" >> .mozconfig echo "ac_add_options --disable-webrtc" >> .mozconfig %endif -# Workaround - installation crash -%ifarch %{ix86} -echo "ac_add_options --disable-ion" >> .mozconfig -%endif - #--------------------------------------------------------------------- %build @@ -541,6 +539,10 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Sep 20 2014 Peter Robinson 32.0.2-1 +- Update to 32.0.2 +- sync fixes to the same as firefox + * Tue Sep 9 2014 Martin Stransky - 32.0-2 - move /sdk/bin to xulrunner libdir From b3f5bd918363784f62510f4e480242133117b4df Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2014 15:45:47 +0200 Subject: [PATCH 431/486] Updated to 33.0 --- mozilla-1042889.patch | 81 ++++++++++++++++ rhbz-966424.patch | 17 +--- sources | 2 +- ...er-32.0-backport-js-src-configure-in.patch | 92 ------------------- xulrunner.spec | 11 +-- 5 files changed, 91 insertions(+), 112 deletions(-) create mode 100644 mozilla-1042889.patch delete mode 100644 xulrunner-32.0-backport-js-src-configure-in.patch diff --git a/mozilla-1042889.patch b/mozilla-1042889.patch new file mode 100644 index 0000000..6061b9b --- /dev/null +++ b/mozilla-1042889.patch @@ -0,0 +1,81 @@ +diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js +--- a/dom/browser-element/BrowserElementChildPreload.js ++++ b/dom/browser-element/BrowserElementChildPreload.js +@@ -90,16 +90,17 @@ function getErrorClass(errorCode) { + switch (NSPRCode) { + case SEC_ERROR_UNKNOWN_ISSUER: + case SEC_ERROR_UNTRUSTED_ISSUER: + case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: + case SEC_ERROR_UNTRUSTED_CERT: + case SSL_ERROR_BAD_CERT_DOMAIN: + case SEC_ERROR_EXPIRED_CERTIFICATE: + case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: ++ case SEC_ERROR_CA_CERT_INVALID: + case MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: + return Ci.nsINSSErrorsService.ERROR_CLASS_BAD_CERT; + default: + return Ci.nsINSSErrorsService.ERROR_CLASS_SSL_PROTOCOL; + } + + return null; + } +diff --git a/security/manager/ssl/src/NSSErrorsService.cpp b/security/manager/ssl/src/NSSErrorsService.cpp +--- a/security/manager/ssl/src/NSSErrorsService.cpp ++++ b/security/manager/ssl/src/NSSErrorsService.cpp +@@ -136,16 +136,17 @@ NSSErrorsService::GetErrorClass(nsresult + // Overridable errors. + case SEC_ERROR_UNKNOWN_ISSUER: + case SEC_ERROR_UNTRUSTED_ISSUER: + case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: + case SEC_ERROR_UNTRUSTED_CERT: + case SSL_ERROR_BAD_CERT_DOMAIN: + case SEC_ERROR_EXPIRED_CERTIFICATE: + case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: ++ case SEC_ERROR_CA_CERT_INVALID: + case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: + *aErrorClass = ERROR_CLASS_BAD_CERT; + break; + // Non-overridable errors. + default: + *aErrorClass = ERROR_CLASS_SSL_PROTOCOL; + break; + } +diff --git a/security/manager/ssl/src/SSLServerCertVerification.cpp b/security/manager/ssl/src/SSLServerCertVerification.cpp +--- a/security/manager/ssl/src/SSLServerCertVerification.cpp ++++ b/security/manager/ssl/src/SSLServerCertVerification.cpp +@@ -287,16 +287,17 @@ private: + + // A probe value of 1 means "no error". + uint32_t + MapCertErrorToProbeValue(PRErrorCode errorCode) + { + switch (errorCode) + { + case SEC_ERROR_UNKNOWN_ISSUER: return 2; ++ case SEC_ERROR_CA_CERT_INVALID: return 3; + case SEC_ERROR_UNTRUSTED_ISSUER: return 4; + case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: return 5; + case SEC_ERROR_UNTRUSTED_CERT: return 6; + case SEC_ERROR_INADEQUATE_KEY_USAGE: return 7; + case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: return 8; + case SSL_ERROR_BAD_CERT_DOMAIN: return 9; + case SEC_ERROR_EXPIRED_CERTIFICATE: return 10; + case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: return 11; +@@ -321,16 +322,17 @@ DetermineCertOverrideErrors(CERTCertific + MOZ_ASSERT(errorCodeMismatch == 0); + MOZ_ASSERT(errorCodeExpired == 0); + + // Assumes the error prioritization described in mozilla::pkix's + // BuildForward function. Also assumes that CERT_VerifyCertName was only + // called if CertVerifier::VerifyCert succeeded. + switch (defaultErrorCodeToReport) { + case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: ++ case SEC_ERROR_CA_CERT_INVALID: + case SEC_ERROR_UNKNOWN_ISSUER: + case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: + { + collectedErrors = nsICertOverrideService::ERROR_UNTRUSTED; + errorCodeTrust = defaultErrorCodeToReport; + + SECCertTimeValidity validity = CERT_CheckCertValidTimes(cert, now, false); + if (validity == secCertTimeUndetermined) { diff --git a/rhbz-966424.patch b/rhbz-966424.patch index c4c332e..7579d09 100644 --- a/rhbz-966424.patch +++ b/rhbz-966424.patch @@ -1,11 +1,7 @@ ---- a/toolkit/modules/CertUtils.jsm -+++ b/toolkit/modules/CertUtils.jsm -@@ -170,17 +170,19 @@ this.checkCert = - issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3); - var tokenNames = issuerCert.getAllTokenNames({}); - - if (!tokenNames || !tokenNames.some(isBuiltinToken)) - throw new Ce(certNotBuiltInErr, Cr.NS_ERROR_ABORT); +diff -up firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm +--- firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 2014-10-14 08:12:14.358697255 +0200 ++++ firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm 2014-10-14 08:17:59.962181908 +0200 +@@ -174,7 +174,9 @@ this.checkCert = } function isBuiltinToken(tokenName) { @@ -16,8 +12,3 @@ } /** - * This class implements nsIBadCertListener. Its job is to prevent "bad cert" - * security dialogs from being shown to the user. It is better to simply fail - * if the certificate is bad. See bug 304286. - * - * @param aAllowNonBuiltInCerts (optional) diff --git a/sources b/sources index 342a402..292c031 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4e2d215627cbeba9d526de872dd7b3ee firefox-32.0.2.source.tar.bz2 +b0e793898bddf4f2bc46e42a331f3383 firefox-33.0.source.tar.bz2 diff --git a/xulrunner-32.0-backport-js-src-configure-in.patch b/xulrunner-32.0-backport-js-src-configure-in.patch deleted file mode 100644 index 1172c7f..0000000 --- a/xulrunner-32.0-backport-js-src-configure-in.patch +++ /dev/null @@ -1,92 +0,0 @@ -#Based on: -#https://hg.mozilla.org/mozilla-central/rev/57852745f33b -#https://hg.mozilla.org/mozilla-central/rev/926f47807112 -#https://hg.mozilla.org/mozilla-central/rev/a7b832e15a34 ---- firefox-32.0/mozilla-release/js/src/configure.in 2014-08-26 05:37:57.000000000 +0200 -+++ configure.in 2014-09-12 09:30:32.252623444 +0200 -@@ -1313,10 +1316,10 @@ - result="yes", result="no") - AC_MSG_RESULT("$result") - if test "$result" = "yes"; then -- AC_DEFINE(HAVE_64BIT_OS) -- HAVE_64BIT_OS=1 -+ AC_DEFINE(HAVE_64BIT_BUILD) -+ HAVE_64BIT_BUILD=1 - fi --AC_SUBST(HAVE_64BIT_OS) -+AC_SUBST(HAVE_64BIT_BUILD) - AC_LANG_RESTORE - fi # COMPILE_ENVIRONMENT - -@@ -1404,7 +1407,7 @@ - *-aix*) - AC_DEFINE(AIX) - if test ! "$GNU_CC"; then -- if test ! "$HAVE_64BIT_OS"; then -+ if test ! "$HAVE_64BIT_BUILD"; then - # Compiling with Visual Age C++ object model compat is the - # default. To compile with object model ibm, add - # AIX_OBJMODEL=ibm to .mozconfig. -@@ -1748,7 +1763,7 @@ - - case "$target" in - i*86-*) -- if test "$HAVE_64BIT_OS"; then -+ if test "$HAVE_64BIT_BUILD"; then - AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.]) - fi - -@@ -1983,39 +1998,34 @@ - i?86-*) - ENABLE_ION=1 - AC_DEFINE(JS_CPU_X86) -- AC_DEFINE(JS_NUNBOX32) - ;; - x86_64*-*) - ENABLE_ION=1 - AC_DEFINE(JS_CPU_X64) -- AC_DEFINE(JS_PUNBOX64) - ;; - arm*-*) - ENABLE_ION=1 - AC_DEFINE(JS_CPU_ARM) -- AC_DEFINE(JS_NUNBOX32) - ;; --sparc*-*) -- if test ! "$HAVE_64BIT_OS" ; then -+sparc-*) - dnl ENABLE_ION=0 - AC_DEFINE(JS_CPU_SPARC) -- AC_DEFINE(JS_NUNBOX32) -- else -- AC_DEFINE(JS_CPU_SPARC64) -- AC_DEFINE(JS_PUNBOX64) -- fi -- ;; --powerpc64-*) -- AC_DEFINE(JS_CPU_PPC64) -- AC_DEFINE(JS_PUNBOX64) -- ;; --powerpc-*) -- AC_DEFINE(JS_CPU_PPC) -- AC_DEFINE(JS_NUNBOX32) - ;; - mips*-*) - AC_DEFINE(JS_CPU_MIPS) -- AC_DEFINE(JS_NUNBOX32) -+ ;; -+esac -+ -+case "$target" in -+mips*-*) -+ AC_DEFINE(JS_NUNBOX32) -+ ;; -+*) -+ if test "$HAVE_64BIT_BUILD" ; then -+ AC_DEFINE(JS_PUNBOX64) -+ else -+ AC_DEFINE(JS_NUNBOX32) -+ fi - ;; - esac - diff --git a/xulrunner.spec b/xulrunner.spec index fe371a8..afa9dc3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,7 +77,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 32.0.2 +Version: 33.0 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -95,8 +95,6 @@ Patch3: mozilla-build-arm.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch -# backport js/src/configure.in changes for secondary arches -Patch20: xulrunner-32.0-backport-js-src-configure-in.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -105,6 +103,7 @@ Patch204: rhbz-966424.patch Patch207: firefox-baseline-disable.patch # Upstream patches +Patch300: mozilla-1042889.patch # --------------------------------------------------- @@ -237,16 +236,16 @@ cd %{tarballdir} %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines -%patch20 -p2 -b .js-configure %patch200 -p2 -b .pk -%patch204 -p1 -b .966424 +%patch204 -p2 -b .966424 # disable baseline JIT on i686 (rhbz#1047079) %ifarch %{ix86} %patch207 -p2 -b .baseline %endif # Upstream patches +%patch300 -p1 -b .1042889 %{__rm} -f .mozconfig @@ -310,7 +309,7 @@ echo "ac_add_options --disable-ion" >> .mozconfig echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 armv7hl armv7hnl +%ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig %endif From 9074bae1b725e272597975b7dbba675eb89f3dc2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2014 15:49:42 +0200 Subject: [PATCH 432/486] Changelog fix --- xulrunner.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index afa9dc3..eff4b84 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -518,6 +518,9 @@ fi %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif %endif +%{mozappdir}/install_app.py +%ghost %{mozappdir}/install_app.pyc +%ghost %{mozappdir}/install_app.pyo %files devel %defattr(-,root,root,-) @@ -538,6 +541,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Oct 16 2014 Martin Stransky - 33.0-1 +- Update to 33.0 + * Sat Sep 20 2014 Peter Robinson 32.0.2-1 - Update to 32.0.2 - sync fixes to the same as firefox From 358d1af0a75f5ce75599f3994d5a99ec8d9f1d65 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2014 16:02:22 +0200 Subject: [PATCH 433/486] build fix - PRBool --- firefox-build-prbool.patch | 11 +++++++++++ xulrunner.spec | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 firefox-build-prbool.patch diff --git a/firefox-build-prbool.patch b/firefox-build-prbool.patch new file mode 100644 index 0000000..c7424ea --- /dev/null +++ b/firefox-build-prbool.patch @@ -0,0 +1,11 @@ +diff -up mozilla-release/security/certverifier/OCSPCache.h.old mozilla-release/security/certverifier/OCSPCache.h +--- mozilla-release/security/certverifier/OCSPCache.h.old 2014-10-14 12:33:46.519970732 +0200 ++++ mozilla-release/security/certverifier/OCSPCache.h 2014-10-14 12:34:44.418000625 +0200 +@@ -25,6 +25,7 @@ + #ifndef mozilla_psm_OCSPCache_h + #define mozilla_psm_OCSPCache_h + ++#include "prtypes.h" + #include "hasht.h" + #include "mozilla/Mutex.h" + #include "mozilla/Vector.h" diff --git a/xulrunner.spec b/xulrunner.spec index eff4b84..0e4119b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -95,6 +95,7 @@ Patch3: mozilla-build-arm.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch +Patch20: firefox-build-prbool.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -236,6 +237,7 @@ cd %{tarballdir} %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines +%patch20 -p1 -b .prbool %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From 1a7516497d57bed7209c0c3c545c3a57aa85477e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 17 Oct 2014 14:48:54 +0200 Subject: [PATCH 434/486] ship install_app.py script --- xulrunner.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 0e4119b..6da6da6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -399,6 +399,9 @@ DESTDIR=$RPM_BUILD_ROOT make -C objdir install %{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config +# install install_app.py +%{__cp} objdir/dist/bin/install_app.py $RPM_BUILD_ROOT%{mozappdir} + # Copy pc files (for compatibility with 1.9.1) %{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul.pc \ $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-unstable.pc @@ -523,6 +526,7 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo +%{mozappdir}/gmp-fake/* %files devel %defattr(-,root,root,-) From 1dcae4348cf559bb72866841afe1b27840c05565 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Sat, 18 Oct 2014 11:38:24 +0200 Subject: [PATCH 435/486] build fix --- xulrunner.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 6da6da6..3c10cd6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -526,7 +526,9 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo +%ifnarch %{arm} %{mozappdir}/gmp-fake/* +%endif %files devel %defattr(-,root,root,-) From 8635c3cfa2a3e9ee3c388bccb1c33394d8270860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 22 Oct 2014 17:13:39 +0200 Subject: [PATCH 436/486] - Fix filelist for secondary arches --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 3c10cd6..eacea7c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 33.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -526,7 +526,7 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo -%ifnarch %{arm} +%ifarch %{ix86} x86_64 %{mozappdir}/gmp-fake/* %endif @@ -549,6 +549,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 22 2014 Dan Horák - 33.0-2 +- Fix filelist for secondary arches + * Thu Oct 16 2014 Martin Stransky - 33.0-1 - Update to 33.0 From ae52963c0106d72be2f342a76b23954bd1b2cc23 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 6 Apr 2015 16:33:52 -0400 Subject: [PATCH 437/486] rebuild for libvpx 1.4.0 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index eacea7c..fd79c9d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 33.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -549,6 +549,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 6 2015 Tom Callaway - 33.0-3 +- rebuild for libvpx 1.4.0 + * Wed Oct 22 2014 Dan Horák - 33.0-2 - Fix filelist for secondary arches From f0c48f3d46ef01eed03dec583e0f4fd1810fd8aa Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 7 Apr 2015 15:17:40 -0400 Subject: [PATCH 438/486] stop using old compat defines --- xulrunner-33.0-libvpx-modern.patch | 12 ++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 xulrunner-33.0-libvpx-modern.patch diff --git a/xulrunner-33.0-libvpx-modern.patch b/xulrunner-33.0-libvpx-modern.patch new file mode 100644 index 0000000..52d1839 --- /dev/null +++ b/xulrunner-33.0-libvpx-modern.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc.modern xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc +--- xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc.modern 2015-04-07 15:12:34.710923016 -0400 ++++ xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc 2015-04-07 15:12:48.278838658 -0400 +@@ -180,7 +180,7 @@ int VP8EncoderImpl::InitEncode(const Vid + // Creating a wrapper to the image - setting image data to NULL. Actual + // pointer will be set in encode. Setting align to 1, as it is meaningless + // (actual memory is not allocated). +- raw_ = vpx_img_wrap(NULL, IMG_FMT_I420, codec_.width, codec_.height, ++ raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, + 1, NULL); + // populate encoder configuration with default values + if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) { diff --git a/xulrunner.spec b/xulrunner.spec index fd79c9d..09a5155 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -102,6 +102,7 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch Patch207: firefox-baseline-disable.patch +Patch208: xulrunner-33.0-libvpx-modern.patch # Upstream patches Patch300: mozilla-1042889.patch @@ -245,6 +246,7 @@ cd %{tarballdir} %ifarch %{ix86} %patch207 -p2 -b .baseline %endif +%patch208 -p2 -b .modern # Upstream patches %patch300 -p1 -b .1042889 From afc4529c2321a2e5235d4b8d43211d303c355dff Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 13:30:31 +0200 Subject: [PATCH 439/486] Update to 37.0.1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 292c031..a7e8418 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b0e793898bddf4f2bc46e42a331f3383 firefox-33.0.source.tar.bz2 +2d466d850ef9b0a71bce3b208f5f884c firefox-37.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 09a5155..b7475e3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 33.0 -Release: 3%{?pre_tag}%{?dist} +Version: 37.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -551,6 +551,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 15 2015 Martin Stransky - 37.0.1-1 +- Update to 37.0.1 + * Mon Apr 6 2015 Tom Callaway - 33.0-3 - rebuild for libvpx 1.4.0 From cf90f2c273f8f1994ae24b07aefb584c48b62729 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 14:07:31 +0200 Subject: [PATCH 440/486] Update to new version - 37.0.1 --- mozilla-1042889.patch | 81 ------------------------------ xulrunner-33.0-libvpx-modern.patch | 12 ----- xulrunner.spec | 4 -- 3 files changed, 97 deletions(-) delete mode 100644 mozilla-1042889.patch delete mode 100644 xulrunner-33.0-libvpx-modern.patch diff --git a/mozilla-1042889.patch b/mozilla-1042889.patch deleted file mode 100644 index 6061b9b..0000000 --- a/mozilla-1042889.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js ---- a/dom/browser-element/BrowserElementChildPreload.js -+++ b/dom/browser-element/BrowserElementChildPreload.js -@@ -90,16 +90,17 @@ function getErrorClass(errorCode) { - switch (NSPRCode) { - case SEC_ERROR_UNKNOWN_ISSUER: - case SEC_ERROR_UNTRUSTED_ISSUER: - case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: - case SEC_ERROR_UNTRUSTED_CERT: - case SSL_ERROR_BAD_CERT_DOMAIN: - case SEC_ERROR_EXPIRED_CERTIFICATE: - case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: -+ case SEC_ERROR_CA_CERT_INVALID: - case MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: - return Ci.nsINSSErrorsService.ERROR_CLASS_BAD_CERT; - default: - return Ci.nsINSSErrorsService.ERROR_CLASS_SSL_PROTOCOL; - } - - return null; - } -diff --git a/security/manager/ssl/src/NSSErrorsService.cpp b/security/manager/ssl/src/NSSErrorsService.cpp ---- a/security/manager/ssl/src/NSSErrorsService.cpp -+++ b/security/manager/ssl/src/NSSErrorsService.cpp -@@ -136,16 +136,17 @@ NSSErrorsService::GetErrorClass(nsresult - // Overridable errors. - case SEC_ERROR_UNKNOWN_ISSUER: - case SEC_ERROR_UNTRUSTED_ISSUER: - case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: - case SEC_ERROR_UNTRUSTED_CERT: - case SSL_ERROR_BAD_CERT_DOMAIN: - case SEC_ERROR_EXPIRED_CERTIFICATE: - case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: -+ case SEC_ERROR_CA_CERT_INVALID: - case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: - *aErrorClass = ERROR_CLASS_BAD_CERT; - break; - // Non-overridable errors. - default: - *aErrorClass = ERROR_CLASS_SSL_PROTOCOL; - break; - } -diff --git a/security/manager/ssl/src/SSLServerCertVerification.cpp b/security/manager/ssl/src/SSLServerCertVerification.cpp ---- a/security/manager/ssl/src/SSLServerCertVerification.cpp -+++ b/security/manager/ssl/src/SSLServerCertVerification.cpp -@@ -287,16 +287,17 @@ private: - - // A probe value of 1 means "no error". - uint32_t - MapCertErrorToProbeValue(PRErrorCode errorCode) - { - switch (errorCode) - { - case SEC_ERROR_UNKNOWN_ISSUER: return 2; -+ case SEC_ERROR_CA_CERT_INVALID: return 3; - case SEC_ERROR_UNTRUSTED_ISSUER: return 4; - case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: return 5; - case SEC_ERROR_UNTRUSTED_CERT: return 6; - case SEC_ERROR_INADEQUATE_KEY_USAGE: return 7; - case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: return 8; - case SSL_ERROR_BAD_CERT_DOMAIN: return 9; - case SEC_ERROR_EXPIRED_CERTIFICATE: return 10; - case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: return 11; -@@ -321,16 +322,17 @@ DetermineCertOverrideErrors(CERTCertific - MOZ_ASSERT(errorCodeMismatch == 0); - MOZ_ASSERT(errorCodeExpired == 0); - - // Assumes the error prioritization described in mozilla::pkix's - // BuildForward function. Also assumes that CERT_VerifyCertName was only - // called if CertVerifier::VerifyCert succeeded. - switch (defaultErrorCodeToReport) { - case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: -+ case SEC_ERROR_CA_CERT_INVALID: - case SEC_ERROR_UNKNOWN_ISSUER: - case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: - { - collectedErrors = nsICertOverrideService::ERROR_UNTRUSTED; - errorCodeTrust = defaultErrorCodeToReport; - - SECCertTimeValidity validity = CERT_CheckCertValidTimes(cert, now, false); - if (validity == secCertTimeUndetermined) { diff --git a/xulrunner-33.0-libvpx-modern.patch b/xulrunner-33.0-libvpx-modern.patch deleted file mode 100644 index 52d1839..0000000 --- a/xulrunner-33.0-libvpx-modern.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc.modern xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ---- xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc.modern 2015-04-07 15:12:34.710923016 -0400 -+++ xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc 2015-04-07 15:12:48.278838658 -0400 -@@ -180,7 +180,7 @@ int VP8EncoderImpl::InitEncode(const Vid - // Creating a wrapper to the image - setting image data to NULL. Actual - // pointer will be set in encode. Setting align to 1, as it is meaningless - // (actual memory is not allocated). -- raw_ = vpx_img_wrap(NULL, IMG_FMT_I420, codec_.width, codec_.height, -+ raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, - 1, NULL); - // populate encoder configuration with default values - if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) { diff --git a/xulrunner.spec b/xulrunner.spec index b7475e3..8449943 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -102,10 +102,8 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch Patch207: firefox-baseline-disable.patch -Patch208: xulrunner-33.0-libvpx-modern.patch # Upstream patches -Patch300: mozilla-1042889.patch # --------------------------------------------------- @@ -246,10 +244,8 @@ cd %{tarballdir} %ifarch %{ix86} %patch207 -p2 -b .baseline %endif -%patch208 -p2 -b .modern # Upstream patches -%patch300 -p1 -b .1042889 %{__rm} -f .mozconfig From a0e96f51f1661dfbf1b91ca6c1032c0685d21d97 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 14:37:53 +0200 Subject: [PATCH 441/486] removed unused patch --- firefox-baseline-disable.patch | 13 ------------- xulrunner.spec | 5 ----- 2 files changed, 18 deletions(-) delete mode 100644 firefox-baseline-disable.patch diff --git a/firefox-baseline-disable.patch b/firefox-baseline-disable.patch deleted file mode 100644 index 806d378..0000000 --- a/firefox-baseline-disable.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up firefox-32.0.1/mozilla-release/media/webrtc/trunk/Makefile.old firefox-32.0.1/mozilla-release/media/webrtc/trunk/Makefile -diff -up firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js.old firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js ---- firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js.old 2014-09-12 00:25:45.000000000 +0200 -+++ firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js 2014-09-16 14:27:52.447743192 +0200 -@@ -844,7 +844,7 @@ pref("javascript.options.strict", - #ifdef DEBUG - pref("javascript.options.strict.debug", true); - #endif --pref("javascript.options.baselinejit", true); -+pref("javascript.options.baselinejit", false); - pref("javascript.options.ion", true); - pref("javascript.options.asmjs", true); - pref("javascript.options.native_regexp", true); diff --git a/xulrunner.spec b/xulrunner.spec index 8449943..d2201d4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -101,7 +101,6 @@ Patch20: firefox-build-prbool.patch Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch -Patch207: firefox-baseline-disable.patch # Upstream patches @@ -240,10 +239,6 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p2 -b .966424 -# disable baseline JIT on i686 (rhbz#1047079) -%ifarch %{ix86} -%patch207 -p2 -b .baseline -%endif # Upstream patches From 27bff7ab6a4e8590980d51f2c1f15a3f6c467b68 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 15:24:57 +0200 Subject: [PATCH 442/486] removed /mozilla-xremote-client --- xulrunner.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index d2201d4..a4f5054 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -500,7 +500,6 @@ fi %{mozappdir}/components/*.manifest %{mozappdir}/omni.ja %{mozappdir}/*.so -%{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-stub From c28fb475f7fea886964493e2c49d394dbb7d52e0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 20:59:44 +0200 Subject: [PATCH 443/486] Added gmp-clearkey to provided files --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index a4f5054..281ec3c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -507,6 +507,7 @@ fi %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %{mozappdir}/plugin-container +%{mozappdir}/gmp-clearkey %if !%{?system_nss} %{mozappdir}/*.chk %endif From 3949c148c5baf5e2be95bc70d5b3aa6089a28b2a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Apr 2015 13:52:45 +0200 Subject: [PATCH 444/486] Update to 37.0.2 --- sources | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index a7e8418..1e885f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2d466d850ef9b0a71bce3b208f5f884c firefox-37.0.1.source.tar.bz2 +755c04ee31dbcd28ed4d351b67fe8a8f firefox-37.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 281ec3c..dc0b15b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,7 +77,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 37.0.1 +Version: 37.0.2 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -542,6 +542,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Apr 16 2015 Jan Horak - 37.0.2-1 +- Update to 37.0.2 + * Wed Apr 15 2015 Martin Stransky - 37.0.1-1 - Update to 37.0.1 From 5aaaab18aa9df5a3c33c8b42ac709fafbf151525 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Apr 2015 14:27:09 +0200 Subject: [PATCH 445/486] Added skia patch for arm --- aarch64-fix-skia.patch | 18 ++++++++++++++++++ mozilla-build-arm.patch | 35 +++++++++++++++++++++++------------ xulrunner.spec | 2 ++ 3 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 aarch64-fix-skia.patch diff --git a/aarch64-fix-skia.patch b/aarch64-fix-skia.patch new file mode 100644 index 0000000..4b9958d --- /dev/null +++ b/aarch64-fix-skia.patch @@ -0,0 +1,18 @@ +Based on https://github.com/google/skia/commit/b79ff56de23fef680ae7187040f2d6a9516b553d + +Index: mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/src/core/SkUtilsArm.h ++++ mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h +@@ -21,9 +21,9 @@ + #define SK_ARM_NEON_MODE_ALWAYS 1 + #define SK_ARM_NEON_MODE_DYNAMIC 2 + +-#if defined(SK_CPU_ARM32) && defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT) ++#if defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT) + # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_DYNAMIC +-#elif defined(SK_CPU_ARM32) && defined(__ARM_HAVE_NEON) || defined(SK_CPU_ARM64) ++#elif defined(__ARM_HAVE_NEON) + # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_ALWAYS + #else + # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_NONE diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index f98cbe3..86e6f2e 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,12 +1,23 @@ -diff -up firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-29.0/mozilla-release/gfx/ycbcr/moz.build ---- firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-04-22 07:27:47.000000000 +0200 -+++ firefox-29.0/mozilla-release/gfx/ycbcr/moz.build 2014-04-22 16:40:34.862849368 +0200 -@@ -61,7 +61,7 @@ else: - 'yuv_row_other.cpp', - ] - --if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: -+if CONFIG['HAVE_ARM_NEON']: - SOURCES += [ - 'yuv_row_arm.s', - ] +diff -up firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi +--- firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm 2015-03-05 11:28:19.000000000 +0100 ++++ firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi 2015-03-09 10:02:17.875243261 +0100 +@@ -235,19 +235,6 @@ + 'defines': [ + 'WEBRTC_ARCH_ARM', + ], +- 'conditions': [ +- ['arm_version==7', { +- 'defines': ['WEBRTC_ARCH_ARM_V7', +- 'WEBRTC_BUILD_NEON_LIBS'], +- 'conditions': [ +- ['arm_neon==1', { +- 'defines': ['WEBRTC_ARCH_ARM_NEON',], +- }, { +- 'defines': ['WEBRTC_DETECT_ARM_NEON',], +- }], +- ], +- }], +- ], + }], + ['os_bsd==1', { + 'defines': [ diff --git a/xulrunner.spec b/xulrunner.spec index dc0b15b..347a664 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -96,6 +96,7 @@ Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch +Patch21: aarch64-fix-skia.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -236,6 +237,7 @@ cd %{tarballdir} %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool +%patch21 -p1 -b .aarch64-fix-skia %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From 8017ba78f57ac1de352a20017c06d17740b9f4f8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Apr 2015 15:21:39 +0200 Subject: [PATCH 446/486] Enable skia by default --- xulrunner-mozconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 6d680ff..e80f39e 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -33,6 +33,7 @@ ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer ac_add_options --enable-pulseaudio +ac_add_options --enable-skia export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 From 30c26d6d0bb52a03e2e527800595b89f95397f85 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Apr 2015 17:36:41 +0200 Subject: [PATCH 447/486] Add gmp-fake also to arm --- xulrunner.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 347a664..fe66e91 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -521,9 +521,7 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo -%ifarch %{ix86} x86_64 %{mozappdir}/gmp-fake/* -%endif %files devel %defattr(-,root,root,-) From c535c4cbfa1c75d5f9b6c829d8c9ae5bb2977bb6 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 27 Apr 2015 15:43:34 +0200 Subject: [PATCH 448/486] Added skia patch for big endian platforms --- mozilla-1005535.patch | 194 ++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 196 insertions(+) create mode 100644 mozilla-1005535.patch diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch new file mode 100644 index 0000000..2f0381b --- /dev/null +++ b/mozilla-1005535.patch @@ -0,0 +1,194 @@ +# HG changeset patch +# Parent b7eb1ce0237d6125b75bc8ff1cb3afc328d6e78c +# User Steve Singer +Bug 1005535 - Get skia GPU building on big endian. + +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -8231,21 +8231,21 @@ dnl Skia + dnl ======================================================== + if test "$MOZ_ENABLE_SKIA"; then + AC_DEFINE(MOZ_ENABLE_SKIA) + AC_DEFINE(USE_SKIA) + if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then + AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) + fi + +- if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then ++# if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then + MOZ_ENABLE_SKIA_GPU=1 + AC_DEFINE(USE_SKIA_GPU) + AC_SUBST(MOZ_ENABLE_SKIA_GPU) +- fi ++# fi + fi + AC_SUBST(MOZ_ENABLE_SKIA) + + dnl ======================================================== + dnl disable xul + dnl ======================================================== + MOZ_ARG_DISABLE_BOOL(xul, + [ --disable-xul Disable XUL], +diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py +--- a/gfx/skia/generate_mozbuild.py ++++ b/gfx/skia/generate_mozbuild.py +@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ + return True + + return False + + separated = { + 'common': { + #'trunk/src/effects/gradients/SkGradientTileProc.cpp', + 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', +- 'trunk/src/ports/SkDiscardableMemory_none.cpp', ++ #'trunk/src/ports/SkDiscardableMemory_none.cpp', + 'trunk/src/ports/SkImageDecoder_empty.cpp', + 'trunk/src/ports/SkMemory_mozalloc.cpp', + # 'trunk/src/images/SkImages.cpp', + # 'trunk/src/images/SkImageRef.cpp', + # 'trunk/src/images/SkImageRef_GlobalPool.cpp', + # 'trunk/src/images/SkImageRefPool.cpp', + # 'trunk/src/images/SkImageDecoder.cpp', + # 'trunk/src/images/SkImageDecoder_Factory.cpp', +diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build +--- a/gfx/skia/moz.build ++++ b/gfx/skia/moz.build +@@ -847,17 +847,16 @@ else: + 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', + 'trunk/src/opts/SkBlitMask_opts_none.cpp', + 'trunk/src/opts/SkBlitRow_opts_none.cpp', + 'trunk/src/opts/SkBlurImage_opts_none.cpp', + 'trunk/src/opts/SkMorphology_opts_none.cpp', + 'trunk/src/opts/SkTextureCompression_opts_none.cpp', + 'trunk/src/opts/SkUtils_opts_none.cpp', + 'trunk/src/opts/SkXfermode_opts_none.cpp', +- 'trunk/src/ports/SkDiscardableMemory_none.cpp', + ] + + + # can we find a better way of dealing with asm sources? + + # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with + if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: + SOURCES += [ +diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h +--- a/gfx/skia/trunk/include/config/SkUserConfig.h ++++ b/gfx/skia/trunk/include/config/SkUserConfig.h +@@ -192,16 +192,17 @@ + + #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) + # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" + #else + # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" + #endif + + // On all platforms we have this byte order ++ + #define SK_A32_SHIFT 24 + #define SK_R32_SHIFT 16 + #define SK_G32_SHIFT 8 + #define SK_B32_SHIFT 0 + + #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 + + #define SK_SUPPORT_LEGACY_GETDEVICE +diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h +--- a/gfx/skia/trunk/include/core/SkColorPriv.h ++++ b/gfx/skia/trunk/include/core/SkColorPriv.h +@@ -27,37 +27,27 @@ + * For easier compatibility with Skia's GPU backend, we further restrict these + * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does + * not directly correspond to the same shift-order, since we have to take endianess + * into account. + * + * Here we enforce this constraint. + */ + +-#ifdef SK_CPU_BENDIAN +- #define SK_RGBA_R32_SHIFT 24 +- #define SK_RGBA_G32_SHIFT 16 +- #define SK_RGBA_B32_SHIFT 8 +- #define SK_RGBA_A32_SHIFT 0 + +- #define SK_BGRA_B32_SHIFT 24 +- #define SK_BGRA_G32_SHIFT 16 +- #define SK_BGRA_R32_SHIFT 8 +- #define SK_BGRA_A32_SHIFT 0 +-#else + #define SK_RGBA_R32_SHIFT 0 + #define SK_RGBA_G32_SHIFT 8 + #define SK_RGBA_B32_SHIFT 16 + #define SK_RGBA_A32_SHIFT 24 + + #define SK_BGRA_B32_SHIFT 0 + #define SK_BGRA_G32_SHIFT 8 + #define SK_BGRA_R32_SHIFT 16 + #define SK_BGRA_A32_SHIFT 24 +-#endif ++ + + #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) + #error "can't define PMCOLOR to be RGBA and BGRA" + #endif + + #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ + (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ + SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ +diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h +--- a/gfx/skia/trunk/include/core/SkImageInfo.h ++++ b/gfx/skia/trunk/include/core/SkImageInfo.h +@@ -83,19 +83,20 @@ enum SkColorType { + + kLastEnum_SkColorType = kIndex_8_SkColorType, + + #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) + kN32_SkColorType = kBGRA_8888_SkColorType, + #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) + kN32_SkColorType = kRGBA_8888_SkColorType, + #else +-#error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order" ++ kN32_SkColorType = kBGRA_8888_SkColorType + #endif + ++ + #ifdef SK_SUPPORT_LEGACY_N32_NAME + kPMColor_SkColorType = kN32_SkColorType + #endif + }; + + static int SkColorTypeBytesPerPixel(SkColorType ct) { + static const uint8_t gSize[] = { + 0, // Unknown +diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h +--- a/gfx/skia/trunk/include/gpu/GrTypes.h ++++ b/gfx/skia/trunk/include/gpu/GrTypes.h +@@ -304,25 +304,23 @@ enum GrPixelConfig { + * Byte order is r, g, b, a. This color format is 32 bits per channel + */ + kRGBA_float_GrPixelConfig, + kLast_GrPixelConfig = kRGBA_float_GrPixelConfig + }; + static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; + + // Aliases for pixel configs that match skia's byte order. +-#ifndef SK_CPU_LENDIAN +- #error "Skia gpu currently assumes little endian" +-#endif ++ + #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) + static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; + #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) + static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig; + #else +- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format." ++ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; + #endif + + // Returns true if the pixel config is a GPU-specific compressed format + // representation. + static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { + switch (config) { + case kETC1_GrPixelConfig: + case kLATC_GrPixelConfig: diff --git a/xulrunner.spec b/xulrunner.spec index fe66e91..a0f6160 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -97,6 +97,7 @@ Patch18: xulrunner-24.0-jemalloc-ppc.patch Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch +Patch22: mozilla-1005535.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -238,6 +239,7 @@ cd %{tarballdir} %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool %patch21 -p1 -b .aarch64-fix-skia +%patch22 -p1 -b .mozilla-1005535 %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From ea81758d7c935b28206ecfb41dec5952fa3026ef Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 27 Apr 2015 15:47:31 +0200 Subject: [PATCH 449/486] Added skia patch for big endian platforms, changelog entry and release bump --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index a0f6160..a884673 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 37.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -544,6 +544,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 27 2015 Jan Horak - 37.0.2-2 +- Added patch for big endian arches + * Thu Apr 16 2015 Jan Horak - 37.0.2-1 - Update to 37.0.2 From 0d6f3cd8d78aa2544b7bc55af98b8be2a5fa2e65 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 May 2015 13:09:09 +0200 Subject: [PATCH 450/486] Update to 38.0 Build 2 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 1e885f0..ed52843 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -755c04ee31dbcd28ed4d351b67fe8a8f firefox-37.0.2.source.tar.bz2 +d1c66ec031c0cb8aea3df7210dc6955c firefox-38.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index a884673..0ba25e0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 37.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 38.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -544,6 +544,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 7 2015 Martin Stransky - 38.0-1 +- Update to 38.0 Build 2 + * Mon Apr 27 2015 Jan Horak - 37.0.2-2 - Added patch for big endian arches From f6cc1db8651e5197ed17bc042337b6ec995fbe82 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 May 2015 13:23:15 +0200 Subject: [PATCH 451/486] patch for nss-3.18.0 --- firefox-nss-3.18.0.patch | 13 +++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 firefox-nss-3.18.0.patch diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch new file mode 100644 index 0000000..a693832 --- /dev/null +++ b/firefox-nss-3.18.0.patch @@ -0,0 +1,13 @@ +diff -up mozilla-release/configure.in.old mozilla-release/configure.in +--- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 ++++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 +@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, + _USE_SYSTEM_NSS=1 ) + + if test -n "$_USE_SYSTEM_NSS"; then +- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) ++ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) + fi + + if test -n "$MOZ_NATIVE_NSS"; then +diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile diff --git a/xulrunner.spec b/xulrunner.spec index 0ba25e0..f098a21 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -98,6 +98,7 @@ Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch22: mozilla-1005535.patch +Patch23: firefox-nss-3.18.0.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -240,6 +241,7 @@ cd %{tarballdir} %patch20 -p1 -b .prbool %patch21 -p1 -b .aarch64-fix-skia %patch22 -p1 -b .mozilla-1005535 +%patch23 -p1 -b .nss-3.18.0 %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From a361a147c0e53e6f5e30d3b7adbd4f8e576f0ca0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 May 2015 13:55:27 +0200 Subject: [PATCH 452/486] Updated file lists --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index f098a21..668377e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -525,7 +525,7 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo -%{mozappdir}/gmp-fake/* +%{mozappdir}/gmp-fake*/* %files devel %defattr(-,root,root,-) From db9aa2876275b269cea59b922763121e309857da Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 04:30:41 +0000 Subject: [PATCH 453/486] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 668377e..292bf54 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 38.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -546,6 +546,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 38.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu May 7 2015 Martin Stransky - 38.0-1 - Update to 38.0 Build 2 From efb99048087356ea193c44e781a9f56d808bf59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 8 Jul 2015 13:10:41 -0400 Subject: [PATCH 454/486] workaround build issues on s390 If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which overrides the -g1 from line above and breaks building on s390 (OOM when linking, rhbz#1238225) Workaround mis-optimization in javascipt engine on s390 (rhbz#1219542) --- rhbz-1219542-s390-build.patch | 23 +++++++++++++++++++++++ xulrunner.spec | 8 ++++++++ 2 files changed, 31 insertions(+) create mode 100644 rhbz-1219542-s390-build.patch diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch new file mode 100644 index 0000000..4f38200 --- /dev/null +++ b/rhbz-1219542-s390-build.patch @@ -0,0 +1,23 @@ +diff -up mozilla-release/js/src/configure.in.opt mozilla-release/js/src/configure.in +--- mozilla-release/js/src/configure.in.opt 2015-05-04 02:43:23.000000000 +0200 ++++ mozilla-release/js/src/configure.in 2015-05-07 14:21:07.685405039 +0200 +@@ -1492,7 +1492,7 @@ case "$host" in + *-linux*|*-kfreebsd*-gnu|*-gnu*) + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" + HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" + ;; + + *) +@@ -1674,8 +1674,8 @@ ia64*-hpux*) + # while; Intel recommends against using it. + MOZ_OPTIMIZE_FLAGS="-O2" + elif test "$GNU_CC" -o "$GNU_CXX"; then +- MOZ_PGO_OPTIMIZE_FLAGS="-O3" +- MOZ_OPTIMIZE_FLAGS="-O3" ++ MOZ_PGO_OPTIMIZE_FLAGS="-O1" ++ MOZ_OPTIMIZE_FLAGS="-O1" + if test -z "$CLANG_CC"; then + MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" + fi diff --git a/xulrunner.spec b/xulrunner.spec index 292bf54..3bbbb4b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -99,6 +99,7 @@ Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch22: mozilla-1005535.patch Patch23: firefox-nss-3.18.0.patch +Patch24: rhbz-1219542-s390-build.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -242,6 +243,9 @@ cd %{tarballdir} %patch21 -p1 -b .aarch64-fix-skia %patch22 -p1 -b .mozilla-1005535 %patch23 -p1 -b .nss-3.18.0 +%ifarch s390 +%patch24 -p1 -b .rhbz-1219542-s390 +%endif %patch200 -p2 -b .pk %patch204 -p2 -b .966424 @@ -346,6 +350,10 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') +# If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which +# overrides the -g1 from line above and breaks building on s390 +# (OOM when linking, rhbz#1238225) +export MOZ_DEBUG_FLAGS=" " %endif %ifarch s390 %{arm} ppc aarch64 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" From a0580a0bd85d367233f59e8a09e4045684d91374 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 10 Jul 2015 14:33:49 +0200 Subject: [PATCH 455/486] Update to 39.0 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index ed52843..bfecd5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d1c66ec031c0cb8aea3df7210dc6955c firefox-38.0.source.tar.bz2 +34d9841bc9b8a85aaf06e311cf1cb263 firefox-39.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 3bbbb4b..9570fd8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 38.0 -Release: 2%{?pre_tag}%{?dist} +Version: 39.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -554,6 +554,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 10 2015 Martin Stransky - 39.0-1 +- Update to 39.0 + * Fri Jun 19 2015 Fedora Release Engineering - 38.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 588fddfcfcf891ca9cd576a1c2d61aaa458950e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1=C3=AD=C4=8Dek?= Date: Tue, 21 Jul 2015 12:46:14 +0200 Subject: [PATCH 456/486] Fixed xulrunner build on fedora 23, #1243104 --- mozilla-1005535.patch | 152 +++++++--------------- mozilla-1243104.patch | 284 ++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 9 +- 3 files changed, 333 insertions(+), 112 deletions(-) create mode 100644 mozilla-1243104.patch diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch index 2f0381b..ef4f1ac 100644 --- a/mozilla-1005535.patch +++ b/mozilla-1005535.patch @@ -3,15 +3,11 @@ # User Steve Singer Bug 1005535 - Get skia GPU building on big endian. -diff --git a/configure.in b/configure.in ---- a/configure.in -+++ b/configure.in -@@ -8231,21 +8231,21 @@ dnl Skia - dnl ======================================================== - if test "$MOZ_ENABLE_SKIA"; then - AC_DEFINE(MOZ_ENABLE_SKIA) - AC_DEFINE(USE_SKIA) - if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then +Index: mozilla-release/configure.in +=================================================================== +--- mozilla-release.orig/configure.in ++++ mozilla-release/configure.in +@@ -8243,11 +8243,11 @@ if test "$MOZ_ENABLE_SKIA"; then AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) fi @@ -25,63 +21,35 @@ diff --git a/configure.in b/configure.in fi AC_SUBST(MOZ_ENABLE_SKIA) - dnl ======================================================== - dnl disable xul - dnl ======================================================== - MOZ_ARG_DISABLE_BOOL(xul, - [ --disable-xul Disable XUL], -diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py ---- a/gfx/skia/generate_mozbuild.py -+++ b/gfx/skia/generate_mozbuild.py -@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ - return True - - return False - - separated = { +Index: mozilla-release/gfx/skia/generate_mozbuild.py +=================================================================== +--- mozilla-release.orig/gfx/skia/generate_mozbuild.py ++++ mozilla-release/gfx/skia/generate_mozbuild.py +@@ -242,7 +242,6 @@ def generate_separated_sources(platform_ 'common': { #'trunk/src/effects/gradients/SkGradientTileProc.cpp', 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', - 'trunk/src/ports/SkDiscardableMemory_none.cpp', -+ #'trunk/src/ports/SkDiscardableMemory_none.cpp', 'trunk/src/ports/SkImageDecoder_empty.cpp', 'trunk/src/ports/SkMemory_mozalloc.cpp', # 'trunk/src/images/SkImages.cpp', - # 'trunk/src/images/SkImageRef.cpp', - # 'trunk/src/images/SkImageRef_GlobalPool.cpp', - # 'trunk/src/images/SkImageRefPool.cpp', - # 'trunk/src/images/SkImageDecoder.cpp', - # 'trunk/src/images/SkImageDecoder_Factory.cpp', -diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build ---- a/gfx/skia/moz.build -+++ b/gfx/skia/moz.build -@@ -847,17 +847,16 @@ else: - 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', - 'trunk/src/opts/SkBlitMask_opts_none.cpp', - 'trunk/src/opts/SkBlitRow_opts_none.cpp', - 'trunk/src/opts/SkBlurImage_opts_none.cpp', - 'trunk/src/opts/SkMorphology_opts_none.cpp', - 'trunk/src/opts/SkTextureCompression_opts_none.cpp', - 'trunk/src/opts/SkUtils_opts_none.cpp', - 'trunk/src/opts/SkXfermode_opts_none.cpp', -- 'trunk/src/ports/SkDiscardableMemory_none.cpp', - ] - - - # can we find a better way of dealing with asm sources? - - # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with - if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: - SOURCES += [ -diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h ---- a/gfx/skia/trunk/include/config/SkUserConfig.h -+++ b/gfx/skia/trunk/include/config/SkUserConfig.h -@@ -192,16 +192,17 @@ - - #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) - # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" - #else - # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" +Index: mozilla-release/gfx/skia/moz.build +=================================================================== +--- mozilla-release.orig/gfx/skia/moz.build ++++ mozilla-release/gfx/skia/moz.build +@@ -663,7 +663,6 @@ UNIFIED_SOURCES += [ + 'trunk/src/pathops/SkReduceOrder.cpp', + 'trunk/src/pipe/SkGPipeRead.cpp', + 'trunk/src/pipe/SkGPipeWrite.cpp', +- 'trunk/src/ports/SkDiscardableMemory_none.cpp', + 'trunk/src/ports/SkGlobalInitialization_default.cpp', + 'trunk/src/ports/SkImageDecoder_empty.cpp', + 'trunk/src/ports/SkMemory_mozalloc.cpp', +Index: mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/include/config/SkUserConfig.h ++++ mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h +@@ -197,6 +197,7 @@ #endif // On all platforms we have this byte order @@ -89,20 +57,11 @@ diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/inclu #define SK_A32_SHIFT 24 #define SK_R32_SHIFT 16 #define SK_G32_SHIFT 8 - #define SK_B32_SHIFT 0 - - #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 - - #define SK_SUPPORT_LEGACY_GETDEVICE -diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h ---- a/gfx/skia/trunk/include/core/SkColorPriv.h -+++ b/gfx/skia/trunk/include/core/SkColorPriv.h -@@ -27,37 +27,27 @@ - * For easier compatibility with Skia's GPU backend, we further restrict these - * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does - * not directly correspond to the same shift-order, since we have to take endianess - * into account. - * +Index: mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/include/core/SkColorPriv.h ++++ mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h +@@ -32,17 +32,7 @@ * Here we enforce this constraint. */ @@ -120,9 +79,7 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ #define SK_RGBA_R32_SHIFT 0 #define SK_RGBA_G32_SHIFT 8 #define SK_RGBA_B32_SHIFT 16 - #define SK_RGBA_A32_SHIFT 24 - - #define SK_BGRA_B32_SHIFT 0 +@@ -52,7 +42,7 @@ #define SK_BGRA_G32_SHIFT 8 #define SK_BGRA_R32_SHIFT 16 #define SK_BGRA_A32_SHIFT 24 @@ -131,20 +88,11 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) #error "can't define PMCOLOR to be RGBA and BGRA" - #endif - - #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ - (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ - SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ -diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h ---- a/gfx/skia/trunk/include/core/SkImageInfo.h -+++ b/gfx/skia/trunk/include/core/SkImageInfo.h -@@ -83,19 +83,20 @@ enum SkColorType { - - kLastEnum_SkColorType = kIndex_8_SkColorType, - - #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) - kN32_SkColorType = kBGRA_8888_SkColorType, +Index: mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/include/core/SkImageInfo.h ++++ mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h +@@ -88,9 +88,10 @@ enum SkColorType { #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) kN32_SkColorType = kRGBA_8888_SkColorType, #else @@ -156,20 +104,11 @@ diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/ #ifdef SK_SUPPORT_LEGACY_N32_NAME kPMColor_SkColorType = kN32_SkColorType #endif - }; - - static int SkColorTypeBytesPerPixel(SkColorType ct) { - static const uint8_t gSize[] = { - 0, // Unknown -diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h ---- a/gfx/skia/trunk/include/gpu/GrTypes.h -+++ b/gfx/skia/trunk/include/gpu/GrTypes.h -@@ -304,25 +304,23 @@ enum GrPixelConfig { - * Byte order is r, g, b, a. This color format is 32 bits per channel - */ - kRGBA_float_GrPixelConfig, - kLast_GrPixelConfig = kRGBA_float_GrPixelConfig - }; +Index: mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/include/gpu/GrTypes.h ++++ mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h +@@ -309,15 +309,13 @@ enum GrPixelConfig { static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; // Aliases for pixel configs that match skia's byte order. @@ -187,8 +126,3 @@ diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/G #endif // Returns true if the pixel config is a GPU-specific compressed format - // representation. - static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { - switch (config) { - case kETC1_GrPixelConfig: - case kLATC_GrPixelConfig: diff --git a/mozilla-1243104.patch b/mozilla-1243104.patch new file mode 100644 index 0000000..5736869 --- /dev/null +++ b/mozilla-1243104.patch @@ -0,0 +1,284 @@ +From e3ee5c0dbc8814f5114cdddb0f050691e7573b34 Mon Sep 17 00:00:00 2001 +From: Marcin Juszkiewicz +Date: Tue, 14 Jul 2015 21:02:13 +0200 +Subject: [PATCH] fixed build + +--- + firefox-nss-3.18.0.patch | 13 ---- + mozilla-1005535.patch | 152 ++++++++++++++--------------------------------- + xulrunner.spec | 9 ++- + 3 files changed, 49 insertions(+), 125 deletions(-) + delete mode 100644 firefox-nss-3.18.0.patch + +diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch +deleted file mode 100644 +index a693832..0000000 +--- a/firefox-nss-3.18.0.patch ++++ /dev/null +@@ -1,13 +0,0 @@ +-diff -up mozilla-release/configure.in.old mozilla-release/configure.in +---- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 +-+++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 +-@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, +- _USE_SYSTEM_NSS=1 ) +- +- if test -n "$_USE_SYSTEM_NSS"; then +-- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) +-+ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) +- fi +- +- if test -n "$MOZ_NATIVE_NSS"; then +-diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile +diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch +index 2f0381b..ef4f1ac 100644 +--- a/mozilla-1005535.patch ++++ b/mozilla-1005535.patch +@@ -3,15 +3,11 @@ + # User Steve Singer + Bug 1005535 - Get skia GPU building on big endian. + +-diff --git a/configure.in b/configure.in +---- a/configure.in +-+++ b/configure.in +-@@ -8231,21 +8231,21 @@ dnl Skia +- dnl ======================================================== +- if test "$MOZ_ENABLE_SKIA"; then +- AC_DEFINE(MOZ_ENABLE_SKIA) +- AC_DEFINE(USE_SKIA) +- if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then ++Index: mozilla-release/configure.in ++=================================================================== ++--- mozilla-release.orig/configure.in +++++ mozilla-release/configure.in ++@@ -8243,11 +8243,11 @@ if test "$MOZ_ENABLE_SKIA"; then + AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) + fi + +@@ -25,63 +21,35 @@ diff --git a/configure.in b/configure.in + fi + AC_SUBST(MOZ_ENABLE_SKIA) + +- dnl ======================================================== +- dnl disable xul +- dnl ======================================================== +- MOZ_ARG_DISABLE_BOOL(xul, +- [ --disable-xul Disable XUL], +-diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py +---- a/gfx/skia/generate_mozbuild.py +-+++ b/gfx/skia/generate_mozbuild.py +-@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ +- return True +- +- return False +- +- separated = { ++Index: mozilla-release/gfx/skia/generate_mozbuild.py ++=================================================================== ++--- mozilla-release.orig/gfx/skia/generate_mozbuild.py +++++ mozilla-release/gfx/skia/generate_mozbuild.py ++@@ -242,7 +242,6 @@ def generate_separated_sources(platform_ + 'common': { + #'trunk/src/effects/gradients/SkGradientTileProc.cpp', + 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', + - 'trunk/src/ports/SkDiscardableMemory_none.cpp', +-+ #'trunk/src/ports/SkDiscardableMemory_none.cpp', + 'trunk/src/ports/SkImageDecoder_empty.cpp', + 'trunk/src/ports/SkMemory_mozalloc.cpp', + # 'trunk/src/images/SkImages.cpp', +- # 'trunk/src/images/SkImageRef.cpp', +- # 'trunk/src/images/SkImageRef_GlobalPool.cpp', +- # 'trunk/src/images/SkImageRefPool.cpp', +- # 'trunk/src/images/SkImageDecoder.cpp', +- # 'trunk/src/images/SkImageDecoder_Factory.cpp', +-diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build +---- a/gfx/skia/moz.build +-+++ b/gfx/skia/moz.build +-@@ -847,17 +847,16 @@ else: +- 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', +- 'trunk/src/opts/SkBlitMask_opts_none.cpp', +- 'trunk/src/opts/SkBlitRow_opts_none.cpp', +- 'trunk/src/opts/SkBlurImage_opts_none.cpp', +- 'trunk/src/opts/SkMorphology_opts_none.cpp', +- 'trunk/src/opts/SkTextureCompression_opts_none.cpp', +- 'trunk/src/opts/SkUtils_opts_none.cpp', +- 'trunk/src/opts/SkXfermode_opts_none.cpp', +-- 'trunk/src/ports/SkDiscardableMemory_none.cpp', +- ] +- +- +- # can we find a better way of dealing with asm sources? +- +- # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with +- if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: +- SOURCES += [ +-diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h +---- a/gfx/skia/trunk/include/config/SkUserConfig.h +-+++ b/gfx/skia/trunk/include/config/SkUserConfig.h +-@@ -192,16 +192,17 @@ +- +- #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) +- # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" +- #else +- # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" ++Index: mozilla-release/gfx/skia/moz.build ++=================================================================== ++--- mozilla-release.orig/gfx/skia/moz.build +++++ mozilla-release/gfx/skia/moz.build ++@@ -663,7 +663,6 @@ UNIFIED_SOURCES += [ ++ 'trunk/src/pathops/SkReduceOrder.cpp', ++ 'trunk/src/pipe/SkGPipeRead.cpp', ++ 'trunk/src/pipe/SkGPipeWrite.cpp', ++- 'trunk/src/ports/SkDiscardableMemory_none.cpp', ++ 'trunk/src/ports/SkGlobalInitialization_default.cpp', ++ 'trunk/src/ports/SkImageDecoder_empty.cpp', ++ 'trunk/src/ports/SkMemory_mozalloc.cpp', ++Index: mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h ++=================================================================== ++--- mozilla-release.orig/gfx/skia/trunk/include/config/SkUserConfig.h +++++ mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h ++@@ -197,6 +197,7 @@ + #endif + + // On all platforms we have this byte order +@@ -89,20 +57,11 @@ diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/inclu + #define SK_A32_SHIFT 24 + #define SK_R32_SHIFT 16 + #define SK_G32_SHIFT 8 +- #define SK_B32_SHIFT 0 +- +- #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 +- +- #define SK_SUPPORT_LEGACY_GETDEVICE +-diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h +---- a/gfx/skia/trunk/include/core/SkColorPriv.h +-+++ b/gfx/skia/trunk/include/core/SkColorPriv.h +-@@ -27,37 +27,27 @@ +- * For easier compatibility with Skia's GPU backend, we further restrict these +- * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does +- * not directly correspond to the same shift-order, since we have to take endianess +- * into account. +- * ++Index: mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h ++=================================================================== ++--- mozilla-release.orig/gfx/skia/trunk/include/core/SkColorPriv.h +++++ mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h ++@@ -32,17 +32,7 @@ + * Here we enforce this constraint. + */ + +@@ -120,9 +79,7 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ + #define SK_RGBA_R32_SHIFT 0 + #define SK_RGBA_G32_SHIFT 8 + #define SK_RGBA_B32_SHIFT 16 +- #define SK_RGBA_A32_SHIFT 24 +- +- #define SK_BGRA_B32_SHIFT 0 ++@@ -52,7 +42,7 @@ + #define SK_BGRA_G32_SHIFT 8 + #define SK_BGRA_R32_SHIFT 16 + #define SK_BGRA_A32_SHIFT 24 +@@ -131,20 +88,11 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ + + #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) + #error "can't define PMCOLOR to be RGBA and BGRA" +- #endif +- +- #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ +- (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ +- SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ +-diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h +---- a/gfx/skia/trunk/include/core/SkImageInfo.h +-+++ b/gfx/skia/trunk/include/core/SkImageInfo.h +-@@ -83,19 +83,20 @@ enum SkColorType { +- +- kLastEnum_SkColorType = kIndex_8_SkColorType, +- +- #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) +- kN32_SkColorType = kBGRA_8888_SkColorType, ++Index: mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h ++=================================================================== ++--- mozilla-release.orig/gfx/skia/trunk/include/core/SkImageInfo.h +++++ mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h ++@@ -88,9 +88,10 @@ enum SkColorType { + #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) + kN32_SkColorType = kRGBA_8888_SkColorType, + #else +@@ -156,20 +104,11 @@ diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/ + #ifdef SK_SUPPORT_LEGACY_N32_NAME + kPMColor_SkColorType = kN32_SkColorType + #endif +- }; +- +- static int SkColorTypeBytesPerPixel(SkColorType ct) { +- static const uint8_t gSize[] = { +- 0, // Unknown +-diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h +---- a/gfx/skia/trunk/include/gpu/GrTypes.h +-+++ b/gfx/skia/trunk/include/gpu/GrTypes.h +-@@ -304,25 +304,23 @@ enum GrPixelConfig { +- * Byte order is r, g, b, a. This color format is 32 bits per channel +- */ +- kRGBA_float_GrPixelConfig, +- kLast_GrPixelConfig = kRGBA_float_GrPixelConfig +- }; ++Index: mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h ++=================================================================== ++--- mozilla-release.orig/gfx/skia/trunk/include/gpu/GrTypes.h +++++ mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h ++@@ -309,15 +309,13 @@ enum GrPixelConfig { + static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; + + // Aliases for pixel configs that match skia's byte order. +@@ -187,8 +126,3 @@ diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/G + #endif + + // Returns true if the pixel config is a GPU-specific compressed format +- // representation. +- static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { +- switch (config) { +- case kETC1_GrPixelConfig: +- case kLATC_GrPixelConfig: +diff --git a/xulrunner.spec b/xulrunner.spec +index 9570fd8..e9447b3 100644 +--- a/xulrunner.spec ++++ b/xulrunner.spec +@@ -78,7 +78,7 @@ + Summary: XUL Runtime for Gecko Applications + Name: xulrunner + Version: 39.0 +-Release: 1%{?pre_tag}%{?dist} ++Release: 2%{?pre_tag}%{?dist} + URL: http://developer.mozilla.org/En/XULRunner + License: MPLv1.1 or GPLv2+ or LGPLv2+ + Group: Applications/Internet +@@ -98,7 +98,6 @@ Patch19: xulrunner-24.0-s390-inlines.patch + Patch20: firefox-build-prbool.patch + Patch21: aarch64-fix-skia.patch + Patch22: mozilla-1005535.patch +-Patch23: firefox-nss-3.18.0.patch + Patch24: rhbz-1219542-s390-build.patch + + # Fedora specific patches +@@ -242,7 +241,6 @@ cd %{tarballdir} + %patch20 -p1 -b .prbool + %patch21 -p1 -b .aarch64-fix-skia + %patch22 -p1 -b .mozilla-1005535 +-%patch23 -p1 -b .nss-3.18.0 + %ifarch s390 + %patch24 -p1 -b .rhbz-1219542-s390 + %endif +@@ -554,6 +552,11 @@ fi + #--------------------------------------------------------------------- + + %changelog ++* Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 ++- fixed build ++ - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available ++ - refreshed mozilla-1005535.patch patch to apply ++ + * Fri Jul 10 2015 Martin Stransky - 39.0-1 + - Update to 39.0 + +-- +2.4.5 + diff --git a/xulrunner.spec b/xulrunner.spec index 9570fd8..e9447b3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 39.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -98,7 +98,6 @@ Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch22: mozilla-1005535.patch -Patch23: firefox-nss-3.18.0.patch Patch24: rhbz-1219542-s390-build.patch # Fedora specific patches @@ -242,7 +241,6 @@ cd %{tarballdir} %patch20 -p1 -b .prbool %patch21 -p1 -b .aarch64-fix-skia %patch22 -p1 -b .mozilla-1005535 -%patch23 -p1 -b .nss-3.18.0 %ifarch s390 %patch24 -p1 -b .rhbz-1219542-s390 %endif @@ -554,6 +552,11 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 +- fixed build + - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available + - refreshed mozilla-1005535.patch patch to apply + * Fri Jul 10 2015 Martin Stransky - 39.0-1 - Update to 39.0 From f5c38e0137e78377fc3e55726551b314567ffbdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1=C3=AD=C4=8Dek?= Date: Wed, 22 Jul 2015 14:09:49 +0200 Subject: [PATCH 457/486] Removed unneeded patch files --- firefox-nss-3.18.0.patch | 13 -- mozilla-1243104.patch | 284 --------------------------------------- xulrunner.spec | 5 +- 3 files changed, 4 insertions(+), 298 deletions(-) delete mode 100644 firefox-nss-3.18.0.patch delete mode 100644 mozilla-1243104.patch diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch deleted file mode 100644 index a693832..0000000 --- a/firefox-nss-3.18.0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mozilla-release/configure.in.old mozilla-release/configure.in ---- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 -+++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 -@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, - _USE_SYSTEM_NSS=1 ) - - if test -n "$_USE_SYSTEM_NSS"; then -- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) -+ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) - fi - - if test -n "$MOZ_NATIVE_NSS"; then -diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile diff --git a/mozilla-1243104.patch b/mozilla-1243104.patch deleted file mode 100644 index 5736869..0000000 --- a/mozilla-1243104.patch +++ /dev/null @@ -1,284 +0,0 @@ -From e3ee5c0dbc8814f5114cdddb0f050691e7573b34 Mon Sep 17 00:00:00 2001 -From: Marcin Juszkiewicz -Date: Tue, 14 Jul 2015 21:02:13 +0200 -Subject: [PATCH] fixed build - ---- - firefox-nss-3.18.0.patch | 13 ---- - mozilla-1005535.patch | 152 ++++++++++++++--------------------------------- - xulrunner.spec | 9 ++- - 3 files changed, 49 insertions(+), 125 deletions(-) - delete mode 100644 firefox-nss-3.18.0.patch - -diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch -deleted file mode 100644 -index a693832..0000000 ---- a/firefox-nss-3.18.0.patch -+++ /dev/null -@@ -1,13 +0,0 @@ --diff -up mozilla-release/configure.in.old mozilla-release/configure.in ----- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 --+++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 --@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, -- _USE_SYSTEM_NSS=1 ) -- -- if test -n "$_USE_SYSTEM_NSS"; then --- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) --+ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) -- fi -- -- if test -n "$MOZ_NATIVE_NSS"; then --diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile -diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch -index 2f0381b..ef4f1ac 100644 ---- a/mozilla-1005535.patch -+++ b/mozilla-1005535.patch -@@ -3,15 +3,11 @@ - # User Steve Singer - Bug 1005535 - Get skia GPU building on big endian. - --diff --git a/configure.in b/configure.in ----- a/configure.in --+++ b/configure.in --@@ -8231,21 +8231,21 @@ dnl Skia -- dnl ======================================================== -- if test "$MOZ_ENABLE_SKIA"; then -- AC_DEFINE(MOZ_ENABLE_SKIA) -- AC_DEFINE(USE_SKIA) -- if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then -+Index: mozilla-release/configure.in -+=================================================================== -+--- mozilla-release.orig/configure.in -++++ mozilla-release/configure.in -+@@ -8243,11 +8243,11 @@ if test "$MOZ_ENABLE_SKIA"; then - AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) - fi - -@@ -25,63 +21,35 @@ diff --git a/configure.in b/configure.in - fi - AC_SUBST(MOZ_ENABLE_SKIA) - -- dnl ======================================================== -- dnl disable xul -- dnl ======================================================== -- MOZ_ARG_DISABLE_BOOL(xul, -- [ --disable-xul Disable XUL], --diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py ----- a/gfx/skia/generate_mozbuild.py --+++ b/gfx/skia/generate_mozbuild.py --@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ -- return True -- -- return False -- -- separated = { -+Index: mozilla-release/gfx/skia/generate_mozbuild.py -+=================================================================== -+--- mozilla-release.orig/gfx/skia/generate_mozbuild.py -++++ mozilla-release/gfx/skia/generate_mozbuild.py -+@@ -242,7 +242,6 @@ def generate_separated_sources(platform_ - 'common': { - #'trunk/src/effects/gradients/SkGradientTileProc.cpp', - 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', - - 'trunk/src/ports/SkDiscardableMemory_none.cpp', --+ #'trunk/src/ports/SkDiscardableMemory_none.cpp', - 'trunk/src/ports/SkImageDecoder_empty.cpp', - 'trunk/src/ports/SkMemory_mozalloc.cpp', - # 'trunk/src/images/SkImages.cpp', -- # 'trunk/src/images/SkImageRef.cpp', -- # 'trunk/src/images/SkImageRef_GlobalPool.cpp', -- # 'trunk/src/images/SkImageRefPool.cpp', -- # 'trunk/src/images/SkImageDecoder.cpp', -- # 'trunk/src/images/SkImageDecoder_Factory.cpp', --diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build ----- a/gfx/skia/moz.build --+++ b/gfx/skia/moz.build --@@ -847,17 +847,16 @@ else: -- 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', -- 'trunk/src/opts/SkBlitMask_opts_none.cpp', -- 'trunk/src/opts/SkBlitRow_opts_none.cpp', -- 'trunk/src/opts/SkBlurImage_opts_none.cpp', -- 'trunk/src/opts/SkMorphology_opts_none.cpp', -- 'trunk/src/opts/SkTextureCompression_opts_none.cpp', -- 'trunk/src/opts/SkUtils_opts_none.cpp', -- 'trunk/src/opts/SkXfermode_opts_none.cpp', --- 'trunk/src/ports/SkDiscardableMemory_none.cpp', -- ] -- -- -- # can we find a better way of dealing with asm sources? -- -- # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with -- if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: -- SOURCES += [ --diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h ----- a/gfx/skia/trunk/include/config/SkUserConfig.h --+++ b/gfx/skia/trunk/include/config/SkUserConfig.h --@@ -192,16 +192,17 @@ -- -- #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) -- # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" -- #else -- # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" -+Index: mozilla-release/gfx/skia/moz.build -+=================================================================== -+--- mozilla-release.orig/gfx/skia/moz.build -++++ mozilla-release/gfx/skia/moz.build -+@@ -663,7 +663,6 @@ UNIFIED_SOURCES += [ -+ 'trunk/src/pathops/SkReduceOrder.cpp', -+ 'trunk/src/pipe/SkGPipeRead.cpp', -+ 'trunk/src/pipe/SkGPipeWrite.cpp', -+- 'trunk/src/ports/SkDiscardableMemory_none.cpp', -+ 'trunk/src/ports/SkGlobalInitialization_default.cpp', -+ 'trunk/src/ports/SkImageDecoder_empty.cpp', -+ 'trunk/src/ports/SkMemory_mozalloc.cpp', -+Index: mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h -+=================================================================== -+--- mozilla-release.orig/gfx/skia/trunk/include/config/SkUserConfig.h -++++ mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h -+@@ -197,6 +197,7 @@ - #endif - - // On all platforms we have this byte order -@@ -89,20 +57,11 @@ diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/inclu - #define SK_A32_SHIFT 24 - #define SK_R32_SHIFT 16 - #define SK_G32_SHIFT 8 -- #define SK_B32_SHIFT 0 -- -- #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 -- -- #define SK_SUPPORT_LEGACY_GETDEVICE --diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h ----- a/gfx/skia/trunk/include/core/SkColorPriv.h --+++ b/gfx/skia/trunk/include/core/SkColorPriv.h --@@ -27,37 +27,27 @@ -- * For easier compatibility with Skia's GPU backend, we further restrict these -- * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does -- * not directly correspond to the same shift-order, since we have to take endianess -- * into account. -- * -+Index: mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h -+=================================================================== -+--- mozilla-release.orig/gfx/skia/trunk/include/core/SkColorPriv.h -++++ mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h -+@@ -32,17 +32,7 @@ - * Here we enforce this constraint. - */ - -@@ -120,9 +79,7 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ - #define SK_RGBA_R32_SHIFT 0 - #define SK_RGBA_G32_SHIFT 8 - #define SK_RGBA_B32_SHIFT 16 -- #define SK_RGBA_A32_SHIFT 24 -- -- #define SK_BGRA_B32_SHIFT 0 -+@@ -52,7 +42,7 @@ - #define SK_BGRA_G32_SHIFT 8 - #define SK_BGRA_R32_SHIFT 16 - #define SK_BGRA_A32_SHIFT 24 -@@ -131,20 +88,11 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ - - #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) - #error "can't define PMCOLOR to be RGBA and BGRA" -- #endif -- -- #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ -- (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ -- SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ --diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h ----- a/gfx/skia/trunk/include/core/SkImageInfo.h --+++ b/gfx/skia/trunk/include/core/SkImageInfo.h --@@ -83,19 +83,20 @@ enum SkColorType { -- -- kLastEnum_SkColorType = kIndex_8_SkColorType, -- -- #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) -- kN32_SkColorType = kBGRA_8888_SkColorType, -+Index: mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h -+=================================================================== -+--- mozilla-release.orig/gfx/skia/trunk/include/core/SkImageInfo.h -++++ mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h -+@@ -88,9 +88,10 @@ enum SkColorType { - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - kN32_SkColorType = kRGBA_8888_SkColorType, - #else -@@ -156,20 +104,11 @@ diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/ - #ifdef SK_SUPPORT_LEGACY_N32_NAME - kPMColor_SkColorType = kN32_SkColorType - #endif -- }; -- -- static int SkColorTypeBytesPerPixel(SkColorType ct) { -- static const uint8_t gSize[] = { -- 0, // Unknown --diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h ----- a/gfx/skia/trunk/include/gpu/GrTypes.h --+++ b/gfx/skia/trunk/include/gpu/GrTypes.h --@@ -304,25 +304,23 @@ enum GrPixelConfig { -- * Byte order is r, g, b, a. This color format is 32 bits per channel -- */ -- kRGBA_float_GrPixelConfig, -- kLast_GrPixelConfig = kRGBA_float_GrPixelConfig -- }; -+Index: mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h -+=================================================================== -+--- mozilla-release.orig/gfx/skia/trunk/include/gpu/GrTypes.h -++++ mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h -+@@ -309,15 +309,13 @@ enum GrPixelConfig { - static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; - - // Aliases for pixel configs that match skia's byte order. -@@ -187,8 +126,3 @@ diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/G - #endif - - // Returns true if the pixel config is a GPU-specific compressed format -- // representation. -- static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { -- switch (config) { -- case kETC1_GrPixelConfig: -- case kLATC_GrPixelConfig: -diff --git a/xulrunner.spec b/xulrunner.spec -index 9570fd8..e9447b3 100644 ---- a/xulrunner.spec -+++ b/xulrunner.spec -@@ -78,7 +78,7 @@ - Summary: XUL Runtime for Gecko Applications - Name: xulrunner - Version: 39.0 --Release: 1%{?pre_tag}%{?dist} -+Release: 2%{?pre_tag}%{?dist} - URL: http://developer.mozilla.org/En/XULRunner - License: MPLv1.1 or GPLv2+ or LGPLv2+ - Group: Applications/Internet -@@ -98,7 +98,6 @@ Patch19: xulrunner-24.0-s390-inlines.patch - Patch20: firefox-build-prbool.patch - Patch21: aarch64-fix-skia.patch - Patch22: mozilla-1005535.patch --Patch23: firefox-nss-3.18.0.patch - Patch24: rhbz-1219542-s390-build.patch - - # Fedora specific patches -@@ -242,7 +241,6 @@ cd %{tarballdir} - %patch20 -p1 -b .prbool - %patch21 -p1 -b .aarch64-fix-skia - %patch22 -p1 -b .mozilla-1005535 --%patch23 -p1 -b .nss-3.18.0 - %ifarch s390 - %patch24 -p1 -b .rhbz-1219542-s390 - %endif -@@ -554,6 +552,11 @@ fi - #--------------------------------------------------------------------- - - %changelog -+* Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 -+- fixed build -+ - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available -+ - refreshed mozilla-1005535.patch patch to apply -+ - * Fri Jul 10 2015 Martin Stransky - 39.0-1 - - Update to 39.0 - --- -2.4.5 - diff --git a/xulrunner.spec b/xulrunner.spec index e9447b3..4f570b2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 39.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -552,6 +552,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 22 2015 Petr Jasicek - 39.0-3 +- Removed unneeded patch files + * Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 - fixed build - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available From dfdecde2b971da01f55aea391cd8f015c77fa5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1=C3=AD=C4=8Dek?= Date: Tue, 25 Aug 2015 11:09:44 +0200 Subject: [PATCH 458/486] Update to 40.0 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index bfecd5f..7e7ec37 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -34d9841bc9b8a85aaf06e311cf1cb263 firefox-39.0.source.tar.bz2 +62b9e6a4a46874a0be523fe41d3176e2 firefox-40.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 4f570b2..699e376 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 39.0 -Release: 3%{?pre_tag}%{?dist} +Version: 40.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -552,6 +552,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Aug 25 2015 Petr Jasicek - 40.0-1 +- Update to 40.0 + * Wed Jul 22 2015 Petr Jasicek - 39.0-3 - Removed unneeded patch files From af1aad65f1728bcb399fbe0fdf14d75d97973edd Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 2 Sep 2015 22:01:45 +0200 Subject: [PATCH 459/486] Disablet Skia to build on second arches --- xulrunner-mozconfig | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index e80f39e..0dcf27d 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -33,7 +33,7 @@ ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer ac_add_options --enable-pulseaudio -ac_add_options --enable-skia +ac_add_options --disable-skia export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index 699e376..28145a4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 40.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -552,6 +552,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 2 2015 Martin Stransky - 40.0-2 +- Disable Skia to build on second arches + * Tue Aug 25 2015 Petr Jasicek - 40.0-1 - Update to 40.0 From 104f4ba570ea0567259096006dc6abf73866b6b3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 1 Dec 2015 12:26:02 +0100 Subject: [PATCH 460/486] Update to 42.0 --- .gitignore | 1 + aarch64-fix-skia.patch | 4 +- mozilla-1005535.patch | 128 ----------------------------------------- sources | 2 +- xulrunner.spec | 19 +++--- 5 files changed, 14 insertions(+), 140 deletions(-) delete mode 100644 mozilla-1005535.patch diff --git a/.gitignore b/.gitignore index 0d88a9e..64b20fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /firefox-*.source.tar.bz2 /xulrunner-*.source.tar.bz2 +/firefox-42.0.source.tar.xz diff --git a/aarch64-fix-skia.patch b/aarch64-fix-skia.patch index 4b9958d..17df80e 100644 --- a/aarch64-fix-skia.patch +++ b/aarch64-fix-skia.patch @@ -2,8 +2,8 @@ Based on https://github.com/google/skia/commit/b79ff56de23fef680ae7187040f2d6a95 Index: mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h =================================================================== ---- mozilla-release.orig/gfx/skia/trunk/src/core/SkUtilsArm.h -+++ mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h +--- mozilla-release/gfx/skia/skia/src/core/SkUtilsArm.h ++++ mozilla-release/gfx/skia/skia/src/core/SkUtilsArm.h @@ -21,9 +21,9 @@ #define SK_ARM_NEON_MODE_ALWAYS 1 #define SK_ARM_NEON_MODE_DYNAMIC 2 diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch deleted file mode 100644 index ef4f1ac..0000000 --- a/mozilla-1005535.patch +++ /dev/null @@ -1,128 +0,0 @@ -# HG changeset patch -# Parent b7eb1ce0237d6125b75bc8ff1cb3afc328d6e78c -# User Steve Singer -Bug 1005535 - Get skia GPU building on big endian. - -Index: mozilla-release/configure.in -=================================================================== ---- mozilla-release.orig/configure.in -+++ mozilla-release/configure.in -@@ -8243,11 +8243,11 @@ if test "$MOZ_ENABLE_SKIA"; then - AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) - fi - -- if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then -+# if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then - MOZ_ENABLE_SKIA_GPU=1 - AC_DEFINE(USE_SKIA_GPU) - AC_SUBST(MOZ_ENABLE_SKIA_GPU) -- fi -+# fi - fi - AC_SUBST(MOZ_ENABLE_SKIA) - -Index: mozilla-release/gfx/skia/generate_mozbuild.py -=================================================================== ---- mozilla-release.orig/gfx/skia/generate_mozbuild.py -+++ mozilla-release/gfx/skia/generate_mozbuild.py -@@ -242,7 +242,6 @@ def generate_separated_sources(platform_ - 'common': { - #'trunk/src/effects/gradients/SkGradientTileProc.cpp', - 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', -- 'trunk/src/ports/SkDiscardableMemory_none.cpp', - 'trunk/src/ports/SkImageDecoder_empty.cpp', - 'trunk/src/ports/SkMemory_mozalloc.cpp', - # 'trunk/src/images/SkImages.cpp', -Index: mozilla-release/gfx/skia/moz.build -=================================================================== ---- mozilla-release.orig/gfx/skia/moz.build -+++ mozilla-release/gfx/skia/moz.build -@@ -663,7 +663,6 @@ UNIFIED_SOURCES += [ - 'trunk/src/pathops/SkReduceOrder.cpp', - 'trunk/src/pipe/SkGPipeRead.cpp', - 'trunk/src/pipe/SkGPipeWrite.cpp', -- 'trunk/src/ports/SkDiscardableMemory_none.cpp', - 'trunk/src/ports/SkGlobalInitialization_default.cpp', - 'trunk/src/ports/SkImageDecoder_empty.cpp', - 'trunk/src/ports/SkMemory_mozalloc.cpp', -Index: mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h -=================================================================== ---- mozilla-release.orig/gfx/skia/trunk/include/config/SkUserConfig.h -+++ mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h -@@ -197,6 +197,7 @@ - #endif - - // On all platforms we have this byte order -+ - #define SK_A32_SHIFT 24 - #define SK_R32_SHIFT 16 - #define SK_G32_SHIFT 8 -Index: mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h -=================================================================== ---- mozilla-release.orig/gfx/skia/trunk/include/core/SkColorPriv.h -+++ mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h -@@ -32,17 +32,7 @@ - * Here we enforce this constraint. - */ - --#ifdef SK_CPU_BENDIAN -- #define SK_RGBA_R32_SHIFT 24 -- #define SK_RGBA_G32_SHIFT 16 -- #define SK_RGBA_B32_SHIFT 8 -- #define SK_RGBA_A32_SHIFT 0 - -- #define SK_BGRA_B32_SHIFT 24 -- #define SK_BGRA_G32_SHIFT 16 -- #define SK_BGRA_R32_SHIFT 8 -- #define SK_BGRA_A32_SHIFT 0 --#else - #define SK_RGBA_R32_SHIFT 0 - #define SK_RGBA_G32_SHIFT 8 - #define SK_RGBA_B32_SHIFT 16 -@@ -52,7 +42,7 @@ - #define SK_BGRA_G32_SHIFT 8 - #define SK_BGRA_R32_SHIFT 16 - #define SK_BGRA_A32_SHIFT 24 --#endif -+ - - #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) - #error "can't define PMCOLOR to be RGBA and BGRA" -Index: mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h -=================================================================== ---- mozilla-release.orig/gfx/skia/trunk/include/core/SkImageInfo.h -+++ mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h -@@ -88,9 +88,10 @@ enum SkColorType { - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - kN32_SkColorType = kRGBA_8888_SkColorType, - #else --#error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order" -+ kN32_SkColorType = kBGRA_8888_SkColorType - #endif - -+ - #ifdef SK_SUPPORT_LEGACY_N32_NAME - kPMColor_SkColorType = kN32_SkColorType - #endif -Index: mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h -=================================================================== ---- mozilla-release.orig/gfx/skia/trunk/include/gpu/GrTypes.h -+++ mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h -@@ -309,15 +309,13 @@ enum GrPixelConfig { - static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; - - // Aliases for pixel configs that match skia's byte order. --#ifndef SK_CPU_LENDIAN -- #error "Skia gpu currently assumes little endian" --#endif -+ - #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) - static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig; - #else -- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format." -+ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; - #endif - - // Returns true if the pixel config is a GPU-specific compressed format diff --git a/sources b/sources index 7e7ec37..1c7d7c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -62b9e6a4a46874a0be523fe41d3176e2 firefox-40.0.source.tar.bz2 +d610bf10a75afb4734045e1a43d8eba4 firefox-42.0.source.tar.xz diff --git a/xulrunner.spec b/xulrunner.spec index 28145a4..6388241 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -23,14 +23,14 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.10.2 +%global nspr_version 4.10.10 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.15.4 +%global nss_version 3.19.2 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif %if %{?system_sqlite} -%global sqlite_version 3.7.13 +%global sqlite_version 3.8.4.2 # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) %endif @@ -46,7 +46,7 @@ %global tarballname firefox %global mozappdir %{_libdir}/%{name} -%global tarballdir mozilla-release +%global tarballdir %{tarballname}-%{version} # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -77,12 +77,12 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 40.0 -Release: 2%{?pre_tag}%{?dist} +Version: 42.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.bz2 +Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.xz Source10: %{name}-mozconfig Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in @@ -97,7 +97,6 @@ Patch18: xulrunner-24.0-jemalloc-ppc.patch Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch -Patch22: mozilla-1005535.patch Patch24: rhbz-1219542-s390-build.patch # Fedora specific patches @@ -240,7 +239,6 @@ cd %{tarballdir} %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool %patch21 -p1 -b .aarch64-fix-skia -%patch22 -p1 -b .mozilla-1005535 %ifarch s390 %patch24 -p1 -b .rhbz-1219542-s390 %endif @@ -552,6 +550,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 1 2015 Martin Stransky - 42.0-1 +- Update to 42.0 + * Wed Sep 2 2015 Martin Stransky - 40.0-2 - Disable Skia to build on second arches From 5ae495fd5c706a61fbf03f8b857d3ab88521473d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 1 Dec 2015 13:07:59 +0100 Subject: [PATCH 461/486] Build fix --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 6388241..ba8eb5b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -137,6 +137,7 @@ BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} BuildRequires: autoconf213 BuildRequires: pulseaudio-libs-devel +BuildRequires: pkgconfig(gconf-2.0) Requires: mozilla-filesystem %if %{?system_nss} From fd7866ba134079300db04a815e1337e4d6e38f7a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 1 Dec 2015 13:56:55 +0100 Subject: [PATCH 462/486] build fix --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index ba8eb5b..ec4b37c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -138,6 +138,7 @@ BuildRequires: libvpx-devel >= %{libvpx_version} BuildRequires: autoconf213 BuildRequires: pulseaudio-libs-devel BuildRequires: pkgconfig(gconf-2.0) +BuildRequires: yasm Requires: mozilla-filesystem %if %{?system_nss} From 197a6537ee19f78acef175c56dd60e484b80da06 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 1 Dec 2015 16:51:17 -0500 Subject: [PATCH 463/486] rebuild for libvpx 1.5.0 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ec4b37c..94da967 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 42.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -552,6 +552,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 1 2015 Tom Callaway - 42.0-2 +- rebuild for libvpx 1.5.0 + * Tue Dec 1 2015 Martin Stransky - 42.0-1 - Update to 42.0 From fcb40580a959f31f9b72456fc3998b49e559739e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Jan 2016 13:37:16 +0100 Subject: [PATCH 464/486] Update to 44.0 --- .gitignore | 1 + firefox-build.patch | 11 ----------- sources | 2 +- xulrunner.spec | 9 +++++---- 4 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 firefox-build.patch diff --git a/.gitignore b/.gitignore index 64b20fe..d7e8527 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /firefox-*.source.tar.bz2 /xulrunner-*.source.tar.bz2 /firefox-42.0.source.tar.xz +/firefox-44.0.source.tar.xz diff --git a/firefox-build.patch b/firefox-build.patch deleted file mode 100644 index 262337c..0000000 --- a/firefox-build.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up firefox-32.0/mozilla-release/media/libstagefright/moz.build.old firefox-32.0/mozilla-release/media/libstagefright/moz.build ---- firefox-32.0/mozilla-release/media/libstagefright/moz.build.old 2014-08-26 05:38:08.000000000 +0200 -+++ firefox-32.0/mozilla-release/media/libstagefright/moz.build 2014-08-27 15:40:12.030299348 +0200 -@@ -120,7 +120,6 @@ elif CONFIG['GNU_CXX']: - '-Wno-sign-compare' - ] - CXXFLAGS += [ -- '-Wno-format', - '-Wno-multichar', - '-Wno-sign-compare', - '-Wno-unused', diff --git a/sources b/sources index 1c7d7c4..bf85a54 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d610bf10a75afb4734045e1a43d8eba4 firefox-42.0.source.tar.xz +9d940e72f9eaff767fafcfbcc387594d firefox-44.0.source.tar.xz diff --git a/xulrunner.spec b/xulrunner.spec index 94da967..b94a2e5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 42.0 -Release: 2%{?pre_tag}%{?dist} +Version: 44.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -89,7 +89,6 @@ Source21: %{name}.sh.in # build patches Patch1: xulrunner-install-dir.patch -Patch2: firefox-build.patch Patch3: mozilla-build-arm.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-24.0-jemalloc-ppc.patch @@ -235,7 +234,6 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p2 -b .build %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines @@ -552,6 +550,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 26 2016 Martin Stransky - 44.0-1 +- Update to 44.0 + * Tue Dec 1 2015 Tom Callaway - 42.0-2 - rebuild for libvpx 1.5.0 From 97e3e8e361ba2d56d1bb5d497b328db57c2e010a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Jan 2016 15:32:31 +0100 Subject: [PATCH 465/486] Fixed file list --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index b94a2e5..6e9566a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -510,6 +510,7 @@ fi %{mozappdir}/components/*.manifest %{mozappdir}/omni.ja %{mozappdir}/*.so +%{mozappdir}/rapl %{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-stub From 8f10697eafe82413e62f8c69b769bd0db974970b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 27 Jan 2016 09:28:38 +0100 Subject: [PATCH 466/486] build fix --- xulrunner.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 6e9566a..c1e97fa 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -510,7 +510,9 @@ fi %{mozappdir}/components/*.manifest %{mozappdir}/omni.ja %{mozappdir}/*.so +%ifarch %{ix86} x86_64 %{mozappdir}/rapl +%endif %{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-stub From 05a100edbfa280b6bab53e52c170e2c2ff9c8de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 1 Feb 2016 12:45:25 +0100 Subject: [PATCH 467/486] refresh s390 patch --- rhbz-1219542-s390-build.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch index 4f38200..3734ce5 100644 --- a/rhbz-1219542-s390-build.patch +++ b/rhbz-1219542-s390-build.patch @@ -1,16 +1,16 @@ -diff -up mozilla-release/js/src/configure.in.opt mozilla-release/js/src/configure.in ---- mozilla-release/js/src/configure.in.opt 2015-05-04 02:43:23.000000000 +0200 -+++ mozilla-release/js/src/configure.in 2015-05-07 14:21:07.685405039 +0200 -@@ -1492,7 +1492,7 @@ case "$host" in +diff -up firefox-43.0.3/js/src/configure.in.rhbz-1219542-s390 firefox-43.0.3/js/src/configure.in +--- firefox-43.0.3/js/src/configure.in.rhbz-1219542-s390 2015-12-23 17:11:01.000000000 -0500 ++++ firefox-43.0.3/js/src/configure.in 2016-01-03 08:08:27.139956990 -0500 +@@ -1466,7 +1466,7 @@ case "$host" in + *-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' - HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" ;; *) -@@ -1674,8 +1674,8 @@ ia64*-hpux*) +@@ -1649,8 +1649,8 @@ ia64*-hpux*) # while; Intel recommends against using it. MOZ_OPTIMIZE_FLAGS="-O2" elif test "$GNU_CC" -o "$GNU_CXX"; then From caeb8b7b700fe93f2d4bfd01eeaa5c7d0959f16b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:52:57 +0000 Subject: [PATCH 468/486] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index c1e97fa..9199c71 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -553,6 +553,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 44.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Jan 26 2016 Martin Stransky - 44.0-1 - Update to 44.0 From 998d1df3b6d635523ac7a10c90da004f299702a4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 15 Feb 2016 11:26:55 +0100 Subject: [PATCH 469/486] gcc 6 build fix --- firefox-gcc-6.0.patch | 26 ++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 firefox-gcc-6.0.patch diff --git a/firefox-gcc-6.0.patch b/firefox-gcc-6.0.patch new file mode 100644 index 0000000..0a74d36 --- /dev/null +++ b/firefox-gcc-6.0.patch @@ -0,0 +1,26 @@ +diff -up firefox-44.0/nsprpub/config/make-system-wrappers.pl.back firefox-44.0/nsprpub/config/make-system-wrappers.pl +--- firefox-44.0/nsprpub/config/make-system-wrappers.pl.back 2016-01-24 00:23:49.000000000 +0100 ++++ firefox-44.0/nsprpub/config/make-system-wrappers.pl 2016-02-02 14:58:45.064112655 +0100 +@@ -19,7 +19,9 @@ while () { + open OUT, ">$output_dir/$_"; + print OUT "#pragma GCC system_header\n"; # suppress include_next warning + print OUT "#pragma GCC visibility push(default)\n"; ++ print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; + print OUT "#include_next \<$_\>\n"; ++ print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; + print OUT "#pragma GCC visibility pop\n"; + close OUT; + } +diff -up firefox-44.0/mozglue/build/arm.cpp.old firefox-44.0/mozglue/build/arm.cpp +--- firefox-44.0/mozglue/build/arm.cpp.old 2016-02-03 10:07:29.879526500 +0100 ++++ firefox-44.0/mozglue/build/arm.cpp 2016-02-03 10:08:11.062697517 +0100 +@@ -104,7 +104,9 @@ check_neon(void) + + # elif defined(__linux__) || defined(ANDROID) + # include ++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS + # include ++#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + # include + + enum{ diff --git a/xulrunner.spec b/xulrunner.spec index 9199c71..ec97ed9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,6 +97,7 @@ Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch24: rhbz-1219542-s390-build.patch +Patch25: firefox-gcc-6.0.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -242,6 +243,7 @@ cd %{tarballdir} %ifarch s390 %patch24 -p1 -b .rhbz-1219542-s390 %endif +%patch25 -p1 -b .gcc6 %patch200 -p2 -b .pk %patch204 -p2 -b .966424 @@ -553,6 +555,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 15 2016 Martin Stransky - 44.0-3 +- gcc 6 build fix + * Fri Feb 05 2016 Fedora Release Engineering - 44.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 355332afb11d9b94cb21d6d1a5dcbefe5942f500 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 17 Feb 2016 12:32:15 +0100 Subject: [PATCH 470/486] Rebuild --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index ec97ed9..9126632 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -555,7 +555,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Feb 15 2016 Martin Stransky - 44.0-3 +* Mon Feb 15 2016 Martin Stransky - 44.0-4 - gcc 6 build fix * Fri Feb 05 2016 Fedora Release Engineering - 44.0-2 From 9926729efe5907771e7e4c6fff1c6019ab7d090a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 22 Feb 2016 11:06:17 +0100 Subject: [PATCH 471/486] gcc6 woraround --- xulrunner.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 9126632..54ad87f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -312,6 +312,11 @@ echo "ac_add_options --disable-ion" >> .mozconfig echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif +#Workarounf for mozbz#1245783 +%if 0%{?fedora} > 23 +echo "ac_add_options --disable-ion" >> .mozconfig +%endif + %ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig %endif From 078871b9d0159a9bc6039a493cfbe1df3e076316 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 2 Mar 2016 11:34:01 +0100 Subject: [PATCH 472/486] Fix WebRTC on AArch64 again. --- firefox-webrtc-add-missing-archs.patch | 33 ++++++++++++++++++++++++++ xulrunner.spec | 9 ++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 firefox-webrtc-add-missing-archs.patch diff --git a/firefox-webrtc-add-missing-archs.patch b/firefox-webrtc-add-missing-archs.patch new file mode 100644 index 0000000..94ce346 --- /dev/null +++ b/firefox-webrtc-add-missing-archs.patch @@ -0,0 +1,33 @@ + +# HG changeset patch +# User Makoto Kato +# Date 1446192505 -32400 +# Node ID 189d4b0f9f238c76b1c2ee7003bba8fb693b3e54 +# Parent 6bac283aad5301f23a0bdbcd7c7f3f92b9da7c24 +Bug 1219566 - Add aarch64 macro to webrtc/trunk/build/build_config.h. r=rjesup + +diff --git a/media/webrtc/trunk/build/build_config.h b/media/webrtc/trunk/build/build_config.h +--- a/media/webrtc/trunk/build/build_config.h ++++ b/media/webrtc/trunk/build/build_config.h +@@ -151,16 +151,20 @@ + #define ARCH_CPU_S390X 1 + #define ARCH_CPU_64_BITS 1 + #elif defined(__s390__) + #define ARCH_CPU_S390 1 + #define ARCH_CPU_32_BITS 1 + #elif defined(__alpha__) + #define ARCH_CPU_ALPHA 1 + #define ARCH_CPU_64_BITS 1 ++#elif defined(__aarch64__) ++#define ARCH_CPU_ARM_FAMILY 1 ++#define ARCH_CPU_ARM64 1 ++#define ARCH_CPU_64_BITS 1 + #else + #error Please add support for your architecture in build/build_config.h + #endif + + // Type detection for wchar_t. + #if defined(OS_WIN) + #define WCHAR_T_IS_UTF16 + #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ + diff --git a/xulrunner.spec b/xulrunner.spec index 54ad87f..dd7bd37 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -104,6 +104,9 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch +# FTBFS on AArch64 +Patch205: firefox-webrtc-add-missing-archs.patch + # Upstream patches # --------------------------------------------------- @@ -247,6 +250,7 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p2 -b .966424 +%patch205 -p1 # Upstream patches @@ -560,6 +564,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 02 2016 Marcin Juszkiewicz - 44.0-5 +- Fix WebRTC on AArch64 again. + * Mon Feb 15 2016 Martin Stransky - 44.0-4 - gcc 6 build fix From 60bbba63be55322472db545b1f56050676336ed9 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 27 Apr 2016 22:40:56 +0100 Subject: [PATCH 473/486] Added fix for rhbz#1315225 - ppc64le/aarch64 build fixes --- xulrunner.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index dd7bd37..f630b41 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -288,8 +288,12 @@ echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig %else echo "ac_add_options --disable-debug" >> .mozconfig +%ifarch ppc64le aarch64 +echo 'ac_add_options --enable-optimize="-g -O2"' >> .mozconfig +%else echo "ac_add_options --enable-optimize" >> .mozconfig %endif +%endif # s390(x) fails to start with jemalloc enabled %ifarch s390 s390x @@ -564,6 +568,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 27 2016 Peter Robinson 44.0-6 +- Added fix for rhbz#1315225 - ppc64le/aarch64 build fixes + * Wed Mar 02 2016 Marcin Juszkiewicz - 44.0-5 - Fix WebRTC on AArch64 again. From f4ed118ce993829ff5a80149dfe37c3088124423 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 22 Jul 2016 11:19:15 -0400 Subject: [PATCH 474/486] rebuild for libvpx 1.6.0 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index f630b41..dbf41f9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -568,6 +568,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 22 2016 Tom Callaway - 44.0-7 +- rebuild for libvpx 1.6.0 + * Wed Apr 27 2016 Peter Robinson 44.0-6 - Added fix for rhbz#1315225 - ppc64le/aarch64 build fixes From 5aa49f34725db30a92ca4c14623bc7e964adb2cf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2016 11:03:39 +0100 Subject: [PATCH 475/486] Rebuilt --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index dbf41f9..c562dad 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 7%{?pre_tag}%{?dist} +Release: 8%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -568,6 +568,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 15 2016 Martin Stransky - 44.0-8 +- Rebuilt + * Fri Jul 22 2016 Tom Callaway - 44.0-7 - rebuild for libvpx 1.6.0 From f0c6414b608d8f0dd1ce9c815adbdcacb5c15a66 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2016 11:40:33 +0100 Subject: [PATCH 476/486] update build req --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index c562dad..6451f93 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -142,6 +142,7 @@ BuildRequires: autoconf213 BuildRequires: pulseaudio-libs-devel BuildRequires: pkgconfig(gconf-2.0) BuildRequires: yasm +BuildRequires: dbus-glib-devel Requires: mozilla-filesystem %if %{?system_nss} From 1299889d393c06e1328f2b30f501078180182f76 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 11:17:55 +0100 Subject: [PATCH 477/486] Added fix for new nss 3.28.1 (mozbz#1290037) --- xulrunner.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 6451f93..f1b1968 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ %if %{?system_nss} %global nspr_version 4.10.10 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.19.2 +%global nss_version 3.28.1 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 8%{?pre_tag}%{?dist} +Release: 9%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -107,6 +107,9 @@ Patch204: rhbz-966424.patch # FTBFS on AArch64 Patch205: firefox-webrtc-add-missing-archs.patch +# Upstream patches +Patch300: mozilla-1290037.patch + # Upstream patches # --------------------------------------------------- @@ -254,6 +257,7 @@ cd %{tarballdir} %patch205 -p1 # Upstream patches +%patch300 -p1 -b .1290037 %{__rm} -f .mozconfig @@ -569,6 +573,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 20 2017 Martin Stransky - 44.0-9 +- Added fix for new nss 3.28.1 (mozbz#1290037) + * Thu Dec 15 2016 Martin Stransky - 44.0-8 - Rebuilt From ec4a6e93109bdd221598f28e4ebcf51bbef1ccc4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 11:30:49 +0100 Subject: [PATCH 478/486] Added missing patch --- mozilla-1290037.patch | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 mozilla-1290037.patch diff --git a/mozilla-1290037.patch b/mozilla-1290037.patch new file mode 100644 index 0000000..508d580 --- /dev/null +++ b/mozilla-1290037.patch @@ -0,0 +1,34 @@ +# HG changeset patch +# User Franziskus Kiefer +# Date 1469717280 -7200 +# Thu Jul 28 16:48:00 2016 +0200 +# Node ID 95aa61f1e3562e526bf88179d9d078fd90ad1bda +# Parent d42aacfe34af25e2f5110e2ca3d24a210eabeb33 +Update keybits in H2, r=mt + +MozReview-Commit-ID: 35oWoDMqe1Y + +diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp +--- a/netwerk/protocol/http/Http2Session.cpp ++++ b/netwerk/protocol/http/Http2Session.cpp +@@ -3544,18 +3544,18 @@ Http2Session::ConfirmTLSProfile() + RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); + } + + uint32_t keybits = ssl->GetKEAKeyBits(); + if (kea == ssl_kea_dh && keybits < 2048) { + LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to DH %d < 2048\n", + this, keybits)); + RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); +- } else if (kea == ssl_kea_ecdh && keybits < 256) { // 256 bits is "security level" of 128 +- LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 256\n", ++ } else if (kea == ssl_kea_ecdh && keybits < 224) { // see rfc7540 9.2.1. ++ LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 224\n", + this, keybits)); + RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); + } + + int16_t macAlgorithm = ssl->GetMACAlgorithmUsed(); + LOG3(("Http2Session::ConfirmTLSProfile %p MAC Algortihm (aead==6) %d\n", + this, macAlgorithm)); + if (macAlgorithm != nsISSLSocketControl::SSL_MAC_AEAD) { From 36e54a1e24bce507651a7b2b1195a06bb3c6fa2c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 12:04:35 +0100 Subject: [PATCH 479/486] Disabled system icu --- xulrunner-mozconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 0dcf27d..e7c882d 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -34,6 +34,7 @@ ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer ac_add_options --enable-pulseaudio ac_add_options --disable-skia +ac_add_options --without-system-icu export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 From dedebcc1f71e8e8ad6ba8dbbc44cf3fc25a3714d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 12:32:06 +0100 Subject: [PATCH 480/486] Relaxed requested nss version --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index f1b1968..45e339a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ %if %{?system_nss} %global nspr_version 4.10.10 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.28.1 +%global nss_version 3.27 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif From 3608d371a58510eb7cadcb13d61c5dbad48e5601 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 12:47:14 +0100 Subject: [PATCH 481/486] Added mozbz#1329272 build fix --- mozilla-1329272.patch | 29 +++++++++++++++++++++++++++++ xulrunner-mozconfig | 1 - xulrunner.spec | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 mozilla-1329272.patch diff --git a/mozilla-1329272.patch b/mozilla-1329272.patch new file mode 100644 index 0000000..ab0b26b --- /dev/null +++ b/mozilla-1329272.patch @@ -0,0 +1,29 @@ +From 66fc64a75617ffc68f16780f60e39c1f368dfd41 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 9 Jan 2017 14:37:33 +0100 +Subject: [PATCH] bug 1329272: add bracket for sed 4.3 compliance, r=glandium + +--- + build/autoconf/icu.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 +index 4f46345f435a..794ddcdf4e52 100644 +--- a/build/autoconf/icu.m4 ++++ b/build/autoconf/icu.m4 +@@ -67,11 +67,11 @@ if test -n "$USE_ICU"; then + if test ! -d "$icudir"; then + AC_MSG_ERROR([Cannot find the ICU directory]) + fi + fi + +- version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` ++ version=`sed -n 's/^[[[:space:]]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` + if test x"$version" = x; then + AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno]) + fi + MOZ_ICU_VERSION="$version" + +-- +2.11.0 + diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index e7c882d..0dcf27d 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -34,7 +34,6 @@ ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer ac_add_options --enable-pulseaudio ac_add_options --disable-skia -ac_add_options --without-system-icu export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index 45e339a..8fc82ac 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -109,6 +109,7 @@ Patch205: firefox-webrtc-add-missing-archs.patch # Upstream patches Patch300: mozilla-1290037.patch +Patch301: mozilla-1329272.patch # Upstream patches @@ -258,6 +259,7 @@ cd %{tarballdir} # Upstream patches %patch300 -p1 -b .1290037 +%patch301 -p1 -b .1329272 %{__rm} -f .mozconfig From 656d9078e217a4dcfefc151ff4b4ccaf5f54e047 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 18:11:41 +0000 Subject: [PATCH 482/486] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 8fc82ac..e0720a4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 9%{?pre_tag}%{?dist} +Release: 10%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -575,6 +575,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 44.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Jan 20 2017 Martin Stransky - 44.0-9 - Added fix for new nss 3.28.1 (mozbz#1290037) From 90cdbfa41ddd48bff32d8e460fb34ac42d4e290c Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 1 Jun 2017 15:20:24 +0200 Subject: [PATCH 483/486] Fixed xulrunner build problems with stl headers --- build-stl-headers-fix-mbz1269171.patch | 169 +++++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 171 insertions(+) create mode 100644 build-stl-headers-fix-mbz1269171.patch diff --git a/build-stl-headers-fix-mbz1269171.patch b/build-stl-headers-fix-mbz1269171.patch new file mode 100644 index 0000000..7f9db14 --- /dev/null +++ b/build-stl-headers-fix-mbz1269171.patch @@ -0,0 +1,169 @@ +diff -up firefox-44.0/config/gcc-stl-wrapper.template.h.1269171 firefox-44.0/config/gcc-stl-wrapper.template.h +--- firefox-44.0/config/gcc-stl-wrapper.template.h.1269171 2017-06-01 12:06:24.481286748 +0200 ++++ firefox-44.0/config/gcc-stl-wrapper.template.h 2017-06-01 12:09:28.883022995 +0200 +@@ -17,24 +17,6 @@ + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + +-// mozalloc.h wants ; break the cycle by always explicitly +-// including here. NB: this is a tad sneaky. Sez the gcc docs: +-// +-// `#include_next' does not distinguish between and "file" +-// inclusion, nor does it check that the file you specify has the +-// same name as the current file. It simply looks for the file +-// named, starting with the directory in the search path after the +-// one where the current file was found. +-#include_next +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" +-#endif + + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies +@@ -46,10 +28,34 @@ + // # define _GLIBCXX_DEBUG 1 + #endif + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++ ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \ ++ !defined(moz_dont_include_mozalloc_for_${HEADER}) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + #pragma GCC visibility push(default) + #include_next <${HEADER}> + #pragma GCC visibility pop + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + // gcc calls a __throw_*() function from bits/functexcept.h when it + // wants to "throw an exception". functexcept exists nominally to + // support -fno-exceptions, but since we'll always use the system +diff -up firefox-44.0/config/make-stl-wrappers.py.1269171 firefox-44.0/config/make-stl-wrappers.py +--- firefox-44.0/config/make-stl-wrappers.py.1269171 2016-01-24 00:23:37.000000000 +0100 ++++ firefox-44.0/config/make-stl-wrappers.py 2017-06-01 12:06:24.482286747 +0200 +@@ -30,7 +30,6 @@ def main(outdir, compiler, template_file + os.mkdir(outdir) + + template = open(template_file, 'r').read() +- path_to_new = header_path('new', compiler) + + for header in open(header_list_file, 'r'): + header = header.rstrip() +@@ -40,8 +39,7 @@ def main(outdir, compiler, template_file + path = header_path(header, compiler) + with FileAvoidWrite(os.path.join(outdir, header)) as f: + f.write(string.Template(template).substitute(HEADER=header, +- HEADER_PATH=path, +- NEW_HEADER_PATH=path_to_new)) ++ HEADER_PATH=path)) + + + if __name__ == '__main__': +diff -up firefox-44.0/config/msvc-stl-wrapper.template.h.1269171 firefox-44.0/config/msvc-stl-wrapper.template.h +--- firefox-44.0/config/msvc-stl-wrapper.template.h.1269171 2016-01-24 00:23:37.000000000 +0100 ++++ firefox-44.0/config/msvc-stl-wrapper.template.h 2017-06-01 12:06:24.482286747 +0200 +@@ -8,35 +8,23 @@ + #ifndef mozilla_${HEADER}_h + #define mozilla_${HEADER}_h + +-#ifndef MOZ_HAVE_INCLUDED_ALLOC +-#define MOZ_HAVE_INCLUDED_ALLOC +- + #if _HAS_EXCEPTIONS + # error "STL code can only be used with -fno-exceptions" + #endif + ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k + // CRT doesn't export std::_Throw(). So we define it. + #ifndef mozilla_Throw_h + # include "mozilla/throw_msvc.h" + #endif + +-// Code might include before other wrapped headers, but +-// includes and so we want to wrap it. But mozalloc.h +-// wants also, so we break the cycle by always explicitly +-// including here. +-#include <${NEW_HEADER_PATH}> +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" +-#endif +-#endif /* MOZ_HAVE_INCLUDED_ALLOC */ +- + #ifdef _DEBUG + // From + // http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx +@@ -75,4 +63,15 @@ + + #pragma warning( pop ) + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + #endif // if mozilla_${HEADER}_h +diff -up firefox-44.0/memory/mozalloc/mozalloc.h.1269171 firefox-44.0/memory/mozalloc/mozalloc.h +--- firefox-44.0/memory/mozalloc/mozalloc.h.1269171 2016-01-24 00:23:44.000000000 +0100 ++++ firefox-44.0/memory/mozalloc/mozalloc.h 2017-06-01 12:06:24.482286747 +0200 +@@ -12,10 +12,17 @@ + * https://bugzilla.mozilla.org/show_bug.cgi?id=427099 + */ + +-#include +-#include + #if defined(__cplusplus) + # include ++// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the ++// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code ++// using things defined there. Specifically, with stdlib.h, the use of abs() ++// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs() ++# include ++# include ++#else ++# include ++# include + #endif + + #if defined(__cplusplus) diff --git a/xulrunner.spec b/xulrunner.spec index e0720a4..d477a8a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -98,6 +98,7 @@ Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch24: rhbz-1219542-s390-build.patch Patch25: firefox-gcc-6.0.patch +Patch26: build-stl-headers-fix-mbz1269171.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -252,6 +253,7 @@ cd %{tarballdir} %patch24 -p1 -b .rhbz-1219542-s390 %endif %patch25 -p1 -b .gcc6 +%patch26 -p1 -b .1269171 %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From be3317bc531ae5359e5d7a5960e34a234d76fec7 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 14 Jun 2017 12:51:30 +0200 Subject: [PATCH 484/486] Update to Firefox 45.9.0 esr source tarball --- .gitignore | 1 + firefox-webrtc-add-missing-archs.patch | 33 ------------------------- mozilla-1290037.patch | 34 -------------------------- mozilla-1329272.patch | 29 ---------------------- sources | 2 +- xulrunner-install-dir.patch | 10 ++++---- xulrunner.spec | 29 ++++++---------------- 7 files changed, 15 insertions(+), 123 deletions(-) delete mode 100644 firefox-webrtc-add-missing-archs.patch delete mode 100644 mozilla-1290037.patch delete mode 100644 mozilla-1329272.patch diff --git a/.gitignore b/.gitignore index d7e8527..6f4d157 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /xulrunner-*.source.tar.bz2 /firefox-42.0.source.tar.xz /firefox-44.0.source.tar.xz +/firefox-45.9.0esr.source.tar.xz diff --git a/firefox-webrtc-add-missing-archs.patch b/firefox-webrtc-add-missing-archs.patch deleted file mode 100644 index 94ce346..0000000 --- a/firefox-webrtc-add-missing-archs.patch +++ /dev/null @@ -1,33 +0,0 @@ - -# HG changeset patch -# User Makoto Kato -# Date 1446192505 -32400 -# Node ID 189d4b0f9f238c76b1c2ee7003bba8fb693b3e54 -# Parent 6bac283aad5301f23a0bdbcd7c7f3f92b9da7c24 -Bug 1219566 - Add aarch64 macro to webrtc/trunk/build/build_config.h. r=rjesup - -diff --git a/media/webrtc/trunk/build/build_config.h b/media/webrtc/trunk/build/build_config.h ---- a/media/webrtc/trunk/build/build_config.h -+++ b/media/webrtc/trunk/build/build_config.h -@@ -151,16 +151,20 @@ - #define ARCH_CPU_S390X 1 - #define ARCH_CPU_64_BITS 1 - #elif defined(__s390__) - #define ARCH_CPU_S390 1 - #define ARCH_CPU_32_BITS 1 - #elif defined(__alpha__) - #define ARCH_CPU_ALPHA 1 - #define ARCH_CPU_64_BITS 1 -+#elif defined(__aarch64__) -+#define ARCH_CPU_ARM_FAMILY 1 -+#define ARCH_CPU_ARM64 1 -+#define ARCH_CPU_64_BITS 1 - #else - #error Please add support for your architecture in build/build_config.h - #endif - - // Type detection for wchar_t. - #if defined(OS_WIN) - #define WCHAR_T_IS_UTF16 - #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ - diff --git a/mozilla-1290037.patch b/mozilla-1290037.patch deleted file mode 100644 index 508d580..0000000 --- a/mozilla-1290037.patch +++ /dev/null @@ -1,34 +0,0 @@ -# HG changeset patch -# User Franziskus Kiefer -# Date 1469717280 -7200 -# Thu Jul 28 16:48:00 2016 +0200 -# Node ID 95aa61f1e3562e526bf88179d9d078fd90ad1bda -# Parent d42aacfe34af25e2f5110e2ca3d24a210eabeb33 -Update keybits in H2, r=mt - -MozReview-Commit-ID: 35oWoDMqe1Y - -diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp ---- a/netwerk/protocol/http/Http2Session.cpp -+++ b/netwerk/protocol/http/Http2Session.cpp -@@ -3544,18 +3544,18 @@ Http2Session::ConfirmTLSProfile() - RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); - } - - uint32_t keybits = ssl->GetKEAKeyBits(); - if (kea == ssl_kea_dh && keybits < 2048) { - LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to DH %d < 2048\n", - this, keybits)); - RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); -- } else if (kea == ssl_kea_ecdh && keybits < 256) { // 256 bits is "security level" of 128 -- LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 256\n", -+ } else if (kea == ssl_kea_ecdh && keybits < 224) { // see rfc7540 9.2.1. -+ LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 224\n", - this, keybits)); - RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); - } - - int16_t macAlgorithm = ssl->GetMACAlgorithmUsed(); - LOG3(("Http2Session::ConfirmTLSProfile %p MAC Algortihm (aead==6) %d\n", - this, macAlgorithm)); - if (macAlgorithm != nsISSLSocketControl::SSL_MAC_AEAD) { diff --git a/mozilla-1329272.patch b/mozilla-1329272.patch deleted file mode 100644 index ab0b26b..0000000 --- a/mozilla-1329272.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 66fc64a75617ffc68f16780f60e39c1f368dfd41 Mon Sep 17 00:00:00 2001 -From: Daniel Stenberg -Date: Mon, 9 Jan 2017 14:37:33 +0100 -Subject: [PATCH] bug 1329272: add bracket for sed 4.3 compliance, r=glandium - ---- - build/autoconf/icu.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 -index 4f46345f435a..794ddcdf4e52 100644 ---- a/build/autoconf/icu.m4 -+++ b/build/autoconf/icu.m4 -@@ -67,11 +67,11 @@ if test -n "$USE_ICU"; then - if test ! -d "$icudir"; then - AC_MSG_ERROR([Cannot find the ICU directory]) - fi - fi - -- version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` -+ version=`sed -n 's/^[[[:space:]]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` - if test x"$version" = x; then - AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno]) - fi - MOZ_ICU_VERSION="$version" - --- -2.11.0 - diff --git a/sources b/sources index bf85a54..799823c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9d940e72f9eaff767fafcfbcc387594d firefox-44.0.source.tar.xz +SHA512 (firefox-45.9.0esr.source.tar.xz) = 2e4c1f8bca0c59ac93ab918b996e3b6cf25e7279ad5800de256aa220e670c6aaab2036c3ead4020b80e2a0e8cda3ae5fe9b270106646c625ce4fd6ecfd66d9ca diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch index 51fe4ba..89d2972 100644 --- a/xulrunner-install-dir.patch +++ b/xulrunner-install-dir.patch @@ -1,6 +1,6 @@ -diff -up firefox-29.0/mozilla-release/config/baseconfig.mk.orig firefox-29.0/mozilla-release/config/baseconfig.mk ---- mozilla-release/config/baseconfig.mk.orig 2014-04-22 15:38:52.948165295 +0200 -+++ mozilla-release/config/baseconfig.mk 2014-04-22 15:42:20.387481673 +0200 +diff -up firefox-45.9.0esr/config/baseconfig.mk.version-fix firefox-45.9.0esr/config/baseconfig.mk +--- firefox-45.9.0esr/config/baseconfig.mk.version-fix 2017-06-14 10:02:42.829306768 +0200 ++++ firefox-45.9.0esr/config/baseconfig.mk 2017-06-14 10:02:54.014302221 +0200 @@ -4,7 +4,7 @@ # whether a normal build is happening or whether the check is running. includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) @@ -8,5 +8,5 @@ diff -up firefox-29.0/mozilla-release/config/baseconfig.mk.orig firefox-29.0/moz -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +installdir = $(libdir)/$(MOZ_APP_NAME) sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - ifndef TOP_DIST - TOP_DIST = dist + ifeq (.,$(DEPTH)) + DIST = dist diff --git a/xulrunner.spec b/xulrunner.spec index d477a8a..68fea22 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -46,7 +46,7 @@ %global tarballname firefox %global mozappdir %{_libdir}/%{name} -%global tarballdir %{tarballname}-%{version} +%global tarballdir %{tarballname}-%{version}esr # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -77,12 +77,12 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 44.0 -Release: 10%{?pre_tag}%{?dist} +Version: 45.9.0 +Release: 10%?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.xz +Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}esr.source.tar.xz Source10: %{name}-mozconfig Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in @@ -105,13 +105,6 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch -# FTBFS on AArch64 -Patch205: firefox-webrtc-add-missing-archs.patch - -# Upstream patches -Patch300: mozilla-1290037.patch -Patch301: mozilla-1329272.patch - # Upstream patches # --------------------------------------------------- @@ -244,7 +237,7 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch3 -p2 -b .arm +#%patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool @@ -257,12 +250,6 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p2 -b .966424 -%patch205 -p1 - -# Upstream patches -%patch300 -p1 -b .1290037 -%patch301 -p1 -b .1329272 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -525,13 +512,10 @@ fi %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.xulrunner %{mozappdir}/chrome -%{mozappdir}/chrome.manifest %{mozappdir}/dictionaries %dir %{mozappdir}/components %ghost %{mozappdir}/components/compreg.dat %ghost %{mozappdir}/components/xpti.dat -%{mozappdir}/components/*.so -%{mozappdir}/components/*.manifest %{mozappdir}/omni.ja %{mozappdir}/*.so %ifarch %{ix86} x86_64 @@ -577,6 +561,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 14 2017 Jan Horak - 45.9.0-1 +- Update to 45.9.0 (esr) sources + * Sat Feb 11 2017 Fedora Release Engineering - 44.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 721e87200e850a0dd283cf05ce1769c5c0a8a6d8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 14 Jun 2017 14:03:16 +0200 Subject: [PATCH 485/486] Fixed typo in release --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 68fea22..ebb1e37 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 45.9.0 -Release: 10%?pre_tag}%{?dist} +Release: 10%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet From 799473cddd907fb3b0036df8f436a51902bbfbf0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Jun 2017 14:29:34 +0200 Subject: [PATCH 486/486] This package is no longer supported by upstream --- .gitignore | 5 - aarch64-fix-skia.patch | 18 - build-stl-headers-fix-mbz1269171.patch | 169 ----- dead.package | 1 + firefox-build-prbool.patch | 11 - firefox-gcc-6.0.patch | 26 - mozilla-193-pkgconfig.patch | 32 - mozilla-639554.patch | 15 - mozilla-build-arm.patch | 23 - rhbz-1219542-s390-build.patch | 23 - rhbz-966424.patch | 14 - sources | 1 - xulrunner-24.0-jemalloc-ppc.patch | 12 - xulrunner-24.0-s390-inlines.patch | 12 - xulrunner-install-dir.patch | 12 - xulrunner-mozconfig | 44 -- xulrunner-redhat-default-prefs.js | 8 - xulrunner.sh.in | 69 -- xulrunner.spec | 883 ------------------------- 19 files changed, 1 insertion(+), 1377 deletions(-) delete mode 100644 .gitignore delete mode 100644 aarch64-fix-skia.patch delete mode 100644 build-stl-headers-fix-mbz1269171.patch create mode 100644 dead.package delete mode 100644 firefox-build-prbool.patch delete mode 100644 firefox-gcc-6.0.patch delete mode 100644 mozilla-193-pkgconfig.patch delete mode 100644 mozilla-639554.patch delete mode 100644 mozilla-build-arm.patch delete mode 100644 rhbz-1219542-s390-build.patch delete mode 100644 rhbz-966424.patch delete mode 100644 sources delete mode 100644 xulrunner-24.0-jemalloc-ppc.patch delete mode 100644 xulrunner-24.0-s390-inlines.patch delete mode 100644 xulrunner-install-dir.patch delete mode 100644 xulrunner-mozconfig delete mode 100644 xulrunner-redhat-default-prefs.js delete mode 100644 xulrunner.sh.in delete mode 100644 xulrunner.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 6f4d157..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/firefox-*.source.tar.bz2 -/xulrunner-*.source.tar.bz2 -/firefox-42.0.source.tar.xz -/firefox-44.0.source.tar.xz -/firefox-45.9.0esr.source.tar.xz diff --git a/aarch64-fix-skia.patch b/aarch64-fix-skia.patch deleted file mode 100644 index 17df80e..0000000 --- a/aarch64-fix-skia.patch +++ /dev/null @@ -1,18 +0,0 @@ -Based on https://github.com/google/skia/commit/b79ff56de23fef680ae7187040f2d6a9516b553d - -Index: mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h -=================================================================== ---- mozilla-release/gfx/skia/skia/src/core/SkUtilsArm.h -+++ mozilla-release/gfx/skia/skia/src/core/SkUtilsArm.h -@@ -21,9 +21,9 @@ - #define SK_ARM_NEON_MODE_ALWAYS 1 - #define SK_ARM_NEON_MODE_DYNAMIC 2 - --#if defined(SK_CPU_ARM32) && defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT) -+#if defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT) - # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_DYNAMIC --#elif defined(SK_CPU_ARM32) && defined(__ARM_HAVE_NEON) || defined(SK_CPU_ARM64) -+#elif defined(__ARM_HAVE_NEON) - # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_ALWAYS - #else - # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_NONE diff --git a/build-stl-headers-fix-mbz1269171.patch b/build-stl-headers-fix-mbz1269171.patch deleted file mode 100644 index 7f9db14..0000000 --- a/build-stl-headers-fix-mbz1269171.patch +++ /dev/null @@ -1,169 +0,0 @@ -diff -up firefox-44.0/config/gcc-stl-wrapper.template.h.1269171 firefox-44.0/config/gcc-stl-wrapper.template.h ---- firefox-44.0/config/gcc-stl-wrapper.template.h.1269171 2017-06-01 12:06:24.481286748 +0200 -+++ firefox-44.0/config/gcc-stl-wrapper.template.h 2017-06-01 12:09:28.883022995 +0200 -@@ -17,24 +17,6 @@ - // Silence "warning: #include_next is a GCC extension" - #pragma GCC system_header - --// mozalloc.h wants ; break the cycle by always explicitly --// including here. NB: this is a tad sneaky. Sez the gcc docs: --// --// `#include_next' does not distinguish between and "file" --// inclusion, nor does it check that the file you specify has the --// same name as the current file. It simply looks for the file --// named, starting with the directory in the search path after the --// one where the current file was found. --#include_next -- --// See if we're in code that can use mozalloc. NB: this duplicates --// code in nscore.h because nscore.h pulls in prtypes.h, and chromium --// can't build with that being included before base/basictypes.h. --#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) --# include "mozilla/mozalloc.h" --#else --# error "STL code can only be used with infallible ::operator new()" --#endif - - #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) - // Enable checked iterators and other goodies -@@ -46,10 +28,34 @@ - // # define _GLIBCXX_DEBUG 1 - #endif - -+// Don't include mozalloc for cstdlib. See bug 1245076. -+#ifndef moz_dont_include_mozalloc_for_cstdlib -+# define moz_dont_include_mozalloc_for_cstdlib -+#endif -+ -+// Include mozalloc after the STL header and all other headers it includes -+// have been preprocessed. -+#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \ -+ !defined(moz_dont_include_mozalloc_for_${HEADER}) -+# define MOZ_INCLUDE_MOZALLOC_H -+# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} -+#endif -+ - #pragma GCC visibility push(default) - #include_next <${HEADER}> - #pragma GCC visibility pop - -+#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} -+// See if we're in code that can use mozalloc. NB: this duplicates -+// code in nscore.h because nscore.h pulls in prtypes.h, and chromium -+// can't build with that being included before base/basictypes.h. -+# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) -+# include "mozilla/mozalloc.h" -+# else -+# error "STL code can only be used with infallible ::operator new()" -+# endif -+#endif -+ - // gcc calls a __throw_*() function from bits/functexcept.h when it - // wants to "throw an exception". functexcept exists nominally to - // support -fno-exceptions, but since we'll always use the system -diff -up firefox-44.0/config/make-stl-wrappers.py.1269171 firefox-44.0/config/make-stl-wrappers.py ---- firefox-44.0/config/make-stl-wrappers.py.1269171 2016-01-24 00:23:37.000000000 +0100 -+++ firefox-44.0/config/make-stl-wrappers.py 2017-06-01 12:06:24.482286747 +0200 -@@ -30,7 +30,6 @@ def main(outdir, compiler, template_file - os.mkdir(outdir) - - template = open(template_file, 'r').read() -- path_to_new = header_path('new', compiler) - - for header in open(header_list_file, 'r'): - header = header.rstrip() -@@ -40,8 +39,7 @@ def main(outdir, compiler, template_file - path = header_path(header, compiler) - with FileAvoidWrite(os.path.join(outdir, header)) as f: - f.write(string.Template(template).substitute(HEADER=header, -- HEADER_PATH=path, -- NEW_HEADER_PATH=path_to_new)) -+ HEADER_PATH=path)) - - - if __name__ == '__main__': -diff -up firefox-44.0/config/msvc-stl-wrapper.template.h.1269171 firefox-44.0/config/msvc-stl-wrapper.template.h ---- firefox-44.0/config/msvc-stl-wrapper.template.h.1269171 2016-01-24 00:23:37.000000000 +0100 -+++ firefox-44.0/config/msvc-stl-wrapper.template.h 2017-06-01 12:06:24.482286747 +0200 -@@ -8,35 +8,23 @@ - #ifndef mozilla_${HEADER}_h - #define mozilla_${HEADER}_h - --#ifndef MOZ_HAVE_INCLUDED_ALLOC --#define MOZ_HAVE_INCLUDED_ALLOC -- - #if _HAS_EXCEPTIONS - # error "STL code can only be used with -fno-exceptions" - #endif - -+// Include mozalloc after the STL header and all other headers it includes -+// have been preprocessed. -+#if !defined(MOZ_INCLUDE_MOZALLOC_H) -+# define MOZ_INCLUDE_MOZALLOC_H -+# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} -+#endif -+ - // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k - // CRT doesn't export std::_Throw(). So we define it. - #ifndef mozilla_Throw_h - # include "mozilla/throw_msvc.h" - #endif - --// Code might include before other wrapped headers, but --// includes and so we want to wrap it. But mozalloc.h --// wants also, so we break the cycle by always explicitly --// including here. --#include <${NEW_HEADER_PATH}> -- --// See if we're in code that can use mozalloc. NB: this duplicates --// code in nscore.h because nscore.h pulls in prtypes.h, and chromium --// can't build with that being included before base/basictypes.h. --#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) --# include "mozilla/mozalloc.h" --#else --# error "STL code can only be used with infallible ::operator new()" --#endif --#endif /* MOZ_HAVE_INCLUDED_ALLOC */ -- - #ifdef _DEBUG - // From - // http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx -@@ -75,4 +63,15 @@ - - #pragma warning( pop ) - -+#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} -+// See if we're in code that can use mozalloc. NB: this duplicates -+// code in nscore.h because nscore.h pulls in prtypes.h, and chromium -+// can't build with that being included before base/basictypes.h. -+# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) -+# include "mozilla/mozalloc.h" -+# else -+# error "STL code can only be used with infallible ::operator new()" -+# endif -+#endif -+ - #endif // if mozilla_${HEADER}_h -diff -up firefox-44.0/memory/mozalloc/mozalloc.h.1269171 firefox-44.0/memory/mozalloc/mozalloc.h ---- firefox-44.0/memory/mozalloc/mozalloc.h.1269171 2016-01-24 00:23:44.000000000 +0100 -+++ firefox-44.0/memory/mozalloc/mozalloc.h 2017-06-01 12:06:24.482286747 +0200 -@@ -12,10 +12,17 @@ - * https://bugzilla.mozilla.org/show_bug.cgi?id=427099 - */ - --#include --#include - #if defined(__cplusplus) - # include -+// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the -+// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code -+// using things defined there. Specifically, with stdlib.h, the use of abs() -+// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs() -+# include -+# include -+#else -+# include -+# include - #endif - - #if defined(__cplusplus) diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..3f37036 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +This package is no longer supported by upstream diff --git a/firefox-build-prbool.patch b/firefox-build-prbool.patch deleted file mode 100644 index c7424ea..0000000 --- a/firefox-build-prbool.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up mozilla-release/security/certverifier/OCSPCache.h.old mozilla-release/security/certverifier/OCSPCache.h ---- mozilla-release/security/certverifier/OCSPCache.h.old 2014-10-14 12:33:46.519970732 +0200 -+++ mozilla-release/security/certverifier/OCSPCache.h 2014-10-14 12:34:44.418000625 +0200 -@@ -25,6 +25,7 @@ - #ifndef mozilla_psm_OCSPCache_h - #define mozilla_psm_OCSPCache_h - -+#include "prtypes.h" - #include "hasht.h" - #include "mozilla/Mutex.h" - #include "mozilla/Vector.h" diff --git a/firefox-gcc-6.0.patch b/firefox-gcc-6.0.patch deleted file mode 100644 index 0a74d36..0000000 --- a/firefox-gcc-6.0.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up firefox-44.0/nsprpub/config/make-system-wrappers.pl.back firefox-44.0/nsprpub/config/make-system-wrappers.pl ---- firefox-44.0/nsprpub/config/make-system-wrappers.pl.back 2016-01-24 00:23:49.000000000 +0100 -+++ firefox-44.0/nsprpub/config/make-system-wrappers.pl 2016-02-02 14:58:45.064112655 +0100 -@@ -19,7 +19,9 @@ while () { - open OUT, ">$output_dir/$_"; - print OUT "#pragma GCC system_header\n"; # suppress include_next warning - print OUT "#pragma GCC visibility push(default)\n"; -+ print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; - print OUT "#include_next \<$_\>\n"; -+ print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; - print OUT "#pragma GCC visibility pop\n"; - close OUT; - } -diff -up firefox-44.0/mozglue/build/arm.cpp.old firefox-44.0/mozglue/build/arm.cpp ---- firefox-44.0/mozglue/build/arm.cpp.old 2016-02-03 10:07:29.879526500 +0100 -+++ firefox-44.0/mozglue/build/arm.cpp 2016-02-03 10:08:11.062697517 +0100 -@@ -104,7 +104,9 @@ check_neon(void) - - # elif defined(__linux__) || defined(ANDROID) - # include -+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS - # include -+#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS - # include - - enum{ diff --git a/mozilla-193-pkgconfig.patch b/mozilla-193-pkgconfig.patch deleted file mode 100644 index 67ec302..0000000 --- a/mozilla-193-pkgconfig.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in ---- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in 2010-08-16 11:12:32.000000000 +0200 -@@ -6,5 +6,6 @@ idldir=%idldir% - Name: libxul-embedding - Description: Static library for version-independent embedding of the Mozilla runtime - Version: %MOZILLA_VERSION% -+Requires: %NSPR_NAME% >= %NSPR_VERSION% - Libs: -L${sdkdir}/lib -lxpcomglue -ldl - Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% -diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in ---- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in 2010-08-16 11:07:52.000000000 +0200 -@@ -2,6 +2,7 @@ prefix=%prefix% - sdkdir=%sdkdir% - includedir=%includedir% - idldir=%idldir% -+libdir=%libdir% - - Name: libxul - Description: The Mozilla Runtime and Embedding Engine -diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in ---- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk 2010-08-16 11:07:52.000000000 +0200 -+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in 2010-08-16 11:07:52.000000000 +0200 -@@ -116,6 +116,7 @@ endif - -e "s|%includedir%|$(includedir)|" \ - -e "s|%idldir%|$(idldir)|" \ - -e "s|%sdkdir%|$(sdkdir)|" \ -+ -e "s|%libdir%|$(installdir)|" \ - -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ - -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ - -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ diff --git a/mozilla-639554.patch b/mozilla-639554.patch deleted file mode 100644 index 12d32b2..0000000 --- a/mozilla-639554.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/toolkit/mozapps/installer/packager.mk -+++ b/toolkit/mozapps/installer/packager.mk -@@ -621,10 +621,12 @@ ifdef INSTALL_SDK # Here comes the hard - (cd $(DESTDIR)$(idldir) && tar -xf -) - # SDK directory is the libs + a bunch of symlinks - $(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/lib -+ $(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/bin - if test -f $(DIST)/include/xpcom-config.h; then \ - $(SYSINSTALL) $(IFLAGS1) $(DIST)/include/xpcom-config.h $(DESTDIR)$(sdkdir); \ - fi - (cd $(DIST)/sdk/lib && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/lib && tar -xf -) -+ (cd $(DIST)/sdk/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/bin && tar -xf -) - $(RM) -f $(DESTDIR)$(sdkdir)/lib $(DESTDIR)$(sdkdir)/bin $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/sdk/idl $(DESTDIR)$(sdkdir)/idl - ln -s $(sdkdir)/sdk/lib $(DESTDIR)$(sdkdir)/lib - ln -s $(installdir) $(DESTDIR)$(sdkdir)/bin diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch deleted file mode 100644 index 86e6f2e..0000000 --- a/mozilla-build-arm.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi ---- firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm 2015-03-05 11:28:19.000000000 +0100 -+++ firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi 2015-03-09 10:02:17.875243261 +0100 -@@ -235,19 +235,6 @@ - 'defines': [ - 'WEBRTC_ARCH_ARM', - ], -- 'conditions': [ -- ['arm_version==7', { -- 'defines': ['WEBRTC_ARCH_ARM_V7', -- 'WEBRTC_BUILD_NEON_LIBS'], -- 'conditions': [ -- ['arm_neon==1', { -- 'defines': ['WEBRTC_ARCH_ARM_NEON',], -- }, { -- 'defines': ['WEBRTC_DETECT_ARM_NEON',], -- }], -- ], -- }], -- ], - }], - ['os_bsd==1', { - 'defines': [ diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch deleted file mode 100644 index 3734ce5..0000000 --- a/rhbz-1219542-s390-build.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up firefox-43.0.3/js/src/configure.in.rhbz-1219542-s390 firefox-43.0.3/js/src/configure.in ---- firefox-43.0.3/js/src/configure.in.rhbz-1219542-s390 2015-12-23 17:11:01.000000000 -0500 -+++ firefox-43.0.3/js/src/configure.in 2016-01-03 08:08:27.139956990 -0500 -@@ -1466,7 +1466,7 @@ case "$host" in - - *-linux*|*-kfreebsd*-gnu|*-gnu*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" - ;; - - *) -@@ -1649,8 +1649,8 @@ ia64*-hpux*) - # while; Intel recommends against using it. - MOZ_OPTIMIZE_FLAGS="-O2" - elif test "$GNU_CC" -o "$GNU_CXX"; then -- MOZ_PGO_OPTIMIZE_FLAGS="-O3" -- MOZ_OPTIMIZE_FLAGS="-O3" -+ MOZ_PGO_OPTIMIZE_FLAGS="-O1" -+ MOZ_OPTIMIZE_FLAGS="-O1" - if test -z "$CLANG_CC"; then - MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" - fi diff --git a/rhbz-966424.patch b/rhbz-966424.patch deleted file mode 100644 index 7579d09..0000000 --- a/rhbz-966424.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm ---- firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 2014-10-14 08:12:14.358697255 +0200 -+++ firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm 2014-10-14 08:17:59.962181908 +0200 -@@ -174,7 +174,9 @@ this.checkCert = - } - - function isBuiltinToken(tokenName) { -- return tokenName == "Builtin Object Token"; -+ return tokenName == "Builtin Object Token" || -+ tokenName == "Default Trust" || -+ tokenName == "System Trust"; - } - - /** diff --git a/sources b/sources deleted file mode 100644 index 799823c..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (firefox-45.9.0esr.source.tar.xz) = 2e4c1f8bca0c59ac93ab918b996e3b6cf25e7279ad5800de256aa220e670c6aaab2036c3ead4020b80e2a0e8cda3ae5fe9b270106646c625ce4fd6ecfd66d9ca diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch deleted file mode 100644 index fe404ca..0000000 --- a/xulrunner-24.0-jemalloc-ppc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c ---- xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2013-09-11 01:15:18.000000000 +0200 -+++ xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c 2013-09-13 13:36:34.171680919 +0200 -@@ -1104,7 +1104,7 @@ static unsigned ncpus; - * controlling the malloc behavior are defined as compile-time constants - * for best performance and cannot be altered at runtime. - */ --#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) -+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !(defined(__powerpc__)) - #define MALLOC_STATIC_SIZES 1 - #endif - diff --git a/xulrunner-24.0-s390-inlines.patch b/xulrunner-24.0-s390-inlines.patch deleted file mode 100644 index 074f8d9..0000000 --- a/xulrunner-24.0-s390-inlines.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp ---- xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-10-23 16:04:01.773093979 +0200 -+++ xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-10-23 16:04:44.551134551 +0200 -@@ -4,6 +4,8 @@ - * 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 "jscntxtinlines.h" -+ - #include "vm/SPSProfiler.h" - - #include "mozilla/DebugOnly.h" diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch deleted file mode 100644 index 89d2972..0000000 --- a/xulrunner-install-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-45.9.0esr/config/baseconfig.mk.version-fix firefox-45.9.0esr/config/baseconfig.mk ---- firefox-45.9.0esr/config/baseconfig.mk.version-fix 2017-06-14 10:02:42.829306768 +0200 -+++ firefox-45.9.0esr/config/baseconfig.mk 2017-06-14 10:02:54.014302221 +0200 -@@ -4,7 +4,7 @@ - # whether a normal build is happening or whether the check is running. - includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) - sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - ifeq (.,$(DEPTH)) - DIST = dist diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig deleted file mode 100644 index 0dcf27d..0000000 --- a/xulrunner-mozconfig +++ /dev/null @@ -1,44 +0,0 @@ -. $topsrcdir/xulrunner/config/mozconfig -# --with-system-png is disabled because Mozilla requires APNG support in libpng -#ac_add_options --with-system-png - -ac_add_options --prefix="$PREFIX" -ac_add_options --libdir="$LIBDIR" -ac_add_options --with-system-jpeg -ac_add_options --with-system-zlib -ac_add_options --with-system-bz2 -ac_add_options --with-system-libvpx -ac_add_options --enable-system-hunspell -ac_add_options --with-pthreads -ac_add_options --disable-strip -ac_add_options --disable-tests -ac_add_options --disable-mochitest -ac_add_options --disable-installer -ac_add_options --enable-xinerama -ac_add_options --enable-default-toolkit=cairo-gtk2 -ac_add_options --enable-pango -ac_add_options --enable-svg -ac_add_options --enable-canvas -ac_add_options --disable-javaxpcom -ac_add_options --enable-safe-browsing -ac_add_options --enable-extensions=default -ac_add_options --enable-libnotify -ac_add_options --disable-necko-wifi -ac_add_options --enable-startup-notification -ac_add_options --disable-cpp-exceptions -ac_add_options --enable-url-classifier -ac_add_options --enable-gio -ac_add_options --disable-gnomevfs -ac_add_options --disable-updater -ac_add_options --enable-chrome-format=omni -ac_add_options --disable-gstreamer -ac_add_options --enable-pulseaudio -ac_add_options --disable-skia - -export BUILD_OFFICIAL=1 -export MOZILLA_OFFICIAL=1 -export MOZ_UA_BUILDID=20100101 - -mk_add_options BUILD_OFFICIAL=1 -mk_add_options MOZILLA_OFFICIAL=1 -mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir diff --git a/xulrunner-redhat-default-prefs.js b/xulrunner-redhat-default-prefs.js deleted file mode 100644 index 15a1e2a..0000000 --- a/xulrunner-redhat-default-prefs.js +++ /dev/null @@ -1,8 +0,0 @@ -pref("app.update.enabled", false); -pref("app.update.autoInstallEnabled", false); -pref("general.smoothScroll", true); -pref("intl.locale.matchOS", true); -pref("network.manage-offline-status", true); -pref("toolkit.storage.synchronous", 0); -pref("toolkit.networkmanager.disable", false); -pref("offline.autoDetect", true); diff --git a/xulrunner.sh.in b/xulrunner.sh.in deleted file mode 100644 index 534b840..0000000 --- a/xulrunner.sh.in +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# -# The contents of this file are subject to the Netscape Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/NPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -## -## Usage: -## -## $ xulrunner -## -## This script is meant to run a xulrunner program from the xulrunner -## rpm installation. -## - -cmdname=`basename $0` - -## -## Variables -## -XUL_ARCH=$(uname -m) -case $XUL_ARCH in - x86_64 | ia64 | s390 ) - XUL_LIB_DIR="/usr/lib64" - SECONDARY_LIB_DIR="/usr/lib" - ;; - * ) - XUL_LIB_DIR="/usr/lib" - SECONDARY_LIB_DIR="/usr/lib64" - ;; -esac - -if [ ! -x $XUL_LIB_DIR/xulrunner/xulrunner ]; then - if [ ! -x $SECONDARY_LIB_DIR/xulrunner/xulrunner ]; then - echo "Error: $XUL_LIB_DIR/xulrunner/xulrunner not found" - if [ -d $SECONDARY_LIB_DIR ]; then - echo " $SECONDARY_LIB_DIR/xulrunner/xulrunner not found" - fi - exit 1 - fi - XUL_LIB_DIR="$SECONDARY_LIB_DIR" -fi -XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner" -XUL_PROGRAM="$XUL_DIST_BIN/xulrunner" - -## -## Enable WebGL -## -MOZ_GLX_IGNORE_BLACKLIST=1 -export MOZ_GLX_IGNORE_BLACKLIST - - -exec $XUL_PROGRAM "$@" diff --git a/xulrunner.spec b/xulrunner.spec deleted file mode 100644 index ebb1e37..0000000 --- a/xulrunner.spec +++ /dev/null @@ -1,883 +0,0 @@ -# Use system nspr/nss? -%define system_nss 1 - -# Use system sqlite? -%if 0%{?fedora} < 20 -%define system_sqlite 0 -%define system_ffi 0 -%else -%define system_sqlite 1 -%define system_ffi 1 -%endif - -# Use system cairo? -%define system_cairo 0 - -# Build as a debug package? -%define debug_build 0 - -# Minimal required versions -%global cairo_version 1.10.2 -%global freetype_version 2.1.9 -%global libnotify_version 0.7.0 -%global libvpx_version 1.0.0 - -%if %{?system_nss} -%global nspr_version 4.10.10 -%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.27 -%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) -%endif - -%if %{?system_sqlite} -%global sqlite_version 3.8.4.2 -# The actual sqlite version (see #480989): -%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) -%endif - -# gecko_dir_ver should be set to the version in our directory names -# alpha_version should be set to the alpha number if using an alpha, 0 otherwise -# beta_version should be set to the beta number if using a beta, 0 otherwise -# rc_version should be set to the RC number if using an RC, 0 otherwise -%global gecko_dir_ver %{version} -%global alpha_version 0 -%global beta_version 0 -%global rc_version 0 - -%global tarballname firefox -%global mozappdir %{_libdir}/%{name} -%global tarballdir %{tarballname}-%{version}esr - -# crash reporter work only on x86/x86_64 -%ifarch %{ix86} x86_64 -%global enable_mozilla_crashreporter 1 -%else -%global enable_mozilla_crashreporter 0 -%endif - -%if %{alpha_version} > 0 -%global pre_version a%{alpha_version} -%global tarballdir mozilla-beta -%endif -%if %{beta_version} > 0 -%global pre_version b%{beta_version} -%global tarballdir mozilla-beta -%endif -%if %{rc_version} > 0 -%global pre_version rc%{rc_version} -%global tarballdir mozilla-release -%endif - -%if %{defined pre_version} -%global gecko_verrel %{expand:%%{version}}-%{pre_version} -%global pre_tag .%{pre_version} -%else -%global gecko_verrel %{expand:%%{version}} -%endif - -Summary: XUL Runtime for Gecko Applications -Name: xulrunner -Version: 45.9.0 -Release: 10%{?pre_tag}%{?dist} -URL: http://developer.mozilla.org/En/XULRunner -License: MPLv1.1 or GPLv2+ or LGPLv2+ -Group: Applications/Internet -Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}esr.source.tar.xz -Source10: %{name}-mozconfig -Source12: %{name}-redhat-default-prefs.js -Source21: %{name}.sh.in - -# build patches -Patch1: xulrunner-install-dir.patch -Patch3: mozilla-build-arm.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 -Patch18: xulrunner-24.0-jemalloc-ppc.patch -# workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) -Patch19: xulrunner-24.0-s390-inlines.patch -Patch20: firefox-build-prbool.patch -Patch21: aarch64-fix-skia.patch -Patch24: rhbz-1219542-s390-build.patch -Patch25: firefox-gcc-6.0.patch -Patch26: build-stl-headers-fix-mbz1269171.patch - -# Fedora specific patches -Patch200: mozilla-193-pkgconfig.patch -# Unable to install addons from https pages -Patch204: rhbz-966424.patch - -# Upstream patches - -# --------------------------------------------------- - -%if %{?system_nss} -BuildRequires: nspr-devel >= %{nspr_version} -BuildRequires: nss-devel >= %{nss_version} -BuildRequires: nss-static >= %{nss_version} -%endif -%if %{?system_cairo} -BuildRequires: cairo-devel >= %{cairo_version} -%endif -BuildRequires: libpng-devel -BuildRequires: libjpeg-devel -BuildRequires: zip -BuildRequires: bzip2-devel -BuildRequires: zlib-devel -BuildRequires: libIDL-devel -BuildRequires: gtk2-devel -BuildRequires: krb5-devel -BuildRequires: pango-devel -BuildRequires: freetype-devel >= %{freetype_version} -BuildRequires: libXt-devel -BuildRequires: libXrender-devel -BuildRequires: hunspell-devel -BuildRequires: startup-notification-devel -BuildRequires: alsa-lib-devel -BuildRequires: libnotify-devel >= %{libnotify_version} -BuildRequires: mesa-libGL-devel -BuildRequires: libcurl-devel -BuildRequires: libvpx-devel >= %{libvpx_version} -BuildRequires: autoconf213 -BuildRequires: pulseaudio-libs-devel -BuildRequires: pkgconfig(gconf-2.0) -BuildRequires: yasm -BuildRequires: dbus-glib-devel - -Requires: mozilla-filesystem -%if %{?system_nss} -Requires: nspr >= %{nspr_build_version} -Requires: nss >= %{nss_build_version} -%endif -Provides: gecko-libs = %{gecko_verrel} -Provides: gecko-libs%{?_isa} = %{gecko_verrel} -Conflicts: firefox < 3.6 - -%if %{?system_sqlite} -BuildRequires: sqlite-devel >= %{sqlite_version} -Requires: sqlite >= %{sqlite_build_version} -%endif - -%if %{?system_ffi} -BuildRequires: libffi-devel -%endif - -%description -XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM -applications that are as rich as Firefox and Thunderbird. It provides mechanisms -for installing, upgrading, and uninstalling these applications. XULRunner also -provides libxul, a solution which allows the embedding of Mozilla technologies -in other projects and products. - -%package devel -Summary: Development files for Gecko -Group: Development/Libraries -Obsoletes: mozilla-devel < 1.9 -Obsoletes: firefox-devel < 2.1 -Obsoletes: xulrunner-devel-unstable -Provides: gecko-devel = %{gecko_verrel} -Provides: gecko-devel%{?_isa} = %{gecko_verrel} -Provides: gecko-devel-unstable = %{gecko_verrel} -Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} - -Requires: xulrunner = %{version}-%{release} -%if %{?system_nss} -Requires: nspr-devel >= %{nspr_build_version} -Requires: nss-devel >= %{nss_build_version} -%endif -%if %{?system_cairo} -Requires: cairo-devel >= %{cairo_version} -%endif -Requires: libjpeg-devel -Requires: zip -Requires: bzip2-devel -Requires: zlib-devel -Requires: libIDL-devel -Requires: gtk2-devel -Requires: krb5-devel -Requires: pango-devel -Requires: freetype-devel >= %{freetype_version} -Requires: libXt-devel -Requires: libXrender-devel -Requires: hunspell-devel -%if %{?system_sqlite} -Requires: sqlite-devel -%endif -Requires: startup-notification-devel -Requires: alsa-lib-devel -Requires: libnotify-devel -Requires: mesa-libGL-devel -Requires: libvpx-devel >= %{libvpx_version} - -%description devel -This package contains the libraries amd header files that are needed -for writing XUL+XPCOM applications with Mozilla XULRunner and Gecko. - -%if %{enable_mozilla_crashreporter} -%global moz_debug_prefix %{_prefix}/lib/debug -%global moz_debug_dir %{moz_debug_prefix}%{mozappdir} -%global uname_m %(uname -m) -%global symbols_file_name %{name}-%{version}.en-US.%{_os}-%{uname_m}.crashreporter-symbols.zip -%global symbols_file_path %{moz_debug_dir}/%{symbols_file_name} -%global _find_debuginfo_opts -p %{symbols_file_path} -o debugcrashreporter.list -%global crashreporter_pkg_name mozilla-crashreporter-%{name}-debuginfo -%package -n %{crashreporter_pkg_name} -Summary: Debugging symbols used by Mozilla's crash reporter servers -Group: Development/Debug -%description -n %{crashreporter_pkg_name} -This package provides debug information for XULRunner, for use by -Mozilla's crash reporter servers. If you are trying to locally -debug %{name}, you want to install %{name}-debuginfo instead. -%files -n %{crashreporter_pkg_name} -f debugcrashreporter.list -%defattr(-,root,root) -%endif - -#--------------------------------------------------------------------- - -%prep -%setup -q -c -cd %{tarballdir} - -%patch1 -p1 -#%patch3 -p2 -b .arm -%patch18 -p2 -b .jemalloc-ppc -%patch19 -p2 -b .s390-inlines -%patch20 -p1 -b .prbool -%patch21 -p1 -b .aarch64-fix-skia -%ifarch s390 -%patch24 -p1 -b .rhbz-1219542-s390 -%endif -%patch25 -p1 -b .gcc6 -%patch26 -p1 -b .1269171 - -%patch200 -p2 -b .pk -%patch204 -p2 -b .966424 - -%{__rm} -f .mozconfig -%{__cp} %{SOURCE10} .mozconfig - -%if %{?system_nss} -echo "ac_add_options --with-system-nspr" >> .mozconfig -echo "ac_add_options --with-system-nss" >> .mozconfig -%else -echo "ac_add_options --without-system-nspr" >> .mozconfig -echo "ac_add_options --without-system-nss" >> .mozconfig -%endif - -%if %{?system_sqlite} -echo "ac_add_options --enable-system-sqlite" >> .mozconfig -%else -echo "ac_add_options --disable-system-sqlite" >> .mozconfig -%endif - -%if %{?system_cairo} -echo "ac_add_options --enable-system-cairo" >> .mozconfig -%else -echo "ac_add_options --disable-system-cairo" >> .mozconfig -%endif - -%if %{?system_ffi} -echo "ac_add_options --enable-system-ffi" >> .mozconfig -%endif - - -%if %{?debug_build} -echo "ac_add_options --enable-debug" >> .mozconfig -echo "ac_add_options --disable-optimize" >> .mozconfig -%else -echo "ac_add_options --disable-debug" >> .mozconfig -%ifarch ppc64le aarch64 -echo 'ac_add_options --enable-optimize="-g -O2"' >> .mozconfig -%else -echo "ac_add_options --enable-optimize" >> .mozconfig -%endif -%endif - -# s390(x) fails to start with jemalloc enabled -%ifarch s390 s390x -echo "ac_add_options --disable-jemalloc" >> .mozconfig -%endif - -%ifarch armv7hl -echo "ac_add_options --with-arch=armv7-a" >> .mozconfig -echo "ac_add_options --with-float-abi=hard" >> .mozconfig -echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig -echo "ac_add_options --disable-elf-hack" >> .mozconfig -%endif -%ifarch armv7hnl -echo "ac_add_options --with-arch=armv7-a" >> .mozconfig -echo "ac_add_options --with-float-abi=hard" >> .mozconfig -echo "ac_add_options --with-fpu=neon" >> .mozconfig -echo "ac_add_options --disable-elf-hack" >> .mozconfig -%endif -%ifarch armv5tel -echo "ac_add_options --with-arch=armv5te" >> .mozconfig -echo "ac_add_options --with-float-abi=soft" >> .mozconfig -echo "ac_add_options --disable-elf-hack" >> .mozconfig -echo "ac_add_options --disable-ion" >> .mozconfig -echo "ac_add_options --disable-yarr-jit" >> .mozconfig -%endif - -#Workarounf for mozbz#1245783 -%if 0%{?fedora} > 23 -echo "ac_add_options --disable-ion" >> .mozconfig -%endif - -%ifnarch %{ix86} x86_64 -echo "ac_add_options --disable-webrtc" >> .mozconfig -%endif - -#--------------------------------------------------------------------- - -%build -%if %{?system_sqlite} -# Do not proceed with build if the sqlite require would be broken: -# make sure the minimum requirement is non-empty, ... -sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 -# ... and that major number of the computed build-time version matches: -case "%{sqlite_build_version}" in - "$sqlite_version"*) ;; - *) exit 1 ;; -esac -%endif - -cd %{tarballdir} - -# Update the various config.guess to upstream release for aarch64 support -find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' - -# -fpermissive is needed to build with gcc 4.6+ which has become stricter -# -# Mozilla builds with -Wall with exception of a few warnings which show up -# everywhere in the code; so, don't override that. -# -# Disable C++ exceptions since Mozilla code is not exception-safe -# -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-Wall//') -%if %{?debug_build} -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') -%endif -%ifarch s390 -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') -# If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which -# overrides the -g1 from line above and breaks building on s390 -# (OOM when linking, rhbz#1238225) -export MOZ_DEBUG_FLAGS=" " -%endif -%ifarch s390 %{arm} ppc aarch64 -MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" -%endif - -#rhbz#1037063 -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" - -export CFLAGS="$MOZ_OPT_FLAGS" -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" -export LDFLAGS=$MOZ_LINK_FLAGS - -export PREFIX='%{_prefix}' -export LIBDIR='%{_libdir}' - -MOZ_SMP_FLAGS=-j1 -# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, -# however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 %{arm} -[ -z "$RPM_BUILD_NCPUS" ] && \ - RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" -[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 -[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 -[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 -%endif - -make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" - -# create debuginfo for crash-stats.mozilla.com -%if %{enable_mozilla_crashreporter} -#cd %{moz_objdir} -make -C objdir buildsymbols -%endif - -#--------------------------------------------------------------------- - -%install -cd %{tarballdir} - -# set up our prefs before install, so it gets pulled in to omni.jar -%{__cp} -p %{SOURCE12} objdir/dist/bin/defaults/pref/all-redhat.js - -DESTDIR=$RPM_BUILD_ROOT make -C objdir install - -# Start script install -%{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} -%{__cat} %{SOURCE21} | %{__sed} -e 's,XULRUNNER_VERSION,%{gecko_dir_ver},g' > \ - $RPM_BUILD_ROOT%{_bindir}/%{name} -%{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/%{name} - -%{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config - -# install install_app.py -%{__cp} objdir/dist/bin/install_app.py $RPM_BUILD_ROOT%{mozappdir} - -# Copy pc files (for compatibility with 1.9.1) -%{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul.pc \ - $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-unstable.pc -%{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding.pc \ - $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding-unstable.pc - -# Fix multilib devel conflicts... -function install_file() { -genheader=$* -mv ${genheader}.h ${genheader}%{__isa_bits}.h -cat > ${genheader}.h << EOF -/* This file exists to fix multilib conflicts */ -#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__aarch64__) -#include "${genheader}64.h" -#else -#include "${genheader}32.h" -#endif -EOF -} - -INTERNAL_APP_NAME=%{name}-%{gecko_dir_ver} - -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} -install_file "mozilla-config" -install_file "js-config" -popd - -# Link libraries in sdk directory instead of copying them: -pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/lib -for i in *.so; do - rm $i - ln -s %{mozappdir}/$i $i -done -popd - -# Move sdk/bin to xulrunner libdir -pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin -mv ply *.py $RPM_BUILD_ROOT%{mozappdir} -popd -rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin - -# Library path -LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d -LD_CONF_FILE=xulrunner-%{__isa_bits}.conf - -%{__mkdir_p} ${RPM_BUILD_ROOT}${LD_SO_CONF_D} -%{__cat} > ${RPM_BUILD_ROOT}${LD_SO_CONF_D}/${LD_CONF_FILE} << EOF -%{mozappdir} -EOF - -# Copy over the LICENSE -%{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir} - -# Install xpcshell -%{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} - -# Install run-mozilla.sh -%{__cp} objdir/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{mozappdir} - -# Use the system hunspell dictionaries -%{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries -ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries - -# Remove tmp files -find $RPM_BUILD_ROOT/%{mozappdir} -name '.mkdir.done' -exec rm -rf {} \; - -# ghost files -%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components -touch $RPM_BUILD_ROOT%{mozappdir}/components/compreg.dat -touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat - -# Add debuginfo for crash-stats.mozilla.com -%if %{enable_mozilla_crashreporter} -%{__mkdir_p} $RPM_BUILD_ROOT/%{moz_debug_dir} -%{__cp} objdir/dist/%{symbols_file_name} $RPM_BUILD_ROOT/%{moz_debug_dir} -%endif - -#--------------------------------------------------------------------- - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%preun -# is it a final removal? -if [ $1 -eq 0 ]; then - %{__rm} -rf %{mozappdir}/components -fi - -%files -%defattr(-,root,root,-) -%{_bindir}/xulrunner -%dir %{mozappdir} -%doc %attr(644, root, root) %{mozappdir}/LICENSE -%doc %attr(644, root, root) %{mozappdir}/README.xulrunner -%{mozappdir}/chrome -%{mozappdir}/dictionaries -%dir %{mozappdir}/components -%ghost %{mozappdir}/components/compreg.dat -%ghost %{mozappdir}/components/xpti.dat -%{mozappdir}/omni.ja -%{mozappdir}/*.so -%ifarch %{ix86} x86_64 -%{mozappdir}/rapl -%endif -%{mozappdir}/run-mozilla.sh -%{mozappdir}/xulrunner -%{mozappdir}/xulrunner-stub -%{mozappdir}/platform.ini -%{mozappdir}/dependentlibs.list -%{_sysconfdir}/ld.so.conf.d/xulrunner*.conf -%{mozappdir}/plugin-container -%{mozappdir}/gmp-clearkey -%if !%{?system_nss} -%{mozappdir}/*.chk -%endif -%if %{enable_mozilla_crashreporter} -%{mozappdir}/crashreporter -%{mozappdir}/crashreporter.ini -%{mozappdir}/Throbber-small.gif -%endif -%{mozappdir}/install_app.py -%ghost %{mozappdir}/install_app.pyc -%ghost %{mozappdir}/install_app.pyo -%{mozappdir}/gmp-fake*/* - -%files devel -%defattr(-,root,root,-) -%dir %{_libdir}/%{name}-devel-* -%{_datadir}/idl/%{name}*%{gecko_dir_ver} -%{_includedir}/%{name}*%{gecko_dir_ver} -%{_libdir}/%{name}-devel-*/* -%{_libdir}/pkgconfig/*.pc -%{mozappdir}/xpcshell -%{mozappdir}/*.py -%ghost %{mozappdir}/*.pyc -%ghost %{mozappdir}/*.pyo -%dir %{mozappdir}/ply -%{mozappdir}/ply/*.py -%ghost %{mozappdir}/ply/*.pyc -%ghost %{mozappdir}/ply/*.pyo - -#--------------------------------------------------------------------- - -%changelog -* Wed Jun 14 2017 Jan Horak - 45.9.0-1 -- Update to 45.9.0 (esr) sources - -* Sat Feb 11 2017 Fedora Release Engineering - 44.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jan 20 2017 Martin Stransky - 44.0-9 -- Added fix for new nss 3.28.1 (mozbz#1290037) - -* Thu Dec 15 2016 Martin Stransky - 44.0-8 -- Rebuilt - -* Fri Jul 22 2016 Tom Callaway - 44.0-7 -- rebuild for libvpx 1.6.0 - -* Wed Apr 27 2016 Peter Robinson 44.0-6 -- Added fix for rhbz#1315225 - ppc64le/aarch64 build fixes - -* Wed Mar 02 2016 Marcin Juszkiewicz - 44.0-5 -- Fix WebRTC on AArch64 again. - -* Mon Feb 15 2016 Martin Stransky - 44.0-4 -- gcc 6 build fix - -* Fri Feb 05 2016 Fedora Release Engineering - 44.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jan 26 2016 Martin Stransky - 44.0-1 -- Update to 44.0 - -* Tue Dec 1 2015 Tom Callaway - 42.0-2 -- rebuild for libvpx 1.5.0 - -* Tue Dec 1 2015 Martin Stransky - 42.0-1 -- Update to 42.0 - -* Wed Sep 2 2015 Martin Stransky - 40.0-2 -- Disable Skia to build on second arches - -* Tue Aug 25 2015 Petr Jasicek - 40.0-1 -- Update to 40.0 - -* Wed Jul 22 2015 Petr Jasicek - 39.0-3 -- Removed unneeded patch files - -* Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 -- fixed build - - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available - - refreshed mozilla-1005535.patch patch to apply - -* Fri Jul 10 2015 Martin Stransky - 39.0-1 -- Update to 39.0 - -* Fri Jun 19 2015 Fedora Release Engineering - 38.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu May 7 2015 Martin Stransky - 38.0-1 -- Update to 38.0 Build 2 - -* Mon Apr 27 2015 Jan Horak - 37.0.2-2 -- Added patch for big endian arches - -* Thu Apr 16 2015 Jan Horak - 37.0.2-1 -- Update to 37.0.2 - -* Wed Apr 15 2015 Martin Stransky - 37.0.1-1 -- Update to 37.0.1 - -* Mon Apr 6 2015 Tom Callaway - 33.0-3 -- rebuild for libvpx 1.4.0 - -* Wed Oct 22 2014 Dan Horák - 33.0-2 -- Fix filelist for secondary arches - -* Thu Oct 16 2014 Martin Stransky - 33.0-1 -- Update to 33.0 - -* Sat Sep 20 2014 Peter Robinson 32.0.2-1 -- Update to 32.0.2 -- sync fixes to the same as firefox - -* Tue Sep 9 2014 Martin Stransky - 32.0-2 -- move /sdk/bin to xulrunner libdir - -* Tue Aug 26 2014 Martin Stransky - 32.0-1 -- Update to 32.0 build 1 - -* Mon Aug 18 2014 Fedora Release Engineering - 31.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Fri Jul 25 2014 Martin Stransky - 31.0-1 -- Update to 31.0 build 2 - -* Fri Jul 25 2014 Yaakov Selkowitz - 30.0-3 -- Fix mozilla-config.h wrapper on aarch64 - -* Sun Jun 08 2014 Fedora Release Engineering - 30.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Jun 5 2014 Martin Stransky - 30.0-1 -- Update to 30.0 build 1 -- Disabled shared js - -* Fri May 23 2014 Martin Stransky - 29.0-5 -- Added a build fix for ppc64 - rhbz#1100495 - -* Thu May 15 2014 Peter Robinson 29.0-4 -- Update aarch64 bits - -* Thu May 15 2014 Peter Robinson 29.0-3 -- Add upstream patches for aarch64 support - -* Mon Apr 28 2014 Martin Stransky - 29.0-2 -- An updated ppc64le patch (rhbz#1091054) - -* Mon Apr 28 2014 Martin Stransky - 29.0-1 -- Update to 29.0 - -* Tue Mar 18 2014 Martin Stransky - 28.0-1 -- Update to 28.0 -- Fixed arm patch - -* Mon Feb 3 2014 Martin Stransky - 27.0-1 -- Update to 27.0 - -* Fri Dec 13 2013 Martin Stransky - 26.0-2 -- rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" - flag is used - -* Mon Dec 9 2013 Martin Stransky - 26.0-1 -- Update to 26.0 Build 2 - -* Thu Nov 21 2013 Martin Stransky - 25.0-5 -- Fixed rhbz#1007603 - NSS and cert9 (sql): firefox crash on exit - with https-everywhere installed - -* Tue Nov 12 2013 Martin Stransky - 25.0-4 -- rhbz#1010916 - enabled pluseaudio backend - -* Fri Nov 8 2013 Martin Stransky - 25.0-3 -- Fixed rhbz#974718 - Segfault in FileBlockCache::Run - when playing a movie on ppc - -* Wed Oct 30 2013 Martin Stransky - 25.0-2 -- Update to 25.0 Build 3 - -* Wed Oct 23 2013 Martin Stransky - 25.0-1 -- Update to 25.0 Build 2 - -* Tue Oct 15 2013 Karsten Hopp 24.0-3 -- drop PPC-only rhbz-911314.patch, fixed upstream - -* Mon Sep 16 2013 Martin Stransky - 24.0.1-2 -- Arm build fix - -* Fri Sep 13 2013 Martin Stransky - 24.0.1-1 -- Update to 24.0 - -* Mon Sep 2 2013 Dan Horák - 23.0.1-4 -- Fix build on 64-bit big endian platforms (mozbz#618485) - -* Sat Aug 31 2013 Karsten Hopp 23.0.1-3 -- update rhbz-911314.patch (PPC* only) - -* Thu Aug 29 2013 Martin Stransky - 23.0.1-2 -- Enabled dtrace for debug builds - -* Mon Aug 19 2013 Jan Horak - 23.0.1-1 -- Update to 23.0.1 - -* Mon Aug 5 2013 Martin Stransky - 23.0-2 -- Update to latest upstream (23.0 Build 2) - -* Mon Aug 5 2013 Martin Stransky - 23.0-1 -- Update to latest upstream (23.0) - -* Mon Jul 29 2013 Jan Horak - 22.0-7 -- Use system libffi for Fedora 19+ -- Added fix for mozbz#860213 - -* Thu Jul 25 2013 Martin Stransky - 22.0-6 -- Removed already applied patches (rhbz#978123) - -* Wed Jul 24 2013 Peter Robinson 22.0-5 -- Enable web-rtc on ARM now it's fixed upstream (RHBZ 886976) - -* Mon Jul 1 2013 Jan Horak - 22.0-4 -- Added fix from mozbz#817533 - fix issues with proxy settings -- Fixed missing about:healthreport - -* Mon Jun 24 2013 Martin Stransky - 22.0-2 -- Rebuild - -* Fri Jun 21 2013 Martin Stransky - 22.0-1 -- Update to latest upstream (22.0) - -* Wed Jun 12 2013 Jan Horak - 21.0-8 -- Fixed rhbz#966424 - unable to install addons - -* Mon Jun 3 2013 Jan Horak - 21.0-7 -- Using upstream build flags for crashreporter - -* Wed May 29 2013 Martin Stransky - 21.0-6 -- Removed the i686/f19 gcc hack (rhbz#928353) - -* Tue May 21 2013 Martin Stransky - 21.0-5 -- Added ppc(64) patches (rhbz#963907) - -* Tue May 21 2013 Martin Stransky - 21.0-4 -- Added s390(x) patch - -* Mon May 13 2013 Martin Stransky - 21.0-3 -- New upstream tarball (build 4) - -* Mon May 13 2013 Martin Stransky - 21.0-2 -- Updated requested NSS/NSPR versions - -* Sun May 12 2013 Martin Stransky - 21.0-1 -- Update to latest upstream (21.0) - -* Fri Apr 5 2013 Martin Stransky - 20.0-4 -- Updated rhbz-911314.patch for xulrunner 20 - -* Wed Apr 3 2013 Martin Stransky - 20.0-3 -- A workaround for Bug 928353 - firefox i686 crashes - for a number of web pages - -* Tue Mar 19 2013 Martin Stransky - 20.0-1 -- Update to latest upstream (20.0) - -* Tue Mar 19 2013 Martin Stransky - 19.0.2-4 -- Added fix for rhbz#913284 - Firefox segfaults - in mozilla::gfx::AlphaBoxBlur::BoxBlur_C() on PPC64 - -* Tue Mar 19 2013 Martin Stransky - 19.0.2-3 -- Added fix for mozbz#826171/rhbz#922904 - strndup implementation - in memory/build/mozmemory_wrap.c is broken - -* Mon Mar 11 2013 Martin Stransky - 19.0.2-2 -- Update to 19.0.2 - -* Wed Feb 20 2013 Martin Stransky - 19.0-2 -- Added fix for rhbz#911314 (ppc only) - -* Mon Feb 18 2013 Martin Stransky - 19.0-1 -- Update to 19.0 -- Added fix for mozbz#239254 - -* Wed Feb 6 2013 Jan Horak - 18.0.2-1 -- Update to 18.0.2 - -* Fri Jan 25 2013 Jan Horak - 18.0.1-1 -- Update to 18.0.1 - -* Tue Jan 15 2013 Martin Stransky - 18.0-8 -- Added fix for NM regression (mozbz#791626) - -* Thu Jan 10 2013 Martin Stransky - 18.0-7 -- Fixed Makefile generator (rhbz#304121) - -* Wed Jan 9 2013 Martin Stransky - 18.0-6 -- Fixed missing libxpcom.so provides - -* Wed Jan 9 2013 Martin Stransky - 18.0-5 -- Added fix for langpacks - -* Wed Jan 9 2013 Martin Stransky - 18.0-4 -- Fixed source files -- Disabled WebRTC due to rhbz#304121 - -* Wed Jan 9 2013 Martin Stransky - 18.0-2 -- Disabled system sqlite on Fedora 18 - -* Mon Jan 7 2013 Martin Stransky - 18.0-1 -- Update to 18.0 - -* Thu Dec 13 2012 Peter Robinson 17.0.1-3 -- Disable webrtc on ARM as it currently tries to build SSE on ARM (fix FTBFS) -- Enable methodjit/tracejit on ARMv7 for more speed :) Fixes RHBZ 870548 - -* Fri Dec 7 2012 Jan Horak - 17.0.1-2 -- Fixed rhbz#879595 - -* Thu Nov 29 2012 Jan Horak - 17.0.1-1 -- Update to 17.0.1 - -* Tue Nov 27 2012 Jan Horak - 17.0-4 -- Rebuild agains older NSS - -* Mon Nov 19 2012 Martin Stransky - 17.0-3 -- Updated second arch patches - -* Mon Nov 19 2012 Dan Horák - 17.0-2 -- webrtc is available only on selected arches - -* Mon Nov 19 2012 Martin Stransky - 17.0-1 -- Update to 17.0 - -* Wed Nov 14 2012 Martin Stransky - 17.0-0.2b6 -- Update to 17.0 Beta 6 - -* Tue Nov 13 2012 Martin Stransky - 17.0-0.1b5 -- Update to 17.0 Beta 5 - -* Tue Nov 6 2012 Martin Stransky - 16.0.2-2 -- Added fix for rhbz#872752 - -* Wed Oct 31 2012 Martin Stransky - 16.0.2-1 -- Updated mozilla-746112.patch for second arches -- Removed unused one (rhbz#855919) - -* Fri Oct 26 2012 Jan Horak - 16.0.2-1 -- Update to 16.0.2 - -* Tue Oct 16 2012 Jan Horak - 16.0.1-2 -- Fixed required nss and nspr version - -* Thu Oct 11 2012 Martin Stransky - 16.0.1-1 -- Update to 16.0.1 -