tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

two-clip-path-animation-diff-length4.html (1253B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#basic-shape-interpolation">
      4 <link rel="match" href="two-clip-path-animation-diff-length1-ref.html">
      5 <style>
      6  #container {
      7    width: 100px;
      8    height: 100px;
      9    background-color: green;
     10    animation: clippath2 0.5s;
     11  }
     12 
     13  @keyframes clippath2 {
     14    0% {
     15      clip-path: inset(10px 10px);
     16    }
     17 
     18    1% {
     19      clip-path: inset(10px 10px);
     20    }
     21 
     22    100% {
     23      clip-path: inset(40px 40px);
     24    }
     25  }
     26 </style>
     27 <script src="/common/reftest-wait.js"></script>
     28 <script src="../../../../web-animations/testcommon.js"></script>
     29 <script src="../../../../web-animations/resources/timing-utils.js"></script>
     30 
     31 <body>
     32  <div id="container"></div>
     33 
     34  <script>
     35    // This test ensures that a new no-op animation still invalidates paint
     36    // and the animation running on the compositor.
     37    document.getAnimations()[0].ready.then(() => {
     38      let anim = document.getElementById("container").animate(
     39        [
     40          { clipPath: "inset(10px 10px)" },
     41          { clipPath: "inset(10px 10px)" },
     42        ],
     43        2000,
     44      );
     45      anim.ready.then(() => { return requestAnimationFrame(takeScreenshot); });
     46    });
     47  </script>
     48 </body>
     49 
     50 </html>