new-content-flat-transform-ancestor.html (1802B)
1 <!DOCTYPE html> 2 <html class=reftest-wait> 3 <title>View transitions: computed transform for elements with transform-style:flat 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-flat-transform-ancestor-ref.html"> 7 <meta name="fuzzy" content="maxDifference=0-63; totalPixels=0-512"> 8 <script src="/common/rendering-utils.js"></script> 9 <script src="/common/reftest-wait.js"></script> 10 <script src="../../../../../resources/ui-helper.js"></script> 11 <style> 12 body { 13 perspective: 1000px; 14 } 15 .box { 16 background: lightblue; 17 width: 100px; 18 height: 100px; 19 transform: rotateY(60deg); 20 view-transition-name: target; 21 } 22 .outer { 23 width: 100px; 24 height: 100px; 25 transform: rotateY(60deg); 26 perspective: 1000px; 27 } 28 29 /* We're verifying what we capture, so just display the new contents for 5 minutes. */ 30 html::view-transition-group(*) { animation-duration: 300s; } 31 html::view-transition-new(*) { animation: unset; opacity: 1; } 32 html::view-transition-old(*) { animation: unset; opacity: 0; } 33 /* hide the root so we show transition background to ensure we're in a transition */ 34 html::view-transition-group(root) { animation: unset; opacity: 0; } 35 html::view-transition { background: lightpink; } 36 </style> 37 <div class=outer> 38 <div class=outer> 39 <div class=box></div> 40 </div> 41 </div> 42 <script> 43 failIfNot(document.startViewTransition, "Missing document.startViewTransition"); 44 45 async function runTest() { 46 await waitForAtLeastOneFrame(); 47 48 let t = document.startViewTransition(() => { 49 requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); 50 }); 51 } 52 onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); 53 </script>