DocShell/Fastback: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 7: Line 7:
<code>nsDocShell::InternalLoad</code> checks whether the load is a history load and if so, whether it has a cached presentation.
<code>nsDocShell::InternalLoad</code> checks whether the load is a history load and if so, whether it has a cached presentation.


It then calls <code>nsDocShell::BeginRestore</code> and if that succeeds, posts an event to call <code>nsDocShell::RestoreFromHistory</code>.
It then calls <code>nsDocShell::RestorePresentation</code>, which calls <code>nsDocShell::BeginRestore</code> and if that succeeds, posts an event to call <code>nsDocShell::RestoreFromHistory</code>.




--[[User:Biesi|Biesi]] 11:26, 5 Aug 2005 (PDT)
--[[User:Biesi|Biesi]] 11:26, 5 Aug 2005 (PDT)

Revision as of 19:15, 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).

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.


--Biesi 11:26, 5 Aug 2005 (PDT)