nsIFrame* result; nsIFrame* parent = getCurrent(); while (!IsRootFrame(parent) && (result = GetParentFrame(parent))) parent = result;  while ((result = GetFirstChild(parent))) { parent = result; while ((result = GetNextSibling(parent))) parent = result; }  setCurrent(parent); if (!parent) setOffEdge(1); return NS_OK;
return NS_ERROR_FAILURE;
nsFocusIterator::Last(){  nsIFrame* result;  nsIFrame* parent = getCurrent();  while (!IsRootFrame(parent) && (result = GetParentFrame(parent)))    parent = result;  while ((result = GetFirstChild(parent))) {    parent = result;    while ((result = GetNextSibling(parent)))      parent = result;  }  setCurrent(parent);  if (!parent)    setOffEdge(1);  return NS_OK;}