|
| 1 | +<!DOCTYPE html> |
| 2 | +<html class=reftest-wait> |
| 3 | +<title>Nested View Transitions root capture with border radius</title> |
| 4 | +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> |
| 5 | +<link rel=" author" href=" mailto:[email protected]" > |
| 6 | +<link rel="match" href="nested-root-capture-with-clip-ref.html"> |
| 7 | +<meta name=fuzzy content="maxDifference=0-40; totalPixels=0-400"> |
| 8 | +<script src="/common/reftest-wait.js"></script> |
| 9 | +<script src="/dom/events/scrolling/scroll_support.js"></script> |
| 10 | + |
| 11 | +<style> |
| 12 | +:root { view-transition-name: none } |
| 13 | +#clipper { |
| 14 | + view-transition-group: contain; |
| 15 | + view-transition-name: clipper; |
| 16 | + overflow: clip; |
| 17 | + height: 200px; |
| 18 | + width: 100px; |
| 19 | + border-radius: 50%; |
| 20 | + background: rebeccapurple; |
| 21 | +} |
| 22 | + |
| 23 | +.item { |
| 24 | + view-transition-name: match-element; |
| 25 | + view-transition-class: item; |
| 26 | + background: pink; |
| 27 | + margin-bottom: 10px; |
| 28 | + height: 20px; |
| 29 | +} |
| 30 | +#i0 { |
| 31 | + view-transition-name: none; |
| 32 | + will-change: transform; |
| 33 | +} |
| 34 | +::view-transition-group(clipper) { |
| 35 | + animation-play-state: pause; |
| 36 | +} |
| 37 | +::view-transition-new(clipper) { |
| 38 | + animation: unset; |
| 39 | + opacity: 0; |
| 40 | +} |
| 41 | +::view-transition-old(clipper) { |
| 42 | + animation: unset; |
| 43 | + opacity: 1; |
| 44 | +} |
| 45 | +::view-transition-group(*.item) { |
| 46 | + display: none; |
| 47 | +} |
| 48 | +</style> |
| 49 | + |
| 50 | +<div id=clipper> |
| 51 | + <div id=i0 class=item></div> |
| 52 | + <div id=i1 class=item></div> |
| 53 | + <div id=i2 class=item></div> |
| 54 | + <div id=i3 class=item></div> |
| 55 | +</div> |
| 56 | + |
| 57 | +<script> |
| 58 | +function runTest() { |
| 59 | + document.startViewTransition().ready.then(takeScreenshot); |
| 60 | +} |
| 61 | + |
| 62 | +onload = async () => { |
| 63 | + await waitForCompositorReady(); |
| 64 | + runTest(); |
| 65 | +} |
| 66 | +</script> |
| 67 | +</html> |
0 commit comments