mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibWeb: Clamp fit-content widths in flex layout to min/max-width
In situations where we need a width to calculate the intrinsic height of a flex item, we use the fit-content width as a stand-in. However, we also need to clamp it to any min-width and max-width properties present.
This commit is contained in:
parent
4c090a9a35
commit
c0a7a61288
4 changed files with 58 additions and 4 deletions
|
@ -207,6 +207,8 @@ private:
|
|||
[[nodiscard]] CSSPixels calculate_fit_content_main_size(FlexItem const&) const;
|
||||
[[nodiscard]] CSSPixels calculate_fit_content_cross_size(FlexItem const&) const;
|
||||
|
||||
CSSPixels calculate_clamped_fit_content_width(Box const&, AvailableSpace const&) const;
|
||||
|
||||
virtual void parent_context_did_dimension_child_root_box() override;
|
||||
|
||||
CSS::FlexBasisData used_flex_basis_for_item(FlexItem const&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue