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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void executeParsingBlockingScripts(); | 75 void executeParsingBlockingScripts(); |
76 | 76 |
77 void requestParsingBlockingScript(Element*); | 77 void requestParsingBlockingScript(Element*); |
78 void requestDeferredScript(Element*); | 78 void requestDeferredScript(Element*); |
79 bool requestPendingScript(PendingScript&, Element*) const; | 79 bool requestPendingScript(PendingScript&, Element*) const; |
80 | 80 |
81 void runScript(Element*, const TextPosition& scriptStartPosition); | 81 void runScript(Element*, const TextPosition& scriptStartPosition); |
82 | 82 |
83 bool isPendingScriptReady(const PendingScript&); | 83 bool isPendingScriptReady(const PendingScript&); |
84 | 84 |
| 85 void stopWatchingResourceForLoad(Resource*); |
| 86 |
85 RawPtrWillBeMember<Document> m_document; | 87 RawPtrWillBeMember<Document> m_document; |
86 RawPtrWillBeMember<HTMLScriptRunnerHost> m_host; | 88 RawPtrWillBeMember<HTMLScriptRunnerHost> m_host; |
87 PendingScript m_parserBlockingScript; | 89 PendingScript m_parserBlockingScript; |
88 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 | 90 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 |
89 unsigned m_scriptNestingLevel; | 91 unsigned m_scriptNestingLevel; |
90 | 92 |
91 // We only want stylesheet loads to trigger script execution if script | 93 // We only want stylesheet loads to trigger script execution if script |
92 // execution is currently stopped due to stylesheet loads, otherwise we'd | 94 // execution is currently stopped due to stylesheet loads, otherwise we'd |
93 // cause nested script execution when parsing <style> tags since </style> | 95 // cause nested script execution when parsing <style> tags since </style> |
94 // tags can cause Document to call executeScriptsWaitingForResources. | 96 // tags can cause Document to call executeScriptsWaitingForResources. |
95 bool m_hasScriptsWaitingForResources; | 97 bool m_hasScriptsWaitingForResources; |
96 | 98 |
97 // For tracking the times between script load and compilation, we need to | 99 // For tracking the times between script load and compilation, we need to |
98 // know whether a parser blocking script was loaded previously, or whether | 100 // know whether a parser blocking script was loaded previously, or whether |
99 // it's really loaded when requested. | 101 // it's really loaded when requested. |
100 bool m_parserBlockingScriptAlreadyLoaded; | 102 bool m_parserBlockingScriptAlreadyLoaded; |
101 }; | 103 }; |
102 | 104 |
103 } | 105 } |
104 | 106 |
105 #endif | 107 #endif |
OLD | NEW |