Ben Konrath 48553a3
### Eclipse Workspace Patch 1.0
Ben Konrath 48553a3
#P org.eclipse.swt
Ben Konrath 48553a3
Index: Eclipse_SWT_PI/gtk/library/make_linux.mak
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_PI/gtk/library/make_linux.mak,v
Ben Konrath 48553a3
retrieving revision 1.33.2.1
Ben Konrath 48553a3
diff -u -r1.33.2.1 make_linux.mak
Ben Konrath 48553a3
--- Eclipse_SWT_PI/gtk/library/make_linux.mak	26 Jul 2006 16:33:23 -0000	1.33.2.1
Ben Konrath 48553a3
+++ Eclipse_SWT_PI/gtk/library/make_linux.mak	29 Sep 2006 13:21:51 -0000
Ben Konrath 48553a3
@@ -202,7 +202,7 @@
Ben Konrath 48553a3
 #
Ben Konrath 48553a3
 # Mozilla lib
Ben Konrath 48553a3
 #
Ben Konrath 48553a3
-make_mozilla:$(MOZILLA_LIB) $(PROFILE14_LIB) $(PROFILE17_LIB) $(PROFILE18_LIB)
Ben Konrath 48553a3
+make_mozilla:$(MOZILLA_LIB)
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
Ben Konrath 48553a3
 	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS}
Ben Konrath 48553a3
@@ -220,22 +220,22 @@
Ben Konrath 48553a3
 	$(CXX) $(MOZILLACFLAGS) ${GECKO_INCLUDES} -c xpcom_stats.cpp	
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 $(PROFILE14_OBJECTS): xpcom_profile.cpp
Ben Konrath 48553a3
-	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} -c xpcom_profile.cpp	
Ben Konrath 48553a3
+	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 $(PROFILE17_OBJECTS): xpcom_profile.cpp
Ben Konrath 48553a3
-	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} -c xpcom_profile.cpp	
Ben Konrath 48553a3
+	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 $(PROFILE18_OBJECTS): xpcom_profile.cpp
Ben Konrath 48553a3
-	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} -c xpcom_profile.cpp	
Ben Konrath 48553a3
+	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 $(PROFILE14_LIB): $(PROFILE14_OBJECTS)
Ben Konrath 48553a3
-	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS}
Ben Konrath 48553a3
+	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS} ${GECKO_LIBS}
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 $(PROFILE17_LIB): $(PROFILE17_OBJECTS)
Ben Konrath 48553a3
-	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS}
Ben Konrath 48553a3
+	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS} ${GECKO_LIBS}
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 $(PROFILE18_LIB): $(PROFILE18_OBJECTS)
Ben Konrath 48553a3
-	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS}
Ben Konrath 48553a3
+	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS} ${GECKO_LIBS}
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 #
Ben Konrath 48553a3
 # GLX lib
Ben Konrath 48553a3
@@ -264,4 +264,4 @@
Ben Konrath 48553a3
 # Clean
Ben Konrath 48553a3
 #
Ben Konrath 48553a3
 clean:
Ben Konrath 48553a3
-	rm -f *.o *.so
Ben Konrath 48553a3
+	rm -f *.o *.so
Ben Konrath 48553a3
\ No newline at end of file
Ben Konrath 48553a3
Index: Eclipse_SWT_PI/gtk/library/build.sh
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_PI/gtk/library/build.sh,v
Ben Konrath 48553a3
retrieving revision 1.40
Ben Konrath 48553a3
diff -u -r1.40 build.sh
Ben Konrath 48553a3
--- Eclipse_SWT_PI/gtk/library/build.sh	22 Nov 2005 04:48:15 -0000	1.40
Ben Konrath 48553a3
+++ Eclipse_SWT_PI/gtk/library/build.sh	29 Sep 2006 13:21:51 -0000
Ben Konrath 48553a3
@@ -87,9 +87,9 @@
Ben Konrath 48553a3
 fi
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 if [ -z "${GECKO_INCLUDES}" -a -z "${GECKO_LIBS}" ]; then
Ben Konrath 48553a3
-	if [ x`pkg-config --exists mozilla-xpcom && echo YES` = "xYES" ]; then
Ben Konrath 48553a3
-		GECKO_INCLUDES=`pkg-config --cflags mozilla-xpcom`
Ben Konrath 48553a3
-		GECKO_LIBS=`pkg-config --libs mozilla-xpcom`
Ben Konrath 48553a3
+	if [ x`pkg-config --exists firefox-xpcom && echo YES` = "xYES" ]; then
Ben Konrath 48553a3
+		GECKO_INCLUDES=`pkg-config --cflags firefox-xpcom`
Ben Konrath 48553a3
+		GECKO_LIBS=`pkg-config --libs firefox-xpcom`
Ben Konrath 48553a3
 		export GECKO_INCLUDES
Ben Konrath 48553a3
 		export GECKO_LIBS
Ben Konrath 48553a3
 		MAKE_MOZILLA=make_mozilla
Ben Konrath 48553a3
Index: Eclipse_SWT_Mozilla/common/library/xpcom_stats.cpp
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_Mozilla/common/library/xpcom_stats.cpp,v
Ben Konrath 48553a3
retrieving revision 1.15.2.1
Ben Konrath 48553a3
diff -u -r1.15.2.1 xpcom_stats.cpp
Ben Konrath 48553a3
--- Eclipse_SWT_Mozilla/common/library/xpcom_stats.cpp	26 Jul 2006 16:33:23 -0000	1.15.2.1
Ben Konrath 48553a3
+++ Eclipse_SWT_Mozilla/common/library/xpcom_stats.cpp	29 Sep 2006 13:21:49 -0000
Ben Konrath 48553a3
@@ -31,15 +31,14 @@
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 #ifdef NATIVE_STATS
Ben Konrath 48553a3
 
Ben Konrath 48553a3
-int XPCOM_nativeFunctionCount = 132;
Ben Konrath 48553a3
-int XPCOM_nativeFunctionCallCount[132];
Ben Konrath 48553a3
+int XPCOM_nativeFunctionCount = 131;
Ben Konrath 48553a3
+int XPCOM_nativeFunctionCallCount[131];
Ben Konrath 48553a3
 char * XPCOM_nativeFunctionNames[] = {
Ben Konrath 48553a3
 	"Call",
Ben Konrath 48553a3
 	"NS_1GetComponentManager",
Ben Konrath 48553a3
 	"NS_1GetServiceManager",
Ben Konrath 48553a3
-	"NS_1InitEmbedding",
Ben Konrath 48553a3
+	"NS_1InitXPCOM3_FUNC",
Ben Konrath 48553a3
 	"NS_1NewLocalFile",
Ben Konrath 48553a3
-	"NS_1TermEmbedding",
Ben Konrath 48553a3
 	"PR_1Free",
Ben Konrath 48553a3
 	"PR_1Malloc",
Ben Konrath 48553a3
 	"VtblCall__II",
Ben Konrath 48553a3
Index: Eclipse_SWT_Mozilla/common/library/xpcom_profile.h
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_Mozilla/common/library/xpcom_profile.h,v
Ben Konrath 48553a3
retrieving revision 1.1.2.1
Ben Konrath 48553a3
diff -u -r1.1.2.1 xpcom_profile.h
Ben Konrath 48553a3
--- Eclipse_SWT_Mozilla/common/library/xpcom_profile.h	26 Jul 2006 16:33:23 -0000	1.1.2.1
Ben Konrath 48553a3
+++ Eclipse_SWT_Mozilla/common/library/xpcom_profile.h	29 Sep 2006 13:21:48 -0000
Ben Konrath 48553a3
@@ -32,7 +32,7 @@
Ben Konrath 48553a3
 #define NDEBUG
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 #include "nsCOMPtr.h"
Ben Konrath 48553a3
-#include "nsProfileDirServiceProvider.h"
Ben Konrath 48553a3
+#include "profdirserviceprovider/nsProfileDirServiceProvider.h"
Ben Konrath 48553a3
 #include "xpcom_stats.h"
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 #endif /* INC_xpcom_profile_H */
Ben Konrath 48553a3
Index: Eclipse_SWT_Mozilla/common/library/xpcom.h
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_Mozilla/common/library/xpcom.h,v
Ben Konrath 48553a3
retrieving revision 1.6.2.1
Ben Konrath 48553a3
diff -u -r1.6.2.1 xpcom.h
Ben Konrath 48553a3
--- Eclipse_SWT_Mozilla/common/library/xpcom.h	26 Jul 2006 16:33:23 -0000	1.6.2.1
Ben Konrath 48553a3
+++ Eclipse_SWT_Mozilla/common/library/xpcom.h	29 Sep 2006 13:21:48 -0000
Ben Konrath 48553a3
@@ -32,7 +32,6 @@
Ben Konrath 48553a3
 #define NDEBUG
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 #include "nsXPCOM.h"
Ben Konrath 48553a3
-#include "nsEmbedAPI.h"	
Ben Konrath 48553a3
 #include "nsEmbedString.h"
Ben Konrath 48553a3
 #include "nsIInputStream.h"
Ben Konrath 48553a3
 #include "nsISupportsUtils.h"
Ben Konrath 48553a3
Index: Eclipse_SWT_Mozilla/common/library/xpcom.cpp
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_Mozilla/common/library/xpcom.cpp,v
Ben Konrath 48553a3
retrieving revision 1.29.2.1
Ben Konrath 48553a3
diff -u -r1.29.2.1 xpcom.cpp
Ben Konrath 48553a3
--- Eclipse_SWT_Mozilla/common/library/xpcom.cpp	26 Jul 2006 16:33:23 -0000	1.29.2.1
Ben Konrath 48553a3
+++ Eclipse_SWT_Mozilla/common/library/xpcom.cpp	29 Sep 2006 13:21:48 -0000
Ben Konrath 48553a3
@@ -85,14 +85,16 @@
Ben Konrath 48553a3
 }
Ben Konrath 48553a3
 #endif
Ben Konrath 48553a3
 
Ben Konrath 48553a3
-#ifndef NO_NS_1InitEmbedding
Ben Konrath 48553a3
-JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1InitEmbedding)
Ben Konrath 48553a3
-	(JNIEnv *env, jclass that, jint arg0, jint arg1)
Ben Konrath 48553a3
+#ifndef NO_NS_1InitXPCOM3
Ben Konrath 48553a3
+JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1InitXPCOM3)
Ben Konrath 48553a3
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
Ben Konrath 48553a3
 {
Ben Konrath 48553a3
 	jint rc = 0;
Ben Konrath 48553a3
-	XPCOM_NATIVE_ENTER(env, that, NS_1InitEmbedding_FUNC);
Ben Konrath 48553a3
-	rc = (jint)NS_InitEmbedding((nsILocalFile *)arg0, (nsIDirectoryServiceProvider *)arg1);
Ben Konrath 48553a3
-	XPCOM_NATIVE_EXIT(env, that, NS_1InitEmbedding_FUNC);
Ben Konrath 48553a3
+	XPCOM_NATIVE_ENTER(env, that, NS_1GetComponentRegistrar_FUNC);
Ben Konrath 48553a3
+	rc = (jint)NS_InitXPCOM3((nsIServiceManager **)arg0, (nsIFile *)arg1,
Ben Konrath 48553a3
+		(nsIDirectoryServiceProvider *)arg2, (nsStaticModuleInfo *)arg3,
Ben Konrath 48553a3
+		(PRUint32) arg4);
Ben Konrath 48553a3
+	XPCOM_NATIVE_EXIT(env, that, NS_1GetComponentRegistrar_FUNC);
Ben Konrath 48553a3
 	return rc;
Ben Konrath 48553a3
 }
Ben Konrath 48553a3
 #endif
Ben Konrath 48553a3
@@ -113,18 +115,6 @@
Ben Konrath 48553a3
 }
Ben Konrath 48553a3
 #endif
Ben Konrath 48553a3
 
Ben Konrath 48553a3
-#ifndef NO_NS_1TermEmbedding
Ben Konrath 48553a3
-JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1TermEmbedding)
Ben Konrath 48553a3
-	(JNIEnv *env, jclass that)
Ben Konrath 48553a3
-{
Ben Konrath 48553a3
-	jint rc = 0;
Ben Konrath 48553a3
-	XPCOM_NATIVE_ENTER(env, that, NS_1TermEmbedding_FUNC);
Ben Konrath 48553a3
-	rc = (jint)NS_TermEmbedding();
Ben Konrath 48553a3
-	XPCOM_NATIVE_EXIT(env, that, NS_1TermEmbedding_FUNC);
Ben Konrath 48553a3
-	return rc;
Ben Konrath 48553a3
-}
Ben Konrath 48553a3
-#endif
Ben Konrath 48553a3
-
Ben Konrath 48553a3
 #ifndef NO_PR_1Free
Ben Konrath 48553a3
 JNIEXPORT void JNICALL XPCOM_NATIVE(PR_1Free)
Ben Konrath 48553a3
 	(JNIEnv *env, jclass that, jint arg0)
Ben Konrath 48553a3
Index: Eclipse_SWT_Mozilla/common/library/xpcom_stats.h
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_Mozilla/common/library/xpcom_stats.h,v
Ben Konrath 48553a3
retrieving revision 1.14.2.1
Ben Konrath 48553a3
diff -u -r1.14.2.1 xpcom_stats.h
Ben Konrath 48553a3
--- Eclipse_SWT_Mozilla/common/library/xpcom_stats.h	26 Jul 2006 16:33:23 -0000	1.14.2.1
Ben Konrath 48553a3
+++ Eclipse_SWT_Mozilla/common/library/xpcom_stats.h	29 Sep 2006 13:21:49 -0000
Ben Konrath 48553a3
@@ -41,9 +41,8 @@
Ben Konrath 48553a3
 	Call_FUNC,
Ben Konrath 48553a3
 	NS_1GetComponentManager_FUNC,
Ben Konrath 48553a3
 	NS_1GetServiceManager_FUNC,
Ben Konrath 48553a3
-	NS_1InitEmbedding_FUNC,
Ben Konrath 48553a3
+	NS_1InitXPCOM3_FUNC,
Ben Konrath 48553a3
 	NS_1NewLocalFile_FUNC,
Ben Konrath 48553a3
-	NS_1TermEmbedding_FUNC,
Ben Konrath 48553a3
 	PR_1Free_FUNC,
Ben Konrath 48553a3
 	PR_1Malloc_FUNC,
Ben Konrath 48553a3
 	VtblCall__II_FUNC,
Ben Konrath 48553a3
Index: Eclipse_SWT_Mozilla/gtk/org/eclipse/swt/browser/Browser.java
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_Mozilla/gtk/org/eclipse/swt/browser/Browser.java,v
Ben Konrath 48553a3
retrieving revision 1.61.2.2
Ben Konrath 48553a3
diff -u -r1.61.2.2 Browser.java
Ben Konrath 48553a3
--- Eclipse_SWT_Mozilla/gtk/org/eclipse/swt/browser/Browser.java	24 Aug 2006 20:19:25 -0000	1.61.2.2
Ben Konrath 48553a3
+++ Eclipse_SWT_Mozilla/gtk/org/eclipse/swt/browser/Browser.java	29 Sep 2006 13:21:51 -0000
Ben Konrath 48553a3
@@ -10,15 +10,75 @@
Ben Konrath 48553a3
  *******************************************************************************/
Ben Konrath 48553a3
 package org.eclipse.swt.browser;
Ben Konrath 48553a3
 
Ben Konrath 48553a3
-import java.io.*;
Ben Konrath 48553a3
-import java.util.*;
Ben Konrath 48553a3
-import org.eclipse.swt.*;
Ben Konrath 48553a3
-import org.eclipse.swt.widgets.*;
Ben Konrath 48553a3
-import org.eclipse.swt.graphics.*;
Ben Konrath 48553a3
-import org.eclipse.swt.internal.*;
Ben Konrath 48553a3
-import org.eclipse.swt.internal.gtk.*;
Ben Konrath 48553a3
-import org.eclipse.swt.internal.mozilla.*;
Ben Konrath 48553a3
-import org.eclipse.swt.layout.*;
Ben Konrath 48553a3
+import java.io.File;
Ben Konrath 48553a3
+import java.io.UnsupportedEncodingException;
Ben Konrath 48553a3
+import java.util.Locale;
Ben Konrath 48553a3
+import java.util.StringTokenizer;
Ben Konrath 48553a3
+
Ben Konrath 48553a3
+import org.eclipse.swt.SWT;
Ben Konrath 48553a3
+import org.eclipse.swt.SWTError;
Ben Konrath 48553a3
+import org.eclipse.swt.SWTException;
Ben Konrath 48553a3
+import org.eclipse.swt.graphics.Point;
Ben Konrath 48553a3
+import org.eclipse.swt.graphics.Rectangle;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.Callback;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.Converter;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.Library;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.gtk.GdkEvent;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.gtk.LONG;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.gtk.OS;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.XPCOM;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.XPCOMObject;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsEmbedString;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIAppShell;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIBaseWindow;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsICategoryManager;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIComponentManager;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIComponentRegistrar;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIContextMenuListener;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsICookie;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsICookieManager;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsID;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIDOMEvent;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIDOMMouseEvent;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIDOMWindow;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIDirectoryService;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIDocShell;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIEmbeddingSiteWindow;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIFile;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIIOService;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIInterfaceRequestor;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsILocalFile;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIPrefBranch;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIPrefLocalizedString;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIPrefService;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIProperties;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIRequest;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIServiceManager;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsISimpleEnumerator;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsISupports;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsISupportsWeakReference;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsITooltipListener;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIURI;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIURIContentListener;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWeakReference;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWebBrowser;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWebBrowserChrome;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWebBrowserChromeFocus;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWebBrowserFocus;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWebBrowserStream;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWebNavigation;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWebProgress;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWebProgressListener;
Ben Konrath 48553a3
+import org.eclipse.swt.internal.mozilla.nsIWindowWatcher;
Ben Konrath 48553a3
+import org.eclipse.swt.layout.FillLayout;
Ben Konrath 48553a3
+import org.eclipse.swt.widgets.Composite;
Ben Konrath 48553a3
+import org.eclipse.swt.widgets.Display;
Ben Konrath 48553a3
+import org.eclipse.swt.widgets.Event;
Ben Konrath 48553a3
+import org.eclipse.swt.widgets.Label;
Ben Konrath 48553a3
+import org.eclipse.swt.widgets.Listener;
Ben Konrath 48553a3
+import org.eclipse.swt.widgets.Menu;
Ben Konrath 48553a3
+import org.eclipse.swt.widgets.Shell;
Ben Konrath 48553a3
+import org.eclipse.swt.widgets.Widget;
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 /**
Ben Konrath 48553a3
  * Instances of this class implement the browser user interface
Ben Konrath 48553a3
@@ -175,40 +235,43 @@
Ben Konrath 48553a3
 		 * - mozilla17profile/mozilla17profile-gcc should succeed for mozilla 1.7.x and firefox
Ben Konrath 48553a3
 		 * - mozilla18profile/mozilla18profile-gcc should succeed for mozilla 1.8.x (seamonkey)
Ben Konrath 48553a3
 		 */
Ben Konrath 48553a3
-		try {
Ben Konrath 48553a3
-			Library.loadLibrary ("swt-mozilla14-profile"); //$NON-NLS-1$
Ben Konrath 48553a3
-			usingProfile = true;
Ben Konrath 48553a3
-		} catch (UnsatisfiedLinkError e1) {
Ben Konrath 48553a3
-			try {
Ben Konrath 48553a3
-				Library.loadLibrary ("swt-mozilla17-profile"); //$NON-NLS-1$
Ben Konrath 48553a3
-				usingProfile = true;
Ben Konrath 48553a3
-			} catch (UnsatisfiedLinkError e2) {
Ben Konrath 48553a3
-				try {
Ben Konrath 48553a3
-					Library.loadLibrary ("swt-mozilla14-profile-gcc3"); //$NON-NLS-1$
Ben Konrath 48553a3
-					usingProfile = true;
Ben Konrath 48553a3
-				} catch (UnsatisfiedLinkError e3) {
Ben Konrath 48553a3
-					try {
Ben Konrath 48553a3
-						Library.loadLibrary ("swt-mozilla17-profile-gcc3"); //$NON-NLS-1$
Ben Konrath 48553a3
-						usingProfile = true;
Ben Konrath 48553a3
-					} catch (UnsatisfiedLinkError e4) {
Ben Konrath 48553a3
-						try {
Ben Konrath 48553a3
-							Library.loadLibrary ("swt-mozilla18-profile"); //$NON-NLS-1$
Ben Konrath 48553a3
-							usingProfile = true;
Ben Konrath 48553a3
-						} catch (UnsatisfiedLinkError e5) {
Ben Konrath 48553a3
-							try {
Ben Konrath 48553a3
-								Library.loadLibrary ("swt-mozilla18-profile-gcc3"); //$NON-NLS-1$
Ben Konrath 48553a3
-								usingProfile = true;
Ben Konrath 48553a3
-							} catch (UnsatisfiedLinkError e6) {
Ben Konrath 48553a3
-								/* 
Ben Konrath 48553a3
-								* fail silently, the Browser will still work without profile support
Ben Konrath 48553a3
-								* but will abort any attempts to navigate to HTTPS pages
Ben Konrath 48553a3
-								*/
Ben Konrath 48553a3
-							}
Ben Konrath 48553a3
-						}
Ben Konrath 48553a3
-					}
Ben Konrath 48553a3
-				}
Ben Konrath 48553a3
-			}
Ben Konrath 48553a3
-		}
Ben Konrath 48553a3
+//		Library.loadLibrary("swt-mozilla17-profile");
Ben Konrath 48553a3
+		// We build the profile stuff without the need for a separate DSO
Ben Konrath 48553a3
+		usingProfile = true;
Ben Konrath 48553a3
+//		try {
Ben Konrath 48553a3
+//			Library.loadLibrary ("swt-mozilla14-profile"); //$NON-NLS-1$
Ben Konrath 48553a3
+//			usingProfile = true;
Ben Konrath 48553a3
+//		} catch (UnsatisfiedLinkError e1) {
Ben Konrath 48553a3
+//			try {
Ben Konrath 48553a3
+//				Library.loadLibrary ("swt-mozilla17-profile"); //$NON-NLS-1$
Ben Konrath 48553a3
+//				usingProfile = true;
Ben Konrath 48553a3
+//			} catch (UnsatisfiedLinkError e2) {
Ben Konrath 48553a3
+//				try {
Ben Konrath 48553a3
+//					Library.loadLibrary ("swt-mozilla14-profile-gcc3"); //$NON-NLS-1$
Ben Konrath 48553a3
+//					usingProfile = true;
Ben Konrath 48553a3
+//				} catch (UnsatisfiedLinkError e3) {
Ben Konrath 48553a3
+//					try {
Ben Konrath 48553a3
+//						Library.loadLibrary ("swt-mozilla17-profile-gcc3"); //$NON-NLS-1$
Ben Konrath 48553a3
+//						usingProfile = true;
Ben Konrath 48553a3
+//					} catch (UnsatisfiedLinkError e4) {
Ben Konrath 48553a3
+//						try {
Ben Konrath 48553a3
+//							Library.loadLibrary ("swt-mozilla18-profile"); //$NON-NLS-1$
Ben Konrath 48553a3
+//							usingProfile = true;
Ben Konrath 48553a3
+//						} catch (UnsatisfiedLinkError e5) {
Ben Konrath 48553a3
+//							try {
Ben Konrath 48553a3
+//								Library.loadLibrary ("swt-mozilla18-profile-gcc3"); //$NON-NLS-1$
Ben Konrath 48553a3
+//								usingProfile = true;
Ben Konrath 48553a3
+//							} catch (UnsatisfiedLinkError e6) {
Ben Konrath 48553a3
+//								/* 
Ben Konrath 48553a3
+//								* fail silently, the Browser will still work without profile support
Ben Konrath 48553a3
+//								* but will abort any attempts to navigate to HTTPS pages
Ben Konrath 48553a3
+//								*/
Ben Konrath 48553a3
+//							}
Ben Konrath 48553a3
+//						}
Ben Konrath 48553a3
+//					}
Ben Konrath 48553a3
+//				}
Ben Konrath 48553a3
+//			}
Ben Konrath 48553a3
+//		}
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 		int /*long*/[] retVal = new int /*long*/[1];
Ben Konrath 48553a3
 		nsEmbedString pathString = new nsEmbedString(mozillaPath);
Ben Konrath 48553a3
@@ -218,11 +281,11 @@
Ben Konrath 48553a3
 		if (retVal[0] == 0) error(XPCOM.NS_ERROR_NULL_POINTER);
Ben Konrath 48553a3
 		
Ben Konrath 48553a3
 		nsILocalFile localFile = new nsILocalFile(retVal[0]);
Ben Konrath 48553a3
-		rc = XPCOM.NS_InitEmbedding(localFile.getAddress(), 0);
Ben Konrath 48553a3
+		rc = XPCOM.NS_InitXPCOM3(0, localFile.getAddress(), 0, 0, 0);
Ben Konrath 48553a3
 		localFile.Release();
Ben Konrath 48553a3
 		if (rc != XPCOM.NS_OK) {
Ben Konrath 48553a3
 			dispose();
Ben Konrath 48553a3
-			SWT.error(SWT.ERROR_NO_HANDLES, null, " [NS_InitEmbedding "+mozillaPath+" error "+rc+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Ben Konrath 48553a3
+			SWT.error(SWT.ERROR_NO_HANDLES, null, " [NS_InitXPCOM3 "+mozillaPath+" error "+rc+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Ben Konrath 48553a3
 		}
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 		rc = XPCOM.NS_GetComponentManager(result);
Ben Konrath 48553a3
@@ -283,7 +346,7 @@
Ben Konrath 48553a3
 			rc = properties.Get(buffer, nsIFile.NS_IFILE_IID, result);
Ben Konrath 48553a3
 			if (rc != XPCOM.NS_OK) error(rc);
Ben Konrath 48553a3
 			if (result[0] == 0) error(XPCOM.NS_NOINTERFACE);
Ben Konrath 48553a3
-			properties.Release();
Ben Konrath 48553a3
+			// properties.Release() is now after the Set below
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 			nsIFile profileDir = new nsIFile(result[0]);
Ben Konrath 48553a3
 			result[0] = 0;
Ben Konrath 48553a3
@@ -305,24 +368,15 @@
Ben Konrath 48553a3
 			pathString.dispose(); //
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 			profileDir = new nsIFile(result[0]);
Ben Konrath 48553a3
-			result[0] = 0;
Ben Konrath 48553a3
-
Ben Konrath 48553a3
-			rc = XPCOM_PROFILE.NS_NewProfileDirServiceProvider(true, result);
Ben Konrath 48553a3
+			
Ben Konrath 48553a3
+			// Set the profile dir property so that it's initialized for
Ben Konrath 48553a3
+			// things like password manager and https
Ben Konrath 48553a3
+			buffer = Converter.wcsToMbcs(null, XPCOM.NS_APP_USER_PROFILE_50_DIR, true);
Ben Konrath 48553a3
+			rc = properties.Set(buffer, profileDir.getAddress());
Ben Konrath 48553a3
 			if (rc != XPCOM.NS_OK) error(rc);
Ben Konrath 48553a3
-			if (result[0] == 0) error(XPCOM.NS_NOINTERFACE);
Ben Konrath 48553a3
-
Ben Konrath 48553a3
-			final int /*long*/ dirServiceProvider = result[0];
Ben Konrath 48553a3
+			properties.Release();
Ben Konrath 48553a3
+			
Ben Konrath 48553a3
 			result[0] = 0;
Ben Konrath 48553a3
-			rc = XPCOM_PROFILE.ProfileDirServiceProvider_Register(dirServiceProvider);
Ben Konrath 48553a3
-			if (rc != XPCOM.NS_OK) error(rc);
Ben Konrath 48553a3
-			rc = XPCOM_PROFILE.ProfileDirServiceProvider_SetProfileDir(dirServiceProvider, profileDir.getAddress());
Ben Konrath 48553a3
-			if (rc != XPCOM.NS_OK) error(rc);
Ben Konrath 48553a3
-
Ben Konrath 48553a3
-			getDisplay().addListener(SWT.Dispose, new Listener() {
Ben Konrath 48553a3
-				public void handleEvent(Event e) {
Ben Konrath 48553a3
-					XPCOM_PROFILE.ProfileDirServiceProvider_Shutdown(dirServiceProvider);
Ben Konrath 48553a3
-				}
Ben Konrath 48553a3
-			});
Ben Konrath 48553a3
 		}
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 		/*
Ben Konrath 48553a3
@@ -1354,27 +1408,6 @@
Ben Konrath 48553a3
 	tip = null;
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 	BrowserCount--;
Ben Konrath 48553a3
-	/*
Ben Konrath 48553a3
-	* This code is intentionally commented.  It is not possible to reinitialize
Ben Konrath 48553a3
-	* Mozilla once it has been terminated.  NS_InitEmbedding always fails after
Ben Konrath 48553a3
-	* NS_TermEmbedding has been called.  The workaround is to call NS_InitEmbedding
Ben Konrath 48553a3
-	* once and never call NS_TermEmbedding.
Ben Konrath 48553a3
-	*/
Ben Konrath 48553a3
-//	if (BrowserCount == 0) {
Ben Konrath 48553a3
-//		if (AppShell != null) {
Ben Konrath 48553a3
-//			// Shutdown the appshell service.
Ben Konrath 48553a3
-//			rc = AppShell.Spindown();
Ben Konrath 48553a3
-//			if (rc != XPCOM.NS_OK) error(rc);
Ben Konrath 48553a3
-//			AppShell.Release();
Ben Konrath 48553a3
-//			AppShell = null;
Ben Konrath 48553a3
-//		}
Ben Konrath 48553a3
-//		WindowCreator.Release();
Ben Konrath 48553a3
-//		WindowCreator = null;
Ben Konrath 48553a3
-//		PromptService.Release();
Ben Konrath 48553a3
-//		PromptService = null;
Ben Konrath 48553a3
-//		XPCOM.NS_TermEmbedding();
Ben Konrath 48553a3
-//		mozilla = false;
Ben Konrath 48553a3
-//	}
Ben Konrath 48553a3
 }
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 void Activate() {
Ben Konrath 48553a3
Index: Eclipse_SWT_Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java
Ben Konrath 48553a3
===================================================================
Ben Konrath 48553a3
RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java,v
Ben Konrath 48553a3
retrieving revision 1.48.2.1
Ben Konrath 48553a3
diff -u -r1.48.2.1 XPCOM.java
Ben Konrath 48553a3
--- Eclipse_SWT_Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java	26 Jul 2006 16:33:23 -0000	1.48.2.1
Ben Konrath 48553a3
+++ Eclipse_SWT_Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java	29 Sep 2006 13:21:49 -0000
Ben Konrath 48553a3
@@ -89,6 +89,7 @@
Ben Konrath 48553a3
 	public static final int NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = 0x804e03f3;
Ben Konrath 48553a3
 	public static final int NS_ERROR_FILE_NOT_FOUND = 0x80520012;
Ben Konrath 48553a3
 	public static final String NS_APP_APPLICATION_REGISTRY_DIR = "AppRegD"; //$NON-NLS-1$
Ben Konrath 48553a3
+	public static final String NS_APP_USER_PROFILE_50_DIR = "ProfD"; //$NON-NLS-1$
Ben Konrath 48553a3
 
Ben Konrath 48553a3
 public static final native void memmove(nsID dest, int /*long*/ src, int nbytes);
Ben Konrath 48553a3
 public static final native void memmove(int /*long*/ dest, nsID src, int nbytes);
Ben Konrath 48553a3
@@ -103,7 +104,6 @@
Ben Konrath 48553a3
 public static final native void memmove(byte[] dest, char[] src, int nbytes);
Ben Konrath 48553a3
 public static final native int NS_GetComponentManager(int /*long*/[] result);
Ben Konrath 48553a3
 public static final native int NS_GetServiceManager(int /*long*/[] result);
Ben Konrath 48553a3
-public static final native int NS_InitEmbedding(int /*long*/ aMozBinDirectory, int /*long*/ aAppFileLocProvider);
Ben Konrath 48553a3
+public static final native int NS_InitXPCOM3(int /*long*/ result, int /*long*/ binDirectory, int /*long*/ appFileLocationProvider, int /*long*/ staticComponents, int componentCount);
Ben Konrath 48553a3
 public static final native int NS_NewLocalFile(int /*long*/ path, boolean followLinks, int /*long*/[] result);
Ben Konrath 48553a3
-public static final native int NS_TermEmbedding();
Ben Konrath 48553a3
 public static final native int strlen_PRUnichar(int /*long*/ s);