Bug 1890793: Assert CallArgs::newTarget is not gray. r=spidermonkey-reviewers,sfink...
[gecko.git] / dom / svg / SVGFEMergeElement.h
blobe4073851119d381a01ddacc66f2e3b72bf4a8416
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_SVGFEMERGEELEMENT_H_
8 #define DOM_SVG_SVGFEMERGEELEMENT_H_
10 #include "mozilla/dom/SVGFilters.h"
12 nsresult NS_NewSVGFEMergeElement(
13 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
15 namespace mozilla::dom {
17 using SVGFEMergeElementBase = SVGFilterPrimitiveElement;
19 class SVGFEMergeElement final : public SVGFEMergeElementBase {
20 friend nsresult(::NS_NewSVGFEMergeElement(
21 nsIContent** aResult,
22 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
24 protected:
25 explicit SVGFEMergeElement(
26 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
27 : SVGFEMergeElementBase(std::move(aNodeInfo)) {}
28 JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
30 public:
31 FilterPrimitiveDescription GetPrimitiveDescription(
32 SVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
33 const nsTArray<bool>& aInputsAreTainted,
34 nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
35 SVGAnimatedString& GetResultImageName() override {
36 return mStringAttributes[RESULT];
38 void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
40 // nsIContent
41 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
43 nsresult BindToTree(BindContext& aCtx, nsINode& aParent) override;
45 protected:
46 StringAttributesInfo GetStringInfo() override;
48 enum { RESULT };
49 SVGAnimatedString mStringAttributes[1];
50 static StringInfo sStringInfo[1];
53 } // namespace mozilla::dom
55 #endif // DOM_SVG_SVGFEMERGEELEMENT_H_