DescriptionFix AnimationBase::fractionalTime() to handle a scale of infinity
When an animation is sampled at a fractionalTime of 1,
KeyframeAnimation::fetchIntervalEndpointsForProperty() selects the last
keyframe for both the 'previous' and 'next' keyframes to be used for blending.
This results in a scale of infinity and AnimationBase::fractionalTime()
resturns a value of -nan.
When -nan is passed to the default timing function, we hit the ASSERT() in
UnitBezier::solveCurveX(). If a linear timing function is used, the calculated
property value is -nan, and we hit the ASSERT() in the CSSPrimitiveValue
constructor.
This change fixes the problem by ignoring the scale in
AnimationBase::fractionalTime() in this case. This is safe because the
fractionalTime is always zero once the offset has been accounted for, so the
correct result is zero.
R=dstockwell
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157564
Patch Set 1 #Patch Set 2 : Added expected result #
Total comments: 2
Patch Set 3 : Added a comment #
Messages
Total messages: 5 (0 generated)
|