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

Unified Diff: third_party/WebKit/WebCore/loader/TextResourceDecoder.cpp

Issue 39293: WebKit merge 41447:41498 [third_party/WebKit] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove CRLF Created 11 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: third_party/WebKit/WebCore/loader/TextResourceDecoder.cpp
===================================================================
--- third_party/WebKit/WebCore/loader/TextResourceDecoder.cpp (revision 11154)
+++ third_party/WebKit/WebCore/loader/TextResourceDecoder.cpp (working copy)
@@ -331,6 +331,7 @@
, m_checkedForBOM(false)
, m_checkedForCSSCharset(false)
, m_checkedForHeadCharset(false)
+ , m_useLenientXMLDecoding(false)
, m_sawError(false)
, m_usesEncodingDetector(usesEncodingDetector)
{
@@ -874,14 +875,14 @@
memcpy(m_buffer.data() + oldSize, data, len);
}
- String result = m_decoder.decode(m_buffer.data(), m_buffer.size(), false, m_contentType == XML, m_sawError);
+ String result = m_decoder.decode(m_buffer.data(), m_buffer.size(), false, m_contentType == XML && !m_useLenientXMLDecoding, m_sawError);
m_buffer.clear();
return result;
}
String TextResourceDecoder::flush()
{
- // For HTML and XML document, if we can not find proper encoding even
+ String result = m_decoder.decode(m_buffer.data(), m_buffer.size(), true, m_contentType == XML && !m_useLenientXMLDecoding, m_sawError);
// document is completely loaded, we need to use automatically detect
// the encoding of document if user has enabled this option.
if (m_buffer.size() && !m_checkedForHeadCharset &&
@@ -891,7 +892,6 @@
m_hintDecoder->source() == AutoDetectedEncoding)))
detectEncoding(m_buffer.data(), m_buffer.size());
- String result = m_decoder.decode(m_buffer.data(), m_buffer.size(), true, m_contentType == XML, m_sawError);
m_buffer.clear();
m_decoder.reset(m_decoder.encoding());
return result;
« no previous file with comments | « third_party/WebKit/WebCore/loader/TextResourceDecoder.h ('k') | third_party/WebKit/WebCore/page/EditorClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698