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