Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(767)

Unified Diff: Source/core/html/ImageDocument.cpp

Issue 136823005: Fix distorted image issue when open some images in a new browser window. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: expand the comment Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698