13 background-color: blue;
20 -webkit-transform: translate(100px, 50px);
21 background-color: red;
25 -webkit-transform: matrix(1, 0, 0, 1, 100, 50);
26 background-color: green;
29 <script type="text/javascript">
33 if (!window.testRunner) {
37 var element1 = document.getElementById(id1);
38 var element2 = document.getElementById(id2);
39 var x1 = webkitConvertPointFromNodeToPage(element1, new WebKitPoint(0,0)).x;
40 var y1 = webkitConvertPointFromNodeToPage(element1, new WebKitPoint(0,0)).y;
41 var x2 = webkitConvertPointFromNodeToPage(element2, new WebKitPoint(0,0)).x;
42 var y2 = webkitConvertPointFromNodeToPage(element2, new WebKitPoint(0,0)).y;
44 var resultString = '';
45 if (x1 == x2 && y1 == y2) {
46 resultString += "PASS - Element " + id1 + " and Element " + id2 + " had identical positions";
48 resultString += "FAIL - Element " + id1 + " and Element " + id2 + " had different positions";
51 document.body.appendChild(document.createTextNode(resultString));
56 <body onload="runTest();">
58 <!-- You should see green box only. If you see red, the test has failed -->
60 <div id='a' class="box translate"></div>
61 <div id='b' class="box matrix"></div>