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
--- 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();