Bug 1114853 - Part 2: Remove useless SetVisibility calls. r=roc
authorMorris Tseng <mtseng@mozilla.com>
Wed, 24 Dec 2014 00:01:00 +0100
changeset 247688 dc9a5477f42f1e4966698bd22c8812a67eae30fe
parent 247687 33293793d8b68e4af94a7e81d279250ae91d3b75
child 247689 8576d2d7cdfb13e1297d31e533566ea290a51f15
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1114853
milestone37.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 1114853 - Part 2: Remove useless SetVisibility calls. r=roc
layout/base/SelectionCarets.cpp
--- a/layout/base/SelectionCarets.cpp
+++ b/layout/base/SelectionCarets.cpp
@@ -213,17 +213,16 @@ SelectionCarets::HandleEvent(WidgetEvent
       mDragMode = END_FRAME;
       mCaretCenterToDownPointOffsetY = GetCaretYCenterPosition() - ptInRoot.y;
       SetSelectionDirection(true);
       SetSelectionDragState(true);
       return nsEventStatus_eConsumeNoDefault;
     } else {
       mDragMode = NONE;
       mActiveTouchId = -1;
-      SetVisibility(false);
       LaunchLongTapDetector();
     }
   } else if (aEvent->message == NS_TOUCH_END ||
              aEvent->message == NS_TOUCH_CANCEL ||
              aEvent->message == NS_MOUSE_BUTTON_UP) {
     CancelLongTapDetector();
     if (mDragMode != NONE) {
       // Only care about same id
@@ -1225,17 +1224,16 @@ SelectionCarets::LaunchScrollEndDetector
 /* static */void
 SelectionCarets::FireScrollEnd(nsITimer* aTimer, void* aSelectionCarets)
 {
   nsRefPtr<SelectionCarets> self = static_cast<SelectionCarets*>(aSelectionCarets);
   NS_PRECONDITION(aTimer == self->mScrollEndDetectorTimer,
                   "Unexpected timer");
 
   SELECTIONCARETS_LOG_STATIC("Update selection carets!");
-  self->SetVisibility(true);
   self->UpdateSelectionCarets();
   self->DispatchSelectionStateChangedEvent(self->GetSelection(),
                                            SelectionState::Updateposition);
 }
 
 NS_IMETHODIMP
 SelectionCarets::Reflow(DOMHighResTimeStamp aStart, DOMHighResTimeStamp aEnd)
 {