Bug 1036287 part 3 - Make GetLocalTimeAt return a nullable time duration; r=dholbert

Once we support arbitrary timelines which can return null current time values,
the local time of an animation can also become null so this patch updates
ElementAnimation::GetLocalTimeAt to return a Nullable<TimeDuration>.
Doing this also allows us to pass the result of GetLocalTimeAt directly to
GetComputedTimingAt.
This commit is contained in:
Brian Birtles
2014-07-16 09:02:32 +09:00
parent dd85e19a19
commit fb03475f7c
5 changed files with 39 additions and 31 deletions

View File

@@ -448,7 +448,8 @@ SampleAnimations(Layer* aLayer, TimeStamp aPoint)
timing.mFillMode = NS_STYLE_ANIMATION_FILL_MODE_BOTH;
ComputedTiming computedTiming =
ElementAnimation::GetComputedTimingAt(elapsedDuration, timing);
ElementAnimation::GetComputedTimingAt(
Nullable<TimeDuration>(elapsedDuration), timing);
NS_ABORT_IF_FALSE(0.0 <= computedTiming.mTimeFraction &&
computedTiming.mTimeFraction <= 1.0,