mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
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:
parent
d4649db55e
commit
0cfc7f2c8a
Notes:
github-actions[bot]
2025-01-28 00:13:25 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/0cfc7f2c8a7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3375
2 changed files with 3 additions and 19 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue