DocShell/Fastback: Difference between revisions
No edit summary |
|||
| Line 3: | Line 3: | ||
These functions are called from <code>nsDocShell::RestoreFromHistory</code> or <code>nsDocShell::SetupNewViewer</code> (that latter one doesn't call Destroy?). Things are only saved if <code>mSavingOldViewer</code> is true (otherwise, <code>null</code> is passed to Close). | These functions are called from <code>nsDocShell::RestoreFromHistory</code> or <code>nsDocShell::SetupNewViewer</code> (that latter one doesn't call Destroy?). Things are only saved if <code>mSavingOldViewer</code> is true (otherwise, <code>null</code> is passed to Close). | ||
What's the role of <code>CaptureState</code>? | |||
Saving will always save to <code>mOSHE</code> | Saving will always save to <code>mOSHE</code> | ||
Revision as of 20:13, 5 August 2005
Saving to history
The nsIContentViewer saves itself to the SH Entry. It gets an SH Entry in its Close function as an argument, and saves itself there in Destroy.
These functions are called from nsDocShell::RestoreFromHistory or nsDocShell::SetupNewViewer (that latter one doesn't call Destroy?). Things are only saved if mSavingOldViewer is true (otherwise, null is passed to Close).
What's the role of CaptureState?
Saving will always save to mOSHE
Restoration from history
nsDocShell::InternalLoad checks whether the load is a history load and if so, whether it has a cached presentation.
It then calls nsDocShell::RestorePresentation, which calls nsDocShell::BeginRestore and if that succeeds, posts an event to call nsDocShell::RestoreFromHistory.
Restoring will always restore from mLSHE. (note: this assumes that it does not change between event posting and event handling, is that ok?)
--Biesi 11:26, 5 Aug 2005 (PDT)