if (nsnull != fixedItems.childList) { fixedItems.containingBlock->AppendFrames(*aPresContext, *shell, nsLayoutAtoms::fixedList, fixedItems.childList); }
HTMLStyleSheetImpl::ContentAppended(nsIPresContext* aPresContext,                                    nsIContent*     aContainer,                                    PRInt32         aNewIndexInContainer){  nsIPresShell* shell = aPresContext->GetShell();  nsIFrame*     parentFrame = GetFrameFor(shell, aPresContext, aContainer);#ifdef NS_DEBUG  if (nsnull == parentFrame) {    NS_WARNING("Ignoring content-appended notification with no matching frame...");  }#endif  if (nsnull != parentFrame) {    // Get the parent frame's last-in-flow    nsIFrame* nextInFlow = parentFrame;    while (nsnull != nextInFlow) {      parentFrame->GetNextInFlow(nextInFlow);      if (nsnull != nextInFlow) {        parentFrame = nextInFlow;      }    }    // Get the containing block for absolutely positioned elements    nsIFrame* absoluteContainingBlock = GetAbsoluteContainingBlock(aPresContext,                                                                   parentFrame);    // Create some new frames    PRInt32         count;    nsIFrame*       lastChildFrame = nsnull;    nsIFrame*       firstAppendedFrame = nsnull;    nsAbsoluteItems absoluteItems(absoluteContainingBlock);    nsFrameItems    frameItems;    aContainer->ChildCount(count);    for (PRInt32 i = aNewIndexInContainer; i < count; i++) {      nsIContent* child;            aContainer->ChildAt(i, child);      ConstructFrame(aPresContext, child, parentFrame, absoluteItems, frameItems);      NS_RELEASE(child);    }    // Adjust parent frame for table inner/outer frame    // we need to do this here because we need both the parent frame and the constructed frame    nsresult result = NS_OK;    nsIFrame *adjustedParentFrame=parentFrame;    firstAppendedFrame = frameItems.childList;    if (nsnull != firstAppendedFrame) {      const nsStyleDisplay* firstAppendedFrameDisplay;      firstAppendedFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct *&)firstAppendedFrameDisplay);      result = GetAdjustedParentFrame(parentFrame, firstAppendedFrameDisplay->mDisplay, adjustedParentFrame);    }    // Notify the parent frame with a reflow command, passing it the list of    // new frames.    if (NS_SUCCEEDED(result)) {      result = adjustedParentFrame->AppendFrames(*aPresContext, *shell,                                                 nsnull, firstAppendedFrame);      // XXX update comment and code!      // If there are new absolutely positioned child frames then send a reflow      // command for them, too.      // XXX We can't just assume these frames are being appended, we need to      // determine where in the list they should be inserted...      if (nsnull != absoluteItems.childList) {        absoluteItems.containingBlock->AppendFrames(*aPresContext, *shell,                                                    nsLayoutAtoms::absoluteList,                                                    absoluteItems.childList);      }    }  }  NS_RELEASE(shell);  return NS_OK;}