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

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

Issue 14210003: Simplify CachedResource::data (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 7 years, 8 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 | « no previous file | Source/WebCore/loader/ResourceLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/ImageDocument.cpp
===================================================================
--- Source/WebCore/html/ImageDocument.cpp (revision 148397)
+++ Source/WebCore/html/ImageDocument.cpp (working copy)
@@ -135,7 +135,7 @@
return;
CachedImage* cachedImage = document()->cachedImage();
- cachedImage->data(frame->loader()->documentLoader()->mainResourceData(), false);
+ cachedImage->data(frame->loader()->documentLoader()->mainResourceData());
document()->imageUpdated();
}
@@ -144,14 +144,14 @@
{
if (!isStopped() && document()->imageElement()) {
CachedImage* cachedImage = document()->cachedImage();
- RefPtr<ResourceBuffer> data = document()->frame()->loader()->documentLoader()->mainResourceData();
// If this is a multipart image, make a copy of the current part, since the resource data
// will be overwritten by the next part.
- if (document()->frame()->loader()->documentLoader()->isLoadingMultipartContent())
- data = data->copy();
+ if (document()->frame()->loader()->documentLoader()->isLoadingMultipartContent()) {
+ RefPtr<ResourceBuffer> data = document()->frame()->loader()->documentLoader()->mainResourceData()->copy();
+ cachedImage->data(data);
+ }
- cachedImage->data(data.release(), true);
cachedImage->finish();
cachedImage->setResponse(document()->frame()->loader()->documentLoader()->response());
« no previous file with comments | « no previous file | Source/WebCore/loader/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698