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.
1 <!DOCTYPE HTML>
2 <meta charset=utf-8>
3 <title>Bug 520992</title>
5 <style>
6 #borderBox {
7 background:gold;
8 height:100px;
9 box-sizing:border-box;
10 }
12 #paddingBox {
13 background:gold;
14 height:100px;
15 box-sizing:padding-box;
16 }
18 </style>
20 <div id="borderBox"></div>
21 <p id="heightWidth1"></p>
23 <div id="paddingBox"></div>
24 <p id="heightWidth2"></p>
25 <script>
26 var divs = document.getElementsByTagName("div");
27 var textEle1 = document.getElementById("heightWidth1");
28 textEle1.innerHTML += "height = " + getComputedStyle(divs[0]).height;
29 textEle1.innerHTML += ", width = " + getComputedStyle(divs[0]).width;
31 var textEle2 = document.getElementById("heightWidth2");
32 textEle2.innerHTML += "height = " + getComputedStyle(divs[1]).height;
33 textEle2.innerHTML += ", width = " + getComputedStyle(divs[1]).width;
34 </script>