tor-browser

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

massive-element-right-and-left-of-viewport-partially-onscreen-old.html (2077B)


      1 <!DOCTYPE html>
      2 <html class=reftest-wait>
      3 <title>View transitions: massive element below and on top of viewport partially onscreen (new content)</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
      5 <link rel="author" href="mailto:khushalsagar@chromium.org">
      6 <link rel="match" href="massive-element-right-and-left-of-viewport-partially-onscreen-ref.html">
      7 <meta name="fuzzy" content="maxDifference=0-2; totalPixels=0-700">
      8 
      9 <script src="/common/reftest-wait.js"></script>
     10 <style>
     11 :root {
     12  writing-mode: vertical-lr;
     13 }
     14 
     15 .target {
     16  position: fixed;
     17  inset-block-start: -90px;
     18  inline-size: 100px;
     19  block-size: 40000px;
     20  view-transition-name: target;
     21 }
     22 
     23 .top {
     24  inline-size: 100%;
     25  block-size: 100px;
     26  background: lightblue;
     27 }
     28 
     29 .middle {
     30  inline-size: 100%;
     31  block-size: 39800px;
     32  background: green;
     33 }
     34 
     35 .bottom {
     36  inline-size: 100%;
     37  block-size: 100px;
     38  background: blue;
     39 }
     40 
     41 .hidden {
     42  contain: paint;
     43  inline-size: 10px;
     44  block-size: 10px;
     45  background: grey;
     46  view-transition-name: hidden;
     47 }
     48 
     49 html::view-transition-group(hidden) { animation-duration: 300s; }
     50 html::view-transition-image-pair(hidden) { animation: unset; opacity: 0; }
     51 
     52 html::view-transition-old(*), html::view-transition-new(*) {
     53  object-fit: none;
     54 }
     55 
     56 html::view-transition-old(target) { animation: unset; opacity: 1; }
     57 html::view-transition-new(target) { animation: unset; opacity: 0; }
     58 
     59 </style>
     60 
     61 <div class="target">
     62  <div class="top">This text is at the top of the box</div>
     63  <div class="middle">This text is in the middle of the box</div>
     64  <div id="scrollblue" class="bottom">This text is at the bottom of the box</div>
     65 </div>
     66 <div id=hidden class=hidden></div>
     67 
     68 <script>
     69 failIfNot(document.startViewTransition, "Missing document.startViewTransition");
     70 
     71 async function runTest() {
     72  document.startViewTransition(() => {
     73    requestAnimationFrame(() => requestAnimationFrame(() =>
     74      requestAnimationFrame(() => requestAnimationFrame(takeScreenshot))
     75    ));
     76  });
     77 }
     78 onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
     79 </script>