Bug 1056457 - Remove batch changes in selection carets. r=roc
authorMorris Tseng <mtseng@mozilla.com>
Wed, 20 Aug 2014 20:23:00 +0200
changeset 201631 591bf545a59753ed55b8a1761700ccc3f49e9eb4
parent 201630 75805f95cfbeb4c251d8734b72fadfd5173fcdeb
child 201632 53719d03f70afee27a56b2e2288aaabe0b26bca6
push id27375
push userryanvm@gmail.com
push dateTue, 26 Aug 2014 19:56:59 +0000
treeherdermozilla-central@f9bfe115fee5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1056457
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1056457 - Remove batch changes in selection carets. r=roc
layout/base/SelectionCarets.cpp
--- a/layout/base/SelectionCarets.cpp
+++ b/layout/base/SelectionCarets.cpp
@@ -707,26 +707,17 @@ SelectionCarets::GetCaretYCenterPosition
   return frameRect.Center().y;
 }
 
 void
 SelectionCarets::SetSelectionDragState(bool aState)
 {
   nsIFrame* caretFocusFrame = GetCaretFocusFrame();
   nsRefPtr<nsFrameSelection> fs = caretFocusFrame->GetFrameSelection();
-  if (fs->GetDragState() == aState) {
-    return;
-  }
   fs->SetDragState(aState);
-
-  if (aState) {
-    fs->StartBatchChanges();
-  } else {
-    fs->EndBatchChanges();
-  }
 }
 
 void
 SelectionCarets::SetSelectionDirection(bool aForward)
 {
   nsISelection* caretSelection = GetSelection();
   nsRefPtr<dom::Selection> selection = static_cast<dom::Selection*>(caretSelection);
   selection->SetDirection(aForward ? eDirNext : eDirPrevious);