Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/SVGFETurbulenceElement.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_SVGFETurbulenceElement_h
8
#define mozilla_dom_SVGFETurbulenceElement_h
9
10
#include "nsSVGEnum.h"
11
#include "nsSVGFilters.h"
12
#include "nsSVGNumber2.h"
13
#include "nsSVGInteger.h"
14
#include "nsSVGString.h"
15
16
nsresult NS_NewSVGFETurbulenceElement(nsIContent **aResult,
17
                                      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
18
19
namespace mozilla {
20
namespace dom {
21
22
typedef nsSVGFE SVGFETurbulenceElementBase;
23
24
class SVGFETurbulenceElement : public SVGFETurbulenceElementBase
25
{
26
  friend nsresult (::NS_NewSVGFETurbulenceElement(nsIContent **aResult,
27
                                                  already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
28
protected:
29
  explicit SVGFETurbulenceElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
30
    : SVGFETurbulenceElementBase(std::move(aNodeInfo))
31
0
  {
32
0
  }
33
  virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
34
35
public:
36
0
  virtual bool SubregionIsUnionOfRegions() override { return false; }
37
38
  virtual FilterPrimitiveDescription
39
    GetPrimitiveDescription(nsSVGFilterInstance* aInstance,
40
                            const IntRect& aFilterSubregion,
41
                            const nsTArray<bool>& aInputsAreTainted,
42
                            nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
43
  virtual bool AttributeAffectsRendering(
44
          int32_t aNameSpaceID, nsAtom* aAttribute) const override;
45
0
  virtual nsSVGString& GetResultImageName() override { return mStringAttributes[RESULT]; }
46
47
  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
48
49
  // WebIDL
50
  already_AddRefed<SVGAnimatedNumber> BaseFrequencyX();
51
  already_AddRefed<SVGAnimatedNumber> BaseFrequencyY();
52
  already_AddRefed<SVGAnimatedInteger> NumOctaves();
53
  already_AddRefed<SVGAnimatedNumber> Seed();
54
  already_AddRefed<SVGAnimatedEnumeration> StitchTiles();
55
  already_AddRefed<SVGAnimatedEnumeration> Type();
56
57
protected:
58
  virtual NumberAttributesInfo GetNumberInfo() override;
59
  virtual NumberPairAttributesInfo GetNumberPairInfo() override;
60
  virtual IntegerAttributesInfo GetIntegerInfo() override;
61
  virtual EnumAttributesInfo GetEnumInfo() override;
62
  virtual StringAttributesInfo GetStringInfo() override;
63
64
  enum { SEED }; // floating point seed?!
65
  nsSVGNumber2 mNumberAttributes[1];
66
  static NumberInfo sNumberInfo[1];
67
68
  enum { BASE_FREQ };
69
  nsSVGNumberPair mNumberPairAttributes[1];
70
  static NumberPairInfo sNumberPairInfo[1];
71
72
  enum { OCTAVES };
73
  nsSVGInteger mIntegerAttributes[1];
74
  static IntegerInfo sIntegerInfo[1];
75
76
  enum { TYPE, STITCHTILES };
77
  nsSVGEnum mEnumAttributes[2];
78
  static nsSVGEnumMapping sTypeMap[];
79
  static nsSVGEnumMapping sStitchTilesMap[];
80
  static EnumInfo sEnumInfo[2];
81
82
  enum { RESULT };
83
  nsSVGString mStringAttributes[1];
84
  static StringInfo sStringInfo[1];
85
};
86
87
} // namespace dom
88
} // namespace mozilla
89
90
#endif // mozilla_dom_SVGFETurbulenceElement_h