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

LibWeb: Rename compute_intrinsic_height() => calculate_auto_height()

Change "compute" to "calculate" to make clearer that this is unrelated
to the CSS "computed height" concept.

Change "intrinsic" to "auto" to make clearer that this is not the same
as the intrinsic min-content and max-content sizing calculations.
This commit is contained in:
Andreas Kling 2022-04-06 14:18:33 +02:00
parent 922509c1a5
commit be26818448
2 changed files with 4 additions and 4 deletions

View file

@ -822,7 +822,7 @@ FormattingState::IntrinsicSizes FormattingContext::calculate_intrinsic_sizes(Lay
cached_box_sizes.max_content_size = { box_state.content_width, box_state.content_height };
} else {
cached_box_sizes.max_content_size.set_width(independent_formatting_context->greatest_child_width(box));
cached_box_sizes.max_content_size.set_height(compute_intrinsic_height(throwaway_state, box));
cached_box_sizes.max_content_size.set_height(calculate_auto_height(throwaway_state, box));
}
}
@ -839,7 +839,7 @@ FormattingState::IntrinsicSizes FormattingContext::calculate_intrinsic_sizes(Lay
cached_box_sizes.min_content_size = { box_state.content_width, box_state.content_height };
} else {
cached_box_sizes.min_content_size.set_width(independent_formatting_context->greatest_child_width(box));
cached_box_sizes.min_content_size.set_height(compute_intrinsic_height(throwaway_state, box));
cached_box_sizes.min_content_size.set_height(calculate_auto_height(throwaway_state, box));
}
}
@ -900,7 +900,7 @@ float FormattingContext::calculate_fit_content_height(Layout::Box const& box, Op
return calculate_fit_content_size(min_content_size, max_content_size, available_space);
}
float FormattingContext::compute_intrinsic_height(FormattingState const& state, Box const& box)
float FormattingContext::calculate_auto_height(FormattingState const& state, Box const& box)
{
if (is<ReplacedBox>(box)) {
return compute_height_for_replaced_element(state, verify_cast<ReplacedBox>(box));

View file

@ -81,7 +81,7 @@ protected:
static float tentative_height_for_replaced_element(FormattingState const&, ReplacedBox const&, CSS::Length const& height);
static float compute_auto_height_for_block_formatting_context_root(FormattingState const&, BlockContainer const&);
static float compute_auto_height_for_block_level_element(FormattingState const&, Box const&);
static float compute_intrinsic_height(FormattingState const& state, Box const& box);
static float calculate_auto_height(FormattingState const& state, Box const& box);
ShrinkToFitResult calculate_shrink_to_fit_widths(Box const&);