Bug 895274 part.228 Rename NS_DEVICE_LIGHT to eDeviceLight r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 12 Sep 2015 01:19:29 +0900
changeset 294669 28fe9b60f5d5dbd1b91b5e30effa8a8cb7e9148c
parent 294668 0b13a7d48bc33a13ce6ae48085786715366a6b8a
child 294670 13654c18b57f9ba82875fc5741e619e469b757b0
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [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.228 Rename NS_DEVICE_LIGHT to eDeviceLight r=smaug
dom/events/EventListenerManager.cpp
dom/events/EventNameList.h
widget/EventMessageList.h
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -317,17 +317,17 @@ EventListenerManager::AddEventListenerIn
         (aEventMessage == eLegacySubtreeModified) ?
           kAllMutationBits : MutationBitForEventType(aEventMessage));
     }
   } else if (aTypeAtom == nsGkAtoms::ondeviceorientation) {
     EnableDevice(eDeviceOrientation);
   } else if (aTypeAtom == nsGkAtoms::ondeviceproximity || aTypeAtom == nsGkAtoms::onuserproximity) {
     EnableDevice(eDeviceProximity);
   } else if (aTypeAtom == nsGkAtoms::ondevicelight) {
-    EnableDevice(NS_DEVICE_LIGHT);
+    EnableDevice(eDeviceLight);
   } else if (aTypeAtom == nsGkAtoms::ondevicemotion) {
     EnableDevice(eDeviceMotion);
 #ifdef MOZ_B2G
   } else if (aTypeAtom == nsGkAtoms::onmoztimechange) {
     nsCOMPtr<nsPIDOMWindow> window = GetTargetAsInnerWindow();
     if (window) {
       window->EnableTimeChangeNotifications();
     }
@@ -416,17 +416,17 @@ EventListenerManager::AddEventListenerIn
 }
 
 bool
 EventListenerManager::IsDeviceType(EventMessage aEventMessage)
 {
   switch (aEventMessage) {
     case eDeviceOrientation:
     case eDeviceMotion:
-    case NS_DEVICE_LIGHT:
+    case eDeviceLight:
     case eDeviceProximity:
     case eUserProximity:
       return true;
     default:
       break;
   }
   return false;
 }
@@ -442,17 +442,17 @@ EventListenerManager::EnableDevice(Event
   switch (aEventMessage) {
     case eDeviceOrientation:
       window->EnableDeviceSensor(SENSOR_ORIENTATION);
       break;
     case eDeviceProximity:
     case eUserProximity:
       window->EnableDeviceSensor(SENSOR_PROXIMITY);
       break;
-    case NS_DEVICE_LIGHT:
+    case eDeviceLight:
       window->EnableDeviceSensor(SENSOR_LIGHT);
       break;
     case eDeviceMotion:
       window->EnableDeviceSensor(SENSOR_ACCELERATION);
       window->EnableDeviceSensor(SENSOR_LINEAR_ACCELERATION);
       window->EnableDeviceSensor(SENSOR_GYROSCOPE);
       break;
     default:
@@ -477,17 +477,17 @@ EventListenerManager::DisableDevice(Even
       window->DisableDeviceSensor(SENSOR_ACCELERATION);
       window->DisableDeviceSensor(SENSOR_LINEAR_ACCELERATION);
       window->DisableDeviceSensor(SENSOR_GYROSCOPE);
       break;
     case eDeviceProximity:
     case eUserProximity:
       window->DisableDeviceSensor(SENSOR_PROXIMITY);
       break;
-    case NS_DEVICE_LIGHT:
+    case eDeviceLight:
       window->DisableDeviceSensor(SENSOR_LIGHT);
       break;
     default:
       NS_WARNING("Disabling an unknown device sensor.");
       break;
   }
 }
 
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -539,17 +539,17 @@ WINDOW_ONLY_EVENT(deviceproximity,
                   eDeviceProximity,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(userproximity,
                   eUserProximity,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(devicelight,
-                  NS_DEVICE_LIGHT,
+                  eDeviceLight,
                   EventNameType_None,
                   eBasicEventClass)
 
 #ifdef MOZ_B2G
 WINDOW_ONLY_EVENT(moztimechange,
                   eTimeChange,
                   EventNameType_None,
                   eBasicEventClass)
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -355,17 +355,17 @@ NS_EVENT_MESSAGE(eOpenCloseEventFirst,  
 NS_EVENT_MESSAGE(eOpen,                 eOpenCloseEventFirst)
 
 // Device motion and orientation
 NS_EVENT_MESSAGE(eDeviceEventFirst,      4900)
 NS_EVENT_MESSAGE(eDeviceOrientation,     eDeviceEventFirst)
 NS_EVENT_MESSAGE(eDeviceMotion,          eDeviceEventFirst + 1)
 NS_EVENT_MESSAGE(eDeviceProximity,       eDeviceEventFirst + 2)
 NS_EVENT_MESSAGE(eUserProximity,         eDeviceEventFirst + 3)
-NS_EVENT_MESSAGE(NS_DEVICE_LIGHT,        eDeviceEventFirst + 4)
+NS_EVENT_MESSAGE(eDeviceLight,           eDeviceEventFirst + 4)
 
 NS_EVENT_MESSAGE(NS_SHOW_EVENT,          5000)
 
 // Fullscreen DOM API
 NS_EVENT_MESSAGE(eFullscreenEventFirst,  5100)
 NS_EVENT_MESSAGE(eFullscreenChange,      eFullscreenEventFirst)
 NS_EVENT_MESSAGE(eFullscreenError,       eFullscreenEventFirst + 1)