diff options
Diffstat (limited to 'embed/mozilla/EphyBrowser.cpp')
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 14 |
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; } |