summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
index b369f386f6..0d410a4b23 100644
--- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
+++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
@@ -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();
});
}