diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/shadow-dom/shadow-style-invalidation-vw-units.html | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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> |