diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-13 23:39:41 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-13 23:39:41 +0800 |
commit | 6677856cb7dd840b5633039ee3c3ce383272f126 (patch) | |
tree | 59fcd9268d07959fe70a9d13b25d6b1c8ad4cfe8 | |
parent | 6d88b1c951c532afe5f32d7e2944e9c91ad9cce7 (diff) | |
download | gsoc2013-epiphany-6677856cb7dd840b5633039ee3c3ce383272f126.tar.gz gsoc2013-epiphany-6677856cb7dd840b5633039ee3c3ce383272f126.tar.zst gsoc2013-epiphany-6677856cb7dd840b5633039ee3c3ce383272f126.zip |
Adapt to mozilla API changes.
2004-01-13 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyEventListener.cpp:
* embed/mozilla/EphyWrapper.cpp:
* embed/mozilla/EventContext.cpp:
* embed/mozilla/mozilla-embed-persist.cpp:
Adapt to mozilla API changes.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | embed/mozilla/EphyEventListener.cpp | 6 | ||||
-rw-r--r-- | embed/mozilla/EphyWrapper.cpp | 10 | ||||
-rw-r--r-- | embed/mozilla/EventContext.cpp | 18 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-persist.cpp | 6 |
5 files changed, 42 insertions, 7 deletions
@@ -1,5 +1,14 @@ 2004-01-13 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/EphyEventListener.cpp: + * embed/mozilla/EphyWrapper.cpp: + * embed/mozilla/EventContext.cpp: + * embed/mozilla/mozilla-embed-persist.cpp: + + Adapt to mozilla API changes. + +2004-01-13 Christian Persch <chpe@cvs.gnome.org> + * configure.in: Version 1.0.7. diff --git a/embed/mozilla/EphyEventListener.cpp b/embed/mozilla/EphyEventListener.cpp index d2fb70864..4011d35bc 100644 --- a/embed/mozilla/EphyEventListener.cpp +++ b/embed/mozilla/EphyEventListener.cpp @@ -84,7 +84,11 @@ EphyEventListener::HandleFaviconLink (nsIDOMNode *node) nsCOMPtr<nsIDocument> doc = do_QueryInterface (domDoc); if(!doc) return NS_ERROR_FAILURE; -#if MOZILLA_SNAPSHOT > 11 +#if MOZILLA_SNAPSHOT > 13 + nsIURI *uri; + uri = doc->GetDocumentURI (); + if (!uri) return NS_ERROR_FAILURE; +#elif MOZILLA_SNAPSHOT > 11 nsIURI *uri; uri = doc->GetDocumentURL (); if (uri == NULL) return NS_ERROR_FAILURE; diff --git a/embed/mozilla/EphyWrapper.cpp b/embed/mozilla/EphyWrapper.cpp index daf1648b6..0c719717e 100644 --- a/embed/mozilla/EphyWrapper.cpp +++ b/embed/mozilla/EphyWrapper.cpp @@ -587,7 +587,10 @@ nsresult EphyWrapper::GetMainDocumentUrl (nsCString &url) nsCOMPtr<nsIDocument> doc = do_QueryInterface(DOMDocument); if(!doc) return NS_ERROR_FAILURE; -#if MOZILLA_SNAPSHOT > 11 +#if MOZILLA_SNAPSHOT > 13 + nsIURI *uri; + uri = doc->GetDocumentURI (); +#elif MOZILLA_SNAPSHOT > 11 nsIURI *uri; uri = doc->GetDocumentURL (); #else @@ -611,7 +614,10 @@ nsresult EphyWrapper::GetDocumentUrl (nsCString &url) nsCOMPtr<nsIDocument> doc = do_QueryInterface(DOMDocument); if(!doc) return NS_ERROR_FAILURE; -#if MOZILLA_SNAPSHOT > 11 +#if MOZILLA_SNAPSHOT > 13 + nsIURI *uri; + uri = doc->GetDocumentURI (); +#elif MOZILLA_SNAPSHOT > 11 nsIURI *uri; uri = doc->GetDocumentURL (); #else diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp index dc7e4a415..d20847883 100644 --- a/embed/mozilla/EventContext.cpp +++ b/embed/mozilla/EventContext.cpp @@ -18,6 +18,10 @@ * $Id$ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "EventContext.h" #include "nsIDOMEventTarget.h" #include "nsIDocument.h" @@ -141,7 +145,11 @@ nsresult EventContext::GatherTextUnder (nsIDOMNode* aNode, nsString& aResult) nsresult EventContext::ResolveBaseURL (nsIDocument *doc, const nsAString &relurl, nsACString &url) { nsresult rv; -#if MOZILLA_SNAPSHOT > 11 +#if MOZILLA_SNAPSHOT > 13 + nsIURI *base; + base = doc->GetBaseURI (); + if (!base) return NS_ERROR_FAILURE; +#elif MOZILLA_SNAPSHOT > 11 nsIURI *base; base = doc->GetBaseURL (); if (!base) return NS_ERROR_FAILURE; @@ -161,10 +169,14 @@ nsresult EventContext::ResolveBaseURL (nsIDocument *doc, const nsAString &relurl nsresult EventContext::ResolveDocumentURL (nsIDocument *doc, const nsAString &relurl, nsACString &url) { nsresult rv; -#if MOZILLA_SNAPSHOT > 11 +#if MOZILLA_SNAPSHOT > 13 + nsIURI *uri; + uri = doc->GetDocumentURI (); + if (!uri) return NS_ERROR_FAILURE; +#elif MOZILLA_SNAPSHOT > 11 nsIURI *uri; uri = doc->GetDocumentURL (); - if (uri == NULL) return NS_ERROR_FAILURE; + if (!uri) return NS_ERROR_FAILURE; #else nsCOMPtr<nsIURI> uri; rv = doc->GetDocumentURL(getter_AddRefs(uri)); diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp index f3117bbc3..c2b0f2353 100644 --- a/embed/mozilla/mozilla-embed-persist.cpp +++ b/embed/mozilla/mozilla-embed-persist.cpp @@ -254,7 +254,11 @@ impl_save (EphyEmbedPersist *persist) do_QueryInterface (DOMDocument, &rv); if (NS_FAILED(rv) || !document) return G_FAILED; -#if MOZILLA_SNAPSHOT > 11 +#if MOZILLA_SNAPSHOT > 13 + nsIURI *uri; + uri = document->GetDocumentURI (); + if (!uri) return G_FAILED; +#elif MOZILLA_SNAPSHOT > 11 nsIURI *uri; uri = document->GetDocumentURL (); if (!uri) return G_FAILED; |