1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 <p>Test for bug
79678 - SVG transform-origin presentation attribute. Verify that getComputedStyle() reflects an SVG element's transform-origin.
</p>
4 <p>On success, you will see a series of
"PASS" messages
</p>
5 <pre id=
"console"></pre>
6 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink">
7 <rect id=
"rect1" transform-origin=
"50 100" width=
"100" height=
"100" />
8 <rect id=
"rect2" width=
"100" height=
"100" fill=
"red" />
11 if (window
.testRunner
)
12 testRunner
.dumpAsText();
14 var resultString
= "";
16 function checkTransformOrigin(eltID
, expectedValue
) {
17 var rect
= document
.getElementById(eltID
);
18 var actualValue
= getComputedStyle(rect
).webkitTransformOrigin
;
19 resultString
+= (actualValue
== expectedValue
) ? "PASS " : "FAIL ";
20 resultString
+= eltID
+ " transformOrigin, expected \"" + expectedValue
+ "\" actual \"" + actualValue
+ "\"\n";
23 checkTransformOrigin("rect1", "50px 100px");
24 checkTransformOrigin("rect2", "0px 0px");
26 document
.getElementById("console").innerHTML
= resultString
;