diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-09-25 21:23:48 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-09-25 21:23:48 +0800 |
commit | 8409f7b2cadd1a3c913803636c7645e09cb1d482 (patch) | |
tree | 9518c99d16ee5fc188b02ac63959eb38a3523ac2 | |
parent | fca87d8f89a3e9d5476113d3700f91b395baf164 (diff) | |
download | gsoc2013-epiphany-8409f7b2cadd1a3c913803636c7645e09cb1d482.tar gsoc2013-epiphany-8409f7b2cadd1a3c913803636c7645e09cb1d482.tar.gz gsoc2013-epiphany-8409f7b2cadd1a3c913803636c7645e09cb1d482.tar.bz2 gsoc2013-epiphany-8409f7b2cadd1a3c913803636c7645e09cb1d482.tar.lz gsoc2013-epiphany-8409f7b2cadd1a3c913803636c7645e09cb1d482.tar.xz gsoc2013-epiphany-8409f7b2cadd1a3c913803636c7645e09cb1d482.tar.zst gsoc2013-epiphany-8409f7b2cadd1a3c913803636c7645e09cb1d482.zip |
Mozilla API changes.
2004-09-25 Christian Persch <chpe@cvs.gnome.org>
* configure.in:
* embed/mozilla/GlobalHistory.cpp:
* embed/mozilla/mozilla-embed-single.cpp:
Mozilla API changes.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.in | 23 | ||||
-rw-r--r-- | embed/mozilla/GlobalHistory.cpp | 5 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 13 |
4 files changed, 47 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2004-09-25 Christian Persch <chpe@cvs.gnome.org> + + * configure.in: + * embed/mozilla/GlobalHistory.cpp: + * embed/mozilla/mozilla-embed-single.cpp: + + Mozilla API changes. + 2004-09-22 Christian Persch <chpe@cvs.gnome.org> * src/window-commands.c: (window_cmd_help_about): diff --git a/configure.in b/configure.in index 12a7f89c7..b686d563b 100644 --- a/configure.in +++ b/configure.in @@ -281,6 +281,24 @@ AC_COMPILE_IFELSE( AC_MSG_RESULT([$result]) +dnl changed in 1.8a4 + +AC_MSG_CHECKING([for whether nsIGlobalHistory2::AddURI takes a referrer]) + +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <nsIURI.h> + #include <nsIGlobalHistory.h> + #include <docshell/nsIGlobalHistory2.h> + #include <history/nsIBrowserHistory.h>]], + [[nsIBrowserHistory *p; + p->AddURI(nsnull,PR_FALSE,PR_FALSE,nsnull);]] + )], + [AC_DEFINE([MOZ_NSIBROWSERHISTORY_ADDURI_WITH_REFERRER],[1],[dummy]) result=yes], + [result=no]) + +AC_MSG_RESULT([$result]) + dnl Changed from char* to nsACString& in mozilla 1.8a2 AC_MSG_CHECKING([whether nsIProtocolProxyService::ConfigureFromPAC expects nsACString&]) @@ -313,6 +331,11 @@ AC_COMPILE_IFELSE( AC_MSG_RESULT([$result]) +dnl changed from nsIXULChromeRegistry in 1.8a4 + +AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/chrome/nsIChromeRegistrySea.h], + [AC_DEFINE([HAVE_CHROME_NSICHROMEREGISTRYSEA_H], [1], [Define if nsIChromeRegistrySea.h exists])]) + dnl check for broken reload in GtkMozEmbed dnl FIXME: I have NO IDEA how to do this. For now, just always enable our workaround dnl diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp index c2ba7a1ae..e46af14cd 100644 --- a/embed/mozilla/GlobalHistory.cpp +++ b/embed/mozilla/GlobalHistory.cpp @@ -43,8 +43,13 @@ MozGlobalHistory::~MozGlobalHistory () { } +#ifdef MOZ_NSIBROWSERHISTORY_ADDURI_WITH_REFERRER +/* void addURI (in nsIURI aURI, in boolean aRedirect, in boolean aToplevel, in nsIURI aReferrer); */ +NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel, nsIURI *aReferrer) +#else /* void addURI (in nsIURI aURI, in boolean aRedirect, in boolean aToplevel); */ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel) +#endif { nsresult rv; diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 025d3347d..08d0995b8 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -71,9 +71,14 @@ #include <nsIPassword.h> #endif +#if defined (HAVE_CHROME_NSICHROMEREGISTRYSEA_H) +#include <chrome/nsIChromeRegistrySea.h> +#elif defined(MOZ_NSIXULCHROMEREGISTRY_SELECTSKIN) +#include <nsIChromeRegistry.h> +#endif + #ifdef ALLOW_PRIVATE_API // FIXME: For setting the locale. hopefully gtkmozembed will do itself soon -#include <nsIChromeRegistry.h> #include <nsILocaleService.h> #include <nsIHttpAuthManager.h> #include <nsICacheService.h> @@ -404,11 +409,15 @@ static nsresult mozilla_init_chrome (void) { /* FIXME: can we just omit this on new-toolkit ? */ -#ifdef MOZ_NSIXULCHROMEREGISTRY_SELECTSKIN +#if defined(MOZ_NSIXULCHROMEREGISTRY_SELECTSKIN) || defined(HAVE_CHROME_NSICHROMEREGISTRYSEA_H) nsresult rv; nsEmbedString uiLang; +#ifdef HAVE_CHROME_NSICHROMEREGISTRYSEA_H + nsCOMPtr<nsIChromeRegistrySea> chromeRegistry = do_GetService (NS_CHROMEREGISTRY_CONTRACTID); +#else nsCOMPtr<nsIXULChromeRegistry> chromeRegistry = do_GetService (NS_CHROMEREGISTRY_CONTRACTID); +#endif NS_ENSURE_TRUE (chromeRegistry, NS_ERROR_FAILURE); // Set skin to 'classic' so we get native scrollbars. |