Add a preference to enable / disable devicemotion and deviceorientation events
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Dec 2018 22:04:02 +0000 (22:04 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Dec 2018 22:04:02 +0000 (22:04 +0000)
commitb21584fc9626157cba52c19a83f9bbb470278ef5
tree4fd001d7633a4a04deee8431139375789a254215
parentb705311aee50cb841c97df5caa62e6b53af16e00
Add a preference to enable / disable devicemotion and deviceorientation events
https://bugs.webkit.org/show_bug.cgi?id=192631
<rdar://problem/46646244>

Reviewed by Geoffrey Garen.

Add setting to toggle support for the deviceorientation / devicemotion events:
- https://w3c.github.io/deviceorientation/

Source/WebCore:

* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
* page/Settings.yaml:

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setDeviceOrientationEventEnabled:]):
(-[WKPreferences _deviceOrientationEventEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/Settings.yaml
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h