зеркало из https://github.com/mozilla/gecko-dev.git
Bug 76405
a=edburns author = edburns ashuk r=edburns Files in fix for this bug: M dom/classes/Makefile M webclient/src_moz/CBrowserContainer.cpp M webclient/src_moz/CBrowserContainer.h M webclient/src_moz/CurrentPageActionEvents.cpp M webclient/src_moz/HistoryActionEvents.cpp M webclient/src_moz/Makefile.in M webclient/src_moz/NativeEventThread.cpp M webclient/src_moz/motif/MotifBrowserControlCanvas.cpp This checkin makes Webclient work with the Mozilla trunk as of 27 April 0100 PDT.
This commit is contained in:
Родитель
b9bbf9e515
Коммит
c088b7b9c9
|
@ -33,13 +33,6 @@ JDIRS = org/mozilla/dom \
|
|||
$(NULL)
|
||||
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC_PROG = $(JDKHOME)/bin/javac
|
||||
JAVAC_FLAGS = -classpath $(CLASSPATH):$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS)
|
||||
|
||||
rm_java:
|
||||
ifeq ($(PACKAGE_BUILD),)
|
||||
rm -Rf $(topsrcdir)/dist/classes/org/mozilla/dom
|
||||
|
@ -47,3 +40,13 @@ endif # PACKAGE_BUILD
|
|||
|
||||
|
||||
clobber_all::rm_java
|
||||
|
||||
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC_PROG = $(JDKHOME)/bin/javac
|
||||
JAVAC_FLAGS = -classpath $(CLASSPATH) -d $(JAVA_DESTPATH)
|
||||
JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS)
|
||||
|
||||
|
|
|
@ -92,10 +92,10 @@ NS_INTERFACE_MAP_BEGIN(CBrowserContainer)
|
|||
NS_INTERFACE_MAP_ENTRY(nsIURIContentListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDocShellTreeOwner)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIBaseWindow)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIStreamObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDocumentLoaderObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebShellContainer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIAuthPrompt)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIPrompt)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMMouseListener)
|
||||
|
@ -113,56 +113,34 @@ NS_IMETHODIMP CBrowserContainer::GetInterface(const nsIID & uuid, void * *result
|
|||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// nsIPrompt
|
||||
// nsIAuthPrompt
|
||||
|
||||
/* void alert (in wstring text); */
|
||||
NS_IMETHODIMP CBrowserContainer::Alert(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP CBrowserContainer::AlertCheck(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean confirm (in wstring text); */
|
||||
NS_IMETHODIMP CBrowserContainer::Confirm(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
PRBool *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean confirmCheck (in wstring text, in wstring checkMsg, out boolean checkValue); */
|
||||
NS_IMETHODIMP CBrowserContainer::ConfirmCheck(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue,
|
||||
PRBool *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean prompt (in wstring text, in wstring defaultText, out wstring result); */
|
||||
/* boolean prompt (in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, in wstring defaultText, out wstring result); */
|
||||
NS_IMETHODIMP CBrowserContainer::Prompt(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
const PRUnichar *passwordRealm,
|
||||
PRUint32 savePassword,
|
||||
const PRUnichar *defaultText,
|
||||
PRUnichar **result, PRBool *_retval)
|
||||
PRUnichar **result,
|
||||
PRBool *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean promptUsernameAndPassword (in wstring text, out wstring user, out wstring pwd); */
|
||||
NS_IMETHODIMP CBrowserContainer::PromptUsernameAndPassword(const PRUnichar *dialogTitle,
|
||||
/* boolean promptPassword (in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, out wstring pwd); */
|
||||
NS_IMETHODIMP CBrowserContainer::PromptPassword(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
const PRUnichar *passwordRealm,
|
||||
PRUint32 savePassword,
|
||||
PRUnichar **pwd,
|
||||
PRBool *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean promptUsernameAndPassword (in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, out wstring user, out wstring pwd); */
|
||||
NS_IMETHODIMP CBrowserContainer::PromptUsernameAndPassword(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
const PRUnichar *passwordRealm,
|
||||
PRUint32 savePassword,
|
||||
|
@ -231,12 +209,86 @@ NS_IMETHODIMP CBrowserContainer::PromptUsernameAndPassword(const PRUnichar *dial
|
|||
return rv;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// nsIPrompt
|
||||
|
||||
NS_IMETHODIMP CBrowserContainer::ConfirmEx(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
PRUint32 button0And1Flags,
|
||||
const PRUnichar *button2Title,
|
||||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue,
|
||||
PRInt32 *buttonPressed)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* void alert (in wstring text); */
|
||||
NS_IMETHODIMP CBrowserContainer::Alert(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP CBrowserContainer::AlertCheck(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean confirm (in wstring text); */
|
||||
NS_IMETHODIMP CBrowserContainer::Confirm(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
PRBool *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean confirmCheck (in wstring text, in wstring checkMsg, out boolean checkValue); */
|
||||
NS_IMETHODIMP CBrowserContainer::ConfirmCheck(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue,
|
||||
PRBool *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean prompt (in wstring text, in wstring defaultText, out wstring result); */
|
||||
NS_IMETHODIMP CBrowserContainer::Prompt(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
PRUnichar **value,
|
||||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue,
|
||||
PRBool *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean promptUsernameAndPassword (in wstring text, out wstring user, out wstring pwd); */
|
||||
NS_IMETHODIMP CBrowserContainer::PromptUsernameAndPassword(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
PRUnichar **username,
|
||||
PRUnichar **password,
|
||||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue,
|
||||
PRBool *_retval)
|
||||
{
|
||||
// We Implement the PromptUsernameAndPassword as declared in nsIAuthPrompt
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* boolean promptPassword (in wstring text, in wstring title, out wstring pwd); */
|
||||
NS_IMETHODIMP CBrowserContainer::PromptPassword(const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text,
|
||||
const PRUnichar *passwordRealm,
|
||||
PRUint32 savePassword,
|
||||
PRUnichar **pwd,
|
||||
PRUnichar **password,
|
||||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue,
|
||||
PRBool *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -248,8 +300,8 @@ NS_IMETHODIMP CBrowserContainer::Select(const PRUnichar *inDialogTitle, const PR
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CBrowserContainer::UniversalDialog(const PRUnichar *inTitleMessage,
|
||||
#if 0
|
||||
NS_IMETHODIMP CBrowserContainer::UniversalDialog(const PRUnichar *inTitleMessage,
|
||||
const PRUnichar *inDialogTitle,
|
||||
const PRUnichar *inMsg,
|
||||
const PRUnichar *inCheckboxMsg,
|
||||
|
@ -268,8 +320,8 @@ CBrowserContainer::UniversalDialog(const PRUnichar *inTitleMessage,
|
|||
PRInt32 inEditField1Password,
|
||||
PRInt32 *outButtonPressed)
|
||||
{
|
||||
printf("debug: edburns: CBrowserContainer::UniversalDialog()\n");
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
printf("debug: edburns: CBrowserContainer::UniversalDialog()\n");
|
||||
|
||||
// if the user hasn't given us a prompt, oh well
|
||||
if (!mPrompt) {
|
||||
|
@ -342,9 +394,8 @@ CBrowserContainer::UniversalDialog(const PRUnichar *inTitleMessage,
|
|||
::util_DeleteJstringsFromUnichars(strings, 10);
|
||||
|
||||
return rv;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// nsIWebProgressListener
|
||||
|
@ -672,7 +723,9 @@ CBrowserContainer::SetFocus(void)
|
|||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CBrowserContainer::FocusAvailable(nsIBaseWindow *aCurrentFocus, PRBool *aTookFocus)
|
||||
CBrowserContainer::FocusAvailable(nsIBaseWindow *aCurrentFocus,
|
||||
PRBool aForward,
|
||||
PRBool *aTookFocus)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -771,26 +824,6 @@ CBrowserContainer::ExitModalEventLoop(nsresult aStatus)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// nsIStreamObserver implementation
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CBrowserContainer::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext)
|
||||
{
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CBrowserContainer::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext, nsresult aStatus, const PRUnichar* aMsg)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// nsIDocumentLoaderObserver implementation
|
||||
|
||||
|
@ -1420,7 +1453,7 @@ nsresult JNICALL CBrowserContainer::takeActionOnNode(nsCOMPtr<nsIDOMNode> curren
|
|||
jstring jNodeName, jNodeValue;
|
||||
PRUint32 depth = 0;
|
||||
CBrowserContainer *curThis = nsnull;
|
||||
const PRUint32 depthStrLen = 20;
|
||||
//const PRUint32 depthStrLen = 20;
|
||||
// char depthStr[depthStrLen];
|
||||
JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION);
|
||||
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
#include "nsIWebShell.h" // We still have to implement nsIWebShellContainer
|
||||
// in order to receveive some DocumentLoaderObserver
|
||||
// events. edburns
|
||||
#include "nsIStreamObserver.h"
|
||||
#include "nsIURIContentListener.h"
|
||||
#include "nsIDocumentLoaderObserver.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsIAuthPrompt.h"
|
||||
#include "nsCWebBrowser.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
|
@ -59,12 +59,12 @@ class CBrowserContainer :
|
|||
public nsIWebBrowserChrome,
|
||||
public nsIWebProgressListener,
|
||||
public nsIWebShellContainer,
|
||||
public nsIStreamObserver,
|
||||
public nsIURIContentListener,
|
||||
public nsIDocumentLoaderObserver,
|
||||
public nsIDocShellTreeOwner,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIPrompt,
|
||||
public nsIAuthPrompt,
|
||||
public nsIDOMMouseListener,
|
||||
public wcIBrowserContainer,
|
||||
public nsSupportsWeakReference
|
||||
|
@ -131,7 +131,6 @@ public:
|
|||
NS_DECL_NSIWEBBROWSERCHROME
|
||||
NS_DECL_NSIDOCSHELLTREEOWNER
|
||||
NS_DECL_NSIURICONTENTLISTENER
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
NS_DECL_NSIDOCUMENTLOADEROBSERVER
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSIWEBPROGRESSLISTENER
|
||||
|
@ -140,6 +139,7 @@ public:
|
|||
|
||||
// "Services" accessed through nsIInterfaceRequestor
|
||||
NS_DECL_NSIPROMPT
|
||||
NS_DECL_NSIAUTHPROMPT
|
||||
|
||||
// nsIDOMMouseListener
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ wsGetURLEvent::handleEvent ()
|
|||
return result;
|
||||
}
|
||||
|
||||
nsISHEntry * Entry;
|
||||
nsIHistoryEntry * Entry;
|
||||
rv = mHistory->GetEntryAtIndex(currentIndex, PR_FALSE, &Entry);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
|
@ -256,7 +256,7 @@ wsGetURLForIndexEvent::handleEvent ()
|
|||
rv = mInitContext->webNavigation->GetSessionHistory(&sHistory);
|
||||
char *indexURL = nsnull;
|
||||
|
||||
nsISHEntry * Entry;
|
||||
nsIHistoryEntry * Entry;
|
||||
rv = sHistory->GetEntryAtIndex(mHistoryIndex, PR_FALSE, &Entry);
|
||||
if (NS_FAILED(rv)) {
|
||||
return result;
|
||||
|
|
|
@ -111,7 +111,7 @@ ifneq ($(BAL_INTERFACE),)
|
|||
CXXFLAGS += -DBAL_INTERFACE
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS += -L$(DEPTH)/dist/lib -L$(DEPTH)/dist/bin/components -lwidget_gtk
|
||||
EXTRA_DSO_LDOPTS += -L$(DEPTH)/dist/lib -lxpcom
|
||||
|
||||
ifneq ($(BAL_INTERFACE),)
|
||||
EXTRA_DSO_LDOPTS += -lwc_share_bal
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
#include "nsRepository.h"
|
||||
#include "nsIServiceManager.h" // for do_GetService
|
||||
#include "nsISHistory.h" // for sHistory
|
||||
#include "nsIPref.h" // for preferences
|
||||
#include "nsIThread.h" // for PRThread
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
|
@ -86,8 +85,6 @@ static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
|
|||
static NS_DEFINE_IID(kISHistoryIID, NS_ISHISTORY_IID);
|
||||
static NS_DEFINE_CID(kSHistoryCID, NS_SHISTORY_CID);
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
static NS_DEFINE_CID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID);
|
||||
|
||||
static const char *NS_DOCSHELL_PROGID = "component://netscape/docshell/html";
|
||||
|
@ -634,15 +631,7 @@ nsresult InitMozillaStuff (WebShellInitContext * initContext)
|
|||
}
|
||||
}
|
||||
|
||||
// Setup Prefs obj and read default prefs
|
||||
if (gFirstTime) {
|
||||
nsCOMPtr<nsIPref> mPrefs(do_GetService(kPrefCID));
|
||||
if (!mPrefs) {
|
||||
initContext->initFailCode = kCreateWebShellError;
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
rv = mPrefs->StartUp();
|
||||
rv = mPrefs->ReadUserPrefs();
|
||||
gFirstTime = PR_FALSE;
|
||||
}
|
||||
PRBool allowPlugins = PR_TRUE;
|
||||
|
|
|
@ -57,9 +57,18 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBro
|
|||
gtk_set_locale ();
|
||||
|
||||
gtk_init (0, NULL);
|
||||
|
||||
gdk_event_handler_set (handle_gdk_event, NULL, NULL);
|
||||
|
||||
/*
|
||||
void * widgetGtkDll = dlopen("libwidget_gtk.so", RTLD_NOW | RTLD_GLOBAL);
|
||||
if (widgetGtkDll)
|
||||
{
|
||||
void (* symbolHandle)(_GdkEvent*,void*);
|
||||
symbolHandle =
|
||||
(void(*)(_GdkEvent*,void*)) dlsym(widgetGtkDll,
|
||||
"handle_gdk_event");
|
||||
if (symbolHandle != NULL)
|
||||
gdk_event_handler_set (symbolHandle, NULL, NULL);
|
||||
}
|
||||
*/
|
||||
gdk_rgb_init();
|
||||
|
||||
mShell = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
|
|
Загрузка…
Ссылка в новой задаче