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

Unified Diff: Source/modules/device_orientation/DeviceOrientationController.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/DeviceOrientationController.cpp
diff --git a/Source/modules/device_orientation/DeviceOrientationController.cpp b/Source/modules/device_orientation/DeviceOrientationController.cpp
index 7b13542c9289bf4c5696359e483198457ae5d255..a08d7fdd2f7f7117ed4f494a16c0552c7c523f15 100644
--- a/Source/modules/device_orientation/DeviceOrientationController.cpp
+++ b/Source/modules/device_orientation/DeviceOrientationController.cpp
@@ -52,6 +52,9 @@ DeviceOrientationController& DeviceOrientationController::from(Document& documen
void DeviceOrientationController::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