tor-browser

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

pseudoelement-removal-with-scroll-timeline-crash.html (750B)


      1 <!DOCTYPE html>
      2 <html>
      3 <style>
      4  #target::after {
      5    content: "content";
      6    animation: fade-scroll linear;
      7    animation-timeline: scroll(inline);
      8  }
      9 
     10  #target.off::after {
     11    content: none;
     12  }
     13 
     14  @keyframes fade-scroll {
     15    from { opacity: 1; }
     16    to { opacity: 0.3; }
     17  }
     18 </style>
     19 </head>
     20 <body>
     21 <div id="target"></div>
     22 <script>
     23  // This test ensures that removing the content of a pseudo-element whose
     24  // parent element is the target of a scroll-timeline animation during style
     25  // recalc doesn't crash.
     26  // Perform content removal after layout pass to ensure scroll animation is
     27  // registered.
     28  requestAnimationFrame(() => {
     29    requestAnimationFrame(() => {
     30      target.className = 'off';
     31    });
     32  });
     33 </script>
     34 </body>
     35 </html>