if (childList == nsnull) { childList = lastChild = aChild;
PRBool needPlaceholder = PR_FALSE; nsFrameItems* frameItems = &aFrameItems; if (aCanBeFloated && aStyleDisplay->IsFloating() && mFloatedItems.containingBlock) { NS_ASSERTION(aNewFrame->GetParent() == mFloatedItems.containingBlock, "Float whose parent is not the float containing block?"); needPlaceholder = PR_TRUE; frameItems = &mFloatedItems; } else if (aCanBePositioned) { if (aStyleDisplay->mPosition == NS_STYLE_POSITION_ABSOLUTE && mAbsoluteItems.containingBlock) { NS_ASSERTION(aNewFrame->GetParent() == mAbsoluteItems.containingBlock, "Abs pos whose parent is not the abs pos containing block?"); needPlaceholder = PR_TRUE; frameItems = &mAbsoluteItems; } if (aStyleDisplay->mPosition == NS_STYLE_POSITION_FIXED && mFixedItems.containingBlock) { NS_ASSERTION(aNewFrame->GetParent() == mFixedItems.containingBlock, "Fixed pos whose parent is not the fixed pos containing block?"); needPlaceholder = PR_TRUE; frameItems = &mFixedItems; }
nsFrameItems::AddChild(nsIFrame* aChild){  if (childList == nsnull) {    childList = lastChild = aChild;  }  else  {    lastChild->SetNextSibling(aChild);    lastChild = aChild;  }  // if aChild has siblings, lastChild needs to be the last one  for (nsIFrame* sib = lastChild->GetNextSibling(); sib;       sib = sib->GetNextSibling()) {    lastChild = sib;  }}