diff options
Diffstat (limited to 'embed/mozilla/EphyWrapper.cpp')
-rw-r--r-- | embed/mozilla/EphyWrapper.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/embed/mozilla/EphyWrapper.cpp b/embed/mozilla/EphyWrapper.cpp index 63908dc5d..daf1648b6 100644 --- a/embed/mozilla/EphyWrapper.cpp +++ b/embed/mozilla/EphyWrapper.cpp @@ -16,6 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "EphyWrapper.h" #include "GlobalHistory.h" #include "ProgressListener.h" @@ -68,6 +72,7 @@ #include "nsIPresContext.h" #include "ContentHandler.h" #include "EphyEventListener.h" +#include "nsPromiseFlatString.h" EphyWrapper::EphyWrapper () { @@ -582,8 +587,13 @@ nsresult EphyWrapper::GetMainDocumentUrl (nsCString &url) nsCOMPtr<nsIDocument> doc = do_QueryInterface(DOMDocument); if(!doc) return NS_ERROR_FAILURE; +#if MOZILLA_SNAPSHOT > 11 + nsIURI *uri; + uri = doc->GetDocumentURL (); +#else nsCOMPtr<nsIURI> uri; doc->GetDocumentURL(getter_AddRefs(uri)); +#endif if (!uri) return NS_ERROR_FAILURE; return uri->GetSpec (url); @@ -601,8 +611,13 @@ nsresult EphyWrapper::GetDocumentUrl (nsCString &url) nsCOMPtr<nsIDocument> doc = do_QueryInterface(DOMDocument); if(!doc) return NS_ERROR_FAILURE; - nsCOMPtr<nsIURI> uri; +#if MOZILLA_SNAPSHOT > 11 + nsIURI *uri; + uri = doc->GetDocumentURL (); +#else + nsCOMPtr<nsIURI> uri; doc->GetDocumentURL(getter_AddRefs(uri)); +#endif if (!uri) return NS_ERROR_FAILURE; return uri->GetSpec (url); |