2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef SVGFEImageElement_h
22 #define SVGFEImageElement_h
24 #include "core/SVGNames.h"
25 #include "core/fetch/ImageResource.h"
26 #include "core/fetch/ImageResourceClient.h"
27 #include "core/fetch/ResourcePtr.h"
28 #include "core/svg/SVGAnimatedPreserveAspectRatio.h"
29 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h"
30 #include "core/svg/SVGURIReference.h"
31 #include "platform/heap/Handle.h"
35 class SVGFEImageElement final
: public SVGFilterPrimitiveStandardAttributes
,
36 public SVGURIReference
,
37 public ImageResourceClient
{
38 DEFINE_WRAPPERTYPEINFO();
39 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGFEImageElement
);
41 DECLARE_NODE_FACTORY(SVGFEImageElement
);
43 bool currentFrameHasSingleSecurityOrigin() const;
45 ~SVGFEImageElement() override
;
46 SVGAnimatedPreserveAspectRatio
* preserveAspectRatio() { return m_preserveAspectRatio
.get(); }
48 // Promptly remove as a ImageResource client.
50 DECLARE_VIRTUAL_TRACE();
53 explicit SVGFEImageElement(Document
&);
55 void svgAttributeChanged(const QualifiedName
&) override
;
56 void notifyFinished(Resource
*) override
;
58 PassRefPtrWillBeRawPtr
<FilterEffect
> build(SVGFilterBuilder
*, Filter
*) override
;
60 void clearResourceReferences();
61 void fetchImageResource();
63 void buildPendingResource() override
;
64 InsertionNotificationRequest
insertedInto(ContainerNode
*) override
;
65 void removedFrom(ContainerNode
*) override
;
67 RefPtrWillBeMember
<SVGAnimatedPreserveAspectRatio
> m_preserveAspectRatio
;
69 ResourcePtr
<ImageResource
> m_cachedImage
;
74 #endif // SVGFEImageElement_h