ChildIterator(nsIContent* aContent)
ChildIterator(nsIContent* aContent, nsIDocument* aDocument)
  ChildIterator(nsIContent* aContent)    :mContent(aContent), mIndex(0), mLength(0), mNodes(nsnull)  {    nsCOMPtr<nsIDocument> doc;    aContent->GetDocument(*getter_AddRefs(doc));    doc->GetBindingManager(getter_AddRefs(mBindingManager));    // Retrieve the anonymous content that we should build.    mBindingManager->GetXBLChildNodesFor(mContent, getter_AddRefs(mNodes));    if (mNodes)      mNodes->GetLength(&mLength);    else {      PRInt32 l;      mContent->ChildCount(l);      mLength = l;    }  }