summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-04-06 14:18:33 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-06 14:43:00 +0200
commitbe268184483ea7f7c4f0a63a6d2022f4a520f605 (patch)
treeea97d15b49da0498c14533948f3b05da21540766 /Userland/Libraries/LibWeb
parent922509c1a56741c4b5519c47ead8ba3956cde556 (diff)
downloadserenity-be268184483ea7f7c4f0a63a6d2022f4a520f605.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingContext.cpp6
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingContext.h2
2 files changed, 4 insertions, 4 deletions
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<ReplacedBox>(box)) {
return compute_height_for_replaced_element(state, verify_cast<ReplacedBox>(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&);