Bug 171237 - Part 2: Correct the calls to ScrollIntoView which were not updated as part of bug 605138; r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 11 Jan 2012 20:19:19 -0500
changeset 85547 91ed31395881c4589e4afbe4eb60052778473924
parent 85546 fb7a018387f9d2b7aa49134dd0501842185759fc
child 85548 16f0d80b3137f26f033e681d6e1d17675af32448
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs171237, 605138
milestone12.0a1
Bug 171237 - Part 2: Correct the calls to ScrollIntoView which were not updated as part of bug 605138; r=roc
layout/generic/nsSelection.cpp
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -1155,32 +1155,30 @@ nsFrameSelection::MoveCaret(PRUint32    
       case nsIDOMKeyEvent::DOM_VK_UP    :
         {
           const nsRange* anchorFocusRange = sel->GetAnchorFocusRange();
           if (anchorFocusRange) {
             sel->Collapse(anchorFocusRange->GetStartParent(),
                           anchorFocusRange->StartOffset());
           }
           mHint = HINTRIGHT;
-          sel->ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION,
-                              false, false);
+          sel->ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION);
           return NS_OK;
         }
 
       case nsIDOMKeyEvent::DOM_VK_RIGHT :
       case nsIDOMKeyEvent::DOM_VK_DOWN  :
         {
           const nsRange* anchorFocusRange = sel->GetAnchorFocusRange();
           if (anchorFocusRange) {
             sel->Collapse(anchorFocusRange->GetEndParent(),
                           anchorFocusRange->EndOffset());
           }
           mHint = HINTLEFT;
-          sel->ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION,
-                              false, false);
+          sel->ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION);
           return NS_OK;
         }
     }
   }
 
   nsIFrame *frame;
   PRInt32 offsetused = 0;
   result = sel->GetPrimaryFrameForFocusNode(&frame, &offsetused,
@@ -1296,18 +1294,17 @@ nsFrameSelection::MoveCaret(PRUint32    
     if (!isBRFrame) {
       mHint = HINTLEFT; // We're now at the end of the frame to the left.
     }
     result = NS_OK;
   }
   if (NS_SUCCEEDED(result))
   {
     result = mDomSelections[index]->
-      ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION,
-                     false, false);
+      ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION);
   }
 
   return result;
 }
 
 //END nsFrameSelection methods
 
 
@@ -4842,18 +4839,17 @@ nsTypedSelection::RemoveRange(nsIDOMRang
     // Reset anchor to LAST range or clear it if there are no ranges.
     setAnchorFocusRange(cnt - 1);
 
     // When the selection is user-created it makes sense to scroll the range
     // into view. The spell-check selection, however, is created and destroyed
     // in the background. We don't want to scroll in this case or the view
     // might appear to be moving randomly (bug 337871).
     if (mType != nsISelectionController::SELECTION_SPELLCHECK && cnt > 0)
-      ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION, false,
-                     false);
+      ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION);
   }
 
   if (!mFrameSelection)
     return NS_OK;//nothing to do
   return mFrameSelection->NotifySelectionListeners(GetType());
 }