#ifndef SVGTextPathElement_h
#define SVGTextPathElement_h
#include "SVGNames.h"
#include "core/svg/SVGTextContentElement.h"
#include "core/svg/SVGURIReference.h"
namespace WebCore {
enum SVGTextPathMethodType {
SVGTextPathMethodUnknown = 0,
SVGTextPathMethodAlign,
SVGTextPathMethodStretch
};
enum SVGTextPathSpacingType {
SVGTextPathSpacingUnknown = 0,
SVGTextPathSpacingAuto,
SVGTextPathSpacingExact
};
template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGTextPathMethodType>();
template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGTextPathSpacingType>();
class SVGTextPathElement FINAL : public SVGTextContentElement,
public SVGURIReference {
public:
enum {
TEXTPATH_METHODTYPE_UNKNOWN = SVGTextPathMethodUnknown,
TEXTPATH_METHODTYPE_ALIGN = SVGTextPathMethodAlign,
TEXTPATH_METHODTYPE_STRETCH = SVGTextPathMethodStretch,
TEXTPATH_SPACINGTYPE_UNKNOWN = SVGTextPathSpacingUnknown,
TEXTPATH_SPACINGTYPE_AUTO = SVGTextPathSpacingAuto,
TEXTPATH_SPACINGTYPE_EXACT = SVGTextPathSpacingExact
};
static PassRefPtr<SVGTextPathElement> create(Document&);
SVGAnimatedLength* startOffset() const { return m_startOffset.get(); }
SVGAnimatedEnumeration<SVGTextPathMethodType>* method() { return m_method.get(); }
SVGAnimatedEnumeration<SVGTextPathSpacingType>* spacing() { return m_spacing.get(); }
private:
explicit SVGTextPathElement(Document&);
virtual ~SVGTextPathElement();
void clearResourceReferences();
virtual void buildPendingResource() OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void removedFrom(ContainerNode*) OVERRIDE;
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
virtual bool selfHasRelativeLengths() const OVERRIDE;
RefPtr<SVGAnimatedLength> m_startOffset;
RefPtr<SVGAnimatedEnumeration<SVGTextPathMethodType> > m_method;
RefPtr<SVGAnimatedEnumeration<SVGTextPathSpacingType> > m_spacing;
};
}
#endif