aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-12-26 21:48:03 +0800
committerChristian Persch <chpe@src.gnome.org>2008-12-26 21:48:03 +0800
commit89227b639c5c664e411664b77c1adbc2b8c8fef5 (patch)
tree5b0ebf0ea1db2ca198eda6fdd9a8b9e14fda885e /embed/mozilla
parent27f9e1800b8bdbc2d29812c86e5560a0dc8ea13c (diff)
downloadgsoc2013-epiphany-89227b639c5c664e411664b77c1adbc2b8c8fef5.tar
gsoc2013-epiphany-89227b639c5c664e411664b77c1adbc2b8c8fef5.tar.gz
gsoc2013-epiphany-89227b639c5c664e411664b77c1adbc2b8c8fef5.tar.bz2
gsoc2013-epiphany-89227b639c5c664e411664b77c1adbc2b8c8fef5.tar.lz
gsoc2013-epiphany-89227b639c5c664e411664b77c1adbc2b8c8fef5.tar.xz
gsoc2013-epiphany-89227b639c5c664e411664b77c1adbc2b8c8fef5.tar.zst
gsoc2013-epiphany-89227b639c5c664e411664b77c1adbc2b8c8fef5.zip
Check for nsIDOMNSLocation.h, which was removed in gecko 1.9.1, and
adapt API use accordingly. Bug #565669. svn path=/branches/gnome-2-24/; revision=8643
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/EphyBrowser.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 8d94ad185..0ccbaa4cd 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -66,7 +66,6 @@
#include <nsIDOMWindow2.h>
#include <nsIDOMXMLDocument.h>
#include <nsIDOMLocation.h>
-#include <nsIDOMNSLocation.h>
#include <nsIHistoryEntry.h>
#include <nsIInterfaceRequestor.h>
#include <nsIInterfaceRequestorUtils.h>
@@ -86,6 +85,10 @@
#include <nsServiceManagerUtils.h>
#include <nsCDefaultURIFixup.h>
+#ifdef HAVE_NSIDOMNSLOCATION_H
+#include <nsIDOMNSLocation.h>
+#endif
+
#ifdef HAVE_MOZILLA_PSM
#include <nsICertificateDialogs.h>
#include <nsISSLStatus.h>
@@ -700,8 +703,10 @@ EphyCommandEventListener::HandleEvent (nsIDOMEvent *aDOMEvent)
if (NS_FAILED (rv))
return NS_OK;
+#ifdef HAVE_NSIDOMNSLOCATION_H
nsCOMPtr<nsIDOMNSLocation> domNSLocation (do_QueryInterface (domLocation));
NS_ENSURE_TRUE (domNSLocation, NS_OK);
+#endif
nsString locationHref;
domLocation->GetHref (locationHref);
@@ -735,9 +740,14 @@ EphyCommandEventListener::HandleEvent (nsIDOMEvent *aDOMEvent)
PRBool exceptionAdded;
params->GetExceptionAdded (&exceptionAdded);
g_print ("exceptionAdded %d\n", exceptionAdded);
+
if (exceptionAdded)
+#ifdef HAVE_NSIDOMNSLOCATION_H
return domNSLocation->Reload ();
-
+#else
+ /* Gecko >= 1.9.1 */
+ return domLocation->Reload (PR_TRUE);
+#endif
return NS_OK;
}