| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 // Exposed for testing. | 97 // Exposed for testing. |
| 98 HTMLScriptRunnerHost* asHTMLScriptRunnerHostForTesting() { return this; } | 98 HTMLScriptRunnerHost* asHTMLScriptRunnerHostForTesting() { return this; } |
| 99 | 99 |
| 100 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } | 100 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } |
| 101 | 101 |
| 102 TextPosition textPosition() const final; | 102 TextPosition textPosition() const final; |
| 103 bool isParsingAtLineNumber() const final; | 103 bool isParsingAtLineNumber() const final; |
| 104 OrdinalNumber lineNumber() const final; | 104 OrdinalNumber lineNumber() const final; |
| 105 | 105 |
| 106 void suspendScheduledTasks() final; | |
| 107 void resumeScheduledTasks() final; | |
| 108 | |
| 109 HTMLParserReentryPermit* reentryPermit() { return m_reentryPermit.get(); } | 106 HTMLParserReentryPermit* reentryPermit() { return m_reentryPermit.get(); } |
| 110 | 107 |
| 111 struct TokenizedChunk { | 108 struct TokenizedChunk { |
| 112 USING_FAST_MALLOC(TokenizedChunk); | 109 USING_FAST_MALLOC(TokenizedChunk); |
| 113 | 110 |
| 114 public: | 111 public: |
| 115 std::unique_ptr<CompactHTMLTokenStream> tokens; | 112 std::unique_ptr<CompactHTMLTokenStream> tokens; |
| 116 PreloadRequestStream preloads; | 113 PreloadRequestStream preloads; |
| 117 ViewportDescriptionWrapper viewport; | 114 ViewportDescriptionWrapper viewport; |
| 118 XSSInfoStream xssInfos; | 115 XSSInfoStream xssInfos; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 // speculation buffer. Preloads will be deferred until a token matching this | 277 // speculation buffer. Preloads will be deferred until a token matching this |
| 281 // pointer is parsed and the CSP policy is applied. Note that this pointer | 278 // pointer is parsed and the CSP policy is applied. Note that this pointer |
| 282 // tracks the *last* meta token in the speculation buffer, so it overestimates | 279 // tracks the *last* meta token in the speculation buffer, so it overestimates |
| 283 // how long to defer preloads. This is for simplicity, as the alternative | 280 // how long to defer preloads. This is for simplicity, as the alternative |
| 284 // would require keeping track of token positions of preload requests. | 281 // would require keeping track of token positions of preload requests. |
| 285 CompactHTMLToken* m_pendingCSPMetaToken; | 282 CompactHTMLToken* m_pendingCSPMetaToken; |
| 286 | 283 |
| 287 bool m_shouldUseThreading; | 284 bool m_shouldUseThreading; |
| 288 bool m_endWasDelayed; | 285 bool m_endWasDelayed; |
| 289 bool m_haveBackgroundParser; | 286 bool m_haveBackgroundParser; |
| 290 bool m_tasksWereSuspended; | |
| 291 unsigned m_pumpSessionNestingLevel; | 287 unsigned m_pumpSessionNestingLevel; |
| 292 unsigned m_pumpSpeculationsSessionNestingLevel; | 288 unsigned m_pumpSpeculationsSessionNestingLevel; |
| 293 bool m_isParsingAtLineNumber; | 289 bool m_isParsingAtLineNumber; |
| 294 bool m_triedLoadingLinkHeaders; | 290 bool m_triedLoadingLinkHeaders; |
| 295 }; | 291 }; |
| 296 | 292 |
| 297 } // namespace blink | 293 } // namespace blink |
| 298 | 294 |
| 299 #endif // HTMLDocumentParser_h | 295 #endif // HTMLDocumentParser_h |
| OLD | NEW |