1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/css-valuesandunits/unit-vh-vw-overflow-scroll-x-ref-iframe.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 +<style> 1.5 + body { overflow-x: scroll } 1.6 + div { 1.7 + width: 10px; 1.8 + height: 10px; 1.9 + background-color: #d64203; 1.10 + } 1.11 +</style> 1.12 + 1.13 +<body> 1.14 + <div style="width: 50px"></div> <!-- Unaffected by scrollbars. --> 1.15 + <div id="b"></div> 1.16 + <div style="width: 35px"></div> <!-- Unaffected by scrollbars. --> 1.17 + <div id="d"></div> 1.18 + 1.19 + <!-- Deliberately make scrollbars appear. --> 1.20 + <div style="width: 500px; height: 500px; background-color: black"> 1.21 +</body> 1.22 + 1.23 +<script> 1.24 + // client{Width, Height} consist of the area _inside_ the scrollbars, so these 1.25 + // manually calculated units reflect the fact that with 'overflow: scroll' set, 1.26 + // viewport units are sized taking the scrollbars into account. Since we're 1.27 + // only dealing with 'overflow-x' here, only the height units are affected. 1.28 + var vh = 0.01 * document.body.clientHeight; 1.29 + document.getElementById('b').style.height = (25 * vh) + "px"; 1.30 + document.getElementById('d').style.height = (25 * vh) + "px"; 1.31 +</script>