mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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)
|
progress: f64)
|
||||||
-> RawServoAnimationValueStrong;
|
-> RawServoAnimationValueStrong;
|
||||||
}
|
}
|
||||||
|
extern "C" {
|
||||||
|
pub fn Servo_AnimationValues_IsInterpolable(from:
|
||||||
|
RawServoAnimationValueBorrowed,
|
||||||
|
to:
|
||||||
|
RawServoAnimationValueBorrowed)
|
||||||
|
-> bool;
|
||||||
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_AnimationValue_Serialize(value:
|
pub fn Servo_AnimationValue_Serialize(value:
|
||||||
RawServoAnimationValueBorrowed,
|
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]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_AnimationValueMap_Push(value_map: RawServoAnimationValueMapBorrowed,
|
pub extern "C" fn Servo_AnimationValueMap_Push(value_map: RawServoAnimationValueMapBorrowed,
|
||||||
property: nsCSSPropertyID,
|
property: nsCSSPropertyID,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue