Index: Source/core/html/ImageDocument.cpp |
diff --git a/Source/core/html/ImageDocument.cpp b/Source/core/html/ImageDocument.cpp |
index d5d8eb2d399b021118858d7581e75f739f110525..a26ab8cb263370b356de32e727a2b5449dc57429 100644 |
--- a/Source/core/html/ImageDocument.cpp |
+++ b/Source/core/html/ImageDocument.cpp |
@@ -130,6 +130,9 @@ void ImageDocumentParser::appendBytes(const char* data, size_t length) |
return; |
document()->cachedImage()->appendData(data, length); |
+ // Make sure the image renderer gets created because we need the renderer |
+ // to read the aspect ratio. See crbug.com/320244 |
+ document()->updateStyleIfNeeded(); |
document()->imageUpdated(); |
} |