Correctly specify CSS Transition timing functions on the effect

Previously they were specified on the start_keyframe because we didn't
want the delay keyframe to be affected by the timing function. Now that
the delay keyframe has been removed (https://crrev.com/fde1ecb), the
timing function can be left on the effect.

Fixing this also requires changing the time calculation in the
'transitioncancel' event firer code. Previously this was calculated from
the transformed-progress[0] multiplied by the iteration duration[1]. However
the transformed-progress includes the timing function, and the spec actually
says to use[2]:

"The active time of the animation at the moment it was cancelled calculated
using a fill mode of both."

Finally, this change fixes re-targeting of in-flight transitions, which
previously only worked properly for linear transitions.

[0]: https://drafts.csswg.org/web-animations-1/#calculating-the-transformed-progress
[1]: https://drafts.csswg.org/web-animations-1/#iteration-duration
[2]: https://drafts.csswg.org/css-transitions-2/#event-dispatch

Bug: 934709
Change-Id: I73545795e1aa5b009461fea6f610c145262058c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526481
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641917}
4 files changed