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

Unified Diff: Source/core/loader/cache/CachedImage.cpp

Issue 14569024: Merge 149966 "Fix multipart images, regressed in r148560". (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1500/
Patch Set: Created 7 years, 7 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 | « Source/core/core.gypi ('k') | Source/core/tests/CachedImageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/cache/CachedImage.cpp
===================================================================
--- Source/core/loader/cache/CachedImage.cpp (revision 150342)
+++ Source/core/loader/cache/CachedImage.cpp (working copy)
@@ -377,7 +377,11 @@
void CachedImage::finishOnePart()
{
+ if (m_loadingMultipartContent)
+ clear();
updateImage(true);
+ if (m_loadingMultipartContent)
+ m_data.clear();
CachedResource::finishOnePart();
}
@@ -390,11 +394,9 @@
void CachedImage::responseReceived(const ResourceResponse& response)
{
- if (m_loadingMultipartContent) {
- if (m_data)
- finishOnePart();
- clear();
- } else if (response.isMultipart())
+ if (m_loadingMultipartContent && m_data)
+ finishOnePart();
+ else if (response.isMultipart())
m_loadingMultipartContent = true;
CachedResource::responseReceived(response);
}
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/tests/CachedImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698