| This test performs an animation of the matrix operator. The matrix is defined so that the |
| decomposition (unmatrix) algorithm is tested on the path where the matrix is negated and the |
| the scaling factors are also negated. |
| The animation is started and a snapshot is taken after start. The "d" component of matrix |
| <style type="text/css" media="screen"> |
| -webkit-animation-duration: 1s; |
| @-webkit-keyframes anim { |
| from { -webkit-transform: matrix(1, 0, 0, -1, 0, 0); } |
| to { -webkit-transform: matrix(1, 0, 0, 1, 0, 0); } |
| <script type="text/javascript" charset="utf-8"> |
| testRunner.waitUntilDone(); |
| var boxComputedStyle = window.getComputedStyle(document.getElementById('box')); |
| var matrix = new WebKitCSSMatrix(boxComputedStyle.webkitTransform); |
| // "d" component (scaleY) should be negative. |
| result = "FAIL(scaleY was positive, expected to be negative)"; |
| document.getElementById('result').innerHTML = result; |
| function startAnimation() |
| document.getElementById("box").style.webkitAnimationName = "anim"; |
| document.addEventListener('webkitAnimationStart', snapshot, false); |