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

LibWeb: Keep the "remaining free space" across flexbox algo steps

Instead of recomputing the "remaining free space" per flex line,
remember it after calculating it during the "resolve flexible lengths"
step so we can reuse it later.
This commit is contained in:
Andreas Kling 2022-07-06 19:15:31 +02:00
parent 83a6be593c
commit 4935055407
2 changed files with 13 additions and 15 deletions

View file

@ -57,6 +57,7 @@ private:
struct FlexLine {
Vector<FlexItem*> items;
float cross_size { 0 };
float remaining_free_space { 0 };
};
bool has_definite_main_size(Box const&) const;