Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <html class="reftest-wait"> |
michael@0 | 2 | <head> |
michael@0 | 3 | <script type="application/javascript"> |
michael@0 | 4 | function runtest() { |
michael@0 | 5 | var iframe = document.getElementById("test"); |
michael@0 | 6 | var style = iframe.getAttribute("style"); |
michael@0 | 7 | // We depend on the transform being the last rule so clip the ending ';' |
michael@0 | 8 | style = style.substring(0, style.length-1); |
michael@0 | 9 | |
michael@0 | 10 | // Here, we add transform functions to explicitly undo the effects of |
michael@0 | 11 | // each already-applied transform. This should leave us with an |
michael@0 | 12 | // effectively-untransformed iframe. |
michael@0 | 13 | style = style + " scale(0.5, 0.25) translatex(-50px) rotate(-45deg) translate(-50px, -50px) skewx(135deg);" |
michael@0 | 14 | iframe.setAttribute("style", style); |
michael@0 | 15 | document.documentElement.className = ""; |
michael@0 | 16 | } |
michael@0 | 17 | </script> |
michael@0 | 18 | </head> |
michael@0 | 19 | <body> |
michael@0 | 20 | <iframe |
michael@0 | 21 | src="square.html" |
michael@0 | 22 | style="height: 200px; width: 300px; -moz-transform: skewx(45deg) translate(50px, 50px) rotate(45deg) translatex(50px) scale(2.0, 4.0);" |
michael@0 | 23 | id="test" |
michael@0 | 24 | onload="runtest();"> |
michael@0 | 25 | </iframe> |
michael@0 | 26 | </body> |
michael@0 | 27 | </html> |