diff options
Diffstat (limited to 'dom/events')
-rw-r--r-- | dom/events/EventListenerManager.cpp | 36 | ||||
-rw-r--r-- | dom/events/EventNameList.h | 6 | ||||
-rw-r--r-- | dom/events/TouchEvent.cpp | 5 |
3 files changed, 1 insertions, 46 deletions
diff --git a/dom/events/EventListenerManager.cpp b/dom/events/EventListenerManager.cpp index 81fb67f5f1..4671f89f88 100644 --- a/dom/events/EventListenerManager.cpp +++ b/dom/events/EventListenerManager.cpp @@ -351,10 +351,6 @@ EventListenerManager::AddEventListenerInternal( EnableDevice(eDeviceLight); } else if (aTypeAtom == nsGkAtoms::ondevicemotion) { EnableDevice(eDeviceMotion); -#if defined(MOZ_WIDGET_ANDROID) - } else if (aTypeAtom == nsGkAtoms::onorientationchange) { - EnableDevice(eOrientationChange); -#endif } else if (aTypeAtom == nsGkAtoms::ontouchstart || aTypeAtom == nsGkAtoms::ontouchend || aTypeAtom == nsGkAtoms::ontouchmove || @@ -480,9 +476,6 @@ EventListenerManager::IsDeviceType(EventMessage aEventMessage) case eDeviceLight: case eDeviceProximity: case eUserProximity: -#if defined(MOZ_WIDGET_ANDROID) - case eOrientationChange: -#endif return true; default: break; @@ -500,21 +493,10 @@ EventListenerManager::EnableDevice(EventMessage aEventMessage) switch (aEventMessage) { case eDeviceOrientation: -#ifdef MOZ_WIDGET_ANDROID - // Falls back to SENSOR_ROTATION_VECTOR and SENSOR_ORIENTATION if - // unavailable on device. - window->EnableDeviceSensor(SENSOR_GAME_ROTATION_VECTOR); -#else window->EnableDeviceSensor(SENSOR_ORIENTATION); -#endif break; case eAbsoluteDeviceOrientation: -#ifdef MOZ_WIDGET_ANDROID - // Falls back to SENSOR_ORIENTATION if unavailable on device. - window->EnableDeviceSensor(SENSOR_ROTATION_VECTOR); -#else window->EnableDeviceSensor(SENSOR_ORIENTATION); -#endif break; case eDeviceProximity: case eUserProximity: @@ -528,11 +510,6 @@ EventListenerManager::EnableDevice(EventMessage aEventMessage) window->EnableDeviceSensor(SENSOR_LINEAR_ACCELERATION); window->EnableDeviceSensor(SENSOR_GYROSCOPE); break; -#if defined(MOZ_WIDGET_ANDROID) - case eOrientationChange: - window->EnableOrientationChangeListener(); - break; -#endif default: NS_WARNING("Enabling an unknown device sensor."); break; @@ -549,17 +526,9 @@ EventListenerManager::DisableDevice(EventMessage aEventMessage) switch (aEventMessage) { case eDeviceOrientation: -#ifdef MOZ_WIDGET_ANDROID - // Disable all potential fallback sensors. - window->DisableDeviceSensor(SENSOR_GAME_ROTATION_VECTOR); - window->DisableDeviceSensor(SENSOR_ROTATION_VECTOR); -#endif window->DisableDeviceSensor(SENSOR_ORIENTATION); break; case eAbsoluteDeviceOrientation: -#ifdef MOZ_WIDGET_ANDROID - window->DisableDeviceSensor(SENSOR_ROTATION_VECTOR); -#endif window->DisableDeviceSensor(SENSOR_ORIENTATION); break; case eDeviceMotion: @@ -574,11 +543,6 @@ EventListenerManager::DisableDevice(EventMessage aEventMessage) case eDeviceLight: window->DisableDeviceSensor(SENSOR_LIGHT); break; -#if defined(MOZ_WIDGET_ANDROID) - case eOrientationChange: - window->DisableOrientationChangeListener(); - break; -#endif default: NS_WARNING("Disabling an unknown device sensor."); break; diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index edb84ea01b..c4edc1fe2a 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -566,12 +566,6 @@ WINDOW_EVENT(online, eOnline, EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass) -#if defined(MOZ_WIDGET_ANDROID) -WINDOW_EVENT(orientationchange, - eOrientationChange, - EventNameType_HTMLBodyOrFramesetOnly, - eBasicEventClass) -#endif WINDOW_EVENT(pagehide, ePageHide, EventNameType_HTMLBodyOrFramesetOnly, diff --git a/dom/events/TouchEvent.cpp b/dom/events/TouchEvent.cpp index c4cb33d950..2986198134 100644 --- a/dom/events/TouchEvent.cpp +++ b/dom/events/TouchEvent.cpp @@ -204,10 +204,7 @@ TouchEvent::PrefEnabled(nsIDocShell* aDocShell) enabled = false; } else { if (sPrefCacheValue == 2) { -#if defined(MOZ_WIDGET_ANDROID) - // Touch support is always enabled on B2G and android. - enabled = true; -#elif defined(XP_WIN) || MOZ_WIDGET_GTK == 3 +#if defined(XP_WIN) || MOZ_WIDGET_GTK == 3 static bool sDidCheckTouchDeviceSupport = false; static bool sIsTouchDeviceSupportPresent = false; // On Windows and GTK3 we auto-detect based on device support. |