diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index cb64b375bfa..a4466cf1cec 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -75,6 +75,7 @@ #include "nsIWebShell.h" #include "nsIDocShell.h" +#include "nsIWebNavigation.h" #include "nsIDocument.h" #include "nsIDocumentObserver.h" #include "nsIHTMLDocument.h" @@ -4179,7 +4180,8 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) // first get our baseURI nsCOMPtr baseURI; - rv = docShell->GetCurrentURI(getter_AddRefs(baseURI)); + nsCOMPtr webNav = do_QueryInterface(docShell); + rv = webNav->GetCurrentURI(getter_AddRefs(baseURI)); if (NS_FAILED(rv)) return rv; PRInt32 millis = -1; @@ -4275,7 +4277,8 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) if (NS_FAILED(rv)) return rv; nsCOMPtr baseURI; - rv = docShell->GetCurrentURI(getter_AddRefs(baseURI)); + nsCOMPtr webNav = do_QueryInterface(docShell); + rv = webNav->GetCurrentURI(getter_AddRefs(baseURI)); if (NS_FAILED(rv)) return rv; rv = cookieServ->SetCookieString(baseURI, result); diff --git a/mozilla/dom/src/base/nsLocation.cpp b/mozilla/dom/src/base/nsLocation.cpp index 5fd12248c4f..4398b86695f 100644 --- a/mozilla/dom/src/base/nsLocation.cpp +++ b/mozilla/dom/src/base/nsLocation.cpp @@ -333,9 +333,10 @@ LocationImpl::GetHref(nsAWritableString& aHref) { nsresult result = NS_OK; - if (mDocShell) { + nsCOMPtr webNav(do_QueryInterface(mDocShell)); + if (webNav) { nsCOMPtr uri; - result = mDocShell->GetCurrentURI(getter_AddRefs(uri)); + result = webNav->GetCurrentURI(getter_AddRefs(uri)); if (NS_SUCCEEDED(result) && uri) { nsXPIDLCString uriString; result = uri->GetSpec(getter_Copies(uriString)); diff --git a/mozilla/embedding/browser/activex/src/control/MozillaBrowser.cpp b/mozilla/embedding/browser/activex/src/control/MozillaBrowser.cpp index 920b6575e3d..7cd69abb269 100644 --- a/mozilla/embedding/browser/activex/src/control/MozillaBrowser.cpp +++ b/mozilla/embedding/browser/activex/src/control/MozillaBrowser.cpp @@ -2035,10 +2035,10 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::get_LocationURL(BSTR __RPC_FAR *Locat nsCOMPtr uri; // Get the current url from the browser - nsCOMPtr rootDocShell = do_GetInterface(mWebBrowser); - if (rootDocShell) + nsCOMPtr browserAsNav = do_QueryInterface(mWebBrowser); + if (browserAsNav) { - rootDocShell->GetCurrentURI(getter_AddRefs(uri)); + browserAsNav->GetCurrentURI(getter_AddRefs(uri)); } if (uri) diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index cb64b375bfa..a4466cf1cec 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -75,6 +75,7 @@ #include "nsIWebShell.h" #include "nsIDocShell.h" +#include "nsIWebNavigation.h" #include "nsIDocument.h" #include "nsIDocumentObserver.h" #include "nsIHTMLDocument.h" @@ -4179,7 +4180,8 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) // first get our baseURI nsCOMPtr baseURI; - rv = docShell->GetCurrentURI(getter_AddRefs(baseURI)); + nsCOMPtr webNav = do_QueryInterface(docShell); + rv = webNav->GetCurrentURI(getter_AddRefs(baseURI)); if (NS_FAILED(rv)) return rv; PRInt32 millis = -1; @@ -4275,7 +4277,8 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) if (NS_FAILED(rv)) return rv; nsCOMPtr baseURI; - rv = docShell->GetCurrentURI(getter_AddRefs(baseURI)); + nsCOMPtr webNav = do_QueryInterface(docShell); + rv = webNav->GetCurrentURI(getter_AddRefs(baseURI)); if (NS_FAILED(rv)) return rv; rv = cookieServ->SetCookieString(baseURI, result); diff --git a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp index ed4b34f3820..b4f26c78505 100644 --- a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp +++ b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp @@ -40,7 +40,6 @@ /// Unsorted Includes -#include "nsIWebShell.h" #include "nsIMarkupDocumentViewer.h" #include "pratom.h" #include "prprf.h" @@ -59,6 +58,7 @@ #include "nsIContentViewer.h" #include "nsIContentViewerEdit.h" #include "nsIWebShell.h" +#include "nsIWebNavigation.h" #include "nsIDocShell.h" #include "nsIWebShellWindow.h" #include "nsIWebBrowserChrome.h" @@ -650,7 +650,8 @@ nsBrowserInstance::LoadInitialPage(void) // Examine content URL. if ( GetContentAreaDocShell() ) { nsCOMPtr uri; - rv = GetContentAreaDocShell()->GetCurrentURI(getter_AddRefs(uri)); + nsCOMPtr webNav = do_QueryInterface(GetContentAreaDocShell()); + rv = webNav->GetCurrentURI(getter_AddRefs(uri)); nsXPIDLCString spec; if (uri) rv = uri->GetSpec(getter_Copies(spec));