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

LibWeb: Entirely and exactly distribute grids' extra space to tracks

Previously, the code assumed that in dividing up the space in the
affected tracks there would never be an overshoot. Instead, we can
check for each track how much extra space is left and never consume any
extra.

In the same way, we can ensure that all extra space is consumed by
distributing all remaining extra space starting from the first track.
Thus, if there is no growth limit, the space distribution should always
consume all the extra space.
This commit is contained in:
Zaggy1024 2023-09-04 08:21:15 -05:00 committed by Alexander Kalenik
parent eb7c2ee307
commit bd85e1b30b
4 changed files with 36 additions and 30 deletions

View file

@ -123,6 +123,11 @@ public:
return from_raw(NumericLimits<int>::max());
}
static constexpr CSSPixels smallest_positive_value()
{
return from_raw(1);
}
float to_float() const;
double to_double() const;
int to_int() const;