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

LibWeb: Improve FFC step 7 (hypothetical cross size)

- Avoid performing inside layout on definite-size flex items (since
  their computed size can be used as-is.)

- Use FormattingState::clone() to generate a throwaway layout instead of
  mutating the tree in-place.

- Update spec link & comments based on current CSSWG draft. The latest
  version is quite a bit clearer on how this should work.
This commit is contained in:
Andreas Kling 2022-02-27 13:39:38 +01:00
parent b904bff838
commit 1ce1af5d8b
2 changed files with 31 additions and 28 deletions

View file

@ -96,7 +96,7 @@ private:
void resolve_flexible_lengths(float main_available_size);
float determine_hypothetical_cross_size_of_item(Box const&);
void determine_hypothetical_cross_size_of_item(FlexItem&);
void calculate_cross_size_of_each_flex_line(float cross_min_size, float cross_max_size);