From 0548ea08aff032adc0cfffde613590150802842b Mon Sep 17 00:00:00 2001 From: "locka%iol.ie" Date: Wed, 12 Feb 2003 23:50:14 +0000 Subject: [PATCH] Better explain nsIWebNavigation "document" attribute, fix spelling of "referringURI" attribute. b=192322 r=danm@netscape.com sr=bzbarsky@mit.edu a=asa@mozilla.org git-svn-id: svn://10.0.0.236/trunk@137737 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 6 +++--- mozilla/docshell/base/nsIWebNavigation.idl | 8 +++++--- mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp | 8 ++++---- mozilla/embedding/qa/jstests/webNav/nsIWebNavTestLib.js | 2 +- mozilla/embedding/qa/testembed/nsIWebNav.cpp | 2 +- mozilla/xpfe/components/shistory/src/nsSHistory.cpp | 4 ++-- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 8523ae7f3ec..a453681757f 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -2396,7 +2396,7 @@ NS_IMETHODIMP nsDocShell::GotoIndex(PRInt32 aIndex) NS_IMETHODIMP nsDocShell::LoadURI(const PRUnichar * aURI, PRUint32 aLoadFlags, - nsIURI * aReferingURI, + nsIURI * aReferringURI, nsIInputStream * aPostStream, nsIInputStream * aHeaderStream) { @@ -2441,7 +2441,7 @@ nsDocShell::LoadURI(const PRUnichar * aURI, PRUint32 loadType = MAKE_LOAD_TYPE(LOAD_NORMAL, aLoadFlags); loadInfo->SetLoadType(ConvertLoadTypeToDocShellLoadInfo(loadType)); loadInfo->SetPostDataStream(aPostStream); - loadInfo->SetReferrer(aReferingURI); + loadInfo->SetReferrer(aReferringURI); loadInfo->SetHeadersStream(aHeaderStream); rv = LoadURI(uri, loadInfo, 0, PR_TRUE); @@ -2787,7 +2787,7 @@ nsDocShell::GetCurrentURI(nsIURI ** aURI) } NS_IMETHODIMP -nsDocShell::GetReferingURI(nsIURI ** aURI) +nsDocShell::GetReferringURI(nsIURI ** aURI) { NS_ENSURE_ARG_POINTER(aURI); diff --git a/mozilla/docshell/base/nsIWebNavigation.idl b/mozilla/docshell/base/nsIWebNavigation.idl index 843fc7b3f9a..1de75b27761 100644 --- a/mozilla/docshell/base/nsIWebNavigation.idl +++ b/mozilla/docshell/base/nsIWebNavigation.idl @@ -182,7 +182,9 @@ interface nsIWebNavigation : nsISupports void stop(in unsigned long stopFlags); /** - * Retrieves the current DOM document for the WebBrowser. + * Retrieves the current DOM document for the frame, or lazily creates a + * blank document if there is none. This attribute never returns null except + * for unexpected error situations. */ readonly attribute nsIDOMDocument document; @@ -192,9 +194,9 @@ interface nsIWebNavigation : nsISupports readonly attribute nsIURI currentURI; /** - * The refering URI. + * The referring URI. */ - readonly attribute nsIURI referingURI; + readonly attribute nsIURI referringURI; /** * The session history object used to store the session history for the diff --git a/mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp b/mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp index b6a11b8b9ab..ab74a105999 100644 --- a/mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp +++ b/mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp @@ -604,7 +604,7 @@ NS_IMETHODIMP nsWebBrowser::GoForward() NS_IMETHODIMP nsWebBrowser::LoadURI(const PRUnichar* aURI, PRUint32 aLoadFlags, - nsIURI* aReferingURI, + nsIURI* aReferringURI, nsIInputStream* aPostDataStream, nsIInputStream* aExtraHeaderStream) { @@ -612,7 +612,7 @@ NS_IMETHODIMP nsWebBrowser::LoadURI(const PRUnichar* aURI, return mDocShellAsNav->LoadURI(aURI, aLoadFlags, - aReferingURI, + aReferringURI, aPostDataStream, aExtraHeaderStream); } @@ -645,11 +645,11 @@ NS_IMETHODIMP nsWebBrowser::GetCurrentURI(nsIURI** aURI) return mDocShellAsNav->GetCurrentURI(aURI); } -NS_IMETHODIMP nsWebBrowser::GetReferingURI(nsIURI** aURI) +NS_IMETHODIMP nsWebBrowser::GetReferringURI(nsIURI** aURI) { NS_ENSURE_STATE(mDocShell); - return mDocShellAsNav->GetReferingURI(aURI); + return mDocShellAsNav->GetReferringURI(aURI); } NS_IMETHODIMP nsWebBrowser::SetSessionHistory(nsISHistory* aSessionHistory) diff --git a/mozilla/embedding/qa/jstests/webNav/nsIWebNavTestLib.js b/mozilla/embedding/qa/jstests/webNav/nsIWebNavTestLib.js index 1eb46415076..b5bb97b3149 100644 --- a/mozilla/embedding/qa/jstests/webNav/nsIWebNavTestLib.js +++ b/mozilla/embedding/qa/jstests/webNav/nsIWebNavTestLib.js @@ -245,7 +245,7 @@ function testReferingURI(webNav) return false; } // Get the refering URI - getRefURI = webNav.referingURI; + getRefURI = webNav.referringURI; // alert("The refering uri = " + getRefURI.spec); return getRefURI; diff --git a/mozilla/embedding/qa/testembed/nsIWebNav.cpp b/mozilla/embedding/qa/testembed/nsIWebNav.cpp index 9c343df7dac..caaadc47b35 100644 --- a/mozilla/embedding/qa/testembed/nsIWebNav.cpp +++ b/mozilla/embedding/qa/testembed/nsIWebNav.cpp @@ -455,7 +455,7 @@ void CNsIWebNav::GetReferingURITest(PRInt16 displayMode) QAOutput("We GOT the URI.", 1); else QAOutput("We DIDN'T GET the URI.", 1); - rv = qaWebNav->GetReferingURI(getter_AddRefs(theURI)); + rv = qaWebNav->GetReferringURI(getter_AddRefs(theURI)); RvTestResult(rv, "GetReferingURI() test", displayMode); // rv = qaWebNav->LoadURI(NS_ConvertASCIItoUCS2(myDialog.m_urlfield).get(), // myDialog.m_flagvalue, theURI, nsnull, nsnull); diff --git a/mozilla/xpfe/components/shistory/src/nsSHistory.cpp b/mozilla/xpfe/components/shistory/src/nsSHistory.cpp index 412e0235684..c11bc17d0b1 100644 --- a/mozilla/xpfe/components/shistory/src/nsSHistory.cpp +++ b/mozilla/xpfe/components/shistory/src/nsSHistory.cpp @@ -597,7 +597,7 @@ nsSHistory::GetCurrentURI(nsIURI** aResultURI) NS_IMETHODIMP -nsSHistory::GetReferingURI(nsIURI** aURI) +nsSHistory::GetReferringURI(nsIURI** aURI) { *aURI = nsnull; // Not implemented @@ -624,7 +624,7 @@ nsSHistory::GetSessionHistory(nsISHistory** aSessionHistory) NS_IMETHODIMP nsSHistory::LoadURI(const PRUnichar* aURI, PRUint32 aLoadFlags, - nsIURI* aReferingURI, + nsIURI* aReferringURI, nsIInputStream* aPostStream, nsIInputStream* aExtraHeaderStream) {