1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:07:35 +00:00

LibWeb: Fix infinite recursion when grid has "max-width: max-content"

With this change "max-width: max-content" is treated as "none" when
the available width is also "max-content". This fix prevents a stack
overflow in the grid track size maximization algorithm by avoiding
recursive calls to calculate_max_width() when determining the maximum
grid container size.
This commit is contained in:
Aliaksandr Kalenik 2024-02-20 21:50:48 +01:00 committed by Andreas Kling
parent 8e2102fb73
commit aee5120078
4 changed files with 43 additions and 10 deletions

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<style>
.grid {
display: grid;
max-width: max-content;
}
.item {
background-color: magenta;
width: 100px;
height: 100px;
}
</style>
<div class="grid"><div class="item"></div></div>