Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/SVGAnimateMotionElement.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_SVGAnimateMotionElement_h
8
#define mozilla_dom_SVGAnimateMotionElement_h
9
10
#include "mozilla/Attributes.h"
11
#include "mozilla/dom/SVGAnimationElement.h"
12
#include "SVGMotionSMILAnimationFunction.h"
13
14
nsresult NS_NewSVGAnimateMotionElement(nsIContent **aResult,
15
                                       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
16
17
namespace mozilla {
18
namespace dom {
19
20
class SVGAnimateMotionElement final : public SVGAnimationElement
21
{
22
protected:
23
  explicit SVGAnimateMotionElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
24
25
  SVGMotionSMILAnimationFunction mAnimationFunction;
26
  friend nsresult
27
    (::NS_NewSVGAnimateMotionElement(nsIContent **aResult,
28
                                     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
29
30
  virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
31
32
public:
33
  // nsINode specializations
34
  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
35
36
  // SVGAnimationElement
37
  virtual nsSMILAnimationFunction& AnimationFunction() override;
38
  virtual bool GetTargetAttributeName(int32_t *aNamespaceID,
39
                                      nsAtom **aLocalName) const override;
40
41
  // nsSVGElement
42
0
  virtual nsAtom* GetPathDataAttrName() const override {
43
0
    return nsGkAtoms::path;
44
0
  }
45
46
  // Utility method to let our <mpath> children tell us when they've changed,
47
  // so we can make sure our mAnimationFunction is marked as having changed.
48
0
  void MpathChanged() { mAnimationFunction.MpathChanged(); }
49
};
50
51
} // namespace dom
52
} // namespace mozilla
53
54
#endif // mozilla_dom_SVGAnimateMotionElement_h