#ifndef SVGFEImageElement_h
#define SVGFEImageElement_h
#include "SVGNames.h"
#include "core/fetch/ImageResource.h"
#include "core/fetch/ResourcePtr.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGAnimatedPreserveAspectRatio.h"
#include "core/svg/SVGFilterPrimitiveStandardAttributes.h"
#include "core/svg/SVGURIReference.h"
#include "core/svg/graphics/filters/SVGFEImage.h"
#include "platform/graphics/ImageBuffer.h"
namespace WebCore {
class SVGFEImageElement FINAL : public SVGFilterPrimitiveStandardAttributes,
public SVGURIReference,
public ImageResourceClient {
public:
static PassRefPtr<SVGFEImageElement> create(Document&);
bool currentFrameHasSingleSecurityOrigin() const;
virtual ~SVGFEImageElement();
SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAspectRatio.get(); }
private:
explicit SVGFEImageElement(Document&);
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
virtual void notifyFinished(Resource*) OVERRIDE;
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) OVERRIDE;
void clearResourceReferences();
void fetchImageResource();
virtual void buildPendingResource() OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void removedFrom(ContainerNode*) OVERRIDE;
RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio;
ResourcePtr<ImageResource> m_cachedImage;
};
}
#endif