PresShell::CaptureHistoryState(nsILayoutHistoryState** aState)
PresShell::CaptureHistoryState(nsILayoutHistoryState** aState, PRBool aLeavingPage)
PresShell::CaptureHistoryState(nsILayoutHistoryState** aState){  nsresult rv = NS_OK;  NS_PRECONDITION(nsnull != aState, "null state pointer");  if (!mHistoryState) {    // Create the document state object    rv = NS_NewLayoutHistoryState(aState); // This addrefs      if (NS_FAILED(rv)) {       *aState = nsnull;      return rv;    }        mHistoryState = *aState;  }  else {    *aState = mHistoryState;    NS_IF_ADDREF(mHistoryState);  }    // Capture frame state for the entire frame hierarchy  nsIFrame* rootFrame = nsnull;  rv = GetRootFrame(&rootFrame);  if (NS_FAILED(rv) || nsnull == rootFrame) return rv;  rv = mFrameManager->CaptureFrameState(mPresContext, rootFrame, mHistoryState);     return rv;}