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 /embed/mozilla/EventContext.cpp | |
parent | 6d88b1c951c532afe5f32d7e2944e9c91ad9cce7 (diff) | |
download | gsoc2013-epiphany-6677856cb7dd840b5633039ee3c3ce383272f126.tar gsoc2013-epiphany-6677856cb7dd840b5633039ee3c3ce383272f126.tar.gz gsoc2013-epiphany-6677856cb7dd840b5633039ee3c3ce383272f126.tar.bz2 gsoc2013-epiphany-6677856cb7dd840b5633039ee3c3ce383272f126.tar.lz gsoc2013-epiphany-6677856cb7dd840b5633039ee3c3ce383272f126.tar.xz 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.
Diffstat (limited to 'embed/mozilla/EventContext.cpp')
-rw-r--r-- | embed/mozilla/EventContext.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
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)); |