Backed out changeset 674775dda8ad (bug 1364972) for eslint failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Thu, 07 Sep 2017 12:31:11 -0700
changeset 428999 9047e2077ec73734bdf76d60856d0a1c99bef64b
parent 428998 674775dda8ad4d65313c437b4eff330df90e0bb6
child 429000 bf29e38baf5d25933128d6e564ae732a422a2837
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1364972
milestone57.0a1
backs out674775dda8ad4d65313c437b4eff330df90e0bb6
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 674775dda8ad (bug 1364972) for eslint failures a=backout MozReview-Commit-ID: 5tmy6XSi0sL
toolkit/components/extensions/ext-browserSettings.js
toolkit/components/extensions/schemas/browser_settings.json
toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
--- a/toolkit/components/extensions/ext-browserSettings.js
+++ b/toolkit/components/extensions/ext-browserSettings.js
@@ -67,26 +67,16 @@ ExtensionPreferencesManager.addSetting("
     let returnObj = {};
     for (let pref of this.prefNames) {
       returnObj[pref] = value;
     }
     return returnObj;
   },
 });
 
-ExtensionPreferencesManager.addSetting("imageAnimationBehavior", {
-  prefNames: [
-    "image.animation_mode",
-  ],
-
-  setCallback(value) {
-    return {[this.prefNames[0]]: value};
-  },
-});
-
 this.browserSettings = class extends ExtensionAPI {
   getAPI(context) {
     let {extension} = context;
     return {
       browserSettings: {
         allowPopupsForUserEvents: getSettingsAPI(extension,
           "allowPopupsForUserEvents",
           () => {
@@ -99,21 +89,16 @@ this.browserSettings = class extends Ext
               Services.prefs.getBoolPref("browser.cache.memory.enable");
           }),
         homepageOverride: getSettingsAPI(extension,
           HOMEPAGE_OVERRIDE_SETTING,
           () => {
             return Services.prefs.getComplexValue(
               HOMEPAGE_URL_PREF, Ci.nsIPrefLocalizedString).data;
           }, undefined, true),
-        imageAnimationBehavior: getSettingsAPI(extension,
-          "imageAnimationBehavior",
-          () => {
-            return Preferences.get("image.animation_mode");
-          }),
         newTabPageOverride: getSettingsAPI(extension,
           NEW_TAB_OVERRIDE_SETTING,
           () => {
             return aboutNewTabService.newTabURL;
           }, URL_STORE_TYPE, true),
       },
     };
   }
--- a/toolkit/components/extensions/schemas/browser_settings.json
+++ b/toolkit/components/extensions/schemas/browser_settings.json
@@ -16,40 +16,28 @@
         }]
       }
     ]
   },
   {
     "namespace": "browserSettings",
     "description": "Use the <code>browser.browserSettings</code> API to control global settings of the browser.",
     "permissions": ["browserSettings"],
-    "types": [
-      {
-        "id": "ImageAnimationBehavior",
-        "type": "string",
-        "enum": ["normal", "none", "once"],
-        "description": "How images should be animated in the browser."
-      }
-    ],
     "properties": {
       "allowPopupsForUserEvents": {
         "$ref": "types.Setting",
         "description": "Allows or disallows pop-up windows from opening in response to user events."
       },
       "cacheEnabled": {
         "$ref": "types.Setting",
         "description": "Enables or disables the browser cache."
       },
       "homepageOverride": {
         "$ref": "types.Setting",
         "description": "Returns the value of the overridden home page. Read-only."
       },
-      "imageAnimationBehavior": {
-        "$ref": "types.Setting",
-        "description": "Controls the behaviour of image animation in the browser. This setting's value is of type ImageAnimationBehavior, defaulting to <code>normal</code>."
-      },
       "newTabPageOverride": {
         "$ref": "types.Setting",
         "description": "Returns the value of the overridden new tab page. Read-only."
       }
     }
   }
 ]
--- a/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
@@ -18,17 +18,16 @@ AddonTestUtils.init(this);
 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "42");
 
 add_task(async function test_browser_settings() {
   // Create an object to hold the values to which we will initialize the prefs.
   const PREFS = {
     "browser.cache.disk.enable": true,
     "browser.cache.memory.enable": true,
     "dom.popup_allowed_events": Preferences.get("dom.popup_allowed_events"),
-    "image.animation_mode": "none",
   };
 
   async function background() {
     browser.test.onMessage.addListener(async (msg, apiName, value) => {
       let apiObj = browser.browserSettings[apiName];
       await apiObj.set({value});
       browser.test.sendMessage("settingData", await apiObj.get({}));
     });
@@ -84,18 +83,12 @@ add_task(async function test_browser_set
 
   await testSetting(
     "allowPopupsForUserEvents", false,
     {"dom.popup_allowed_events": ""});
   await testSetting(
     "allowPopupsForUserEvents", true,
     {"dom.popup_allowed_events": PREFS["dom.popup_allowed_events"]});
 
-  for (let value of ["normal", "none", "once"]) {
-    await testSetting(
-      "imageAnimationBehavior", value,
-      {"image.animation_mode": value});
-  }
-
   await extension.unload();
 
   await promiseShutdownManager();
 });