/work/obj-fuzz/dist/include/mozilla/dom/APZTestDataBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM APZTestData.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_APZTestDataBinding_h |
4 | | #define mozilla_dom_APZTestDataBinding_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 | | struct APZBucket; |
18 | | struct APZBucketAtoms; |
19 | | struct APZHitResult; |
20 | | struct APZHitResultAtoms; |
21 | | class APZHitResultFlags; |
22 | | struct APZHitResultFlagsAtoms; |
23 | | struct APZTestDataAtoms; |
24 | | struct FrameUniformity; |
25 | | struct FrameUniformityAtoms; |
26 | | struct FrameUniformityResultsAtoms; |
27 | | struct NativePropertyHooks; |
28 | | class ProtoAndIfaceCache; |
29 | | struct ScrollFrameData; |
30 | | struct ScrollFrameDataAtoms; |
31 | | struct ScrollFrameDataEntry; |
32 | | struct ScrollFrameDataEntryAtoms; |
33 | | |
34 | | } // namespace dom |
35 | | } // namespace mozilla |
36 | | |
37 | | namespace mozilla { |
38 | | namespace dom { |
39 | | |
40 | | struct APZHitResult : public DictionaryBase |
41 | | { |
42 | | MOZ_INIT_OUTSIDE_CTOR Optional<uint16_t> mHitResult; |
43 | | MOZ_INIT_OUTSIDE_CTOR Optional<float> mScreenX; |
44 | | MOZ_INIT_OUTSIDE_CTOR Optional<float> mScreenY; |
45 | | MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mScrollId; |
46 | | |
47 | | APZHitResult(); |
48 | | |
49 | | explicit inline APZHitResult(const FastDictionaryInitializer& ) |
50 | 0 | { |
51 | 0 | // Do nothing here; this is used by our "Fast" subclass |
52 | 0 | } |
53 | | |
54 | | explicit inline APZHitResult(const APZHitResult& aOther) |
55 | 0 | { |
56 | 0 | *this = aOther; |
57 | 0 | } |
58 | | |
59 | | bool |
60 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
61 | | |
62 | | bool |
63 | | Init(const nsAString& aJSON); |
64 | | |
65 | | bool |
66 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
67 | | |
68 | | bool |
69 | | ToJSON(nsAString& aJSON) const; |
70 | | |
71 | | void |
72 | | TraceDictionary(JSTracer* trc); |
73 | | |
74 | | APZHitResult& |
75 | | operator=(const APZHitResult& aOther); |
76 | | |
77 | | private: |
78 | | static bool |
79 | | InitIds(JSContext* cx, APZHitResultAtoms* atomsCache); |
80 | | }; |
81 | | |
82 | | namespace binding_detail { |
83 | | struct FastAPZHitResult : public APZHitResult |
84 | | { |
85 | | inline FastAPZHitResult() |
86 | | : APZHitResult(FastDictionaryInitializer()) |
87 | 0 | { |
88 | 0 | // Doesn't matter what int we pass to the parent constructor |
89 | 0 | } |
90 | | }; |
91 | | } // namespace binding_detail |
92 | | |
93 | | |
94 | | struct FrameUniformity : public DictionaryBase |
95 | | { |
96 | | MOZ_INIT_OUTSIDE_CTOR Optional<float> mFrameUniformity; |
97 | | MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mLayerAddress; |
98 | | |
99 | | FrameUniformity(); |
100 | | |
101 | | explicit inline FrameUniformity(const FastDictionaryInitializer& ) |
102 | 0 | { |
103 | 0 | // Do nothing here; this is used by our "Fast" subclass |
104 | 0 | } |
105 | | |
106 | | explicit inline FrameUniformity(const FrameUniformity& aOther) |
107 | 0 | { |
108 | 0 | *this = aOther; |
109 | 0 | } |
110 | | |
111 | | bool |
112 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
113 | | |
114 | | bool |
115 | | Init(const nsAString& aJSON); |
116 | | |
117 | | bool |
118 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
119 | | |
120 | | bool |
121 | | ToJSON(nsAString& aJSON) const; |
122 | | |
123 | | void |
124 | | TraceDictionary(JSTracer* trc); |
125 | | |
126 | | FrameUniformity& |
127 | | operator=(const FrameUniformity& aOther); |
128 | | |
129 | | private: |
130 | | static bool |
131 | | InitIds(JSContext* cx, FrameUniformityAtoms* atomsCache); |
132 | | }; |
133 | | |
134 | | namespace binding_detail { |
135 | | struct FastFrameUniformity : public FrameUniformity |
136 | | { |
137 | | inline FastFrameUniformity() |
138 | | : FrameUniformity(FastDictionaryInitializer()) |
139 | 0 | { |
140 | 0 | // Doesn't matter what int we pass to the parent constructor |
141 | 0 | } |
142 | | }; |
143 | | } // namespace binding_detail |
144 | | |
145 | | |
146 | | struct ScrollFrameDataEntry : public DictionaryBase |
147 | | { |
148 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mKey; |
149 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mValue; |
150 | | |
151 | | ScrollFrameDataEntry(); |
152 | | |
153 | | explicit inline ScrollFrameDataEntry(const FastDictionaryInitializer& ) |
154 | 0 | { |
155 | 0 | // Do nothing here; this is used by our "Fast" subclass |
156 | 0 | } |
157 | | |
158 | | explicit inline ScrollFrameDataEntry(const ScrollFrameDataEntry& aOther) |
159 | 0 | { |
160 | 0 | *this = aOther; |
161 | 0 | } |
162 | | |
163 | | bool |
164 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
165 | | |
166 | | bool |
167 | | Init(const nsAString& aJSON); |
168 | | |
169 | | bool |
170 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
171 | | |
172 | | bool |
173 | | ToJSON(nsAString& aJSON) const; |
174 | | |
175 | | void |
176 | | TraceDictionary(JSTracer* trc); |
177 | | |
178 | | ScrollFrameDataEntry& |
179 | | operator=(const ScrollFrameDataEntry& aOther); |
180 | | |
181 | | private: |
182 | | static bool |
183 | | InitIds(JSContext* cx, ScrollFrameDataEntryAtoms* atomsCache); |
184 | | }; |
185 | | |
186 | | namespace binding_detail { |
187 | | struct FastScrollFrameDataEntry : public ScrollFrameDataEntry |
188 | | { |
189 | | inline FastScrollFrameDataEntry() |
190 | | : ScrollFrameDataEntry(FastDictionaryInitializer()) |
191 | 0 | { |
192 | 0 | // Doesn't matter what int we pass to the parent constructor |
193 | 0 | } |
194 | | }; |
195 | | } // namespace binding_detail |
196 | | |
197 | | |
198 | | struct FrameUniformityResults : public DictionaryBase |
199 | | { |
200 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<FrameUniformity>> mLayerUniformities; |
201 | | |
202 | | FrameUniformityResults(); |
203 | | |
204 | | explicit inline FrameUniformityResults(const FastDictionaryInitializer& ) |
205 | 0 | { |
206 | 0 | // Do nothing here; this is used by our "Fast" subclass |
207 | 0 | } |
208 | | |
209 | | explicit inline FrameUniformityResults(const FrameUniformityResults& aOther) |
210 | 0 | { |
211 | 0 | *this = aOther; |
212 | 0 | } |
213 | | |
214 | | bool |
215 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
216 | | |
217 | | bool |
218 | | Init(const nsAString& aJSON); |
219 | | |
220 | | bool |
221 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
222 | | |
223 | | bool |
224 | | ToJSON(nsAString& aJSON) const; |
225 | | |
226 | | void |
227 | | TraceDictionary(JSTracer* trc); |
228 | | |
229 | | FrameUniformityResults& |
230 | | operator=(const FrameUniformityResults& aOther); |
231 | | |
232 | | private: |
233 | | static bool |
234 | | InitIds(JSContext* cx, FrameUniformityResultsAtoms* atomsCache); |
235 | | }; |
236 | | |
237 | | namespace binding_detail { |
238 | | struct FastFrameUniformityResults : public FrameUniformityResults |
239 | | { |
240 | | inline FastFrameUniformityResults() |
241 | | : FrameUniformityResults(FastDictionaryInitializer()) |
242 | 0 | { |
243 | 0 | // Doesn't matter what int we pass to the parent constructor |
244 | 0 | } |
245 | | }; |
246 | | } // namespace binding_detail |
247 | | |
248 | | |
249 | | struct ScrollFrameData : public DictionaryBase |
250 | | { |
251 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<ScrollFrameDataEntry>> mEntries; |
252 | | MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mScrollId; |
253 | | |
254 | | ScrollFrameData(); |
255 | | |
256 | | explicit inline ScrollFrameData(const FastDictionaryInitializer& ) |
257 | 0 | { |
258 | 0 | // Do nothing here; this is used by our "Fast" subclass |
259 | 0 | } |
260 | | |
261 | | explicit inline ScrollFrameData(const ScrollFrameData& aOther) |
262 | 0 | { |
263 | 0 | *this = aOther; |
264 | 0 | } |
265 | | |
266 | | bool |
267 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
268 | | |
269 | | bool |
270 | | Init(const nsAString& aJSON); |
271 | | |
272 | | bool |
273 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
274 | | |
275 | | bool |
276 | | ToJSON(nsAString& aJSON) const; |
277 | | |
278 | | void |
279 | | TraceDictionary(JSTracer* trc); |
280 | | |
281 | | ScrollFrameData& |
282 | | operator=(const ScrollFrameData& aOther); |
283 | | |
284 | | private: |
285 | | static bool |
286 | | InitIds(JSContext* cx, ScrollFrameDataAtoms* atomsCache); |
287 | | }; |
288 | | |
289 | | namespace binding_detail { |
290 | | struct FastScrollFrameData : public ScrollFrameData |
291 | | { |
292 | | inline FastScrollFrameData() |
293 | | : ScrollFrameData(FastDictionaryInitializer()) |
294 | 0 | { |
295 | 0 | // Doesn't matter what int we pass to the parent constructor |
296 | 0 | } |
297 | | }; |
298 | | } // namespace binding_detail |
299 | | |
300 | | |
301 | | struct APZBucket : public DictionaryBase |
302 | | { |
303 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<ScrollFrameData>> mScrollFrames; |
304 | | MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mSequenceNumber; |
305 | | |
306 | | APZBucket(); |
307 | | |
308 | | explicit inline APZBucket(const FastDictionaryInitializer& ) |
309 | 0 | { |
310 | 0 | // Do nothing here; this is used by our "Fast" subclass |
311 | 0 | } |
312 | | |
313 | | explicit inline APZBucket(const APZBucket& aOther) |
314 | 0 | { |
315 | 0 | *this = aOther; |
316 | 0 | } |
317 | | |
318 | | bool |
319 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
320 | | |
321 | | bool |
322 | | Init(const nsAString& aJSON); |
323 | | |
324 | | bool |
325 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
326 | | |
327 | | bool |
328 | | ToJSON(nsAString& aJSON) const; |
329 | | |
330 | | void |
331 | | TraceDictionary(JSTracer* trc); |
332 | | |
333 | | APZBucket& |
334 | | operator=(const APZBucket& aOther); |
335 | | |
336 | | private: |
337 | | static bool |
338 | | InitIds(JSContext* cx, APZBucketAtoms* atomsCache); |
339 | | }; |
340 | | |
341 | | namespace binding_detail { |
342 | | struct FastAPZBucket : public APZBucket |
343 | | { |
344 | | inline FastAPZBucket() |
345 | | : APZBucket(FastDictionaryInitializer()) |
346 | 0 | { |
347 | 0 | // Doesn't matter what int we pass to the parent constructor |
348 | 0 | } |
349 | | }; |
350 | | } // namespace binding_detail |
351 | | |
352 | | |
353 | | struct APZTestData : public DictionaryBase |
354 | | { |
355 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<APZHitResult>> mHitResults; |
356 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<APZBucket>> mPaints; |
357 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<APZBucket>> mRepaintRequests; |
358 | | |
359 | | APZTestData(); |
360 | | |
361 | | explicit inline APZTestData(const FastDictionaryInitializer& ) |
362 | 0 | { |
363 | 0 | // Do nothing here; this is used by our "Fast" subclass |
364 | 0 | } |
365 | | |
366 | | explicit inline APZTestData(const APZTestData& aOther) |
367 | 0 | { |
368 | 0 | *this = aOther; |
369 | 0 | } |
370 | | |
371 | | bool |
372 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
373 | | |
374 | | bool |
375 | | Init(const nsAString& aJSON); |
376 | | |
377 | | bool |
378 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
379 | | |
380 | | bool |
381 | | ToJSON(nsAString& aJSON) const; |
382 | | |
383 | | void |
384 | | TraceDictionary(JSTracer* trc); |
385 | | |
386 | | APZTestData& |
387 | | operator=(const APZTestData& aOther); |
388 | | |
389 | | private: |
390 | | static bool |
391 | | InitIds(JSContext* cx, APZTestDataAtoms* atomsCache); |
392 | | }; |
393 | | |
394 | | namespace binding_detail { |
395 | | struct FastAPZTestData : public APZTestData |
396 | | { |
397 | | inline FastAPZTestData() |
398 | | : APZTestData(FastDictionaryInitializer()) |
399 | 0 | { |
400 | 0 | // Doesn't matter what int we pass to the parent constructor |
401 | 0 | } |
402 | | }; |
403 | | } // namespace binding_detail |
404 | | |
405 | | |
406 | | namespace APZHitResultFlags_Binding { |
407 | | |
408 | | typedef mozilla::dom::APZHitResultFlags NativeType; |
409 | | |
410 | | static const uint16_t INVISIBLE = 0; |
411 | | static const uint16_t VISIBLE = 1; |
412 | | static const uint16_t DISPATCH_TO_CONTENT = 2; |
413 | | static const uint16_t PAN_X_DISABLED = 4; |
414 | | static const uint16_t PAN_Y_DISABLED = 8; |
415 | | static const uint16_t PINCH_ZOOM_DISABLED = 16; |
416 | | static const uint16_t DOUBLE_TAP_ZOOM_DISABLED = 32; |
417 | | static const uint16_t SCROLLBAR = 64; |
418 | | static const uint16_t SCROLLBAR_THUMB = 128; |
419 | | static const uint16_t SCROLLBAR_VERTICAL = 256; |
420 | | bool |
421 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
422 | | |
423 | | // We declare this as an array so that retrieving a pointer to this |
424 | | // binding's property hooks only requires compile/link-time resolvable |
425 | | // address arithmetic. Declaring it as a pointer instead would require |
426 | | // doing a run-time load to fetch a pointer to this binding's property |
427 | | // hooks. And then structures which embedded a pointer to this structure |
428 | | // would require a run-time load for proper initialization, which would |
429 | | // then induce static constructors. Lots of static constructors. |
430 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
431 | | |
432 | | void |
433 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
434 | | |
435 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
436 | 0 | { |
437 | 0 | /* Get the interface object for this class. This will create the object as |
438 | 0 | needed. */ |
439 | 0 |
|
440 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::APZHitResultFlags, |
441 | 0 | &CreateInterfaceObjects, |
442 | 0 | aDefineOnGlobal); |
443 | 0 | } |
444 | | |
445 | | JSObject* |
446 | | GetConstructorObject(JSContext* aCx); |
447 | | |
448 | | } // namespace APZHitResultFlags_Binding |
449 | | |
450 | | |
451 | | |
452 | | } // namespace dom |
453 | | } // namespace mozilla |
454 | | |
455 | | #endif // mozilla_dom_APZTestDataBinding_h |