5 This test performs an animation of the matrix operator. The matrix is defined so that the
6 decomposition (unmatrix) algorithm is tested on the path where the matrix is negated and the
7 the scaling factors are also negated.
8 The animation is started and a snapshot is taken after start. The "d" component of matrix
11 <style type="text/css" media="screen">
15 background-color: blue;
16 -webkit-animation-duration: 1s;
19 @-webkit-keyframes anim {
20 from { -webkit-transform: matrix(1, 0, 0, -1, 0, 0); }
21 to { -webkit-transform: matrix(1, 0, 0, 1, 0, 0); }
24 <script type="text/javascript" charset="utf-8">
25 if (window.layoutTestController) {
26 layoutTestController.dumpAsText();
27 layoutTestController.waitUntilDone();
34 var boxComputedStyle = window.getComputedStyle(document.getElementById('box'));
35 var matrix = new WebKitCSSMatrix(boxComputedStyle.webkitTransform);
37 // "d" component (scaleY) should be negative.
39 result = "FAIL(scaleY was positive, expected to be negative)";
41 document.getElementById('result').innerHTML = result;
42 if (window.layoutTestController)
43 layoutTestController.notifyDone();
46 function startAnimation()
48 document.getElementById("box").style.webkitAnimationName = "anim";
51 document.addEventListener('webkitAnimationStart', snapshot, false);
56 <div id="result"></div>