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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 if (!scriptLoader->willBeParserExecuted()) | 350 if (!scriptLoader->willBeParserExecuted()) |
351 return; | 351 return; |
352 | 352 |
353 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) { | 353 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) { |
354 requestDeferredScript(script); | 354 requestDeferredScript(script); |
355 } else if (scriptLoader->readyToBeParserExecuted()) { | 355 } else if (scriptLoader->readyToBeParserExecuted()) { |
356 if (m_scriptNestingLevel == 1) { | 356 if (m_scriptNestingLevel == 1) { |
357 m_parserBlockingScript->setElement(script); | 357 m_parserBlockingScript->setElement(script); |
358 m_parserBlockingScript->setStartingPosition(scriptStartPosition)
; | 358 m_parserBlockingScript->setStartingPosition(scriptStartPosition)
; |
359 } else { | 359 } else { |
360 ScriptSourceCode sourceCode(script->textContent(), documentURLFo
rScriptExecution(m_document), scriptStartPosition); | 360 ScriptSourceCode sourceCode(CompressibleString(script->textConte
nt().impl()), documentURLForScriptExecution(m_document), scriptStartPosition); |
361 scriptLoader->executeScript(sourceCode); | 361 scriptLoader->executeScript(sourceCode); |
362 } | 362 } |
363 } else { | 363 } else { |
364 requestParsingBlockingScript(script); | 364 requestParsingBlockingScript(script); |
365 } | 365 } |
366 } | 366 } |
367 } | 367 } |
368 | 368 |
369 DEFINE_TRACE(HTMLScriptRunner) | 369 DEFINE_TRACE(HTMLScriptRunner) |
370 { | 370 { |
371 visitor->trace(m_document); | 371 visitor->trace(m_document); |
372 visitor->trace(m_host); | 372 visitor->trace(m_host); |
373 visitor->trace(m_parserBlockingScript); | 373 visitor->trace(m_parserBlockingScript); |
374 visitor->trace(m_scriptsToExecuteAfterParsing); | 374 visitor->trace(m_scriptsToExecuteAfterParsing); |
375 } | 375 } |
376 | 376 |
377 } // namespace blink | 377 } // namespace blink |
OLD | NEW |