aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EventContext.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-11 05:33:04 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-11 05:33:04 +0800
commitd33c13d6d52a405ef9bec15b414904a9c2620380 (patch)
tree446f235cdd08562866b99d357a5768843c416d4f /embed/mozilla/EventContext.cpp
parentf8ad4229cc4367fbf672b375b9f0e0338a907bbb (diff)
downloadgsoc2013-epiphany-d33c13d6d52a405ef9bec15b414904a9c2620380.tar
gsoc2013-epiphany-d33c13d6d52a405ef9bec15b414904a9c2620380.tar.gz
gsoc2013-epiphany-d33c13d6d52a405ef9bec15b414904a9c2620380.tar.bz2
gsoc2013-epiphany-d33c13d6d52a405ef9bec15b414904a9c2620380.tar.lz
gsoc2013-epiphany-d33c13d6d52a405ef9bec15b414904a9c2620380.tar.xz
gsoc2013-epiphany-d33c13d6d52a405ef9bec15b414904a9c2620380.tar.zst
gsoc2013-epiphany-d33c13d6d52a405ef9bec15b414904a9c2620380.zip
Adapt to the ever-changing mozilla API.
2004-01-10 Christian Persch <chpe@cvs.gnome.org> * configure.in: * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EventContext.cpp: Adapt to the ever-changing mozilla API.
Diffstat (limited to 'embed/mozilla/EventContext.cpp')
-rw-r--r--embed/mozilla/EventContext.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp
index 985b7ff23..05ed96306 100644
--- a/embed/mozilla/EventContext.cpp
+++ b/embed/mozilla/EventContext.cpp
@@ -145,10 +145,14 @@ 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 == NULL) return NS_ERROR_FAILURE;
+ if (!base) return NS_ERROR_FAILURE;
#elif MOZILLA_SNAPSHOT > 9
nsCOMPtr<nsIURI> base;
rv = doc->GetBaseURL (getter_AddRefs(base));
@@ -165,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));