18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/*
2dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
4dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch *
5dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * This library is free software; you can redistribute it and/or
6dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * modify it under the terms of the GNU Library General Public
7dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * License as published by the Free Software Foundation; either
8dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * version 2 of the License, or (at your option) any later version.
9dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch *
10dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * This library is distributed in the hope that it will be useful,
11dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * but WITHOUT ANY WARRANTY; without even the implied warranty of
12dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * Library General Public License for more details.
14dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch *
15dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * You should have received a copy of the GNU Library General Public License
16dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * along with this library; see the file COPYING.LIB.  If not, write to
17dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch * Boston, MA 02110-1301, USA.
19dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch */
208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef SVGScriptElement_h
228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define SVGScriptElement_h
238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#if ENABLE(SVG)
25f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "SVGAnimatedBoolean.h"
26f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "SVGAnimatedString.h"
278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "SVGElement.h"
288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "SVGExternalResourcesRequired.h"
29e14391e94c850b8bd03680c23b38978db68687a8John Reck#include "SVGURIReference.h"
30e14391e94c850b8bd03680c23b38978db68687a8John Reck#include "ScriptElement.h"
318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore {
338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
34f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochclass SVGScriptElement : public SVGElement
35f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch                       , public SVGURIReference
36f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch                       , public SVGExternalResourcesRequired
37f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch                       , public ScriptElement {
38f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochpublic:
39f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document*, bool wasInsertedByParser);
405ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen
41f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    String type() const;
42f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    void setType(const String&);
435ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen
44f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochprivate:
4581bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch    SVGScriptElement(const QualifiedName&, Document*, bool wasInsertedByParser, bool alreadyStarted);
468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
47f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void parseMappedAttribute(Attribute*);
48f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void insertedIntoDocument();
49f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void removedFromDocument();
50f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
52f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void svgAttributeChanged(const QualifiedName&);
53f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void synchronizeProperty(const QualifiedName&);
542fc2651226baac27029e38c9d6ef883fa32084dbSteve Block    virtual void fillAttributeToPropertyTypeMap();
552fc2651226baac27029e38c9d6ef883fa32084dbSteve Block    virtual AttributeToPropertyTypeMap& attributeToPropertyTypeMap();
56f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual bool isURLAttribute(Attribute*) const;
57f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void finishParsingChildren();
588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
59f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
61f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual bool haveLoadedRequiredResources();
628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
63f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual String sourceAttributeValue() const;
64f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual String charsetAttributeValue() const;
65f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual String typeAttributeValue() const;
66f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual String languageAttributeValue() const;
67f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual String forAttributeValue() const;
68f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual String eventAttributeValue() const;
69f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual bool asyncAttributeValue() const;
70f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual bool deferAttributeValue() const;
7181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch    virtual bool hasSourceAttribute() const;
728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
73f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void dispatchLoadEvent();
74f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    virtual void dispatchErrorEvent();
758e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
76f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() const;
776b70adc33054f8aee8c54d0f460458a9df11b8a5Russell Brenner
78f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    // Animated property declarations
79231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block
80f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    // SVGURIReference
81f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    DECLARE_ANIMATED_STRING(Href, href)
82cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
83f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    // SVGExternalResourcesRequired
84f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
85f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
86f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    String m_type;
87f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch};
888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} // namespace WebCore
908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif // ENABLE(SVG)
928e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif
93