2 <html class=
"reftest-wait reftest-no-flush" reftest-resolution=
"0.5">
3 <meta name=
"viewport" content=
"width=device-width,minimum-scale=0.5,initial-scale=1">
5 A test for a partial pre-rendered transform animation with <1.0 resolution.
16 /* The reftest window size is (
800x1000) and it's scaled by
0.5 */
17 /* (=
1600x2000), which means the partial pre-render size is (
2250x2250) so */
18 /* move to a position inside the pre-render area and away from the */
19 /* pre-render right edge, translateX(-
650px), so that we can avoid blurry */
20 /* edges in comparison with the reference. */
21 to { transform: translateX(-
400px); }
27 transform: translateX(
0px);
31 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 4000 4000">
32 <rect fill=
"green" x=
"0" width=
"1600" height=
"4000"></rect>
33 <rect fill=
"blue" x=
"1600" width=
"650" height=
"4000"></rect>
34 <rect fill=
"red" x=
"2250" width=
"1750" height=
"4000"></rect>
38 document
.addEventListener("MozReftestInvalidate", () => {
39 target
.style
.animation
= "anim 100s 1s step-start";
40 target
.addEventListener("animationstart", () => {
41 // animationstart event is fired just before requestAnimationFrame callbacks,
42 // so we need to wait two rAF to make sure the initial animation value is
43 // composited on the compositor.
44 requestAnimationFrame(() => {
45 requestAnimationFrame(() => {
46 document
.documentElement
.classList
.remove("reftest-wait");