Skip to content

Commit

Permalink
nscsspropertyid_is_animatable handles shorthand property as well.
Browse files Browse the repository at this point in the history
We consider the shorthand animatable if any of sub properties are animatable.
  • Loading branch information
Hiroyuki Ikezoe committed Jun 8, 2017
1 parent b587bf9 commit c1ec6f6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions components/style/properties/helpers/animated_properties.mako.rs
Expand Up @@ -199,6 +199,16 @@ pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool {
${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
}
}
Expand Down

0 comments on commit c1ec6f6

Please sign in to comment.