Fix for bug 633738 (quora.com bloats out of control (part 3)) - make nsHTMLEditor participate in CC, clear editor from SHistory if we're not storing anything else. r=jst, a=jst.
This commit is contained in:
@@ -7081,6 +7081,11 @@ nsDocShell::RestoreFromHistory()
|
||||
mContentViewer->Close(mSavingOldViewer ? mOSHE.get() : nsnull);
|
||||
viewer->SetPreviousViewer(mContentViewer);
|
||||
}
|
||||
if (mOSHE && (!mContentViewer || !mSavingOldViewer)) {
|
||||
// We don't plan to save a viewer in mOSHE; tell it to drop
|
||||
// any other state it's holding.
|
||||
mOSHE->SyncPresentationState();
|
||||
}
|
||||
|
||||
// Order the mContentViewer setup just like Embed does.
|
||||
mContentViewer = nsnull;
|
||||
@@ -7698,9 +7703,14 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
|
||||
|
||||
mContentViewer->Close(mSavingOldViewer ? mOSHE.get() : nsnull);
|
||||
aNewViewer->SetPreviousViewer(mContentViewer);
|
||||
|
||||
mContentViewer = nsnull;
|
||||
}
|
||||
if (mOSHE && (!mContentViewer || !mSavingOldViewer)) {
|
||||
// We don't plan to save a viewer in mOSHE; tell it to drop
|
||||
// any other state it's holding.
|
||||
mOSHE->SyncPresentationState();
|
||||
}
|
||||
|
||||
mContentViewer = nsnull;
|
||||
|
||||
// Now that we're about to switch documents, forget all of our children.
|
||||
// Note that we cached them as needed up in CaptureState above.
|
||||
|
||||
Reference in New Issue
Block a user