mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
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:
parent
3f6cbeb87e
commit
d352c4673c
Notes:
github-actions[bot]
2025-11-12 15:00:11 +00:00
Author: https://github.com/gmta
Commit: d352c4673c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6792
Reviewed-by: https://github.com/kalenikaliaksandr ✅
7 changed files with 11 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue