bug 292998

- move textZoom storage to the prescontext from the documentviewer
- copy the textZoom between document viewers for fastback
r=bryner sr=dbaron
This commit is contained in:
cbiesinger@web.de
2005-08-13 11:54:22 +00:00
parent 9833494390
commit 832526704b
12 changed files with 43 additions and 52 deletions

View File

@@ -5157,6 +5157,12 @@ nsDocShell::RestoreFromHistory()
mSavingOldViewer = CanSavePresentation(mLoadType, request);
}
nsCOMPtr<nsIMarkupDocumentViewer> oldMUDV(do_QueryInterface(mContentViewer));
nsCOMPtr<nsIMarkupDocumentViewer> newMUDV(do_QueryInterface(viewer));
float zoom = 1.0;
if (oldMUDV && newMUDV)
oldMUDV->GetTextZoom(&zoom);
// Notify the old content viewer that it's being hidden.
FirePageHideNotification(!mSavingOldViewer);
// Set mFiredUnloadEvent = PR_FALSE so that the unload handler for the
@@ -5260,6 +5266,10 @@ nsDocShell::RestoreFromHistory()
if (++gNumberOfDocumentsLoading == 1)
PL_FavorPerformanceHint(PR_TRUE, NS_EVENT_STARVATION_DELAY_HINT);
if (oldMUDV && newMUDV)
newMUDV->SetTextZoom(zoom);
nsCOMPtr<nsIDOMDocument> domDoc;
mContentViewer->GetDOMDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> document = do_QueryInterface(domDoc);