LibWeb: Move LayoutState::set_content_* methods inline

I see no good reason to keep them out of line, and having the methods
named differently than the property they're updating caused me some
confusion initially.
This commit is contained in:
Jelle Raaijmakers 2025-01-27 12:07:30 +01:00 committed by Andreas Kling
parent d4649db55e
commit 0cfc7f2c8a
Notes: github-actions[bot] 2025-01-28 00:13:25 +00:00
2 changed files with 3 additions and 19 deletions

View file

@ -691,22 +691,6 @@ AvailableSpace LayoutState::UsedValues::available_inner_space_or_constraints_fro
return AvailableSpace(inner_width, inner_height);
}
void LayoutState::UsedValues::set_content_offset(CSSPixelPoint new_offset)
{
set_content_x(new_offset.x());
set_content_y(new_offset.y());
}
void LayoutState::UsedValues::set_content_x(CSSPixels x)
{
offset.set_x(x);
}
void LayoutState::UsedValues::set_content_y(CSSPixels y)
{
offset.set_y(y);
}
void LayoutState::UsedValues::set_indefinite_content_width()
{
m_has_definite_width = false;

View file

@ -101,9 +101,9 @@ struct LayoutState {
// the constraint is used in that axis instead.
AvailableSpace available_inner_space_or_constraints_from(AvailableSpace const& outer_space) const;
void set_content_offset(CSSPixelPoint);
void set_content_x(CSSPixels);
void set_content_y(CSSPixels);
void set_content_offset(CSSPixelPoint new_offset) { offset = new_offset; }
void set_content_x(CSSPixels x) { offset.set_x(x); }
void set_content_y(CSSPixels y) { offset.set_y(y); }
CSSPixelPoint offset;