nsIFrame *result = nsnull; nsIFrame *parent = getCurrent();
nsIFrame* result = 0; nsIFrame* parent = getCurrent();
nsLeafIterator::Next(){//recursive-oid method to get next frame  nsIFrame *result = nsnull;  nsIFrame *parent = getCurrent();  if (!parent)    parent = getLast();  if (!mExtensive)  {     while(NS_SUCCEEDED(parent->FirstChild(mPresContext, nsnull,&result)) && result)    {      parent = result;    }  }  if (parent != getCurrent())  {    result = parent;  }  else {    while(parent && !IsRootFrame(parent)) {     if (NS_SUCCEEDED(parent->GetNextSibling(&result)) && result) {       parent = result;       while(NS_SUCCEEDED(parent->FirstChild(mPresContext, nsnull,&result)) && result)         {           parent = result;         }       result = parent;        break;      }      else      {        parent->GetParent(&result);        if (!result || IsRootFrame(result)) {          result = nsnull;          break;        }        else         {          parent = result;          if (mExtensive)            break;        }      }    }  }  setCurrent(result);  if (!result)    setOffEdge(1);  return NS_OK;}