*ioNextNode = cParent;
*ioNextNode = GetDeepFirstChild(cSibling);
nsresult nsContentIterator::NextNode(nsCOMPtr<nsIContent> *ioNextNode){  if (!ioNextNode)    return NS_ERROR_NULL_POINTER;      nsCOMPtr<nsIContent> cN = *ioNextNode;  nsCOMPtr<nsIContent> cParent;  nsCOMPtr<nsIContent> cSibling;    cN->GetParent(*getter_AddRefs(cParent));  // no parent? then no next node!  if (!cParent)     return NS_ERROR_FAILURE;     // get next sibling  PRInt32 indx;  cParent->IndexOf(cN,indx);  indx++;  cParent->ChildAt(indx,*getter_AddRefs(cSibling));  if (!cSibling)  {    // curent node has no next sibling, so parent is next node    *ioNextNode = cParent;    return NS_OK;  }    // else next node is siblings "deep left"  child  *ioNextNode = GetDeepFirstChild(cSibling);   return NS_OK;}