Bug 1936278 - Prevent search mode chiclet from being dismissed when clicking in page...
[gecko.git] / dom / svg / SVGFEBlendElement.h
blobd5532c6d8c4cd0391220f17303cd2f00e04dcbf8
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_SVGFEBLENDELEMENT_H_
8 #define DOM_SVG_SVGFEBLENDELEMENT_H_
10 #include "SVGAnimatedEnumeration.h"
11 #include "mozilla/dom/SVGFilters.h"
13 nsresult NS_NewSVGFEBlendElement(
14 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
15 namespace mozilla::dom {
17 using SVGFEBlendElementBase = SVGFilterPrimitiveElement;
19 class SVGFEBlendElement final : public SVGFEBlendElementBase {
20 friend nsresult(::NS_NewSVGFEBlendElement(
21 nsIContent** aResult,
22 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
24 protected:
25 explicit SVGFEBlendElement(
26 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
27 : SVGFEBlendElementBase(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 bool AttributeAffectsRendering(int32_t aNameSpaceID,
36 nsAtom* aAttribute) const override;
37 SVGAnimatedString& GetResultImageName() override {
38 return mStringAttributes[RESULT];
40 void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
42 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
44 nsresult BindToTree(BindContext&, nsINode& aParent) override;
46 // WebIDL
47 already_AddRefed<DOMSVGAnimatedString> In1();
48 already_AddRefed<DOMSVGAnimatedString> In2();
49 already_AddRefed<DOMSVGAnimatedEnumeration> Mode();
51 protected:
52 EnumAttributesInfo GetEnumInfo() override;
53 StringAttributesInfo GetStringInfo() override;
55 enum { MODE };
56 SVGAnimatedEnumeration mEnumAttributes[1];
57 static SVGEnumMapping sModeMap[];
58 static EnumInfo sEnumInfo[1];
60 enum { RESULT, IN1, IN2 };
61 SVGAnimatedString mStringAttributes[3];
62 static StringInfo sStringInfo[3];
65 } // namespace mozilla::dom
67 #endif // DOM_SVG_SVGFEBLENDELEMENT_H_