Fix for bug # 55145. r=pollmann a=rpotts
This commit is contained in:
Родитель
83606c97e5
Коммит
0081f6ef04
|
@ -56,6 +56,12 @@ attribute nsILayoutHistoryState layoutHistoryState;
|
|||
/** parent of this entry */
|
||||
attribute nsISHEntry parent;
|
||||
|
||||
/**
|
||||
* The loadType for this entry. This is typically loadHistory except
|
||||
* when reload is pressed, it has the appropriate reload flag
|
||||
*/
|
||||
attribute unsigned long loadType;
|
||||
|
||||
/** Additional ways to create an entry */
|
||||
void create(in nsIURI aURI, in wstring aTitle, in nsIDOMDocument aDocument,
|
||||
in nsIInputStream aInputStream, in nsILayoutHistoryState aHistoryLayoutState);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
// Local Includes
|
||||
#include "nsSHEntry.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIDocShellLoadInfo.h"
|
||||
|
||||
//*****************************************************************************
|
||||
//*** nsSHEntry: Object Management
|
||||
|
@ -148,6 +149,19 @@ NS_IMETHODIMP nsSHEntry::SetLayoutHistoryState(nsILayoutHistoryState* aState)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSHEntry::GetLoadType(PRUint32 * aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
|
||||
*aResult = mLoadType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSHEntry::SetLoadType(PRUint32 aLoadType)
|
||||
{
|
||||
mLoadType = aLoadType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle, nsIDOMDocument * aDOMDocument,
|
||||
|
@ -158,6 +172,8 @@ nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle, nsIDOMDocument * aDOM
|
|||
SetDocument(aDOMDocument);
|
||||
SetPostData(aInputStream);
|
||||
SetLayoutHistoryState(aHistoryLayoutState);
|
||||
// Set the LoadType by default to loadHistory during creation
|
||||
SetLoadType((PRInt32)nsIDocShellLoadInfo::loadHistory);
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ private:
|
|||
nsCOMPtr<nsIInputStream> mPostData;
|
||||
nsCOMPtr<nsILayoutHistoryState> mLayoutHistoryState;
|
||||
nsVoidArray mChildren;
|
||||
PRUint32 mLoadType;
|
||||
nsISHEntry * mParent; // weak reference
|
||||
};
|
||||
|
||||
|
|
|
@ -496,6 +496,11 @@ nsSHistory::LoadEntry(PRInt32 aIndex, PRBool aReloadFlag, long aLoadType)
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
nextEntry->GetURI(getter_AddRefs(nexturi));
|
||||
/* Set the loadType in the SHEntry too to what was passed on.
|
||||
* This will be passed on to child subframes later in nsDocShell,
|
||||
* so that proper loadType is maintained through out a frameset
|
||||
*/
|
||||
nextEntry->SetLoadType(aLoadType);
|
||||
|
||||
mRootDocShell->CreateLoadInfo (getter_AddRefs(loadInfo));
|
||||
// This is not available yet
|
||||
|
|
Загрузка…
Ссылка в новой задаче