Drawing an SVG image into a <canvas> that is not in the DOM draws the wrong region
[WebKit-https.git] / Source / WebCore / html / canvas / CanvasRenderingContext2D.cpp
index 069f945..ca36db1 100644 (file)
@@ -1398,7 +1398,7 @@ void CanvasRenderingContext2D::drawImage(HTMLImageElement& imageElement, const F
 
     if (image->isSVGImage()) {
         image->setImageObserver(nullptr);
-        image->setContainerSize(normalizedSrcRect.size());
+        image->setContainerSize(imageRect.size());
     }
 
     if (rectContainsCanvas(normalizedDstRect)) {