don't discard iframe children.
[kdelibs.git] / khtml / svg / SVGStyledElement.h
blob2eb1f50758669de06826f74f5692462575c31f77
1 /*
2 Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2007 Rob Buis <buis@kde.org>
5 This file is part of the KDE project
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
23 #ifndef SVGStyledElement_h
24 #define SVGStyledElement_h
26 #if ENABLE(SVG)
27 #include "AffineTransform.h"
28 #include "Path.h"
29 #include "SVGElement.h"
30 #include "SVGLength.h"
31 #include "SVGResource.h"
32 #include "SVGStylable.h"
34 //khtml compat
35 #include "RenderStyle.h"
37 namespace WebCore {
39 class SVGStyledElement : public SVGElement,
40 public SVGStylable {
41 public:
42 SVGStyledElement(const QualifiedName&, Document*);
43 virtual ~SVGStyledElement();
45 virtual bool isStyled() const { return true; }
46 virtual bool supportsMarkers() const { return false; }
48 virtual PassRefPtr<CSSValue> getPresentationAttribute(const String& name);
49 virtual CSSStyleDeclaration* style() { return StyledElement::style(); }
51 bool isKnownAttribute(const QualifiedName&);
53 virtual bool rendererIsNeeded(RenderStyle*);
54 virtual SVGResource* canvasResource() { return 0; }
56 /*virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;*/
57 virtual void parseMappedAttribute(MappedAttribute*);
59 virtual void svgAttributeChanged(const QualifiedName&);
61 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
63 // Centralized place to force a manual style resolution. Hacky but needed for now.
64 RenderStyle* resolveStyle(RenderStyle* parentStyle);
66 void invalidateResourcesInAncestorChain() const;
67 virtual void detach();
69 void setInstanceUpdatesBlocked(bool);
71 protected:
72 virtual bool hasRelativeValues() const { return true; }
74 static int cssPropertyIdForSVGAttributeName(const QualifiedName&);
76 private:
77 ANIMATED_PROPERTY_DECLARATIONS(SVGStyledElement, String, String, ClassName, className)
79 void updateElementInstance(SVGDocumentExtensions*) const;
82 } // namespace WebCore
84 #endif // ENABLE(SVG)
85 #endif // SVGStyledElement