Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1703)

Unified Diff: Source/modules/device_orientation/NewDeviceOrientationController.cpp

Issue 26429003: Cleanup: Add toDeviceMotionEvent and toDeviceOrientationEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to ToT Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/device_orientation/DeviceOrientationEvent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/device_orientation/NewDeviceOrientationController.cpp
diff --git a/Source/modules/device_orientation/NewDeviceOrientationController.cpp b/Source/modules/device_orientation/NewDeviceOrientationController.cpp
index a9eb064c81c0424dbe8317db5df995a8f70ffacb..28d2b2690ff208eb0c6d04317e01525524d83726 100644
--- a/Source/modules/device_orientation/NewDeviceOrientationController.cpp
+++ b/Source/modules/device_orientation/NewDeviceOrientationController.cpp
@@ -89,8 +89,7 @@ void NewDeviceOrientationController::unregisterWithDispatcher()
bool NewDeviceOrientationController::isNullEvent(Event* event)
{
- ASSERT(event->type() == EventTypeNames::deviceorientation);
- DeviceOrientationEvent* orientationEvent = static_cast<DeviceOrientationEvent*>(event);
+ DeviceOrientationEvent* orientationEvent = toDeviceOrientationEvent(event);
return !orientationEvent->orientation()->canProvideEventData();
}
« no previous file with comments | « Source/modules/device_orientation/DeviceOrientationEvent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698