nsIFrame* rootFrame = nsnull; GetRootFrame(&rootFrame); if (rootFrame && mHistoryState) { nsIFrame* scrollFrame = nsnull; GetRootScrollFrame(mPresContext, rootFrame, &scrollFrame); if (scrollFrame) { mFrameManager->RestoreFrameStateFor(mPresContext, scrollFrame, mHistoryState, nsIStatefulFrame::eDocumentScrollState); } }
PresShell::EndLoad(nsIDocument *aDocument){#ifdef MOZ_PERF_METRICS  // Dump reflow, style resolution and frame construction times here.  MOZ_TIMER_DEBUGLOG(("Stop: Reflow: PresShell::EndLoad(), this=%p\n", this));  MOZ_TIMER_STOP(mReflowWatch);  MOZ_TIMER_LOG(("Reflow time (this=%p): ", this));  MOZ_TIMER_PRINT(mReflowWatch);    MOZ_TIMER_DEBUGLOG(("Stop: Frame Creation: PresShell::EndLoad(), this=%p\n", this));  MOZ_TIMER_STOP(mFrameCreationWatch);  MOZ_TIMER_LOG(("Frame construction plus style resolution time (this=%p): ", this));  MOZ_TIMER_PRINT(mFrameCreationWatch);  // Print style resolution stopwatch maintained by style set  MOZ_TIMER_DEBUGLOG(("Stop: Style Resolution: PresShell::EndLoad(), this=%p\n", this));  CtlStyleWatch(kStyleWatchStop|kStyleWatchDisable, mStyleSet);  MOZ_TIMER_LOG(("Style resolution time (this=%p): ", this));  CtlStyleWatch(kStyleWatchPrint, mStyleSet);#endif    mDocumentLoading = PR_FALSE;  return NS_OK;}