OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 Member<Element> m_element; | 141 Member<Element> m_element; |
142 Member<ScriptResource> m_resource; | 142 Member<ScriptResource> m_resource; |
143 WTF::OrdinalNumber m_startLineNumber; | 143 WTF::OrdinalNumber m_startLineNumber; |
144 String m_characterEncoding; | 144 String m_characterEncoding; |
145 String m_fallbackCharacterEncoding; | 145 String m_fallbackCharacterEncoding; |
146 | 146 |
147 bool m_parserInserted : 1; | 147 bool m_parserInserted : 1; |
148 bool m_isExternalScript : 1; | 148 bool m_isExternalScript : 1; |
149 bool m_alreadyStarted : 1; | 149 bool m_alreadyStarted : 1; |
150 bool m_haveFiredLoad : 1; | 150 bool m_haveFiredLoad : 1; |
151 bool | 151 // Same as "The parser will handle executing the script." |
152 m_willBeParserExecuted : 1; // Same as "The parser will handle executing
the script." | 152 bool m_willBeParserExecuted : 1; |
153 bool m_readyToBeParserExecuted : 1; | 153 bool m_readyToBeParserExecuted : 1; |
154 bool m_willExecuteWhenDocumentFinishedParsing : 1; | 154 bool m_willExecuteWhenDocumentFinishedParsing : 1; |
155 bool m_forceAsync : 1; | 155 bool m_forceAsync : 1; |
156 const bool m_createdDuringDocumentWrite : 1; | 156 const bool m_createdDuringDocumentWrite : 1; |
157 | 157 |
158 ScriptRunner::AsyncExecutionType m_asyncExecType; | 158 ScriptRunner::AsyncExecutionType m_asyncExecType; |
159 enum DocumentWriteIntervention { | 159 enum DocumentWriteIntervention { |
160 DocumentWriteInterventionNone = 0, | 160 DocumentWriteInterventionNone = 0, |
161 // Based on what shouldDisallowFetchForMainFrameScript() returns. | 161 // Based on what shouldDisallowFetchForMainFrameScript() returns. |
162 // This script will be blocked if not present in http cache. | 162 // This script will be blocked if not present in http cache. |
163 DoNotFetchDocWrittenScript, | 163 DoNotFetchDocWrittenScript, |
164 // If a parser blocking doc.written script was not fetched and was not | 164 // If a parser blocking doc.written script was not fetched and was not |
165 // present in the http cache, send a GET for it with an interventions | 165 // present in the http cache, send a GET for it with an interventions |
166 // header to allow the server to know of the intervention. This fetch | 166 // header to allow the server to know of the intervention. This fetch |
167 // will be using DeferOption::IdleLoad to keep it out of the critical | 167 // will be using DeferOption::IdleLoad to keep it out of the critical |
168 // path. | 168 // path. |
169 FetchDocWrittenScriptDeferIdle, | 169 FetchDocWrittenScriptDeferIdle, |
170 }; | 170 }; |
171 | 171 |
172 DocumentWriteIntervention m_documentWriteIntervention; | 172 DocumentWriteIntervention m_documentWriteIntervention; |
173 | 173 |
174 Member<PendingScript> m_pendingScript; | 174 Member<PendingScript> m_pendingScript; |
175 }; | 175 }; |
176 | 176 |
177 ScriptLoader* toScriptLoaderIfPossible(Element*); | 177 ScriptLoader* toScriptLoaderIfPossible(Element*); |
178 | 178 |
179 } // namespace blink | 179 } // namespace blink |
180 | 180 |
181 #endif // ScriptLoader_h | 181 #endif // ScriptLoader_h |
OLD | NEW |