Disable caching of documents when doing a subframe navigation, to help with site compatibility problems. Bug 304860, r=bzbarsky.
git-svn-id: svn://10.0.0.236/trunk@178301 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -4846,6 +4846,19 @@ nsDocShell::CanSavePresentation(PRUint32 aLoadType, nsIRequest *aNewRequest)
|
||||
if (maxViewers == 0)
|
||||
return PR_FALSE;
|
||||
|
||||
// Don't cache the content viewer if we're in a subframe and the subframe
|
||||
// pref is disabled.
|
||||
PRBool cacheFrames = PR_FALSE;
|
||||
mPrefs->GetBoolPref("browser.sessionhistory.cache_subframes",
|
||||
&cacheFrames);
|
||||
if (!cacheFrames) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> root;
|
||||
GetSameTypeParent(getter_AddRefs(root));
|
||||
if (root && root != this) {
|
||||
return PR_FALSE; // this is a subframe load
|
||||
}
|
||||
}
|
||||
|
||||
// If the document does not want its presentation cached, then don't.
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(pWin->GetExtantDocument());
|
||||
if (!doc || !doc->CanSavePresentation(aNewRequest))
|
||||
|
||||
Reference in New Issue
Block a user