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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/box-sizing/computed-size-reporting.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<meta charset=utf-8>
     1.6 +<title>Bug 520992</title>
     1.7 +
     1.8 +<style>
     1.9 +  #borderBox {
    1.10 +    background:gold;
    1.11 +    height:100px;
    1.12 +    box-sizing:border-box;
    1.13 +    border: 20px solid gold;
    1.14 +  }
    1.15 +
    1.16 +  #paddingBox {
    1.17 +    background:gold;
    1.18 +    height:100px;
    1.19 +    box-sizing:padding-box;
    1.20 +    padding: 20px;
    1.21 +  }
    1.22 +
    1.23 +</style>
    1.24 +
    1.25 +<div id="borderBox"></div>
    1.26 +<p id="heightWidth1"></p>
    1.27 +
    1.28 +<div id="paddingBox"></div>
    1.29 +<p id="heightWidth2"></p>
    1.30 +<script>
    1.31 +  var divs = document.getElementsByTagName("div");
    1.32 +  var textEle1 = document.getElementById("heightWidth1");
    1.33 +  textEle1.innerHTML += "height = " + getComputedStyle(divs[0]).height;
    1.34 +  textEle1.innerHTML += ", width = " + getComputedStyle(divs[0]).width;
    1.35 +
    1.36 +  var textEle2 = document.getElementById("heightWidth2");
    1.37 +  textEle2.innerHTML += "height = " + getComputedStyle(divs[1]).height;
    1.38 +  textEle2.innerHTML += ", width = " + getComputedStyle(divs[1]).width;
    1.39 +</script>

mercurial