SVGFEImageElement.h [plain text]
#pragma once
#include "CachedImageClient.h"
#include "CachedResourceHandle.h"
#include "SVGAnimatedBoolean.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFEImage.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
#include "SVGURIReference.h"
namespace WebCore {
class SVGFEImageElement final : public SVGFilterPrimitiveStandardAttributes, public SVGExternalResourcesRequired, 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(attributeOwnerProxy()); }
RefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated() { return m_preserveAspectRatio.animatedProperty(attributeOwnerProxy()); }
private:
SVGFEImageElement(const QualifiedName&, Document&);
using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEImageElement, SVGFilterPrimitiveStandardAttributes, SVGExternalResourcesRequired, SVGURIReference>;
static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
static void registerAttributes();
const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
void parseAttribute(const QualifiedName&, const AtomicString&) override;
void svgAttributeChanged(const QualifiedName&) override;
void notifyFinished(CachedResource&) final;
void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
void didFinishInsertingNode() override;
RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
void clearResourceReferences();
void requestImageResource();
void buildPendingResource() override;
InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
void removedFromAncestor(RemovalType, ContainerNode&) override;
AttributeOwnerProxy m_attributeOwnerProxy { *this };
SVGAnimatedPreserveAspectRatioAttribute m_preserveAspectRatio;
CachedResourceHandle<CachedImage> m_cachedImage;
};
}