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

Unified Diff: Source/WebCore/loader/cache/CachedSVGDocument.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 | « Source/WebCore/loader/cache/CachedSVGDocument.h ('k') | Source/WebCore/loader/cache/CachedScript.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/loader/cache/CachedSVGDocument.cpp
===================================================================
--- Source/WebCore/loader/cache/CachedSVGDocument.cpp (revision 148397)
+++ Source/WebCore/loader/cache/CachedSVGDocument.cpp (working copy)
@@ -53,22 +53,17 @@
return m_decoder->encoding().name();
}
-void CachedSVGDocument::data(PassRefPtr<ResourceBuffer> data, bool allDataReceived)
+void CachedSVGDocument::checkNotify()
{
- if (!allDataReceived)
- return;
-
- if (data) {
+ if (m_data) {
StringBuilder decodedText;
- decodedText.append(m_decoder->decode(data->data(), data->size()));
+ decodedText.append(m_decoder->decode(m_data->data(), m_data->size()));
decodedText.append(m_decoder->flush());
// We don't need to create a new frame because the new document belongs to the parent UseElement.
m_document = SVGDocument::create(0, response().url());
m_document->setContent(decodedText.toString());
}
-
- setLoading(false);
- checkNotify();
+ CachedResource::checkNotify();
}
void CachedSVGDocument::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
« no previous file with comments | « Source/WebCore/loader/cache/CachedSVGDocument.h ('k') | Source/WebCore/loader/cache/CachedScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698