| Index: Source/modules/device_orientation/NewDeviceOrientationController.cpp
|
| diff --git a/Source/modules/device_orientation/NewDeviceOrientationController.cpp b/Source/modules/device_orientation/NewDeviceOrientationController.cpp
|
| index 3cf3197694528942473a2ab27e6856b88a34a9ed..b1cf62c300c8b104a7de1bcee45ef3c0575f5745 100644
|
| --- a/Source/modules/device_orientation/NewDeviceOrientationController.cpp
|
| +++ b/Source/modules/device_orientation/NewDeviceOrientationController.cpp
|
| @@ -28,6 +28,7 @@
|
| #include "modules/device_orientation/NewDeviceOrientationController.h"
|
|
|
| #include "core/dom/Document.h"
|
| +#include "modules/device_orientation/DeviceOrientationData.h"
|
| #include "modules/device_orientation/DeviceOrientationDispatcher.h"
|
| #include "modules/device_orientation/DeviceOrientationEvent.h"
|
|
|
| @@ -83,4 +84,11 @@ void NewDeviceOrientationController::unregisterWithDispatcher()
|
| DeviceOrientationDispatcher::instance().removeDeviceOrientationController(this);
|
| }
|
|
|
| +bool NewDeviceOrientationController::isNullEvent(Event* event)
|
| +{
|
| + ASSERT(event->type() == eventNames().devicemotionEvent);
|
| + DeviceOrientationEvent* orientationEvent = static_cast<DeviceOrientationEvent*>(event);
|
| + return !orientationEvent->orientation()->canProvideEventData();
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|