Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/TransitionEventBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM TransitionEvent.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_TransitionEventBinding_h
4
#define mozilla_dom_TransitionEventBinding_h
5
6
#include "EventBinding.h"
7
#include "GeckoProfiler.h"
8
#include "js/RootingAPI.h"
9
#include "jspubtd.h"
10
#include "mozilla/ErrorResult.h"
11
#include "mozilla/dom/BindingDeclarations.h"
12
#include "mozilla/dom/Nullable.h"
13
#include "mozilla/dom/PrototypeList.h"
14
15
namespace mozilla {
16
namespace dom {
17
18
struct NativePropertyHooks;
19
class ProtoAndIfaceCache;
20
class TransitionEvent;
21
struct TransitionEventAtoms;
22
struct TransitionEventInitAtoms;
23
24
} // namespace dom
25
} // namespace mozilla
26
27
namespace mozilla {
28
namespace dom {
29
30
struct TransitionEventInit : public EventInit
31
{
32
  MOZ_INIT_OUTSIDE_CTOR float mElapsedTime;
33
  MOZ_INIT_OUTSIDE_CTOR nsString mPropertyName;
34
  MOZ_INIT_OUTSIDE_CTOR nsString mPseudoElement;
35
36
  TransitionEventInit();
37
38
  explicit inline TransitionEventInit(const FastDictionaryInitializer& )
39
    : EventInit(FastDictionaryInitializer())
40
0
  {
41
0
    // Do nothing here; this is used by our "Fast" subclass
42
0
  }
43
44
  explicit inline TransitionEventInit(const TransitionEventInit& aOther)
45
0
  {
46
0
    *this = aOther;
47
0
  }
48
49
  bool
50
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
51
52
  bool
53
  Init(const nsAString& aJSON);
54
55
  bool
56
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
57
58
  bool
59
  ToJSON(nsAString& aJSON) const;
60
61
  void
62
  TraceDictionary(JSTracer* trc);
63
64
  TransitionEventInit&
65
  operator=(const TransitionEventInit& aOther);
66
67
private:
68
  static bool
69
  InitIds(JSContext* cx, TransitionEventInitAtoms* atomsCache);
70
};
71
72
namespace binding_detail {
73
struct FastTransitionEventInit : public TransitionEventInit
74
{
75
  inline FastTransitionEventInit()
76
    : TransitionEventInit(FastDictionaryInitializer())
77
0
  {
78
0
    // Doesn't matter what int we pass to the parent constructor
79
0
  }
80
};
81
} // namespace binding_detail
82
83
84
namespace TransitionEvent_Binding {
85
86
  typedef mozilla::dom::TransitionEvent NativeType;
87
88
  const JSClass*
89
  GetJSClass();
90
91
  bool
92
  Wrap(JSContext* aCx, mozilla::dom::TransitionEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
93
94
  template <class T>
95
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
96
0
  {
97
0
    JS::Rooted<JSObject*> reflector(aCx);
98
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
99
0
  }
100
101
  // We declare this as an array so that retrieving a pointer to this
102
  // binding's property hooks only requires compile/link-time resolvable
103
  // address arithmetic.  Declaring it as a pointer instead would require
104
  // doing a run-time load to fetch a pointer to this binding's property
105
  // hooks.  And then structures which embedded a pointer to this structure
106
  // would require a run-time load for proper initialization, which would
107
  // then induce static constructors.  Lots of static constructors.
108
  extern const NativePropertyHooks sNativePropertyHooks[];
109
110
  void
111
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
112
113
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
114
0
  {
115
0
    /* Get the interface prototype object for this class.  This will create the
116
0
       object as needed. */
117
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::TransitionEvent,
118
0
                                       &CreateInterfaceObjects,
119
0
                                       /* aDefineOnGlobal = */ true);
120
0
121
0
  }
122
123
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
124
0
  {
125
0
    /* Get the interface object for this class.  This will create the object as
126
0
       needed. */
127
0
128
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::TransitionEvent,
129
0
                                       &CreateInterfaceObjects,
130
0
                                       aDefineOnGlobal);
131
0
  }
132
133
  JSObject*
134
  GetConstructorObject(JSContext* aCx);
135
136
} // namespace TransitionEvent_Binding
137
138
139
140
} // namespace dom
141
} // namespace mozilla
142
143
#endif // mozilla_dom_TransitionEventBinding_h