summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-08-10 16:16:46 +0100
committerAndreas Kling <kling@serenityos.org>2022-08-10 19:39:07 +0200
commit1473842b5647e4f3d8986966875e3cc78a01e8f8 (patch)
tree4ca0084bad5fe373532e5500c12350954e9b7e11 /Userland/Libraries/LibWeb/CSS/StyleValue.cpp
parent22f7e800d2d0eecdf6f8d64b6c265eb05cad4546 (diff)
downloadserenity-1473842b5647e4f3d8986966875e3cc78a01e8f8.zip
LibWeb: Follow `image-rendering` when painting image style values
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/StyleValue.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValue.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
index 0406bcdef3..e2c42a3aec 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
@@ -1457,10 +1457,10 @@ Optional<int> ImageStyleValue::natural_height() const
return {};
}
-void ImageStyleValue::paint(PaintContext& context, Gfx::IntRect const& dest_rect) const
+void ImageStyleValue::paint(PaintContext& context, Gfx::IntRect const& dest_rect, CSS::ImageRendering image_rendering) const
{
if (m_bitmap)
- context.painter().draw_scaled_bitmap(dest_rect, *m_bitmap, m_bitmap->rect(), 1.0f, Gfx::Painter::ScalingMode::BilinearBlend);
+ context.painter().draw_scaled_bitmap(dest_rect, *m_bitmap, m_bitmap->rect(), 1.0f, to_gfx_scaling_mode(image_rendering));
}
String LinearGradientStyleValue::to_string() const
@@ -1608,7 +1608,7 @@ void LinearGradientStyleValue::resolve_for_size(Layout::Node const& node, Gfx::F
m_resolved_data = Painting::resolve_linear_gradient_data(node, size, *this);
}
-void LinearGradientStyleValue::paint(PaintContext& context, Gfx::IntRect const& dest_rect) const
+void LinearGradientStyleValue::paint(PaintContext& context, Gfx::IntRect const& dest_rect, CSS::ImageRendering) const
{
VERIFY(m_resolved_data.has_value());
Painting::paint_linear_gradient(context, dest_rect, *m_resolved_data);