Index: Source/core/dom/DecodedDataDocumentParser.cpp |
diff --git a/Source/core/dom/DecodedDataDocumentParser.cpp b/Source/core/dom/DecodedDataDocumentParser.cpp |
index 7ceaabe6d582fc797f5350d51b1ba5743c7f734d..1e4e06b7525ea222434e020f11ae34a4c23bb8c5 100644 |
--- a/Source/core/dom/DecodedDataDocumentParser.cpp |
+++ b/Source/core/dom/DecodedDataDocumentParser.cpp |
@@ -40,7 +40,7 @@ class TitleEncodingFixer { |
public: |
explicit TitleEncodingFixer(Document* document) |
: m_document(document) |
- , m_firstEncoding(document->decoder()->encoding()) |
+ , m_firstEncoding(document->encoding()) |
{ |
} |
@@ -52,7 +52,7 @@ public: |
// in the title bar. |
inline void fixTitleEncodingIfNeeded() |
{ |
- if (m_firstEncoding == m_document->decoder()->encoding()) |
+ if (m_firstEncoding == m_document->encoding()) |
return; // In the common case, the encoding doesn't change and there isn't any work to do. |
fixTitleEncoding(); |
} |
@@ -73,7 +73,7 @@ void TitleEncodingFixer::fixTitleEncoding() |
|| !titleElement->textContent().containsOnlyLatin1()) |
return; // Either we don't have a title yet or something bizzare as happened and we give up. |
CString originalBytes = titleElement->textContent().latin1(); |
- OwnPtr<TextCodec> codec = newTextCodec(m_document->decoder()->encoding()); |
+ OwnPtr<TextCodec> codec = newTextCodec(m_document->encoding()); |
String correctlyDecodedTitle = codec->decode(originalBytes.data(), originalBytes.length(), true); |
titleElement->setTextContent(correctlyDecodedTitle, IGNORE_EXCEPTION); |
} |