Bug 1384410 - Fix multiply matrix order for skew. r?canaltinova draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sat, 29 Jul 2017 06:57:58 +0900
changeset 617793 4fb39403136e39428b8ab554676e063ed1eefc4e
parent 617792 9442e63b85eb0b7568d77734bc724f755031f620
child 639888 c219d5522cf84c42785be1e3d2dfdec1a1fbb06f
push id71135
push userhikezoe@mozilla.com
push dateFri, 28 Jul 2017 21:58:34 +0000
reviewerscanaltinova
bugs1384410
milestone56.0a1
Bug 1384410 - Fix multiply matrix order for skew. r?canaltinova MozReview-Commit-ID: 6zMzbJVcTye
servo/components/style/properties/helpers/animated_properties.mako.rs
--- 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