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

branch
TOR_BUG_9701
changeset 11
deefc01c0e14
equal deleted inserted replaced
-1:000000000000 0:64d6a7e9914a
1 <!DOCTYPE HTML>
2 <meta charset=utf-8>
3 <title>Bug 520992</title>
4
5 <style>
6 #borderBox {
7 background:gold;
8 height:100px;
9 box-sizing:border-box;
10 }
11
12 #paddingBox {
13 background:gold;
14 height:100px;
15 box-sizing:padding-box;
16 }
17
18 </style>
19
20 <div id="borderBox"></div>
21 <p id="heightWidth1"></p>
22
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;
30
31 var textEle2 = document.getElementById("heightWidth2");
32 textEle2.innerHTML += "height = " + getComputedStyle(divs[1]).height;
33 textEle2.innerHTML += ", width = " + getComputedStyle(divs[1]).width;
34 </script>

mercurial