| 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 20 matching lines...) Expand all Loading... |
| 31 #include "core/dom/Element.h" | 31 #include "core/dom/Element.h" |
| 32 #include "core/events/Event.h" | 32 #include "core/events/Event.h" |
| 33 #include "core/dom/IgnoreDestructiveWriteCountIncrementer.h" | 33 #include "core/dom/IgnoreDestructiveWriteCountIncrementer.h" |
| 34 #include "core/dom/ScriptLoader.h" | 34 #include "core/dom/ScriptLoader.h" |
| 35 #include "core/fetch/ScriptResource.h" | 35 #include "core/fetch/ScriptResource.h" |
| 36 #include "core/frame/LocalFrame.h" | 36 #include "core/frame/LocalFrame.h" |
| 37 #include "core/html/parser/HTMLInputStream.h" | 37 #include "core/html/parser/HTMLInputStream.h" |
| 38 #include "core/html/parser/HTMLScriptRunnerHost.h" | 38 #include "core/html/parser/HTMLScriptRunnerHost.h" |
| 39 #include "core/html/parser/NestingLevelIncrementer.h" | 39 #include "core/html/parser/NestingLevelIncrementer.h" |
| 40 #include "platform/Histogram.h" | 40 #include "platform/Histogram.h" |
| 41 #include "platform/NotImplemented.h" | |
| 42 #include "platform/TraceEvent.h" | 41 #include "platform/TraceEvent.h" |
| 43 #include "platform/TracedValue.h" | 42 #include "platform/TracedValue.h" |
| 44 #include "public/platform/Platform.h" | 43 #include "public/platform/Platform.h" |
| 45 #include "public/platform/WebFrameScheduler.h" | 44 #include "public/platform/WebFrameScheduler.h" |
| 46 #include <inttypes.h> | 45 #include <inttypes.h> |
| 47 | 46 |
| 48 namespace blink { | 47 namespace blink { |
| 49 | 48 |
| 50 namespace { | 49 namespace { |
| 51 | 50 |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 m_scriptsToExecuteAfterParsing.append(pendingScript.release()); | 375 m_scriptsToExecuteAfterParsing.append(pendingScript.release()); |
| 377 } | 376 } |
| 378 | 377 |
| 379 bool HTMLScriptRunner::requestPendingScript(PendingScript* pendingScript, Elemen
t* script) const | 378 bool HTMLScriptRunner::requestPendingScript(PendingScript* pendingScript, Elemen
t* script) const |
| 380 { | 379 { |
| 381 ASSERT(!pendingScript->element()); | 380 ASSERT(!pendingScript->element()); |
| 382 pendingScript->setElement(script); | 381 pendingScript->setElement(script); |
| 383 // This should correctly return 0 for empty or invalid srcValues. | 382 // This should correctly return 0 for empty or invalid srcValues. |
| 384 ScriptResource* resource = toScriptLoaderIfPossible(script)->resource(); | 383 ScriptResource* resource = toScriptLoaderIfPossible(script)->resource(); |
| 385 if (!resource) { | 384 if (!resource) { |
| 386 notImplemented(); // Dispatch error event. | 385 NOTIMPLEMENTED(); // Dispatch error event. |
| 387 return false; | 386 return false; |
| 388 } | 387 } |
| 389 pendingScript->setScriptResource(resource); | 388 pendingScript->setScriptResource(resource); |
| 390 return true; | 389 return true; |
| 391 } | 390 } |
| 392 | 391 |
| 393 // Implements the initial steps for 'An end tag whose tag name is "script"' | 392 // Implements the initial steps for 'An end tag whose tag name is "script"' |
| 394 // http://whatwg.org/html#scriptEndTag | 393 // http://whatwg.org/html#scriptEndTag |
| 395 void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
tPosition) | 394 void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
tPosition) |
| 396 { | 395 { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 439 |
| 441 DEFINE_TRACE(HTMLScriptRunner) | 440 DEFINE_TRACE(HTMLScriptRunner) |
| 442 { | 441 { |
| 443 visitor->trace(m_document); | 442 visitor->trace(m_document); |
| 444 visitor->trace(m_host); | 443 visitor->trace(m_host); |
| 445 visitor->trace(m_parserBlockingScript); | 444 visitor->trace(m_parserBlockingScript); |
| 446 visitor->trace(m_scriptsToExecuteAfterParsing); | 445 visitor->trace(m_scriptsToExecuteAfterParsing); |
| 447 } | 446 } |
| 448 | 447 |
| 449 } // namespace blink | 448 } // namespace blink |
| OLD | NEW |