diff options
Diffstat (limited to 'testing/web-platform/tests/shadow-dom/shadow-style-invalidation-vw-units.html')
-rw-r--r-- | testing/web-platform/tests/shadow-dom/shadow-style-invalidation-vw-units.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/shadow-dom/shadow-style-invalidation-vw-units.html b/testing/web-platform/tests/shadow-dom/shadow-style-invalidation-vw-units.html new file mode 100644 index 0000000000..3f73f213ad --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/shadow-style-invalidation-vw-units.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<head> +<link rel=match href="shadow-style-invalidation-vw-units-ref.html"> +<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> +</head> +<body> +<script> + +const iframe = document.createElement('iframe'); +iframe.scrolling = 'no'; +iframe.style = 'border: none; width: 50px; height: 50px; overflow: hidden'; +iframe.src = `data:text/html,<!DOCTYPE html><style>head,html,body { padding: 0; margin: 0; }</style> +<div style="width: 100vw; height: 50vw; background: green"></div> +<div style="width: 100px; height: 100px; background: red;"><div id="host"></div></div> +<script>host.attachShadow({mode: 'closed'}).innerHTML = + '<style> div { width: 100vw; height: 50vw; background: green; }</style><div></div>'; +host.getBoundingClientRect(); +</sc` + `ript>`; +iframe.onload = () => { + iframe.style.width = '100px'; + iframe.style.height = '100px'; +} +document.body.appendChild(iframe); + +</script> +</body> +</html> |