Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/SVGFEFloodElement.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_SVGFEFloodElement_h
8
#define mozilla_dom_SVGFEFloodElement_h
9
10
#include "nsSVGFilters.h"
11
12
nsresult NS_NewSVGFEFloodElement(nsIContent **aResult,
13
                                 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
14
15
namespace mozilla {
16
namespace dom {
17
18
typedef nsSVGFE SVGFEFloodElementBase;
19
20
class SVGFEFloodElement : public SVGFEFloodElementBase
21
{
22
  friend nsresult (::NS_NewSVGFEFloodElement(nsIContent **aResult,
23
                                             already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
24
protected:
25
  explicit SVGFEFloodElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
26
    : SVGFEFloodElementBase(std::move(aNodeInfo))
27
0
  {
28
0
  }
29
  virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
30
31
public:
32
0
  virtual bool SubregionIsUnionOfRegions() override { return false; }
33
34
  virtual FilterPrimitiveDescription
35
    GetPrimitiveDescription(nsSVGFilterInstance* aInstance,
36
                            const IntRect& aFilterSubregion,
37
                            const nsTArray<bool>& aInputsAreTainted,
38
                            nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
39
0
  virtual nsSVGString& GetResultImageName() override { return mStringAttributes[RESULT]; }
40
41
  // nsIContent interface
42
  NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
43
44
  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
45
46
protected:
47
0
  virtual bool ProducesSRGB() override { return true; }
48
49
  virtual StringAttributesInfo GetStringInfo() override;
50
51
  enum { RESULT };
52
  nsSVGString mStringAttributes[1];
53
  static StringInfo sStringInfo[1];
54
};
55
56
} // namespace dom
57
} // namespace mozilla
58
59
#endif // mozilla_dom_SVGFEFloodElement_h