mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Move definition of animatable for shorthands to Shorthand object
By moving this definition to the Shorthand object we can more easily re-use it in subsequent patches in this series.
This commit is contained in:
parent
f8e2f85cdc
commit
09c2b1b930
2 changed files with 11 additions and 11 deletions
|
@ -195,21 +195,11 @@ impl TransitionProperty {
|
|||
#[cfg(feature = "gecko")]
|
||||
pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool {
|
||||
match property {
|
||||
% for prop in data.longhands:
|
||||
% for prop in data.longhands + data.shorthands_except_all():
|
||||
% if prop.animatable:
|
||||
${helpers.to_nscsspropertyid(prop.ident)} => true,
|
||||
% endif
|
||||
% endfor
|
||||
% for prop in data.shorthands_except_all():
|
||||
<%
|
||||
animatable = "false"
|
||||
for sub in prop.sub_properties:
|
||||
if sub.animatable:
|
||||
animatable = "true"
|
||||
break
|
||||
%>
|
||||
${helpers.to_nscsspropertyid(prop.ident)} => ${animatable},
|
||||
% endfor
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue