1/*
2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB.  If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef SVGForeignObjectElement_h
21#define SVGForeignObjectElement_h
22
23#if ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT)
24#include "SVGAnimatedBoolean.h"
25#include "SVGAnimatedLength.h"
26#include "SVGExternalResourcesRequired.h"
27#include "SVGLangSpace.h"
28#include "SVGStyledTransformableElement.h"
29#include "SVGTests.h"
30#include "SVGURIReference.h"
31
32namespace WebCore {
33
34class SVGForeignObjectElement : public SVGStyledTransformableElement,
35                                public SVGTests,
36                                public SVGLangSpace,
37                                public SVGExternalResourcesRequired {
38public:
39    static PassRefPtr<SVGForeignObjectElement> create(const QualifiedName&, Document*);
40
41private:
42    SVGForeignObjectElement(const QualifiedName&, Document*);
43
44    virtual bool isValid() const { return SVGTests::isValid(); }
45    virtual void parseMappedAttribute(Attribute*);
46    virtual void svgAttributeChanged(const QualifiedName&);
47    virtual void synchronizeProperty(const QualifiedName&);
48    virtual void fillAttributeToPropertyTypeMap();
49    virtual AttributeToPropertyTypeMap& attributeToPropertyTypeMap();
50
51    virtual bool childShouldCreateRenderer(Node*) const;
52    virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style);
53
54    virtual bool selfHasRelativeLengths() const;
55
56    // Animated property declarations
57    DECLARE_ANIMATED_LENGTH(X, x)
58    DECLARE_ANIMATED_LENGTH(Y, y)
59    DECLARE_ANIMATED_LENGTH(Width, width)
60    DECLARE_ANIMATED_LENGTH(Height, height)
61
62    // SVGURIReference
63    DECLARE_ANIMATED_STRING(Href, href)
64
65    // SVGExternalResourcesRequired
66    DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
67};
68
69} // namespace WebCore
70
71#endif // ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT)
72#endif
73