зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug # 55055. Save CacheKey in SH for postdata results r=adamlock sr=rpotts
This commit is contained in:
Родитель
c0f65e895b
Коммит
7bf7fbfa73
|
@ -68,9 +68,13 @@ attribute unsigned long loadType;
|
||||||
*/
|
*/
|
||||||
attribute unsigned long ID;
|
attribute unsigned long ID;
|
||||||
|
|
||||||
|
/** attribute to set and get the cache key for the entry */
|
||||||
|
attribute nsISupports cacheKey;
|
||||||
|
|
||||||
/** Additional ways to create an entry */
|
/** Additional ways to create an entry */
|
||||||
void create(in nsIURI aURI, in wstring aTitle, in nsIDOMDocument aDocument,
|
void create(in nsIURI aURI, in wstring aTitle, in nsIDOMDocument aDocument,
|
||||||
in nsIInputStream aInputStream, in nsILayoutHistoryState aHistoryLayoutState);
|
in nsIInputStream aInputStream, in nsILayoutHistoryState aHistoryLayoutState,
|
||||||
|
in nsISupports aCacheKey);
|
||||||
|
|
||||||
/** Attribute that indicates if this entry is for a subframe navigation */
|
/** Attribute that indicates if this entry is for a subframe navigation */
|
||||||
void SetIsSubFrame(in boolean aFlag);
|
void SetIsSubFrame(in boolean aFlag);
|
||||||
|
|
|
@ -193,23 +193,41 @@ NS_IMETHODIMP nsSHEntry::SetIsSubFrame(PRBool aFlag)
|
||||||
mIsFrameNavigation = aFlag;
|
mIsFrameNavigation = aFlag;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP nsSHEntry::GetCacheKey(nsISupports** aResult)
|
||||||
|
{
|
||||||
|
NS_ENSURE_ARG_POINTER(aResult);
|
||||||
|
|
||||||
|
*aResult = mCacheKey;
|
||||||
|
NS_IF_ADDREF(*aResult);
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP nsSHEntry::SetCacheKey(nsISupports* aCacheKey)
|
||||||
|
{
|
||||||
|
mCacheKey = aCacheKey;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle, nsIDOMDocument * aDOMDocument,
|
nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle, nsIDOMDocument * aDOMDocument,
|
||||||
nsIInputStream * aInputStream, nsILayoutHistoryState * aHistoryLayoutState)
|
nsIInputStream * aInputStream, nsILayoutHistoryState * aHistoryLayoutState,
|
||||||
|
nsISupports * aCacheKey)
|
||||||
{
|
{
|
||||||
SetURI(aURI);
|
SetURI(aURI);
|
||||||
SetTitle(aTitle);
|
SetTitle(aTitle);
|
||||||
SetDocument(aDOMDocument);
|
SetDocument(aDOMDocument);
|
||||||
SetPostData(aInputStream);
|
SetPostData(aInputStream);
|
||||||
SetLayoutHistoryState(aHistoryLayoutState);
|
SetLayoutHistoryState(aHistoryLayoutState);
|
||||||
|
SetCacheKey(aCacheKey);
|
||||||
// Set the LoadType by default to loadHistory during creation
|
|
||||||
|
// Set the LoadType by default to loadHistory during creation
|
||||||
SetLoadType((PRInt32)nsIDocShellLoadInfo::loadHistory);
|
SetLoadType((PRInt32)nsIDocShellLoadInfo::loadHistory);
|
||||||
|
|
||||||
// By default all entries are set false for subframe flag.
|
// By default all entries are set false for subframe flag.
|
||||||
// nsDocShell::CloneAndReplace() which creates entries for
|
// nsDocShell::CloneAndReplace() which creates entries for
|
||||||
// all subframe navigations, sets the flag to true.
|
// all subframe navigations, sets the flag to true.
|
||||||
SetIsSubFrame(PR_FALSE);
|
SetIsSubFrame(PR_FALSE);
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
nsCOMPtr<nsIURI> mURI;
|
nsCOMPtr<nsIURI> mURI;
|
||||||
nsCOMPtr<nsIDOMDocument> mDocument;
|
nsCOMPtr<nsIDOMDocument> mDocument;
|
||||||
nsString mTitle;
|
nsString mTitle;
|
||||||
nsCOMPtr<nsIInputStream> mPostData;
|
nsCOMPtr<nsIInputStream> mPostData;
|
||||||
|
@ -63,8 +63,9 @@ private:
|
||||||
nsVoidArray mChildren;
|
nsVoidArray mChildren;
|
||||||
PRUint32 mLoadType;
|
PRUint32 mLoadType;
|
||||||
PRUint32 mID;
|
PRUint32 mID;
|
||||||
PRBool mIsFrameNavigation;
|
PRBool mIsFrameNavigation;
|
||||||
nsISHEntry * mParent; // weak reference
|
nsCOMPtr<nsISupports> mCacheKey;
|
||||||
|
nsISHEntry * mParent; // weak reference
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче