webshell/public/nsIDocumentLoader.h
Extended the nsIDocumentLoader interface's LoadURL() method to take a reload type parameter. webshell/public/nsIWebShell.h Extended the nsIWebShell interface's LoadURL() method to take a reload type parameter. webshell/src/nsDocLoader.cpp 1. Extended the nsIDocumentBindInfo interface's Bind() method to take a reload type parameter. The Bind() method now takes the reload parameter and passes it to the nsIUrl it creates. 2. Added support to the DocumentLoader for the extended LoadURL() parameter list. It now passes the reload type down into the Bind() method of the nsIDocumentBindInfo. webshell/src/nsWebShell.cpp 1. Added support to the nsWebShell to use the new reload type parameter during loads. 2. Hooked up the reload type parameter in the nsWebShell::Reload() method so we actually use it. git-svn-id: svn://10.0.0.236/trunk@8211 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -93,8 +93,10 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsresult Bind(const nsString& aURLSpec,
|
||||
nsIPostData* aPostData,
|
||||
nsIStreamListener* aListener);
|
||||
nsIPostData* aPostData,
|
||||
nsIStreamListener* aListener,
|
||||
PRInt32 type = 0);
|
||||
|
||||
nsresult Stop(void);
|
||||
|
||||
/* nsIStreamListener interface methods... */
|
||||
@@ -379,7 +381,8 @@ public:
|
||||
nsIContentViewerContainer* aContainer,
|
||||
nsIPostData* aPostData = nsnull,
|
||||
nsISupports* aExtraInfo = nsnull,
|
||||
nsIStreamObserver* anObserver = nsnull);
|
||||
nsIStreamObserver* anObserver = nsnull,
|
||||
PRInt32 type = 0);
|
||||
|
||||
NS_IMETHOD LoadURL(const nsString& aURLSpec,
|
||||
nsIStreamListener* aListener);
|
||||
@@ -503,14 +506,14 @@ nsDocLoaderImpl::SetDocumentFactory(nsIDocumentLoaderFactory* aFactory)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocLoaderImpl::LoadURL(const nsString& aURLSpec,
|
||||
const char* aCommand,
|
||||
nsIContentViewerContainer* aContainer,
|
||||
nsIPostData* aPostData,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIStreamObserver* anObserver)
|
||||
nsIStreamObserver* anObserver,
|
||||
PRInt32 type)
|
||||
{
|
||||
nsresult rv;
|
||||
nsDocumentBindInfo* loader = nsnull;
|
||||
@@ -533,13 +536,12 @@ nsDocLoaderImpl::LoadURL(const nsString& aURLSpec,
|
||||
/* The DocumentBindInfo reference is only held by the Array... */
|
||||
m_LoadingDocsList->AppendElement((nsIStreamListener *)loader);
|
||||
|
||||
rv = loader->Bind(aURLSpec, aPostData, nsnull);
|
||||
rv = loader->Bind(aURLSpec, aPostData, nsnull, type);
|
||||
|
||||
done:
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocLoaderImpl::LoadURL(const nsString& aURLSpec,
|
||||
nsIStreamListener* aListener)
|
||||
@@ -776,7 +778,8 @@ nsDocumentBindInfo::QueryInterface(const nsIID& aIID,
|
||||
|
||||
nsresult nsDocumentBindInfo::Bind(const nsString& aURLSpec,
|
||||
nsIPostData* aPostData,
|
||||
nsIStreamListener* aListener)
|
||||
nsIStreamListener* aListener,
|
||||
PRInt32 type)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
@@ -804,6 +807,11 @@ nsresult nsDocumentBindInfo::Bind(const nsString& aURLSpec,
|
||||
}
|
||||
}
|
||||
|
||||
rv = m_Url->SetReloadType(type);
|
||||
if (rv != NS_OK) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Store any POST data into the URL */
|
||||
if (nsnull != aPostData) {
|
||||
static NS_DEFINE_IID(kPostToServerIID, NS_IPOSTTOSERVER_IID);
|
||||
|
||||
Reference in New Issue
Block a user