Rename WidgetMouseEventBase::buttonType to WidgetMouseEventBase::ButtonType and explicitly define its type as int16_t with names the type as WidgetMouseEventBase::ButtonTypeType draft
authorRaphael <raphael.cojocaru@yahoo.com>
Sat, 15 Oct 2016 10:47:27 +0300
changeset 425623 953acd2ea33825509861f1455871e0e4bc2a309e
parent 425549 de5d73a0568d1c3d50da32169026cc68ee09b1ae
child 425624 ba452260cc7a371bc6b2e66e36f60871de5e15ed
push id32474
push userbmo:raphael.cojocaru@yahoo.com
push dateSat, 15 Oct 2016 08:00:44 +0000
milestone52.0a1
Rename WidgetMouseEventBase::buttonType to WidgetMouseEventBase::ButtonType and explicitly define its type as int16_t with names the type as WidgetMouseEventBase::ButtonTypeType MozReview-Commit-ID: FYuCN2n7NvF
widget/MouseEvents.h
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -99,25 +99,26 @@ public:
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_CRASH("WidgetMouseEventBase must not be most-subclass");
   }
 
   /// The possible related target
   nsCOMPtr<nsISupports> relatedTarget;
 
-  enum buttonType
+  typedef int16_t ButtonTypeType;
+  enum ButtonType : ButtonTypeType
   {
     eLeftButton   = 0,
     eMiddleButton = 1,
     eRightButton  = 2
   };
   // Pressed button ID of mousedown or mouseup event.
   // This is set only when pressing a button causes the event.
-  int16_t button;
+  ButtonType button;
 
   enum buttonsFlag {
     eNoButtonFlag     = 0x00,
     eLeftButtonFlag   = 0x01,
     eRightButtonFlag  = 0x02,
     eMiddleButtonFlag = 0x04,
     // typicall, "back" button being left side of 5-button
     // mice, see "buttons" attribute document of DOM3 Events.