From 479c3e452848c34a11a8a7918f71d54e487609f5 Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Thu, 15 Jun 2017 10:20:16 +0900 Subject: [PATCH] Move nscssproperty_id_is_animatable together with the other animatable-related code Now we have AnimatableLonghand (to do with animatability) and TransitionProperty (to do with transitionability), we should move nscssproperty_id_is_animatable to be part of the former group. --- .../helpers/animated_properties.mako.rs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index e6a1b8985ba..f8695e000fc 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -163,6 +163,19 @@ impl<'a> From for PropertyDeclarationId<'a> { } } +/// Returns true if this nsCSSPropertyID is one of the animatable properties. +#[cfg(feature = "gecko")] +pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool { + match property { + % for prop in data.longhands + data.shorthands_except_all(): + % if prop.animatable: + ${helpers.to_nscsspropertyid(prop.ident)} => true, + % endif + % endfor + _ => false + } +} + /// A given transition property, that is either `All`, a transitionable longhand property, /// a shorthand with at least one transitionable longhand component, or an unsupported property. // NB: This needs to be here because it needs all the longhands generated @@ -266,19 +279,6 @@ impl TransitionProperty { } } -/// Returns true if this nsCSSPropertyID is one of the animatable properties. -#[cfg(feature = "gecko")] -pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool { - match property { - % for prop in data.longhands + data.shorthands_except_all(): - % if prop.animatable: - ${helpers.to_nscsspropertyid(prop.ident)} => true, - % endif - % endfor - _ => false - } -} - impl ToCss for TransitionProperty { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write,