tor-browser

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

anchor-scroll-composited-scrolling-002-crash.html (963B)


      1 <!DOCTYPE html>
      2 <html class="test-wait">
      3 <title>Tests that scrolling doesn't crash renderer when scroller's content no longer overflows</title>
      4 <link rel="author" href="mailto:xiaochengh@chromium.org">
      5 <link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
      6 
      7 <style>
      8 #scroller {
      9  margin-top: 200px;
     10  height: 200px;
     11  overflow-y: scroll;
     12 }
     13 
     14 #anchor {
     15  anchor-name: --a;
     16 }
     17 
     18 #spacer {
     19  height: 400px;
     20 }
     21 
     22 #target {
     23  position: fixed;
     24  top: anchor(bottom);
     25  left: anchor(left);
     26  position-anchor: --a;
     27 }
     28 </style>
     29 
     30 <div id="scroller">
     31  <div id="spacer"></div>
     32  <div id="anchor">anchor</div>
     33 </div>
     34 <div id="target">target</div>
     35 
     36 <script type="module">
     37 const raf = () => new Promise(resolve => requestAnimationFrame(resolve));
     38 
     39 await raf();
     40 await raf();
     41 
     42 spacer.style.height = '0';
     43 
     44 // Force paint property update on target in the same frame
     45 target.style.transform = 'scale(1)';
     46 
     47 document.documentElement.classList.remove('test-wait');
     48 </script>
     49 </html>