Bug 1468711 - Part 1: Send a proper element for pseudo element to nsDOMWindowUtils::ComputeAnimationDistance. r=pbro
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Wed, 27 Jun 2018 10:22:06 +0900
changeset 478980 8290ab3d43d40a0a0b960e03cbdb6a0daa5401fa
parent 478891 9da8a5d80b984d473d8eeb30d3f3acf36ffe546f
child 478981 283192564acab4647bce765814c2138e1b9f0cda
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1468711
milestone63.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 1468711 - Part 1: Send a proper element for pseudo element to nsDOMWindowUtils::ComputeAnimationDistance. r=pbro MozReview-Commit-ID: 4xTST1tBeEW
devtools/server/actors/animation.js
--- a/devtools/server/actors/animation.js
+++ b/devtools/server/actors/animation.js
@@ -525,18 +525,18 @@ var AnimationPlayerActor = protocol.Acto
     // Calculate the distance.
     for (const property of properties) {
       const propertyName = property.name;
       const maxObject = { distance: -1 };
       for (let i = 0; i < property.values.length - 1; i++) {
         const value1 = property.values[i].value;
         for (let j = i + 1; j < property.values.length; j++) {
           const value2 = property.values[j].value;
-          const distance = this.getDistance(this.player.effect.target, propertyName,
-                                            value1, value2, DOMWindowUtils);
+          const distance =
+            this.getDistance(this.node, propertyName, value1, value2, DOMWindowUtils);
           if (maxObject.distance >= distance) {
             continue;
           }
           maxObject.distance = distance;
           maxObject.value1 = value1;
           maxObject.value2 = value2;
         }
       }
@@ -550,18 +550,18 @@ var AnimationPlayerActor = protocol.Acto
           return current;
         }, property.values[0]);
         continue;
       }
       const baseValue =
         maxObject.value1 < maxObject.value2 ? maxObject.value1 : maxObject.value2;
       for (const values of property.values) {
         const value = values.value;
-        const distance = this.getDistance(this.player.effect.target, propertyName,
-                                          baseValue, value, DOMWindowUtils);
+        const distance =
+          this.getDistance(this.node, propertyName, baseValue, value, DOMWindowUtils);
         values.distance = distance / maxObject.distance;
       }
     }
     return properties;
   },
 
   /**
    * Get the animation types for a given list of CSS property names.