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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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 }
michael@0 11
michael@0 12 #paddingBox {
michael@0 13 background:gold;
michael@0 14 height:100px;
michael@0 15 box-sizing:padding-box;
michael@0 16 }
michael@0 17
michael@0 18 </style>
michael@0 19
michael@0 20 <div id="borderBox"></div>
michael@0 21 <p id="heightWidth1"></p>
michael@0 22
michael@0 23 <div id="paddingBox"></div>
michael@0 24 <p id="heightWidth2"></p>
michael@0 25 <script>
michael@0 26 var divs = document.getElementsByTagName("div");
michael@0 27 var textEle1 = document.getElementById("heightWidth1");
michael@0 28 textEle1.innerHTML += "height = " + getComputedStyle(divs[0]).height;
michael@0 29 textEle1.innerHTML += ", width = " + getComputedStyle(divs[0]).width;
michael@0 30
michael@0 31 var textEle2 = document.getElementById("heightWidth2");
michael@0 32 textEle2.innerHTML += "height = " + getComputedStyle(divs[1]).height;
michael@0 33 textEle2.innerHTML += ", width = " + getComputedStyle(divs[1]).width;
michael@0 34 </script>

mercurial