From be268184483ea7f7c4f0a63a6d2022f4a520f605 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 6 Apr 2022 14:18:33 +0200 Subject: 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. --- Userland/Libraries/LibWeb/Layout/FormattingContext.cpp | 6 +++--- Userland/Libraries/LibWeb/Layout/FormattingContext.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Userland') diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp index 73cf46ab30..007da2946d 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -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(box)) { return compute_height_for_replaced_element(state, verify_cast(box)); diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.h b/Userland/Libraries/LibWeb/Layout/FormattingContext.h index fff8e18f28..d9f4572eb0 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.h +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.h @@ -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&); -- cgit v1.2.3