Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/SVGFESpotLightElement.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef mozilla_dom_SVGFESpotLightElement_h
8
#define mozilla_dom_SVGFESpotLightElement_h
9
10
#include "nsSVGFilters.h"
11
#include "nsSVGNumber2.h"
12
13
nsresult NS_NewSVGFESpotLightElement(nsIContent **aResult,
14
                                     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
15
16
namespace mozilla {
17
namespace dom {
18
19
typedef SVGFELightElement SVGFESpotLightElementBase;
20
21
class SVGFESpotLightElement : public SVGFESpotLightElementBase
22
{
23
  friend nsresult (::NS_NewSVGFESpotLightElement(nsIContent **aResult,
24
                                                 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
25
  friend class ::nsSVGFELightingElement;
26
protected:
27
  explicit SVGFESpotLightElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
28
    : SVGFESpotLightElementBase(std::move(aNodeInfo))
29
0
  {
30
0
  }
31
  virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
32
33
public:
34
  virtual mozilla::gfx::LightType ComputeLightAttributes(nsSVGFilterInstance* aInstance,
35
                                                         nsTArray<float>& aFloatAttributes) override;
36
  virtual bool AttributeAffectsRendering(
37
          int32_t aNameSpaceID, nsAtom* aAttribute) const override;
38
39
  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
40
41
  // WebIDL
42
  already_AddRefed<SVGAnimatedNumber> X();
43
  already_AddRefed<SVGAnimatedNumber> Y();
44
  already_AddRefed<SVGAnimatedNumber> Z();
45
  already_AddRefed<SVGAnimatedNumber> PointsAtX();
46
  already_AddRefed<SVGAnimatedNumber> PointsAtY();
47
  already_AddRefed<SVGAnimatedNumber> PointsAtZ();
48
  already_AddRefed<SVGAnimatedNumber> SpecularExponent();
49
  already_AddRefed<SVGAnimatedNumber> LimitingConeAngle();
50
51
protected:
52
  virtual NumberAttributesInfo GetNumberInfo() override;
53
54
  enum { ATTR_X, ATTR_Y, ATTR_Z, POINTS_AT_X, POINTS_AT_Y, POINTS_AT_Z,
55
         SPECULAR_EXPONENT, LIMITING_CONE_ANGLE };
56
  nsSVGNumber2 mNumberAttributes[8];
57
  static NumberInfo sNumberInfo[8];
58
};
59
60
} // namespace dom
61
} // namespace mozilla
62
63
#endif // mozilla_dom_SVGFESpotLightElement_h