nsCOMPtr<nsIContent> nextNode; if (NS_FAILED(GetNextSibling(mCurNode, &nextNode))) return NS_OK; nextNode = GetDeepFirstChild(nextNode); return GetTopAncestorInRange(nextNode, &mCurNode);
return NextNode(&mCurNode);
nsresult nsContentSubtreeIterator::Next(){  if (mIsDone)     return NS_OK;  if (!mCurNode)     return NS_OK;  if (mCurNode == mLast)   {    mIsDone = PR_TRUE;    return NS_OK;  }    nsCOMPtr<nsIContent> nextNode;  if (NS_FAILED(GetNextSibling(mCurNode, &nextNode)))    return NS_OK;  nextNode = GetDeepFirstChild(nextNode);  return GetTopAncestorInRange(nextNode, &mCurNode);}