mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Bug 1343753 - Add Servo_Property_IsDiscreteAnimatable.
MozReview-Commit-ID: 5pMw7Wynv2q
This commit is contained in:
parent
2867bbcacc
commit
28db6788b1
3 changed files with 22 additions and 0 deletions
|
@ -1684,6 +1684,10 @@ extern "C" {
|
|||
nsCSSPropertyID)
|
||||
-> RawServoAnimationValueStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_Property_IsDiscreteAnimatable(property: nsCSSPropertyID)
|
||||
-> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_AnimationValues_Interpolate(from:
|
||||
RawServoAnimationValueBorrowed,
|
||||
|
|
|
@ -104,6 +104,18 @@ impl TransitionProperty {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns true if this TransitionProperty is one of the discrete animatable properties.
|
||||
pub fn is_discrete(&self) -> bool {
|
||||
match *self {
|
||||
% for prop in data.longhands:
|
||||
% if prop.animation_type == "discrete":
|
||||
TransitionProperty::${prop.camel_case} => true,
|
||||
% endif
|
||||
% endfor
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for TransitionProperty {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue