Bug 1691109 [wpt PR 27513] - Increase timeout duration for wpt/fetch/api/basic/keepal...
[gecko.git] / dom / svg / SVGFEPointLightElement.h
blob4a98f1f921b6ab9a064ca87d9f494d8e69c82e84
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_SVGFEPOINTLIGHTELEMENT_H_
8 #define DOM_SVG_SVGFEPOINTLIGHTELEMENT_H_
10 #include "SVGAnimatedNumber.h"
11 #include "mozilla/dom/SVGFilters.h"
13 nsresult NS_NewSVGFEPointLightElement(
14 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
16 namespace mozilla {
17 namespace dom {
19 using SVGFEPointLightElementBase = SVGFELightElement;
21 class SVGFEPointLightElement : public SVGFEPointLightElementBase {
22 friend nsresult(::NS_NewSVGFEPointLightElement(
23 nsIContent** aResult,
24 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
26 protected:
27 explicit SVGFEPointLightElement(
28 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
29 : SVGFEPointLightElementBase(std::move(aNodeInfo)) {}
30 virtual JSObject* WrapNode(JSContext* cx,
31 JS::Handle<JSObject*> aGivenProto) override;
33 public:
34 virtual mozilla::gfx::LightType ComputeLightAttributes(
35 SVGFilterInstance* aInstance, nsTArray<float>& aFloatAttributes) override;
36 virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
37 nsAtom* aAttribute) const override;
39 virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
41 // WebIDL
42 already_AddRefed<DOMSVGAnimatedNumber> X();
43 already_AddRefed<DOMSVGAnimatedNumber> Y();
44 already_AddRefed<DOMSVGAnimatedNumber> Z();
46 protected:
47 virtual NumberAttributesInfo GetNumberInfo() override;
49 enum { ATTR_X, ATTR_Y, ATTR_Z };
50 SVGAnimatedNumber mNumberAttributes[3];
51 static NumberInfo sNumberInfo[3];
54 } // namespace dom
55 } // namespace mozilla
57 #endif // DOM_SVG_SVGFEPOINTLIGHTELEMENT_H_