Bug 1371493 - Compare AnimationValues when producing property-based keyframes; r?hiro draft
authorBrian Birtles <birtles@gmail.com>
Mon, 24 Jul 2017 10:25:13 +0900
changeset 614101 990b175f835e77336acea0755839f25e98851df3
parent 614015 5928d905c0bc0b28f5488b236444c7d7991cf8d4
child 638778 f95dd9ded3df1bd491d4d1e4ecab87752880c72d
push id69916
push userbbirtles@mozilla.com
push dateMon, 24 Jul 2017 04:56:22 +0000
reviewershiro
bugs1371493
milestone56.0a1
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();