#ifndef KSVG_SVGElementImpl_H
#define KSVG_SVGElementImpl_H
#if SVG_SUPPORT
#include "StyledElement.h"
#include "SVGNames.h"
namespace WebCore {
class SVGMatrix;
class SVGSVGElement;
class SVGStyledElement;
class Ecma;
class DocumentPtr;
class SVGElement : public StyledElement
{
public:
SVGElement(const QualifiedName&, Document*);
virtual ~SVGElement();
virtual bool isSVGElement() const { return true; }
virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
String id() const;
void setId(const String&);
String xmlbase() const;
void setXmlbase(const String&);
SVGSVGElement* ownerSVGElement() const;
SVGElement* viewportElement() const;
AtomicString tryGetAttribute(const String& name, AtomicString defaultValue = AtomicString()) const;
AtomicString tryGetAttributeNS(const String& namespaceURI, const String& localName, AtomicString defaultValue = AtomicString()) const;
virtual void parseMappedAttribute(MappedAttribute*);
virtual DeprecatedString adjustViewportClipping() const { return DeprecatedString::null; }
virtual bool isStyled() const { return false; }
virtual bool isStyledTransformable() const { return false; }
virtual bool isStyledLocatable() const { return false; }
virtual bool isSVG() const { return false; }
virtual bool isFilterEffect() const { return false; }
virtual bool isGradientStop() const { return false; }
virtual bool isValid() const { return true; }
virtual void closeRenderer() { m_closed = true; }
virtual bool rendererIsNeeded(RenderStyle *) { return false; }
virtual bool childShouldCreateRenderer(Node *) const;
bool isClosed() const { return m_closed; }
private:
bool m_closed;
void addSVGEventListener(const AtomicString& eventType, const Attribute* attr);
};
};
namespace WebCore {
static inline SVGElement *svg_dynamic_cast(Node *node) {
SVGElement *svgElement = NULL;
if (node && node->isSVGElement())
svgElement = static_cast<SVGElement *>(node);
return svgElement;
}
};
#endif // SVG_SUPPORT
#endif