Index: Source/modules/device_orientation/DeviceMotionController.cpp |
diff --git a/Source/modules/device_orientation/DeviceMotionController.cpp b/Source/modules/device_orientation/DeviceMotionController.cpp |
index d36e1983f4f4121ac381586f821816928f26cf82..78409747ccb1beac7e73be0fea2f9c83446e0138 100644 |
--- a/Source/modules/device_orientation/DeviceMotionController.cpp |
+++ b/Source/modules/device_orientation/DeviceMotionController.cpp |
@@ -37,8 +37,9 @@ |
namespace WebCore { |
DeviceMotionController::DeviceMotionController(Document& document) |
- : DeviceSensorEventController(document) |
+ : DeviceSensorEventController(document.page()) |
, DOMWindowLifecycleObserver(document.domWindow()) |
+ , m_document(document) |
{ |
} |
@@ -93,6 +94,11 @@ bool DeviceMotionController::isNullEvent(Event* event) |
return !motionEvent->deviceMotionData()->canProvideEventData(); |
} |
+Document* DeviceMotionController::document() |
+{ |
+ return &m_document; |
+} |
+ |
void DeviceMotionController::didAddEventListener(DOMWindow* window, const AtomicString& eventType) |
{ |
if (eventType != EventTypeNames::devicemotion) |