aParentContent->ChildAt(aChildIndex, *getter_AddRefs(childContent));
aParentContent->ChildAt(aChildIndex, getter_AddRefs(childContent));
GetAdjustedParentFrame(nsIPresContext* aPresContext,                       nsIFrame*       aParentFrame,                       nsIAtom*        aParentFrameType,                       nsIContent*     aParentContent,                       PRInt32         aChildIndex){  nsCOMPtr<nsIContent> childContent;  aParentContent->ChildAt(aChildIndex, *getter_AddRefs(childContent));  nsIFrame* newParent = nsnull;  if (nsLayoutAtoms::tableOuterFrame == aParentFrameType) {    nsCOMPtr<nsIDOMHTMLTableCaptionElement> captionContent(do_QueryInterface(childContent));    // If the parent frame is an outer table, use the innner table    // as the parent unless the new content is a caption.    if (!captionContent)       aParentFrame->FirstChild(aPresContext, nsnull, &newParent);  }  else if (nsLayoutAtoms::fieldSetFrame == aParentFrameType) {    // If the parent is a fieldSet, use the fieldSet's area frame as the    // parent unless the new content is a legend.     nsCOMPtr<nsIDOMHTMLLegendElement> legendContent(do_QueryInterface(childContent));    if (!legendContent)       aParentFrame->FirstChild(aPresContext, nsnull, &newParent);  }  return (newParent) ? newParent : aParentFrame;}