| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void executeParsingBlockingScript(); | 81 void executeParsingBlockingScript(); |
| 82 void executePendingScriptAndDispatchEvent(PendingScript&, PendingScriptType)
; | 82 void executePendingScriptAndDispatchEvent(PendingScript&, PendingScriptType)
; |
| 83 void executeParsingBlockingScripts(); | 83 void executeParsingBlockingScripts(); |
| 84 | 84 |
| 85 void requestParsingBlockingScript(Element*); | 85 void requestParsingBlockingScript(Element*); |
| 86 void requestDeferredScript(Element*); | 86 void requestDeferredScript(Element*); |
| 87 bool requestPendingScript(PendingScript&, Element*) const; | 87 bool requestPendingScript(PendingScript&, Element*) const; |
| 88 | 88 |
| 89 void runScript(Element*, const TextPosition& scriptStartPosition); | 89 void runScript(Element*, const TextPosition& scriptStartPosition); |
| 90 | 90 |
| 91 // Helpers for dealing with HTMLScriptRunnerHost | |
| 92 void watchForLoad(PendingScript&); | |
| 93 void stopWatchingForLoad(PendingScript&); | |
| 94 bool isPendingScriptReady(const PendingScript&); | 91 bool isPendingScriptReady(const PendingScript&); |
| 95 ScriptSourceCode sourceFromPendingScript(const PendingScript&, bool& errorOc
curred) const; | |
| 96 | 92 |
| 97 RawPtrWillBeMember<Document> m_document; | 93 RawPtrWillBeMember<Document> m_document; |
| 98 RawPtrWillBeMember<HTMLScriptRunnerHost> m_host; | 94 RawPtrWillBeMember<HTMLScriptRunnerHost> m_host; |
| 99 PendingScript m_parserBlockingScript; | 95 PendingScript m_parserBlockingScript; |
| 100 Deque<PendingScript> m_scriptsToExecuteAfterParsing; // http://www.whatwg.or
g/specs/web-apps/current-work/#list-of-scripts-that-will-execute-when-the-docume
nt-has-finished-parsing | 96 Deque<PendingScript> m_scriptsToExecuteAfterParsing; // http://www.whatwg.or
g/specs/web-apps/current-work/#list-of-scripts-that-will-execute-when-the-docume
nt-has-finished-parsing |
| 101 unsigned m_scriptNestingLevel; | 97 unsigned m_scriptNestingLevel; |
| 102 | 98 |
| 103 // We only want stylesheet loads to trigger script execution if script | 99 // We only want stylesheet loads to trigger script execution if script |
| 104 // execution is currently stopped due to stylesheet loads, otherwise we'd | 100 // execution is currently stopped due to stylesheet loads, otherwise we'd |
| 105 // cause nested script execution when parsing <style> tags since </style> | 101 // cause nested script execution when parsing <style> tags since </style> |
| 106 // tags can cause Document to call executeScriptsWaitingForResources. | 102 // tags can cause Document to call executeScriptsWaitingForResources. |
| 107 bool m_hasScriptsWaitingForResources; | 103 bool m_hasScriptsWaitingForResources; |
| 108 }; | 104 }; |
| 109 | 105 |
| 110 } | 106 } |
| 111 | 107 |
| 112 #endif | 108 #endif |
| OLD | NEW |