Coverage Report

Created: 2018-09-25 14:53

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