Bug 217120. Always make an attempt to scroll to history position after restoring scroll position in EndLoad, just in case no reflows happen again. r+sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@159746 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2004-07-23 21:39:47 +00:00
parent efdbc9e511
commit 56a1f1002d
10 changed files with 83 additions and 11 deletions

View File

@@ -3639,6 +3639,13 @@ PresShell::EndLoad(nsIDocument *aDocument)
GetRootScrollFrame(mPresContext, rootFrame, &scrollFrame);
if (scrollFrame) {
FrameManager()->RestoreFrameStateFor(scrollFrame, historyState, nsIStatefulFrame::eDocumentScrollState);
nsIScrollableFrame* scrollableFrame;
CallQueryInterface(scrollFrame, &scrollableFrame);
NS_ASSERTION(scrollableFrame, "RootScrollFrame is not scrollable?");
if (scrollableFrame) {
scrollableFrame->ScrollToRestoredPosition();
}
}
}