blob: 11b973a2916e2cac8f1e1ffe3d5d50cb520f63d6 [file] [log] [blame]
<!-- Submitted from TestTWF Paris -->
<!DOCTYPE html>
<html>
<head>
<title>CSS Values and Units Test: vh-based dimension doesn't change when the element's other dimension doesn't change.</title>
<link rel="author" title="Marc Bourlon" href="mailto:marc@bourlon.com">
<link rel="help" href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths">
<link rel="match" href="reference/vh_not_refreshing_on_chrome-ref.html">
<meta name="assert" content="vh-based dimension doesn't change when the element's other dimension doesn't change.">
<!-- This test exhibits a bug for Chrome 19.0.1084.56 / Mac OS X 10.6.8 -->
<style type="text/css">
* { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
#frameTest { width: 600px; height: 200px; border: 1px solid #000; }
</style>
<script type="text/javascript">
var height = 200;
function resizeReference() {
var frameTest = document.getElementById('frameTest');
// let's resize the iframe vertically only, showing that the vh sizes is not updated.
if (height <= 300) {
//frameTest.style.width = height++ + "px";
frameTest.style.height = height++ + "px";
setTimeout(resizeReference, 10);
} else {
// uncomment the next line to see how a width resize triggers a layout recalculation
//frameTest.style.width = (parseInt(window.getComputedStyle(document.getElementById('frameTest'))['width'], 10) + 1) + "px";
}
}
setTimeout(resizeReference, 10);
</script>
</head>
<body>
<iframe id="frameTest" src="vh_not_refreshing_on_chrome_iframe.html" frameborder="0"></iframe>
</body>
</html>