From 3b99f4a9ec198f0e5dfc086234d6cecbd5733233 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Fri, 11 Sep 2015 21:21:28 +0900 Subject: [PATCH] Bug 895274 part.204 Rename NS_GAMEPAD_START to eGamepadEventFirst r=smaug --- dom/events/EventListenerManager.cpp | 2 +- widget/EventMessageList.h | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dom/events/EventListenerManager.cpp b/dom/events/EventListenerManager.cpp index f4e981b66437..508314d839fd 100644 --- a/dom/events/EventListenerManager.cpp +++ b/dom/events/EventListenerManager.cpp @@ -383,7 +383,7 @@ EventListenerManager::AddEventListenerInternal( window->SetHasMouseEnterLeaveEventListeners(); } #ifdef MOZ_GAMEPAD - } else if (aEventMessage >= NS_GAMEPAD_START && + } else if (aEventMessage >= eGamepadEventFirst && aEventMessage <= NS_GAMEPAD_END) { nsPIDOMWindow* window = GetInnerWindowForTarget(); if (window) { diff --git a/widget/EventMessageList.h b/widget/EventMessageList.h index f0609f0f1aca..77e8b5e103d9 100644 --- a/widget/EventMessageList.h +++ b/widget/EventMessageList.h @@ -414,14 +414,13 @@ NS_EVENT_MESSAGE(NS_SPEAKERMANAGER_SPEAKERFORCEDCHANGE, NS_SPEAKERMANAGER_EVENT_ #ifdef MOZ_GAMEPAD // Gamepad input events -NS_EVENT_MESSAGE(NS_GAMEPAD_START, 6000) -NS_EVENT_MESSAGE(eGamepadButtonDown, NS_GAMEPAD_START) -NS_EVENT_MESSAGE(eGamepadButtonUp, NS_GAMEPAD_START + 1) -NS_EVENT_MESSAGE(eGamepadAxisMove, NS_GAMEPAD_START + 2) -NS_EVENT_MESSAGE(eGamepadConnected, NS_GAMEPAD_START + 3) -NS_EVENT_MESSAGE(eGamepadDisconnected, NS_GAMEPAD_START + 4) -// Keep this defined to the same value as the event above -NS_EVENT_MESSAGE(NS_GAMEPAD_END, NS_GAMEPAD_START + 4) +NS_EVENT_MESSAGE(eGamepadEventFirst, 6000) +NS_EVENT_MESSAGE(eGamepadButtonDown, eGamepadEventFirst) +NS_EVENT_MESSAGE(eGamepadButtonUp, eGamepadEventFirst + 1) +NS_EVENT_MESSAGE(eGamepadAxisMove, eGamepadEventFirst + 2) +NS_EVENT_MESSAGE(eGamepadConnected, eGamepadEventFirst + 3) +NS_EVENT_MESSAGE(eGamepadDisconnected, eGamepadEventFirst + 4) +NS_EVENT_MESSAGE(NS_GAMEPAD_END, eGamepadDisconnected) #endif // input and beforeinput events.