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