if (frameType != nsLayoutAtoms::textFrame)
if (frameType.get() != nsLayoutAtoms::textFrame)
HasDisplayableChildren(nsIPresContext* aPresContext, nsIFrame* aContainerFrame){  // Returns 'true' if there are frames within aContainerFrame that  // could be displayed in the frame list.  NS_PRECONDITION(aContainerFrame != nsnull, "null ptr");  if (! aContainerFrame)    return PR_FALSE;  nsIFrame* frame;  aContainerFrame->FirstChild(aPresContext, nsnull, &frame);  while (frame) {    // If it's not a text frame, then assume that it's displayable.    nsCOMPtr<nsIAtom> frameType;    frame->GetFrameType(getter_AddRefs(frameType));    if (frameType != nsLayoutAtoms::textFrame)      return PR_TRUE;    // Get the text content...    nsCOMPtr<nsIContent> content;    frame->GetContent(getter_AddRefs(content));        nsCOMPtr<nsITextContent> text = do_QueryInterface(content);    NS_ASSERTION(text != nsnull, "oops, not an nsITextContent");    if (! text)      return PR_TRUE;        // Is it only whitespace?    PRBool onlyWhitespace;    text->IsOnlyWhitespace(&onlyWhitespace);        // If not, then we have displayable content here.    if (! onlyWhitespace)      return PR_TRUE;        // Otherwise, on to the next frame...    frame->GetNextSibling(&frame);  }  // If we get here, then we've iterated through all the child frames,  // and every one is a text frame containing whitespace. (Or, there  // weren't any frames at all!) There is nothing to diplay.  return PR_FALSE;}