tor-browser

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

scrolled-target-position.html (1091B)


      1 <!DOCTYPE html>
      2 <html class=reftest-wait>
      3 <title>View Transitions: Scrolled target capture position</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
      5 <link rel="match" href="scrolled-target-position-ref.html">
      6 <meta name="viewport" content="width=device-width, initial-scale=1">
      7 <script src="/common/reftest-wait.js"></script>
      8 <script src="/web-animations/testcommon.js"></script>
      9 
     10 <style>
     11 #target {
     12  width: 100px;
     13  height: 100px;
     14  overflow: scroll;
     15  background: lightblue;
     16 }
     17 #child {
     18  width: 50px;
     19  height: 75px;
     20  background: green;
     21 }
     22 #content {
     23  width: 100px;
     24  height: 400px;
     25  background: yellow;
     26 }
     27 
     28 html::view-transition-group(*) { animation-play-state: paused; }
     29 html::view-transition-old(*) { animation: none; opacity: 1; }
     30 html::view-transition-new(*) { animation: none; opacity: 0; }
     31 </style>
     32 
     33 <div id="target">
     34  <div id="content"><div id=child></div></div>
     35 </div>
     36 
     37 <script>
     38 function runTest() {
     39  target.scrollTop = 25;
     40  target.startViewTransition().ready.then(takeScreenshot);
     41 }
     42 
     43 waitForCompositorReady().then(runTest);
     44 </script>
     45 </html>