Fix for bug # 21767. Form values not reset upon reload. r=pollmann.

This commit is contained in:
radha%netscape.com 2000-01-06 22:42:16 +00:00
parent 4491f0077b
commit 2a4df88f53

View File

@ -540,11 +540,15 @@ nsHistoryEntry::Load(nsIWebShell * aPrevEntry, PRBool aIsReload) {
PRInt32 pcount=0, ccount=0;
prev->GetChildCount(pcount);
ccount = cur->GetChildCnt();
nsCOMPtr<nsISupports> historyObject;
GetHistoryState(getter_AddRefs(historyObject));
nsLoadType loadType = (nsLoadType)nsIChannel::LOAD_NORMAL;
if (!aIsReload)
loadType = (nsLoadType) nsISessionHistory::LOAD_HISTORY;
if (!aIsReload) {
loadType = (nsLoadType) nsISessionHistory::LOAD_HISTORY;
GetHistoryState(getter_AddRefs(historyObject));
}
PRUnichar * uniURL = cSURL.ToNewUnicode();
prev->SetURL(uniURL);
prev->LoadURL(uniURL, nsnull, PR_FALSE, loadType, 0, historyObject);