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