Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/SVGViewElement.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_SVGViewElement_h
8
#define mozilla_dom_SVGViewElement_h
9
10
#include "nsSVGElement.h"
11
#include "nsSVGEnum.h"
12
#include "nsSVGViewBox.h"
13
#include "SVGAnimatedPreserveAspectRatio.h"
14
#include "SVGStringList.h"
15
16
typedef nsSVGElement SVGViewElementBase;
17
18
class nsSVGOuterSVGFrame;
19
20
nsresult NS_NewSVGViewElement(nsIContent **aResult,
21
                              already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
22
23
namespace mozilla {
24
class SVGFragmentIdentifier;
25
26
namespace dom {
27
class SVGViewportElement;
28
29
class SVGViewElement : public SVGViewElementBase
30
{
31
protected:
32
  friend class mozilla::SVGFragmentIdentifier;
33
  friend class SVGSVGElement;
34
  friend class SVGViewportElement;
35
  friend class ::nsSVGOuterSVGFrame;
36
  explicit SVGViewElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
37
  friend nsresult (::NS_NewSVGViewElement(nsIContent **aResult,
38
                                          already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
39
  virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
40
41
public:
42
  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
43
44
  // WebIDL
45
0
  uint16_t ZoomAndPan() { return mEnumAttributes[ZOOMANDPAN].GetAnimValue(); }
46
  void SetZoomAndPan(uint16_t aZoomAndPan, ErrorResult& rv);
47
  already_AddRefed<SVGAnimatedRect> ViewBox();
48
  already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
49
50
private:
51
52
  // nsSVGElement overrides
53
54
  virtual EnumAttributesInfo GetEnumInfo() override;
55
56
  enum { ZOOMANDPAN };
57
  nsSVGEnum mEnumAttributes[1];
58
  static nsSVGEnumMapping sZoomAndPanMap[];
59
  static EnumInfo sEnumInfo[1];
60
61
  virtual nsSVGViewBox *GetViewBox() override;
62
  virtual SVGAnimatedPreserveAspectRatio *GetPreserveAspectRatio() override;
63
64
  nsSVGViewBox                   mViewBox;
65
  SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
66
};
67
68
} // namespace dom
69
} // namespace mozilla
70
71
#endif // mozilla_dom_SVGViewElement_h