1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_SVG_SVGFETILEELEMENT_H_
8 #define DOM_SVG_SVGFETILEELEMENT_H_
10 #include "mozilla/dom/SVGFilters.h"
12 nsresult
NS_NewSVGFETileElement(
13 nsIContent
** aResult
, already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
18 using SVGFETileElementBase
= SVGFE
;
20 class SVGFETileElement
: public SVGFETileElementBase
{
21 friend nsresult(::NS_NewSVGFETileElement(
23 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
));
26 explicit SVGFETileElement(
27 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
)
28 : SVGFETileElementBase(std::move(aNodeInfo
)) {}
29 virtual JSObject
* WrapNode(JSContext
* cx
,
30 JS::Handle
<JSObject
*> aGivenProto
) override
;
33 virtual bool SubregionIsUnionOfRegions() override
{ return false; }
35 virtual FilterPrimitiveDescription
GetPrimitiveDescription(
36 SVGFilterInstance
* aInstance
, const IntRect
& aFilterSubregion
,
37 const nsTArray
<bool>& aInputsAreTainted
,
38 nsTArray
<RefPtr
<SourceSurface
>>& aInputImages
) override
;
39 virtual bool AttributeAffectsRendering(int32_t aNameSpaceID
,
40 nsAtom
* aAttribute
) const override
;
41 virtual SVGAnimatedString
& GetResultImageName() override
{
42 return mStringAttributes
[RESULT
];
44 virtual void GetSourceImageNames(nsTArray
<SVGStringInfo
>& aSources
) override
;
46 virtual nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
49 already_AddRefed
<DOMSVGAnimatedString
> In1();
52 virtual StringAttributesInfo
GetStringInfo() override
;
55 SVGAnimatedString mStringAttributes
[2];
56 static StringInfo sStringInfo
[2];
60 } // namespace mozilla
62 #endif // DOM_SVG_SVGFETILEELEMENT_H_