Bug 1936278 - Prevent search mode chiclet from being dismissed when clicking in page...
[gecko.git] / dom / svg / SVGFEComponentTransferElement.h
bloba9c8d59698281616a773cde5582abbd03b30033c
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_SVGFECOMPONENTTRANSFERELEMENT_H_
8 #define DOM_SVG_SVGFECOMPONENTTRANSFERELEMENT_H_
10 #include "mozilla/dom/SVGFilters.h"
12 nsresult NS_NewSVGFEComponentTransferElement(
13 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
15 namespace mozilla::dom {
17 using SVGFEComponentTransferElementBase = SVGFilterPrimitiveElement;
19 class SVGFEComponentTransferElement final
20 : public SVGFEComponentTransferElementBase {
21 friend nsresult(::NS_NewSVGFEComponentTransferElement(
22 nsIContent** aResult,
23 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
25 protected:
26 explicit SVGFEComponentTransferElement(
27 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
28 : SVGFEComponentTransferElementBase(std::move(aNodeInfo)) {}
29 JSObject* WrapNode(JSContext* aCx,
30 JS::Handle<JSObject*> aGivenProto) override;
32 public:
33 FilterPrimitiveDescription GetPrimitiveDescription(
34 SVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
35 const nsTArray<bool>& aInputsAreTainted,
36 nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
37 bool AttributeAffectsRendering(int32_t aNameSpaceID,
38 nsAtom* aAttribute) const override;
39 SVGAnimatedString& GetResultImageName() override {
40 return mStringAttributes[RESULT];
42 void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
44 // nsIContent
45 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
47 nsresult BindToTree(BindContext&, nsINode& aParent) override;
49 // WebIDL
50 already_AddRefed<DOMSVGAnimatedString> In1();
52 protected:
53 StringAttributesInfo GetStringInfo() override;
55 enum { RESULT, IN1 };
56 SVGAnimatedString mStringAttributes[2];
57 static StringInfo sStringInfo[2];
60 } // namespace mozilla::dom
62 #endif // DOM_SVG_SVGFECOMPONENTTRANSFERELEMENT_H_