Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/SVGPreserveAspectRatioBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM SVGPreserveAspectRatio.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_SVGPreserveAspectRatioBinding_h
4
#define mozilla_dom_SVGPreserveAspectRatioBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "js/RootingAPI.h"
8
#include "jspubtd.h"
9
#include "mozilla/ErrorResult.h"
10
#include "mozilla/dom/BindingDeclarations.h"
11
#include "mozilla/dom/Nullable.h"
12
#include "mozilla/dom/PrototypeList.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
class DOMSVGPreserveAspectRatio;
18
struct DOMSVGPreserveAspectRatioAtoms;
19
struct NativePropertyHooks;
20
class ProtoAndIfaceCache;
21
22
} // namespace dom
23
} // namespace mozilla
24
25
namespace mozilla {
26
namespace dom {
27
28
namespace SVGPreserveAspectRatio_Binding {
29
30
  typedef mozilla::dom::DOMSVGPreserveAspectRatio NativeType;
31
32
  static const uint16_t SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
33
  static const uint16_t SVG_PRESERVEASPECTRATIO_NONE = 1;
34
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
35
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
36
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
37
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
38
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
39
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
40
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
41
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
42
  static const uint16_t SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
43
  static const uint16_t SVG_MEETORSLICE_UNKNOWN = 0;
44
  static const uint16_t SVG_MEETORSLICE_MEET = 1;
45
  static const uint16_t SVG_MEETORSLICE_SLICE = 2;
46
  const JSClass*
47
  GetJSClass();
48
49
  bool
50
  Wrap(JSContext* aCx, mozilla::dom::DOMSVGPreserveAspectRatio* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
51
52
  template <class T>
53
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
54
0
  {
55
0
    JS::Rooted<JSObject*> reflector(aCx);
56
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
57
0
  }
58
59
  // We declare this as an array so that retrieving a pointer to this
60
  // binding's property hooks only requires compile/link-time resolvable
61
  // address arithmetic.  Declaring it as a pointer instead would require
62
  // doing a run-time load to fetch a pointer to this binding's property
63
  // hooks.  And then structures which embedded a pointer to this structure
64
  // would require a run-time load for proper initialization, which would
65
  // then induce static constructors.  Lots of static constructors.
66
  extern const NativePropertyHooks sNativePropertyHooks[];
67
68
  void
69
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
70
71
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
72
0
  {
73
0
    /* Get the interface prototype object for this class.  This will create the
74
0
       object as needed. */
75
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::SVGPreserveAspectRatio,
76
0
                                       &CreateInterfaceObjects,
77
0
                                       /* aDefineOnGlobal = */ true);
78
0
79
0
  }
80
81
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
82
0
  {
83
0
    /* Get the interface object for this class.  This will create the object as
84
0
       needed. */
85
0
86
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::SVGPreserveAspectRatio,
87
0
                                       &CreateInterfaceObjects,
88
0
                                       aDefineOnGlobal);
89
0
  }
90
91
  JSObject*
92
  GetConstructorObject(JSContext* aCx);
93
94
} // namespace SVGPreserveAspectRatio_Binding
95
96
97
98
} // namespace dom
99
} // namespace mozilla
100
101
#endif // mozilla_dom_SVGPreserveAspectRatioBinding_h