#pragma once
#include "SVGElement.h"
#include "SVGFitToViewBox.h"
#include "SVGSVGElement.h"
#include "SVGStringList.h"
#include "SVGZoomAndPan.h"
namespace WebCore {
class SVGViewElement final : public SVGElement, public SVGFitToViewBox, public SVGZoomAndPan {
WTF_MAKE_ISO_ALLOCATED(SVGViewElement);
public:
static Ref<SVGViewElement> create(const QualifiedName&, Document&);
using SVGElement::ref;
using SVGElement::deref;
const SVGSVGElement* targetElement() const { return m_targetElement.get(); }
void setTargetElement(const SVGSVGElement& targetElement) { m_targetElement = makeWeakPtr(targetElement); }
void resetTargetElement() { m_targetElement = nullptr; }
private:
SVGViewElement(const QualifiedName&, Document&);
using PropertyRegistry = SVGPropertyOwnerRegistry<SVGViewElement, SVGElement, SVGFitToViewBox>;
const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
void parseAttribute(const QualifiedName&, const AtomString&) final;
void svgAttributeChanged(const QualifiedName&) override;
bool rendererIsNeeded(const RenderStyle&) final { return false; }
PropertyRegistry m_propertyRegistry { *this };
WeakPtr<SVGSVGElement> m_targetElement { nullptr };
};
}