aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/animation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style/animation.rs')
-rw-r--r--components/style/animation.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/components/style/animation.rs b/components/style/animation.rs
index aeff683f407..63998083d6d 100644
--- a/components/style/animation.rs
+++ b/components/style/animation.rs
@@ -272,6 +272,15 @@ impl PropertyAnimation {
let timing_function = box_style.transition_timing_function_mod(transition_index);
let duration = box_style.transition_duration_mod(transition_index);
+ if transition_property.is_shorthand() {
+ return transition_property.longhands().iter().filter_map(|transition_property| {
+ PropertyAnimation::from_transition_property(*transition_property,
+ timing_function,
+ duration,
+ old_style,
+ new_style)
+ }).collect();
+ }
if transition_property != TransitionProperty::All {
if let Some(property_animation) =
@@ -305,6 +314,8 @@ impl PropertyAnimation {
old_style: &ComputedValues,
new_style: &ComputedValues)
-> Option<PropertyAnimation> {
+ debug_assert!(!transition_property.is_shorthand() &&
+ transition_property != TransitionProperty::All);
let animated_property = AnimatedProperty::from_transition_property(&transition_property,
old_style,
new_style);