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

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

Issue 1000173002: Fix measurement of DeviceMotion and DeviceOrientation on secure origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 22cdef0a71b8bde87b6e10a35aa9d290b0f86dd3..adb45324a4dc2e939c7c0bd77bef3d0247749600 100644
--- a/Source/modules/device_orientation/DeviceMotionController.cpp
+++ b/Source/modules/device_orientation/DeviceMotionController.cpp
@@ -45,6 +45,9 @@ DeviceMotionController& DeviceMotionController::from(Document& document)
void DeviceMotionController::didAddEventListener(LocalDOMWindow* window, const AtomicString& eventType)
{
+ if (eventType != eventTypeName())
+ return;
+
if (document().frame()) {
String errorMessage;
if (document().securityOrigin()->canAccessFeatureRequiringSecureOrigin(errorMessage)) {

Powered by Google App Engine
This is Rietveld 408576698