#ifndef SVGStopElement_h
#define SVGStopElement_h
#if ENABLE(SVG)
#include "SVGAnimatedNumber.h"
#include "SVGStyledElement.h"
namespace WebCore {
class SVGStopElement FINAL : public SVGStyledElement {
public:
static PassRefPtr<SVGStopElement> create(const QualifiedName&, Document*);
Color stopColorIncludingOpacity() const;
private:
SVGStopElement(const QualifiedName&, Document*);
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual void svgAttributeChanged(const QualifiedName&);
virtual bool isGradientStop() const OVERRIDE { return true; }
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGStopElement)
DECLARE_ANIMATED_NUMBER(Offset, offset)
END_DECLARE_ANIMATED_PROPERTIES
};
inline SVGStopElement* toSVGStopElement(SVGElement* element)
{
ASSERT_WITH_SECURITY_IMPLICATION(!element || element->isGradientStop());
return static_cast<SVGStopElement*>(element);
}
}
#endif // ENABLE(SVG)
#endif