aFrameManager->RemoveFrame(aPresContext, *aPresShell, parentFrame, listName, outOfFlowFrame);
aFrameManager->RemoveFrame(aPresContext, *aPresShell, parentFrame, listName, outOfFlowFrame); }
DeletingFrameSubtree(nsIPresContext*  aPresContext,                     nsIPresShell*    aPresShell,                     nsIFrameManager* aFrameManager,                     nsIFrame*        aFrame){  // If there's no frame manager it's probably because the pres shell is  // being destroyed  if (aFrameManager) {    nsAutoVoidArray destroyQueue;    while (aFrame) {      // If it's a "special" block-in-inline frame, then we need to      // remember to delete our special siblings, too.      if (IsFrameSpecial(aFrame)) {        nsIFrame* specialSibling;        GetSpecialSibling(aFrameManager, aFrame, &specialSibling);        DeletingFrameSubtree(aPresContext, aPresShell, aFrameManager, specialSibling);      }      DoDeletingFrameSubtree(aPresContext, aPresShell, aFrameManager,                             destroyQueue, aFrame, aFrame);      // If it's split, then get the continuing frame. Note that we only do      // this for the top-most frame being deleted. Don't do it if we're      // recursing over a subtree, because those continuing frames should be      // found as part of the walk over the top-most frame's continuing frames.      // Walking them again will make this an N^2/2 algorithm      aFrame->GetNextInFlow(&aFrame);    }    // Now destroy any frames that have been enqueued for destruction.    for (PRInt32 i = destroyQueue.Count() - 1; i >= 0; --i) {      nsIFrame* outOfFlowFrame = NS_STATIC_CAST(nsIFrame*, destroyQueue[i]);      // Get the out-of-flow frame's parent      nsIFrame* parentFrame;      outOfFlowFrame->GetParent(&parentFrame);        // Get the child list name for the out-of-flow frame      nsCOMPtr<nsIAtom> listName;      GetChildListNameFor(aPresContext, parentFrame, outOfFlowFrame,                          getter_AddRefs(listName));        // Ask the parent to delete the out-of-flow frame      aFrameManager->RemoveFrame(aPresContext, *aPresShell, parentFrame,                                 listName, outOfFlowFrame);    }  }  return NS_OK;}