result = mRangeList->GetTracker()->ScrollFrameIntoView(frame);
PRBool caretEnabled = PR_FALSE;  result = presShell->GetCaretEnabled(&caretEnabled);  if (NS_FAILED(result)) return result;  if (caretEnabled) { result = presShell->SetCaretEnabled(PR_FALSE);  if (NS_FAILED(result)) return result; }     nsRect rect; result = GetFocusNodeRect(&rect);  if (NS_FAILED(result)) return result;  result = ScrollRectIntoView(rect, NS_PRESSHELL_SCROLL_ANYWHERE, NS_PRESSHELL_SCROLL_ANYWHERE);     if (caretEnabled) { result = presShell->SetCaretEnabled(PR_TRUE);  if (NS_FAILED(result)) return result; }
nsDOMSelection::ScrollIntoView(){  nsresult result;  nsIFrame *frame;  result = GetPrimaryFrameForFocusNode(&frame);  if (NS_FAILED(result))    return result;  result = mRangeList->GetTracker()->ScrollFrameIntoView(frame);  return result;}