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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual void trace(Visitor*) override; | 77 virtual void trace(Visitor*) override; |
78 | 78 |
79 // Exposed for HTMLParserScheduler | 79 // Exposed for HTMLParserScheduler |
80 void resumeParsingAfterYield(); | 80 void resumeParsingAfterYield(); |
81 | 81 |
82 static void parseDocumentFragment(const String&, DocumentFragment*, Element*
contextElement, ParserContentPolicy = AllowScriptingContent); | 82 static void parseDocumentFragment(const String&, DocumentFragment*, Element*
contextElement, ParserContentPolicy = AllowScriptingContent); |
83 | 83 |
84 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } | 84 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } |
85 | 85 |
86 virtual TextPosition textPosition() const override final; | 86 virtual TextPosition textPosition() const override final; |
| 87 virtual bool isParsingAtLineNumber() const override final; |
87 virtual OrdinalNumber lineNumber() const override final; | 88 virtual OrdinalNumber lineNumber() const override final; |
88 | 89 |
89 virtual void suspendScheduledTasks() override final; | 90 virtual void suspendScheduledTasks() override final; |
90 virtual void resumeScheduledTasks() override final; | 91 virtual void resumeScheduledTasks() override final; |
91 | 92 |
92 struct ParsedChunk { | 93 struct ParsedChunk { |
93 OwnPtr<CompactHTMLTokenStream> tokens; | 94 OwnPtr<CompactHTMLTokenStream> tokens; |
94 PreloadRequestStream preloads; | 95 PreloadRequestStream preloads; |
95 XSSInfoStream xssInfos; | 96 XSSInfoStream xssInfos; |
96 HTMLTokenizer::State tokenizerState; | 97 HTMLTokenizer::State tokenizerState; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 WeakPtrFactory<HTMLDocumentParser> m_weakFactory; | 197 WeakPtrFactory<HTMLDocumentParser> m_weakFactory; |
197 WeakPtr<BackgroundHTMLParser> m_backgroundParser; | 198 WeakPtr<BackgroundHTMLParser> m_backgroundParser; |
198 OwnPtrWillBeMember<HTMLResourcePreloader> m_preloader; | 199 OwnPtrWillBeMember<HTMLResourcePreloader> m_preloader; |
199 | 200 |
200 bool m_shouldUseThreading; | 201 bool m_shouldUseThreading; |
201 bool m_endWasDelayed; | 202 bool m_endWasDelayed; |
202 bool m_haveBackgroundParser; | 203 bool m_haveBackgroundParser; |
203 bool m_tasksWereSuspended; | 204 bool m_tasksWereSuspended; |
204 unsigned m_pumpSessionNestingLevel; | 205 unsigned m_pumpSessionNestingLevel; |
205 unsigned m_pumpSpeculationsSessionNestingLevel; | 206 unsigned m_pumpSpeculationsSessionNestingLevel; |
| 207 bool m_isParsingAtLineNumber; |
206 }; | 208 }; |
207 | 209 |
208 } | 210 } |
209 | 211 |
210 #endif | 212 #endif |
OLD | NEW |