Files
ladybird/Tests/LibWeb/Text/input/grid/min-height-with-abspos-child.html
Aliaksandr Kalenik 490377b76e LibWeb: Populate containing block chain in BFC min-height measurement
The throwaway BFC for min-height measurement may encounter abspos
elements whose CSS containing block is an ancestor above the subtree
root. Populate the entire containing block chain (not just the immediate
parent) so that ensure_used_values_for() finds pre-existing entries
instead of hitting the subtree root VERIFY.

Stop walking when the source state lacks an entry, which handles the
nested throwaway state case (e.g. min-height inside intrinsic sizing).
2026-03-03 22:37:38 +00:00

27 lines
574 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<style>
#wrapper {
position: relative;
width: 200px;
}
#container {
display: grid;
grid-template-rows: minmax(0, 1fr);
min-height: 50px;
}
</style>
<div id="wrapper">
<div id="container">
<div>
<div style="position: absolute; top: 0; left: 0; width: 10px; height: 10px;"></div>
<div style="height: 200px;"></div>
</div>
</div>
</div>
<script>
test(() => {
println(document.getElementById("container").getBoundingClientRect().height);
});
</script>