#pragma once
#include "SVGAnimatedNumber.h"
#include "SVGElement.h"
namespace WebCore {
class SVGStopElement final : public SVGElement {
WTF_MAKE_ISO_ALLOCATED(SVGStopElement);
public:
static Ref<SVGStopElement> create(const QualifiedName&, Document&);
Color stopColorIncludingOpacity() const;
float offset() { return m_offset.currentValue(attributeOwnerProxy()); }
RefPtr<SVGAnimatedNumber> offsetAnimated() { return m_offset.animatedProperty(attributeOwnerProxy()); }
private:
SVGStopElement(const QualifiedName&, Document&);
using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGStopElement, SVGElement>;
static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
static void registerAttributes();
const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
void parseAttribute(const QualifiedName&, const AtomicString&) final;
void svgAttributeChanged(const QualifiedName&) final;
bool isGradientStop() const final { return true; }
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
bool rendererIsNeeded(const RenderStyle&) final;
AttributeOwnerProxy m_attributeOwnerProxy { *this };
SVGAnimatedNumberAttribute m_offset { 0 };
};
}