| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #ifndef SVGScriptElement_h | 21 #ifndef SVGScriptElement_h |
| 22 #define SVGScriptElement_h | 22 #define SVGScriptElement_h |
| 23 | 23 |
| 24 #include "core/SVGNames.h" | 24 #include "core/SVGNames.h" |
| 25 #include "core/dom/ScriptLoader.h" |
| 25 #include "core/dom/ScriptLoaderClient.h" | 26 #include "core/dom/ScriptLoaderClient.h" |
| 26 #include "core/svg/SVGAnimatedBoolean.h" | 27 #include "core/svg/SVGAnimatedBoolean.h" |
| 27 #include "core/svg/SVGAnimatedString.h" | 28 #include "core/svg/SVGAnimatedString.h" |
| 28 #include "core/svg/SVGElement.h" | 29 #include "core/svg/SVGElement.h" |
| 29 #include "core/svg/SVGURIReference.h" | 30 #include "core/svg/SVGURIReference.h" |
| 30 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 31 | 32 |
| 32 namespace blink { | 33 namespace blink { |
| 33 | 34 |
| 34 class ScriptLoader; | 35 class ScriptLoader; |
| 35 | 36 |
| 36 class SVGScriptElement final | 37 class SVGScriptElement final |
| 37 : public SVGElement | 38 : public SVGElement |
| 38 , public SVGURIReference | 39 , public SVGURIReference |
| 39 , public ScriptLoaderClient { | 40 , public ScriptLoaderClient { |
| 40 DEFINE_WRAPPERTYPEINFO(); | 41 DEFINE_WRAPPERTYPEINFO(); |
| 41 USING_GARBAGE_COLLECTED_MIXIN(SVGScriptElement); | 42 USING_GARBAGE_COLLECTED_MIXIN(SVGScriptElement); |
| 42 public: | 43 public: |
| 43 static SVGScriptElement* create(Document&, bool wasInsertedByParser); | 44 static SVGScriptElement* create(Document&, int constructionContextFlags); |
| 44 | 45 |
| 45 ScriptLoader* loader() const { return m_loader.get(); } | 46 ScriptLoader* loader() const { return m_loader.get(); } |
| 46 | 47 |
| 47 #if ENABLE(ASSERT) | 48 #if ENABLE(ASSERT) |
| 48 bool isAnimatableAttribute(const QualifiedName&) const override; | 49 bool isAnimatableAttribute(const QualifiedName&) const override; |
| 49 #endif | 50 #endif |
| 50 | 51 |
| 51 DECLARE_VIRTUAL_TRACE(); | 52 DECLARE_VIRTUAL_TRACE(); |
| 52 | 53 |
| 53 private: | 54 private: |
| 54 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); | 55 SVGScriptElement(Document&, int constructionContextFlags); |
| 55 | 56 |
| 56 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; | 57 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
| 57 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 58 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 58 void didNotifySubtreeInsertionsToDocument() override; | 59 void didNotifySubtreeInsertionsToDocument() override; |
| 59 void childrenChanged(const ChildrenChange&) override; | 60 void childrenChanged(const ChildrenChange&) override; |
| 60 void didMoveToNewDocument(Document& oldDocument) override; | 61 void didMoveToNewDocument(Document& oldDocument) override; |
| 61 | 62 |
| 62 void svgAttributeChanged(const QualifiedName&) override; | 63 void svgAttributeChanged(const QualifiedName&) override; |
| 63 bool isURLAttribute(const Attribute&) const override; | 64 bool isURLAttribute(const Attribute&) const override; |
| 64 bool isStructurallyExternal() const override { return hasSourceAttribute();
} | 65 bool isStructurallyExternal() const override { return hasSourceAttribute();
} |
| (...skipping 15 matching lines...) Expand all Loading... |
| 80 | 81 |
| 81 RawPtr<Element> cloneElementWithoutAttributesAndChildren() override; | 82 RawPtr<Element> cloneElementWithoutAttributesAndChildren() override; |
| 82 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; } | 83 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; } |
| 83 | 84 |
| 84 Member<ScriptLoader> m_loader; | 85 Member<ScriptLoader> m_loader; |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace blink | 88 } // namespace blink |
| 88 | 89 |
| 89 #endif // SVGScriptElement_h | 90 #endif // SVGScriptElement_h |
| OLD | NEW |