Bug 1328787 - Part 8: Animation timing function can be overridden by animation-timing-function specified in keyframe. r=heycam

This commit is contained in:
Hiroyuki Ikezoe 2017-01-28 18:53:36 +09:00
parent 51faa53ee2
commit e20a3ad9b5
3 changed files with 38 additions and 2 deletions

View file

@ -1155,7 +1155,12 @@ pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSet
if let Some(ref animation) = data.stylist.animations().get(&name) {
for step in &animation.steps {
let timing_function = *style_timing_function;
// Override timing_function if the keyframe has animation-timing-function.
let timing_function = if let Some(val) = step.get_animation_timing_function() {
val.into()
} else {
*style_timing_function
};
let _keyframe = unsafe {
Gecko_AnimationAppendKeyframe(keyframes,