mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:57:35 +00:00
Meta+Userland: Pass Gfx::FloatSize by value
Just two floats like Gfx::FloatPoint.
This commit is contained in:
parent
27fae78335
commit
1574f2c3f6
8 changed files with 21 additions and 21 deletions
|
@ -1827,7 +1827,7 @@ bool LinearGradientStyleValue::equals(StyleValue const& other_) const
|
|||
&& m_color_stop_list == other.m_color_stop_list);
|
||||
}
|
||||
|
||||
float LinearGradientStyleValue::angle_degrees(Gfx::FloatSize const& gradient_size) const
|
||||
float LinearGradientStyleValue::angle_degrees(Gfx::FloatSize gradient_size) const
|
||||
{
|
||||
auto corner_angle_degrees = [&] {
|
||||
return static_cast<float>(atan2(gradient_size.height(), gradient_size.width())) * 180 / AK::Pi<float>;
|
||||
|
@ -1866,7 +1866,7 @@ float LinearGradientStyleValue::angle_degrees(Gfx::FloatSize const& gradient_siz
|
|||
});
|
||||
}
|
||||
|
||||
void LinearGradientStyleValue::resolve_for_size(Layout::Node const& node, Gfx::FloatSize const& size) const
|
||||
void LinearGradientStyleValue::resolve_for_size(Layout::Node const& node, Gfx::FloatSize size) const
|
||||
{
|
||||
if (m_resolved.has_value() && m_resolved->size == size)
|
||||
return;
|
||||
|
@ -2150,7 +2150,7 @@ Gfx::FloatSize RadialGradientStyleValue::resolve_size(Layout::Node const& node,
|
|||
return resolved_size;
|
||||
}
|
||||
|
||||
void RadialGradientStyleValue::resolve_for_size(Layout::Node const& node, Gfx::FloatSize const& paint_size) const
|
||||
void RadialGradientStyleValue::resolve_for_size(Layout::Node const& node, Gfx::FloatSize paint_size) const
|
||||
{
|
||||
Gfx::FloatRect gradient_box { { 0, 0 }, paint_size };
|
||||
auto center = m_position.resolved(node, gradient_box);
|
||||
|
@ -2204,7 +2204,7 @@ DeprecatedString ConicGradientStyleValue::to_deprecated_string() const
|
|||
return builder.to_deprecated_string();
|
||||
}
|
||||
|
||||
void ConicGradientStyleValue::resolve_for_size(Layout::Node const& node, Gfx::FloatSize const& size) const
|
||||
void ConicGradientStyleValue::resolve_for_size(Layout::Node const& node, Gfx::FloatSize size) const
|
||||
{
|
||||
if (!m_resolved.has_value())
|
||||
m_resolved = ResolvedData { Painting::resolve_conic_gradient_data(node, *this), {} };
|
||||
|
|
|
@ -1157,7 +1157,7 @@ public:
|
|||
virtual Optional<int> natural_height() const { return {}; }
|
||||
|
||||
virtual void load_any_resources(DOM::Document&) {};
|
||||
virtual void resolve_for_size(Layout::Node const&, Gfx::FloatSize const&) const {};
|
||||
virtual void resolve_for_size(Layout::Node const&, Gfx::FloatSize) const {};
|
||||
|
||||
virtual bool is_paintable() const = 0;
|
||||
virtual void paint(PaintContext& context, Gfx::IntRect const& dest_rect, CSS::ImageRendering image_rendering) const = 0;
|
||||
|
@ -1251,7 +1251,7 @@ public:
|
|||
|
||||
bool is_paintable() const override { return true; }
|
||||
|
||||
void resolve_for_size(Layout::Node const&, Gfx::FloatSize const&) const override;
|
||||
void resolve_for_size(Layout::Node const&, Gfx::FloatSize) const override;
|
||||
|
||||
Gfx::FloatSize resolve_size(Layout::Node const&, Gfx::FloatPoint, Gfx::FloatRect const&) const;
|
||||
|
||||
|
@ -1308,7 +1308,7 @@ public:
|
|||
|
||||
bool is_paintable() const override { return true; }
|
||||
|
||||
void resolve_for_size(Layout::Node const&, Gfx::FloatSize const&) const override;
|
||||
void resolve_for_size(Layout::Node const&, Gfx::FloatSize) const override;
|
||||
|
||||
virtual ~ConicGradientStyleValue() override = default;
|
||||
|
||||
|
@ -1366,9 +1366,9 @@ public:
|
|||
|
||||
bool is_repeating() const { return m_repeating == GradientRepeating::Yes; }
|
||||
|
||||
float angle_degrees(Gfx::FloatSize const& gradient_size) const;
|
||||
float angle_degrees(Gfx::FloatSize gradient_size) const;
|
||||
|
||||
void resolve_for_size(Layout::Node const&, Gfx::FloatSize const&) const override;
|
||||
void resolve_for_size(Layout::Node const&, Gfx::FloatSize) const override;
|
||||
|
||||
bool is_paintable() const override { return true; }
|
||||
void paint(PaintContext& context, Gfx::IntRect const& dest_rect, CSS::ImageRendering image_rendering) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue