Bug 895274 part.225 Rename NS_DEVICE_MOTION to eDeviceMotion r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 12 Sep 2015 01:19:28 +0900
changeset 262067 d3a94d42ee8e2edd9f08ba0c3f3cc5e54e7df33b
parent 262066 7a662a29591b5c55ba2469066f0f01ffd9c454d3
child 262068 ef4b9a26ef4368da0d2b0fdfc56fb3169fbb7efe
push id29359
push userphilringnalda@gmail.com
push dateSat, 12 Sep 2015 15:57:02 +0000
treeherdermozilla-central@cffdd225055e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.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 895274 part.225 Rename NS_DEVICE_MOTION to eDeviceMotion r=smaug
dom/events/EventListenerManager.cpp
dom/events/EventNameList.h
widget/EventMessageList.h
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -319,17 +319,17 @@ EventListenerManager::AddEventListenerIn
     }
   } else if (aTypeAtom == nsGkAtoms::ondeviceorientation) {
     EnableDevice(eDeviceOrientation);
   } else if (aTypeAtom == nsGkAtoms::ondeviceproximity || aTypeAtom == nsGkAtoms::onuserproximity) {
     EnableDevice(NS_DEVICE_PROXIMITY);
   } else if (aTypeAtom == nsGkAtoms::ondevicelight) {
     EnableDevice(NS_DEVICE_LIGHT);
   } else if (aTypeAtom == nsGkAtoms::ondevicemotion) {
-    EnableDevice(NS_DEVICE_MOTION);
+    EnableDevice(eDeviceMotion);
 #ifdef MOZ_B2G
   } else if (aTypeAtom == nsGkAtoms::onmoztimechange) {
     nsCOMPtr<nsPIDOMWindow> window = GetTargetAsInnerWindow();
     if (window) {
       window->EnableTimeChangeNotifications();
     }
   } else if (aTypeAtom == nsGkAtoms::onmoznetworkupload) {
     nsCOMPtr<nsPIDOMWindow> window = GetTargetAsInnerWindow();
@@ -415,17 +415,17 @@ EventListenerManager::AddEventListenerIn
   }
 }
 
 bool
 EventListenerManager::IsDeviceType(EventMessage aEventMessage)
 {
   switch (aEventMessage) {
     case eDeviceOrientation:
-    case NS_DEVICE_MOTION:
+    case eDeviceMotion:
     case NS_DEVICE_LIGHT:
     case NS_DEVICE_PROXIMITY:
     case NS_USER_PROXIMITY:
       return true;
     default:
       break;
   }
   return false;
@@ -445,17 +445,17 @@ EventListenerManager::EnableDevice(Event
       break;
     case NS_DEVICE_PROXIMITY:
     case NS_USER_PROXIMITY:
       window->EnableDeviceSensor(SENSOR_PROXIMITY);
       break;
     case NS_DEVICE_LIGHT:
       window->EnableDeviceSensor(SENSOR_LIGHT);
       break;
-    case NS_DEVICE_MOTION:
+    case eDeviceMotion:
       window->EnableDeviceSensor(SENSOR_ACCELERATION);
       window->EnableDeviceSensor(SENSOR_LINEAR_ACCELERATION);
       window->EnableDeviceSensor(SENSOR_GYROSCOPE);
       break;
     default:
       NS_WARNING("Enabling an unknown device sensor.");
       break;
   }
@@ -468,17 +468,17 @@ EventListenerManager::DisableDevice(Even
   if (!window) {
     return;
   }
 
   switch (aEventMessage) {
     case eDeviceOrientation:
       window->DisableDeviceSensor(SENSOR_ORIENTATION);
       break;
-    case NS_DEVICE_MOTION:
+    case eDeviceMotion:
       window->DisableDeviceSensor(SENSOR_ACCELERATION);
       window->DisableDeviceSensor(SENSOR_LINEAR_ACCELERATION);
       window->DisableDeviceSensor(SENSOR_GYROSCOPE);
       break;
     case NS_DEVICE_PROXIMITY:
     case NS_USER_PROXIMITY:
       window->DisableDeviceSensor(SENSOR_PROXIMITY);
       break;
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -523,17 +523,17 @@ WINDOW_EVENT(popstate,
 // WINDOW_EVENT(undo)
 WINDOW_EVENT(unload,
              eUnload,
              (EventNameType_XUL | EventNameType_SVGSVG |
               EventNameType_HTMLBodyOrFramesetOnly),
              eBasicEventClass)
 
 WINDOW_ONLY_EVENT(devicemotion,
-                  NS_DEVICE_MOTION,
+                  eDeviceMotion,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(deviceorientation,
                   eDeviceOrientation,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(deviceproximity,
                   NS_DEVICE_PROXIMITY,
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -352,17 +352,17 @@ NS_EVENT_MESSAGE(NS_MESSAGE,            
 
 // Open and close events
 NS_EVENT_MESSAGE(eOpenCloseEventFirst,  4800)
 NS_EVENT_MESSAGE(eOpen,                 eOpenCloseEventFirst)
 
 // Device motion and orientation
 NS_EVENT_MESSAGE(eDeviceEventFirst,      4900)
 NS_EVENT_MESSAGE(eDeviceOrientation,     eDeviceEventFirst)
-NS_EVENT_MESSAGE(NS_DEVICE_MOTION,       eDeviceEventFirst + 1)
+NS_EVENT_MESSAGE(eDeviceMotion,          eDeviceEventFirst + 1)
 NS_EVENT_MESSAGE(NS_DEVICE_PROXIMITY,    eDeviceEventFirst + 2)
 NS_EVENT_MESSAGE(NS_USER_PROXIMITY,      eDeviceEventFirst + 3)
 NS_EVENT_MESSAGE(NS_DEVICE_LIGHT,        eDeviceEventFirst + 4)
 
 NS_EVENT_MESSAGE(NS_SHOW_EVENT,          5000)
 
 // Fullscreen DOM API
 NS_EVENT_MESSAGE(eFullscreenEventFirst,  5100)