mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
LibWeb: Rename BoxModelMetrics::full_margin() => margin_box()
This matches the other member names (padding_box() and border_box().)
This commit is contained in:
parent
260427f0ad
commit
9cbef10bdd
Notes:
sideshowbarker
2024-07-19 05:42:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9cbef10bdd2
4 changed files with 6 additions and 6 deletions
|
@ -36,7 +36,7 @@ BoxModelMetrics::~BoxModelMetrics()
|
|||
{
|
||||
}
|
||||
|
||||
BoxModelMetrics::PixelBox BoxModelMetrics::full_margin(const LayoutNode& layout_node) const
|
||||
BoxModelMetrics::PixelBox BoxModelMetrics::margin_box(const LayoutNode& layout_node) const
|
||||
{
|
||||
return {
|
||||
m_margin.top.to_px(layout_node) + m_border.top.to_px(layout_node) + m_padding.top.to_px(layout_node),
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
float left;
|
||||
};
|
||||
|
||||
PixelBox full_margin(const LayoutNode&) const;
|
||||
PixelBox margin_box(const LayoutNode&) const;
|
||||
PixelBox padding_box(const LayoutNode&) const;
|
||||
PixelBox border_box(const LayoutNode&) const;
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ void LayoutBlock::layout_block_children(LayoutMode layout_mode)
|
|||
child_block.layout(layout_mode);
|
||||
|
||||
if (!child_block.is_absolutely_positioned())
|
||||
content_height = max(content_height, child_block.effective_offset().y() + child_block.height() + child_block.box_model().full_margin(*this).bottom);
|
||||
content_height = max(content_height, child_block.effective_offset().y() + child_block.height() + child_block.box_model().margin_box(*this).bottom);
|
||||
});
|
||||
if (layout_mode != LayoutMode::Default) {
|
||||
float max_width = 0;
|
||||
|
@ -464,7 +464,7 @@ void LayoutBlock::compute_position()
|
|||
+ box_model().padding().left.to_px(*this)
|
||||
+ box_model().offset().left.to_px(*this);
|
||||
|
||||
float position_y = box_model().full_margin(*this).top
|
||||
float position_y = box_model().margin_box(*this).top
|
||||
+ box_model().offset().top.to_px(*this);
|
||||
|
||||
LayoutBlock* relevant_sibling = previous_sibling();
|
||||
|
@ -477,7 +477,7 @@ void LayoutBlock::compute_position()
|
|||
if (relevant_sibling) {
|
||||
auto& previous_sibling_style = relevant_sibling->box_model();
|
||||
position_y += relevant_sibling->effective_offset().y() + relevant_sibling->height();
|
||||
position_y += previous_sibling_style.full_margin(*this).bottom;
|
||||
position_y += previous_sibling_style.margin_box(*this).bottom;
|
||||
}
|
||||
|
||||
set_offset({ position_x, position_y });
|
||||
|
|
|
@ -146,7 +146,7 @@ Gfx::FloatPoint LayoutReplaced::calculate_position()
|
|||
+ box_model().padding().left.to_px(*this)
|
||||
+ box_model().offset().left.to_px(*this);
|
||||
|
||||
float y = box_model().full_margin(*this).top + box_model().offset().top.to_px(*this);
|
||||
float y = box_model().margin_box(*this).top + box_model().offset().top.to_px(*this);
|
||||
|
||||
return { x, y };
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue