| <!DOCTYPE html> |
| <html class=reftest-wait> |
| <title>Shared transitions: element with clip max texture size</title> |
| <link rel="help" href="https://github.com/WICG/view-transitions"> |
| <link rel="author" href="mailto:khushalsagar@chromium.org"> |
| <link rel="match" href="content-with-clip-max-texture-size-ref.html"> |
| <meta name=fuzzy content="maxDifference=10;totalPixels=200"> |
| |
| <script src="/common/reftest-wait.js"></script> |
| <style> |
| .target { |
| contain: paint; |
| width: 100px; |
| height: 8000px; |
| } |
| |
| .green { |
| width: 100%; |
| height: 7900px; |
| background: green |
| } |
| |
| .blue { |
| width: 100%; |
| height: 100px; |
| background: blue; |
| } |
| |
| .hidden { |
| contain: paint; |
| width: 10px; |
| height: 10px; |
| background: grey; |
| view-transition-name: hidden; |
| } |
| #target1 { view-transition-name: target1; } |
| |
| html::view-transition-group(hidden) { animation-duration: 300s; } |
| html::view-transition-image-pair(hidden) { animation: unset; opacity: 0; } |
| |
| html::view-transition-old(*), html::view-transition-new(*) { |
| object-fit: none; |
| } |
| |
| html::view-transition-old(target1) { animation: unset; opacity: 0; } |
| html::view-transition-new(target1) { animation: unset; opacity: 1; } |
| |
| </style> |
| |
| <div id="target1" class="target"> |
| <div class="green"></div> |
| <div id="scrollblue" class="blue"></div> |
| </div> |
| <div id=hidden class=hidden></div> |
| |
| <script> |
| async function runTest() { |
| scrollblue.scrollIntoView(); |
| |
| document.startViewTransition(() => { |
| requestAnimationFrame(() => requestAnimationFrame(() => |
| requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)) |
| )); |
| }); |
| } |
| onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); |
| </script> |
| |