nsITextContent* text = nsnull; if (NS_SUCCEEDED(aChild->QueryInterface(NS_GET_IID(nsITextContent), (void**)&text))) { PRBool  isWhite; text->IsOnlyWhitespace(&isWhite); NS_RELEASE(text); if (! isWhite) { return PR_TRUE; } }
nsCOMPtr<nsITextContent> text = do_QueryInterface(aChild);  if (text && !text->IsOnlyWhitespace()) return PR_TRUE;
static PRBool IsSignificantChild(nsIContent* aChild, PRBool aAcceptNonWhitespaceText){  nsIAtom *tag = aChild->Tag(); // skip text, comments, and PIs  if ((tag != nsLayoutAtoms::textTagName) &&       (tag != nsLayoutAtoms::commentTagName) &&      (tag != nsLayoutAtoms::processingInstructionTagName)) {    return PR_TRUE;  }  if (aAcceptNonWhitespaceText) {    if (tag == nsLayoutAtoms::textTagName) {  // skip only whitespace text      nsITextContent* text = nsnull;      if (NS_SUCCEEDED(aChild->QueryInterface(NS_GET_IID(nsITextContent), (void**)&text))) {        PRBool  isWhite;        text->IsOnlyWhitespace(&isWhite);        NS_RELEASE(text);        if (! isWhite) {          return PR_TRUE;        }      }    }  }  return PR_FALSE;}