Fix for topEmbed bug 93027 r=pollmann sr=darin
git-svn-id: svn://10.0.0.236/trunk@100756 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5416,6 +5416,7 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI,
|
||||
nsCOMPtr<nsIInputStream> inputStream;
|
||||
nsCOMPtr<nsIURI> referrerURI;
|
||||
nsCOMPtr<nsISupports> cacheKey;
|
||||
nsCOMPtr<nsISupports> cacheToken;
|
||||
if (aChannel) {
|
||||
nsCOMPtr<nsICachingChannel>
|
||||
cacheChannel(do_QueryInterface(aChannel));
|
||||
@@ -5424,6 +5425,7 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI,
|
||||
*/
|
||||
if (cacheChannel) {
|
||||
cacheChannel->GetCacheKey(getter_AddRefs(cacheKey));
|
||||
cacheChannel->GetCacheToken(getter_AddRefs(cacheToken));
|
||||
}
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(aChannel));
|
||||
|
||||
@@ -5441,6 +5443,13 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI,
|
||||
nsnull, // LayoutHistory state
|
||||
cacheKey); // CacheKey
|
||||
entry->SetReferrerURI(referrerURI);
|
||||
/* If cache got a 'no-store', ask SH not to store
|
||||
* HistoryLayoutState. By default, SH will set this
|
||||
* flag to PR_TRUE and save HistoryLayoutState.
|
||||
*/
|
||||
if (!cacheToken)
|
||||
entry->SetSaveHistoryStateFlag(PR_FALSE);
|
||||
|
||||
|
||||
|
||||
// If no Session History component is available in the parent DocShell
|
||||
@@ -5534,10 +5543,16 @@ nsDocShell::LoadHistoryEntry(nsISHEntry * aEntry, PRUint32 aLoadType)
|
||||
|
||||
NS_IMETHODIMP nsDocShell::PersistLayoutHistoryState()
|
||||
{
|
||||
nsresult
|
||||
rv =
|
||||
NS_OK;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
||||
if (mOSHE) {
|
||||
PRBool saveHistoryState = PR_TRUE;
|
||||
mOSHE->GetSaveHistoryStateFlag(&saveHistoryState);
|
||||
// Don't capture historystate and save it in history
|
||||
// if the page asked not to do so.
|
||||
if (!saveHistoryState)
|
||||
return NS_OK;
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
|
||||
rv = GetPresShell(getter_AddRefs(shell));
|
||||
|
||||
Reference in New Issue
Block a user