tor-browser

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

new-content-preserve-3d-ancestor.html (1715B)


      1 <!DOCTYPE html>
      2 <html class=reftest-wait>
      3 <title>View transitions: computed transform for elements with transform-style:preserve-3d ancestors is correct</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
      5 <link rel="author" title="Matt Woodrow" href="mailto:mattwoodrow@apple.com">
      6 <link rel="match" href="new-content-preserve-3d-ancestor-ref.html">
      7 <script src="/common/rendering-utils.js"></script>
      8 <script src="/common/reftest-wait.js"></script>
      9 <script src="../../../../../resources/ui-helper.js"></script>
     10 <style>
     11 .box {
     12  background: lightblue;
     13  width: 100px;
     14  height: 100px;
     15  transform: rotateY(60deg);
     16  view-transition-name: target;
     17 }
     18 .outer {
     19  width: 100px;
     20  height: 100px;
     21  transform-style: preserve-3d;
     22  transform: rotateY(60deg);
     23 }
     24 
     25 /* We're verifying what we capture, so just display the new contents for 5 minutes.  */
     26 html::view-transition-group(*) { animation-duration: 300s; }
     27 html::view-transition-new(*) { animation: unset; opacity: 1; }
     28 html::view-transition-old(*) { animation: unset; opacity: 0; }
     29 /* hide the root so we show transition background to ensure we're in a transition */
     30 html::view-transition-group(root) { animation: unset; opacity: 0; }
     31 html::view-transition { background: lightpink; }
     32 </style>
     33 <div class=outer>
     34  <div class=outer>
     35    <div class=box></div>
     36  </div>
     37 </div>
     38 <script>
     39 failIfNot(document.startViewTransition, "Missing document.startViewTransition");
     40 
     41 async function runTest() {
     42  await waitForAtLeastOneFrame();
     43 
     44  let t = document.startViewTransition(() => {
     45    requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));
     46  });
     47 }
     48 onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
     49 </script>