1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

LibWeb: Use empty Optional to represent infinte growth limit in GFC

In c66dbc99ee GFC was updated to use -1
as special value for the infinite growth limit. However, using Optional
instead reduces the risk of accidentally using -1 special value in
layout calculations.
This commit is contained in:
Aliaksandr Kalenik 2023-07-25 23:09:04 +02:00 committed by Andreas Kling
parent 96d5a1edb0
commit de95a2fe33
2 changed files with 23 additions and 27 deletions

View file

@ -119,7 +119,7 @@ private:
CSSPixels base_size { 0 };
bool base_size_frozen { false };
CSSPixels growth_limit { 0 };
Optional<CSSPixels> growth_limit { 0 };
bool growth_limit_frozen { false };
bool infinitely_growable { false };