Bug 895274 part.224 Rename NS_DEVICE_ORIENTATION to eDeviceOrientation r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 12 Sep 2015 01:19:28 +0900
changeset 294665 7a662a29591b5c55ba2469066f0f01ffd9c454d3
parent 294664 39fcfeae16fa617b6ed899e44cfaf77c83ebd362
child 294666 d3a94d42ee8e2edd9f08ba0c3f3cc5e54e7df33b
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.224 Rename NS_DEVICE_ORIENTATION to eDeviceOrientation r=smaug
dom/events/EventListenerManager.cpp
dom/events/EventNameList.h
widget/EventMessageList.h
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -313,17 +313,17 @@ EventListenerManager::AddEventListenerIn
       }
       // If aEventMessage is eLegacySubtreeModified, we need to listen all
       // mutations. nsContentUtils::HasMutationListeners relies on this.
       window->SetMutationListeners(
         (aEventMessage == eLegacySubtreeModified) ?
           kAllMutationBits : MutationBitForEventType(aEventMessage));
     }
   } else if (aTypeAtom == nsGkAtoms::ondeviceorientation) {
-    EnableDevice(NS_DEVICE_ORIENTATION);
+    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);
 #ifdef MOZ_B2G
   } else if (aTypeAtom == nsGkAtoms::onmoztimechange) {
@@ -414,17 +414,17 @@ EventListenerManager::AddEventListenerIn
                                                               aTypeAtom);
   }
 }
 
 bool
 EventListenerManager::IsDeviceType(EventMessage aEventMessage)
 {
   switch (aEventMessage) {
-    case NS_DEVICE_ORIENTATION:
+    case eDeviceOrientation:
     case NS_DEVICE_MOTION:
     case NS_DEVICE_LIGHT:
     case NS_DEVICE_PROXIMITY:
     case NS_USER_PROXIMITY:
       return true;
     default:
       break;
   }
@@ -435,17 +435,17 @@ void
 EventListenerManager::EnableDevice(EventMessage aEventMessage)
 {
   nsCOMPtr<nsPIDOMWindow> window = GetTargetAsInnerWindow();
   if (!window) {
     return;
   }
 
   switch (aEventMessage) {
-    case NS_DEVICE_ORIENTATION:
+    case eDeviceOrientation:
       window->EnableDeviceSensor(SENSOR_ORIENTATION);
       break;
     case NS_DEVICE_PROXIMITY:
     case NS_USER_PROXIMITY:
       window->EnableDeviceSensor(SENSOR_PROXIMITY);
       break;
     case NS_DEVICE_LIGHT:
       window->EnableDeviceSensor(SENSOR_LIGHT);
@@ -465,17 +465,17 @@ void
 EventListenerManager::DisableDevice(EventMessage aEventMessage)
 {
   nsCOMPtr<nsPIDOMWindow> window = GetTargetAsInnerWindow();
   if (!window) {
     return;
   }
 
   switch (aEventMessage) {
-    case NS_DEVICE_ORIENTATION:
+    case eDeviceOrientation:
       window->DisableDeviceSensor(SENSOR_ORIENTATION);
       break;
     case NS_DEVICE_MOTION:
       window->DisableDeviceSensor(SENSOR_ACCELERATION);
       window->DisableDeviceSensor(SENSOR_LINEAR_ACCELERATION);
       window->DisableDeviceSensor(SENSOR_GYROSCOPE);
       break;
     case NS_DEVICE_PROXIMITY:
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -527,17 +527,17 @@ WINDOW_EVENT(unload,
               EventNameType_HTMLBodyOrFramesetOnly),
              eBasicEventClass)
 
 WINDOW_ONLY_EVENT(devicemotion,
                   NS_DEVICE_MOTION,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(deviceorientation,
-                  NS_DEVICE_ORIENTATION,
+                  eDeviceOrientation,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(deviceproximity,
                   NS_DEVICE_PROXIMITY,
                   EventNameType_None,
                   eBasicEventClass)
 WINDOW_ONLY_EVENT(userproximity,
                   NS_USER_PROXIMITY,
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -351,17 +351,17 @@ NS_EVENT_MESSAGE(NS_MESSAGE_EVENT_START,
 NS_EVENT_MESSAGE(NS_MESSAGE,            NS_MESSAGE_EVENT_START)
 
 // 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(NS_DEVICE_ORIENTATION,  eDeviceEventFirst)
+NS_EVENT_MESSAGE(eDeviceOrientation,     eDeviceEventFirst)
 NS_EVENT_MESSAGE(NS_DEVICE_MOTION,       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