Bug 1358966 - nscsspropertyid_is_animatable handles shorthand property as well. r?birtles
We consider the shorthand animatable if any of sub properties are animatable.
MozReview-Commit-ID: HdVzr6u1p9Z
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -191,16 +191,26 @@ impl TransitionProperty {
#[cfg(feature = "gecko")]
pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool {
match property {
% for prop in data.longhands:
% 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
}
}
impl ToCss for TransitionProperty {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result
where W: fmt::Write,
{