Skip to content

Commit 9cbef10

Browse files
committed
LibWeb: Rename BoxModelMetrics::full_margin() => margin_box()
This matches the other member names (padding_box() and border_box().)
1 parent 260427f commit 9cbef10

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Libraries/LibWeb/Layout/BoxModelMetrics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ BoxModelMetrics::~BoxModelMetrics()
3636
{
3737
}
3838

39-
BoxModelMetrics::PixelBox BoxModelMetrics::full_margin(const LayoutNode& layout_node) const
39+
BoxModelMetrics::PixelBox BoxModelMetrics::margin_box(const LayoutNode& layout_node) const
4040
{
4141
return {
4242
m_margin.top.to_px(layout_node) + m_border.top.to_px(layout_node) + m_padding.top.to_px(layout_node),

Libraries/LibWeb/Layout/BoxModelMetrics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class BoxModelMetrics {
5353
float left;
5454
};
5555

56-
PixelBox full_margin(const LayoutNode&) const;
56+
PixelBox margin_box(const LayoutNode&) const;
5757
PixelBox padding_box(const LayoutNode&) const;
5858
PixelBox border_box(const LayoutNode&) const;
5959

Libraries/LibWeb/Layout/LayoutBlock.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void LayoutBlock::layout_block_children(LayoutMode layout_mode)
150150
child_block.layout(layout_mode);
151151

152152
if (!child_block.is_absolutely_positioned())
153-
content_height = max(content_height, child_block.effective_offset().y() + child_block.height() + child_block.box_model().full_margin(*this).bottom);
153+
content_height = max(content_height, child_block.effective_offset().y() + child_block.height() + child_block.box_model().margin_box(*this).bottom);
154154
});
155155
if (layout_mode != LayoutMode::Default) {
156156
float max_width = 0;
@@ -464,7 +464,7 @@ void LayoutBlock::compute_position()
464464
+ box_model().padding().left.to_px(*this)
465465
+ box_model().offset().left.to_px(*this);
466466

467-
float position_y = box_model().full_margin(*this).top
467+
float position_y = box_model().margin_box(*this).top
468468
+ box_model().offset().top.to_px(*this);
469469

470470
LayoutBlock* relevant_sibling = previous_sibling();
@@ -477,7 +477,7 @@ void LayoutBlock::compute_position()
477477
if (relevant_sibling) {
478478
auto& previous_sibling_style = relevant_sibling->box_model();
479479
position_y += relevant_sibling->effective_offset().y() + relevant_sibling->height();
480-
position_y += previous_sibling_style.full_margin(*this).bottom;
480+
position_y += previous_sibling_style.margin_box(*this).bottom;
481481
}
482482

483483
set_offset({ position_x, position_y });

Libraries/LibWeb/Layout/LayoutReplaced.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Gfx::FloatPoint LayoutReplaced::calculate_position()
146146
+ box_model().padding().left.to_px(*this)
147147
+ box_model().offset().left.to_px(*this);
148148

149-
float y = box_model().full_margin(*this).top + box_model().offset().top.to_px(*this);
149+
float y = box_model().margin_box(*this).top + box_model().offset().top.to_px(*this);
150150

151151
return { x, y };
152152
}

0 commit comments

Comments
 (0)