Use the value of the progress through the keyframe interval when falling back to 50% flip behavior

This commit is contained in:
Brian Birtles 2017-07-06 06:38:57 +09:00
parent 59a3142200
commit 4b36f1e9c4

View file

@ -545,7 +545,7 @@ pub extern "C" fn Servo_AnimationCompose(raw_value_map: RawServoAnimationValueMa
}; };
if let Ok(value) = from_value.interpolate(to_value, position) { if let Ok(value) = from_value.interpolate(to_value, position) {
value_map.insert(property, value); value_map.insert(property, value);
} else if progress < 0.5 { } else if position < 0.5 {
value_map.insert(property, from_value.clone()); value_map.insert(property, from_value.clone());
} else { } else {
value_map.insert(property, to_value.clone()); value_map.insert(property, to_value.clone());