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

@ -156,9 +156,9 @@ void ImageStyleValue::paint(DisplayListRecordingContext& context, DevicePixelRec
if (!image_data)
return;
auto rect = image_data->frame_rect(m_current_frame_index).value_or(dest_rect.to_type<int>());
auto scaling_mode = to_gfx_scaling_mode(image_rendering, rect, dest_rect.to_type<int>());
auto dest_int_rect = dest_rect.to_type<int>();
auto rect = image_data->frame_rect(m_current_frame_index).value_or(dest_int_rect);
auto scaling_mode = to_gfx_scaling_mode(image_rendering, rect.size(), dest_int_rect.size());
image_data->paint(context, m_current_frame_index, dest_int_rect, dest_int_rect, scaling_mode);
}