mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:47:35 +00:00
Meta+Userland: Pass Gfx::FloatPoint by value
Just a small 8-byte value like Gfx::IntPoint.
This commit is contained in:
parent
7be0b27dd3
commit
e011eafd37
25 changed files with 106 additions and 106 deletions
|
@ -27,7 +27,7 @@ bool BlockContainer::is_scrollable() const
|
|||
return computed_values().overflow_y() == CSS::Overflow::Scroll;
|
||||
}
|
||||
|
||||
void BlockContainer::set_scroll_offset(Gfx::FloatPoint const& offset)
|
||||
void BlockContainer::set_scroll_offset(Gfx::FloatPoint offset)
|
||||
{
|
||||
// FIXME: If there is horizontal and vertical scroll ignore only part of the new offset
|
||||
if (offset.y() < 0 || m_scroll_offset == offset)
|
||||
|
|
|
@ -26,8 +26,8 @@ public:
|
|||
BlockContainer const* next_sibling() const { return verify_cast<BlockContainer>(Node::next_sibling()); }
|
||||
|
||||
bool is_scrollable() const;
|
||||
Gfx::FloatPoint const& scroll_offset() const { return m_scroll_offset; }
|
||||
void set_scroll_offset(Gfx::FloatPoint const&);
|
||||
Gfx::FloatPoint scroll_offset() const { return m_scroll_offset; }
|
||||
void set_scroll_offset(Gfx::FloatPoint);
|
||||
|
||||
Painting::PaintableWithLines const* paint_box() const;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
Trailing,
|
||||
};
|
||||
|
||||
LineBoxFragment(Node const& layout_node, int start, int length, Gfx::FloatPoint const& offset, Gfx::FloatSize const& size, float border_box_top, float border_box_bottom, Type type)
|
||||
LineBoxFragment(Node const& layout_node, int start, int length, Gfx::FloatPoint offset, Gfx::FloatSize const& size, float border_box_top, float border_box_bottom, Type type)
|
||||
: m_layout_node(layout_node)
|
||||
, m_start(start)
|
||||
, m_length(length)
|
||||
|
@ -40,8 +40,8 @@ public:
|
|||
const Gfx::FloatRect absolute_rect() const;
|
||||
Type type() const { return m_type; }
|
||||
|
||||
Gfx::FloatPoint const& offset() const { return m_offset; }
|
||||
void set_offset(Gfx::FloatPoint const& offset) { m_offset = offset; }
|
||||
Gfx::FloatPoint offset() const { return m_offset; }
|
||||
void set_offset(Gfx::FloatPoint offset) { m_offset = offset; }
|
||||
|
||||
// The baseline of a fragment is the number of pixels from the top to the text baseline.
|
||||
void set_baseline(float y) { m_baseline = y; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue