| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 // DocumentParser | 134 // DocumentParser |
| 135 void detach() final; | 135 void detach() final; |
| 136 bool hasInsertionPoint() final; | 136 bool hasInsertionPoint() final; |
| 137 void prepareToStopParsing() final; | 137 void prepareToStopParsing() final; |
| 138 void stopParsing() final; | 138 void stopParsing() final; |
| 139 bool isWaitingForScripts() const final; | 139 bool isWaitingForScripts() const final; |
| 140 bool isExecutingScript() const final; | 140 bool isExecutingScript() const final; |
| 141 void executeScriptsWaitingForResources() final; | 141 void executeScriptsWaitingForResources() final; |
| 142 void documentElementAvailable() override; |
| 142 | 143 |
| 143 // HTMLScriptRunnerHost | 144 // HTMLScriptRunnerHost |
| 144 void notifyScriptLoaded(Resource*) final; | 145 void notifyScriptLoaded(Resource*) final; |
| 145 HTMLInputStream& inputStream() final { return m_input; } | 146 HTMLInputStream& inputStream() final { return m_input; } |
| 146 bool hasPreloadScanner() const final { return m_preloadScanner.get() && !sho
uldUseThreading(); } | 147 bool hasPreloadScanner() const final { return m_preloadScanner.get() && !sho
uldUseThreading(); } |
| 147 void appendCurrentInputStreamToPreloadScannerAndScan() final; | 148 void appendCurrentInputStreamToPreloadScannerAndScan() final; |
| 148 | 149 |
| 149 void startBackgroundParser(); | 150 void startBackgroundParser(); |
| 150 void stopBackgroundParser(); | 151 void stopBackgroundParser(); |
| 151 void validateSpeculations(PassOwnPtr<ParsedChunk> lastChunk); | 152 void validateSpeculations(PassOwnPtr<ParsedChunk> lastChunk); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 167 void attemptToRunDeferredScriptsAndEnd(); | 168 void attemptToRunDeferredScriptsAndEnd(); |
| 168 void end(); | 169 void end(); |
| 169 | 170 |
| 170 bool shouldUseThreading() const { return m_shouldUseThreading; } | 171 bool shouldUseThreading() const { return m_shouldUseThreading; } |
| 171 | 172 |
| 172 bool isParsingFragment() const; | 173 bool isParsingFragment() const; |
| 173 bool isScheduledForResume() const; | 174 bool isScheduledForResume() const; |
| 174 bool inPumpSession() const { return m_pumpSessionNestingLevel > 0; } | 175 bool inPumpSession() const { return m_pumpSessionNestingLevel > 0; } |
| 175 bool shouldDelayEnd() const { return inPumpSession() || isWaitingForScripts(
) || isScheduledForResume() || isExecutingScript(); } | 176 bool shouldDelayEnd() const { return inPumpSession() || isWaitingForScripts(
) || isScheduledForResume() || isExecutingScript(); } |
| 176 | 177 |
| 177 void pumpPreloadQueue(); | |
| 178 | |
| 179 PassOwnPtr<HTMLPreloadScanner> createPreloadScanner(); | 178 PassOwnPtr<HTMLPreloadScanner> createPreloadScanner(); |
| 180 | 179 |
| 181 int preloadInsertion(const SegmentedString& source); | 180 int preloadInsertion(const SegmentedString& source); |
| 182 void evaluateAndPreloadScriptForDocumentWrite(const String& source); | 181 void evaluateAndPreloadScriptForDocumentWrite(const String& source); |
| 183 | 182 |
| 184 HTMLToken& token() { return *m_token; } | 183 HTMLToken& token() { return *m_token; } |
| 185 | 184 |
| 186 HTMLParserOptions m_options; | 185 HTMLParserOptions m_options; |
| 187 HTMLInputStream m_input; | 186 HTMLInputStream m_input; |
| 188 | 187 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 217 bool m_tasksWereSuspended; | 216 bool m_tasksWereSuspended; |
| 218 unsigned m_pumpSessionNestingLevel; | 217 unsigned m_pumpSessionNestingLevel; |
| 219 unsigned m_pumpSpeculationsSessionNestingLevel; | 218 unsigned m_pumpSpeculationsSessionNestingLevel; |
| 220 bool m_isParsingAtLineNumber; | 219 bool m_isParsingAtLineNumber; |
| 221 bool m_triedLoadingLinkHeaders; | 220 bool m_triedLoadingLinkHeaders; |
| 222 }; | 221 }; |
| 223 | 222 |
| 224 } // namespace blink | 223 } // namespace blink |
| 225 | 224 |
| 226 #endif | 225 #endif |
| OLD | NEW |