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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 class HTMLTreeBuilder; | 60 class HTMLTreeBuilder; |
61 class HTMLResourcePreloader; | 61 class HTMLResourcePreloader; |
62 class ScriptController; | 62 class ScriptController; |
63 class ScriptSourceCode; | 63 class ScriptSourceCode; |
64 | 64 |
65 class PumpSession; | 65 class PumpSession; |
66 | 66 |
67 class HTMLDocumentParser : public ScriptableDocumentParser, HTMLScriptRunnerHos
t, CachedResourceClient { | 67 class HTMLDocumentParser : public ScriptableDocumentParser, HTMLScriptRunnerHos
t, CachedResourceClient { |
68 WTF_MAKE_FAST_ALLOCATED; | 68 WTF_MAKE_FAST_ALLOCATED; |
69 public: | 69 public: |
70 static PassRefPtr<HTMLDocumentParser> create(HTMLDocument* document, bool re
portErrors) | 70 static PassRefPtr<HTMLDocumentParser> create(Document* document, bool report
Errors) |
71 { | 71 { |
72 return adoptRef(new HTMLDocumentParser(document, reportErrors)); | 72 return adoptRef(new HTMLDocumentParser(document, reportErrors)); |
73 } | 73 } |
74 virtual ~HTMLDocumentParser(); | 74 virtual ~HTMLDocumentParser(); |
75 | 75 |
76 // Exposed for HTMLParserScheduler | 76 // Exposed for HTMLParserScheduler |
77 void resumeParsingAfterYield(); | 77 void resumeParsingAfterYield(); |
78 | 78 |
79 static void parseDocumentFragment(const String&, DocumentFragment*, Element*
contextElement, ParserContentPolicy = AllowScriptingContent); | 79 static void parseDocumentFragment(const String&, DocumentFragment*, Element*
contextElement, ParserContentPolicy = AllowScriptingContent); |
80 | 80 |
(...skipping 14 matching lines...) Expand all Loading... |
95 HTMLInputCheckpoint inputCheckpoint; | 95 HTMLInputCheckpoint inputCheckpoint; |
96 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; | 96 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; |
97 }; | 97 }; |
98 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); | 98 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); |
99 | 99 |
100 protected: | 100 protected: |
101 virtual void insert(const SegmentedString&) OVERRIDE; | 101 virtual void insert(const SegmentedString&) OVERRIDE; |
102 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; | 102 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; |
103 virtual void finish() OVERRIDE; | 103 virtual void finish() OVERRIDE; |
104 | 104 |
105 HTMLDocumentParser(HTMLDocument*, bool reportErrors); | 105 HTMLDocumentParser(Document*, bool reportErrors); |
106 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent
Policy); | 106 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent
Policy); |
107 | 107 |
108 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } | 108 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } |
109 | 109 |
110 void forcePlaintextForTextDocument(); | 110 void forcePlaintextForTextDocument(); |
111 | 111 |
112 private: | 112 private: |
113 static PassRefPtr<HTMLDocumentParser> create(DocumentFragment* fragment, Ele
ment* contextElement, ParserContentPolicy parserContentPolicy) | 113 static PassRefPtr<HTMLDocumentParser> create(DocumentFragment* fragment, Ele
ment* contextElement, ParserContentPolicy parserContentPolicy) |
114 { | 114 { |
115 return adoptRef(new HTMLDocumentParser(fragment, contextElement, parserC
ontentPolicy)); | 115 return adoptRef(new HTMLDocumentParser(fragment, contextElement, parserC
ontentPolicy)); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 bool m_isPinnedToMainThread; | 198 bool m_isPinnedToMainThread; |
199 bool m_endWasDelayed; | 199 bool m_endWasDelayed; |
200 bool m_haveBackgroundParser; | 200 bool m_haveBackgroundParser; |
201 unsigned m_pumpSessionNestingLevel; | 201 unsigned m_pumpSessionNestingLevel; |
202 }; | 202 }; |
203 | 203 |
204 } | 204 } |
205 | 205 |
206 #endif | 206 #endif |
OLD | NEW |