mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-11 22:41:02 +00:00
c2e4c54592
Since getFrames() must gather all properties set at a given keyframe offset time for a given easing function, we need to provide a total ordering for ComputedTimingFunction objects. Until the spec defines how to do this, we sort first by NS_STYLE_TRANSITION_TIMING_FUNCTION_* value, then second by the four values in a cubic-bezier() function (in order) or the integer and optional keyword in a steps() function. Because we don't support automatic spacing of keyframes yet, ComputedKeyFrame.computedOffset is always the same as Keyframe.offset. Another assumption made is that the value of easing for a Keyframe object at 100% should be the same as the value from the previous Keyframe for the same property. An alternative would be to leave off easing from that Keyframe, which would need the default value for that IDL dictionary member removed (otherwise it would always be set to "linear").