scroll-marker-with-content-visibility-hidden-ancestor-crash.html (1705B)
1 <!doctype html> 2 <html class="test-wait"> 3 <meta charset="utf-8"> 4 <title>::scroll-markers with content-visibility: hidden ancestors, getBoundingClientRect crash</title> 5 <link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-pseudo"> 6 <link rel="help" href="https://crbug.com/398717539"> 7 <link rel="author" href="mailto:vmpstr@chromium.org"> 8 <link rel="assert" content="Test should not crash when interacting with c-v hidden elements with scroll markers"> 9 <style> 10 #scroller { 11 position: relative; 12 width: 500px; 13 height: 200px; 14 overflow: auto; 15 scroll-marker-group: after; 16 columns: 1; 17 18 &::scroll-marker-group { 19 height: 20px; 20 width: 200px; 21 } 22 } 23 24 .wrapper { 25 height: 100%; 26 content-visibility: hidden; 27 } 28 29 .item { 30 width: 100%; 31 height: 100%; 32 &::scroll-marker { 33 display: inline-block; 34 content: ""; 35 width: 10px; 36 height: 10px; 37 border: 1px solid black; 38 border-radius: 50%; 39 } 40 41 &::scroll-marker:target-current { 42 background: blue; 43 } 44 } 45 46 </style> 47 48 <div id=scroller> 49 <div id=w1 class=wrapper><div id=e1 class=item>item 1</div></div> 50 <div class=wrapper><div class=item>item 2</div></div> 51 <div class=wrapper><div class=item>item 3</div></div> 52 <div class=wrapper><div class=item>item 4</div></div> 53 <div class=wrapper><div class=item>item 5</div></div> 54 </div> 55 56 <script> 57 onload = requestAnimationFrame(() => requestAnimationFrame(() => { 58 e1.getBoundingClientRect(); 59 60 requestAnimationFrame(() => { 61 w1.style.contentVisibility = "visible"; 62 requestAnimationFrame(() => { 63 w1.style.contentVisibility = "hidden"; 64 65 requestAnimationFrame(() => { document.documentElement.className = "" }); 66 }); 67 }); 68 })); 69 </script>