mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:18:13 +00:00
LibWeb: Only perform the requested form of intrinsic size calculation
Before, querying any of the four intrinsic sizes would cause us to calculate all of them (the four being min-content width/height, and max-content width/height). Now, the helper functions only calculate the specific intrinsic size requested. It's then cached at the root formatting context level, so that it's never calculated twice within the same layout pass.
This commit is contained in:
parent
496cf39cf5
commit
4f6fc3d3a6
4 changed files with 105 additions and 92 deletions
|
@ -59,7 +59,6 @@ protected:
|
|||
FormattingContext(Type, FormattingState&, Box const&, FormattingContext* parent = nullptr);
|
||||
|
||||
float calculate_fit_content_size(float min_content_size, float max_content_size, Optional<float> available_space) const;
|
||||
FormattingState::IntrinsicSizes calculate_intrinsic_sizes(Layout::Box const&) const;
|
||||
|
||||
OwnPtr<FormattingContext> layout_inside(Box const&, LayoutMode);
|
||||
void compute_inset(Box const& box);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue