/work/obj-fuzz/dist/include/mozilla/dom/AnimationEffectBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM AnimationEffect.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_AnimationEffectBinding_h |
4 | | #define mozilla_dom_AnimationEffectBinding_h |
5 | | |
6 | | #include "AnimationEffectBinding.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 | | #include "mozilla/dom/UnionTypes.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | class AnimationEffect; |
20 | | struct AnimationEffectAtoms; |
21 | | struct ComputedEffectTimingAtoms; |
22 | | struct EffectTimingAtoms; |
23 | | struct NativePropertyHooks; |
24 | | struct OptionalEffectTimingAtoms; |
25 | | class OwningUnrestrictedDoubleOrString; |
26 | | class ProtoAndIfaceCache; |
27 | | class UnrestrictedDoubleOrString; |
28 | | |
29 | | } // namespace dom |
30 | | } // namespace mozilla |
31 | | |
32 | | namespace mozilla { |
33 | | namespace dom { |
34 | | |
35 | | enum class FillMode : uint8_t { |
36 | | None, |
37 | | Forwards, |
38 | | Backwards, |
39 | | Both, |
40 | | Auto, |
41 | | EndGuard_ |
42 | | }; |
43 | | |
44 | | namespace FillModeValues { |
45 | | extern const EnumEntry strings[6]; |
46 | | } // namespace FillModeValues |
47 | | |
48 | | bool |
49 | | ToJSValue(JSContext* aCx, FillMode aArgument, JS::MutableHandle<JS::Value> aValue); |
50 | | |
51 | | |
52 | | enum class PlaybackDirection : uint8_t { |
53 | | Normal, |
54 | | Reverse, |
55 | | Alternate, |
56 | | Alternate_reverse, |
57 | | EndGuard_ |
58 | | }; |
59 | | |
60 | | namespace PlaybackDirectionValues { |
61 | | extern const EnumEntry strings[5]; |
62 | | } // namespace PlaybackDirectionValues |
63 | | |
64 | | bool |
65 | | ToJSValue(JSContext* aCx, PlaybackDirection aArgument, JS::MutableHandle<JS::Value> aValue); |
66 | | |
67 | | |
68 | | struct EffectTiming : public DictionaryBase |
69 | | { |
70 | | MOZ_INIT_OUTSIDE_CTOR double mDelay; |
71 | | MOZ_INIT_OUTSIDE_CTOR PlaybackDirection mDirection; |
72 | | MOZ_INIT_OUTSIDE_CTOR OwningUnrestrictedDoubleOrString mDuration; |
73 | | MOZ_INIT_OUTSIDE_CTOR nsString mEasing; |
74 | | MOZ_INIT_OUTSIDE_CTOR double mEndDelay; |
75 | | MOZ_INIT_OUTSIDE_CTOR FillMode mFill; |
76 | | MOZ_INIT_OUTSIDE_CTOR double mIterationStart; |
77 | | MOZ_INIT_OUTSIDE_CTOR double mIterations; |
78 | | |
79 | | EffectTiming(); |
80 | | |
81 | | explicit inline EffectTiming(const FastDictionaryInitializer& ) |
82 | 0 | { |
83 | 0 | // Do nothing here; this is used by our "Fast" subclass |
84 | 0 | } |
85 | | |
86 | | explicit inline EffectTiming(const EffectTiming& aOther) |
87 | 0 | { |
88 | 0 | *this = aOther; |
89 | 0 | } |
90 | | |
91 | | bool |
92 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
93 | | |
94 | | bool |
95 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
96 | | |
97 | | void |
98 | | TraceDictionary(JSTracer* trc); |
99 | | |
100 | | EffectTiming& |
101 | | operator=(const EffectTiming& aOther); |
102 | | |
103 | | private: |
104 | | static bool |
105 | | InitIds(JSContext* cx, EffectTimingAtoms* atomsCache); |
106 | | }; |
107 | | |
108 | | namespace binding_detail { |
109 | | struct FastEffectTiming : public EffectTiming |
110 | | { |
111 | | inline FastEffectTiming() |
112 | | : EffectTiming(FastDictionaryInitializer()) |
113 | 0 | { |
114 | 0 | // Doesn't matter what int we pass to the parent constructor |
115 | 0 | } |
116 | | }; |
117 | | } // namespace binding_detail |
118 | | |
119 | | |
120 | | struct OptionalEffectTiming : public DictionaryBase |
121 | | { |
122 | | MOZ_INIT_OUTSIDE_CTOR Optional<double> mDelay; |
123 | | MOZ_INIT_OUTSIDE_CTOR Optional<PlaybackDirection> mDirection; |
124 | | MOZ_INIT_OUTSIDE_CTOR Optional<OwningUnrestrictedDoubleOrString> mDuration; |
125 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mEasing; |
126 | | MOZ_INIT_OUTSIDE_CTOR Optional<double> mEndDelay; |
127 | | MOZ_INIT_OUTSIDE_CTOR Optional<FillMode> mFill; |
128 | | MOZ_INIT_OUTSIDE_CTOR Optional<double> mIterationStart; |
129 | | MOZ_INIT_OUTSIDE_CTOR Optional<double> mIterations; |
130 | | |
131 | | OptionalEffectTiming(); |
132 | | |
133 | | explicit inline OptionalEffectTiming(const FastDictionaryInitializer& ) |
134 | 0 | { |
135 | 0 | // Do nothing here; this is used by our "Fast" subclass |
136 | 0 | } |
137 | | |
138 | | explicit inline OptionalEffectTiming(const OptionalEffectTiming& aOther) |
139 | 0 | { |
140 | 0 | *this = aOther; |
141 | 0 | } |
142 | | |
143 | | bool |
144 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
145 | | |
146 | | bool |
147 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
148 | | |
149 | | void |
150 | | TraceDictionary(JSTracer* trc); |
151 | | |
152 | | OptionalEffectTiming& |
153 | | operator=(const OptionalEffectTiming& aOther); |
154 | | |
155 | | private: |
156 | | static bool |
157 | | InitIds(JSContext* cx, OptionalEffectTimingAtoms* atomsCache); |
158 | | }; |
159 | | |
160 | | namespace binding_detail { |
161 | | struct FastOptionalEffectTiming : public OptionalEffectTiming |
162 | | { |
163 | | inline FastOptionalEffectTiming() |
164 | | : OptionalEffectTiming(FastDictionaryInitializer()) |
165 | 0 | { |
166 | 0 | // Doesn't matter what int we pass to the parent constructor |
167 | 0 | } |
168 | | }; |
169 | | } // namespace binding_detail |
170 | | |
171 | | |
172 | | struct ComputedEffectTiming : public EffectTiming |
173 | | { |
174 | | MOZ_INIT_OUTSIDE_CTOR double mActiveDuration; |
175 | | MOZ_INIT_OUTSIDE_CTOR Nullable<double> mCurrentIteration; |
176 | | MOZ_INIT_OUTSIDE_CTOR double mEndTime; |
177 | | MOZ_INIT_OUTSIDE_CTOR Nullable<double> mLocalTime; |
178 | | MOZ_INIT_OUTSIDE_CTOR Nullable<double> mProgress; |
179 | | |
180 | | ComputedEffectTiming(); |
181 | | |
182 | | explicit inline ComputedEffectTiming(const FastDictionaryInitializer& ) |
183 | | : EffectTiming(FastDictionaryInitializer()) |
184 | 0 | { |
185 | 0 | // Do nothing here; this is used by our "Fast" subclass |
186 | 0 | } |
187 | | |
188 | | explicit inline ComputedEffectTiming(const ComputedEffectTiming& aOther) |
189 | 0 | { |
190 | 0 | *this = aOther; |
191 | 0 | } |
192 | | |
193 | | bool |
194 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
195 | | |
196 | | bool |
197 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
198 | | |
199 | | void |
200 | | TraceDictionary(JSTracer* trc); |
201 | | |
202 | | ComputedEffectTiming& |
203 | | operator=(const ComputedEffectTiming& aOther); |
204 | | |
205 | | private: |
206 | | static bool |
207 | | InitIds(JSContext* cx, ComputedEffectTimingAtoms* atomsCache); |
208 | | }; |
209 | | |
210 | | namespace binding_detail { |
211 | | struct FastComputedEffectTiming : public ComputedEffectTiming |
212 | | { |
213 | | inline FastComputedEffectTiming() |
214 | | : ComputedEffectTiming(FastDictionaryInitializer()) |
215 | 0 | { |
216 | 0 | // Doesn't matter what int we pass to the parent constructor |
217 | 0 | } |
218 | | }; |
219 | | } // namespace binding_detail |
220 | | |
221 | | |
222 | | namespace AnimationEffect_Binding { |
223 | | |
224 | | typedef mozilla::dom::AnimationEffect NativeType; |
225 | | |
226 | | bool |
227 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
228 | | |
229 | | // We declare this as an array so that retrieving a pointer to this |
230 | | // binding's property hooks only requires compile/link-time resolvable |
231 | | // address arithmetic. Declaring it as a pointer instead would require |
232 | | // doing a run-time load to fetch a pointer to this binding's property |
233 | | // hooks. And then structures which embedded a pointer to this structure |
234 | | // would require a run-time load for proper initialization, which would |
235 | | // then induce static constructors. Lots of static constructors. |
236 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
237 | | |
238 | | void |
239 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
240 | | |
241 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
242 | 0 | { |
243 | 0 | /* Get the interface prototype object for this class. This will create the |
244 | 0 | object as needed. */ |
245 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::AnimationEffect, |
246 | 0 | &CreateInterfaceObjects, |
247 | 0 | /* aDefineOnGlobal = */ true); |
248 | 0 |
|
249 | 0 | } |
250 | | |
251 | | JSObject* |
252 | | GetProtoObject(JSContext* aCx); |
253 | | |
254 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
255 | 0 | { |
256 | 0 | /* Get the interface object for this class. This will create the object as |
257 | 0 | needed. */ |
258 | 0 |
|
259 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::AnimationEffect, |
260 | 0 | &CreateInterfaceObjects, |
261 | 0 | aDefineOnGlobal); |
262 | 0 | } |
263 | | |
264 | | JSObject* |
265 | | GetConstructorObject(JSContext* aCx); |
266 | | |
267 | | } // namespace AnimationEffect_Binding |
268 | | |
269 | | |
270 | | |
271 | | } // namespace dom |
272 | | } // namespace mozilla |
273 | | |
274 | | #endif // mozilla_dom_AnimationEffectBinding_h |