Incorrect embedded SVG image sizing on first load
[WebKit-https.git] / Source / WebCore / rendering / svg / RenderSVGImage.cpp
index 5487b5e..47947e1 100644 (file)
@@ -179,6 +179,11 @@ void RenderSVGImage::imageChanged(WrappedImagePtr, const IntRect*)
     // Eventually notify parent resources, that we've changed.
     RenderSVGResource::markForLayoutAndParentResourceInvalidation(this, false);
 
+    // Update the SVGImageCache sizeAndScales entry in case image loading finished after layout.
+    // (https://bugs.webkit.org/show_bug.cgi?id=99489)
+    m_objectBoundingBox = FloatRect();
+    updateImageViewport();
+
     repaint();
 }