diff options
Diffstat (limited to 'layout/reftests/w3c-css/received/css-values-3/vh_not_refreshing_on_chrome.html')
-rw-r--r-- | layout/reftests/w3c-css/received/css-values-3/vh_not_refreshing_on_chrome.html | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/layout/reftests/w3c-css/received/css-values-3/vh_not_refreshing_on_chrome.html b/layout/reftests/w3c-css/received/css-values-3/vh_not_refreshing_on_chrome.html new file mode 100644 index 000000000..11b973a29 --- /dev/null +++ b/layout/reftests/w3c-css/received/css-values-3/vh_not_refreshing_on_chrome.html @@ -0,0 +1,53 @@ +<!-- 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> |