Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 <html class="reftest-wait">
2 <head>
3 <script type="application/javascript">
4 function runtest() {
5 var iframe = document.getElementById("test");
6 var style = iframe.getAttribute("style");
7 // We depend on the transform being the last rule so clip the ending ';'
8 style = style.substring(0, style.length-1);
10 // Here, we add transform functions to explicitly undo the effects of
11 // each already-applied transform. This should leave us with an
12 // effectively-untransformed iframe.
13 style = style + " scale(0.5, 0.25) translatex(-50px) rotate(-45deg) translate(-50px, -50px) skewx(135deg);"
14 iframe.setAttribute("style", style);
15 document.documentElement.className = "";
16 }
17 </script>
18 </head>
19 <body>
20 <iframe
21 src="square.html"
22 style="height: 200px; width: 300px; -moz-transform: skewx(45deg) translate(50px, 50px) rotate(45deg) translatex(50px) scale(2.0, 4.0);"
23 id="test"
24 onload="runtest();">
25 </iframe>
26 </body>
27 </html>