SVGCursorElement.h [plain text]
#pragma once
#include "SVGElement.h"
#include "SVGTests.h"
#include "SVGURIReference.h"
namespace WebCore {
class CSSCursorImageValue;
class SVGCursorElement final : public SVGElement, public SVGTests, public SVGURIReference {
WTF_MAKE_ISO_ALLOCATED(SVGCursorElement);
public:
static Ref<SVGCursorElement> create(const QualifiedName&, Document&);
virtual ~SVGCursorElement();
void addClient(CSSCursorImageValue&);
void removeClient(CSSCursorImageValue&);
const SVGLengthValue& x() const { return m_x->currentValue(); }
const SVGLengthValue& y() const { return m_y->currentValue(); }
SVGAnimatedLength& xAnimated() { return m_x; }
SVGAnimatedLength& yAnimated() { return m_y; }
private:
SVGCursorElement(const QualifiedName&, Document&);
using PropertyRegistry = SVGPropertyOwnerRegistry<SVGCursorElement, SVGElement, SVGTests, SVGURIReference>;
const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
void parseAttribute(const QualifiedName&, const AtomString&) final;
void svgAttributeChanged(const QualifiedName&) final;
bool isValid() const final { return SVGTests::isValid(); }
bool rendererIsNeeded(const RenderStyle&) final { return false; }
void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
PropertyRegistry m_propertyRegistry { *this };
Ref<SVGAnimatedLength> m_x { SVGAnimatedLength::create(this, SVGLengthMode::Width) };
Ref<SVGAnimatedLength> m_y { SVGAnimatedLength::create(this, SVGLengthMode::Height) };
HashSet<CSSCursorImageValue*> m_clients;
};
}