mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
LibWeb: Make separate functions for calculating min/max content sizes
At first, these are just wrappers around calculate_intrinsic_sizes(). Eventually, we'll make them do only the work necessary for their specific size.
This commit is contained in:
parent
1690d88887
commit
496cf39cf5
4 changed files with 35 additions and 30 deletions
|
@ -45,13 +45,10 @@ public:
|
|||
|
||||
virtual void parent_context_did_dimension_child_root_box() { }
|
||||
|
||||
struct MinAndMaxContentSize {
|
||||
float min_content_size { 0 };
|
||||
float max_content_size { 0 };
|
||||
};
|
||||
|
||||
MinAndMaxContentSize calculate_min_and_max_content_width(Layout::Box const&) const;
|
||||
MinAndMaxContentSize calculate_min_and_max_content_height(Layout::Box const&) const;
|
||||
float calculate_min_content_width(Layout::Box const&) const;
|
||||
float calculate_max_content_width(Layout::Box const&) const;
|
||||
float calculate_min_content_height(Layout::Box const&) const;
|
||||
float calculate_max_content_height(Layout::Box const&) const;
|
||||
|
||||
float calculate_fit_content_height(Layout::Box const&, Optional<float> available_height) const;
|
||||
float calculate_fit_content_width(Layout::Box const&, Optional<float> available_width) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue