Chromium Code Reviews| 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..5513d63f8b88b8c4652f64c8e5b565ab2f1c8d07 100644 |
| --- a/Source/modules/device_orientation/NewDeviceOrientationController.cpp |
| +++ b/Source/modules/device_orientation/NewDeviceOrientationController.cpp |
| @@ -28,9 +28,11 @@ |
| #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" |
| + |
|
abarth-chromium
2013/07/31 00:56:19
This blank line looks spurious.
timvolodine
2013/07/31 13:59:00
Done.
|
| namespace WebCore { |
| NewDeviceOrientationController::NewDeviceOrientationController(Document* document) |
| @@ -83,4 +85,11 @@ void NewDeviceOrientationController::unregisterWithDispatcher() |
| DeviceOrientationDispatcher::instance().removeDeviceOrientationController(this); |
| } |
| +bool NewDeviceOrientationController::isNullEvent(Event* event) |
| +{ |
| + DeviceOrientationEvent* orientationEvent = static_cast<DeviceOrientationEvent*>(event); |
|
abarth-chromium
2013/07/31 00:56:19
Same comment about this blind static_cast.
timvolodine
2013/07/31 13:59:00
added assert (analogous to the motion case).
|
| + DeviceOrientationData* data = orientationEvent->orientation(); |
| + return !data->canProvideAlpha() && !data->canProvideBeta() && !data->canProvideGamma(); |
|
abarth-chromium
2013/07/31 00:56:19
Do we have any mechanism to keep this check up to
timvolodine
2013/07/31 13:59:00
hmm, good point -- I've moved some of the code to
|
| +} |
| + |
| } // namespace WebCore |