OLD | NEW |
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 11 matching lines...) Expand all Loading... |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef HTMLDocumentParser_h | 26 #ifndef HTMLDocumentParser_h |
27 #define HTMLDocumentParser_h | 27 #define HTMLDocumentParser_h |
28 | 28 |
29 #include "core/dom/ParserContentPolicy.h" | 29 #include "core/dom/ParserContentPolicy.h" |
30 #include "core/dom/ScriptableDocumentParser.h" | 30 #include "core/dom/ScriptableDocumentParser.h" |
31 #include "core/fetch/ResourceClient.h" | 31 #include "core/fetch/ResourceClient.h" |
| 32 #include "core/frame/UseCounter.h" |
32 #include "core/html/parser/BackgroundHTMLInputStream.h" | 33 #include "core/html/parser/BackgroundHTMLInputStream.h" |
33 #include "core/html/parser/CompactHTMLToken.h" | 34 #include "core/html/parser/CompactHTMLToken.h" |
34 #include "core/html/parser/HTMLInputStream.h" | 35 #include "core/html/parser/HTMLInputStream.h" |
35 #include "core/html/parser/HTMLParserOptions.h" | 36 #include "core/html/parser/HTMLParserOptions.h" |
36 #include "core/html/parser/HTMLPreloadScanner.h" | 37 #include "core/html/parser/HTMLPreloadScanner.h" |
37 #include "core/html/parser/HTMLScriptRunnerHost.h" | 38 #include "core/html/parser/HTMLScriptRunnerHost.h" |
38 #include "core/html/parser/HTMLSourceTracker.h" | 39 #include "core/html/parser/HTMLSourceTracker.h" |
39 #include "core/html/parser/HTMLToken.h" | 40 #include "core/html/parser/HTMLToken.h" |
40 #include "core/html/parser/HTMLTokenizer.h" | 41 #include "core/html/parser/HTMLTokenizer.h" |
41 #include "core/html/parser/HTMLTreeBuilderSimulator.h" | 42 #include "core/html/parser/HTMLTreeBuilderSimulator.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 OwnPtr<CompactHTMLTokenStream> tokens; | 90 OwnPtr<CompactHTMLTokenStream> tokens; |
90 PreloadRequestStream preloads; | 91 PreloadRequestStream preloads; |
91 XSSInfoStream xssInfos; | 92 XSSInfoStream xssInfos; |
92 HTMLTokenizer::State tokenizerState; | 93 HTMLTokenizer::State tokenizerState; |
93 HTMLTreeBuilderSimulator::State treeBuilderState; | 94 HTMLTreeBuilderSimulator::State treeBuilderState; |
94 HTMLInputCheckpoint inputCheckpoint; | 95 HTMLInputCheckpoint inputCheckpoint; |
95 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; | 96 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; |
96 }; | 97 }; |
97 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); | 98 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); |
98 | 99 |
| 100 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi
on()); } |
| 101 |
99 protected: | 102 protected: |
100 virtual void insert(const SegmentedString&) OVERRIDE; | 103 virtual void insert(const SegmentedString&) OVERRIDE; |
101 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; | 104 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; |
102 virtual void finish() OVERRIDE; | 105 virtual void finish() OVERRIDE; |
103 | 106 |
104 HTMLDocumentParser(HTMLDocument*, bool reportErrors); | 107 HTMLDocumentParser(HTMLDocument*, bool reportErrors); |
105 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent
Policy); | 108 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent
Policy); |
106 | 109 |
107 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } | 110 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } |
108 | 111 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 199 |
197 bool m_isPinnedToMainThread; | 200 bool m_isPinnedToMainThread; |
198 bool m_endWasDelayed; | 201 bool m_endWasDelayed; |
199 bool m_haveBackgroundParser; | 202 bool m_haveBackgroundParser; |
200 unsigned m_pumpSessionNestingLevel; | 203 unsigned m_pumpSessionNestingLevel; |
201 }; | 204 }; |
202 | 205 |
203 } | 206 } |
204 | 207 |
205 #endif | 208 #endif |
OLD | NEW |