Bug 1463621 - Part 2: Remove devtools.new-animationinspector.enabled preference. r=pbro
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Mon, 10 Sep 2018 12:58:20 +0900
changeset 435664 46032e616f5d6d2b6abcb5f531abc8753d7715d2
parent 435663 f05a3729764788ee729e27a518719ed959a475c7
child 435665 afcb44c66c5ff4c0d3a3e3b3036c48caf70ef088
push id107699
push userdakatsuka@mozilla.com
push dateTue, 11 Sep 2018 10:59:05 +0000
treeherdermozilla-inbound@5d653605ce14 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1463621
milestone64.0a1
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
Bug 1463621 - Part 2: Remove devtools.new-animationinspector.enabled preference. r=pbro Differential Revision: https://phabricator.services.mozilla.com/D5499
devtools/client/inspector/animation/test/head.js
devtools/client/inspector/inspector.js
devtools/client/preferences/devtools-client.js
devtools/client/shared/test/browser_telemetry_sidebar.js
--- a/devtools/client/inspector/animation/test/head.js
+++ b/devtools/client/inspector/animation/test/head.js
@@ -10,24 +10,20 @@ Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/inspector/test/head.js", this);
 
 const FRAME_SCRIPT_URL = CHROME_URL_ROOT + "doc_frame_script.js";
 const TAB_NAME = "newanimationinspector";
 
 const ANIMATION_L10N =
   new LocalizationHelper("devtools/client/locales/animationinspector.properties");
 
-// Enable new animation inspector.
-Services.prefs.setBoolPref("devtools.new-animationinspector.enabled", true);
-
 // Auto clean-up when a test ends.
 // Clean-up all prefs that might have been changed during a test run
 // (safer here because if the test fails, then the pref is never reverted)
 registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("devtools.new-animationinspector.enabled");
   Services.prefs.clearUserPref("devtools.toolsidebar-width.inspector");
 });
 
 /**
  * Open the toolbox, with the inspector tool visible and the animationinspector
  * sidebar selected.
  *
  * @return {Promise} that resolves when the inspector is ready.
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -930,39 +930,35 @@ Inspector.prototype = {
       },
       defaultTab == layoutId);
 
     this.sidebar.queueExistingTab(
       "computedview",
       INSPECTOR_L10N.getStr("inspector.sidebar.computedViewTitle"),
       defaultTab == "computedview");
 
+    const animationId = "newanimationinspector";
     const animationTitle =
       INSPECTOR_L10N.getStr("inspector.sidebar.animationInspectorTitle");
-
-    if (Services.prefs.getBoolPref("devtools.new-animationinspector.enabled")) {
-      const animationId = "newanimationinspector";
-
-      this.sidebar.queueTab(
-        animationId,
-        animationTitle,
-        {
-          props: {
-            id: animationId,
-            title: animationTitle
-          },
-          panel: () => {
-            const AnimationInspector =
-              this.browserRequire("devtools/client/inspector/animation/animation");
-            this.animationinspector = new AnimationInspector(this, this.panelWin);
-            return this.animationinspector.provider;
-          }
+    this.sidebar.queueTab(
+      animationId,
+      animationTitle,
+      {
+        props: {
+          id: animationId,
+          title: animationTitle
         },
-        defaultTab == animationId);
-    }
+        panel: () => {
+          const AnimationInspector =
+            this.browserRequire("devtools/client/inspector/animation/animation");
+          this.animationinspector = new AnimationInspector(this, this.panelWin);
+          return this.animationinspector.provider;
+        }
+      },
+      defaultTab == animationId);
 
     // Inject a lazy loaded react tab by exposing a fake React object
     // with a lazy defined Tab thanks to `panel` being a function
     const fontId = "fontinspector";
     const fontTitle = INSPECTOR_L10N.getStr("inspector.sidebar.fontInspectorTitle");
     this.sidebar.queueTab(
       fontId,
       fontTitle,
--- a/devtools/client/preferences/devtools-client.js
+++ b/devtools/client/preferences/devtools-client.js
@@ -54,18 +54,16 @@ pref("devtools.inspector.show_pseudo_ele
 // The default size for image preview tooltips in the rule-view/computed-view/markup-view
 pref("devtools.inspector.imagePreviewTooltipSize", 300);
 // Enable user agent style inspection in rule-view
 pref("devtools.inspector.showUserAgentStyles", false);
 // Show all native anonymous content (like controls in <video> tags)
 pref("devtools.inspector.showAllAnonymousContent", false);
 // Enable the CSS shapes highlighter
 pref("devtools.inspector.shapesHighlighter.enabled", true);
-// Enable the new Animation Inspector
-pref("devtools.new-animationinspector.enabled", true);
 // Enable the Font Editor
 pref("devtools.inspector.fonteditor.enabled", true);
 // Enable the font highlight-on-hover feature
 pref("devtools.inspector.fonthighlighter.enabled", true);
 
 // Flexbox preferences
 // Enable the Flexbox highlighter in Nightly
 #if defined(NIGHTLY_BUILD)
--- a/devtools/client/shared/test/browser_telemetry_sidebar.js
+++ b/devtools/client/shared/test/browser_telemetry_sidebar.js
@@ -6,43 +6,36 @@
 
 const TEST_URI = "data:text/html;charset=utf-8,<p>browser_telemetry_sidebar.js</p>";
 const OPTOUT = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT;
 
 // Because we need to gather stats for the period of time that a tool has been
 // opened we make use of setTimeout() to create tool active times.
 const TOOL_DELAY = 200;
 
-var animationPanelId;
-if (Services.prefs.getBoolPref("devtools.new-animationinspector.enabled")) {
-  animationPanelId = "newanimationinspector";
-} else {
-  animationPanelId = "animationinspector";
-}
-
 const DATA = [
   {
     timestamp: null,
     category: "devtools.main",
     method: "sidepanel_changed",
     object: "inspector",
     value: null,
     extra: {
       oldpanel: "computedview",
-      newpanel: animationPanelId
+      newpanel: "newanimationinspector"
     }
   },
   {
     timestamp: null,
     category: "devtools.main",
     method: "sidepanel_changed",
     object: "inspector",
     value: null,
     extra: {
-      oldpanel: animationPanelId,
+      oldpanel: "newanimationinspector",
       newpanel: "fontinspector"
     }
   },
   {
     timestamp: null,
     category: "devtools.main",
     method: "sidepanel_changed",
     object: "inspector",
@@ -66,27 +59,27 @@ const DATA = [
   {
     timestamp: null,
     category: "devtools.main",
     method: "sidepanel_changed",
     object: "inspector",
     value: null,
     extra: {
       oldpanel: "computedview",
-      newpanel: animationPanelId
+      newpanel: "newanimationinspector"
     }
   },
   {
     timestamp: null,
     category: "devtools.main",
     method: "sidepanel_changed",
     object: "inspector",
     value: null,
     extra: {
-      oldpanel: animationPanelId,
+      oldpanel: "newanimationinspector",
       newpanel: "fontinspector"
     }
   },
   {
     timestamp: null,
     category: "devtools.main",
     method: "sidepanel_changed",
     object: "inspector",
@@ -132,17 +125,17 @@ add_task(async function() {
   gBrowser.removeCurrentTab();
 });
 
 function testSidebar(toolbox) {
   info("Testing sidebar");
 
   const inspector = toolbox.getCurrentPanel();
   let sidebarTools = ["computedview", "layoutview", "fontinspector",
-                      animationPanelId];
+                      "newanimationinspector"];
 
   // Concatenate the array with itself so that we can open each tool twice.
   sidebarTools = [...sidebarTools, ...sidebarTools];
 
   return new Promise(resolve => {
     // See TOOL_DELAY for why we need setTimeout here
     setTimeout(function selectSidebarTab() {
       const tool = sidebarTools.pop();