#pragma once
#include "XMLDocument.h"
namespace WebCore {
class SVGSVGElement;
class SVGDocument final : public XMLDocument {
WTF_MAKE_ISO_ALLOCATED(SVGDocument);
public:
static Ref<SVGDocument> create(Frame*, const Settings&, const URL&);
bool zoomAndPanEnabled() const;
void startPan(const FloatPoint& start);
void updatePan(const FloatPoint& position) const;
private:
SVGDocument(Frame*, const Settings&, const URL&);
Ref<Document> cloneDocumentWithoutChildren() const override;
FloatSize m_panningOffset;
};
inline Ref<SVGDocument> SVGDocument::create(Frame* frame, const Settings& settings, const URL& url)
{
return adoptRef(*new SVGDocument(frame, settings, url));
}
}
SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::SVGDocument)
static bool isType(const WebCore::Document& document) { return document.isSVGDocument(); }
static bool isType(const WebCore::Node& node) { return is<WebCore::Document>(node) && isType(downcast<WebCore::Document>(node)); }
SPECIALIZE_TYPE_TRAITS_END()