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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 class Element; 60 class Element;
61 class HTMLDocument; 61 class HTMLDocument;
62 class HTMLParserScheduler; 62 class HTMLParserScheduler;
63 class HTMLResourcePreloader; 63 class HTMLResourcePreloader;
64 class HTMLScriptRunner; 64 class HTMLScriptRunner;
65 class HTMLTreeBuilder; 65 class HTMLTreeBuilder;
66 class ParsedChunkQueue; 66 class ParsedChunkQueue;
67 class PumpSession; 67 class PumpSession;
68 68
69 class HTMLDocumentParser : public ScriptableDocumentParser, private HTMLScriptR unnerHost { 69 class HTMLDocumentParser : public ScriptableDocumentParser, private HTMLScriptR unnerHost {
70 USING_FAST_MALLOC_WILL_BE_REMOVED(HTMLDocumentParser); 70 USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser);
71 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser);
72 public: 71 public:
73 static PassRefPtrWillBeRawPtr<HTMLDocumentParser> create(HTMLDocument& docum ent, bool reportErrors, ParserSynchronizationPolicy backgroundParsingPolicy) 72 static RawPtr<HTMLDocumentParser> create(HTMLDocument& document, bool report Errors, ParserSynchronizationPolicy backgroundParsingPolicy)
74 { 73 {
75 return adoptRefWillBeNoop(new HTMLDocumentParser(document, reportErrors, backgroundParsingPolicy)); 74 return (new HTMLDocumentParser(document, reportErrors, backgroundParsing Policy));
76 } 75 }
77 ~HTMLDocumentParser() override; 76 ~HTMLDocumentParser() override;
78 DECLARE_VIRTUAL_TRACE(); 77 DECLARE_VIRTUAL_TRACE();
79 78
80 // Exposed for HTMLParserScheduler 79 // Exposed for HTMLParserScheduler
81 void resumeParsingAfterYield(); 80 void resumeParsingAfterYield();
82 81
83 static void parseDocumentFragment(const String&, DocumentFragment*, Element* contextElement, ParserContentPolicy = AllowScriptingContent); 82 static void parseDocumentFragment(const String&, DocumentFragment*, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
84 83
85 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } 84 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void finish() final; 117 void finish() final;
119 118
120 HTMLDocumentParser(HTMLDocument&, bool reportErrors, ParserSynchronizationPo licy); 119 HTMLDocumentParser(HTMLDocument&, bool reportErrors, ParserSynchronizationPo licy);
121 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent Policy); 120 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent Policy);
122 121
123 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } 122 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); }
124 123
125 void forcePlaintextForTextDocument(); 124 void forcePlaintextForTextDocument();
126 125
127 private: 126 private:
128 static PassRefPtrWillBeRawPtr<HTMLDocumentParser> create(DocumentFragment* f ragment, Element* contextElement, ParserContentPolicy parserContentPolicy) 127 static RawPtr<HTMLDocumentParser> create(DocumentFragment* fragment, Element * contextElement, ParserContentPolicy parserContentPolicy)
129 { 128 {
130 return adoptRefWillBeNoop(new HTMLDocumentParser(fragment, contextElemen t, parserContentPolicy)); 129 return (new HTMLDocumentParser(fragment, contextElement, parserContentPo licy));
131 } 130 }
132 131
133 // DocumentParser 132 // DocumentParser
134 void detach() final; 133 void detach() final;
135 bool hasInsertionPoint() final; 134 bool hasInsertionPoint() final;
136 bool processingData() const final; 135 bool processingData() const final;
137 void prepareToStopParsing() final; 136 void prepareToStopParsing() final;
138 void stopParsing() final; 137 void stopParsing() final;
139 bool isWaitingForScripts() const final; 138 bool isWaitingForScripts() const final;
140 bool isExecutingScript() const final; 139 bool isExecutingScript() const final;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 bool inPumpSession() const { return m_pumpSessionNestingLevel > 0; } 175 bool inPumpSession() const { return m_pumpSessionNestingLevel > 0; }
177 bool shouldDelayEnd() const { return inPumpSession() || isWaitingForScripts( ) || isScheduledForResume() || isExecutingScript(); } 176 bool shouldDelayEnd() const { return inPumpSession() || isWaitingForScripts( ) || isScheduledForResume() || isExecutingScript(); }
178 177
179 HTMLToken& token() { return *m_token; } 178 HTMLToken& token() { return *m_token; }
180 179
181 HTMLParserOptions m_options; 180 HTMLParserOptions m_options;
182 HTMLInputStream m_input; 181 HTMLInputStream m_input;
183 182
184 OwnPtr<HTMLToken> m_token; 183 OwnPtr<HTMLToken> m_token;
185 OwnPtr<HTMLTokenizer> m_tokenizer; 184 OwnPtr<HTMLTokenizer> m_tokenizer;
186 OwnPtrWillBeMember<HTMLScriptRunner> m_scriptRunner; 185 Member<HTMLScriptRunner> m_scriptRunner;
187 OwnPtrWillBeMember<HTMLTreeBuilder> m_treeBuilder; 186 Member<HTMLTreeBuilder> m_treeBuilder;
188 OwnPtr<HTMLPreloadScanner> m_preloadScanner; 187 OwnPtr<HTMLPreloadScanner> m_preloadScanner;
189 OwnPtr<HTMLPreloadScanner> m_insertionPreloadScanner; 188 OwnPtr<HTMLPreloadScanner> m_insertionPreloadScanner;
190 OwnPtr<WebTaskRunner> m_loadingTaskRunner; 189 OwnPtr<WebTaskRunner> m_loadingTaskRunner;
191 OwnPtrWillBeMember<HTMLParserScheduler> m_parserScheduler; 190 Member<HTMLParserScheduler> m_parserScheduler;
192 HTMLSourceTracker m_sourceTracker; 191 HTMLSourceTracker m_sourceTracker;
193 TextPosition m_textPosition; 192 TextPosition m_textPosition;
194 XSSAuditor m_xssAuditor; 193 XSSAuditor m_xssAuditor;
195 XSSAuditorDelegate m_xssAuditorDelegate; 194 XSSAuditorDelegate m_xssAuditorDelegate;
196 195
197 // FIXME: m_lastChunkBeforeScript, m_tokenizer, m_token, and m_input should be combined into a single state object 196 // FIXME: m_lastChunkBeforeScript, m_tokenizer, m_token, and m_input should be combined into a single state object
198 // so they can be set and cleared together and passed between threads togeth er. 197 // so they can be set and cleared together and passed between threads togeth er.
199 OwnPtr<ParsedChunk> m_lastChunkBeforeScript; 198 OwnPtr<ParsedChunk> m_lastChunkBeforeScript;
200 Deque<OwnPtr<ParsedChunk>> m_speculations; 199 Deque<OwnPtr<ParsedChunk>> m_speculations;
201 WeakPtrFactory<HTMLDocumentParser> m_weakFactory; 200 WeakPtrFactory<HTMLDocumentParser> m_weakFactory;
202 WeakPtr<BackgroundHTMLParser> m_backgroundParser; 201 WeakPtr<BackgroundHTMLParser> m_backgroundParser;
203 OwnPtrWillBeMember<HTMLResourcePreloader> m_preloader; 202 Member<HTMLResourcePreloader> m_preloader;
204 PreloadRequestStream m_queuedPreloads; 203 PreloadRequestStream m_queuedPreloads;
205 RefPtr<ParsedChunkQueue> m_parsedChunkQueue; 204 RefPtr<ParsedChunkQueue> m_parsedChunkQueue;
206 205
207 bool m_shouldUseThreading; 206 bool m_shouldUseThreading;
208 bool m_endWasDelayed; 207 bool m_endWasDelayed;
209 bool m_haveBackgroundParser; 208 bool m_haveBackgroundParser;
210 bool m_tasksWereSuspended; 209 bool m_tasksWereSuspended;
211 unsigned m_pumpSessionNestingLevel; 210 unsigned m_pumpSessionNestingLevel;
212 unsigned m_pumpSpeculationsSessionNestingLevel; 211 unsigned m_pumpSpeculationsSessionNestingLevel;
213 bool m_isParsingAtLineNumber; 212 bool m_isParsingAtLineNumber;
214 }; 213 };
215 214
216 } // namespace blink 215 } // namespace blink
217 216
218 #endif 217 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698