aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/style/properties/helpers/animated_properties.mako.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs
index 1e72fb1cbc9..ee3f601cdb9 100644
--- a/components/style/properties/helpers/animated_properties.mako.rs
+++ b/components/style/properties/helpers/animated_properties.mako.rs
@@ -1453,11 +1453,10 @@ impl Animate for ComputedMatrix {
(Ok(this), Ok(other)) => {
Ok(ComputedMatrix::from(this.animate(&other, procedure)?))
},
- _ => {
- let (this_weight, other_weight) = procedure.weights();
- let result = if this_weight > other_weight { *self } else { *other };
- Ok(result)
- },
+ // Matrices can be undecomposable due to couple reasons, e.g.,
+ // non-invertible matrices. In this case, we should report Err
+ // here, and let the caller do the fallback procedure.
+ _ => Err(())
}
} else {
let this = MatrixDecomposed2D::from(*self);
@@ -1477,11 +1476,10 @@ impl Animate for ComputedMatrix {
(Ok(from), Ok(to)) => {
Ok(ComputedMatrix::from(from.animate(&to, procedure)?))
},
- _ => {
- let (this_weight, other_weight) = procedure.weights();
- let result = if this_weight > other_weight { *self } else { *other };
- Ok(result)
- },
+ // Matrices can be undecomposable due to couple reasons, e.g.,
+ // non-invertible matrices. In this case, we should report Err here,
+ // and let the caller do the fallback procedure.
+ _ => Err(())
}
}
}