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

Side by Side 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, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/DecodedDataDocumentParser.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY, 343 PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY,
344 unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsi gned leftPadding, 344 unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsi gned leftPadding,
345 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowShadowContent) const; 345 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowShadowContent) const;
346 Element* elementFromPoint(int x, int y) const; 346 Element* elementFromPoint(int x, int y) const;
347 PassRefPtr<Range> caretRangeFromPoint(int x, int y); 347 PassRefPtr<Range> caretRangeFromPoint(int x, int y);
348 348
349 String readyState() const; 349 String readyState() const;
350 350
351 String defaultCharset() const; 351 String defaultCharset() const;
352 352
353 String inputEncoding() const { return Document::encoding(); } 353 String inputEncoding() const { return Document::encodingName(); }
354 String charset() const { return Document::encoding(); } 354 String charset() const { return Document::encodingName(); }
355 String characterSet() const { return Document::encoding(); } 355 String characterSet() const { return Document::encodingName(); }
356 356
357 String encoding() const; 357 String encodingName() const;
358 358
359 void setCharset(const String&); 359 void setCharset(const String&);
360 360
361 void setContent(const String&); 361 void setContent(const String&);
362 362
363 String suggestedMIMEType() const; 363 String suggestedMIMEType() const;
364 364
365 String contentLanguage() const { return m_contentLanguage; } 365 String contentLanguage() const { return m_contentLanguage; }
366 void setContentLanguage(const String&); 366 void setContentLanguage(const String&);
367 367
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 void suspendScriptedAnimationControllerCallbacks(); 883 void suspendScriptedAnimationControllerCallbacks();
884 void resumeScriptedAnimationControllerCallbacks(); 884 void resumeScriptedAnimationControllerCallbacks();
885 885
886 void finishedParsing(); 886 void finishedParsing();
887 887
888 void documentWillBecomeInactive(); 888 void documentWillBecomeInactive();
889 889
890 void setDecoder(PassRefPtr<TextResourceDecoder>); 890 void setDecoder(PassRefPtr<TextResourceDecoder>);
891 TextResourceDecoder* decoder() const { return m_decoder.get(); } 891 TextResourceDecoder* decoder() const { return m_decoder.get(); }
892 892
893 void setEncoding(const WTF::TextEncoding&);
894 const WTF::TextEncoding& encoding() const { return m_encoding; }
895
893 String displayStringModifiedByEncoding(const String&) const; 896 String displayStringModifiedByEncoding(const String&) const;
894 PassRefPtr<StringImpl> displayStringModifiedByEncoding(PassRefPtr<StringImpl >) const; 897 PassRefPtr<StringImpl> displayStringModifiedByEncoding(PassRefPtr<StringImpl >) const;
895 void displayBufferModifiedByEncoding(LChar* buffer, unsigned len) const 898 void displayBufferModifiedByEncoding(LChar* buffer, unsigned len) const
896 { 899 {
897 displayBufferModifiedByEncodingInternal(buffer, len); 900 displayBufferModifiedByEncodingInternal(buffer, len);
898 } 901 }
899 void displayBufferModifiedByEncoding(UChar* buffer, unsigned len) const 902 void displayBufferModifiedByEncoding(UChar* buffer, unsigned len) const
900 { 903 {
901 displayBufferModifiedByEncodingInternal(buffer, len); 904 displayBufferModifiedByEncodingInternal(buffer, len);
902 } 905 }
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 RefPtr<Document> m_transformSourceDocument; 1274 RefPtr<Document> m_transformSourceDocument;
1272 1275
1273 String m_xmlEncoding; 1276 String m_xmlEncoding;
1274 String m_xmlVersion; 1277 String m_xmlVersion;
1275 unsigned m_xmlStandalone : 2; 1278 unsigned m_xmlStandalone : 2;
1276 unsigned m_hasXMLDeclaration : 1; 1279 unsigned m_hasXMLDeclaration : 1;
1277 1280
1278 String m_contentLanguage; 1281 String m_contentLanguage;
1279 1282
1280 RefPtr<TextResourceDecoder> m_decoder; 1283 RefPtr<TextResourceDecoder> m_decoder;
1284 WTF::TextEncoding m_encoding;
1281 1285
1282 InheritedBool m_designMode; 1286 InheritedBool m_designMode;
1283 1287
1284 HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument; 1288 HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument;
1285 unsigned m_nodeListCounts[numNodeListInvalidationTypes]; 1289 unsigned m_nodeListCounts[numNodeListInvalidationTypes];
1286 1290
1287 OwnPtr<SVGDocumentExtensions> m_svgExtensions; 1291 OwnPtr<SVGDocumentExtensions> m_svgExtensions;
1288 1292
1289 Vector<AnnotatedRegionValue> m_annotatedRegions; 1293 Vector<AnnotatedRegionValue> m_annotatedRegions;
1290 bool m_hasAnnotatedRegions; 1294 bool m_hasAnnotatedRegions;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 inline bool Node::isDocumentNode() const 1428 inline bool Node::isDocumentNode() const
1425 { 1429 {
1426 return this == documentInternal(); 1430 return this == documentInternal();
1427 } 1431 }
1428 1432
1429 Node* eventTargetNodeForDocument(Document*); 1433 Node* eventTargetNodeForDocument(Document*);
1430 1434
1431 } // namespace WebCore 1435 } // namespace WebCore
1432 1436
1433 #endif // Document_h 1437 #endif // Document_h
OLDNEW
« 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