style: Fix timing-function overriding from the keyframe declaration list.

The previous behavior is plain wrong, since that array has always at least one
element, so we effectively couldn't specify anything else than "ease" in our
animations.
This commit is contained in:
Emilio Cobos Álvarez 2016-07-01 15:52:04 -07:00 committed by Emilio Cobos Álvarez
parent 8bbebd0514
commit 8ba676533b
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 44 additions and 1 deletions

View file

@ -626,7 +626,9 @@ where Impl: SelectorImplExt,
// NB: The spec says that the timing function can be overwritten
// from the keyframe style.
let mut timing_function = style.get_box().animation_timing_function_mod(index);
if from_style.get_box().animation_timing_function_count() != 0 {
if last_keyframe.declared_timing_function {
// NB: animation_timing_function can never be empty, always has
// at least the default value (`ease`).
timing_function = from_style.get_box().animation_timing_function_at(0);
}