nsCOMPtr<nsISupports> container = aPresContext->GetContainer(); nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container)); if (docShell) docShell->GetLayoutHistoryState(getter_AddRefs(mFrameState));
nsFrameConstructorState::nsFrameConstructorState(nsPresContext*        aPresContext,                                                 nsIFrame*              aFixedContainingBlock,                                                 nsIFrame*              aAbsoluteContainingBlock,                                                 nsIFrame*              aFloatContainingBlock,                                                 nsILayoutHistoryState* aHistoryState)  : mPresContext(aPresContext),    mPresShell(aPresContext->PresShell()),    mFrameManager(mPresShell->FrameManager()),    mFixedItems(aFixedContainingBlock),    mAbsoluteItems(aAbsoluteContainingBlock),    mFloatedItems(aFloatContainingBlock),    mFirstLetterStyle(PR_FALSE),    mFirstLineStyle(PR_FALSE),    mFrameState(aHistoryState),    mPseudoFrames(){}