Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 29b34672b9010a4e6be41d927c1e3f4eb3c69da7
https://github.com/WebKit/WebKit/commit/29b34672b9010a4e6be41d927c1e3f4eb3c69da7
Author: Anne van Kesteren <[email protected]>
Date: 2026-01-08 (Thu, 08 Jan 2026)
Changed paths:
A
LayoutTests/http/tests/events/device-orientation-motion-enumerable-expected.txt
A LayoutTests/http/tests/events/device-orientation-motion-enumerable.html
A
LayoutTests/platform/glib/http/tests/events/device-orientation-motion-enumerable-expected.txt
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
M Source/WebCore/dom/DeviceMotionEvent.idl
M Source/WebCore/dom/DeviceOrientationEvent.idl
M Source/WebCore/page/DOMWindow+DeviceMotion.idl
M Source/WebCore/page/DOMWindow+DeviceOrientation.idl
Log Message:
-----------
Restrict devicemotion and deviceorientation IDL to secure contexts
https://bugs.webkit.org/show_bug.cgi?id=304985
rdar://44804273
Reviewed by Ryosuke Niwa.
As of 207177@main these events have been restricted to secure contexts,
but the IDL has been available everywhere for no good reason.
The ondevicemotion and ondeviceorientation properties were also not
enumerable, but should be. As far as I can tell from blame nobody got
around to making the change. There's no real reason not to do this.
The SecureContext change is manually tested as this can only be tested
through WPT and the tests for this feature don't work in WebKit due to
missing WebDriver support. Since SecureContext is tested in general and
we already have tests that the events don't dispatch in secure contexts
this should be sufficient.
This matches the specification for these events:
https://w3c.github.io/deviceorientation/
Canonical link: https://commits.webkit.org/305266@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications