nsIFrame* aContentParentFrame, PRBool aCanBePositioned)
nsIFrame* aContentParentFrame)
nsFrameConstructorState::GetGeometricParent(const nsStyleDisplay* aStyleDisplay,                                            nsIFrame* aContentParentFrame,                                            PRBool aCanBePositioned){  NS_PRECONDITION(aStyleDisplay, "Must have display struct!");  // If there is no container for a fixed, absolute, or floating root  // frame, we will ignore the positioning.  This hack is originally  // brought to you by the letter T: tables, since other roots don't  // even call into this code.  See bug 178855.  //  // XXX Disabling positioning in this case is a hack.  If one was so inclined,  // one could support this either by (1) inserting a dummy block between the  // table and the canvas or (2) teaching the canvas how to reflow positioned  // elements. (1) has the usual problems when multiple frames share the same  // content (notice all the special cases in this file dealing with inner  // tables and outer tables which share the same content). (2) requires some  // work and possible factoring.  //  // XXXbz couldn't we just force position to "static" on roots and  // float to "none"?  That's OK per CSS 2.1, as far as I can tell.    if (aStyleDisplay->IsFloating() && mFloatedItems.containingBlock) {    NS_ASSERTION(!aStyleDisplay->IsAbsolutelyPositioned(),                 "Absolutely positioned _and_ floating?");    return mFloatedItems.containingBlock;  }  if (aCanBePositioned) {    if (aStyleDisplay->mPosition == NS_STYLE_POSITION_ABSOLUTE &&        mAbsoluteItems.containingBlock) {      return mAbsoluteItems.containingBlock;    }    if (aStyleDisplay->mPosition == NS_STYLE_POSITION_FIXED &&        mFixedItems.containingBlock) {      return mFixedItems.containingBlock;    }  }  return aContentParentFrame;}