summaryrefslogtreecommitdiffstats
path: root/layout/reftests/transform/partial-prerender-expansion-with-resolution-1.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /layout/reftests/transform/partial-prerender-expansion-with-resolution-1.html
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/transform/partial-prerender-expansion-with-resolution-1.html')
-rw-r--r--layout/reftests/transform/partial-prerender-expansion-with-resolution-1.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/layout/reftests/transform/partial-prerender-expansion-with-resolution-1.html b/layout/reftests/transform/partial-prerender-expansion-with-resolution-1.html
new file mode 100644
index 0000000000..2421735b2e
--- /dev/null
+++ b/layout/reftests/transform/partial-prerender-expansion-with-resolution-1.html
@@ -0,0 +1,52 @@
+<!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 test for a partial pre-rendered transform animation with <1.0 resolution.
+ -->
+<style>
+html {
+ scrollbar-width: none;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+@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>
+document.addEventListener("MozReftestInvalidate", () => {
+ target.style.animation = "anim 100s 1s step-start";
+ target.addEventListener("animationstart", () => {
+ // animtionstart event is fired just before requestAnimationFrame callbacks,
+ // so we need to wait two rAF to make sure the initial animation value is
+ // composited on the compositor.
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ });
+}, { once: true });
+</script>
+</html>