| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 m_scriptsToExecuteAfterParsing.append(pendingScript.release()); | 376 m_scriptsToExecuteAfterParsing.append(pendingScript.release()); |
| 377 } | 377 } |
| 378 | 378 |
| 379 bool HTMLScriptRunner::requestPendingScript(PendingScript* pendingScript, Elemen
t* script) const | 379 bool HTMLScriptRunner::requestPendingScript(PendingScript* pendingScript, Elemen
t* script) const |
| 380 { | 380 { |
| 381 ASSERT(!pendingScript->element()); | 381 ASSERT(!pendingScript->element()); |
| 382 pendingScript->setElement(script); | 382 pendingScript->setElement(script); |
| 383 // This should correctly return 0 for empty or invalid srcValues. | 383 // This should correctly return 0 for empty or invalid srcValues. |
| 384 ScriptResource* resource = toScriptLoaderIfPossible(script)->resource(); | 384 ScriptResource* resource = toScriptLoaderIfPossible(script)->resource(); |
| 385 if (!resource) { | 385 if (!resource) { |
| 386 notImplemented(); // Dispatch error event. | 386 DVLOG(1) << "Not implemented."; // Dispatch error event. |
| 387 return false; | 387 return false; |
| 388 } | 388 } |
| 389 pendingScript->setScriptResource(resource); | 389 pendingScript->setScriptResource(resource); |
| 390 return true; | 390 return true; |
| 391 } | 391 } |
| 392 | 392 |
| 393 // Implements the initial steps for 'An end tag whose tag name is "script"' | 393 // Implements the initial steps for 'An end tag whose tag name is "script"' |
| 394 // http://whatwg.org/html#scriptEndTag | 394 // http://whatwg.org/html#scriptEndTag |
| 395 void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
tPosition) | 395 void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
tPosition) |
| 396 { | 396 { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 440 |
| 441 DEFINE_TRACE(HTMLScriptRunner) | 441 DEFINE_TRACE(HTMLScriptRunner) |
| 442 { | 442 { |
| 443 visitor->trace(m_document); | 443 visitor->trace(m_document); |
| 444 visitor->trace(m_host); | 444 visitor->trace(m_host); |
| 445 visitor->trace(m_parserBlockingScript); | 445 visitor->trace(m_parserBlockingScript); |
| 446 visitor->trace(m_scriptsToExecuteAfterParsing); | 446 visitor->trace(m_scriptsToExecuteAfterParsing); |
| 447 } | 447 } |
| 448 | 448 |
| 449 } // namespace blink | 449 } // namespace blink |
| OLD | NEW |