mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +00:00
LibWeb: Update flex container intrinsic size algorithm to draft spec
The CSSWG draft Flexbox spec is a bit clearer on some details, so let's update our implementation to match the latest version.
This commit is contained in:
parent
c964a6b548
commit
9fc43d5766
2 changed files with 72 additions and 32 deletions
|
@ -23,6 +23,9 @@ public:
|
|||
Box const& flex_container() const { return context_box(); }
|
||||
|
||||
private:
|
||||
SizeConstraint flex_container_main_constraint() const;
|
||||
SizeConstraint flex_container_cross_constraint() const;
|
||||
|
||||
void dump_items() const;
|
||||
|
||||
struct DirectionAgnosticMargins {
|
||||
|
@ -47,7 +50,7 @@ private:
|
|||
bool frozen { false };
|
||||
Optional<float> flex_factor {};
|
||||
float scaled_flex_shrink_factor { 0 };
|
||||
float max_content_flex_fraction { 0 };
|
||||
float desired_flex_fraction { 0 };
|
||||
float main_size { 0 };
|
||||
float cross_size { 0 };
|
||||
float main_offset { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue