Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-conditional/container-queries/crashtests/chrome-layout-root-crash.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html class="reftest-wait">
<style>
body, div, img { container-type: size; }
</style>
<p>Pass if no crash.</p>
<div id="div"><img id="img" alt="a"></div>
<script>
requestAnimationFrame(() => requestAnimationFrame(() => {
// Adds a layout root inside the div size container.
img.alt = img.src = "b";
// Marks div size container for layout which skips style recalc for the sub-tree.
div.style.width = "500px";
document.documentElement.classList.remove("reftest-wait");
}));
</script>