summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-07-13 13:26:02 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-17 14:11:36 +0200
commit9fc43d5766eb9fd04a5e8226a52381dd72af1667 (patch)
tree6d8ddf5d32278a2aab4315d73536669742535990 /Userland/Libraries/LibWeb/Layout/FlexFormattingContext.h
parentc964a6b548e6b74c413d43b327b02cc5ef2542b8 (diff)
downloadserenity-9fc43d5766eb9fd04a5e8226a52381dd72af1667.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/FlexFormattingContext.h')
-rw-r--r--Userland/Libraries/LibWeb/Layout/FlexFormattingContext.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.h b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.h
index eccceaee85..46021e522e 100644
--- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.h
+++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.h
@@ -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 };