Bug 1210795 - Part 6: Removes extra codes. r=pbro
authorDaisuke Akatsuka <daisuke@mozilla-japan.org>
Wed, 26 Oct 2016 16:37:19 +0900
changeset 319809 2558ac9b4094371bbfbee82d4faf135cf7820a1f
parent 319808 2cc8a31b03a8d07b6d022af7eccf8008c440a0f8
child 319810 23f92954349863643543975a05ca8f229dfcbf23
push id20748
push userphilringnalda@gmail.com
push dateFri, 28 Oct 2016 03:39:55 +0000
treeherderfx-team@715360440695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1210795
milestone52.0a1
Bug 1210795 - Part 6: Removes extra codes. r=pbro MozReview-Commit-ID: 4SeJI0mimVk
devtools/client/animationinspector/components/animation-time-block.js
devtools/client/animationinspector/utils.js
--- a/devtools/client/animationinspector/components/animation-time-block.js
+++ b/devtools/client/animationinspector/components/animation-time-block.js
@@ -63,22 +63,19 @@ AnimationTimeBlock.prototype = {
     this.unrender();
 
     this.animation = animation;
     let {state} = this.animation;
 
     // Create a container element to hold the delay and iterations.
     // It is positioned according to its delay (divided by the playbackrate),
     // and its width is according to its duration (divided by the playbackrate).
-    let {x, iterationW, delayX, delayW, negativeDelayW, endDelayX, endDelayW} =
+    const {x, delayX, delayW, endDelayX, endDelayW} =
       TimeScale.getAnimationDimensions(animation);
 
-    // background properties for .iterations element
-    let backgroundIterations = TimeScale.getIterationsBackgroundData(animation);
-
     // Animation summary graph element.
     const summaryEl = createNode({
       parent: this.containerEl,
       namespace: "http://www.w3.org/2000/svg",
       nodeType: "svg",
       attributes: {
         "class": "summary",
         "preserveAspectRatio": "none",
--- a/devtools/client/animationinspector/utils.js
+++ b/devtools/client/animationinspector/utils.js
@@ -263,37 +263,12 @@ var TimeScale = {
     // The width of the endDelay.
     let endDelayW = this.durationToDistance(Math.abs(endDelay) / rate);
     // The start position of the endDelay.
     let endDelayX = endDelay < 0 ? x + iterationW - endDelayW
                                  : x + iterationW;
 
     return {x, w, iterationW, delayX, delayW, negativeDelayW,
             endDelayX, endDelayW};
-  },
-
-  /**
-   * Given an animation, get the background data for .iterations element.
-   * This background represents iterationCount and iterationStart.
-   * Returns three properties.
-   * 1. size: x of background-size (%)
-   * 2. position: x of background-position (%)
-   * 3. repeat: background-repeat (string)
-   */
-  getIterationsBackgroundData: function ({state}) {
-    let iterationCount = state.iterationCount || 1;
-    let iterationStartW = state.iterationStart % 1 * 100;
-    let background = {};
-    if (iterationCount == 1) {
-      background.size = 100 - iterationStartW;
-      background.position = 0;
-      background.repeat = "no-repeat";
-    } else {
-      background.size = 1 / iterationCount * 100;
-      background.position = -iterationStartW * background.size /
-                              (100 - background.size);
-      background.repeat = "repeat-x";
-    }
-    return background;
   }
 };
 
 exports.TimeScale = TimeScale;