Bug 1371493 - Compare AnimationValues when producing property-based keyframes; r=hiro
authorBrian Birtles <birtles@gmail.com>
Mon, 24 Jul 2017 10:25:13 +0900
changeset 419229 e09385879b6e71ab3d61e3aa2f8e5bbef0d10999
parent 419204 61f7864e2701dfd68b233aa8dfd69c012b2b2424
child 419230 cf34b8de856895e7d61b004dc54d2d4f3c4edea3
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1371493
milestone56.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 1371493 - Compare AnimationValues when producing property-based keyframes; r=hiro The KeyframeEffectReadOnly::GetProperties compares AnimationValue's mGecko member which means it sometimes produces the wrong results when using the Servo backend. Now that AnimationValue has a suitable operator!= method we can simply compare the AnimationValues directly. MozReview-Commit-ID: DQQbmcdeynw
dom/animation/KeyframeEffectReadOnly.cpp
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -1171,18 +1171,17 @@ KeyframeEffectReadOnly::GetProperties(
       propertyDetails.mValues.AppendElement(fromValue, mozilla::fallible);
 
       // Normally we can ignore the to-value for this segment since it is
       // identical to the from-value from the next segment. However, we need
       // to add it if either:
       // a) this is the last segment, or
       // b) the next segment's from-value differs.
       if (segmentIdx == segmentLen - 1 ||
-          property.mSegments[segmentIdx + 1].mFromValue.mGecko !=
-            segment.mToValue.mGecko) {
+          property.mSegments[segmentIdx + 1].mFromValue != segment.mToValue) {
         binding_detail::FastAnimationPropertyValueDetails toValue;
         CreatePropertyValue(property.mProperty, segment.mToKey,
                             Nothing(), segment.mToValue,
                             segment.mToComposite, toValue);
         // It doesn't really make sense to have a timing function on the
         // last property value or before a sudden jump so we just drop the
         // easing property altogether.
         toValue.mEasing.Reset();