Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" onload="setTimeout(boom, 30)" class="reftest-wait"> |
michael@0 | 2 | |
michael@0 | 3 | <script> |
michael@0 | 4 | |
michael@0 | 5 | var originalRoot = document.documentElement; |
michael@0 | 6 | var svgCircle; |
michael@0 | 7 | |
michael@0 | 8 | function boom() |
michael@0 | 9 | { |
michael@0 | 10 | var SVG_NS = "http://www.w3.org/2000/svg"; |
michael@0 | 11 | |
michael@0 | 12 | var svgPolyline = document.createElementNS(SVG_NS, 'polyline'); |
michael@0 | 13 | svgCircle = document.createElementNS(SVG_NS, 'circle'); |
michael@0 | 14 | |
michael@0 | 15 | svgCircle.appendChild(svgPolyline); |
michael@0 | 16 | |
michael@0 | 17 | document.removeChild(originalRoot); |
michael@0 | 18 | document.appendChild(svgCircle); |
michael@0 | 19 | |
michael@0 | 20 | setTimeout(restore, 30); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | function restore() |
michael@0 | 24 | { |
michael@0 | 25 | // We have to put it the root element back in the document so that reftest.js |
michael@0 | 26 | // sees the event for the removal of class="reftest-wait"! |
michael@0 | 27 | document.removeChild(svgCircle); |
michael@0 | 28 | document.appendChild(originalRoot); |
michael@0 | 29 | document.documentElement.removeAttribute("class"); |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | </script> |
michael@0 | 33 | |
michael@0 | 34 | </svg> |