summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-27 15:35:28 +0200
committerAndreas Kling <kling@serenityos.org>2022-03-27 18:16:08 +0200
commitd77dfc6b48d42a69e39d9661e5138ba69c6b48bc (patch)
tree9b44c4a0389a9093174adbb07615c836dd49452f /Userland
parentc49c036c840177bdd052a68cd99d39df06d79d70 (diff)
downloadserenity-d77dfc6b48d42a69e39d9661e5138ba69c6b48bc.zip
LibWeb: Rename FormattingContext::compute_position() => compute_inset()
This function computes the used inset properties, not the position of a box per se, so let's call it something more accurate.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingContext.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingContext.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
index b342858f2b..412d67b14a 100644
--- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
@@ -391,7 +391,7 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer const& b
compute_height(child_box, m_state);
- compute_position(child_box);
+ compute_inset(child_box);
if (is<ReplacedBox>(child_box) || is<BlockContainer>(child_box))
place_block_level_element_in_normal_flow_horizontally(child_box, block_container);
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
index 1bb8f7aeab..a2ab711e7b 100644
--- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
@@ -766,7 +766,7 @@ void FormattingContext::compute_height_for_absolutely_positioned_replaced_elemen
m_state.get_mutable(box).content_height = compute_height_for_replaced_element(m_state, box);
}
-void FormattingContext::compute_position(Box const& box)
+void FormattingContext::compute_inset(Box const& box)
{
// 9.4.3 Relative positioning
// Once a box has been laid out according to the normal flow or floated, it may be shifted relative to this position.
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.h b/Userland/Libraries/LibWeb/Layout/FormattingContext.h
index 160a1408aa..45455add5c 100644
--- a/Userland/Libraries/LibWeb/Layout/FormattingContext.h
+++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.h
@@ -65,7 +65,7 @@ protected:
FormattingState::IntrinsicSizes calculate_intrinsic_sizes(Layout::Box const&) const;
OwnPtr<FormattingContext> layout_inside(Box const&, LayoutMode);
- void compute_position(Box const&);
+ void compute_inset(Box const& box);
struct SpaceUsedByFloats {
float left { 0 };