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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 // PendingScriptClient | 101 // PendingScriptClient |
102 void pendingScriptFinished(PendingScript*) override; | 102 void pendingScriptFinished(PendingScript*) override; |
103 | 103 |
104 void executePendingScriptAndDispatchEvent(PendingScript*, | 104 void executePendingScriptAndDispatchEvent(PendingScript*, |
105 ScriptStreamer::Type); | 105 ScriptStreamer::Type); |
106 void executeParsingBlockingScripts(); | 106 void executeParsingBlockingScripts(); |
107 | 107 |
108 void requestParsingBlockingScript(Element*); | 108 void requestParsingBlockingScript(Element*); |
109 void requestDeferredScript(Element*); | 109 void requestDeferredScript(Element*); |
110 bool requestPendingScript(PendingScript*, Element*) const; | 110 PendingScript* requestPendingScript(Element*) const; |
111 | 111 |
112 // Processes the provided script element, but does not execute any | 112 // Processes the provided script element, but does not execute any |
113 // parsing-blocking scripts that may remain after execution. | 113 // parsing-blocking scripts that may remain after execution. |
114 void processScriptElementInternal(Element*, | 114 void processScriptElementInternal(Element*, |
115 const TextPosition& scriptStartPosition); | 115 const TextPosition& scriptStartPosition); |
116 | 116 |
| 117 const PendingScript* parserBlockingScript() const { |
| 118 return m_parserBlockingScript; |
| 119 } |
| 120 |
117 bool isParserBlockingScriptReady(); | 121 bool isParserBlockingScriptReady(); |
118 | 122 |
119 void possiblyFetchBlockedDocWriteScript(PendingScript*); | 123 void possiblyFetchBlockedDocWriteScript(PendingScript*); |
120 | 124 |
121 RefPtr<HTMLParserReentryPermit> m_reentryPermit; | 125 RefPtr<HTMLParserReentryPermit> m_reentryPermit; |
122 Member<Document> m_document; | 126 Member<Document> m_document; |
123 Member<HTMLParserScriptRunnerHost> m_host; | 127 Member<HTMLParserScriptRunnerHost> m_host; |
124 | 128 |
125 // https://html.spec.whatwg.org/#pending-parsing-blocking-script | 129 // https://html.spec.whatwg.org/#pending-parsing-blocking-script |
126 Member<PendingScript> m_parserBlockingScript; | 130 Member<PendingScript> m_parserBlockingScript; |
127 | 131 |
128 // https://html.spec.whatwg.org/#list-of-scripts-that-will-execute-when-the-do
cument-has-finished-parsing | 132 // https://html.spec.whatwg.org/#list-of-scripts-that-will-execute-when-the-do
cument-has-finished-parsing |
129 HeapDeque<Member<PendingScript>> m_scriptsToExecuteAfterParsing; | 133 HeapDeque<Member<PendingScript>> m_scriptsToExecuteAfterParsing; |
130 }; | 134 }; |
131 | 135 |
132 } // namespace blink | 136 } // namespace blink |
133 | 137 |
134 #endif | 138 #endif |
OLD | NEW |