Bug 1638064 - Removed toolkit.cosmeticAnimations.enabled pref and replaced it with "prefers-reduced-motion" in CFRPageActions r=dao

Differential Revision: https://phabricator.services.mozilla.com/D76761
This commit is contained in:
emcminn 2020-05-28 15:03:08 +00:00
Родитель b8c253312c
Коммит 0bb753a182
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -38,7 +38,6 @@ const SUMO_BASE_URL = Services.urlFormatter.formatURLPref(
);
const ADDONS_API_URL =
"https://services.addons.mozilla.org/api/v3/addons/addon";
const ANIMATIONS_ENABLED_PREF = "toolkit.cosmeticAnimations.enabled";
const DELAY_BEFORE_EXPAND_MS = 1000;
const CATEGORY_ICONS = {
@ -476,7 +475,7 @@ class PageAction {
animationContainer.toggleAttribute(
"animate",
Services.prefs.getBoolPref(ANIMATIONS_ENABLED_PREF, true)
!this.window.matchMedia("(prefers-reduced-motion: reduce)").matches
);
animationContainer.removeAttribute("paused");