Bug 1691109 [wpt PR 27513] - Increase timeout duration for wpt/fetch/api/basic/keepal...
[gecko.git] / dom / svg / SVGFEGaussianBlurElement.h
blobaeed2be8d6015912176f590cf9b9c683e2be6338
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_SVGFEGAUSSIANBLURELEMENT_H_
8 #define DOM_SVG_SVGFEGAUSSIANBLURELEMENT_H_
10 #include "SVGAnimatedNumberPair.h"
11 #include "SVGAnimatedString.h"
12 #include "mozilla/dom/SVGFilters.h"
14 nsresult NS_NewSVGFEGaussianBlurElement(
15 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
17 namespace mozilla {
18 namespace dom {
20 using SVGFEGaussianBlurElementBase = SVGFE;
22 class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase {
23 friend nsresult(::NS_NewSVGFEGaussianBlurElement(
24 nsIContent** aResult,
25 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
27 protected:
28 explicit SVGFEGaussianBlurElement(
29 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
30 : SVGFEGaussianBlurElementBase(std::move(aNodeInfo)) {}
31 virtual JSObject* WrapNode(JSContext* aCx,
32 JS::Handle<JSObject*> aGivenProto) override;
34 public:
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;
48 // WebIDL
49 already_AddRefed<DOMSVGAnimatedString> In1();
50 already_AddRefed<DOMSVGAnimatedNumber> StdDeviationX();
51 already_AddRefed<DOMSVGAnimatedNumber> StdDeviationY();
52 void SetStdDeviation(float stdDeviationX, float stdDeviationY);
54 protected:
55 virtual NumberPairAttributesInfo GetNumberPairInfo() override;
56 virtual StringAttributesInfo GetStringInfo() override;
58 enum { STD_DEV };
59 SVGAnimatedNumberPair mNumberPairAttributes[1];
60 static NumberPairInfo sNumberPairInfo[1];
62 enum { RESULT, IN1 };
63 SVGAnimatedString mStringAttributes[2];
64 static StringInfo sStringInfo[2];
67 } // namespace dom
68 } // namespace mozilla
70 #endif // DOM_SVG_SVGFEGAUSSIANBLURELEMENT_H_