chrome-377324991-crash.html (899B)
1 <!DOCTYPE html> 2 <html class="test-wait"> 3 <title>CSS Anchor Positioning Test: crash for simultaneous @position-try and display:none change</title> 4 <link rel="help" href="https://crbug.com/377324991"> 5 <style> 6 @position-try --opt { 7 position-area: right center; 8 } 9 #anchor { 10 width: 100px; 11 height: 100px; 12 background-color: green; 13 anchor-name: --a; 14 } 15 #anchored { 16 position: absolute; 17 width: 100px; 18 height: 100px; 19 background-color: lime; 20 position-anchor: --a; 21 position-area: left center; 22 position-try-fallbacks: --opt; 23 } 24 </style> 25 <div id="anchor"></div> 26 <div id="anchored"></div> 27 <script> 28 requestAnimationFrame(() => { 29 requestAnimationFrame(() => { 30 anchored.style.display = 'none'; 31 document.styleSheets[0].insertRule("@position-try --opt {}"); 32 document.documentElement.classList.remove("test-wait"); 33 }); 34 }); 35 </script>