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

LibWeb: Store flex item used sizes as Optional<CSSPixels>

This will allow us to tell whether values have been assigned by the flex
layout algorithm yet.
This commit is contained in:
Andreas Kling 2023-01-07 19:28:06 +01:00
parent dbbc75f8fd
commit ab2f105344
2 changed files with 23 additions and 18 deletions

View file

@ -60,8 +60,13 @@ private:
Optional<float> flex_factor {};
float scaled_flex_shrink_factor { 0 };
float desired_flex_fraction { 0 };
CSSPixels main_size { 0 };
CSSPixels cross_size { 0 };
// The used main size of this flex item. Empty until determined.
Optional<CSSPixels> main_size {};
// The used cross size of this flex item. Empty until determined.
Optional<CSSPixels> cross_size {};
CSSPixels main_offset { 0 };
CSSPixels cross_offset { 0 };
DirectionAgnosticMargins margins {};