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

Side by Side Diff: Source/core/dom/Document.h

Issue 23455024: Move ownership of the TextResourceDecoder to DecodedDataDocumentParser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 1 month 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 class SelectorQueryCache; 145 class SelectorQueryCache;
146 class SerializedScriptValue; 146 class SerializedScriptValue;
147 class Settings; 147 class Settings;
148 class StyleEngine; 148 class StyleEngine;
149 class StyleResolver; 149 class StyleResolver;
150 class StyleSheet; 150 class StyleSheet;
151 class StyleSheetContents; 151 class StyleSheetContents;
152 class StyleSheetList; 152 class StyleSheetList;
153 class Text; 153 class Text;
154 class TextAutosizer; 154 class TextAutosizer;
155 class TextResourceDecoder;
156 class Touch; 155 class Touch;
157 class TouchList; 156 class TouchList;
158 class TransformSource; 157 class TransformSource;
159 class TreeWalker; 158 class TreeWalker;
160 class VisitedLinkState; 159 class VisitedLinkState;
161 class XMLHttpRequest; 160 class XMLHttpRequest;
162 161
163 struct AnnotatedRegionValue; 162 struct AnnotatedRegionValue;
164 163
165 class FontFaceSet; 164 class FontFaceSet;
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 bool isDNSPrefetchEnabled() const { return m_isDNSPrefetchEnabled; } 832 bool isDNSPrefetchEnabled() const { return m_isDNSPrefetchEnabled; }
834 void parseDNSPrefetchControlHeader(const String&); 833 void parseDNSPrefetchControlHeader(const String&);
835 834
836 virtual void postTask(PassOwnPtr<ExecutionContextTask>); // Executes the tas k on context's thread asynchronously. 835 virtual void postTask(PassOwnPtr<ExecutionContextTask>); // Executes the tas k on context's thread asynchronously.
837 836
838 void suspendScriptedAnimationControllerCallbacks(); 837 void suspendScriptedAnimationControllerCallbacks();
839 void resumeScriptedAnimationControllerCallbacks(); 838 void resumeScriptedAnimationControllerCallbacks();
840 839
841 void finishedParsing(); 840 void finishedParsing();
842 841
843 void setDecoder(PassRefPtr<TextResourceDecoder>); 842 struct DocumentEncodingData {
844 TextResourceDecoder* decoder() const { return m_decoder.get(); } 843 DocumentEncodingData();
845 844
846 void setEncoding(const WTF::TextEncoding&); 845 WTF::TextEncoding encoding;
847 const WTF::TextEncoding& encoding() const { return m_encoding; } 846 bool wasDetectedHeuristically;
847 bool sawDecodingError;
848 };
849
850 void setEncoding(DocumentEncodingData);
851 const WTF::TextEncoding& encoding() const { return m_encodingData.encoding; }
852
853 bool encodingWasDetectedHeuristically() const { return m_encodingData.wasDet ectedHeuristically; }
854 bool sawDecodingError() const { return m_encodingData.sawDecodingError; }
848 855
849 void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; } 856 void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; }
850 bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; } 857 bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; }
851 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; } 858 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; }
852 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; } 859 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; }
853 const Vector<AnnotatedRegionValue>& annotatedRegions() const; 860 const Vector<AnnotatedRegionValue>& annotatedRegions() const;
854 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&); 861 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&);
855 862
856 virtual void removeAllEventListeners(); 863 virtual void removeAllEventListeners();
857 864
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 OwnPtr<TransformSource> m_transformSource; 1229 OwnPtr<TransformSource> m_transformSource;
1223 RefPtr<Document> m_transformSourceDocument; 1230 RefPtr<Document> m_transformSourceDocument;
1224 1231
1225 String m_xmlEncoding; 1232 String m_xmlEncoding;
1226 String m_xmlVersion; 1233 String m_xmlVersion;
1227 unsigned m_xmlStandalone : 2; 1234 unsigned m_xmlStandalone : 2;
1228 unsigned m_hasXMLDeclaration : 1; 1235 unsigned m_hasXMLDeclaration : 1;
1229 1236
1230 String m_contentLanguage; 1237 String m_contentLanguage;
1231 1238
1232 RefPtr<TextResourceDecoder> m_decoder; 1239 DocumentEncodingData m_encodingData;
1233 WTF::TextEncoding m_encoding;
1234 1240
1235 InheritedBool m_designMode; 1241 InheritedBool m_designMode;
1236 1242
1237 HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument; 1243 HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument;
1238 unsigned m_nodeListCounts[numNodeListInvalidationTypes]; 1244 unsigned m_nodeListCounts[numNodeListInvalidationTypes];
1239 1245
1240 OwnPtr<SVGDocumentExtensions> m_svgExtensions; 1246 OwnPtr<SVGDocumentExtensions> m_svgExtensions;
1241 1247
1242 Vector<AnnotatedRegionValue> m_annotatedRegions; 1248 Vector<AnnotatedRegionValue> m_annotatedRegions;
1243 bool m_hasAnnotatedRegions; 1249 bool m_hasAnnotatedRegions;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 inline bool Node::isDocumentNode() const 1385 inline bool Node::isDocumentNode() const
1380 { 1386 {
1381 return this == documentInternal(); 1387 return this == documentInternal();
1382 } 1388 }
1383 1389
1384 Node* eventTargetNodeForDocument(Document*); 1390 Node* eventTargetNodeForDocument(Document*);
1385 1391
1386 } // namespace WebCore 1392 } // namespace WebCore
1387 1393
1388 #endif // Document_h 1394 #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