LibWeb: Pass sizes instead of rects to to_gfx_scaling_mode()

Position is irrelevant when determining the right scaling mode. No
functional changes.
This commit is contained in:
Jelle Raaijmakers 2025-11-12 09:37:53 +01:00 committed by Alexander Kalenik
parent 3f6cbeb87e
commit d352c4673c
Notes: github-actions[bot] 2025-11-12 15:00:11 +00:00
7 changed files with 11 additions and 10 deletions

View file

@ -272,7 +272,7 @@ Optional<Gfx::Filter> SVGFilterElement::gfx_filter(Layout::NodeWithStyle const&
return IterationDecision::Continue;
auto dest_rect = Gfx::enclosing_int_rect(paintable_box->absolute_rect().to_type<float>());
auto scaling_mode = CSS::to_gfx_scaling_mode(paintable_box->computed_values().image_rendering(), *src_rect, dest_rect);
auto scaling_mode = CSS::to_gfx_scaling_mode(paintable_box->computed_values().image_rendering(), src_rect->size(), dest_rect.size());
root_filter = Gfx::Filter::image(*bitmap, *src_rect, dest_rect, scaling_mode);
update_result_map(*image_primitive);
} else if (auto* merge_primitive = as_if<SVGFEMergeElement>(node)) {