| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 ASSERT(isStopping()); | 136 ASSERT(isStopping()); |
| 137 ASSERT(!hasInsertionPoint() || m_haveBackgroundParser); | 137 ASSERT(!hasInsertionPoint() || m_haveBackgroundParser); |
| 138 end(); | 138 end(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 bool HTMLDocumentParser::isParsingFragment() const | 141 bool HTMLDocumentParser::isParsingFragment() const |
| 142 { | 142 { |
| 143 return m_treeBuilder->isParsingFragment(); | 143 return m_treeBuilder->isParsingFragment(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool HTMLDocumentParser::processingData() const | |
| 147 { | |
| 148 return isScheduledForResume() || inPumpSession() || m_haveBackgroundParser; | |
| 149 } | |
| 150 | |
| 151 bool HTMLDocumentParser::isScheduledForResume() const | 146 bool HTMLDocumentParser::isScheduledForResume() const |
| 152 { | 147 { |
| 153 return m_parserScheduler && m_parserScheduler->isScheduledForResume(); | 148 return m_parserScheduler && m_parserScheduler->isScheduledForResume(); |
| 154 } | 149 } |
| 155 | 150 |
| 156 // Used by HTMLParserScheduler | 151 // Used by HTMLParserScheduler |
| 157 void HTMLDocumentParser::resumeParsingAfterYield() | 152 void HTMLDocumentParser::resumeParsingAfterYield() |
| 158 { | 153 { |
| 159 // pumpTokenizer can cause this parser to be detached from the Document, | 154 // pumpTokenizer can cause this parser to be detached from the Document, |
| 160 // but we need to ensure it isn't deleted yet. | 155 // but we need to ensure it isn't deleted yet. |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 { | 421 { |
| 427 if (!m_scriptRunner.hasPendingScripts()) | 422 if (!m_scriptRunner.hasPendingScripts()) |
| 428 return; | 423 return; |
| 429 RefPtr<HTMLDocumentParser> protect(this); | 424 RefPtr<HTMLDocumentParser> protect(this); |
| 430 m_scriptRunner.executePendingScripts(); | 425 m_scriptRunner.executePendingScripts(); |
| 431 if (!isWaitingForScripts()) | 426 if (!isWaitingForScripts()) |
| 432 resumeParsingAfterScriptExecution(); | 427 resumeParsingAfterScriptExecution(); |
| 433 } | 428 } |
| 434 | 429 |
| 435 } | 430 } |
| OLD | NEW |