| Index: Source/core/fetch/TextResourceDecoder.h
|
| diff --git a/Source/core/fetch/TextResourceDecoder.h b/Source/core/fetch/TextResourceDecoder.h
|
| index 14baa35edd29b99ba11644e30af9fe2fcd985427..3823c61904062d8c4fcb73b8a5a013a4c2d4dcdc 100644
|
| --- a/Source/core/fetch/TextResourceDecoder.h
|
| +++ b/Source/core/fetch/TextResourceDecoder.h
|
| @@ -52,16 +52,18 @@ public:
|
|
|
| void setEncoding(const WTF::TextEncoding&, EncodingSource);
|
| const WTF::TextEncoding& encoding() const { return m_encoding; }
|
| + bool encodingWasDetectedHeuristically() const
|
| + {
|
| + return m_source == AutoDetectedEncoding
|
| + || m_source == EncodingFromContentSniffing;
|
| + }
|
|
|
| String decode(const char* data, size_t length);
|
| String flush();
|
|
|
| - void setHintEncoding(const TextResourceDecoder* hintDecoder)
|
| + void setHintEncoding(const WTF::TextEncoding& encoding)
|
| {
|
| - // hintEncoding is for use with autodetection, which should be
|
| - // only invoked when hintEncoding comes from auto-detection.
|
| - if (hintDecoder && hintDecoder->wasDetectedHueristically())
|
| - m_hintEncoding = hintDecoder->encoding().name();
|
| + m_hintEncoding = encoding.name();
|
| }
|
|
|
| void useLenientXMLDecoding() { m_useLenientXMLDecoding = true; }
|
| @@ -74,8 +76,6 @@ private:
|
| static ContentType determineContentType(const String& mimeType);
|
| static const WTF::TextEncoding& defaultEncoding(ContentType, const WTF::TextEncoding& defaultEncoding);
|
|
|
| - bool wasDetectedHueristically() const { return m_source == AutoDetectedEncoding || m_source == EncodingFromContentSniffing; }
|
| -
|
| size_t checkForBOM(const char*, size_t);
|
| bool checkForCSSCharset(const char*, size_t, bool& movedDataToBuffer);
|
| bool checkForXMLCharset(const char*, size_t, bool& movedDataToBuffer);
|
|
|