Bug 1542906 - Remove a useless variable in PointerEventHandler.cpp. r=emilio
authorNas <nassim.ouhenia@yahoo.com>
Tue, 30 Apr 2019 21:55:48 +0200
changeset 530912 8c408d1c7e2f9bcfae2d13719996e0afb6401d19
parent 530911 5fc15e9a69ec1824ff41b0ddcbb7743cf88ca309
child 530914 0353393f9465101ca820aaa0bc2b495ca85f5485
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1542906
milestone68.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 1542906 - Remove a useless variable in PointerEventHandler.cpp. r=emilio
dom/events/PointerEventHandler.cpp
--- a/dom/events/PointerEventHandler.cpp
+++ b/dom/events/PointerEventHandler.cpp
@@ -502,29 +502,28 @@ void PointerEventHandler::DispatchPointe
     WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
     // 1. If it is not mouse then it is likely will come as touch event
     // 2. We don't synthesize pointer events for those events that are not
     //    dispatched to DOM.
     if (!mouseEvent->convertToPointer ||
         !aEvent->IsAllowedToDispatchDOMEvent()) {
       return;
     }
-    int16_t button = mouseEvent->mButton;
+
     switch (mouseEvent->mMessage) {
       case eMouseMove:
-        button = MouseButton::eNotPressed;
         pointerMessage = ePointerMove;
         break;
       case eMouseUp:
         pointerMessage = mouseEvent->mButtons ? ePointerMove : ePointerUp;
         break;
       case eMouseDown:
         pointerMessage =
             mouseEvent->mButtons &
-                    ~nsContentUtils::GetButtonsFlagForButton(button)
+                    ~nsContentUtils::GetButtonsFlagForButton(mouseEvent->mButton)
                 ? ePointerMove
                 : ePointerDown;
         break;
       default:
         return;
     }
 
     WidgetPointerEvent event(*mouseEvent);