nsIFrame* currFrame; aParentFrame->FirstChild(aPresContext, nsnull, &currFrame);
nsIFrame* currFrame = aParentFrame->GetFirstChild(nsnull);
LocateAnonymousFrame(nsIPresContext* aPresContext,                     nsIFrame*       aParentFrame,                     nsIContent*     aTargetContent,                     nsIFrame**      aResult){  // We may be a placeholder.  If we are, go to the real frame.  aParentFrame = GetRealFrame(aParentFrame);  // Check ourselves.  *aResult = nsnull;  if (aParentFrame->GetContent() == aTargetContent) {    // We must take into account if the parent is a scrollframe. If it is, we    // need to bypass the scrolling mechanics and get at the true frame.    nsCOMPtr<nsIScrollableFrame> scrollFrame ( do_QueryInterface(aParentFrame) );    if ( scrollFrame )      scrollFrame->GetScrolledFrame ( aPresContext, *aResult );    else      *aResult = aParentFrame;    return;  }  // Check our kids.  nsIFrame* currFrame;  aParentFrame->FirstChild(aPresContext, nsnull, &currFrame);  while (currFrame) {    LocateAnonymousFrame(aPresContext, currFrame, aTargetContent, aResult);    if (*aResult)      return;    currFrame = currFrame->GetNextSibling();  }  nsCOMPtr<nsIMenuFrame> menuFrame(do_QueryInterface(aParentFrame));  if (menuFrame) {    nsIFrame* popupChild;    menuFrame->GetMenuChild(&popupChild);    if (popupChild) {      LocateAnonymousFrame(aPresContext, popupChild, aTargetContent, aResult);      if (*aResult)        return;    }  }}