tor-browser

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

massive-element-left-of-viewport-partially-onscreen-old.html (2127B)


      1 <!DOCTYPE html>
      2 <html class=reftest-wait>
      3 <title>View transitions: massive element on top of viewport partially onscreen (old 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-left-of-viewport-partially-onscreen-ref.html">
      7 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
      8 <meta name="fuzzy" content="maxDifference=0-3;totalPixels=0-330">
      9 
     10 <script src="/common/reftest-wait.js"></script>
     11 <style>
     12 :root {
     13  writing-mode: vertical-lr;
     14  font: 12px/1 Ahem;
     15 }
     16 
     17 .target {
     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  scrollblue.scrollIntoView();
     73 
     74  document.startViewTransition(() => {
     75    requestAnimationFrame(() => requestAnimationFrame(() =>
     76      requestAnimationFrame(() => requestAnimationFrame(takeScreenshot))
     77    ));
     78  });
     79 }
     80 onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
     81 </script>