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

Unified Diff: Source/core/dom/Document.h

Issue 22909053: Store the Document's encoding on the Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Set document encoding in DecodedDataDocumentParser instead of DocumentWriter Created 7 years, 4 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/core/dom/DecodedDataDocumentParser.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index a64d351294f47abb69d70340dbaef8a03d272bb9..57a151bb888083e2ff026ad54922ebcd668b597a 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -350,11 +350,11 @@ public:
String defaultCharset() const;
- String inputEncoding() const { return Document::encoding(); }
- String charset() const { return Document::encoding(); }
- String characterSet() const { return Document::encoding(); }
+ String inputEncoding() const { return Document::encodingName(); }
+ String charset() const { return Document::encodingName(); }
+ String characterSet() const { return Document::encodingName(); }
- String encoding() const;
+ String encodingName() const;
void setCharset(const String&);
@@ -890,6 +890,9 @@ public:
void setDecoder(PassRefPtr<TextResourceDecoder>);
TextResourceDecoder* decoder() const { return m_decoder.get(); }
+ void setEncoding(const WTF::TextEncoding&);
+ const WTF::TextEncoding& encoding() const { return m_encoding; }
+
String displayStringModifiedByEncoding(const String&) const;
PassRefPtr<StringImpl> displayStringModifiedByEncoding(PassRefPtr<StringImpl>) const;
void displayBufferModifiedByEncoding(LChar* buffer, unsigned len) const
@@ -1278,6 +1281,7 @@ private:
String m_contentLanguage;
RefPtr<TextResourceDecoder> m_decoder;
+ WTF::TextEncoding m_encoding;
InheritedBool m_designMode;
« no previous file with comments | « Source/core/dom/DecodedDataDocumentParser.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698