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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 virtual ~ScriptLoader(); | 46 virtual ~ScriptLoader(); |
47 DECLARE_VIRTUAL_TRACE(); | 47 DECLARE_VIRTUAL_TRACE(); |
48 | 48 |
49 Element* element() const { return m_element; } | 49 Element* element() const { return m_element; } |
50 | 50 |
51 enum LegacyTypeSupport { DisallowLegacyTypeInTypeAttribute, AllowLegacyTypeI
nTypeAttribute }; | 51 enum LegacyTypeSupport { DisallowLegacyTypeInTypeAttribute, AllowLegacyTypeI
nTypeAttribute }; |
52 bool prepareScript(const TextPosition& scriptStartPosition = TextPosition::m
inimumPosition(), LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute); | 52 bool prepareScript(const TextPosition& scriptStartPosition = TextPosition::m
inimumPosition(), LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute); |
53 | 53 |
54 String scriptCharset() const { return m_characterEncoding; } | 54 String scriptCharset() const { return m_characterEncoding; } |
55 String scriptContent() const; | 55 String scriptContent() const; |
56 void executeScript(const ScriptSourceCode&, double* compilationFinishTime =
0); | 56 // Returns false if and only if execution was blocked. |
| 57 bool executeScript(const ScriptSourceCode&, double* compilationFinishTime =
0); |
57 virtual void execute(); | 58 virtual void execute(); |
58 | 59 |
59 // XML parser calls these | 60 // XML parser calls these |
60 void dispatchLoadEvent(); | 61 void dispatchLoadEvent(); |
61 void dispatchErrorEvent(); | 62 void dispatchErrorEvent(); |
62 bool isScriptTypeSupported(LegacyTypeSupport) const; | 63 bool isScriptTypeSupported(LegacyTypeSupport) const; |
63 | 64 |
64 bool haveFiredLoadEvent() const { return m_haveFiredLoad; } | 65 bool haveFiredLoadEvent() const { return m_haveFiredLoad; } |
65 bool willBeParserExecuted() const { return m_willBeParserExecuted; } | 66 bool willBeParserExecuted() const { return m_willBeParserExecuted; } |
66 bool readyToBeParserExecuted() const { return m_readyToBeParserExecuted; } | 67 bool readyToBeParserExecuted() const { return m_readyToBeParserExecuted; } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 bool m_willExecuteWhenDocumentFinishedParsing : 1; | 115 bool m_willExecuteWhenDocumentFinishedParsing : 1; |
115 bool m_forceAsync : 1; | 116 bool m_forceAsync : 1; |
116 bool m_willExecuteInOrder : 1; | 117 bool m_willExecuteInOrder : 1; |
117 }; | 118 }; |
118 | 119 |
119 ScriptLoader* toScriptLoaderIfPossible(Element*); | 120 ScriptLoader* toScriptLoaderIfPossible(Element*); |
120 | 121 |
121 } // namespace blink | 122 } // namespace blink |
122 | 123 |
123 #endif // ScriptLoader_h | 124 #endif // ScriptLoader_h |
OLD | NEW |