#pragma once
#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() const { return m_offset->currentValue(); }
SVGAnimatedNumber& offsetAnimated() { return m_offset; }
private:
SVGStopElement(const QualifiedName&, Document&);
using PropertyRegistry = SVGPropertyOwnerRegistry<SVGStopElement, SVGElement>;
const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
void parseAttribute(const QualifiedName&, const AtomString&) final;
void svgAttributeChanged(const QualifiedName&) final;
bool isGradientStop() const final { return true; }
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
bool rendererIsNeeded(const RenderStyle&) final;
PropertyRegistry m_propertyRegistry { *this };
Ref<SVGAnimatedNumber> m_offset { SVGAnimatedNumber::create(0) };
};
}