diff options
Diffstat (limited to 'components/style/properties/data.py')
-rw-r--r-- | components/style/properties/data.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/components/style/properties/data.py b/components/style/properties/data.py index 15d9f2fc89a..c0510d0c13f 100644 --- a/components/style/properties/data.py +++ b/components/style/properties/data.py @@ -194,12 +194,15 @@ class Longhand(object): self.animation_value_type = animation_value_type self.animatable = animation_value_type != "none" + self.transitionable = animation_value_type != "none" \ + and animation_value_type != "discrete" self.is_animatable_with_computed_value = animation_value_type == "ComputedValue" \ or animation_value_type == "discrete" if self.logical: # Logical properties will be animatable (i.e. the animation type is # discrete). For now, it is still non-animatable. self.animatable = False + self.transitionable = False self.animation_type = None # NB: Animatable implies clone because a property animation requires a # copy of the computed value. @@ -234,6 +237,25 @@ class Shorthand(object): self.allowed_in_keyframe_block = allowed_in_keyframe_block \ and allowed_in_keyframe_block != "False" + def get_animatable(self): + animatable = False + for sub in self.sub_properties: + if sub.animatable: + animatable = True + break + return animatable + + def get_transitionable(self): + transitionable = False + for sub in self.sub_properties: + if sub.transitionable: + transitionable = True + break + return transitionable + + animatable = property(get_animatable) + transitionable = property(get_transitionable) + class Method(object): def __init__(self, name, return_type=None, arg_types=None, is_mut=False): |