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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 428 |
429 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) { | 429 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) { |
430 requestDeferredScript(script); | 430 requestDeferredScript(script); |
431 } else if (scriptLoader->readyToBeParserExecuted()) { | 431 } else if (scriptLoader->readyToBeParserExecuted()) { |
432 if (m_scriptNestingLevel == 1) { | 432 if (m_scriptNestingLevel == 1) { |
433 m_parserBlockingScript->setElement(script); | 433 m_parserBlockingScript->setElement(script); |
434 m_parserBlockingScript->setStartingPosition(scriptStartPosition)
; | 434 m_parserBlockingScript->setStartingPosition(scriptStartPosition)
; |
435 } else { | 435 } else { |
436 ASSERT(m_scriptNestingLevel > 1); | 436 ASSERT(m_scriptNestingLevel > 1); |
437 m_parserBlockingScript->releaseElementAndClear(); | 437 m_parserBlockingScript->releaseElementAndClear(); |
438 ScriptSourceCode sourceCode(CompressibleString(script->textConte
nt().impl()), documentURLForScriptExecution(m_document), scriptStartPosition); | 438 ScriptSourceCode sourceCode(script->textContent(), documentURLFo
rScriptExecution(m_document), scriptStartPosition); |
439 doExecuteScript(script, sourceCode, scriptStartPosition); | 439 doExecuteScript(script, sourceCode, scriptStartPosition); |
440 } | 440 } |
441 } else { | 441 } else { |
442 requestParsingBlockingScript(script); | 442 requestParsingBlockingScript(script); |
443 } | 443 } |
444 } | 444 } |
445 } | 445 } |
446 | 446 |
447 DEFINE_TRACE(HTMLScriptRunner) | 447 DEFINE_TRACE(HTMLScriptRunner) |
448 { | 448 { |
449 visitor->trace(m_document); | 449 visitor->trace(m_document); |
450 visitor->trace(m_host); | 450 visitor->trace(m_host); |
451 visitor->trace(m_parserBlockingScript); | 451 visitor->trace(m_parserBlockingScript); |
452 visitor->trace(m_scriptsToExecuteAfterParsing); | 452 visitor->trace(m_scriptsToExecuteAfterParsing); |
453 ScriptResourceClient::trace(visitor); | 453 ScriptResourceClient::trace(visitor); |
454 } | 454 } |
455 | 455 |
456 } // namespace blink | 456 } // namespace blink |
OLD | NEW |