OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 public: | 40 public: |
41 static SVGScriptElement* create(Document&, bool wasInsertedByParser); | 41 static SVGScriptElement* create(Document&, bool wasInsertedByParser); |
42 | 42 |
43 ScriptLoader* loader() const { return m_loader.get(); } | 43 ScriptLoader* loader() const { return m_loader.get(); } |
44 | 44 |
45 #if DCHECK_IS_ON() | 45 #if DCHECK_IS_ON() |
46 bool isAnimatableAttribute(const QualifiedName&) const override; | 46 bool isAnimatableAttribute(const QualifiedName&) const override; |
47 #endif | 47 #endif |
48 | 48 |
| 49 bool isScriptElement() const override { return true; } |
| 50 |
49 DECLARE_VIRTUAL_TRACE(); | 51 DECLARE_VIRTUAL_TRACE(); |
50 | 52 |
51 private: | 53 private: |
52 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); | 54 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); |
53 | 55 |
54 void parseAttribute(const AttributeModificationParams&) override; | 56 void parseAttribute(const AttributeModificationParams&) override; |
55 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 57 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
56 void didNotifySubtreeInsertionsToDocument() override; | 58 void didNotifySubtreeInsertionsToDocument() override; |
57 void childrenChanged(const ChildrenChange&) override; | 59 void childrenChanged(const ChildrenChange&) override; |
58 void didMoveToNewDocument(Document& oldDocument) override; | 60 void didMoveToNewDocument(Document& oldDocument) override; |
59 | 61 |
60 void svgAttributeChanged(const QualifiedName&) override; | 62 void svgAttributeChanged(const QualifiedName&) override; |
61 bool isURLAttribute(const Attribute&) const override; | 63 bool isURLAttribute(const Attribute&) const override; |
62 bool isStructurallyExternal() const override { return hasSourceAttribute(); } | 64 bool isStructurallyExternal() const override { return hasSourceAttribute(); } |
63 void finishParsingChildren() override; | 65 void finishParsingChildren() override; |
64 | 66 |
65 bool haveLoadedRequiredResources() override; | 67 bool haveLoadedRequiredResources() override; |
66 | 68 |
| 69 // ScriptLoaderClient overrides: |
67 String sourceAttributeValue() const override; | 70 String sourceAttributeValue() const override; |
68 String charsetAttributeValue() const override; | |
69 String typeAttributeValue() const override; | 71 String typeAttributeValue() const override; |
70 String languageAttributeValue() const override; | 72 String textFromChildren() override; |
71 String forAttributeValue() const override; | 73 String textContent() const override; |
72 String eventAttributeValue() const override; | |
73 bool asyncAttributeValue() const override; | |
74 bool deferAttributeValue() const override; | |
75 bool hasSourceAttribute() const override; | 74 bool hasSourceAttribute() const override; |
76 | 75 bool isConnected() const override; |
| 76 bool hasChildren() const override; |
| 77 bool isNonceableElement() const; |
| 78 bool allowInlineScriptForCSP(const AtomicString& nonce, |
| 79 const WTF::OrdinalNumber&, |
| 80 const String& scriptContent) override; |
| 81 AtomicString initiatorName() const override; |
| 82 Document& document() const override; |
77 void dispatchLoadEvent() override; | 83 void dispatchLoadEvent() override; |
| 84 void dispatchErrorEvent() override; |
| 85 void setScriptElementForBinding( |
| 86 HTMLScriptElementOrSVGScriptElement&) override; |
78 | 87 |
79 Element* cloneElementWithoutAttributesAndChildren() override; | 88 Element* cloneElementWithoutAttributesAndChildren() override; |
80 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; } | 89 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; } |
81 | |
82 Member<ScriptLoader> m_loader; | |
83 }; | 90 }; |
84 | 91 |
85 } // namespace blink | 92 } // namespace blink |
86 | 93 |
87 #endif // SVGScriptElement_h | 94 #endif // SVGScriptElement_h |
OLD | NEW |