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

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: Review fixes 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
« 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 13 matching lines...) Expand all
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 * 25 *
26 */ 26 */
27 27
28 #ifndef Document_h 28 #ifndef Document_h
29 #define Document_h 29 #define Document_h
30 30
31 #include "bindings/v8/ScriptValue.h" 31 #include "bindings/v8/ScriptValue.h"
32 #include "core/dom/ContainerNode.h" 32 #include "core/dom/ContainerNode.h"
33 #include "core/dom/DOMTimeStamp.h" 33 #include "core/dom/DOMTimeStamp.h"
34 #include "core/dom/DocumentEncodingData.h"
34 #include "core/dom/DocumentInit.h" 35 #include "core/dom/DocumentInit.h"
35 #include "core/dom/DocumentLifecycle.h" 36 #include "core/dom/DocumentLifecycle.h"
36 #include "core/dom/DocumentSupplementable.h" 37 #include "core/dom/DocumentSupplementable.h"
37 #include "core/dom/DocumentTiming.h" 38 #include "core/dom/DocumentTiming.h"
38 #include "core/dom/ExecutionContext.h" 39 #include "core/dom/ExecutionContext.h"
39 #include "core/dom/IconURL.h" 40 #include "core/dom/IconURL.h"
40 #include "core/dom/MutationObserver.h" 41 #include "core/dom/MutationObserver.h"
41 #include "core/dom/QualifiedName.h" 42 #include "core/dom/QualifiedName.h"
42 #include "core/dom/TextLinkColors.h" 43 #include "core/dom/TextLinkColors.h"
43 #include "core/dom/TreeScope.h" 44 #include "core/dom/TreeScope.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 class SelectorQueryCache; 147 class SelectorQueryCache;
147 class SerializedScriptValue; 148 class SerializedScriptValue;
148 class Settings; 149 class Settings;
149 class StyleEngine; 150 class StyleEngine;
150 class StyleResolver; 151 class StyleResolver;
151 class StyleSheet; 152 class StyleSheet;
152 class StyleSheetContents; 153 class StyleSheetContents;
153 class StyleSheetList; 154 class StyleSheetList;
154 class Text; 155 class Text;
155 class TextAutosizer; 156 class TextAutosizer;
156 class TextResourceDecoder;
157 class Touch; 157 class Touch;
158 class TouchList; 158 class TouchList;
159 class TransformSource; 159 class TransformSource;
160 class TreeWalker; 160 class TreeWalker;
161 class VisitedLinkState; 161 class VisitedLinkState;
162 class XMLHttpRequest; 162 class XMLHttpRequest;
163 163
164 struct AnnotatedRegionValue; 164 struct AnnotatedRegionValue;
165 165
166 class FontFaceSet; 166 class FontFaceSet;
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE; // Execute s the task on context's thread asynchronously. 842 virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE; // Execute s the task on context's thread asynchronously.
843 843
844 virtual void tasksWereSuspended() OVERRIDE; 844 virtual void tasksWereSuspended() OVERRIDE;
845 virtual void tasksWereResumed() OVERRIDE; 845 virtual void tasksWereResumed() OVERRIDE;
846 virtual void suspendScheduledTasks() OVERRIDE; 846 virtual void suspendScheduledTasks() OVERRIDE;
847 virtual void resumeScheduledTasks() OVERRIDE; 847 virtual void resumeScheduledTasks() OVERRIDE;
848 virtual bool tasksNeedSuspension() OVERRIDE; 848 virtual bool tasksNeedSuspension() OVERRIDE;
849 849
850 void finishedParsing(); 850 void finishedParsing();
851 851
852 void setDecoder(PassRefPtr<TextResourceDecoder>); 852 void setEncodingData(const DocumentEncodingData& newData);
853 TextResourceDecoder* decoder() const { return m_decoder.get(); } 853 const WTF::TextEncoding& encoding() const { return m_encodingData.encoding; }
854 854
855 void setEncoding(const WTF::TextEncoding&); 855 bool encodingWasDetectedHeuristically() const { return m_encodingData.wasDet ectedHeuristically; }
856 const WTF::TextEncoding& encoding() const { return m_encoding; } 856 bool sawDecodingError() const { return m_encodingData.sawDecodingError; }
857 857
858 void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; } 858 void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; }
859 bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; } 859 bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; }
860 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; } 860 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; }
861 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; } 861 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; }
862 const Vector<AnnotatedRegionValue>& annotatedRegions() const; 862 const Vector<AnnotatedRegionValue>& annotatedRegions() const;
863 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&); 863 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&);
864 864
865 virtual void removeAllEventListeners(); 865 virtual void removeAllEventListeners();
866 866
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 OwnPtr<TransformSource> m_transformSource; 1224 OwnPtr<TransformSource> m_transformSource;
1225 RefPtr<Document> m_transformSourceDocument; 1225 RefPtr<Document> m_transformSourceDocument;
1226 1226
1227 String m_xmlEncoding; 1227 String m_xmlEncoding;
1228 String m_xmlVersion; 1228 String m_xmlVersion;
1229 unsigned m_xmlStandalone : 2; 1229 unsigned m_xmlStandalone : 2;
1230 unsigned m_hasXMLDeclaration : 1; 1230 unsigned m_hasXMLDeclaration : 1;
1231 1231
1232 String m_contentLanguage; 1232 String m_contentLanguage;
1233 1233
1234 RefPtr<TextResourceDecoder> m_decoder; 1234 DocumentEncodingData m_encodingData;
1235 WTF::TextEncoding m_encoding;
1236 1235
1237 InheritedBool m_designMode; 1236 InheritedBool m_designMode;
1238 1237
1239 HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument; 1238 HashSet<LiveNodeListBase*> m_listsInvalidatedAtDocument;
1240 unsigned m_nodeListCounts[numNodeListInvalidationTypes]; 1239 unsigned m_nodeListCounts[numNodeListInvalidationTypes];
1241 1240
1242 OwnPtr<SVGDocumentExtensions> m_svgExtensions; 1241 OwnPtr<SVGDocumentExtensions> m_svgExtensions;
1243 1242
1244 Vector<AnnotatedRegionValue> m_annotatedRegions; 1243 Vector<AnnotatedRegionValue> m_annotatedRegions;
1245 bool m_hasAnnotatedRegions; 1244 bool m_hasAnnotatedRegions;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 inline bool Node::isDocumentNode() const 1375 inline bool Node::isDocumentNode() const
1377 { 1376 {
1378 return this == documentInternal(); 1377 return this == documentInternal();
1379 } 1378 }
1380 1379
1381 Node* eventTargetNodeForDocument(Document*); 1380 Node* eventTargetNodeForDocument(Document*);
1382 1381
1383 } // namespace WebCore 1382 } // namespace WebCore
1384 1383
1385 #endif // Document_h 1384 #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