| 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef HTMLDocumentParser_h | 26 #ifndef HTMLDocumentParser_h |
| 27 #define HTMLDocumentParser_h | 27 #define HTMLDocumentParser_h |
| 28 | 28 |
| 29 #include "base/memory/weak_ptr.h" | 29 #include "base/memory/weak_ptr.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" | |
| 35 #include "core/html/parser/CompactHTMLToken.h" | 34 #include "core/html/parser/CompactHTMLToken.h" |
| 36 #include "core/html/parser/HTMLInputStream.h" | 35 #include "core/html/parser/HTMLInputStream.h" |
| 37 #include "core/html/parser/HTMLParserOptions.h" | 36 #include "core/html/parser/HTMLParserOptions.h" |
| 38 #include "core/html/parser/HTMLScriptRunner.h" | 37 #include "core/html/parser/HTMLScriptRunner.h" |
| 39 #include "core/html/parser/HTMLToken.h" | 38 #include "core/html/parser/HTMLToken.h" |
| 40 #include "core/html/parser/HTMLTokenizer.h" | 39 #include "core/html/parser/HTMLTokenizer.h" |
| 41 #include "core/html/parser/HTMLTreeBuilderSimulator.h" | 40 #include "core/html/parser/HTMLTreeBuilderSimulator.h" |
| 42 #include "core/html/parser/TextResourceDecoder.h" | 41 #include "core/html/parser/TextResourceDecoder.h" |
| 43 #include "platform/text/SegmentedString.h" | 42 #include "platform/text/SegmentedString.h" |
| 44 #include "wtf/Deque.h" | 43 #include "wtf/Deque.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 static void parseDocumentFragment(const String&, DocumentFragment*, Element*
contextElement, ParserContentPolicy = AllowScriptingContent); | 77 static void parseDocumentFragment(const String&, DocumentFragment*, Element*
contextElement, ParserContentPolicy = AllowScriptingContent); |
| 79 | 78 |
| 80 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } | 79 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } |
| 81 | 80 |
| 82 virtual TextPosition textPosition() const OVERRIDE FINAL; | 81 virtual TextPosition textPosition() const OVERRIDE FINAL; |
| 83 virtual OrdinalNumber lineNumber() const OVERRIDE FINAL; | 82 virtual OrdinalNumber lineNumber() const OVERRIDE FINAL; |
| 84 | 83 |
| 85 struct ParsedChunk { | 84 struct ParsedChunk { |
| 86 OwnPtr<CompactHTMLTokenStream> tokens; | 85 OwnPtr<CompactHTMLTokenStream> tokens; |
| 87 HTMLTokenizer::State tokenizerState; | 86 HTMLTokenizer::State tokenizerState; |
| 88 HTMLInputCheckpoint inputCheckpoint; | |
| 89 }; | 87 }; |
| 90 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); | 88 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); |
| 91 | 89 |
| 92 virtual void appendBytes(const char* bytes, size_t length) OVERRIDE; | 90 virtual void appendBytes(const char* bytes, size_t length) OVERRIDE; |
| 93 virtual void flush() OVERRIDE FINAL; | 91 virtual void flush() OVERRIDE FINAL; |
| 94 | 92 |
| 95 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi
on()); } | 93 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi
on()); } |
| 96 | 94 |
| 97 protected: | 95 protected: |
| 98 virtual void insert(const SegmentedString&) OVERRIDE FINAL; | 96 virtual void insert(const SegmentedString&) OVERRIDE FINAL; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 172 |
| 175 bool m_isFragment; | 173 bool m_isFragment; |
| 176 bool m_endWasDelayed; | 174 bool m_endWasDelayed; |
| 177 bool m_haveBackgroundParser; | 175 bool m_haveBackgroundParser; |
| 178 unsigned m_pumpSessionNestingLevel; | 176 unsigned m_pumpSessionNestingLevel; |
| 179 }; | 177 }; |
| 180 | 178 |
| 181 } | 179 } |
| 182 | 180 |
| 183 #endif | 181 #endif |
| OLD | NEW |