diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/transform/partial-prerender-expansion-with-resolution-2.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/transform/partial-prerender-expansion-with-resolution-2.html')
-rw-r--r-- | layout/reftests/transform/partial-prerender-expansion-with-resolution-2.html | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/layout/reftests/transform/partial-prerender-expansion-with-resolution-2.html b/layout/reftests/transform/partial-prerender-expansion-with-resolution-2.html new file mode 100644 index 0000000000..9822296102 --- /dev/null +++ b/layout/reftests/transform/partial-prerender-expansion-with-resolution-2.html @@ -0,0 +1,74 @@ +<!DOCTYPE html> +<html class="reftest-wait reftest-no-flush" reftest-resolution="0.5"> +<meta name="viewport" content="width=device-width,minimum-scale=0.5,initial-scale=1"> +<!-- + A variant of partial-prerender-expansion-with-resolution-2.html, a partial + pre-rendered transform animation in an iframe with <1.0 resolution. + --> +<style> +html { + scrollbar-width: none; +} +body { + margin: 0px; + padding: 0px; +} +</style> +<iframe style="width:1600px; height:2000px; border: 0" + srcdoc="<!DOCTYPE HTML> + <html> + <style> + html { + scrollbar-width: none; + } + html, body { + margin: 0; + padding: 0; + } + + @keyframes anim { + /* The reftest window size is (800x1000) and it's scaled by */ + /* 0.5 (= 1600x2000), which means the partial pre-render */ + /* size is (2250x2250) so move to a position inside the */ + /* pre-render area and away from the pre-render right edge, */ + /* translateX(-650px), so that we can avoid blurry edges in */ + /* comparison with the reference. */ + to { transform: translateX(-400px); } + } + #target { + width: 4000px; + height: 4000px; + position: absolute; + transform: translateX(0px); + } + </style> + <div id='target'> + <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4000 4000'> + <rect fill='green' x='0' width='1600' height='4000'></rect> + <rect fill='blue' x='1600' width='650' height='4000'></rect> + <rect fill='red' x='2250' width='1750' height='4000'></rect> + </svg> + </div> + <script> + window.addEventListener('message', () => { + if (event.data == 'start') { + target.style.animation = 'anim 100s 1s step-start'; + target.addEventListener('animationstart', () => { + parent.postMessage('animationstart', '*'); + }); + } + }); + </script></html>"> +</iframe> +<script> +document.addEventListener("MozReftestInvalidate", () => { + document.querySelector("iframe").contentWindow.postMessage("start", "*"); +}, { once: true }); + +window.addEventListener("message", event => { + if (event.data == "animationstart") { + document.documentElement.classList.remove('reftest-wait'); + } +}); +</script> +</html> |