Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>A fixed root background in a zoomed iframe covers the whole iframe</title>
<link rel="match" href="reference/iframe-zoom-fixed-root-background-ref.html">
<meta name="fuzzy" content="maxDifference=0-45;totalPixels=0-38">
<script src="/common/reftest-wait.js"></script>
<script src="resources/iframe-zoom.js"></script>
<style>
body { margin: 0; }
iframe { display: block; width: 256px; height: 128px; zoom: 0.5; border: 0; background: red; }
</style>
<body>
<script type="module">
const fixedBackgroundHtml = `<!doctype html>
<style>
html { background: red url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' fill='green'/></svg>") 0 0 / 100% 100% no-repeat fixed; }
body { margin: 0; }
</style>`;
await loadIframe({ srcdoc: fixedBackgroundHtml });
await nextFrame();
takeScreenshot();
</script>