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

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     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>

mercurial