bug 292998

- move textZoom storage to the prescontext from the documentviewer
- copy the textZoom between document viewers for fastback
r=bryner sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@177690 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de
2005-08-13 11:54:22 +00:00
parent e49e27b622
commit c41020b640
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);