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

Unified Diff: Source/modules/device_orientation/DeviceMotionController.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
Index: Source/modules/device_orientation/DeviceMotionController.cpp
diff --git a/Source/modules/device_orientation/DeviceMotionController.cpp b/Source/modules/device_orientation/DeviceMotionController.cpp
index 63950a50f71b0ff49b368f54d48f6a6545c181c7..d8f2511cc2b6e70dd7cb9f16ebab86ce927187fe 100644
--- a/Source/modules/device_orientation/DeviceMotionController.cpp
+++ b/Source/modules/device_orientation/DeviceMotionController.cpp
@@ -91,8 +91,7 @@ void DeviceMotionController::unregisterWithDispatcher()
bool DeviceMotionController::isNullEvent(Event* event)
{
- ASSERT(event->type() == EventTypeNames::devicemotion);
- DeviceMotionEvent* motionEvent = static_cast<DeviceMotionEvent*>(event);
+ DeviceMotionEvent* motionEvent = toDeviceMotionEvent(event);
return !motionEvent->deviceMotionData()->canProvideEventData();
}
« no previous file with comments | « Source/core/html/shadow/SpinButtonElement.cpp ('k') | Source/modules/device_orientation/DeviceMotionEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698