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

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: create renderer to get correct size 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
Index: Source/core/html/ImageDocument.cpp
diff --git a/Source/core/html/ImageDocument.cpp b/Source/core/html/ImageDocument.cpp
index d5d8eb2d399b021118858d7581e75f739f110525..8fe158a0a3761be9f1285ad424435f44ecbc8b57 100644
--- a/Source/core/html/ImageDocument.cpp
+++ b/Source/core/html/ImageDocument.cpp
@@ -130,6 +130,8 @@ void ImageDocumentParser::appendBytes(const char* data, size_t length)
return;
document()->cachedImage()->appendData(data, length);
+ if (!document()->imageElement()->renderer())
+ document()->updateStyleIfNeeded();
esprehn 2014/02/19 02:13:02 Remove the if statement, just call updateStyleIfNe
document()->imageUpdated();
}

Powered by Google App Engine
This is Rietveld 408576698