Convert AnimationValue::from_computed_values to take an AnimatableLonghand

This commit is contained in:
Brian Birtles 2017-06-15 10:18:55 +09:00
parent 8f3dad598f
commit a2307adf46
3 changed files with 15 additions and 11 deletions

View file

@ -688,8 +688,13 @@ pub extern "C" fn Servo_ComputedValues_ExtractAnimationValue(computed_values: Se
property_id: nsCSSPropertyID)
-> RawServoAnimationValueStrong
{
let property = match AnimatableLonghand::from_nscsspropertyid(property_id) {
Some(longhand) => longhand,
None => { return Strong::null(); }
};
let computed_values = ComputedValues::as_arc(&computed_values);
Arc::new(AnimationValue::from_computed_values(&property_id.into(), computed_values)).into_strong()
Arc::new(AnimationValue::from_computed_values(&property, computed_values)).into_strong()
}
#[no_mangle]