SVG should support transform-origin and relative values
[WebKit-https.git] / LayoutTests / svg / transforms / transform-origin-css-property-expected.xhtml
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <style>
3 #transformOriginDiv {
4    position: absolute;
5    width: 30px;
6    height: 30px;
7    background: green;
8    -webkit-transform: rotate(90deg);
9 }
10 </style>
11
12 <body>
13   <div id="divRoot"></div>
14
15   <script><![CDATA[
16
17     function addTransformOriginDiv(x, y, transformOrigin)
18     {
19        var div = document.createElement("div");
20        div.setAttribute("id", "transformOriginDiv");
21        div.setAttribute("style", "top: " + y + "px; left: "+ x + "px; -webkit-transform-origin: " + transformOrigin + ";");
22        document.getElementById("divRoot").appendChild(div);
23     }
24
25     var transformOrigins = [
26          "50% 50%",
27          "0% 0%",
28          "0% 50%",
29          "100% 0%",
30          "0% 50%",
31          "100% 50%",
32          "0% 100%",
33          "50% 100%",
34          "100% 100%",
35      ];
36
37      for (var i = 0; i < transformOrigins.length; i++)  {
38          var x = 60 + (i %  4) * 60;
39          var y = 60 + Math.floor(i / 4) * 60;
40          addTransformOriginDiv(x, y, transformOrigins[i]);
41      }
42
43   ]]></script>
44 </body>
45 </html>