chrome-layout-root-crash.html (569B)
1 <!doctype html> 2 <html class="test-wait"> 3 <link rel="help" href="https://crbug.com/1371820"> 4 <style> 5 body, div, img { container-type: size; } 6 </style> 7 <p>Pass if no crash.</p> 8 <div id="div"><img id="img" alt="a"></div> 9 <script> 10 requestAnimationFrame(() => requestAnimationFrame(() => { 11 // Adds a layout root inside the div size container. 12 img.alt = img.src = "b"; 13 // Marks div size container for layout which skips style recalc for the sub-tree. 14 div.style.width = "500px"; 15 document.documentElement.classList.remove("test-wait"); 16 })); 17 </script>