File: partial-prerender-expansion-with-resolution-1.html

package info (click to toggle)
firefox 147.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,683,532 kB
  • sloc: cpp: 7,607,356; javascript: 6,533,348; ansic: 3,775,236; python: 1,415,508; xml: 634,561; asm: 438,949; java: 186,241; sh: 62,760; makefile: 18,079; objc: 13,092; perl: 12,808; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10; exp: 6
file content (52 lines) | stat: -rw-r--r-- 1,787 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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", () => {
    // animationstart 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>