From d05fd93fefebb6bc1d07ca12de432d36944a8740 Mon Sep 17 00:00:00 2001 From: Grant Gayed Date: Mon, 9 May 2011 16:09:27 +0000 Subject: 343454 - XULRunner 2.0 kills Eclipse when opening anything Browser related --- .../Eclipse SWT PI/gtk/library/make_linux.mak | 2 +- .../Eclipse SWT WebKit/gtk/library/webkitgtk.h | 5 +++++ .../gtk/org/eclipse/swt/browser/WebKit.java | 12 +++++++++++- bundles/org.eclipse.swt/tasks/build.xml | 8 ++++---- 4 files changed, 21 insertions(+), 6 deletions(-) (limited to 'bundles') diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak index 7a744fe0e3..84e463a8d7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak @@ -91,7 +91,7 @@ MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdown \ -DNO_nsDynamicFunctionLoad XULRUNNEREXCLUDES = -DNO__1NS_1InitXPCOM2 -WEBKITCFLAGS = `pkg-config --cflags gtk+-2.0` -I/usr/include/webkit-1.0 -I/usr/include/libsoup-2.4 +WEBKITCFLAGS = `pkg-config --cflags webkit-1.0` WEBKITLIBS = `pkg-config --libs webkit-1.0` SWT_OBJECTS = swt.o c.o c_stats.o callback.o diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h index 05b9a2eaa3..96271e39d7 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h @@ -31,4 +31,9 @@ #include #include #include + +#if WEBKIT_CHECK_VERSION(1,4,0) +#include +#endif + #endif /* INC_webkitgtk_H */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java index 9a9ee3c0e6..784b4478e3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java @@ -89,10 +89,20 @@ class WebKit extends WebBrowser { static Callback JSObjectHasPropertyProc, JSObjectGetPropertyProc, JSObjectCallAsFunctionProc; static { + + /* + * WebKitGTK is binary-incompatible between its 1.2 and 1.4 releases, + * so swt has separate libraries compiled against each. + */ try { - Library.loadLibrary ("swt-webkit"); // $NON-NLS-1$ + Library.loadLibrary ("swt-webkit12"); // $NON-NLS-1$ LibraryLoaded = true; } catch (Throwable e) { + try { + Library.loadLibrary ("swt-webkit"); // $NON-NLS-1$ + LibraryLoaded = true; + } catch (Throwable e2) { + } } if (LibraryLoaded) { diff --git a/bundles/org.eclipse.swt/tasks/build.xml b/bundles/org.eclipse.swt/tasks/build.xml index 40e6100db5..46d5bd3716 100644 --- a/bundles/org.eclipse.swt/tasks/build.xml +++ b/bundles/org.eclipse.swt/tasks/build.xml @@ -170,7 +170,7 @@ - + @@ -566,11 +566,11 @@ - + - + @@ -628,7 +628,7 @@ Motif not built org.eclipse.swt.motif.linux.x86 org.eclipse.swt.motif.aix.ppc org.eclipse.swt.motif.hpux.ia64_32 org.eclipse.swt.motif.solaris.sparc --> - +