mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use LonghandId::is_animatable in PropertyDeclaration::is_animatable
This commit is contained in:
parent
90b37cfa21
commit
3918c983e1
1 changed files with 3 additions and 23 deletions
|
@ -1658,29 +1658,9 @@ impl PropertyDeclaration {
|
|||
/// Returns true if this property declaration is for one of the animatable
|
||||
/// properties.
|
||||
pub fn is_animatable(&self) -> bool {
|
||||
match *self {
|
||||
% for property in data.longhands:
|
||||
PropertyDeclaration::${property.camel_case}(_) => {
|
||||
% if property.animatable:
|
||||
true
|
||||
% else:
|
||||
false
|
||||
% endif
|
||||
}
|
||||
% endfor
|
||||
PropertyDeclaration::CSSWideKeyword(id, _) |
|
||||
PropertyDeclaration::WithVariables(id, _) => match id {
|
||||
% for property in data.longhands:
|
||||
LonghandId::${property.camel_case} => {
|
||||
% if property.animatable:
|
||||
true
|
||||
% else:
|
||||
false
|
||||
% endif
|
||||
}
|
||||
% endfor
|
||||
},
|
||||
PropertyDeclaration::Custom(..) => false,
|
||||
match self.id() {
|
||||
PropertyDeclarationId::Longhand(id) => id.is_animatable(),
|
||||
PropertyDeclarationId::Custom(..) => false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue