layout/reftests/box-sizing/computed-size-reporting.html

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

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.

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

mercurial