From c1ec6f691338f784afa70cd258f9c14c9b2af767 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Thu, 8 Jun 2017 13:18:20 +0900 Subject: [PATCH] nscsspropertyid_is_animatable handles shorthand property as well. We consider the shorthand animatable if any of sub properties are animatable. --- .../properties/helpers/animated_properties.mako.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 41501e5ddd8..eea69199f6b 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -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 } }