LibWeb: Fix logic mistake in CRC2D's default_source_size()

If the source has a bitmap, we should indeed use the bitmap's size
instead of always using the source's own size.
This commit is contained in:
Andreas Kling 2022-04-07 16:56:51 +02:00
parent cb3a2b347b
commit 36d9943d3a
Notes: sideshowbarker 2024-07-17 14:17:56 +09:00

View file

@ -102,9 +102,10 @@ static void default_source_size(CanvasImageSource const& image, float& source_wi
if (source->bitmap()) {
source_width = source->bitmap()->width();
source_height = source->bitmap()->height();
} else {
source_width = source->width();
source_height = source->height();
}
source_width = source->width();
source_height = source->height();
});
}