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 // ScriptLoaderClient |
| 50 AtomicString nonce() const override { return m_nonce; } |
| 51 void setNonce(const String& nonce) override { m_nonce = AtomicString(nonce); } |
| 52 void clearNonce() override { m_nonce = nullAtom; } |
| 53 |
49 DECLARE_VIRTUAL_TRACE(); | 54 DECLARE_VIRTUAL_TRACE(); |
50 | 55 |
51 private: | 56 private: |
52 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); | 57 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); |
53 | 58 |
54 void parseAttribute(const AttributeModificationParams&) override; | 59 void parseAttribute(const AttributeModificationParams&) override; |
55 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 60 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
56 void didNotifySubtreeInsertionsToDocument() override; | 61 void didNotifySubtreeInsertionsToDocument() override; |
57 void childrenChanged(const ChildrenChange&) override; | 62 void childrenChanged(const ChildrenChange&) override; |
58 void didMoveToNewDocument(Document& oldDocument) override; | 63 void didMoveToNewDocument(Document& oldDocument) override; |
(...skipping 14 matching lines...) Expand all Loading... |
73 bool asyncAttributeValue() const override; | 78 bool asyncAttributeValue() const override; |
74 bool deferAttributeValue() const override; | 79 bool deferAttributeValue() const override; |
75 bool hasSourceAttribute() const override; | 80 bool hasSourceAttribute() const override; |
76 | 81 |
77 void dispatchLoadEvent() override; | 82 void dispatchLoadEvent() override; |
78 | 83 |
79 Element* cloneElementWithoutAttributesAndChildren() override; | 84 Element* cloneElementWithoutAttributesAndChildren() override; |
80 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; } | 85 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; } |
81 | 86 |
82 Member<ScriptLoader> m_loader; | 87 Member<ScriptLoader> m_loader; |
| 88 AtomicString m_nonce; |
83 }; | 89 }; |
84 | 90 |
85 } // namespace blink | 91 } // namespace blink |
86 | 92 |
87 #endif // SVGScriptElement_h | 93 #endif // SVGScriptElement_h |
OLD | NEW |