Bug 1941128 - Turn off network.dns.native_https_query on Mac again
[gecko.git] / dom / svg / SVGFEDropShadowElement.h
blob969487b1998c5110fe726c067d038e62f328797f
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_SVGFEDROPSHADOWELEMENT_H_
8 #define DOM_SVG_SVGFEDROPSHADOWELEMENT_H_
10 #include "SVGAnimatedNumber.h"
11 #include "SVGAnimatedNumberPair.h"
12 #include "SVGAnimatedString.h"
13 #include "mozilla/dom/SVGFilters.h"
15 nsresult NS_NewSVGFEDropShadowElement(
16 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
18 namespace mozilla::dom {
20 using SVGFEDropShadowElementBase = SVGFilterPrimitiveElement;
22 class SVGFEDropShadowElement final : public SVGFEDropShadowElementBase {
23 friend nsresult(::NS_NewSVGFEDropShadowElement(
24 nsIContent** aResult,
25 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
27 protected:
28 explicit SVGFEDropShadowElement(
29 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
30 : SVGFEDropShadowElementBase(std::move(aNodeInfo)) {}
31 JSObject* WrapNode(JSContext* aCx,
32 JS::Handle<JSObject*> aGivenProto) override;
34 public:
35 FilterPrimitiveDescription GetPrimitiveDescription(
36 SVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
37 const nsTArray<bool>& aInputsAreTainted,
38 nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
39 bool AttributeAffectsRendering(int32_t aNameSpaceID,
40 nsAtom* aAttribute) const override;
41 SVGAnimatedString& GetResultImageName() override {
42 return mStringAttributes[RESULT];
45 bool OutputIsTainted(const nsTArray<bool>& aInputsAreTainted,
46 nsIPrincipal* aReferencePrincipal) override;
48 void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
50 // nsIContent interface
51 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
53 // WebIDL
54 already_AddRefed<DOMSVGAnimatedString> In1();
55 already_AddRefed<DOMSVGAnimatedNumber> Dx();
56 already_AddRefed<DOMSVGAnimatedNumber> Dy();
57 already_AddRefed<DOMSVGAnimatedNumber> StdDeviationX();
58 already_AddRefed<DOMSVGAnimatedNumber> StdDeviationY();
59 void SetStdDeviation(float stdDeviationX, float stdDeviationY);
61 protected:
62 NumberAttributesInfo GetNumberInfo() override;
63 NumberPairAttributesInfo GetNumberPairInfo() override;
64 StringAttributesInfo GetStringInfo() override;
66 enum { DX, DY };
67 SVGAnimatedNumber mNumberAttributes[2];
68 static NumberInfo sNumberInfo[2];
70 enum { STD_DEV };
71 SVGAnimatedNumberPair mNumberPairAttributes[1];
72 static NumberPairInfo sNumberPairInfo[1];
74 enum { RESULT, IN1 };
75 SVGAnimatedString mStringAttributes[2];
76 static StringInfo sStringInfo[2];
79 } // namespace mozilla::dom
81 #endif // DOM_SVG_SVGFEDROPSHADOWELEMENT_H_