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

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

Issue 2200613002: The HTML parser synchronously creates custom elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bring patch to head. Created 4 years, 4 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 17 matching lines...) Expand all
28 28
29 #include "bindings/core/v8/DocumentWriteEvaluator.h" 29 #include "bindings/core/v8/DocumentWriteEvaluator.h"
30 #include "core/dom/ParserContentPolicy.h" 30 #include "core/dom/ParserContentPolicy.h"
31 #include "core/dom/ScriptableDocumentParser.h" 31 #include "core/dom/ScriptableDocumentParser.h"
32 #include "core/fetch/ResourceClient.h" 32 #include "core/fetch/ResourceClient.h"
33 #include "core/frame/UseCounter.h" 33 #include "core/frame/UseCounter.h"
34 #include "core/html/parser/BackgroundHTMLInputStream.h" 34 #include "core/html/parser/BackgroundHTMLInputStream.h"
35 #include "core/html/parser/CompactHTMLToken.h" 35 #include "core/html/parser/CompactHTMLToken.h"
36 #include "core/html/parser/HTMLInputStream.h" 36 #include "core/html/parser/HTMLInputStream.h"
37 #include "core/html/parser/HTMLParserOptions.h" 37 #include "core/html/parser/HTMLParserOptions.h"
38 #include "core/html/parser/HTMLParserReentryPermit.h"
38 #include "core/html/parser/HTMLPreloadScanner.h" 39 #include "core/html/parser/HTMLPreloadScanner.h"
39 #include "core/html/parser/HTMLScriptRunnerHost.h" 40 #include "core/html/parser/HTMLScriptRunnerHost.h"
40 #include "core/html/parser/HTMLSourceTracker.h" 41 #include "core/html/parser/HTMLSourceTracker.h"
41 #include "core/html/parser/HTMLToken.h" 42 #include "core/html/parser/HTMLToken.h"
42 #include "core/html/parser/HTMLTokenizer.h" 43 #include "core/html/parser/HTMLTokenizer.h"
43 #include "core/html/parser/HTMLTreeBuilderSimulator.h" 44 #include "core/html/parser/HTMLTreeBuilderSimulator.h"
44 #include "core/html/parser/ParserSynchronizationPolicy.h" 45 #include "core/html/parser/ParserSynchronizationPolicy.h"
45 #include "core/html/parser/TextResourceDecoder.h" 46 #include "core/html/parser/TextResourceDecoder.h"
46 #include "core/html/parser/XSSAuditor.h" 47 #include "core/html/parser/XSSAuditor.h"
47 #include "core/html/parser/XSSAuditorDelegate.h" 48 #include "core/html/parser/XSSAuditorDelegate.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 89
89 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } 90 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); }
90 91
91 TextPosition textPosition() const final; 92 TextPosition textPosition() const final;
92 bool isParsingAtLineNumber() const final; 93 bool isParsingAtLineNumber() const final;
93 OrdinalNumber lineNumber() const final; 94 OrdinalNumber lineNumber() const final;
94 95
95 void suspendScheduledTasks() final; 96 void suspendScheduledTasks() final;
96 void resumeScheduledTasks() final; 97 void resumeScheduledTasks() final;
97 98
99 HTMLParserReentryPermit* reentryPermit() { return m_reentryPermit; }
100
98 struct TokenizedChunk { 101 struct TokenizedChunk {
99 USING_FAST_MALLOC(TokenizedChunk); 102 USING_FAST_MALLOC(TokenizedChunk);
100 public: 103 public:
101 std::unique_ptr<CompactHTMLTokenStream> tokens; 104 std::unique_ptr<CompactHTMLTokenStream> tokens;
102 PreloadRequestStream preloads; 105 PreloadRequestStream preloads;
103 ViewportDescriptionWrapper viewport; 106 ViewportDescriptionWrapper viewport;
104 XSSInfoStream xssInfos; 107 XSSInfoStream xssInfos;
105 HTMLTokenizer::State tokenizerState; 108 HTMLTokenizer::State tokenizerState;
106 HTMLTreeBuilderSimulator::State treeBuilderState; 109 HTMLTreeBuilderSimulator::State treeBuilderState;
107 HTMLInputCheckpoint inputCheckpoint; 110 HTMLInputCheckpoint inputCheckpoint;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // with the given parameters. Note, this method is completely temporary 200 // with the given parameters. Note, this method is completely temporary
198 // as we need to maintain both threading implementations until the 201 // as we need to maintain both threading implementations until the
199 // ParseHTMLOnMainThread experiment finishes. 202 // ParseHTMLOnMainThread experiment finishes.
200 template <typename FunctionType, typename... Ps> 203 template <typename FunctionType, typename... Ps>
201 void postTaskToLookaheadParser(LookaheadParserTaskSynchrony synchronyPolicy, FunctionType, Ps&&... parameters); 204 void postTaskToLookaheadParser(LookaheadParserTaskSynchrony synchronyPolicy, FunctionType, Ps&&... parameters);
202 205
203 HTMLToken& token() { return *m_token; } 206 HTMLToken& token() { return *m_token; }
204 207
205 HTMLParserOptions m_options; 208 HTMLParserOptions m_options;
206 HTMLInputStream m_input; 209 HTMLInputStream m_input;
210 Member<HTMLParserReentryPermit> m_reentryPermit;
207 211
208 std::unique_ptr<HTMLToken> m_token; 212 std::unique_ptr<HTMLToken> m_token;
209 std::unique_ptr<HTMLTokenizer> m_tokenizer; 213 std::unique_ptr<HTMLTokenizer> m_tokenizer;
210 Member<HTMLScriptRunner> m_scriptRunner; 214 Member<HTMLScriptRunner> m_scriptRunner;
211 Member<HTMLTreeBuilder> m_treeBuilder; 215 Member<HTMLTreeBuilder> m_treeBuilder;
212 std::unique_ptr<HTMLPreloadScanner> m_preloadScanner; 216 std::unique_ptr<HTMLPreloadScanner> m_preloadScanner;
213 std::unique_ptr<HTMLPreloadScanner> m_insertionPreloadScanner; 217 std::unique_ptr<HTMLPreloadScanner> m_insertionPreloadScanner;
214 std::unique_ptr<WebTaskRunner> m_loadingTaskRunner; 218 std::unique_ptr<WebTaskRunner> m_loadingTaskRunner;
215 Member<HTMLParserScheduler> m_parserScheduler; 219 Member<HTMLParserScheduler> m_parserScheduler;
216 HTMLSourceTracker m_sourceTracker; 220 HTMLSourceTracker m_sourceTracker;
(...skipping 19 matching lines...) Expand all
236 bool m_tasksWereSuspended; 240 bool m_tasksWereSuspended;
237 unsigned m_pumpSessionNestingLevel; 241 unsigned m_pumpSessionNestingLevel;
238 unsigned m_pumpSpeculationsSessionNestingLevel; 242 unsigned m_pumpSpeculationsSessionNestingLevel;
239 bool m_isParsingAtLineNumber; 243 bool m_isParsingAtLineNumber;
240 bool m_triedLoadingLinkHeaders; 244 bool m_triedLoadingLinkHeaders;
241 }; 245 };
242 246
243 } // namespace blink 247 } // namespace blink
244 248
245 #endif 249 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698