diff options
Diffstat (limited to 'dom/events')
-rw-r--r-- | dom/events/EventListenerManager.cpp | 42 | ||||
-rw-r--r-- | dom/events/EventNameList.h | 18 | ||||
-rw-r--r-- | dom/events/KeyNameList.h | 4 | ||||
-rw-r--r-- | dom/events/TouchEvent.cpp | 2 | ||||
-rw-r--r-- | dom/events/moz.build | 5 |
5 files changed, 6 insertions, 65 deletions
diff --git a/dom/events/EventListenerManager.cpp b/dom/events/EventListenerManager.cpp index a8c48ede8..fe896870c 100644 --- a/dom/events/EventListenerManager.cpp +++ b/dom/events/EventListenerManager.cpp @@ -13,9 +13,6 @@ #include "mozilla/DOMEventTargetHelper.h" #include "mozilla/EventDispatcher.h" #include "mozilla/EventListenerManager.h" -#ifdef MOZ_B2G -#include "mozilla/Hal.h" -#endif // #ifdef MOZ_B2G #include "mozilla/HalSensor.h" #include "mozilla/InternalMutationEvent.h" #include "mozilla/JSEventHandler.h" @@ -355,18 +352,10 @@ EventListenerManager::AddEventListenerInternal( EnableDevice(eDeviceLight); } else if (aTypeAtom == nsGkAtoms::ondevicemotion) { EnableDevice(eDeviceMotion); -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) } else if (aTypeAtom == nsGkAtoms::onorientationchange) { EnableDevice(eOrientationChange); #endif -#ifdef MOZ_B2G - } else if (aTypeAtom == nsGkAtoms::onmoztimechange) { - EnableDevice(eTimeChange); - } else if (aTypeAtom == nsGkAtoms::onmoznetworkupload) { - EnableDevice(eNetworkUpload); - } else if (aTypeAtom == nsGkAtoms::onmoznetworkdownload) { - EnableDevice(eNetworkDownload); -#endif // MOZ_B2G } else if (aTypeAtom == nsGkAtoms::ontouchstart || aTypeAtom == nsGkAtoms::ontouchend || aTypeAtom == nsGkAtoms::ontouchmove || @@ -492,14 +481,9 @@ EventListenerManager::IsDeviceType(EventMessage aEventMessage) case eDeviceLight: case eDeviceProximity: case eUserProximity: -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) case eOrientationChange: #endif -#ifdef MOZ_B2G - case eTimeChange: - case eNetworkUpload: - case eNetworkDownload: -#endif return true; default: break; @@ -545,20 +529,11 @@ EventListenerManager::EnableDevice(EventMessage aEventMessage) window->EnableDeviceSensor(SENSOR_LINEAR_ACCELERATION); window->EnableDeviceSensor(SENSOR_GYROSCOPE); break; -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) case eOrientationChange: window->EnableOrientationChangeListener(); break; #endif -#ifdef MOZ_B2G - case eTimeChange: - window->EnableTimeChangeNotifications(); - break; - case eNetworkUpload: - case eNetworkDownload: - window->EnableNetworkEvent(aEventMessage); - break; -#endif default: NS_WARNING("Enabling an unknown device sensor."); break; @@ -600,20 +575,11 @@ EventListenerManager::DisableDevice(EventMessage aEventMessage) case eDeviceLight: window->DisableDeviceSensor(SENSOR_LIGHT); break; -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) case eOrientationChange: window->DisableOrientationChangeListener(); break; #endif -#ifdef MOZ_B2G - case eTimeChange: - window->DisableTimeChangeNotifications(); - break; - case eNetworkUpload: - case eNetworkDownload: - window->DisableNetworkEvent(aEventMessage); - break; -#endif // MOZ_B2G default: NS_WARNING("Disabling an unknown device sensor."); break; diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index 509863e6c..214b844e7 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -563,7 +563,7 @@ WINDOW_EVENT(online, eOnline, EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass) -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) WINDOW_EVENT(orientationchange, eOrientationChange, EventNameType_HTMLBodyOrFramesetOnly, @@ -637,22 +637,6 @@ WINDOW_ONLY_EVENT(appinstalled, EventNameType_None, eBasicEventClass) - -#ifdef MOZ_B2G -WINDOW_ONLY_EVENT(moztimechange, - eTimeChange, - EventNameType_None, - eBasicEventClass) -WINDOW_ONLY_EVENT(moznetworkupload, - eNetworkUpload, - EventNameType_None, - eBasicEventClass) -WINDOW_ONLY_EVENT(moznetworkdownload, - eNetworkDownload, - EventNameType_None, - eBasicEventClass) -#endif // MOZ_B2G - TOUCH_EVENT(touchstart, eTouchStart, EventNameType_All, diff --git a/dom/events/KeyNameList.h b/dom/events/KeyNameList.h index 35fbe2d5f..361122ec7 100644 --- a/dom/events/KeyNameList.h +++ b/dom/events/KeyNameList.h @@ -32,10 +32,6 @@ DEFINE_KEYNAME_INTERNAL(PrintableKey, "MozPrintableKey") DEFINE_KEYNAME_INTERNAL(SoftLeft, "MozSoftLeft") DEFINE_KEYNAME_INTERNAL(SoftRight, "MozSoftRight") -#ifdef MOZ_B2G -DEFINE_KEYNAME_INTERNAL(HomeScreen, "MozHomeScreen") -#endif // #ifdef MOZ_B2G - /****************************************************************************** * Modifier Keys *****************************************************************************/ diff --git a/dom/events/TouchEvent.cpp b/dom/events/TouchEvent.cpp index cc9684eb3..9b7a74ac2 100644 --- a/dom/events/TouchEvent.cpp +++ b/dom/events/TouchEvent.cpp @@ -203,7 +203,7 @@ TouchEvent::PrefEnabled(nsIDocShell* aDocShell) enabled = false; } else { if (sPrefCacheValue == 2) { -#if defined(MOZ_B2G) || defined(MOZ_WIDGET_ANDROID) +#if defined(MOZ_WIDGET_ANDROID) // Touch support is always enabled on B2G and android. enabled = true; #elif defined(XP_WIN) || MOZ_WIDGET_GTK == 3 diff --git a/dom/events/moz.build b/dom/events/moz.build index ee4946038..ec3813207 100644 --- a/dom/events/moz.build +++ b/dom/events/moz.build @@ -153,10 +153,5 @@ LOCAL_INCLUDES += [ '/layout/xul/tree/', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': - LOCAL_INCLUDES += [ - '/dom/wifi', - ] - if CONFIG['GNU_CXX']: CXXFLAGS += ['-Wno-error=shadow'] |