SVGFEImageElement.h [plain text]
#pragma once
#include "CachedImageClient.h"
#include "CachedResourceHandle.h"
#include "SVGFEImage.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
#include "SVGURIReference.h"
namespace WebCore {
class SVGFEImageElement final : public SVGFilterPrimitiveStandardAttributes, public SVGURIReference, public CachedImageClient {
WTF_MAKE_ISO_ALLOCATED(SVGFEImageElement);
public:
static Ref<SVGFEImageElement> create(const QualifiedName&, Document&);
virtual ~SVGFEImageElement();
bool hasSingleSecurityOrigin() const;
const SVGPreserveAspectRatioValue& preserveAspectRatio() const { return m_preserveAspectRatio->currentValue(); }
SVGAnimatedPreserveAspectRatio& preserveAspectRatioAnimated() { return m_preserveAspectRatio; }
private:
SVGFEImageElement(const QualifiedName&, Document&);
using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEImageElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference>;
const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
void parseAttribute(const QualifiedName&, const AtomString&) override;
void svgAttributeChanged(const QualifiedName&) override;
void notifyFinished(CachedResource&) final;
void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
void didFinishInsertingNode() override;
RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) const override;
void clearResourceReferences();
void requestImageResource();
void buildPendingResource() override;
InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
void removedFromAncestor(RemovalType, ContainerNode&) override;
PropertyRegistry m_propertyRegistry { *this };
Ref<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio { SVGAnimatedPreserveAspectRatio::create(this) };
CachedResourceHandle<CachedImage> m_cachedImage;
};
}