else if (NS_FAILED(parent->GetParent(&result)) || !result){ result = nsnull; break; } else { parent = result; if (mExtensive) break; } } else{
result = parent; } else if (!(result = GetParentFrame(parent))) { result = 0;
nsLeafIterator::Prev(){//recursive-oid method to get prev frame  nsIFrame *result;  nsIFrame *parent = getCurrent();  if (!parent)    parent = getLast();  while(parent){    nsIFrame *grandParent;    if (NS_SUCCEEDED(parent->GetParent(&grandParent)) && grandParent &&      NS_SUCCEEDED(grandParent->FirstChild(mPresContext, nsnull,&result))){      nsFrameList list(result);      result = list.GetPrevSiblingFor(parent);      if (result){        parent = result;        while(NS_SUCCEEDED(parent->FirstChild(mPresContext, nsnull,&result)) && result){          parent = result;          while(NS_SUCCEEDED(parent->GetNextSibling(&result)) && result){            parent = result;          }        }        result = parent;        break;      }      else if (NS_FAILED(parent->GetParent(&result)) || !result){          result = nsnull;          break;      }      else       {        parent = result;        if (mExtensive)          break;      }    }    else{      setLast(parent);      result = nsnull;      break;    }  }  setCurrent(result);  if (!result)    setOffEdge(-1);  return NS_OK;}