Bug 1384410 - Fix multiply matrix order for skew. r?canaltinova
MozReview-Commit-ID: 6zMzbJVcTye
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -2385,29 +2385,29 @@ impl From<MatrixDecomposed3D> for Comput
rotation_matrix.m33 = 1.0 - 2.0 * (x * x + y * y);
matrix = multiply(rotation_matrix, matrix);
// Apply skew
let mut temp = ComputedMatrix::identity();
if decomposed.skew.2 != 0.0 {
temp.m32 = decomposed.skew.2;
- matrix = multiply(matrix, temp);
+ matrix = multiply(temp, matrix);
}
if decomposed.skew.1 != 0.0 {
temp.m32 = 0.0;
temp.m31 = decomposed.skew.1;
- matrix = multiply(matrix, temp);
+ matrix = multiply(temp, matrix);
}
if decomposed.skew.0 != 0.0 {
temp.m31 = 0.0;
temp.m21 = decomposed.skew.0;
- matrix = multiply(matrix, temp);
+ matrix = multiply(temp, matrix);
}
// Apply scale
% for i in range(1, 4):
% for j in range(1, 4):
matrix.m${i}${j} *= decomposed.scale.${i - 1};
% endfor
% endfor