nothing-captured.html (1326B)
1 <!DOCTYPE html> 2 <html class=reftest-wait> 3 <title>View transitions: shared element with overflow</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="nothing-captured-ref.html"> 7 <script src="/common/reftest-wait.js"></script> 8 <script src="/dom/events/scrolling/scroll_support.js"></script> 9 <style> 10 :root { view-transition-name: none; } 11 .target { 12 width: 100px; 13 height: 100px; 14 contain: paint; 15 background: blue; 16 overflow-clip-margin: 50px; 17 } 18 .child { 19 width: 200px; 20 height: 200px; 21 position: relative; 22 top: 50px; 23 left: 50px; 24 background: green; 25 } 26 27 /* None of these should apply, so make everything red if it does */ 28 html::view-transition-group(*) { animation-duration: 300s; } 29 html::view-transition-image-pair(*) { visibility: hidden } 30 html::view-transition { background: red; } 31 </style> 32 33 This text should appear unmodified, since the root isn't captured. 34 <div class=target> 35 <div class=child> 36 </div> 37 </div> 38 39 <script> 40 failIfNot(document.startViewTransition, "Missing document.startViewTransition"); 41 42 async function runTest() { 43 await document.startViewTransition().ready; 44 requestAnimationFrame(takeScreenshot); 45 } 46 47 onload = async () => { 48 await waitForCompositorReady(); 49 runTest(); 50 } 51 52 </script>