Index: third_party/WebKit/Source/core/fetch/DocumentResource.cpp |
diff --git a/third_party/WebKit/Source/core/fetch/DocumentResource.cpp b/third_party/WebKit/Source/core/fetch/DocumentResource.cpp |
index bd7a5481e39ad43afd30f37e19f43fb261ae83e0..f6b8b51e664bc1c2c67dc98fb619f533dc3d4a75 100644 |
--- a/third_party/WebKit/Source/core/fetch/DocumentResource.cpp |
+++ b/third_party/WebKit/Source/core/fetch/DocumentResource.cpp |
@@ -38,8 +38,7 @@ DocumentResource* DocumentResource::fetchSVGDocument(FetchRequest& request, Reso |
} |
DocumentResource::DocumentResource(const ResourceRequest& request, Type type, const ResourceLoaderOptions& options) |
- : Resource(request, type, options) |
- , m_decoder(TextResourceDecoder::create("application/xml")) |
+ : TextResource(request, type, options, "application/xml", String()) |
{ |
// FIXME: We'll support more types to support HTMLImports. |
ASSERT(type == SVGDocument); |
@@ -55,25 +54,12 @@ DEFINE_TRACE(DocumentResource) |
Resource::trace(visitor); |
} |
-void DocumentResource::setEncoding(const String& chs) |
-{ |
- m_decoder->setEncoding(chs, TextResourceDecoder::EncodingFromHTTPHeader); |
-} |
- |
-String DocumentResource::encoding() const |
-{ |
- return m_decoder->encoding().name(); |
-} |
- |
void DocumentResource::checkNotify() |
{ |
if (m_data && mimeTypeAllowed()) { |
- StringBuilder decodedText; |
- 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 = createDocument(response().url()); |
- m_document->setContent(decodedText.toString()); |
+ m_document->setContent(decodedText()); |
} |
Resource::checkNotify(); |
} |