Bug 895274 part.226 Rename NS_DEVICE_PROXIMITY to eDeviceProximity r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 12 Sep 2015 01:19:28 +0900
changeset 294667 ef4b9a26ef4368da0d2b0fdfc56fb3169fbb7efe
parent 294666 d3a94d42ee8e2edd9f08ba0c3f3cc5e54e7df33b
child 294668 0b13a7d48bc33a13ce6ae48085786715366a6b8a
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.226 Rename NS_DEVICE_PROXIMITY to eDeviceProximity r=smaug
dom/events/EventListenerManager.cpp
dom/events/EventNameList.h
widget/EventMessageList.h
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -315,17 +315,17 @@ EventListenerManager::AddEventListenerIn
       // mutations. nsContentUtils::HasMutationListeners relies on this.
       window->SetMutationListeners(
         (aEventMessage == eLegacySubtreeModified) ?
           kAllMutationBits : MutationBitForEventType(aEventMessage));
     }
   } else if (aTypeAtom == nsGkAtoms::ondeviceorientation) {
     EnableDevice(eDeviceOrientation);
   } else if (aTypeAtom == nsGkAtoms::ondeviceproximity || aTypeAtom == nsGkAtoms::onuserproximity) {
-    EnableDevice(NS_DEVICE_PROXIMITY);
+    EnableDevice(eDeviceProximity);
   } else if (aTypeAtom == nsGkAtoms::ondevicelight) {
     EnableDevice(NS_DEVICE_LIGHT);
   } else if (aTypeAtom == nsGkAtoms::ondevicemotion) {
     EnableDevice(eDeviceMotion);
 #ifdef MOZ_B2G
   } else if (aTypeAtom == nsGkAtoms::onmoztimechange) {
     nsCOMPtr<nsPIDOMWindow> window = GetTargetAsInnerWindow();
     if (window) {
@@ -417,17 +417,17 @@ EventListenerManager::AddEventListenerIn
 
 bool
 EventListenerManager::IsDeviceType(EventMessage aEventMessage)
 {
   switch (aEventMessage) {
     case eDeviceOrientation:
     case eDeviceMotion:
     case NS_DEVICE_LIGHT:
-    case NS_DEVICE_PROXIMITY:
+    case eDeviceProximity:
     case NS_USER_PROXIMITY:
       return true;
     default:
       break;
   }
   return false;
 }
 
@@ -438,17 +438,17 @@ EventListenerManager::EnableDevice(Event
   if (!window) {
     return;
   }
 
   switch (aEventMessage) {
     case eDeviceOrientation:
       window->EnableDeviceSensor(SENSOR_ORIENTATION);
       break;
-    case NS_DEVICE_PROXIMITY:
+    case eDeviceProximity:
     case NS_USER_PROXIMITY:
       window->EnableDeviceSensor(SENSOR_PROXIMITY);
       break;
     case NS_DEVICE_LIGHT:
       window->EnableDeviceSensor(SENSOR_LIGHT);
       break;
     case eDeviceMotion:
       window->EnableDeviceSensor(SENSOR_ACCELERATION);
@@ -473,17 +473,17 @@ EventListenerManager::DisableDevice(Even
     case eDeviceOrientation:
       window->DisableDeviceSensor(SENSOR_ORIENTATION);
       break;
     case eDeviceMotion:
       window->DisableDeviceSensor(SENSOR_ACCELERATION);
       window->DisableDeviceSensor(SENSOR_LINEAR_ACCELERATION);
       window->DisableDeviceSensor(SENSOR_GYROSCOPE);
       break;
-    case NS_DEVICE_PROXIMITY:
+    case eDeviceProximity:
     case NS_USER_PROXIMITY:
       window->DisableDeviceSensor(SENSOR_PROXIMITY);
       break;
     case NS_DEVICE_LIGHT:
       window->DisableDeviceSensor(SENSOR_LIGHT);
       break;
     default:
       NS_WARNING("Disabling an unknown device sensor.");
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -531,17 +531,17 @@ WINDOW_ONLY_EVENT(devicemotion,
                   eDeviceMotion,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(deviceorientation,
                   eDeviceOrientation,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(deviceproximity,
-                  NS_DEVICE_PROXIMITY,
+                  eDeviceProximity,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(userproximity,
                   NS_USER_PROXIMITY,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(devicelight,
                   NS_DEVICE_LIGHT,
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -353,17 +353,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(eDeviceMotion,          eDeviceEventFirst + 1)
-NS_EVENT_MESSAGE(NS_DEVICE_PROXIMITY,    eDeviceEventFirst + 2)
+NS_EVENT_MESSAGE(eDeviceProximity,       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)
 NS_EVENT_MESSAGE(eFullscreenChange,      eFullscreenEventFirst)