aContent->ChildAt(i, *getter_AddRefs(child));
aContent->ChildAt(i, getter_AddRefs(child));
FindNamedItems(const nsAString& aName, nsIContent *aContent,               IdAndNameMapEntry& aEntry, PRBool aIsXHTML){  NS_ASSERTION(aEntry.mContentList,               "Entry w/o content list passed to FindNamedItems()!");  nsCOMPtr<nsIAtom> tag;  aContent->GetTag(*getter_AddRefs(tag));  if (tag == nsLayoutAtoms::textTagName) {    // Text nodes are not named items nor can they have children.    return;  }  nsAutoString value;  if (!aIsXHTML && IsNamedItem(aContent, tag, value) && value.Equals(aName)) {    aEntry.mContentList->AppendElement(aContent);  }  if (!aEntry.mIdContent) {    aContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::id, value);    if (value.Equals(aName)) {      aEntry.mIdContent = aContent;    }  }  PRInt32 i, count;  aContent->ChildCount(count);  nsCOMPtr<nsIContent> child;  for (i = 0; i < count; i++) {    aContent->ChildAt(i, *getter_AddRefs(child));    FindNamedItems(aName, child, aEntry, aIsXHTML);  }}