Bug 1456394 - Replace a few references to 'timing' in DevTools with 'getComputedTiming()' and 'updateTiming()'; r?daisuke draft
authorBrian Birtles <birtles@gmail.com>
Mon, 07 May 2018 12:58:30 +0900
changeset 794002 5d80255062cbd88ea616d47a770d4ecb8e3ddbce
parent 794001 9efc55b04eefa52a1d1cd75afc167eae9eb6ed4d
child 794003 3042a16ead1284cadd4dcd34dab431c1f7206e4e
push id109561
push userbmo:bbirtles@mozilla.com
push dateFri, 11 May 2018 06:43:46 +0000
reviewersdaisuke
bugs1456394
milestone62.0a1
Bug 1456394 - Replace a few references to 'timing' in DevTools with 'getComputedTiming()' and 'updateTiming()'; r?daisuke MozReview-Commit-ID: FKNs2Ci6nw1
devtools/client/inspector/animation-old/graph-helper.js
devtools/server/actors/animation.js
--- a/devtools/client/inspector/animation-old/graph-helper.js
+++ b/devtools/client/inspector/animation-old/graph-helper.js
@@ -85,17 +85,17 @@ ProgressGraphHelper.prototype = {
     this.win = null;
   },
 
   /**
    * Return animation duration.
    * @return {Number} duration
    */
   getDuration: function() {
-    return this.animation.effect.timing.duration;
+    return this.animation.effect.getComputedTiming().duration;
   },
 
   /**
    * Return animation's keyframe.
    * @return {Object} keyframe
    */
   getKeyframes: function() {
     return this.keyframes;
@@ -430,17 +430,17 @@ SummaryGraphHelper.prototype = {
     this.isOriginalBehavior = isOriginalBehavior;
   },
 
   /**
    * Set animation fill mode.
    * @param {String} fill - "both", "forwards", "backwards" or "both"
    */
   setFillMode: function(fill) {
-    this.animation.effect.timing.fill = fill;
+    this.animation.effect.updateTiming({ fill });
   },
 
   /**
    * Set true if need to close path in appendShapePath.
    * @param {bool} isClosePathNeeded - true: close, false: open.
    */
   setClosePathNeeded: function(isClosePathNeeded) {
     this.isClosePathNeeded = isClosePathNeeded;
--- a/devtools/server/actors/animation.js
+++ b/devtools/server/actors/animation.js
@@ -248,17 +248,17 @@ var AnimationPlayerActor = protocol.Acto
     return this.player.effect.getComputedTiming().iterationStart;
   },
 
   /**
    * Get the animation easing from this player.
    * @return {String}
    */
   getEasing: function() {
-    return this.player.effect.timing.easing;
+    return this.player.effect.getComputedTiming().easing;
   },
 
   /**
    * Get the animation fill mode from this player.
    * @return {String}
    */
   getFill: function() {
     return this.player.effect.getComputedTiming().fill;