tor-browser

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

clip-path-animation-reference-delay.html (1406B)


      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-non-shape-delay-ref.html">
      5 <style>
      6  .container {
      7    width: 100px;
      8    height: 100px;
      9    background-color: green;
     10    animation: clippath 1s 10s;
     11    animation-fill-mode: none;
     12    clip-path: url(#path);
     13    position: absolute;
     14    left: 10px;
     15    top: 10px;
     16  }
     17 
     18  .child {
     19    width: 10px;
     20    height: 10px;
     21    background-color: blue;
     22    left: 150px;
     23    position: absolute;
     24  }
     25 
     26  @keyframes clippath {
     27    0% {
     28      clip-path: circle(50% at 50% 50%);
     29    }
     30 
     31    100% {
     32      clip-path: circle(35% at 35% 35%);
     33    }
     34  }
     35 </style>
     36 <script src="/common/reftest-wait.js"></script>
     37 <script src="../../../../web-animations/resources/timing-utils.js"></script>
     38 
     39 <body>
     40  This test passes if the blue child is occluded by the clip-path during the animation delay.
     41  <svg style="position:absolute; left: 0">
     42    <defs>
     43      <clipPath id="path">
     44        <rect x="0" y="0" width="100" height="100"/>
     45        <!-- Adding an empty text node to force mask-based clipping. -->
     46        <text></text>
     47      </clipPath>
     48    </defs>
     49  </svg>
     50  <div class="container">
     51    <div class="child"></div>
     52  </div>
     53 
     54  <script>
     55    document.getAnimations()[0].ready.then(() => requestAnimationFrame(takeScreenshot));
     56  </script>
     57 </body>
     58 
     59 </html>