mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Bug 1343753 - Add Servo_Animationvalues_IsInterpolable.
MozReview-Commit-ID: gaj9lJ7NYV
This commit is contained in:
parent
4a1b812ee4
commit
2867bbcacc
2 changed files with 16 additions and 0 deletions
|
@ -1692,6 +1692,13 @@ extern "C" {
|
|||
progress: f64)
|
||||
-> RawServoAnimationValueStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_AnimationValues_IsInterpolable(from:
|
||||
RawServoAnimationValueBorrowed,
|
||||
to:
|
||||
RawServoAnimationValueBorrowed)
|
||||
-> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_AnimationValue_Serialize(value:
|
||||
RawServoAnimationValueBorrowed,
|
||||
|
|
|
@ -256,6 +256,15 @@ pub extern "C" fn Servo_AnimationValues_Interpolate(from: RawServoAnimationValue
|
|||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_AnimationValues_IsInterpolable(from: RawServoAnimationValueBorrowed,
|
||||
to: RawServoAnimationValueBorrowed)
|
||||
-> bool {
|
||||
let from_value = AnimationValue::as_arc(&from);
|
||||
let to_value = AnimationValue::as_arc(&to);
|
||||
from_value.interpolate(to_value, 0.5).is_ok()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_AnimationValueMap_Push(value_map: RawServoAnimationValueMapBorrowed,
|
||||
property: nsCSSPropertyID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue