Bug 1635304 [wpt PR 23392] - Remove erroneous named properties object test, a=testonly
[gecko.git] / dom / svg / SVGFEPointLightElement.h
blobed98503f568bbf4fd690435076c7a55d500d9e7d
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 mozilla_dom_SVGFEPointLightElement_h
8 #define mozilla_dom_SVGFEPointLightElement_h
10 #include "SVGAnimatedNumber.h"
11 #include "SVGFilters.h"
13 nsresult NS_NewSVGFEPointLightElement(
14 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
16 namespace mozilla {
17 namespace dom {
19 typedef SVGFELightElement SVGFEPointLightElementBase;
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 nsSVGFilterInstance* aInstance,
36 nsTArray<float>& aFloatAttributes) override;
37 virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
38 nsAtom* aAttribute) const override;
40 virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
42 // WebIDL
43 already_AddRefed<DOMSVGAnimatedNumber> X();
44 already_AddRefed<DOMSVGAnimatedNumber> Y();
45 already_AddRefed<DOMSVGAnimatedNumber> Z();
47 protected:
48 virtual NumberAttributesInfo GetNumberInfo() override;
50 enum { ATTR_X, ATTR_Y, ATTR_Z };
51 SVGAnimatedNumber mNumberAttributes[3];
52 static NumberInfo sNumberInfo[3];
55 } // namespace dom
56 } // namespace mozilla
58 #endif // mozilla_dom_SVGFEPointLightElement_h