Rename WidgetMouseEventBase::buttonType to WidgetMouseEventBase::ButtonType and explicitly define its type as int16_t with names the type as WidgetMouseEventBase::ButtonTypeType
draft
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
--- 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.