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

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

Issue 69823002: Move ownership of the TextResourceDecoder to DecodedDataDocumentParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 bool isDNSPrefetchEnabled() const { return m_isDNSPrefetchEnabled; } 833 bool isDNSPrefetchEnabled() const { return m_isDNSPrefetchEnabled; }
835 void parseDNSPrefetchControlHeader(const String&); 834 void parseDNSPrefetchControlHeader(const String&);
836 835
837 virtual void postTask(PassOwnPtr<ExecutionContextTask>); // Executes the tas k on context's thread asynchronously. 836 virtual void postTask(PassOwnPtr<ExecutionContextTask>); // Executes the tas k on context's thread asynchronously.
838 837
839 void suspendScriptedAnimationControllerCallbacks(); 838 void suspendScriptedAnimationControllerCallbacks();
840 void resumeScriptedAnimationControllerCallbacks(); 839 void resumeScriptedAnimationControllerCallbacks();
841 840
842 void finishedParsing(); 841 void finishedParsing();
843 842
844 void setDecoder(PassRefPtr<TextResourceDecoder>); 843 struct DocumentEncodingData {
845 TextResourceDecoder* decoder() const { return m_decoder.get(); } 844 DocumentEncodingData();
846 845
847 void setEncoding(const WTF::TextEncoding&); 846 WTF::TextEncoding encoding;
848 const WTF::TextEncoding& encoding() const { return m_encoding; } 847 bool wasDetectedHeuristically;
848 bool sawDecodingError;
849 };
850
851 void setEncodingData(const DocumentEncodingData& newData);
852 const DocumentEncodingData& encodingData() const { return m_encodingData; }
853 const WTF::TextEncoding& encoding() const { return m_encodingData.encoding; }
854
855 bool encodingWasDetectedHeuristically() const { return m_encodingData.wasDet ectedHeuristically; }
856 bool sawDecodingError() const { return m_encodingData.sawDecodingError; }
849 857
850 void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; } 858 void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; }
851 bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; } 859 bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; }
852 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; } 860 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; }
853 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; } 861 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; }
854 const Vector<AnnotatedRegionValue>& annotatedRegions() const; 862 const Vector<AnnotatedRegionValue>& annotatedRegions() const;
855 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&); 863 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&);
856 864
857 virtual void removeAllEventListeners(); 865 virtual void removeAllEventListeners();
858 866
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 OwnPtr<TransformSource> m_transformSource; 1232 OwnPtr<TransformSource> m_transformSource;
1225 RefPtr<Document> m_transformSourceDocument; 1233 RefPtr<Document> m_transformSourceDocument;
1226 1234
1227 String m_xmlEncoding; 1235 String m_xmlEncoding;
1228 String m_xmlVersion; 1236 String m_xmlVersion;
1229 unsigned m_xmlStandalone : 2; 1237 unsigned m_xmlStandalone : 2;
1230 unsigned m_hasXMLDeclaration : 1; 1238 unsigned m_hasXMLDeclaration : 1;
1231 1239
1232 String m_contentLanguage; 1240 String m_contentLanguage;
1233 1241
1234 RefPtr<TextResourceDecoder> m_decoder; 1242 DocumentEncodingData m_encodingData;
1235 WTF::TextEncoding m_encoding;
1236 1243
1237 InheritedBool m_designMode; 1244 InheritedBool m_designMode;
1238 1245
1239 HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument; 1246 HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument;
1240 unsigned m_nodeListCounts[numNodeListInvalidationTypes]; 1247 unsigned m_nodeListCounts[numNodeListInvalidationTypes];
1241 1248
1242 OwnPtr<SVGDocumentExtensions> m_svgExtensions; 1249 OwnPtr<SVGDocumentExtensions> m_svgExtensions;
1243 1250
1244 Vector<AnnotatedRegionValue> m_annotatedRegions; 1251 Vector<AnnotatedRegionValue> m_annotatedRegions;
1245 bool m_hasAnnotatedRegions; 1252 bool m_hasAnnotatedRegions;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 inline bool Node::isDocumentNode() const 1388 inline bool Node::isDocumentNode() const
1382 { 1389 {
1383 return this == documentInternal(); 1390 return this == documentInternal();
1384 } 1391 }
1385 1392
1386 Node* eventTargetNodeForDocument(Document*); 1393 Node* eventTargetNodeForDocument(Document*);
1387 1394
1388 } // namespace WebCore 1395 } // namespace WebCore
1389 1396
1390 #endif // Document_h 1397 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698