| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 { | 43 { |
| 44 return new ScriptLoader(element, createdByParser, isEvaluated, createdDu
ringDocumentWrite); | 44 return new ScriptLoader(element, createdByParser, isEvaluated, createdDu
ringDocumentWrite); |
| 45 } | 45 } |
| 46 | 46 |
| 47 ~ScriptLoader() override; | 47 ~ScriptLoader() override; |
| 48 DECLARE_VIRTUAL_TRACE(); | 48 DECLARE_VIRTUAL_TRACE(); |
| 49 | 49 |
| 50 Element* element() const { return m_element; } | 50 Element* element() const { return m_element; } |
| 51 | 51 |
| 52 enum LegacyTypeSupport { DisallowLegacyTypeInTypeAttribute, AllowLegacyTypeI
nTypeAttribute }; | 52 enum LegacyTypeSupport { DisallowLegacyTypeInTypeAttribute, AllowLegacyTypeI
nTypeAttribute }; |
| 53 static bool isValidScriptTypeAndLanguage(const String& typeAttributeValue, c
onst String& languageAttributeValue, LegacyTypeSupport supportLegacyTypes); | |
| 54 | |
| 55 bool prepareScript(const TextPosition& scriptStartPosition = TextPosition::m
inimumPosition(), LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute); | 53 bool prepareScript(const TextPosition& scriptStartPosition = TextPosition::m
inimumPosition(), LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute); |
| 56 | 54 |
| 57 String scriptCharset() const { return m_characterEncoding; } | 55 String scriptCharset() const { return m_characterEncoding; } |
| 58 String scriptContent() const; | 56 String scriptContent() const; |
| 59 // Returns false if and only if execution was blocked. | 57 // Returns false if and only if execution was blocked. |
| 60 bool executeScript(const ScriptSourceCode&, double* compilationFinishTime =
0); | 58 bool executeScript(const ScriptSourceCode&, double* compilationFinishTime =
0); |
| 61 virtual void execute(); | 59 virtual void execute(); |
| 62 | 60 |
| 63 // XML parser calls these | 61 // XML parser calls these |
| 64 void dispatchLoadEvent(); | 62 void dispatchLoadEvent(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 const bool m_createdDuringDocumentWrite : 1; | 122 const bool m_createdDuringDocumentWrite : 1; |
| 125 | 123 |
| 126 Member<PendingScript> m_pendingScript; | 124 Member<PendingScript> m_pendingScript; |
| 127 }; | 125 }; |
| 128 | 126 |
| 129 ScriptLoader* toScriptLoaderIfPossible(Element*); | 127 ScriptLoader* toScriptLoaderIfPossible(Element*); |
| 130 | 128 |
| 131 } // namespace blink | 129 } // namespace blink |
| 132 | 130 |
| 133 #endif // ScriptLoader_h | 131 #endif // ScriptLoader_h |
| OLD | NEW |