tor-browser

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

clip-path-animation-cancel.html (1043B)


      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="clip-path-animation-cancel-ref.html">
      5 <style>
      6  /* This test ensures that canceling an animation properly results in a
      7     repaint. If this does not happen, the animation will remain stuck until
      8     invalidated for another reason. */
      9  .container {
     10    width: 100px;
     11    height: 100px;
     12    background-color: green;
     13    animation: clippath 10s;
     14    clip-path: circle(20% at 20% 20%);
     15  }
     16 
     17  @keyframes clippath {
     18    0% {
     19      clip-path: circle(35% at 35% 35%);
     20    }
     21 
     22    100% {
     23      clip-path: circle(50% at 50% 50%);
     24    }
     25  }
     26 </style>
     27 <script src="/common/reftest-wait.js"></script>
     28 <script src="/web-animations/resources/timing-utils.js"></script>
     29 
     30 <body>
     31  <div class="container"></div>
     32 
     33  <script>
     34    document.getAnimations()[0].ready.then(() => {
     35      document.getAnimations()[0].cancel();
     36      requestAnimationFrame(takeScreenshot);
     37    });
     38  </script>
     39 </body>
     40 
     41 </html>