2 <html class=
"reftest-wait">
7 <iframe id='if'
src=
"1634839-2-iframe.html"></iframe>
11 let iterationsLeft
= 1;
16 // Make sure the image is decoded and advanced to it's final frame.
17 img
= document
.getElementById("if").contentWindow
.document
.getElementById("image1");
18 img
.decode().then(function() {
19 setTimeout(forceDiscard
, 1000);
23 function showIframe() {
24 document
.getElementById("container").style
.display
= "";
25 document
.documentElement
.getBoundingClientRect();
26 requestAnimationFrame(forceDecode
);
29 function forceDecode() {
30 img
.decode().then(function() {
31 setTimeout(forceDiscard
, 0);
35 function forceDiscard() {
37 if (iterationsLeft
< 0) {
38 document
.documentElement
.className
= "";
41 document
.getElementById("container").style
.display
= "none";
42 document
.documentElement
.getBoundingClientRect();
44 requestAnimationFrame(() => { requestAnimationFrame( () => { setTimeout(showIframe
, 0); } ) });
47 //window.addEventListener("load", runTest);
48 window
.addEventListener("MozReftestInvalidate", runTest
);