File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ BoxModelMetrics::~BoxModelMetrics()
36
36
{
37
37
}
38
38
39
- BoxModelMetrics::PixelBox BoxModelMetrics::full_margin (const LayoutNode& layout_node) const
39
+ BoxModelMetrics::PixelBox BoxModelMetrics::margin_box (const LayoutNode& layout_node) const
40
40
{
41
41
return {
42
42
m_margin.top .to_px (layout_node) + m_border.top .to_px (layout_node) + m_padding.top .to_px (layout_node),
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class BoxModelMetrics {
53
53
float left;
54
54
};
55
55
56
- PixelBox full_margin (const LayoutNode&) const ;
56
+ PixelBox margin_box (const LayoutNode&) const ;
57
57
PixelBox padding_box (const LayoutNode&) const ;
58
58
PixelBox border_box (const LayoutNode&) const ;
59
59
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ void LayoutBlock::layout_block_children(LayoutMode layout_mode)
150
150
child_block.layout (layout_mode);
151
151
152
152
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 );
154
154
});
155
155
if (layout_mode != LayoutMode::Default) {
156
156
float max_width = 0 ;
@@ -464,7 +464,7 @@ void LayoutBlock::compute_position()
464
464
+ box_model ().padding ().left .to_px (*this )
465
465
+ box_model ().offset ().left .to_px (*this );
466
466
467
- float position_y = box_model ().full_margin (*this ).top
467
+ float position_y = box_model ().margin_box (*this ).top
468
468
+ box_model ().offset ().top .to_px (*this );
469
469
470
470
LayoutBlock* relevant_sibling = previous_sibling ();
@@ -477,7 +477,7 @@ void LayoutBlock::compute_position()
477
477
if (relevant_sibling) {
478
478
auto & previous_sibling_style = relevant_sibling->box_model ();
479
479
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 ;
481
481
}
482
482
483
483
set_offset ({ position_x, position_y });
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ Gfx::FloatPoint LayoutReplaced::calculate_position()
146
146
+ box_model ().padding ().left .to_px (*this )
147
147
+ box_model ().offset ().left .to_px (*this );
148
148
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 );
150
150
151
151
return { x, y };
152
152
}
You can’t perform that action at this time.
0 commit comments