anchor-scroll-composited-scrolling-001-crash.html (775B)
1 <!DOCTYPE html> 2 <title>Tests that scrolling doesn't crash renderer when anchor is in a scroller whose content doesn't overflow</title> 3 <link rel="author" href="mailto:xiaochengh@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-anchor-1/"> 5 <style> 6 #container { 7 position: relative; 8 } 9 10 #scroller { 11 overflow: scroll; 12 width: 400px; 13 height: 400px; 14 } 15 16 #anchor { 17 anchor-name: --a; 18 margin: 100px; 19 width: 100px; 20 height: 100px; 21 background: green; 22 } 23 24 #anchored { 25 position: absolute; 26 position-anchor: --a; 27 left: anchor(left); 28 bottom: anchor(top); 29 width: 100px; 30 height: 100px; 31 background: orange; 32 } 33 34 </style> 35 36 <div id="container"> 37 <div id="scroller"> 38 <div id="anchor">anchor</div> 39 </div> 40 <div id="anchored">anchored</div> 41 </div>