Bug 1486297 - Add a pref for Pointer Lock API so that user can disable it. r=smaug!

Differential Revision: https://phabricator.services.mozilla.com/D4637

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Xidorn Quan 2018-08-30 22:55:31 +00:00
Родитель 9d70cb3843
Коммит 63a8649721
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -269,7 +269,7 @@ partial interface Element {
// https://w3c.github.io/pointerlock/#extensions-to-the-element-interface // https://w3c.github.io/pointerlock/#extensions-to-the-element-interface
partial interface Element { partial interface Element {
[NeedsCallerType] [NeedsCallerType, Pref="dom.pointer-lock.enabled"]
void requestPointerLock(); void requestPointerLock();
}; };

Просмотреть файл

@ -195,6 +195,12 @@ pref("dom.enable_performance_observer", true);
// Enable requestIdleCallback API // Enable requestIdleCallback API
pref("dom.requestIdleCallback.enabled", true); pref("dom.requestIdleCallback.enabled", true);
// Enable Pointer Lock API
// This is added for accessibility purpose. When user has no way to exit
// pointer lock (e.g. no keyboard available), they can use this pref to
// disable the Pointer Lock API altogether.
pref("dom.pointer-lock.enabled", true);
// Whether the Gamepad API is enabled // Whether the Gamepad API is enabled
pref("dom.gamepad.enabled", true); pref("dom.gamepad.enabled", true);
pref("dom.gamepad.test.enabled", false); pref("dom.gamepad.test.enabled", false);