tor-browser

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

capture-with-visibility-hidden-child.html (1237B)


      1 <!doctype html>
      2 <html class=reftest-wait>
      3 <title>View transitions: visibility hidden child</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
      5 <link rel="author" href="mailto:vmpstr@chromium.org">
      6 <link rel="match" href="capture-with-visibility-hidden-child-ref.html">
      7 <script src="/common/reftest-wait.js"></script>
      8 
      9 <style>
     10 .target {
     11  width: 100px;
     12  height: 100px;
     13  view-transition-name: target;
     14  background: blue;
     15 }
     16 .invisible {
     17  width: 500px;
     18  height: 500px;
     19  visibility: hidden;
     20 }
     21 
     22 ::view-transition-group(root) {
     23  visibility: hidden;
     24  animation-duration: 500s;
     25 }
     26 
     27 ::view-transtion-group(*),
     28 ::view-transtion-image-pair(*) {
     29  animation-play-state: paused;
     30 }
     31 
     32 ::view-transition-old(*) {
     33  animation: unset;
     34  opacity: 1;
     35 }
     36 
     37 ::view-transition-new(*) {
     38  animation: unset;
     39  opacity: 0;
     40 }
     41 
     42 
     43 ::view-transition {
     44  background: pink;
     45 }
     46 </style>
     47 
     48 <div class=target>
     49  <div class=invisible></div>
     50 </div>
     51 
     52 <script>
     53 failIfNot(document.startViewTransition, "Missing document.startViewTransition");
     54 
     55 function runTest() {
     56  const transition = document.startViewTransition();
     57  transition.ready.then(takeScreenshot);
     58 }
     59 
     60 onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
     61 </script>