зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1900037 - Disable vibration APIs r=webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D212291
This commit is contained in:
Родитель
c9719d7d48
Коммит
5068375765
|
@ -828,12 +828,6 @@ bool Navigator::Vibrate(const nsTArray<uint32_t>& aPattern) {
|
|||
|
||||
nsTArray<uint32_t> pattern = SanitizeVibratePattern(aPattern);
|
||||
|
||||
// The spec says we check dom.vibrator.enabled after we've done the sanity
|
||||
// checking on the pattern.
|
||||
if (!StaticPrefs::dom_vibrator_enabled()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
mRequestedVibrationPattern = std::move(pattern);
|
||||
|
||||
PermissionDelegateHandler* permissionHandler =
|
||||
|
|
|
@ -148,7 +148,9 @@ partial interface Navigator {
|
|||
partial interface Navigator {
|
||||
// We don't support sequences in unions yet
|
||||
//boolean vibrate ((unsigned long or sequence<unsigned long>) pattern);
|
||||
[Pref="dom.vibrator.enabled"]
|
||||
boolean vibrate(unsigned long duration);
|
||||
[Pref="dom.vibrator.enabled"]
|
||||
boolean vibrate(sequence<unsigned long> pattern);
|
||||
};
|
||||
|
||||
|
|
|
@ -4332,7 +4332,7 @@
|
|||
|
||||
- name: dom.vibrator.enabled
|
||||
type: bool
|
||||
value: true
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: dom.vibrator.max_vibrate_ms
|
||||
|
@ -4770,11 +4770,7 @@
|
|||
|
||||
- name: dom.webnotifications.vibrate.enabled
|
||||
type: RelaxedAtomicBool
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
#else
|
||||
value: false
|
||||
#endif
|
||||
mirror: always
|
||||
|
||||
# Setting log level for notification modules.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
prefs: [dom.vibrator.enabled:true]
|
Загрузка…
Ссылка в новой задаче